mark-deco-cli 0.14.0 → 0.15.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/dist/cli.cjs +1148 -1110
- package/dist/cli.cjs.map +1 -1
- package/package.json +10 -9
package/dist/cli.cjs
CHANGED
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
"use strict";
|
|
3
3
|
/*!
|
|
4
4
|
* name: mark-deco-cli
|
|
5
|
-
* version: 0.
|
|
5
|
+
* version: 0.15.0
|
|
6
6
|
* description: Command-line interface for mark-deco Markdown to HTML conversion processor
|
|
7
7
|
* author: Kouji Matsui (@kekyo@mi.kekyo.net)
|
|
8
8
|
* license: MIT
|
|
9
9
|
* repository.url: https://github.com/kekyo/mark-deco.git
|
|
10
|
-
* git.commit.hash:
|
|
10
|
+
* git.commit.hash: e293e83ab3b88ab4bc77b92c51ee38275f33c948
|
|
11
11
|
*/
|
|
12
12
|
const commander = require("commander");
|
|
13
13
|
const promises = require("fs/promises");
|
|
@@ -4338,7 +4338,7 @@ function requireJs() {
|
|
|
4338
4338
|
return js$1.exports;
|
|
4339
4339
|
}
|
|
4340
4340
|
var jsExports = requireJs();
|
|
4341
|
-
const
|
|
4341
|
+
const he = /* @__PURE__ */ getDefaultExportFromCjs(jsExports);
|
|
4342
4342
|
const htmlVoidElements = [
|
|
4343
4343
|
"area",
|
|
4344
4344
|
"base",
|
|
@@ -21417,12 +21417,12 @@ var load = loader.load;
|
|
|
21417
21417
|
var dump = dumper.dump;
|
|
21418
21418
|
/*!
|
|
21419
21419
|
* name: mark-deco
|
|
21420
|
-
* version: 0.
|
|
21420
|
+
* version: 0.15.0
|
|
21421
21421
|
* description: Flexible Markdown to HTML conversion library
|
|
21422
21422
|
* author: Kouji Matsui (@kekyo@mi.kekyo.net)
|
|
21423
21423
|
* license: MIT
|
|
21424
21424
|
* repository.url: https://github.com/kekyo/mark-deco.git
|
|
21425
|
-
* git.commit.hash:
|
|
21425
|
+
* git.commit.hash: e293e83ab3b88ab4bc77b92c51ee38275f33c948
|
|
21426
21426
|
*/
|
|
21427
21427
|
const qd = (e) => {
|
|
21428
21428
|
try {
|
|
@@ -21430,7 +21430,7 @@ const qd = (e) => {
|
|
|
21430
21430
|
} catch {
|
|
21431
21431
|
return false;
|
|
21432
21432
|
}
|
|
21433
|
-
}, R = (e) => {
|
|
21433
|
+
}, R$1 = (e) => {
|
|
21434
21434
|
const t = {
|
|
21435
21435
|
"&": "&",
|
|
21436
21436
|
"<": "<",
|
|
@@ -21460,7 +21460,7 @@ const qd = (e) => {
|
|
|
21460
21460
|
}, Ys = () => "width: 100%; height: auto; display: block; object-fit: contain; object-position: center;", ou = (e, t, u, r) => {
|
|
21461
21461
|
const a = Ys(), i = "", n = r ? ` ${r}` : "";
|
|
21462
21462
|
return `<img src="${e}" alt="${t}"${i} style="${a}"${n} />`;
|
|
21463
|
-
}, At
|
|
21463
|
+
}, At = (e, t, u, r, a) => {
|
|
21464
21464
|
const i = ou(e, t, r, a);
|
|
21465
21465
|
return `<div class="${u}">
|
|
21466
21466
|
${i}
|
|
@@ -21587,8 +21587,8 @@ const qd = (e) => {
|
|
|
21587
21587
|
if (h) {
|
|
21588
21588
|
const m = h[0].match(/href=['"]([^'"]+)['"]/i);
|
|
21589
21589
|
if (m && m[1]) {
|
|
21590
|
-
const f = m[1], T = $s(f),
|
|
21591
|
-
return u.info("getOEmbedUrl: Discovered oEmbed endpoint:",
|
|
21590
|
+
const f = m[1], T = $s(f), A2 = new URL(T, e).toString();
|
|
21591
|
+
return u.info("getOEmbedUrl: Discovered oEmbed endpoint:", A2), A2;
|
|
21592
21592
|
}
|
|
21593
21593
|
}
|
|
21594
21594
|
} catch (c) {
|
|
@@ -21613,9 +21613,9 @@ const qd = (e) => {
|
|
|
21613
21613
|
m.signal = i ? Tr(i, f) : f;
|
|
21614
21614
|
const T = await fetch(n, m);
|
|
21615
21615
|
if (T.status >= 300 && T.status < 400) {
|
|
21616
|
-
const
|
|
21617
|
-
if (
|
|
21618
|
-
n = new URL(
|
|
21616
|
+
const A2 = T.headers.get("location");
|
|
21617
|
+
if (A2) {
|
|
21618
|
+
n = new URL(A2, n).toString(), c++;
|
|
21619
21619
|
continue;
|
|
21620
21620
|
}
|
|
21621
21621
|
}
|
|
@@ -21679,11 +21679,11 @@ const Gd = async (e, t, u, r, a) => {
|
|
|
21679
21679
|
return `<div class="oembed-container oembed-fallback">
|
|
21680
21680
|
<div class="oembed-header">
|
|
21681
21681
|
<div class="oembed-title">External Content</div>
|
|
21682
|
-
<div class="oembed-provider">${R(r)}${a}</div>
|
|
21682
|
+
<div class="oembed-provider">${R$1(r)}${a}</div>
|
|
21683
21683
|
</div>
|
|
21684
21684
|
<div class="oembed-content">
|
|
21685
|
-
<a href="${R(e)}" target="_blank" rel="noopener noreferrer">
|
|
21686
|
-
View content on ${R(r)}
|
|
21685
|
+
<a href="${R$1(e)}" target="_blank" rel="noopener noreferrer">
|
|
21686
|
+
View content on ${R$1(r)}
|
|
21687
21687
|
</a>
|
|
21688
21688
|
</div>
|
|
21689
21689
|
</div>`;
|
|
@@ -21733,21 +21733,21 @@ const Gd = async (e, t, u, r, a) => {
|
|
|
21733
21733
|
const T = [];
|
|
21734
21734
|
if (r.title !== void 0 && T.push({
|
|
21735
21735
|
order: r.title,
|
|
21736
|
-
html: `<div class="oembed-title">${R(i)}</div>`
|
|
21736
|
+
html: `<div class="oembed-title">${R$1(i)}</div>`
|
|
21737
21737
|
}), r.author !== void 0 && T.push({
|
|
21738
21738
|
order: r.author,
|
|
21739
|
-
html: `<div class="oembed-author">by ${R(n)}</div>`
|
|
21739
|
+
html: `<div class="oembed-author">by ${R$1(n)}</div>`
|
|
21740
21740
|
}), r.provider !== void 0 && T.push({
|
|
21741
21741
|
order: r.provider,
|
|
21742
|
-
html: `<div class="oembed-provider">${R(u)}</div>`
|
|
21742
|
+
html: `<div class="oembed-provider">${R$1(u)}</div>`
|
|
21743
21743
|
}), r.description !== void 0 && e.author_name && T.push({
|
|
21744
21744
|
order: r.description,
|
|
21745
|
-
html: `<div class="oembed-description">${R(e.author_name)}</div>`
|
|
21745
|
+
html: `<div class="oembed-description">${R$1(e.author_name)}</div>`
|
|
21746
21746
|
}), r.thumbnail !== void 0 && e.thumbnail_url && T.push({
|
|
21747
21747
|
order: r.thumbnail,
|
|
21748
|
-
html: At
|
|
21749
|
-
R(e.thumbnail_url),
|
|
21750
|
-
R(i),
|
|
21748
|
+
html: At(
|
|
21749
|
+
R$1(e.thumbnail_url),
|
|
21750
|
+
R$1(i),
|
|
21751
21751
|
"oembed-thumbnail"
|
|
21752
21752
|
)
|
|
21753
21753
|
}), r.embeddedContent !== void 0 && c) {
|
|
@@ -21755,8 +21755,8 @@ const Gd = async (e, t, u, r, a) => {
|
|
|
21755
21755
|
T.push({
|
|
21756
21756
|
order: r.embeddedContent,
|
|
21757
21757
|
html: ou(
|
|
21758
|
-
R(c),
|
|
21759
|
-
R(i),
|
|
21758
|
+
R$1(c),
|
|
21759
|
+
R$1(i),
|
|
21760
21760
|
void 0,
|
|
21761
21761
|
M
|
|
21762
21762
|
)
|
|
@@ -21767,14 +21767,14 @@ const Gd = async (e, t, u, r, a) => {
|
|
|
21767
21767
|
T.push({
|
|
21768
21768
|
order: r.externalLink,
|
|
21769
21769
|
html: `<div class="oembed-external-link">
|
|
21770
|
-
<a href="${R(M)}" target="_blank" rel="noopener noreferrer">
|
|
21771
|
-
Visit ${R(u)}
|
|
21770
|
+
<a href="${R$1(M)}" target="_blank" rel="noopener noreferrer">
|
|
21771
|
+
Visit ${R$1(u)}
|
|
21772
21772
|
</a>
|
|
21773
21773
|
</div>`
|
|
21774
21774
|
});
|
|
21775
21775
|
}
|
|
21776
|
-
const
|
|
21777
|
-
|
|
21776
|
+
const A2 = T.sort((M, ee2) => M.order - ee2.order), w = [], v = [];
|
|
21777
|
+
A2.forEach((M) => {
|
|
21778
21778
|
M.html.includes("oembed-title") || M.html.includes("oembed-author") || M.html.includes("oembed-provider") || M.html.includes("oembed-description") ? w.push(M.html) : v.push(M.html);
|
|
21779
21779
|
});
|
|
21780
21780
|
let S = "";
|
|
@@ -21790,21 +21790,21 @@ const Gd = async (e, t, u, r, a) => {
|
|
|
21790
21790
|
const i = e.title || "Untitled", n = e.author_name || "Unknown", c = e.html || "", h = ua(c) ? ta(c, e) : c, m = [];
|
|
21791
21791
|
if (r.title !== void 0 && m.push({
|
|
21792
21792
|
order: r.title,
|
|
21793
|
-
html: `<div class="oembed-title">${R(i)}</div>`
|
|
21793
|
+
html: `<div class="oembed-title">${R$1(i)}</div>`
|
|
21794
21794
|
}), r.author !== void 0 && m.push({
|
|
21795
21795
|
order: r.author,
|
|
21796
|
-
html: `<div class="oembed-author">by ${R(n)}</div>`
|
|
21796
|
+
html: `<div class="oembed-author">by ${R$1(n)}</div>`
|
|
21797
21797
|
}), r.provider !== void 0 && m.push({
|
|
21798
21798
|
order: r.provider,
|
|
21799
|
-
html: `<div class="oembed-provider">${R(u)}</div>`
|
|
21799
|
+
html: `<div class="oembed-provider">${R$1(u)}</div>`
|
|
21800
21800
|
}), r.description !== void 0 && e.author_name && m.push({
|
|
21801
21801
|
order: r.description,
|
|
21802
|
-
html: `<div class="oembed-description">${R(e.author_name)}</div>`
|
|
21802
|
+
html: `<div class="oembed-description">${R$1(e.author_name)}</div>`
|
|
21803
21803
|
}), r.thumbnail !== void 0 && e.thumbnail_url && m.push({
|
|
21804
21804
|
order: r.thumbnail,
|
|
21805
|
-
html: At
|
|
21806
|
-
R(e.thumbnail_url),
|
|
21807
|
-
R(i),
|
|
21805
|
+
html: At(
|
|
21806
|
+
R$1(e.thumbnail_url),
|
|
21807
|
+
R$1(i),
|
|
21808
21808
|
"oembed-thumbnail"
|
|
21809
21809
|
)
|
|
21810
21810
|
}), r.embeddedContent !== void 0 && h && m.push({
|
|
@@ -21815,21 +21815,21 @@ const Gd = async (e, t, u, r, a) => {
|
|
|
21815
21815
|
m.push({
|
|
21816
21816
|
order: r.externalLink,
|
|
21817
21817
|
html: `<div class="oembed-external-link">
|
|
21818
|
-
<a href="${R(S)}" target="_blank" rel="noopener noreferrer">
|
|
21819
|
-
Visit ${R(u)}
|
|
21818
|
+
<a href="${R$1(S)}" target="_blank" rel="noopener noreferrer">
|
|
21819
|
+
Visit ${R$1(u)}
|
|
21820
21820
|
</a>
|
|
21821
21821
|
</div>`
|
|
21822
21822
|
});
|
|
21823
21823
|
}
|
|
21824
|
-
const f = m.sort((S, U2) => S.order - U2.order), T = [],
|
|
21824
|
+
const f = m.sort((S, U2) => S.order - U2.order), T = [], A2 = [];
|
|
21825
21825
|
f.forEach((S) => {
|
|
21826
|
-
S.html.includes("oembed-title") || S.html.includes("oembed-author") || S.html.includes("oembed-provider") || S.html.includes("oembed-description") ? T.push(S.html) :
|
|
21826
|
+
S.html.includes("oembed-title") || S.html.includes("oembed-author") || S.html.includes("oembed-provider") || S.html.includes("oembed-description") ? T.push(S.html) : A2.push(S.html);
|
|
21827
21827
|
});
|
|
21828
21828
|
let w = "";
|
|
21829
21829
|
T.length > 0 && (w = `<div class="oembed-header">${T.join("")}</div>`);
|
|
21830
21830
|
let v = "";
|
|
21831
|
-
return
|
|
21832
|
-
${
|
|
21831
|
+
return A2.length > 0 && (v = `<div class="oembed-content">
|
|
21832
|
+
${A2.join("")}
|
|
21833
21833
|
</div>`), `<div class="oembed-container oembed-video">
|
|
21834
21834
|
${w}
|
|
21835
21835
|
${v}
|
|
@@ -21838,21 +21838,21 @@ const Gd = async (e, t, u, r, a) => {
|
|
|
21838
21838
|
const i = e.title || "Link", n = e.author_name || "", c = e.thumbnail_url || "", h = [];
|
|
21839
21839
|
if (r.title !== void 0 && h.push({
|
|
21840
21840
|
order: r.title,
|
|
21841
|
-
html: `<div class="oembed-title">${R(i)}</div>`
|
|
21841
|
+
html: `<div class="oembed-title">${R$1(i)}</div>`
|
|
21842
21842
|
}), r.author !== void 0 && h.push({
|
|
21843
21843
|
order: r.author,
|
|
21844
|
-
html: `<div class="oembed-author">by ${R(e.author_name || "Unknown")}</div>`
|
|
21844
|
+
html: `<div class="oembed-author">by ${R$1(e.author_name || "Unknown")}</div>`
|
|
21845
21845
|
}), r.provider !== void 0 && h.push({
|
|
21846
21846
|
order: r.provider,
|
|
21847
|
-
html: `<div class="oembed-provider">${R(u)}</div>`
|
|
21847
|
+
html: `<div class="oembed-provider">${R$1(u)}</div>`
|
|
21848
21848
|
}), r.description !== void 0 && n && h.push({
|
|
21849
21849
|
order: r.description,
|
|
21850
|
-
html: `<div class="oembed-description">${R(n)}</div>`
|
|
21850
|
+
html: `<div class="oembed-description">${R$1(n)}</div>`
|
|
21851
21851
|
}), r.thumbnail !== void 0 && c && h.push({
|
|
21852
21852
|
order: r.thumbnail,
|
|
21853
|
-
html: At
|
|
21854
|
-
R(c),
|
|
21855
|
-
R(i),
|
|
21853
|
+
html: At(
|
|
21854
|
+
R$1(c),
|
|
21855
|
+
R$1(i),
|
|
21856
21856
|
"oembed-thumbnail"
|
|
21857
21857
|
)
|
|
21858
21858
|
}), r.embeddedContent !== void 0 && e.html && h.push({
|
|
@@ -21862,8 +21862,8 @@ const Gd = async (e, t, u, r, a) => {
|
|
|
21862
21862
|
const v = a.useMetadataUrlLink && e.web_page || t;
|
|
21863
21863
|
h.push({
|
|
21864
21864
|
order: r.externalLink,
|
|
21865
|
-
html: `<a href="${R(v)}" target="_blank" rel="noopener noreferrer">
|
|
21866
|
-
Visit ${R(u)}
|
|
21865
|
+
html: `<a href="${R$1(v)}" target="_blank" rel="noopener noreferrer">
|
|
21866
|
+
Visit ${R$1(u)}
|
|
21867
21867
|
</a>`
|
|
21868
21868
|
});
|
|
21869
21869
|
}
|
|
@@ -21871,11 +21871,11 @@ const Gd = async (e, t, u, r, a) => {
|
|
|
21871
21871
|
m.forEach((v) => {
|
|
21872
21872
|
v.html.includes("oembed-title") || v.html.includes("oembed-author") || v.html.includes("oembed-provider") || v.html.includes("oembed-description") ? f.push(v.html) : T.push(v.html);
|
|
21873
21873
|
});
|
|
21874
|
-
let
|
|
21875
|
-
f.length > 0 && (
|
|
21874
|
+
let A2 = "";
|
|
21875
|
+
f.length > 0 && (A2 = `<div class="oembed-header">${f.join("")}</div>`);
|
|
21876
21876
|
let w = "";
|
|
21877
21877
|
return T.length > 0 && (w = `<div class="oembed-content">${T.join("")}</div>`), `<div class="oembed-container oembed-link">
|
|
21878
|
-
${
|
|
21878
|
+
${A2}
|
|
21879
21879
|
${w}
|
|
21880
21880
|
</div>`;
|
|
21881
21881
|
}, ta = (e, t) => {
|
|
@@ -21910,14 +21910,14 @@ const Gd = async (e, t, u, r, a) => {
|
|
|
21910
21910
|
} else
|
|
21911
21911
|
return `<div class="oembed-responsive-content">${e}</div>`;
|
|
21912
21912
|
};
|
|
21913
|
-
var L
|
|
21913
|
+
var L;
|
|
21914
21914
|
(function(e) {
|
|
21915
21915
|
e.Root = "root", e.Text = "text", e.Directive = "directive", e.Comment = "comment", e.Script = "script", e.Style = "style", e.Tag = "tag", e.CDATA = "cdata", e.Doctype = "doctype";
|
|
21916
|
-
})(L
|
|
21916
|
+
})(L || (L = {}));
|
|
21917
21917
|
function aa(e) {
|
|
21918
|
-
return e.type === L
|
|
21918
|
+
return e.type === L.Tag || e.type === L.Script || e.type === L.Style;
|
|
21919
21919
|
}
|
|
21920
|
-
const cu = L
|
|
21920
|
+
const cu = L.Root, gr = L.Text, ia = L.Directive, Ar = L.Comment, na = L.Script, oa = L.Style, zt = L.Tag, ca = L.CDATA, da = L.Doctype;
|
|
21921
21921
|
class vr {
|
|
21922
21922
|
constructor() {
|
|
21923
21923
|
this.parent = null, this.prev = null, this.next = null, this.startIndex = null, this.endIndex = null;
|
|
@@ -21983,7 +21983,7 @@ class du extends vr {
|
|
|
21983
21983
|
}
|
|
21984
21984
|
class We extends du {
|
|
21985
21985
|
constructor() {
|
|
21986
|
-
super(...arguments), this.type = L
|
|
21986
|
+
super(...arguments), this.type = L.Text;
|
|
21987
21987
|
}
|
|
21988
21988
|
get nodeType() {
|
|
21989
21989
|
return 3;
|
|
@@ -21991,7 +21991,7 @@ class We extends du {
|
|
|
21991
21991
|
}
|
|
21992
21992
|
class hu extends du {
|
|
21993
21993
|
constructor() {
|
|
21994
|
-
super(...arguments), this.type = L
|
|
21994
|
+
super(...arguments), this.type = L.Comment;
|
|
21995
21995
|
}
|
|
21996
21996
|
get nodeType() {
|
|
21997
21997
|
return 8;
|
|
@@ -21999,7 +21999,7 @@ class hu extends du {
|
|
|
21999
21999
|
}
|
|
22000
22000
|
class lu extends du {
|
|
22001
22001
|
constructor(t, u) {
|
|
22002
|
-
super(u), this.name = t, this.type = L
|
|
22002
|
+
super(u), this.name = t, this.type = L.Directive;
|
|
22003
22003
|
}
|
|
22004
22004
|
get nodeType() {
|
|
22005
22005
|
return 1;
|
|
@@ -22035,27 +22035,27 @@ class mu extends vr {
|
|
|
22035
22035
|
}
|
|
22036
22036
|
class wr extends mu {
|
|
22037
22037
|
constructor() {
|
|
22038
|
-
super(...arguments), this.type = L
|
|
22038
|
+
super(...arguments), this.type = L.CDATA;
|
|
22039
22039
|
}
|
|
22040
22040
|
get nodeType() {
|
|
22041
22041
|
return 4;
|
|
22042
22042
|
}
|
|
22043
22043
|
}
|
|
22044
|
-
class Ne extends mu {
|
|
22044
|
+
let Ne$1 = class Ne extends mu {
|
|
22045
22045
|
constructor() {
|
|
22046
|
-
super(...arguments), this.type = L
|
|
22046
|
+
super(...arguments), this.type = L.Root;
|
|
22047
22047
|
}
|
|
22048
22048
|
get nodeType() {
|
|
22049
22049
|
return 9;
|
|
22050
22050
|
}
|
|
22051
|
-
}
|
|
22051
|
+
};
|
|
22052
22052
|
class pu extends mu {
|
|
22053
22053
|
/**
|
|
22054
22054
|
* @param name Name of the tag, eg. `div`, `span`.
|
|
22055
22055
|
* @param attribs Object mapping attribute names to attribute values.
|
|
22056
22056
|
* @param children Children of the node.
|
|
22057
22057
|
*/
|
|
22058
|
-
constructor(t, u, r = [], a = t === "script" ? L
|
|
22058
|
+
constructor(t, u, r = [], a = t === "script" ? L.Script : t === "style" ? L.Style : L.Tag) {
|
|
22059
22059
|
super(r), this.name = t, this.attribs = u, this.type = a;
|
|
22060
22060
|
}
|
|
22061
22061
|
get nodeType() {
|
|
@@ -22088,28 +22088,28 @@ function I(e) {
|
|
|
22088
22088
|
return aa(e);
|
|
22089
22089
|
}
|
|
22090
22090
|
function wt(e) {
|
|
22091
|
-
return e.type === L
|
|
22091
|
+
return e.type === L.CDATA;
|
|
22092
22092
|
}
|
|
22093
|
-
function se(e) {
|
|
22094
|
-
return e.type === L
|
|
22093
|
+
function se$1(e) {
|
|
22094
|
+
return e.type === L.Text;
|
|
22095
22095
|
}
|
|
22096
|
-
function Nt
|
|
22097
|
-
return e.type === L
|
|
22096
|
+
function Nt(e) {
|
|
22097
|
+
return e.type === L.Comment;
|
|
22098
22098
|
}
|
|
22099
|
-
function Qt
|
|
22100
|
-
return e.type === L
|
|
22099
|
+
function Qt(e) {
|
|
22100
|
+
return e.type === L.Directive;
|
|
22101
22101
|
}
|
|
22102
|
-
function Te(e) {
|
|
22103
|
-
return e.type === L
|
|
22102
|
+
function Te$1(e) {
|
|
22103
|
+
return e.type === L.Root;
|
|
22104
22104
|
}
|
|
22105
22105
|
function B$1(e) {
|
|
22106
22106
|
return Object.prototype.hasOwnProperty.call(e, "children");
|
|
22107
22107
|
}
|
|
22108
22108
|
function ze(e, t = false) {
|
|
22109
22109
|
let u;
|
|
22110
|
-
if (se(e))
|
|
22110
|
+
if (se$1(e))
|
|
22111
22111
|
u = new We(e.data);
|
|
22112
|
-
else if (Nt
|
|
22112
|
+
else if (Nt(e))
|
|
22113
22113
|
u = new hu(e.data);
|
|
22114
22114
|
else if (I(e)) {
|
|
22115
22115
|
const r = t ? Mt(e.children) : [], a = new pu(e.name, { ...e.attribs }, r);
|
|
@@ -22117,10 +22117,10 @@ function ze(e, t = false) {
|
|
|
22117
22117
|
} else if (wt(e)) {
|
|
22118
22118
|
const r = t ? Mt(e.children) : [], a = new wr(r);
|
|
22119
22119
|
r.forEach((i) => i.parent = a), u = a;
|
|
22120
|
-
} else if (Te(e)) {
|
|
22121
|
-
const r = t ? Mt(e.children) : [], a = new Ne(r);
|
|
22120
|
+
} else if (Te$1(e)) {
|
|
22121
|
+
const r = t ? Mt(e.children) : [], a = new Ne$1(r);
|
|
22122
22122
|
r.forEach((i) => i.parent = a), e["x-mode"] && (a["x-mode"] = e["x-mode"]), u = a;
|
|
22123
|
-
} else if (Qt
|
|
22123
|
+
} else if (Qt(e)) {
|
|
22124
22124
|
const r = new lu(e.name, e.data);
|
|
22125
22125
|
e["x-name"] != null && (r["x-name"] = e["x-name"], r["x-publicId"] = e["x-publicId"], r["x-systemId"] = e["x-systemId"]), u = r;
|
|
22126
22126
|
} else
|
|
@@ -22145,14 +22145,14 @@ class ha {
|
|
|
22145
22145
|
* @param elementCB Callback whenever a tag is closed.
|
|
22146
22146
|
*/
|
|
22147
22147
|
constructor(t, u, r) {
|
|
22148
|
-
this.dom = [], this.root = new Ne(this.dom), this.done = false, this.tagStack = [this.root], this.lastNode = null, this.parser = null, typeof u == "function" && (r = u, u = Pu), typeof t == "object" && (u = t, t = void 0), this.callback = t ?? null, this.options = u ?? Pu, this.elementCB = r ?? null;
|
|
22148
|
+
this.dom = [], this.root = new Ne$1(this.dom), this.done = false, this.tagStack = [this.root], this.lastNode = null, this.parser = null, typeof u == "function" && (r = u, u = Pu), typeof t == "object" && (u = t, t = void 0), this.callback = t ?? null, this.options = u ?? Pu, this.elementCB = r ?? null;
|
|
22149
22149
|
}
|
|
22150
22150
|
onparserinit(t) {
|
|
22151
22151
|
this.parser = t;
|
|
22152
22152
|
}
|
|
22153
22153
|
// Resets the handler back to starting state
|
|
22154
22154
|
onreset() {
|
|
22155
|
-
this.dom = [], this.root = new Ne(this.dom), this.done = false, this.tagStack = [this.root], this.lastNode = null, this.parser = null;
|
|
22155
|
+
this.dom = [], this.root = new Ne$1(this.dom), this.done = false, this.tagStack = [this.root], this.lastNode = null, this.parser = null;
|
|
22156
22156
|
}
|
|
22157
22157
|
// Signals the handler that parsing is done
|
|
22158
22158
|
onend() {
|
|
@@ -22167,12 +22167,12 @@ class ha {
|
|
|
22167
22167
|
this.options.withEndIndices && (t.endIndex = this.parser.endIndex), this.elementCB && this.elementCB(t);
|
|
22168
22168
|
}
|
|
22169
22169
|
onopentag(t, u) {
|
|
22170
|
-
const r = this.options.xmlMode ? L
|
|
22170
|
+
const r = this.options.xmlMode ? L.Tag : void 0, a = new pu(t, u, void 0, r);
|
|
22171
22171
|
this.addNode(a), this.tagStack.push(a);
|
|
22172
22172
|
}
|
|
22173
22173
|
ontext(t) {
|
|
22174
22174
|
const { lastNode: u } = this;
|
|
22175
|
-
if (u && u.type === L
|
|
22175
|
+
if (u && u.type === L.Text)
|
|
22176
22176
|
u.data += t, this.options.withEndIndices && (u.endIndex = this.parser.endIndex);
|
|
22177
22177
|
else {
|
|
22178
22178
|
const r = new We(t);
|
|
@@ -22180,7 +22180,7 @@ class ha {
|
|
|
22180
22180
|
}
|
|
22181
22181
|
}
|
|
22182
22182
|
oncomment(t) {
|
|
22183
|
-
if (this.lastNode && this.lastNode.type === L
|
|
22183
|
+
if (this.lastNode && this.lastNode.type === L.Comment) {
|
|
22184
22184
|
this.lastNode.data += t;
|
|
22185
22185
|
return;
|
|
22186
22186
|
}
|
|
@@ -22393,7 +22393,7 @@ const Bu = /* @__PURE__ */ new Set([
|
|
|
22393
22393
|
"track",
|
|
22394
22394
|
"wbr"
|
|
22395
22395
|
]);
|
|
22396
|
-
function xt
|
|
22396
|
+
function xt(e, t = {}) {
|
|
22397
22397
|
const u = "length" in e ? e : [e];
|
|
22398
22398
|
let r = "";
|
|
22399
22399
|
for (let a = 0; a < u.length; a++)
|
|
@@ -22403,7 +22403,7 @@ function xt$1(e, t = {}) {
|
|
|
22403
22403
|
function Aa(e, t) {
|
|
22404
22404
|
switch (e.type) {
|
|
22405
22405
|
case cu:
|
|
22406
|
-
return xt
|
|
22406
|
+
return xt(e.children, t);
|
|
22407
22407
|
// @ts-expect-error We don't use `Doctype` yet
|
|
22408
22408
|
case da:
|
|
22409
22409
|
case ia:
|
|
@@ -22442,7 +22442,7 @@ function Na(e, t) {
|
|
|
22442
22442
|
) : (
|
|
22443
22443
|
// User explicitly asked for self-closing tags, even in HTML mode
|
|
22444
22444
|
t.selfClosingTags && Bu.has(e.name)
|
|
22445
|
-
)) ? (t.xmlMode || (r += " "), r += "/>") : (r += ">", e.children.length > 0 && (r += xt
|
|
22445
|
+
)) ? (t.xmlMode || (r += " "), r += "/>") : (r += ">", e.children.length > 0 && (r += xt(e.children, t)), (t.xmlMode || !Bu.has(e.name)) && (r += `</${e.name}>`)), r;
|
|
22446
22446
|
}
|
|
22447
22447
|
function xa(e) {
|
|
22448
22448
|
return `<${e.data}>`;
|
|
@@ -22459,22 +22459,22 @@ function Ca(e) {
|
|
|
22459
22459
|
return `<!--${e.data}-->`;
|
|
22460
22460
|
}
|
|
22461
22461
|
function Ir(e, t) {
|
|
22462
|
-
return xt
|
|
22462
|
+
return xt(e, t);
|
|
22463
22463
|
}
|
|
22464
22464
|
function ya(e, t) {
|
|
22465
22465
|
return B$1(e) ? e.children.map((u) => Ir(u, t)).join("") : "";
|
|
22466
22466
|
}
|
|
22467
|
-
function ot(e) {
|
|
22468
|
-
return Array.isArray(e) ? e.map(ot).join("") : I(e) ? e.name === "br" ? `
|
|
22469
|
-
` : ot(e.children) : wt(e) ? ot(e.children) : se(e) ? e.data : "";
|
|
22467
|
+
function ot$1(e) {
|
|
22468
|
+
return Array.isArray(e) ? e.map(ot$1).join("") : I(e) ? e.name === "br" ? `
|
|
22469
|
+
` : ot$1(e.children) : wt(e) ? ot$1(e.children) : se$1(e) ? e.data : "";
|
|
22470
22470
|
}
|
|
22471
|
-
function Le(e) {
|
|
22472
|
-
return Array.isArray(e) ? e.map(Le).join("") : B$1(e) && !Nt
|
|
22471
|
+
function Le$1(e) {
|
|
22472
|
+
return Array.isArray(e) ? e.map(Le$1).join("") : B$1(e) && !Nt(e) ? Le$1(e.children) : se$1(e) ? e.data : "";
|
|
22473
22473
|
}
|
|
22474
22474
|
function dt(e) {
|
|
22475
|
-
return Array.isArray(e) ? e.map(dt).join("") : B$1(e) && (e.type === L
|
|
22475
|
+
return Array.isArray(e) ? e.map(dt).join("") : B$1(e) && (e.type === L.Tag || wt(e)) ? dt(e.children) : se$1(e) ? e.data : "";
|
|
22476
22476
|
}
|
|
22477
|
-
function It
|
|
22477
|
+
function It(e) {
|
|
22478
22478
|
return B$1(e) ? e.children : [];
|
|
22479
22479
|
}
|
|
22480
22480
|
function Sr(e) {
|
|
@@ -22483,7 +22483,7 @@ function Sr(e) {
|
|
|
22483
22483
|
function Cr(e) {
|
|
22484
22484
|
const t = Sr(e);
|
|
22485
22485
|
if (t != null)
|
|
22486
|
-
return It
|
|
22486
|
+
return It(t);
|
|
22487
22487
|
const u = [e];
|
|
22488
22488
|
let { prev: r, next: a } = e;
|
|
22489
22489
|
for (; r != null; )
|
|
@@ -22514,7 +22514,7 @@ function bu(e) {
|
|
|
22514
22514
|
({ prev: t } = t);
|
|
22515
22515
|
return t;
|
|
22516
22516
|
}
|
|
22517
|
-
function Ie(e) {
|
|
22517
|
+
function Ie$1(e) {
|
|
22518
22518
|
if (e.prev && (e.prev.next = e.next), e.next && (e.next.prev = e.prev), e.parent) {
|
|
22519
22519
|
const t = e.parent.children, u = t.lastIndexOf(e);
|
|
22520
22520
|
u >= 0 && t.splice(u, 1);
|
|
@@ -22533,14 +22533,14 @@ function Da(e, t) {
|
|
|
22533
22533
|
}
|
|
22534
22534
|
}
|
|
22535
22535
|
function ka(e, t) {
|
|
22536
|
-
if (Ie(t), t.next = null, t.parent = e, e.children.push(t) > 1) {
|
|
22536
|
+
if (Ie$1(t), t.next = null, t.parent = e, e.children.push(t) > 1) {
|
|
22537
22537
|
const u = e.children[e.children.length - 2];
|
|
22538
22538
|
u.next = t, t.prev = u;
|
|
22539
22539
|
} else
|
|
22540
22540
|
t.prev = null;
|
|
22541
22541
|
}
|
|
22542
22542
|
function Pa(e, t) {
|
|
22543
|
-
Ie(t);
|
|
22543
|
+
Ie$1(t);
|
|
22544
22544
|
const { parent: u } = e, r = e.next;
|
|
22545
22545
|
if (t.next = r, t.prev = e, e.next = t, t.parent = u, r) {
|
|
22546
22546
|
if (r.prev = t, u) {
|
|
@@ -22550,14 +22550,14 @@ function Pa(e, t) {
|
|
|
22550
22550
|
} else u && u.children.push(t);
|
|
22551
22551
|
}
|
|
22552
22552
|
function Ma(e, t) {
|
|
22553
|
-
if (Ie(t), t.parent = e, t.prev = null, e.children.unshift(t) !== 1) {
|
|
22553
|
+
if (Ie$1(t), t.parent = e, t.prev = null, e.children.unshift(t) !== 1) {
|
|
22554
22554
|
const u = e.children[1];
|
|
22555
22555
|
u.prev = t, t.next = u;
|
|
22556
22556
|
} else
|
|
22557
22557
|
t.next = null;
|
|
22558
22558
|
}
|
|
22559
22559
|
function Ba(e, t) {
|
|
22560
|
-
Ie(t);
|
|
22560
|
+
Ie$1(t);
|
|
22561
22561
|
const { parent: u } = e;
|
|
22562
22562
|
if (u) {
|
|
22563
22563
|
const r = u.children;
|
|
@@ -22624,7 +22624,7 @@ const ht = {
|
|
|
22624
22624
|
return typeof e == "function" ? (t) => e(t.type) : (t) => t.type === e;
|
|
22625
22625
|
},
|
|
22626
22626
|
tag_contains(e) {
|
|
22627
|
-
return typeof e == "function" ? (t) => se(t) && e(t.data) : (t) => se(t) && t.data === e;
|
|
22627
|
+
return typeof e == "function" ? (t) => se$1(t) && e(t.data) : (t) => se$1(t) && t.data === e;
|
|
22628
22628
|
}
|
|
22629
22629
|
};
|
|
22630
22630
|
function _u(e, t) {
|
|
@@ -22676,10 +22676,10 @@ function Ga(e) {
|
|
|
22676
22676
|
}
|
|
22677
22677
|
return e;
|
|
22678
22678
|
}
|
|
22679
|
-
var Z
|
|
22679
|
+
var Z;
|
|
22680
22680
|
(function(e) {
|
|
22681
22681
|
e[e.DISCONNECTED = 1] = "DISCONNECTED", e[e.PRECEDING = 2] = "PRECEDING", e[e.FOLLOWING = 4] = "FOLLOWING", e[e.CONTAINS = 8] = "CONTAINS", e[e.CONTAINED_BY = 16] = "CONTAINED_BY";
|
|
22682
|
-
})(Z
|
|
22682
|
+
})(Z || (Z = {}));
|
|
22683
22683
|
function Lr(e, t) {
|
|
22684
22684
|
const u = [], r = [];
|
|
22685
22685
|
if (e === t)
|
|
@@ -22694,14 +22694,14 @@ function Lr(e, t) {
|
|
|
22694
22694
|
for (; n < i && u[n] === r[n]; )
|
|
22695
22695
|
n++;
|
|
22696
22696
|
if (n === 0)
|
|
22697
|
-
return Z
|
|
22697
|
+
return Z.DISCONNECTED;
|
|
22698
22698
|
const c = u[n - 1], h = c.children, m = u[n], f = r[n];
|
|
22699
|
-
return h.indexOf(m) > h.indexOf(f) ? c === t ? Z
|
|
22699
|
+
return h.indexOf(m) > h.indexOf(f) ? c === t ? Z.FOLLOWING | Z.CONTAINED_BY : Z.FOLLOWING : c === e ? Z.PRECEDING | Z.CONTAINS : Z.PRECEDING;
|
|
22700
22700
|
}
|
|
22701
22701
|
function ke(e) {
|
|
22702
22702
|
return e = e.filter((t, u, r) => !r.includes(t, u + 1)), e.sort((t, u) => {
|
|
22703
22703
|
const r = Lr(t, u);
|
|
22704
|
-
return r & Z
|
|
22704
|
+
return r & Z.PRECEDING ? -1 : r & Z.FOLLOWING ? 1 : 0;
|
|
22705
22705
|
}), e;
|
|
22706
22706
|
}
|
|
22707
22707
|
function Wa(e) {
|
|
@@ -22720,8 +22720,8 @@ function za(e) {
|
|
|
22720
22720
|
f && (m.link = f);
|
|
22721
22721
|
const T = fe("summary", h) || fe("content", h);
|
|
22722
22722
|
T && (m.description = T);
|
|
22723
|
-
const
|
|
22724
|
-
return
|
|
22723
|
+
const A2 = fe("updated", h);
|
|
22724
|
+
return A2 && (m.pubDate = new Date(A2)), m;
|
|
22725
22725
|
})
|
|
22726
22726
|
};
|
|
22727
22727
|
Q$1(r, "id", "id", u), Q$1(r, "title", "title", u);
|
|
@@ -22773,7 +22773,7 @@ function lt(e, t) {
|
|
|
22773
22773
|
return De(e, t, true, 1)[0];
|
|
22774
22774
|
}
|
|
22775
22775
|
function fe(e, t, u = false) {
|
|
22776
|
-
return Le(De(e, t, u, 1)).trim();
|
|
22776
|
+
return Le$1(De(e, t, u, 1)).trim();
|
|
22777
22777
|
}
|
|
22778
22778
|
function Q$1(e, t, u, r, a = false) {
|
|
22779
22779
|
const i = fe(u, r, a);
|
|
@@ -22782,10 +22782,10 @@ function Q$1(e, t, u, r, a = false) {
|
|
|
22782
22782
|
function Za(e) {
|
|
22783
22783
|
return e === "rss" || e === "feed" || e === "rdf:RDF";
|
|
22784
22784
|
}
|
|
22785
|
-
const St
|
|
22785
|
+
const St = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
22786
22786
|
__proto__: null,
|
|
22787
22787
|
get DocumentPosition() {
|
|
22788
|
-
return Z
|
|
22788
|
+
return Z;
|
|
22789
22789
|
},
|
|
22790
22790
|
append: Pa,
|
|
22791
22791
|
appendChild: ka,
|
|
@@ -22797,7 +22797,7 @@ const St$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty
|
|
|
22797
22797
|
findOne: Tu,
|
|
22798
22798
|
findOneChild: Ua,
|
|
22799
22799
|
getAttributeValue: Oa,
|
|
22800
|
-
getChildren: It
|
|
22800
|
+
getChildren: It,
|
|
22801
22801
|
getElementById: ja,
|
|
22802
22802
|
getElements: Ya,
|
|
22803
22803
|
getElementsByClassName: Va,
|
|
@@ -22809,24 +22809,24 @@ const St$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty
|
|
|
22809
22809
|
getOuterHTML: Ir,
|
|
22810
22810
|
getParent: Sr,
|
|
22811
22811
|
getSiblings: Cr,
|
|
22812
|
-
getText: ot,
|
|
22812
|
+
getText: ot$1,
|
|
22813
22813
|
hasAttrib: La,
|
|
22814
22814
|
hasChildren: B$1,
|
|
22815
22815
|
innerText: dt,
|
|
22816
22816
|
isCDATA: wt,
|
|
22817
|
-
isComment: Nt
|
|
22818
|
-
isDocument: Te,
|
|
22817
|
+
isComment: Nt,
|
|
22818
|
+
isDocument: Te$1,
|
|
22819
22819
|
isTag: I,
|
|
22820
|
-
isText: se,
|
|
22820
|
+
isText: se$1,
|
|
22821
22821
|
nextElementSibling: fu,
|
|
22822
22822
|
prepend: Ba,
|
|
22823
22823
|
prependChild: Ma,
|
|
22824
22824
|
prevElementSibling: bu,
|
|
22825
|
-
removeElement: Ie,
|
|
22825
|
+
removeElement: Ie$1,
|
|
22826
22826
|
removeSubsets: Ga,
|
|
22827
22827
|
replaceElement: Da,
|
|
22828
22828
|
testElement: qa,
|
|
22829
|
-
textContent: Le,
|
|
22829
|
+
textContent: Le$1,
|
|
22830
22830
|
uniqueSort: ke
|
|
22831
22831
|
}, Symbol.toStringTag, { value: "Module" })), Ja = {
|
|
22832
22832
|
_useHtmlParser2: false
|
|
@@ -22862,7 +22862,7 @@ function Qe(e) {
|
|
|
22862
22862
|
const t = e ?? (this ? this.root() : []);
|
|
22863
22863
|
let u = "";
|
|
22864
22864
|
for (let r = 0; r < t.length; r++)
|
|
22865
|
-
u += Le(t[r]);
|
|
22865
|
+
u += Le$1(t[r]);
|
|
22866
22866
|
return u;
|
|
22867
22867
|
}
|
|
22868
22868
|
function ri(e, t, u = typeof t == "boolean" ? t : false) {
|
|
@@ -22936,7 +22936,7 @@ var ve;
|
|
|
22936
22936
|
(function(e) {
|
|
22937
22937
|
e[e.LowerA = 97] = "LowerA", e[e.LowerZ = 122] = "LowerZ", e[e.UpperA = 65] = "UpperA", e[e.UpperZ = 90] = "UpperZ", e[e.Exclamation = 33] = "Exclamation";
|
|
22938
22938
|
})(ve || (ve = {}));
|
|
22939
|
-
function Xt
|
|
22939
|
+
function Xt(e) {
|
|
22940
22940
|
const t = e.indexOf("<");
|
|
22941
22941
|
if (t === -1 || t > e.length - 3)
|
|
22942
22942
|
return false;
|
|
@@ -22992,42 +22992,42 @@ function mi(e) {
|
|
|
22992
22992
|
var t;
|
|
22993
22993
|
return e >= 55296 && e <= 57343 || e > 1114111 ? 65533 : (t = li.get(e)) !== null && t !== void 0 ? t : e;
|
|
22994
22994
|
}
|
|
22995
|
-
var V
|
|
22995
|
+
var V;
|
|
22996
22996
|
(function(e) {
|
|
22997
22997
|
e[e.NUM = 35] = "NUM", e[e.SEMI = 59] = "SEMI", e[e.EQUALS = 61] = "EQUALS", e[e.ZERO = 48] = "ZERO", e[e.NINE = 57] = "NINE", e[e.LOWER_A = 97] = "LOWER_A", e[e.LOWER_F = 102] = "LOWER_F", e[e.LOWER_X = 120] = "LOWER_X", e[e.LOWER_Z = 122] = "LOWER_Z", e[e.UPPER_A = 65] = "UPPER_A", e[e.UPPER_F = 70] = "UPPER_F", e[e.UPPER_Z = 90] = "UPPER_Z";
|
|
22998
|
-
})(V
|
|
22998
|
+
})(V || (V = {}));
|
|
22999
22999
|
const pi = 32;
|
|
23000
23000
|
var be;
|
|
23001
23001
|
(function(e) {
|
|
23002
23002
|
e[e.VALUE_LENGTH = 49152] = "VALUE_LENGTH", e[e.BRANCH_LENGTH = 16256] = "BRANCH_LENGTH", e[e.JUMP_TABLE = 127] = "JUMP_TABLE";
|
|
23003
23003
|
})(be || (be = {}));
|
|
23004
|
-
function Zt
|
|
23005
|
-
return e >= V
|
|
23004
|
+
function Zt(e) {
|
|
23005
|
+
return e >= V.ZERO && e <= V.NINE;
|
|
23006
23006
|
}
|
|
23007
23007
|
function fi(e) {
|
|
23008
|
-
return e >= V
|
|
23008
|
+
return e >= V.UPPER_A && e <= V.UPPER_F || e >= V.LOWER_A && e <= V.LOWER_F;
|
|
23009
23009
|
}
|
|
23010
23010
|
function bi(e) {
|
|
23011
|
-
return e >= V
|
|
23011
|
+
return e >= V.UPPER_A && e <= V.UPPER_Z || e >= V.LOWER_A && e <= V.LOWER_Z || Zt(e);
|
|
23012
23012
|
}
|
|
23013
23013
|
function Ei(e) {
|
|
23014
|
-
return e === V
|
|
23014
|
+
return e === V.EQUALS || bi(e);
|
|
23015
23015
|
}
|
|
23016
|
-
var q
|
|
23016
|
+
var q;
|
|
23017
23017
|
(function(e) {
|
|
23018
23018
|
e[e.EntityStart = 0] = "EntityStart", e[e.NumericStart = 1] = "NumericStart", e[e.NumericDecimal = 2] = "NumericDecimal", e[e.NumericHex = 3] = "NumericHex", e[e.NamedEntity = 4] = "NamedEntity";
|
|
23019
|
-
})(q
|
|
23019
|
+
})(q || (q = {}));
|
|
23020
23020
|
var ue;
|
|
23021
23021
|
(function(e) {
|
|
23022
23022
|
e[e.Legacy = 0] = "Legacy", e[e.Strict = 1] = "Strict", e[e.Attribute = 2] = "Attribute";
|
|
23023
23023
|
})(ue || (ue = {}));
|
|
23024
23024
|
let Ti = class {
|
|
23025
23025
|
constructor(t, u, r) {
|
|
23026
|
-
this.decodeTree = t, this.emitCodePoint = u, this.errors = r, this.state = q
|
|
23026
|
+
this.decodeTree = t, this.emitCodePoint = u, this.errors = r, this.state = q.EntityStart, this.consumed = 1, this.result = 0, this.treeIndex = 0, this.excess = 1, this.decodeMode = ue.Strict;
|
|
23027
23027
|
}
|
|
23028
23028
|
/** Resets the instance to make it reusable. */
|
|
23029
23029
|
startEntity(t) {
|
|
23030
|
-
this.decodeMode = t, this.state = q
|
|
23030
|
+
this.decodeMode = t, this.state = q.EntityStart, this.result = 0, this.treeIndex = 0, this.excess = 1, this.consumed = 1;
|
|
23031
23031
|
}
|
|
23032
23032
|
/**
|
|
23033
23033
|
* Write an entity to the decoder. This can be called multiple times with partial entities.
|
|
@@ -23042,15 +23042,15 @@ let Ti = class {
|
|
|
23042
23042
|
*/
|
|
23043
23043
|
write(t, u) {
|
|
23044
23044
|
switch (this.state) {
|
|
23045
|
-
case q
|
|
23046
|
-
return t.charCodeAt(u) === V
|
|
23047
|
-
case q
|
|
23045
|
+
case q.EntityStart:
|
|
23046
|
+
return t.charCodeAt(u) === V.NUM ? (this.state = q.NumericStart, this.consumed += 1, this.stateNumericStart(t, u + 1)) : (this.state = q.NamedEntity, this.stateNamedEntity(t, u));
|
|
23047
|
+
case q.NumericStart:
|
|
23048
23048
|
return this.stateNumericStart(t, u);
|
|
23049
|
-
case q
|
|
23049
|
+
case q.NumericDecimal:
|
|
23050
23050
|
return this.stateNumericDecimal(t, u);
|
|
23051
|
-
case q
|
|
23051
|
+
case q.NumericHex:
|
|
23052
23052
|
return this.stateNumericHex(t, u);
|
|
23053
|
-
case q
|
|
23053
|
+
case q.NamedEntity:
|
|
23054
23054
|
return this.stateNamedEntity(t, u);
|
|
23055
23055
|
}
|
|
23056
23056
|
}
|
|
@@ -23064,7 +23064,7 @@ let Ti = class {
|
|
|
23064
23064
|
* @returns The number of characters that were consumed, or -1 if the entity is incomplete.
|
|
23065
23065
|
*/
|
|
23066
23066
|
stateNumericStart(t, u) {
|
|
23067
|
-
return u >= t.length ? -1 : (t.charCodeAt(u) | pi) === V
|
|
23067
|
+
return u >= t.length ? -1 : (t.charCodeAt(u) | pi) === V.LOWER_X ? (this.state = q.NumericHex, this.consumed += 1, this.stateNumericHex(t, u + 1)) : (this.state = q.NumericDecimal, this.stateNumericDecimal(t, u));
|
|
23068
23068
|
}
|
|
23069
23069
|
addToNumericResult(t, u, r, a) {
|
|
23070
23070
|
if (u !== r) {
|
|
@@ -23085,7 +23085,7 @@ let Ti = class {
|
|
|
23085
23085
|
const r = u;
|
|
23086
23086
|
for (; u < t.length; ) {
|
|
23087
23087
|
const a = t.charCodeAt(u);
|
|
23088
|
-
if (Zt
|
|
23088
|
+
if (Zt(a) || fi(a))
|
|
23089
23089
|
u += 1;
|
|
23090
23090
|
else
|
|
23091
23091
|
return this.addToNumericResult(t, r, u, 16), this.emitNumericEntity(a, 3);
|
|
@@ -23105,7 +23105,7 @@ let Ti = class {
|
|
|
23105
23105
|
const r = u;
|
|
23106
23106
|
for (; u < t.length; ) {
|
|
23107
23107
|
const a = t.charCodeAt(u);
|
|
23108
|
-
if (Zt
|
|
23108
|
+
if (Zt(a))
|
|
23109
23109
|
u += 1;
|
|
23110
23110
|
else
|
|
23111
23111
|
return this.addToNumericResult(t, r, u, 10), this.emitNumericEntity(a, 2);
|
|
@@ -23129,11 +23129,11 @@ let Ti = class {
|
|
|
23129
23129
|
var r;
|
|
23130
23130
|
if (this.consumed <= u)
|
|
23131
23131
|
return (r = this.errors) === null || r === void 0 || r.absenceOfDigitsInNumericCharacterReference(this.consumed), 0;
|
|
23132
|
-
if (t === V
|
|
23132
|
+
if (t === V.SEMI)
|
|
23133
23133
|
this.consumed += 1;
|
|
23134
23134
|
else if (this.decodeMode === ue.Strict)
|
|
23135
23135
|
return 0;
|
|
23136
|
-
return this.emitCodePoint(mi(this.result), this.consumed), this.errors && (t !== V
|
|
23136
|
+
return this.emitCodePoint(mi(this.result), this.consumed), this.errors && (t !== V.SEMI && this.errors.missingSemicolonAfterCharacterReference(), this.errors.validateNumericCharacterReference(this.result)), this.consumed;
|
|
23137
23137
|
}
|
|
23138
23138
|
/**
|
|
23139
23139
|
* Parses a named entity.
|
|
@@ -23155,7 +23155,7 @@ let Ti = class {
|
|
|
23155
23155
|
(i === 0 || // And there should be no invalid characters.
|
|
23156
23156
|
Ei(n)) ? 0 : this.emitNotTerminatedNamedEntity();
|
|
23157
23157
|
if (a = r[this.treeIndex], i = (a & be.VALUE_LENGTH) >> 14, i !== 0) {
|
|
23158
|
-
if (n === V
|
|
23158
|
+
if (n === V.SEMI)
|
|
23159
23159
|
return this.emitNamedEntityData(this.treeIndex, i, this.consumed + this.excess);
|
|
23160
23160
|
this.decodeMode !== ue.Strict && (this.result = this.treeIndex, this.consumed += this.excess, this.excess = 0);
|
|
23161
23161
|
}
|
|
@@ -23195,16 +23195,16 @@ let Ti = class {
|
|
|
23195
23195
|
end() {
|
|
23196
23196
|
var t;
|
|
23197
23197
|
switch (this.state) {
|
|
23198
|
-
case q
|
|
23198
|
+
case q.NamedEntity:
|
|
23199
23199
|
return this.result !== 0 && (this.decodeMode !== ue.Attribute || this.result === this.treeIndex) ? this.emitNotTerminatedNamedEntity() : 0;
|
|
23200
23200
|
// Otherwise, emit a numeric entity if we have one.
|
|
23201
|
-
case q
|
|
23201
|
+
case q.NumericDecimal:
|
|
23202
23202
|
return this.emitNumericEntity(0, 2);
|
|
23203
|
-
case q
|
|
23203
|
+
case q.NumericHex:
|
|
23204
23204
|
return this.emitNumericEntity(0, 3);
|
|
23205
|
-
case q
|
|
23205
|
+
case q.NumericStart:
|
|
23206
23206
|
return (t = this.errors) === null || t === void 0 || t.absenceOfDigitsInNumericCharacterReference(this.consumed), 0;
|
|
23207
|
-
case q
|
|
23207
|
+
case q.EntityStart:
|
|
23208
23208
|
return 0;
|
|
23209
23209
|
}
|
|
23210
23210
|
}
|
|
@@ -23233,15 +23233,15 @@ var x;
|
|
|
23233
23233
|
(function(e) {
|
|
23234
23234
|
e[e.Tab = 9] = "Tab", e[e.NewLine = 10] = "NewLine", e[e.FormFeed = 12] = "FormFeed", e[e.CarriageReturn = 13] = "CarriageReturn", e[e.Space = 32] = "Space", e[e.ExclamationMark = 33] = "ExclamationMark", e[e.Number = 35] = "Number", e[e.Amp = 38] = "Amp", e[e.SingleQuote = 39] = "SingleQuote", e[e.DoubleQuote = 34] = "DoubleQuote", e[e.Dash = 45] = "Dash", e[e.Slash = 47] = "Slash", e[e.Zero = 48] = "Zero", e[e.Nine = 57] = "Nine", e[e.Semi = 59] = "Semi", e[e.Lt = 60] = "Lt", e[e.Eq = 61] = "Eq", e[e.Gt = 62] = "Gt", e[e.Questionmark = 63] = "Questionmark", e[e.UpperA = 65] = "UpperA", e[e.LowerA = 97] = "LowerA", e[e.UpperF = 70] = "UpperF", e[e.LowerF = 102] = "LowerF", e[e.UpperZ = 90] = "UpperZ", e[e.LowerZ = 122] = "LowerZ", e[e.LowerX = 120] = "LowerX", e[e.OpeningSquareBracket = 91] = "OpeningSquareBracket";
|
|
23235
23235
|
})(x || (x = {}));
|
|
23236
|
-
var _
|
|
23236
|
+
var _;
|
|
23237
23237
|
(function(e) {
|
|
23238
23238
|
e[e.Text = 1] = "Text", e[e.BeforeTagName = 2] = "BeforeTagName", e[e.InTagName = 3] = "InTagName", e[e.InSelfClosingTag = 4] = "InSelfClosingTag", e[e.BeforeClosingTagName = 5] = "BeforeClosingTagName", e[e.InClosingTagName = 6] = "InClosingTagName", e[e.AfterClosingTagName = 7] = "AfterClosingTagName", e[e.BeforeAttributeName = 8] = "BeforeAttributeName", e[e.InAttributeName = 9] = "InAttributeName", e[e.AfterAttributeName = 10] = "AfterAttributeName", e[e.BeforeAttributeValue = 11] = "BeforeAttributeValue", e[e.InAttributeValueDq = 12] = "InAttributeValueDq", e[e.InAttributeValueSq = 13] = "InAttributeValueSq", e[e.InAttributeValueNq = 14] = "InAttributeValueNq", e[e.BeforeDeclaration = 15] = "BeforeDeclaration", e[e.InDeclaration = 16] = "InDeclaration", e[e.InProcessingInstruction = 17] = "InProcessingInstruction", e[e.BeforeComment = 18] = "BeforeComment", e[e.CDATASequence = 19] = "CDATASequence", e[e.InSpecialComment = 20] = "InSpecialComment", e[e.InCommentLike = 21] = "InCommentLike", e[e.BeforeSpecialS = 22] = "BeforeSpecialS", e[e.BeforeSpecialT = 23] = "BeforeSpecialT", e[e.SpecialStartSequence = 24] = "SpecialStartSequence", e[e.InSpecialTag = 25] = "InSpecialTag", e[e.InEntity = 26] = "InEntity";
|
|
23239
|
-
})(_
|
|
23240
|
-
function ne(e) {
|
|
23239
|
+
})(_ || (_ = {}));
|
|
23240
|
+
function ne$1(e) {
|
|
23241
23241
|
return e === x.Space || e === x.NewLine || e === x.Tab || e === x.FormFeed || e === x.CarriageReturn;
|
|
23242
23242
|
}
|
|
23243
23243
|
function st(e) {
|
|
23244
|
-
return e === x.Slash || e === x.Gt || ne(e);
|
|
23244
|
+
return e === x.Slash || e === x.Gt || ne$1(e);
|
|
23245
23245
|
}
|
|
23246
23246
|
function gi(e) {
|
|
23247
23247
|
return e >= x.LowerA && e <= x.LowerZ || e >= x.UpperA && e <= x.UpperZ;
|
|
@@ -23281,10 +23281,10 @@ const F = {
|
|
|
23281
23281
|
};
|
|
23282
23282
|
let Ai = class {
|
|
23283
23283
|
constructor({ xmlMode: t = false, decodeEntities: u = true }, r) {
|
|
23284
|
-
this.cbs = r, this.state = _
|
|
23284
|
+
this.cbs = r, this.state = _.Text, this.buffer = "", this.sectionStart = 0, this.index = 0, this.entityStart = 0, this.baseState = _.Text, this.isSpecial = false, this.running = true, this.offset = 0, this.currentSequence = void 0, this.sequenceIndex = 0, this.xmlMode = t, this.decodeEntities = u, this.entityDecoder = new Ti(t ? hi : di, (a, i) => this.emitCodePoint(a, i));
|
|
23285
23285
|
}
|
|
23286
23286
|
reset() {
|
|
23287
|
-
this.state = _
|
|
23287
|
+
this.state = _.Text, this.buffer = "", this.sectionStart = 0, this.index = 0, this.baseState = _.Text, this.currentSequence = void 0, this.running = true, this.offset = 0;
|
|
23288
23288
|
}
|
|
23289
23289
|
write(t) {
|
|
23290
23290
|
this.offset += this.buffer.length, this.buffer = t, this.parse();
|
|
@@ -23299,7 +23299,7 @@ let Ai = class {
|
|
|
23299
23299
|
this.running = true, this.index < this.buffer.length + this.offset && this.parse();
|
|
23300
23300
|
}
|
|
23301
23301
|
stateText(t) {
|
|
23302
|
-
t === x.Lt || !this.decodeEntities && this.fastForwardTo(x.Lt) ? (this.index > this.sectionStart && this.cbs.ontext(this.sectionStart, this.index), this.state = _
|
|
23302
|
+
t === x.Lt || !this.decodeEntities && this.fastForwardTo(x.Lt) ? (this.index > this.sectionStart && this.cbs.ontext(this.sectionStart, this.index), this.state = _.BeforeTagName, this.sectionStart = this.index) : this.decodeEntities && t === x.Amp && this.startEntity();
|
|
23303
23303
|
}
|
|
23304
23304
|
stateSpecialStartSequence(t) {
|
|
23305
23305
|
const u = this.sequenceIndex === this.currentSequence.length;
|
|
@@ -23315,12 +23315,12 @@ let Ai = class {
|
|
|
23315
23315
|
this.sequenceIndex++;
|
|
23316
23316
|
return;
|
|
23317
23317
|
}
|
|
23318
|
-
this.sequenceIndex = 0, this.state = _
|
|
23318
|
+
this.sequenceIndex = 0, this.state = _.InTagName, this.stateInTagName(t);
|
|
23319
23319
|
}
|
|
23320
23320
|
/** Look for an end tag. For <title> tags, also decode entities. */
|
|
23321
23321
|
stateInSpecialTag(t) {
|
|
23322
23322
|
if (this.sequenceIndex === this.currentSequence.length) {
|
|
23323
|
-
if (t === x.Gt || ne(t)) {
|
|
23323
|
+
if (t === x.Gt || ne$1(t)) {
|
|
23324
23324
|
const u = this.index - this.currentSequence.length;
|
|
23325
23325
|
if (this.sectionStart < u) {
|
|
23326
23326
|
const r = this.index;
|
|
@@ -23334,7 +23334,7 @@ let Ai = class {
|
|
|
23334
23334
|
(t | 32) === this.currentSequence[this.sequenceIndex] ? this.sequenceIndex += 1 : this.sequenceIndex === 0 ? this.currentSequence === F.TitleEnd ? this.decodeEntities && t === x.Amp && this.startEntity() : this.fastForwardTo(x.Lt) && (this.sequenceIndex = 1) : this.sequenceIndex = +(t === x.Lt);
|
|
23335
23335
|
}
|
|
23336
23336
|
stateCDATASequence(t) {
|
|
23337
|
-
t === F.Cdata[this.sequenceIndex] ? ++this.sequenceIndex === F.Cdata.length && (this.state = _
|
|
23337
|
+
t === F.Cdata[this.sequenceIndex] ? ++this.sequenceIndex === F.Cdata.length && (this.state = _.InCommentLike, this.currentSequence = F.CdataEnd, this.sequenceIndex = 0, this.sectionStart = this.index + 1) : (this.sequenceIndex = 0, this.state = _.InDeclaration, this.stateInDeclaration(t));
|
|
23338
23338
|
}
|
|
23339
23339
|
/**
|
|
23340
23340
|
* When we wait for one specific character, we can speed things up
|
|
@@ -23357,7 +23357,7 @@ let Ai = class {
|
|
|
23357
23357
|
* - All characters but the start character of the sequence can be skipped.
|
|
23358
23358
|
*/
|
|
23359
23359
|
stateInCommentLike(t) {
|
|
23360
|
-
t === this.currentSequence[this.sequenceIndex] ? ++this.sequenceIndex === this.currentSequence.length && (this.currentSequence === F.CdataEnd ? this.cbs.oncdata(this.sectionStart, this.index, 2) : this.cbs.oncomment(this.sectionStart, this.index, 2), this.sequenceIndex = 0, this.sectionStart = this.index + 1, this.state = _
|
|
23360
|
+
t === this.currentSequence[this.sequenceIndex] ? ++this.sequenceIndex === this.currentSequence.length && (this.currentSequence === F.CdataEnd ? this.cbs.oncdata(this.sectionStart, this.index, 2) : this.cbs.oncomment(this.sectionStart, this.index, 2), this.sequenceIndex = 0, this.sectionStart = this.index + 1, this.state = _.Text) : this.sequenceIndex === 0 ? this.fastForwardTo(this.currentSequence[0]) && (this.sequenceIndex = 1) : t !== this.currentSequence[this.sequenceIndex - 1] && (this.sequenceIndex = 0);
|
|
23361
23361
|
}
|
|
23362
23362
|
/**
|
|
23363
23363
|
* HTML only allows ASCII alpha characters (a-z and A-Z) at the beginning of a tag name.
|
|
@@ -23369,47 +23369,47 @@ let Ai = class {
|
|
|
23369
23369
|
return this.xmlMode ? !st(t) : gi(t);
|
|
23370
23370
|
}
|
|
23371
23371
|
startSpecial(t, u) {
|
|
23372
|
-
this.isSpecial = true, this.currentSequence = t, this.sequenceIndex = u, this.state = _
|
|
23372
|
+
this.isSpecial = true, this.currentSequence = t, this.sequenceIndex = u, this.state = _.SpecialStartSequence;
|
|
23373
23373
|
}
|
|
23374
23374
|
stateBeforeTagName(t) {
|
|
23375
23375
|
if (t === x.ExclamationMark)
|
|
23376
|
-
this.state = _
|
|
23376
|
+
this.state = _.BeforeDeclaration, this.sectionStart = this.index + 1;
|
|
23377
23377
|
else if (t === x.Questionmark)
|
|
23378
|
-
this.state = _
|
|
23378
|
+
this.state = _.InProcessingInstruction, this.sectionStart = this.index + 1;
|
|
23379
23379
|
else if (this.isTagStartChar(t)) {
|
|
23380
23380
|
const u = t | 32;
|
|
23381
|
-
this.sectionStart = this.index, this.xmlMode ? this.state = _
|
|
23382
|
-
} else t === x.Slash ? this.state = _
|
|
23381
|
+
this.sectionStart = this.index, this.xmlMode ? this.state = _.InTagName : u === F.ScriptEnd[2] ? this.state = _.BeforeSpecialS : u === F.TitleEnd[2] || u === F.XmpEnd[2] ? this.state = _.BeforeSpecialT : this.state = _.InTagName;
|
|
23382
|
+
} else t === x.Slash ? this.state = _.BeforeClosingTagName : (this.state = _.Text, this.stateText(t));
|
|
23383
23383
|
}
|
|
23384
23384
|
stateInTagName(t) {
|
|
23385
|
-
st(t) && (this.cbs.onopentagname(this.sectionStart, this.index), this.sectionStart = -1, this.state = _
|
|
23385
|
+
st(t) && (this.cbs.onopentagname(this.sectionStart, this.index), this.sectionStart = -1, this.state = _.BeforeAttributeName, this.stateBeforeAttributeName(t));
|
|
23386
23386
|
}
|
|
23387
23387
|
stateBeforeClosingTagName(t) {
|
|
23388
|
-
ne(t) || (t === x.Gt ? this.state = _
|
|
23388
|
+
ne$1(t) || (t === x.Gt ? this.state = _.Text : (this.state = this.isTagStartChar(t) ? _.InClosingTagName : _.InSpecialComment, this.sectionStart = this.index));
|
|
23389
23389
|
}
|
|
23390
23390
|
stateInClosingTagName(t) {
|
|
23391
|
-
(t === x.Gt || ne(t)) && (this.cbs.onclosetag(this.sectionStart, this.index), this.sectionStart = -1, this.state = _
|
|
23391
|
+
(t === x.Gt || ne$1(t)) && (this.cbs.onclosetag(this.sectionStart, this.index), this.sectionStart = -1, this.state = _.AfterClosingTagName, this.stateAfterClosingTagName(t));
|
|
23392
23392
|
}
|
|
23393
23393
|
stateAfterClosingTagName(t) {
|
|
23394
|
-
(t === x.Gt || this.fastForwardTo(x.Gt)) && (this.state = _
|
|
23394
|
+
(t === x.Gt || this.fastForwardTo(x.Gt)) && (this.state = _.Text, this.sectionStart = this.index + 1);
|
|
23395
23395
|
}
|
|
23396
23396
|
stateBeforeAttributeName(t) {
|
|
23397
|
-
t === x.Gt ? (this.cbs.onopentagend(this.index), this.isSpecial ? (this.state = _
|
|
23397
|
+
t === x.Gt ? (this.cbs.onopentagend(this.index), this.isSpecial ? (this.state = _.InSpecialTag, this.sequenceIndex = 0) : this.state = _.Text, this.sectionStart = this.index + 1) : t === x.Slash ? this.state = _.InSelfClosingTag : ne$1(t) || (this.state = _.InAttributeName, this.sectionStart = this.index);
|
|
23398
23398
|
}
|
|
23399
23399
|
stateInSelfClosingTag(t) {
|
|
23400
|
-
t === x.Gt ? (this.cbs.onselfclosingtag(this.index), this.state = _
|
|
23400
|
+
t === x.Gt ? (this.cbs.onselfclosingtag(this.index), this.state = _.Text, this.sectionStart = this.index + 1, this.isSpecial = false) : ne$1(t) || (this.state = _.BeforeAttributeName, this.stateBeforeAttributeName(t));
|
|
23401
23401
|
}
|
|
23402
23402
|
stateInAttributeName(t) {
|
|
23403
|
-
(t === x.Eq || st(t)) && (this.cbs.onattribname(this.sectionStart, this.index), this.sectionStart = this.index, this.state = _
|
|
23403
|
+
(t === x.Eq || st(t)) && (this.cbs.onattribname(this.sectionStart, this.index), this.sectionStart = this.index, this.state = _.AfterAttributeName, this.stateAfterAttributeName(t));
|
|
23404
23404
|
}
|
|
23405
23405
|
stateAfterAttributeName(t) {
|
|
23406
|
-
t === x.Eq ? this.state = _
|
|
23406
|
+
t === x.Eq ? this.state = _.BeforeAttributeValue : t === x.Slash || t === x.Gt ? (this.cbs.onattribend(re$1.NoValue, this.sectionStart), this.sectionStart = -1, this.state = _.BeforeAttributeName, this.stateBeforeAttributeName(t)) : ne$1(t) || (this.cbs.onattribend(re$1.NoValue, this.sectionStart), this.state = _.InAttributeName, this.sectionStart = this.index);
|
|
23407
23407
|
}
|
|
23408
23408
|
stateBeforeAttributeValue(t) {
|
|
23409
|
-
t === x.DoubleQuote ? (this.state = _
|
|
23409
|
+
t === x.DoubleQuote ? (this.state = _.InAttributeValueDq, this.sectionStart = this.index + 1) : t === x.SingleQuote ? (this.state = _.InAttributeValueSq, this.sectionStart = this.index + 1) : ne$1(t) || (this.sectionStart = this.index, this.state = _.InAttributeValueNq, this.stateInAttributeValueNoQuotes(t));
|
|
23410
23410
|
}
|
|
23411
23411
|
handleInAttributeValue(t, u) {
|
|
23412
|
-
t === u || !this.decodeEntities && this.fastForwardTo(u) ? (this.cbs.onattribdata(this.sectionStart, this.index), this.sectionStart = -1, this.cbs.onattribend(u === x.DoubleQuote ? re$1.Double : re$1.Single, this.index + 1), this.state = _
|
|
23412
|
+
t === u || !this.decodeEntities && this.fastForwardTo(u) ? (this.cbs.onattribdata(this.sectionStart, this.index), this.sectionStart = -1, this.cbs.onattribend(u === x.DoubleQuote ? re$1.Double : re$1.Single, this.index + 1), this.state = _.BeforeAttributeName) : this.decodeEntities && t === x.Amp && this.startEntity();
|
|
23413
23413
|
}
|
|
23414
23414
|
stateInAttributeValueDoubleQuotes(t) {
|
|
23415
23415
|
this.handleInAttributeValue(t, x.DoubleQuote);
|
|
@@ -23418,26 +23418,26 @@ let Ai = class {
|
|
|
23418
23418
|
this.handleInAttributeValue(t, x.SingleQuote);
|
|
23419
23419
|
}
|
|
23420
23420
|
stateInAttributeValueNoQuotes(t) {
|
|
23421
|
-
ne(t) || t === x.Gt ? (this.cbs.onattribdata(this.sectionStart, this.index), this.sectionStart = -1, this.cbs.onattribend(re$1.Unquoted, this.index), this.state = _
|
|
23421
|
+
ne$1(t) || t === x.Gt ? (this.cbs.onattribdata(this.sectionStart, this.index), this.sectionStart = -1, this.cbs.onattribend(re$1.Unquoted, this.index), this.state = _.BeforeAttributeName, this.stateBeforeAttributeName(t)) : this.decodeEntities && t === x.Amp && this.startEntity();
|
|
23422
23422
|
}
|
|
23423
23423
|
stateBeforeDeclaration(t) {
|
|
23424
|
-
t === x.OpeningSquareBracket ? (this.state = _
|
|
23424
|
+
t === x.OpeningSquareBracket ? (this.state = _.CDATASequence, this.sequenceIndex = 0) : this.state = t === x.Dash ? _.BeforeComment : _.InDeclaration;
|
|
23425
23425
|
}
|
|
23426
23426
|
stateInDeclaration(t) {
|
|
23427
|
-
(t === x.Gt || this.fastForwardTo(x.Gt)) && (this.cbs.ondeclaration(this.sectionStart, this.index), this.state = _
|
|
23427
|
+
(t === x.Gt || this.fastForwardTo(x.Gt)) && (this.cbs.ondeclaration(this.sectionStart, this.index), this.state = _.Text, this.sectionStart = this.index + 1);
|
|
23428
23428
|
}
|
|
23429
23429
|
stateInProcessingInstruction(t) {
|
|
23430
|
-
(t === x.Gt || this.fastForwardTo(x.Gt)) && (this.cbs.onprocessinginstruction(this.sectionStart, this.index), this.state = _
|
|
23430
|
+
(t === x.Gt || this.fastForwardTo(x.Gt)) && (this.cbs.onprocessinginstruction(this.sectionStart, this.index), this.state = _.Text, this.sectionStart = this.index + 1);
|
|
23431
23431
|
}
|
|
23432
23432
|
stateBeforeComment(t) {
|
|
23433
|
-
t === x.Dash ? (this.state = _
|
|
23433
|
+
t === x.Dash ? (this.state = _.InCommentLike, this.currentSequence = F.CommentEnd, this.sequenceIndex = 2, this.sectionStart = this.index + 1) : this.state = _.InDeclaration;
|
|
23434
23434
|
}
|
|
23435
23435
|
stateInSpecialComment(t) {
|
|
23436
|
-
(t === x.Gt || this.fastForwardTo(x.Gt)) && (this.cbs.oncomment(this.sectionStart, this.index, 0), this.state = _
|
|
23436
|
+
(t === x.Gt || this.fastForwardTo(x.Gt)) && (this.cbs.oncomment(this.sectionStart, this.index, 0), this.state = _.Text, this.sectionStart = this.index + 1);
|
|
23437
23437
|
}
|
|
23438
23438
|
stateBeforeSpecialS(t) {
|
|
23439
23439
|
const u = t | 32;
|
|
23440
|
-
u === F.ScriptEnd[3] ? this.startSpecial(F.ScriptEnd, 4) : u === F.StyleEnd[3] ? this.startSpecial(F.StyleEnd, 4) : (this.state = _
|
|
23440
|
+
u === F.ScriptEnd[3] ? this.startSpecial(F.ScriptEnd, 4) : u === F.StyleEnd[3] ? this.startSpecial(F.StyleEnd, 4) : (this.state = _.InTagName, this.stateInTagName(t));
|
|
23441
23441
|
}
|
|
23442
23442
|
stateBeforeSpecialT(t) {
|
|
23443
23443
|
switch (t | 32) {
|
|
@@ -23454,11 +23454,11 @@ let Ai = class {
|
|
|
23454
23454
|
break;
|
|
23455
23455
|
}
|
|
23456
23456
|
default:
|
|
23457
|
-
this.state = _
|
|
23457
|
+
this.state = _.InTagName, this.stateInTagName(t);
|
|
23458
23458
|
}
|
|
23459
23459
|
}
|
|
23460
23460
|
startEntity() {
|
|
23461
|
-
this.baseState = this.state, this.state = _
|
|
23461
|
+
this.baseState = this.state, this.state = _.InEntity, this.entityStart = this.index, this.entityDecoder.startEntity(this.xmlMode ? ue.Strict : this.baseState === _.Text || this.baseState === _.InSpecialTag ? ue.Legacy : ue.Attribute);
|
|
23462
23462
|
}
|
|
23463
23463
|
stateInEntity() {
|
|
23464
23464
|
const t = this.entityDecoder.write(this.buffer, this.index - this.offset);
|
|
@@ -23468,7 +23468,7 @@ let Ai = class {
|
|
|
23468
23468
|
* Remove data that has already been consumed from the buffer.
|
|
23469
23469
|
*/
|
|
23470
23470
|
cleanup() {
|
|
23471
|
-
this.running && this.sectionStart !== this.index && (this.state === _
|
|
23471
|
+
this.running && this.sectionStart !== this.index && (this.state === _.Text || this.state === _.InSpecialTag && this.sequenceIndex === 0 ? (this.cbs.ontext(this.sectionStart, this.index), this.sectionStart = this.index) : (this.state === _.InAttributeValueDq || this.state === _.InAttributeValueSq || this.state === _.InAttributeValueNq) && (this.cbs.onattribdata(this.sectionStart, this.index), this.sectionStart = this.index));
|
|
23472
23472
|
}
|
|
23473
23473
|
shouldContinue() {
|
|
23474
23474
|
return this.index < this.buffer.length + this.offset && this.running;
|
|
@@ -23482,107 +23482,107 @@ let Ai = class {
|
|
|
23482
23482
|
for (; this.shouldContinue(); ) {
|
|
23483
23483
|
const t = this.buffer.charCodeAt(this.index - this.offset);
|
|
23484
23484
|
switch (this.state) {
|
|
23485
|
-
case _
|
|
23485
|
+
case _.Text: {
|
|
23486
23486
|
this.stateText(t);
|
|
23487
23487
|
break;
|
|
23488
23488
|
}
|
|
23489
|
-
case _
|
|
23489
|
+
case _.SpecialStartSequence: {
|
|
23490
23490
|
this.stateSpecialStartSequence(t);
|
|
23491
23491
|
break;
|
|
23492
23492
|
}
|
|
23493
|
-
case _
|
|
23493
|
+
case _.InSpecialTag: {
|
|
23494
23494
|
this.stateInSpecialTag(t);
|
|
23495
23495
|
break;
|
|
23496
23496
|
}
|
|
23497
|
-
case _
|
|
23497
|
+
case _.CDATASequence: {
|
|
23498
23498
|
this.stateCDATASequence(t);
|
|
23499
23499
|
break;
|
|
23500
23500
|
}
|
|
23501
|
-
case _
|
|
23501
|
+
case _.InAttributeValueDq: {
|
|
23502
23502
|
this.stateInAttributeValueDoubleQuotes(t);
|
|
23503
23503
|
break;
|
|
23504
23504
|
}
|
|
23505
|
-
case _
|
|
23505
|
+
case _.InAttributeName: {
|
|
23506
23506
|
this.stateInAttributeName(t);
|
|
23507
23507
|
break;
|
|
23508
23508
|
}
|
|
23509
|
-
case _
|
|
23509
|
+
case _.InCommentLike: {
|
|
23510
23510
|
this.stateInCommentLike(t);
|
|
23511
23511
|
break;
|
|
23512
23512
|
}
|
|
23513
|
-
case _
|
|
23513
|
+
case _.InSpecialComment: {
|
|
23514
23514
|
this.stateInSpecialComment(t);
|
|
23515
23515
|
break;
|
|
23516
23516
|
}
|
|
23517
|
-
case _
|
|
23517
|
+
case _.BeforeAttributeName: {
|
|
23518
23518
|
this.stateBeforeAttributeName(t);
|
|
23519
23519
|
break;
|
|
23520
23520
|
}
|
|
23521
|
-
case _
|
|
23521
|
+
case _.InTagName: {
|
|
23522
23522
|
this.stateInTagName(t);
|
|
23523
23523
|
break;
|
|
23524
23524
|
}
|
|
23525
|
-
case _
|
|
23525
|
+
case _.InClosingTagName: {
|
|
23526
23526
|
this.stateInClosingTagName(t);
|
|
23527
23527
|
break;
|
|
23528
23528
|
}
|
|
23529
|
-
case _
|
|
23529
|
+
case _.BeforeTagName: {
|
|
23530
23530
|
this.stateBeforeTagName(t);
|
|
23531
23531
|
break;
|
|
23532
23532
|
}
|
|
23533
|
-
case _
|
|
23533
|
+
case _.AfterAttributeName: {
|
|
23534
23534
|
this.stateAfterAttributeName(t);
|
|
23535
23535
|
break;
|
|
23536
23536
|
}
|
|
23537
|
-
case _
|
|
23537
|
+
case _.InAttributeValueSq: {
|
|
23538
23538
|
this.stateInAttributeValueSingleQuotes(t);
|
|
23539
23539
|
break;
|
|
23540
23540
|
}
|
|
23541
|
-
case _
|
|
23541
|
+
case _.BeforeAttributeValue: {
|
|
23542
23542
|
this.stateBeforeAttributeValue(t);
|
|
23543
23543
|
break;
|
|
23544
23544
|
}
|
|
23545
|
-
case _
|
|
23545
|
+
case _.BeforeClosingTagName: {
|
|
23546
23546
|
this.stateBeforeClosingTagName(t);
|
|
23547
23547
|
break;
|
|
23548
23548
|
}
|
|
23549
|
-
case _
|
|
23549
|
+
case _.AfterClosingTagName: {
|
|
23550
23550
|
this.stateAfterClosingTagName(t);
|
|
23551
23551
|
break;
|
|
23552
23552
|
}
|
|
23553
|
-
case _
|
|
23553
|
+
case _.BeforeSpecialS: {
|
|
23554
23554
|
this.stateBeforeSpecialS(t);
|
|
23555
23555
|
break;
|
|
23556
23556
|
}
|
|
23557
|
-
case _
|
|
23557
|
+
case _.BeforeSpecialT: {
|
|
23558
23558
|
this.stateBeforeSpecialT(t);
|
|
23559
23559
|
break;
|
|
23560
23560
|
}
|
|
23561
|
-
case _
|
|
23561
|
+
case _.InAttributeValueNq: {
|
|
23562
23562
|
this.stateInAttributeValueNoQuotes(t);
|
|
23563
23563
|
break;
|
|
23564
23564
|
}
|
|
23565
|
-
case _
|
|
23565
|
+
case _.InSelfClosingTag: {
|
|
23566
23566
|
this.stateInSelfClosingTag(t);
|
|
23567
23567
|
break;
|
|
23568
23568
|
}
|
|
23569
|
-
case _
|
|
23569
|
+
case _.InDeclaration: {
|
|
23570
23570
|
this.stateInDeclaration(t);
|
|
23571
23571
|
break;
|
|
23572
23572
|
}
|
|
23573
|
-
case _
|
|
23573
|
+
case _.BeforeDeclaration: {
|
|
23574
23574
|
this.stateBeforeDeclaration(t);
|
|
23575
23575
|
break;
|
|
23576
23576
|
}
|
|
23577
|
-
case _
|
|
23577
|
+
case _.BeforeComment: {
|
|
23578
23578
|
this.stateBeforeComment(t);
|
|
23579
23579
|
break;
|
|
23580
23580
|
}
|
|
23581
|
-
case _
|
|
23581
|
+
case _.InProcessingInstruction: {
|
|
23582
23582
|
this.stateInProcessingInstruction(t);
|
|
23583
23583
|
break;
|
|
23584
23584
|
}
|
|
23585
|
-
case _
|
|
23585
|
+
case _.InEntity: {
|
|
23586
23586
|
this.stateInEntity();
|
|
23587
23587
|
break;
|
|
23588
23588
|
}
|
|
@@ -23592,15 +23592,15 @@ let Ai = class {
|
|
|
23592
23592
|
this.cleanup();
|
|
23593
23593
|
}
|
|
23594
23594
|
finish() {
|
|
23595
|
-
this.state === _
|
|
23595
|
+
this.state === _.InEntity && (this.entityDecoder.end(), this.state = this.baseState), this.handleTrailingData(), this.cbs.onend();
|
|
23596
23596
|
}
|
|
23597
23597
|
/** Handle any trailing data. */
|
|
23598
23598
|
handleTrailingData() {
|
|
23599
23599
|
const t = this.buffer.length + this.offset;
|
|
23600
|
-
this.sectionStart >= t || (this.state === _
|
|
23600
|
+
this.sectionStart >= t || (this.state === _.InCommentLike ? this.currentSequence === F.CdataEnd ? this.cbs.oncdata(this.sectionStart, t, 0) : this.cbs.oncomment(this.sectionStart, t, 0) : this.state === _.InTagName || this.state === _.BeforeAttributeName || this.state === _.BeforeAttributeValue || this.state === _.AfterAttributeName || this.state === _.InAttributeName || this.state === _.InAttributeValueSq || this.state === _.InAttributeValueDq || this.state === _.InAttributeValueNq || this.state === _.InClosingTagName || this.cbs.ontext(this.sectionStart, t));
|
|
23601
23601
|
}
|
|
23602
23602
|
emitCodePoint(t, u) {
|
|
23603
|
-
this.baseState !== _
|
|
23603
|
+
this.baseState !== _.Text && this.baseState !== _.InSpecialTag ? (this.sectionStart < this.entityStart && this.cbs.onattribdata(this.sectionStart, this.entityStart), this.sectionStart = this.entityStart + u, this.index = this.sectionStart - 1, this.cbs.onattribentity(t)) : (this.sectionStart < this.entityStart && this.cbs.ontext(this.sectionStart, this.entityStart), this.sectionStart = this.entityStart + u, this.index = this.sectionStart - 1, this.cbs.ontextentity(t, this.sectionStart));
|
|
23604
23604
|
}
|
|
23605
23605
|
};
|
|
23606
23606
|
const ye = /* @__PURE__ */ new Set([
|
|
@@ -23747,11 +23747,11 @@ let xi = class {
|
|
|
23747
23747
|
if (this.lowerCaseTagNames && (T = T.toLowerCase()), this.htmlMode && (ju.has(T) || Vu.has(T)) && this.foreignContext.shift(), this.isVoidElement(T))
|
|
23748
23748
|
this.htmlMode && T === "br" && ((n = (i = this.cbs).onopentagname) === null || n === void 0 || n.call(i, "br"), (h = (c = this.cbs).onopentag) === null || h === void 0 || h.call(c, "br", {}, true), (f = (m = this.cbs).onclosetag) === null || f === void 0 || f.call(m, "br", false));
|
|
23749
23749
|
else {
|
|
23750
|
-
const
|
|
23751
|
-
if (
|
|
23752
|
-
for (let w = 0; w <=
|
|
23750
|
+
const A2 = this.stack.indexOf(T);
|
|
23751
|
+
if (A2 !== -1)
|
|
23752
|
+
for (let w = 0; w <= A2; w++) {
|
|
23753
23753
|
const v = this.stack.shift();
|
|
23754
|
-
(a = (r = this.cbs).onclosetag) === null || a === void 0 || a.call(r, v, w !==
|
|
23754
|
+
(a = (r = this.cbs).onclosetag) === null || a === void 0 || a.call(r, v, w !== A2);
|
|
23755
23755
|
}
|
|
23756
23756
|
else this.htmlMode && T === "p" && (this.emitOpenTag("p"), this.closeCurrentTag(true));
|
|
23757
23757
|
}
|
|
@@ -23817,10 +23817,10 @@ let xi = class {
|
|
|
23817
23817
|
}
|
|
23818
23818
|
/** @internal */
|
|
23819
23819
|
oncdata(t, u, r) {
|
|
23820
|
-
var a, i, n, c, h, m, f, T,
|
|
23820
|
+
var a, i, n, c, h, m, f, T, A2, w;
|
|
23821
23821
|
this.endIndex = u;
|
|
23822
23822
|
const v = this.getSlice(t, u - r);
|
|
23823
|
-
!this.htmlMode || this.options.recognizeCDATA ? ((i = (a = this.cbs).oncdatastart) === null || i === void 0 || i.call(a), (c = (n = this.cbs).ontext) === null || c === void 0 || c.call(n, v), (m = (h = this.cbs).oncdataend) === null || m === void 0 || m.call(h)) : ((T = (f = this.cbs).oncomment) === null || T === void 0 || T.call(f, `[CDATA[${v}]]`), (w = (
|
|
23823
|
+
!this.htmlMode || this.options.recognizeCDATA ? ((i = (a = this.cbs).oncdatastart) === null || i === void 0 || i.call(a), (c = (n = this.cbs).ontext) === null || c === void 0 || c.call(n, v), (m = (h = this.cbs).oncdataend) === null || m === void 0 || m.call(h)) : ((T = (f = this.cbs).oncomment) === null || T === void 0 || T.call(f, `[CDATA[${v}]]`), (w = (A2 = this.cbs).oncommentend) === null || w === void 0 || w.call(A2)), this.startIndex = u + 1;
|
|
23824
23824
|
}
|
|
23825
23825
|
/** @internal */
|
|
23826
23826
|
onend() {
|
|
@@ -23940,7 +23940,7 @@ function mt(e, t, u) {
|
|
|
23940
23940
|
return "on";
|
|
23941
23941
|
}
|
|
23942
23942
|
}
|
|
23943
|
-
function Oe(e, t, u) {
|
|
23943
|
+
function Oe$1(e, t, u) {
|
|
23944
23944
|
u === null ? Mr(e, t) : e.attribs[t] = `${u}`;
|
|
23945
23945
|
}
|
|
23946
23946
|
function Ci(e, t) {
|
|
@@ -23949,7 +23949,7 @@ function Ci(e, t) {
|
|
|
23949
23949
|
if (typeof e != "string")
|
|
23950
23950
|
throw new Error("Bad combination of arguments.");
|
|
23951
23951
|
return P(this, (u, r) => {
|
|
23952
|
-
I(u) && Oe(u, e, t.call(u, r, u.attribs[e]));
|
|
23952
|
+
I(u) && Oe$1(u, e, t.call(u, r, u.attribs[e]));
|
|
23953
23953
|
});
|
|
23954
23954
|
}
|
|
23955
23955
|
return P(this, (u) => {
|
|
@@ -23957,10 +23957,10 @@ function Ci(e, t) {
|
|
|
23957
23957
|
if (typeof e == "object")
|
|
23958
23958
|
for (const r of Object.keys(e)) {
|
|
23959
23959
|
const a = e[r];
|
|
23960
|
-
Oe(u, r, a);
|
|
23960
|
+
Oe$1(u, r, a);
|
|
23961
23961
|
}
|
|
23962
23962
|
else
|
|
23963
|
-
Oe(u, e, t);
|
|
23963
|
+
Oe$1(u, e, t);
|
|
23964
23964
|
});
|
|
23965
23965
|
}
|
|
23966
23966
|
return arguments.length > 1 ? this : mt(this[0], e, this.options.xmlMode);
|
|
@@ -23971,8 +23971,8 @@ function $u(e, t, u) {
|
|
|
23971
23971
|
e[t]
|
|
23972
23972
|
) : !u && gu.test(t) ? mt(e, t, false) !== void 0 : mt(e, t, u);
|
|
23973
23973
|
}
|
|
23974
|
-
function Ft
|
|
23975
|
-
t in e ? e[t] = u : Oe(e, t, !r && gu.test(t) ? u ? "" : null : `${u}`);
|
|
23974
|
+
function Ft(e, t, u, r) {
|
|
23975
|
+
t in e ? e[t] = u : Oe$1(e, t, !r && gu.test(t) ? u ? "" : null : `${u}`);
|
|
23976
23976
|
}
|
|
23977
23977
|
function yi(e, t) {
|
|
23978
23978
|
var u;
|
|
@@ -24000,7 +24000,7 @@ function yi(e, t) {
|
|
|
24000
24000
|
case "innerText":
|
|
24001
24001
|
return dt(r);
|
|
24002
24002
|
case "textContent":
|
|
24003
|
-
return Le(r);
|
|
24003
|
+
return Le$1(r);
|
|
24004
24004
|
case "outerHTML":
|
|
24005
24005
|
return r.type === cu ? this.html() : this.clone().wrap("<container />").parent().html();
|
|
24006
24006
|
case "innerHTML":
|
|
@@ -24014,7 +24014,7 @@ function yi(e, t) {
|
|
|
24014
24014
|
if (typeof e == "object")
|
|
24015
24015
|
throw new TypeError("Bad combination of arguments.");
|
|
24016
24016
|
return P(this, (r, a) => {
|
|
24017
|
-
I(r) && Ft
|
|
24017
|
+
I(r) && Ft(r, e, t.call(r, a, $u(r, e, this.options.xmlMode)), this.options.xmlMode);
|
|
24018
24018
|
});
|
|
24019
24019
|
}
|
|
24020
24020
|
return P(this, (r) => {
|
|
@@ -24022,10 +24022,10 @@ function yi(e, t) {
|
|
|
24022
24022
|
if (typeof e == "object")
|
|
24023
24023
|
for (const a of Object.keys(e)) {
|
|
24024
24024
|
const i = e[a];
|
|
24025
|
-
Ft
|
|
24025
|
+
Ft(r, a, i, this.options.xmlMode);
|
|
24026
24026
|
}
|
|
24027
24027
|
else
|
|
24028
|
-
Ft
|
|
24028
|
+
Ft(r, e, t, this.options.xmlMode);
|
|
24029
24029
|
});
|
|
24030
24030
|
}
|
|
24031
24031
|
}
|
|
@@ -24150,9 +24150,9 @@ function Br(e) {
|
|
|
24150
24150
|
const h = `${c} `;
|
|
24151
24151
|
n.includes(` ${h}`) || (n += h);
|
|
24152
24152
|
}
|
|
24153
|
-
Oe(a, "class", n.trim());
|
|
24153
|
+
Oe$1(a, "class", n.trim());
|
|
24154
24154
|
} else
|
|
24155
|
-
Oe(a, "class", t.join(" ").trim());
|
|
24155
|
+
Oe$1(a, "class", t.join(" ").trim());
|
|
24156
24156
|
}
|
|
24157
24157
|
return this;
|
|
24158
24158
|
}
|
|
@@ -24210,10 +24210,10 @@ const Mi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
24210
24210
|
toggleClass: Fr,
|
|
24211
24211
|
val: Di
|
|
24212
24212
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
24213
|
-
var N
|
|
24213
|
+
var N;
|
|
24214
24214
|
(function(e) {
|
|
24215
24215
|
e.Attribute = "attribute", e.Pseudo = "pseudo", e.PseudoElement = "pseudo-element", e.Tag = "tag", e.Universal = "universal", e.Adjacent = "adjacent", e.Child = "child", e.Descendant = "descendant", e.Parent = "parent", e.Sibling = "sibling", e.ColumnCombinator = "column-combinator";
|
|
24216
|
-
})(N
|
|
24216
|
+
})(N || (N = {}));
|
|
24217
24217
|
var H;
|
|
24218
24218
|
(function(e) {
|
|
24219
24219
|
e.Any = "any", e.Element = "element", e.End = "end", e.Equals = "equals", e.Exists = "exists", e.Hyphen = "hyphen", e.Not = "not", e.Start = "start";
|
|
@@ -24234,14 +24234,14 @@ const Wu = /^[^\\#]?(?:\\(?:[\da-f]{1,6}\s?|.)|[\w\-\u00b0-\uFFFF])+/, Bi = /\\(
|
|
|
24234
24234
|
"host",
|
|
24235
24235
|
"host-context"
|
|
24236
24236
|
]);
|
|
24237
|
-
function qe(e) {
|
|
24237
|
+
function qe$1(e) {
|
|
24238
24238
|
switch (e.type) {
|
|
24239
|
-
case N
|
|
24240
|
-
case N
|
|
24241
|
-
case N
|
|
24242
|
-
case N
|
|
24243
|
-
case N
|
|
24244
|
-
case N
|
|
24239
|
+
case N.Adjacent:
|
|
24240
|
+
case N.Child:
|
|
24241
|
+
case N.Descendant:
|
|
24242
|
+
case N.Parent:
|
|
24243
|
+
case N.Sibling:
|
|
24244
|
+
case N.ColumnCombinator:
|
|
24245
24245
|
return true;
|
|
24246
24246
|
default:
|
|
24247
24247
|
return false;
|
|
@@ -24258,16 +24258,16 @@ function qi(e, t, u) {
|
|
|
24258
24258
|
String.fromCharCode(r >> 10 | 55296, r & 1023 | 56320)
|
|
24259
24259
|
);
|
|
24260
24260
|
}
|
|
24261
|
-
function Be(e) {
|
|
24261
|
+
function Be$1(e) {
|
|
24262
24262
|
return e.replace(Bi, qi);
|
|
24263
24263
|
}
|
|
24264
|
-
function Ht
|
|
24264
|
+
function Ht(e) {
|
|
24265
24265
|
return e === 39 || e === 34;
|
|
24266
24266
|
}
|
|
24267
24267
|
function zu(e) {
|
|
24268
24268
|
return e === 32 || e === 9 || e === 10 || e === 12 || e === 13;
|
|
24269
24269
|
}
|
|
24270
|
-
function Ct
|
|
24270
|
+
function Ct(e) {
|
|
24271
24271
|
const t = [], u = Hr(t, `${e}`, 0);
|
|
24272
24272
|
if (u < e.length)
|
|
24273
24273
|
throw new Error(`Unmatched selector: ${e.slice(u)}`);
|
|
@@ -24275,48 +24275,48 @@ function Ct$1(e) {
|
|
|
24275
24275
|
}
|
|
24276
24276
|
function Hr(e, t, u) {
|
|
24277
24277
|
let r = [];
|
|
24278
|
-
function a(
|
|
24279
|
-
const w = t.slice(u +
|
|
24278
|
+
function a(A2) {
|
|
24279
|
+
const w = t.slice(u + A2).match(Wu);
|
|
24280
24280
|
if (!w)
|
|
24281
24281
|
throw new Error(`Expected name, found ${t.slice(u)}`);
|
|
24282
24282
|
const [v] = w;
|
|
24283
|
-
return u +=
|
|
24283
|
+
return u += A2 + v.length, Be$1(v);
|
|
24284
24284
|
}
|
|
24285
|
-
function i(
|
|
24286
|
-
for (u +=
|
|
24285
|
+
function i(A2) {
|
|
24286
|
+
for (u += A2; u < t.length && zu(t.charCodeAt(u)); )
|
|
24287
24287
|
u++;
|
|
24288
24288
|
}
|
|
24289
24289
|
function n() {
|
|
24290
24290
|
u += 1;
|
|
24291
|
-
const
|
|
24291
|
+
const A2 = u;
|
|
24292
24292
|
let w = 1;
|
|
24293
24293
|
for (; w > 0 && u < t.length; u++)
|
|
24294
24294
|
t.charCodeAt(u) === 40 && !c(u) ? w++ : t.charCodeAt(u) === 41 && !c(u) && w--;
|
|
24295
24295
|
if (w)
|
|
24296
24296
|
throw new Error("Parenthesis not matched");
|
|
24297
|
-
return Be(t.slice(
|
|
24297
|
+
return Be$1(t.slice(A2, u - 1));
|
|
24298
24298
|
}
|
|
24299
|
-
function c(
|
|
24299
|
+
function c(A2) {
|
|
24300
24300
|
let w = 0;
|
|
24301
|
-
for (; t.charCodeAt(--
|
|
24301
|
+
for (; t.charCodeAt(--A2) === 92; )
|
|
24302
24302
|
w++;
|
|
24303
24303
|
return (w & 1) === 1;
|
|
24304
24304
|
}
|
|
24305
24305
|
function h() {
|
|
24306
|
-
if (r.length > 0 && qe(r[r.length - 1]))
|
|
24306
|
+
if (r.length > 0 && qe$1(r[r.length - 1]))
|
|
24307
24307
|
throw new Error("Did not expect successive traversals.");
|
|
24308
24308
|
}
|
|
24309
|
-
function m(
|
|
24310
|
-
if (r.length > 0 && r[r.length - 1].type === N
|
|
24311
|
-
r[r.length - 1].type =
|
|
24309
|
+
function m(A2) {
|
|
24310
|
+
if (r.length > 0 && r[r.length - 1].type === N.Descendant) {
|
|
24311
|
+
r[r.length - 1].type = A2;
|
|
24312
24312
|
return;
|
|
24313
24313
|
}
|
|
24314
|
-
h(), r.push({ type:
|
|
24314
|
+
h(), r.push({ type: A2 });
|
|
24315
24315
|
}
|
|
24316
|
-
function f(
|
|
24316
|
+
function f(A2, w) {
|
|
24317
24317
|
r.push({
|
|
24318
|
-
type: N
|
|
24319
|
-
name:
|
|
24318
|
+
type: N.Attribute,
|
|
24319
|
+
name: A2,
|
|
24320
24320
|
action: w,
|
|
24321
24321
|
value: a(1),
|
|
24322
24322
|
namespace: null,
|
|
@@ -24324,39 +24324,39 @@ function Hr(e, t, u) {
|
|
|
24324
24324
|
});
|
|
24325
24325
|
}
|
|
24326
24326
|
function T() {
|
|
24327
|
-
if (r.length && r[r.length - 1].type === N
|
|
24327
|
+
if (r.length && r[r.length - 1].type === N.Descendant && r.pop(), r.length === 0)
|
|
24328
24328
|
throw new Error("Empty sub-selector");
|
|
24329
24329
|
e.push(r);
|
|
24330
24330
|
}
|
|
24331
24331
|
if (i(0), t.length === u)
|
|
24332
24332
|
return u;
|
|
24333
24333
|
e: for (; u < t.length; ) {
|
|
24334
|
-
const
|
|
24335
|
-
switch (
|
|
24334
|
+
const A2 = t.charCodeAt(u);
|
|
24335
|
+
switch (A2) {
|
|
24336
24336
|
// Whitespace
|
|
24337
24337
|
case 32:
|
|
24338
24338
|
case 9:
|
|
24339
24339
|
case 10:
|
|
24340
24340
|
case 12:
|
|
24341
24341
|
case 13: {
|
|
24342
|
-
(r.length === 0 || r[0].type !== N
|
|
24342
|
+
(r.length === 0 || r[0].type !== N.Descendant) && (h(), r.push({ type: N.Descendant })), i(1);
|
|
24343
24343
|
break;
|
|
24344
24344
|
}
|
|
24345
24345
|
// Traversals
|
|
24346
24346
|
case 62: {
|
|
24347
|
-
m(N
|
|
24347
|
+
m(N.Child), i(1);
|
|
24348
24348
|
break;
|
|
24349
24349
|
}
|
|
24350
24350
|
case 60: {
|
|
24351
|
-
m(N
|
|
24351
|
+
m(N.Parent), i(1);
|
|
24352
24352
|
break;
|
|
24353
24353
|
}
|
|
24354
24354
|
case 126: {
|
|
24355
|
-
m(N
|
|
24355
|
+
m(N.Sibling), i(1);
|
|
24356
24356
|
break;
|
|
24357
24357
|
}
|
|
24358
24358
|
case 43: {
|
|
24359
|
-
m(N
|
|
24359
|
+
m(N.Adjacent), i(1);
|
|
24360
24360
|
break;
|
|
24361
24361
|
}
|
|
24362
24362
|
// Special attribute selectors: .class, #id
|
|
@@ -24379,44 +24379,44 @@ function Hr(e, t, u) {
|
|
|
24379
24379
|
throw new Error("Expected `=`");
|
|
24380
24380
|
i(2);
|
|
24381
24381
|
} else t.charCodeAt(u) === 61 && (S = H.Equals, i(1));
|
|
24382
|
-
let M = "",
|
|
24382
|
+
let M = "", ee2 = null;
|
|
24383
24383
|
if (S !== "exists") {
|
|
24384
|
-
if (Ht
|
|
24384
|
+
if (Ht(t.charCodeAt(u))) {
|
|
24385
24385
|
const ge = t.charCodeAt(u);
|
|
24386
24386
|
let ie = u + 1;
|
|
24387
24387
|
for (; ie < t.length && (t.charCodeAt(ie) !== ge || c(ie)); )
|
|
24388
24388
|
ie += 1;
|
|
24389
24389
|
if (t.charCodeAt(ie) !== ge)
|
|
24390
24390
|
throw new Error("Attribute value didn't end");
|
|
24391
|
-
M = Be(t.slice(u + 1, ie)), u = ie + 1;
|
|
24391
|
+
M = Be$1(t.slice(u + 1, ie)), u = ie + 1;
|
|
24392
24392
|
} else {
|
|
24393
24393
|
const ge = u;
|
|
24394
24394
|
for (; u < t.length && (!zu(t.charCodeAt(u)) && t.charCodeAt(u) !== 93 || c(u)); )
|
|
24395
24395
|
u += 1;
|
|
24396
|
-
M = Be(t.slice(ge, u));
|
|
24396
|
+
M = Be$1(t.slice(ge, u));
|
|
24397
24397
|
}
|
|
24398
24398
|
i(0);
|
|
24399
24399
|
const ae = t.charCodeAt(u) | 32;
|
|
24400
|
-
ae === 115 ? (
|
|
24400
|
+
ae === 115 ? (ee2 = false, i(1)) : ae === 105 && (ee2 = true, i(1));
|
|
24401
24401
|
}
|
|
24402
24402
|
if (t.charCodeAt(u) !== 93)
|
|
24403
24403
|
throw new Error("Attribute selector didn't terminate");
|
|
24404
24404
|
u += 1;
|
|
24405
|
-
const
|
|
24406
|
-
type: N
|
|
24405
|
+
const he2 = {
|
|
24406
|
+
type: N.Attribute,
|
|
24407
24407
|
name: w,
|
|
24408
24408
|
action: S,
|
|
24409
24409
|
value: M,
|
|
24410
24410
|
namespace: v,
|
|
24411
|
-
ignoreCase:
|
|
24411
|
+
ignoreCase: ee2
|
|
24412
24412
|
};
|
|
24413
|
-
r.push(
|
|
24413
|
+
r.push(he2);
|
|
24414
24414
|
break;
|
|
24415
24415
|
}
|
|
24416
24416
|
case 58: {
|
|
24417
24417
|
if (t.charCodeAt(u + 1) === 58) {
|
|
24418
24418
|
r.push({
|
|
24419
|
-
type: N
|
|
24419
|
+
type: N.PseudoElement,
|
|
24420
24420
|
name: a(2).toLowerCase(),
|
|
24421
24421
|
data: t.charCodeAt(u) === 40 ? n() : null
|
|
24422
24422
|
});
|
|
@@ -24426,7 +24426,7 @@ function Hr(e, t, u) {
|
|
|
24426
24426
|
let v = null;
|
|
24427
24427
|
if (t.charCodeAt(u) === 40)
|
|
24428
24428
|
if (Fi.has(w)) {
|
|
24429
|
-
if (Ht
|
|
24429
|
+
if (Ht(t.charCodeAt(u + 1)))
|
|
24430
24430
|
throw new Error(`Pseudo-selector ${w} cannot be quoted`);
|
|
24431
24431
|
if (v = [], u = Hr(v, t, u + 1), t.charCodeAt(u) !== 41)
|
|
24432
24432
|
throw new Error(`Missing closing parenthesis in :${w} (${t})`);
|
|
@@ -24434,11 +24434,11 @@ function Hr(e, t, u) {
|
|
|
24434
24434
|
} else {
|
|
24435
24435
|
if (v = n(), Hi.has(w)) {
|
|
24436
24436
|
const S = v.charCodeAt(0);
|
|
24437
|
-
S === v.charCodeAt(v.length - 1) && Ht
|
|
24437
|
+
S === v.charCodeAt(v.length - 1) && Ht(S) && (v = v.slice(1, -1));
|
|
24438
24438
|
}
|
|
24439
|
-
v = Be(v);
|
|
24439
|
+
v = Be$1(v);
|
|
24440
24440
|
}
|
|
24441
|
-
r.push({ type: N
|
|
24441
|
+
r.push({ type: N.Pseudo, name: w, data: v });
|
|
24442
24442
|
break;
|
|
24443
24443
|
}
|
|
24444
24444
|
case 44: {
|
|
@@ -24454,18 +24454,18 @@ function Hr(e, t, u) {
|
|
|
24454
24454
|
break;
|
|
24455
24455
|
}
|
|
24456
24456
|
let w = null, v;
|
|
24457
|
-
if (
|
|
24457
|
+
if (A2 === 42)
|
|
24458
24458
|
u += 1, v = "*";
|
|
24459
|
-
else if (
|
|
24459
|
+
else if (A2 === 124) {
|
|
24460
24460
|
if (v = "", t.charCodeAt(u + 1) === 124) {
|
|
24461
|
-
m(N
|
|
24461
|
+
m(N.ColumnCombinator), i(2);
|
|
24462
24462
|
break;
|
|
24463
24463
|
}
|
|
24464
24464
|
} else if (Wu.test(t.slice(u)))
|
|
24465
24465
|
v = a(0);
|
|
24466
24466
|
else
|
|
24467
24467
|
break e;
|
|
24468
|
-
t.charCodeAt(u) === 124 && t.charCodeAt(u + 1) !== 124 && (w = v, t.charCodeAt(u + 1) === 42 ? (v = "*", u += 2) : v = a(1)), r.push(v === "*" ? { type: N
|
|
24468
|
+
t.charCodeAt(u) === 124 && t.charCodeAt(u + 1) !== 124 && (w = v, t.charCodeAt(u + 1) === 42 ? (v = "*", u += 2) : v = a(1)), r.push(v === "*" ? { type: N.Universal, namespace: w } : { type: N.Tag, name: v, namespace: w });
|
|
24469
24469
|
}
|
|
24470
24470
|
}
|
|
24471
24471
|
}
|
|
@@ -24487,10 +24487,10 @@ function ji() {
|
|
|
24487
24487
|
}
|
|
24488
24488
|
var ft = ji();
|
|
24489
24489
|
const C = /* @__PURE__ */ Yi(ft), qr = /* @__PURE__ */ new Map([
|
|
24490
|
-
[N
|
|
24491
|
-
[N
|
|
24492
|
-
[N
|
|
24493
|
-
[N
|
|
24490
|
+
[N.Universal, 50],
|
|
24491
|
+
[N.Tag, 30],
|
|
24492
|
+
[N.Attribute, 1],
|
|
24493
|
+
[N.Pseudo, 0]
|
|
24494
24494
|
]);
|
|
24495
24495
|
function Au(e) {
|
|
24496
24496
|
return !qr.has(e.type);
|
|
@@ -24517,7 +24517,7 @@ function $i(e) {
|
|
|
24517
24517
|
function Yr(e) {
|
|
24518
24518
|
var t, u;
|
|
24519
24519
|
let r = (t = qr.get(e.type)) !== null && t !== void 0 ? t : -1;
|
|
24520
|
-
return e.type === N
|
|
24520
|
+
return e.type === N.Attribute ? (r = (u = Vi.get(e.action)) !== null && u !== void 0 ? u : 4, e.action === H.Equals && e.name === "id" && (r = 9), e.ignoreCase && (r >>= 1)) : e.type === N.Pseudo && (e.data ? e.name === "has" || e.name === "contains" ? r = 0 : Array.isArray(e.data) ? (r = Math.min(...e.data.map((a) => Math.min(...a.map(Yr)))), r < 0 && (r = 0)) : r = 2 : r = 3), r;
|
|
24521
24521
|
}
|
|
24522
24522
|
const Gi = /[-[\]{}()*+?.,\\^$|#\s]/g;
|
|
24523
24523
|
function Ku(e) {
|
|
@@ -24571,14 +24571,14 @@ const Wi = /* @__PURE__ */ new Set([
|
|
|
24571
24571
|
"valuetype",
|
|
24572
24572
|
"vlink"
|
|
24573
24573
|
]);
|
|
24574
|
-
function Ae(e, t) {
|
|
24574
|
+
function Ae$1(e, t) {
|
|
24575
24575
|
return typeof e.ignoreCase == "boolean" ? e.ignoreCase : e.ignoreCase === "quirks" ? !!t.quirksMode : !t.xmlMode && Wi.has(e.name);
|
|
24576
24576
|
}
|
|
24577
24577
|
const zi = {
|
|
24578
24578
|
equals(e, t, u) {
|
|
24579
24579
|
const { adapter: r } = u, { name: a } = t;
|
|
24580
24580
|
let { value: i } = t;
|
|
24581
|
-
return Ae(t, u) ? (i = i.toLowerCase(), (n) => {
|
|
24581
|
+
return Ae$1(t, u) ? (i = i.toLowerCase(), (n) => {
|
|
24582
24582
|
const c = r.getAttributeValue(n, a);
|
|
24583
24583
|
return c != null && c.length === i.length && c.toLowerCase() === i && e(n);
|
|
24584
24584
|
}) : (n) => r.getAttributeValue(n, a) === i && e(n);
|
|
@@ -24587,7 +24587,7 @@ const zi = {
|
|
|
24587
24587
|
const { adapter: r } = u, { name: a } = t;
|
|
24588
24588
|
let { value: i } = t;
|
|
24589
24589
|
const n = i.length;
|
|
24590
|
-
return Ae(t, u) ? (i = i.toLowerCase(), function(h) {
|
|
24590
|
+
return Ae$1(t, u) ? (i = i.toLowerCase(), function(h) {
|
|
24591
24591
|
const m = r.getAttributeValue(h, a);
|
|
24592
24592
|
return m != null && (m.length === n || m.charAt(n) === "-") && m.substr(0, n).toLowerCase() === i && e(h);
|
|
24593
24593
|
}) : function(h) {
|
|
@@ -24599,7 +24599,7 @@ const zi = {
|
|
|
24599
24599
|
const { adapter: r } = u, { name: a, value: i } = t;
|
|
24600
24600
|
if (/\s/.test(i))
|
|
24601
24601
|
return C.falseFunc;
|
|
24602
|
-
const n = new RegExp(`(?:^|\\s)${Ku(i)}(?:$|\\s)`, Ae(t, u) ? "i" : "");
|
|
24602
|
+
const n = new RegExp(`(?:^|\\s)${Ku(i)}(?:$|\\s)`, Ae$1(t, u) ? "i" : "");
|
|
24603
24603
|
return function(h) {
|
|
24604
24604
|
const m = r.getAttributeValue(h, a);
|
|
24605
24605
|
return m != null && m.length >= i.length && n.test(m) && e(h);
|
|
@@ -24612,7 +24612,7 @@ const zi = {
|
|
|
24612
24612
|
const { adapter: r } = u, { name: a } = t;
|
|
24613
24613
|
let { value: i } = t;
|
|
24614
24614
|
const n = i.length;
|
|
24615
|
-
return n === 0 ? C.falseFunc : Ae(t, u) ? (i = i.toLowerCase(), (c) => {
|
|
24615
|
+
return n === 0 ? C.falseFunc : Ae$1(t, u) ? (i = i.toLowerCase(), (c) => {
|
|
24616
24616
|
const h = r.getAttributeValue(c, a);
|
|
24617
24617
|
return h != null && h.length >= n && h.substr(0, n).toLowerCase() === i && e(c);
|
|
24618
24618
|
}) : (c) => {
|
|
@@ -24624,7 +24624,7 @@ const zi = {
|
|
|
24624
24624
|
const { adapter: r } = u, { name: a } = t;
|
|
24625
24625
|
let { value: i } = t;
|
|
24626
24626
|
const n = -i.length;
|
|
24627
|
-
return n === 0 ? C.falseFunc : Ae(t, u) ? (i = i.toLowerCase(), (c) => {
|
|
24627
|
+
return n === 0 ? C.falseFunc : Ae$1(t, u) ? (i = i.toLowerCase(), (c) => {
|
|
24628
24628
|
var h;
|
|
24629
24629
|
return ((h = r.getAttributeValue(c, a)) === null || h === void 0 ? void 0 : h.substr(n).toLowerCase()) === i && e(c);
|
|
24630
24630
|
}) : (c) => {
|
|
@@ -24636,7 +24636,7 @@ const zi = {
|
|
|
24636
24636
|
const { adapter: r } = u, { name: a, value: i } = t;
|
|
24637
24637
|
if (i === "")
|
|
24638
24638
|
return C.falseFunc;
|
|
24639
|
-
if (Ae(t, u)) {
|
|
24639
|
+
if (Ae$1(t, u)) {
|
|
24640
24640
|
const n = new RegExp(Ku(i), "i");
|
|
24641
24641
|
return function(h) {
|
|
24642
24642
|
const m = r.getAttributeValue(h, a);
|
|
@@ -24651,7 +24651,7 @@ const zi = {
|
|
|
24651
24651
|
not(e, t, u) {
|
|
24652
24652
|
const { adapter: r } = u, { name: a } = t;
|
|
24653
24653
|
let { value: i } = t;
|
|
24654
|
-
return i === "" ? (n) => !!r.getAttributeValue(n, a) && e(n) : Ae(t, u) ? (i = i.toLowerCase(), (n) => {
|
|
24654
|
+
return i === "" ? (n) => !!r.getAttributeValue(n, a) && e(n) : Ae$1(t, u) ? (i = i.toLowerCase(), (n) => {
|
|
24655
24655
|
const c = r.getAttributeValue(n, a);
|
|
24656
24656
|
return (c == null || c.length !== i.length || c.toLowerCase() !== i) && e(n);
|
|
24657
24657
|
}) : (n) => r.getAttributeValue(n, a) !== i && e(n);
|
|
@@ -24775,11 +24775,11 @@ const eu = {
|
|
|
24775
24775
|
const { equals: a } = u;
|
|
24776
24776
|
return !r || r.length === 0 ? eu.root(e, t, u) : r.length === 1 ? (i) => a(r[0], i) && e(i) : (i) => r.includes(i) && e(i);
|
|
24777
24777
|
},
|
|
24778
|
-
hover: Yt
|
|
24779
|
-
visited: Yt
|
|
24780
|
-
active: Yt
|
|
24778
|
+
hover: Yt("isHovered"),
|
|
24779
|
+
visited: Yt("isVisited"),
|
|
24780
|
+
active: Yt("isActive")
|
|
24781
24781
|
};
|
|
24782
|
-
function Yt
|
|
24782
|
+
function Yt(e) {
|
|
24783
24783
|
return function(u, r, { adapter: a }) {
|
|
24784
24784
|
const i = a[e];
|
|
24785
24785
|
return typeof i != "function" ? C.falseFunc : function(c) {
|
|
@@ -24900,16 +24900,16 @@ function tu(e) {
|
|
|
24900
24900
|
equals: e.equals
|
|
24901
24901
|
};
|
|
24902
24902
|
}
|
|
24903
|
-
const jt
|
|
24903
|
+
const jt = (e, t, u, r, a) => {
|
|
24904
24904
|
const i = a(t, tu(u), r);
|
|
24905
24905
|
return i === C.trueFunc ? e : i === C.falseFunc ? C.falseFunc : (n) => i(n) && e(n);
|
|
24906
|
-
}, Vt
|
|
24907
|
-
is: jt
|
|
24906
|
+
}, Vt = {
|
|
24907
|
+
is: jt,
|
|
24908
24908
|
/**
|
|
24909
24909
|
* `:matches` and `:where` are aliases for `:is`.
|
|
24910
24910
|
*/
|
|
24911
|
-
matches: jt
|
|
24912
|
-
where: jt
|
|
24911
|
+
matches: jt,
|
|
24912
|
+
where: jt,
|
|
24913
24913
|
not(e, t, u, r, a) {
|
|
24914
24914
|
const i = a(t, tu(u), r);
|
|
24915
24915
|
return i === C.falseFunc ? e : i === C.trueFunc ? C.falseFunc : (n) => !i(n) && e(n);
|
|
@@ -24930,7 +24930,7 @@ const jt$1 = (e, t, u, r, a) => {
|
|
|
24930
24930
|
if (!e(T))
|
|
24931
24931
|
return false;
|
|
24932
24932
|
c[0] = T;
|
|
24933
|
-
const
|
|
24933
|
+
const A2 = i.getChildren(T), w = f ? [...A2, ...Vr(T, i)] : A2;
|
|
24934
24934
|
return i.existsOne(m, w);
|
|
24935
24935
|
};
|
|
24936
24936
|
}
|
|
@@ -24941,16 +24941,16 @@ function tn(e, t, u, r, a) {
|
|
|
24941
24941
|
var i;
|
|
24942
24942
|
const { name: n, data: c } = t;
|
|
24943
24943
|
if (Array.isArray(c)) {
|
|
24944
|
-
if (!(n in Vt
|
|
24944
|
+
if (!(n in Vt))
|
|
24945
24945
|
throw new Error(`Unknown pseudo-class :${n}(${c})`);
|
|
24946
|
-
return Vt
|
|
24946
|
+
return Vt[n](e, c, u, r, a);
|
|
24947
24947
|
}
|
|
24948
24948
|
const h = (i = u.pseudos) === null || i === void 0 ? void 0 : i[n], m = typeof h == "string" ? h : Ji[n];
|
|
24949
24949
|
if (typeof m == "string") {
|
|
24950
24950
|
if (c != null)
|
|
24951
24951
|
throw new Error(`Pseudo ${n} doesn't have any arguments`);
|
|
24952
|
-
const f = Ct
|
|
24953
|
-
return Vt
|
|
24952
|
+
const f = Ct(m);
|
|
24953
|
+
return Vt.is(e, f, u, r, a);
|
|
24954
24954
|
}
|
|
24955
24955
|
if (typeof h == "function")
|
|
24956
24956
|
return Ju(h, n, c, 1), (f) => h(f, c) && e(f);
|
|
@@ -24962,26 +24962,26 @@ function tn(e, t, u, r, a) {
|
|
|
24962
24962
|
}
|
|
24963
24963
|
throw new Error(`Unknown pseudo-class :${n}`);
|
|
24964
24964
|
}
|
|
24965
|
-
function $t
|
|
24965
|
+
function $t(e, t) {
|
|
24966
24966
|
const u = t.getParent(e);
|
|
24967
24967
|
return u && t.isTag(u) ? u : null;
|
|
24968
24968
|
}
|
|
24969
24969
|
function un(e, t, u, r, a) {
|
|
24970
24970
|
const { adapter: i, equals: n } = u;
|
|
24971
24971
|
switch (t.type) {
|
|
24972
|
-
case N
|
|
24972
|
+
case N.PseudoElement:
|
|
24973
24973
|
throw new Error("Pseudo-elements are not supported by css-select");
|
|
24974
|
-
case N
|
|
24974
|
+
case N.ColumnCombinator:
|
|
24975
24975
|
throw new Error("Column combinators are not yet supported by css-select");
|
|
24976
|
-
case N
|
|
24976
|
+
case N.Attribute: {
|
|
24977
24977
|
if (t.namespace != null)
|
|
24978
24978
|
throw new Error("Namespaced attributes are not yet supported by css-select");
|
|
24979
24979
|
return (!u.xmlMode || u.lowerCaseAttributeNames) && (t.name = t.name.toLowerCase()), zi[t.action](e, t, u);
|
|
24980
24980
|
}
|
|
24981
|
-
case N
|
|
24981
|
+
case N.Pseudo:
|
|
24982
24982
|
return tn(e, t, u, r, a);
|
|
24983
24983
|
// Tags
|
|
24984
|
-
case N
|
|
24984
|
+
case N.Tag: {
|
|
24985
24985
|
if (t.namespace != null)
|
|
24986
24986
|
throw new Error("Namespaced tag names are not yet supported by css-select");
|
|
24987
24987
|
let { name: c } = t;
|
|
@@ -24990,11 +24990,11 @@ function un(e, t, u, r, a) {
|
|
|
24990
24990
|
};
|
|
24991
24991
|
}
|
|
24992
24992
|
// Traversal
|
|
24993
|
-
case N
|
|
24993
|
+
case N.Descendant: {
|
|
24994
24994
|
if (u.cacheResults === false || typeof WeakSet > "u")
|
|
24995
24995
|
return function(m) {
|
|
24996
24996
|
let f = m;
|
|
24997
|
-
for (; f = $t
|
|
24997
|
+
for (; f = $t(f, i); )
|
|
24998
24998
|
if (e(f))
|
|
24999
24999
|
return true;
|
|
25000
25000
|
return false;
|
|
@@ -25002,7 +25002,7 @@ function un(e, t, u, r, a) {
|
|
|
25002
25002
|
const c = /* @__PURE__ */ new WeakSet();
|
|
25003
25003
|
return function(m) {
|
|
25004
25004
|
let f = m;
|
|
25005
|
-
for (; f = $t
|
|
25005
|
+
for (; f = $t(f, i); )
|
|
25006
25006
|
if (!c.has(f)) {
|
|
25007
25007
|
if (i.isTag(f) && e(f))
|
|
25008
25008
|
return true;
|
|
@@ -25017,19 +25017,19 @@ function un(e, t, u, r, a) {
|
|
|
25017
25017
|
do
|
|
25018
25018
|
if (e(m))
|
|
25019
25019
|
return true;
|
|
25020
|
-
while (m = $t
|
|
25020
|
+
while (m = $t(m, i));
|
|
25021
25021
|
return false;
|
|
25022
25022
|
};
|
|
25023
|
-
case N
|
|
25023
|
+
case N.Parent:
|
|
25024
25024
|
return function(h) {
|
|
25025
25025
|
return i.getChildren(h).some((m) => i.isTag(m) && e(m));
|
|
25026
25026
|
};
|
|
25027
|
-
case N
|
|
25027
|
+
case N.Child:
|
|
25028
25028
|
return function(h) {
|
|
25029
25029
|
const m = i.getParent(h);
|
|
25030
25030
|
return m != null && i.isTag(m) && e(m);
|
|
25031
25031
|
};
|
|
25032
|
-
case N
|
|
25032
|
+
case N.Sibling:
|
|
25033
25033
|
return function(h) {
|
|
25034
25034
|
const m = i.getSiblings(h);
|
|
25035
25035
|
for (let f = 0; f < m.length; f++) {
|
|
@@ -25041,7 +25041,7 @@ function un(e, t, u, r, a) {
|
|
|
25041
25041
|
}
|
|
25042
25042
|
return false;
|
|
25043
25043
|
};
|
|
25044
|
-
case N
|
|
25044
|
+
case N.Adjacent:
|
|
25045
25045
|
return i.prevElementSibling ? function(h) {
|
|
25046
25046
|
const m = i.prevElementSibling(h);
|
|
25047
25047
|
return m != null && e(m);
|
|
@@ -25049,14 +25049,14 @@ function un(e, t, u, r, a) {
|
|
|
25049
25049
|
const m = i.getSiblings(h);
|
|
25050
25050
|
let f;
|
|
25051
25051
|
for (let T = 0; T < m.length; T++) {
|
|
25052
|
-
const
|
|
25053
|
-
if (n(h,
|
|
25052
|
+
const A2 = m[T];
|
|
25053
|
+
if (n(h, A2))
|
|
25054
25054
|
break;
|
|
25055
|
-
i.isTag(
|
|
25055
|
+
i.isTag(A2) && (f = A2);
|
|
25056
25056
|
}
|
|
25057
25057
|
return !!f && e(f);
|
|
25058
25058
|
};
|
|
25059
|
-
case N
|
|
25059
|
+
case N.Universal: {
|
|
25060
25060
|
if (t.namespace != null && t.namespace !== "*")
|
|
25061
25061
|
throw new Error("Namespaced universal selectors are not yet supported by css-select");
|
|
25062
25062
|
return e;
|
|
@@ -25064,12 +25064,12 @@ function un(e, t, u, r, a) {
|
|
|
25064
25064
|
}
|
|
25065
25065
|
}
|
|
25066
25066
|
function $r(e) {
|
|
25067
|
-
return e.type === N
|
|
25067
|
+
return e.type === N.Pseudo && (e.name === "scope" || Array.isArray(e.data) && e.data.some((t) => t.some($r)));
|
|
25068
25068
|
}
|
|
25069
|
-
const rn = { type: N
|
|
25069
|
+
const rn = { type: N.Descendant }, sn = {
|
|
25070
25070
|
type: "_flexibleDescendant"
|
|
25071
25071
|
}, an = {
|
|
25072
|
-
type: N
|
|
25072
|
+
type: N.Pseudo,
|
|
25073
25073
|
name: "scope",
|
|
25074
25074
|
data: null
|
|
25075
25075
|
};
|
|
@@ -25079,7 +25079,7 @@ function nn(e, { adapter: t }, u) {
|
|
|
25079
25079
|
return a === jr || i && t.isTag(i);
|
|
25080
25080
|
});
|
|
25081
25081
|
for (const a of e) {
|
|
25082
|
-
if (!(a.length > 0 && Au(a[0]) && a[0].type !== N
|
|
25082
|
+
if (!(a.length > 0 && Au(a[0]) && a[0].type !== N.Descendant)) if (r && !a.some($r))
|
|
25083
25083
|
a.unshift(rn);
|
|
25084
25084
|
else
|
|
25085
25085
|
continue;
|
|
@@ -25098,7 +25098,7 @@ function Gr(e, t, u) {
|
|
|
25098
25098
|
const c = e.map((h) => {
|
|
25099
25099
|
if (h.length >= 2) {
|
|
25100
25100
|
const [m, f] = h;
|
|
25101
|
-
m.type !== N
|
|
25101
|
+
m.type !== N.Pseudo || m.name !== "scope" || (a && f.type === N.Descendant ? h[1] = sn : (f.type === N.Adjacent || f.type === N.Sibling) && (n = true));
|
|
25102
25102
|
}
|
|
25103
25103
|
return on(h, t, i);
|
|
25104
25104
|
}).reduce(cn, C.falseFunc);
|
|
@@ -25114,13 +25114,13 @@ function cn(e, t) {
|
|
|
25114
25114
|
};
|
|
25115
25115
|
}
|
|
25116
25116
|
const Wr = (e, t) => e === t, dn = {
|
|
25117
|
-
adapter: St
|
|
25117
|
+
adapter: St,
|
|
25118
25118
|
equals: Wr
|
|
25119
25119
|
};
|
|
25120
25120
|
function hn(e) {
|
|
25121
25121
|
var t, u, r, a;
|
|
25122
25122
|
const i = e ?? dn;
|
|
25123
|
-
return (t = i.adapter) !== null && t !== void 0 || (i.adapter = St
|
|
25123
|
+
return (t = i.adapter) !== null && t !== void 0 || (i.adapter = St), (u = i.equals) !== null && u !== void 0 || (i.equals = (a = (r = i.adapter) === null || r === void 0 ? void 0 : r.equals) !== null && a !== void 0 ? a : Wr), i;
|
|
25124
25124
|
}
|
|
25125
25125
|
function ln(e) {
|
|
25126
25126
|
return function(u, r, a) {
|
|
@@ -25186,10 +25186,10 @@ function wu(e) {
|
|
|
25186
25186
|
return [u, t];
|
|
25187
25187
|
}
|
|
25188
25188
|
const En = {
|
|
25189
|
-
type: N
|
|
25189
|
+
type: N.Universal,
|
|
25190
25190
|
namespace: null
|
|
25191
25191
|
}, Tn = {
|
|
25192
|
-
type: N
|
|
25192
|
+
type: N.Pseudo,
|
|
25193
25193
|
name: "scope",
|
|
25194
25194
|
data: null
|
|
25195
25195
|
};
|
|
@@ -25199,7 +25199,7 @@ function Qr(e, t, u = {}) {
|
|
|
25199
25199
|
function Kr(e, t, u = {}) {
|
|
25200
25200
|
if (typeof t == "function")
|
|
25201
25201
|
return e.some(t);
|
|
25202
|
-
const [r, a] = wu(Ct
|
|
25202
|
+
const [r, a] = wu(Ct(t));
|
|
25203
25203
|
return r.length > 0 && e.some(vu(r, u)) || a.some((i) => Jr(i, e, u).length > 0);
|
|
25204
25204
|
}
|
|
25205
25205
|
function _n(e, t, u, r) {
|
|
@@ -25226,7 +25226,7 @@ function _n(e, t, u, r) {
|
|
|
25226
25226
|
}
|
|
25227
25227
|
}
|
|
25228
25228
|
function Xr(e, t, u = {}) {
|
|
25229
|
-
return Zr(Ct
|
|
25229
|
+
return Zr(Ct(e), t, u);
|
|
25230
25230
|
}
|
|
25231
25231
|
function Zr(e, t, u) {
|
|
25232
25232
|
if (t.length === 0)
|
|
@@ -25260,7 +25260,7 @@ function Zr(e, t, u) {
|
|
|
25260
25260
|
}
|
|
25261
25261
|
function Jr(e, t, u) {
|
|
25262
25262
|
var r;
|
|
25263
|
-
if (e.some(qe)) {
|
|
25263
|
+
if (e.some(qe$1)) {
|
|
25264
25264
|
const a = (r = u.root) !== null && r !== void 0 ? r : bn(t[0]), i = { ...u, context: t, relativeSelector: false };
|
|
25265
25265
|
return e.push(Tn), Et(a, e, i, true, t.length);
|
|
25266
25266
|
}
|
|
@@ -25269,22 +25269,22 @@ function Jr(e, t, u) {
|
|
|
25269
25269
|
function gn(e, t, u = {}, r = 1 / 0) {
|
|
25270
25270
|
if (typeof e == "function")
|
|
25271
25271
|
return es(t, e);
|
|
25272
|
-
const [a, i] = wu(Ct
|
|
25272
|
+
const [a, i] = wu(Ct(e)), n = i.map((c) => Et(t, c, u, true, r));
|
|
25273
25273
|
return a.length && n.push(uu(t, a, u, r)), n.length === 0 ? [] : n.length === 1 ? n[0] : ke(n.reduce((c, h) => [...c, ...h]));
|
|
25274
25274
|
}
|
|
25275
25275
|
function Et(e, t, u, r, a) {
|
|
25276
25276
|
const i = t.findIndex(bt), n = t.slice(0, i), c = t[i], h = t.length - 1 === i ? a : 1 / 0, m = fn(c.name, c.data, h);
|
|
25277
25277
|
if (m === 0)
|
|
25278
25278
|
return [];
|
|
25279
|
-
const T = (n.length === 0 && !Array.isArray(e) ? It
|
|
25280
|
-
let
|
|
25281
|
-
if (
|
|
25282
|
-
return
|
|
25283
|
-
const w = t.slice(i + 1), v = w.some(qe);
|
|
25279
|
+
const T = (n.length === 0 && !Array.isArray(e) ? It(e).filter(I) : n.length === 0 ? (Array.isArray(e) ? e : [e]).filter(I) : r || n.some(qe$1) ? uu(e, [n], u, m) : ru(e, [n], u)).slice(0, m);
|
|
25280
|
+
let A2 = _n(c.name, T, c.data, u);
|
|
25281
|
+
if (A2.length === 0 || t.length === i + 1)
|
|
25282
|
+
return A2;
|
|
25283
|
+
const w = t.slice(i + 1), v = w.some(qe$1);
|
|
25284
25284
|
if (v) {
|
|
25285
|
-
if (qe(w[0])) {
|
|
25285
|
+
if (qe$1(w[0])) {
|
|
25286
25286
|
const { type: S } = w[0];
|
|
25287
|
-
(S === N
|
|
25287
|
+
(S === N.Sibling || S === N.Adjacent) && (A2 = zr(A2, St, true)), w.unshift(En);
|
|
25288
25288
|
}
|
|
25289
25289
|
u = {
|
|
25290
25290
|
...u,
|
|
@@ -25294,15 +25294,15 @@ function Et(e, t, u, r, a) {
|
|
|
25294
25294
|
* Add a custom root func, to make sure traversals don't match elements
|
|
25295
25295
|
* that aren't a part of the considered tree.
|
|
25296
25296
|
*/
|
|
25297
|
-
rootFunc: (S) =>
|
|
25297
|
+
rootFunc: (S) => A2.includes(S)
|
|
25298
25298
|
};
|
|
25299
25299
|
} else u.rootFunc && u.rootFunc !== ft.trueFunc && (u = { ...u, rootFunc: ft.trueFunc });
|
|
25300
|
-
return w.some(bt) ? Et(
|
|
25300
|
+
return w.some(bt) ? Et(A2, w, u, false, a) : v ? (
|
|
25301
25301
|
// Query existing elements to resolve traversal.
|
|
25302
|
-
uu(
|
|
25302
|
+
uu(A2, [w], u, a)
|
|
25303
25303
|
) : (
|
|
25304
25304
|
// If we don't have any more traversals, simply filter elements.
|
|
25305
|
-
ru(
|
|
25305
|
+
ru(A2, [w], u)
|
|
25306
25306
|
);
|
|
25307
25307
|
}
|
|
25308
25308
|
function uu(e, t, u, r) {
|
|
@@ -25310,7 +25310,7 @@ function uu(e, t, u, r) {
|
|
|
25310
25310
|
return es(e, a, r);
|
|
25311
25311
|
}
|
|
25312
25312
|
function es(e, t, u = 1 / 0) {
|
|
25313
|
-
const r = zr(e, St
|
|
25313
|
+
const r = zr(e, St, t.shouldTestNextSiblings);
|
|
25314
25314
|
return Eu((a) => I(a) && t(a), r, true, u);
|
|
25315
25315
|
}
|
|
25316
25316
|
function ru(e, t, u) {
|
|
@@ -25356,7 +25356,7 @@ function Nu(e) {
|
|
|
25356
25356
|
};
|
|
25357
25357
|
};
|
|
25358
25358
|
}
|
|
25359
|
-
const et = Nu((e, t) => {
|
|
25359
|
+
const et$1 = Nu((e, t) => {
|
|
25360
25360
|
let u = [];
|
|
25361
25361
|
for (let r = 0; r < t.length; r++) {
|
|
25362
25362
|
const a = e(t[r]);
|
|
@@ -25386,15 +25386,15 @@ function Iu(e, ...t) {
|
|
|
25386
25386
|
return u = null, n;
|
|
25387
25387
|
};
|
|
25388
25388
|
}
|
|
25389
|
-
function Pe(e) {
|
|
25389
|
+
function Pe$1(e) {
|
|
25390
25390
|
return e.length > 1 ? Array.from(new Set(e)) : e;
|
|
25391
25391
|
}
|
|
25392
|
-
const Nn = xu(({ parent: e }) => e && !Te(e) ? e : null, Pe), xn = et((e) => {
|
|
25392
|
+
const Nn = xu(({ parent: e }) => e && !Te$1(e) ? e : null, Pe$1), xn = et$1((e) => {
|
|
25393
25393
|
const t = [];
|
|
25394
|
-
for (; e.parent && !Te(e.parent); )
|
|
25394
|
+
for (; e.parent && !Te$1(e.parent); )
|
|
25395
25395
|
t.push(e.parent), e = e.parent;
|
|
25396
25396
|
return t;
|
|
25397
|
-
}, ke, (e) => e.reverse()), In = Iu(({ parent: e }) => e && !Te(e) ? e : null, ke, (e) => e.reverse());
|
|
25397
|
+
}, ke, (e) => e.reverse()), In = Iu(({ parent: e }) => e && !Te$1(e) ? e : null, ke, (e) => e.reverse());
|
|
25398
25398
|
function Sn(e) {
|
|
25399
25399
|
var t;
|
|
25400
25400
|
const u = [];
|
|
@@ -25405,7 +25405,7 @@ function Sn(e) {
|
|
|
25405
25405
|
root: (t = this._root) === null || t === void 0 ? void 0 : t[0]
|
|
25406
25406
|
}, a = typeof e == "string" ? (i) => Qr(i, e, r) : tt$1(e);
|
|
25407
25407
|
return P(this, (i) => {
|
|
25408
|
-
for (i && !Te(i) && !I(i) && (i = i.parent); i && I(i); ) {
|
|
25408
|
+
for (i && !Te$1(i) && !I(i) && (i = i.parent); i && I(i); ) {
|
|
25409
25409
|
if (a(i, 0)) {
|
|
25410
25410
|
u.includes(i) || u.push(i);
|
|
25411
25411
|
break;
|
|
@@ -25414,17 +25414,17 @@ function Sn(e) {
|
|
|
25414
25414
|
}
|
|
25415
25415
|
}), this._make(u);
|
|
25416
25416
|
}
|
|
25417
|
-
const Cn = xu((e) => fu(e)), yn = et((e) => {
|
|
25417
|
+
const Cn = xu((e) => fu(e)), yn = et$1((e) => {
|
|
25418
25418
|
const t = [];
|
|
25419
25419
|
for (; e.next; )
|
|
25420
25420
|
e = e.next, I(e) && t.push(e);
|
|
25421
25421
|
return t;
|
|
25422
|
-
}, Pe), On = Iu((e) => fu(e), Pe), Ln = xu((e) => bu(e)), Rn = et((e) => {
|
|
25422
|
+
}, Pe$1), On = Iu((e) => fu(e), Pe$1), Ln = xu((e) => bu(e)), Rn = et$1((e) => {
|
|
25423
25423
|
const t = [];
|
|
25424
25424
|
for (; e.prev; )
|
|
25425
25425
|
e = e.prev, I(e) && t.push(e);
|
|
25426
25426
|
return t;
|
|
25427
|
-
}, Pe), Dn = Iu((e) => bu(e), Pe), kn = et((e) => Cr(e).filter((t) => I(t) && t !== e), ke), Pn = et((e) => It
|
|
25427
|
+
}, Pe$1), Dn = Iu((e) => bu(e), Pe$1), kn = et$1((e) => Cr(e).filter((t) => I(t) && t !== e), ke), Pn = et$1((e) => It(e).filter(I), Pe$1);
|
|
25428
25428
|
function Mn() {
|
|
25429
25429
|
const e = this.toArray().reduce((t, u) => B$1(u) ? t.concat(u.children) : t, []);
|
|
25430
25430
|
return this._make(e);
|
|
@@ -25551,9 +25551,9 @@ function eo(e) {
|
|
|
25551
25551
|
if (typeof Buffer < "u" && Buffer.isBuffer(u) && (u = u.toString()), typeof u == "string")
|
|
25552
25552
|
return e(u, r, a, i);
|
|
25553
25553
|
const n = u;
|
|
25554
|
-
if (!Array.isArray(n) && Te(n))
|
|
25554
|
+
if (!Array.isArray(n) && Te$1(n))
|
|
25555
25555
|
return n;
|
|
25556
|
-
const c = new Ne([]);
|
|
25556
|
+
const c = new Ne$1([]);
|
|
25557
25557
|
return xe(n, c), c;
|
|
25558
25558
|
};
|
|
25559
25559
|
}
|
|
@@ -25562,7 +25562,7 @@ function xe(e, t) {
|
|
|
25562
25562
|
t ? t.children = u : t = null;
|
|
25563
25563
|
for (let r = 0; r < u.length; r++) {
|
|
25564
25564
|
const a = u[r];
|
|
25565
|
-
a.parent && a.parent.children !== u && Ie(a), t ? (a.prev = u[r - 1] || null, a.next = u[r + 1] || null) : a.prev = a.next = null, a.parent = t;
|
|
25565
|
+
a.parent && a.parent.children !== u && Ie$1(a), t ? (a.prev = u[r - 1] || null, a.next = u[r + 1] || null) : a.prev = a.next = null, a.parent = t;
|
|
25566
25566
|
}
|
|
25567
25567
|
return t;
|
|
25568
25568
|
}
|
|
@@ -25602,7 +25602,7 @@ function ts(e) {
|
|
|
25602
25602
|
});
|
|
25603
25603
|
};
|
|
25604
25604
|
}
|
|
25605
|
-
function _e(e, t, u, r, a) {
|
|
25605
|
+
function _e$1(e, t, u, r, a) {
|
|
25606
25606
|
var i, n;
|
|
25607
25607
|
const c = [
|
|
25608
25608
|
t,
|
|
@@ -25610,10 +25610,10 @@ function _e(e, t, u, r, a) {
|
|
|
25610
25610
|
...r
|
|
25611
25611
|
], h = t === 0 ? null : e[t - 1], m = t + u >= e.length ? null : e[t + u];
|
|
25612
25612
|
for (let f = 0; f < r.length; ++f) {
|
|
25613
|
-
const T = r[f],
|
|
25614
|
-
if (
|
|
25615
|
-
const v =
|
|
25616
|
-
v !== -1 && (
|
|
25613
|
+
const T = r[f], A2 = T.parent;
|
|
25614
|
+
if (A2) {
|
|
25615
|
+
const v = A2.children.indexOf(T);
|
|
25616
|
+
v !== -1 && (A2.children.splice(v, 1), a === A2 && t > v && c[0]--);
|
|
25617
25617
|
}
|
|
25618
25618
|
T.parent = a, T.prev && (T.prev.next = (i = T.next) !== null && i !== void 0 ? i : null), T.next && (T.next.prev = (n = T.prev) !== null && n !== void 0 ? n : null), T.prev = f === 0 ? h : r[f - 1], T.next = f === r.length - 1 ? m : r[f + 1];
|
|
25619
25619
|
}
|
|
@@ -25626,15 +25626,15 @@ function ro(e) {
|
|
|
25626
25626
|
return (de(e) ? e : this._make(e)).prepend(this), this;
|
|
25627
25627
|
}
|
|
25628
25628
|
const so = ts((e, t, u) => {
|
|
25629
|
-
_e(t, t.length, 0, e, u);
|
|
25629
|
+
_e$1(t, t.length, 0, e, u);
|
|
25630
25630
|
}), ao = ts((e, t, u) => {
|
|
25631
|
-
_e(t, 0, 0, e, u);
|
|
25631
|
+
_e$1(t, 0, 0, e, u);
|
|
25632
25632
|
});
|
|
25633
25633
|
function us(e) {
|
|
25634
25634
|
return function(t) {
|
|
25635
25635
|
const u = this.length - 1, r = this.parents().last();
|
|
25636
25636
|
for (let a = 0; a < this.length; a++) {
|
|
25637
|
-
const i = this[a], n = typeof t == "function" ? t.call(i, a, i) : typeof t == "string" && !Xt
|
|
25637
|
+
const i = this[a], n = typeof t == "function" ? t.call(i, a, i) : typeof t == "string" && !Xt(t) ? r.find(t).clone() : t, [c] = this._makeDomArray(n, a < u);
|
|
25638
25638
|
if (!c || !B$1(c))
|
|
25639
25639
|
continue;
|
|
25640
25640
|
let h = c, m = 0;
|
|
@@ -25652,7 +25652,7 @@ const io = us((e, t, u) => {
|
|
|
25652
25652
|
if (!r)
|
|
25653
25653
|
return;
|
|
25654
25654
|
const a = r.children, i = a.indexOf(e);
|
|
25655
|
-
xe([e], t), _e(a, i, 0, u, r);
|
|
25655
|
+
xe([e], t), _e$1(a, i, 0, u, r);
|
|
25656
25656
|
}), no = us((e, t, u) => {
|
|
25657
25657
|
B$1(e) && (xe(e.children, t), xe(u, e));
|
|
25658
25658
|
});
|
|
@@ -25686,7 +25686,7 @@ function ho(...e) {
|
|
|
25686
25686
|
if (i === -1)
|
|
25687
25687
|
return;
|
|
25688
25688
|
const n = typeof e[0] == "function" ? e[0].call(u, r, this._render(u.children)) : e, c = this._makeDomArray(n, r < t);
|
|
25689
|
-
_e(a, i + 1, 0, c, u.parent);
|
|
25689
|
+
_e$1(a, i + 1, 0, c, u.parent);
|
|
25690
25690
|
});
|
|
25691
25691
|
}
|
|
25692
25692
|
function lo(e) {
|
|
@@ -25697,7 +25697,7 @@ function lo(e) {
|
|
|
25697
25697
|
if (!a)
|
|
25698
25698
|
continue;
|
|
25699
25699
|
const i = a.children, n = i.indexOf(u);
|
|
25700
|
-
n !== -1 && (_e(i, n + 1, 0, r, a), t.push(...r));
|
|
25700
|
+
n !== -1 && (_e$1(i, n + 1, 0, r, a), t.push(...r));
|
|
25701
25701
|
}
|
|
25702
25702
|
return this._make(t);
|
|
25703
25703
|
}
|
|
@@ -25710,7 +25710,7 @@ function mo(...e) {
|
|
|
25710
25710
|
if (i === -1)
|
|
25711
25711
|
return;
|
|
25712
25712
|
const n = typeof e[0] == "function" ? e[0].call(u, r, this._render(u.children)) : e, c = this._makeDomArray(n, r < t);
|
|
25713
|
-
_e(a, i, 0, c, u.parent);
|
|
25713
|
+
_e$1(a, i, 0, c, u.parent);
|
|
25714
25714
|
});
|
|
25715
25715
|
}
|
|
25716
25716
|
function po(e) {
|
|
@@ -25722,13 +25722,13 @@ function po(e) {
|
|
|
25722
25722
|
if (!i)
|
|
25723
25723
|
return;
|
|
25724
25724
|
const n = i.children, c = n.indexOf(r);
|
|
25725
|
-
c !== -1 && (_e(n, c, 0, a, i), u.push(...a));
|
|
25725
|
+
c !== -1 && (_e$1(n, c, 0, a, i), u.push(...a));
|
|
25726
25726
|
}), this._make(u);
|
|
25727
25727
|
}
|
|
25728
25728
|
function fo(e) {
|
|
25729
25729
|
const t = e ? this.filter(e) : this;
|
|
25730
25730
|
return P(t, (u) => {
|
|
25731
|
-
Ie(u), u.prev = u.next = u.parent = null;
|
|
25731
|
+
Ie$1(u), u.prev = u.next = u.parent = null;
|
|
25732
25732
|
}), this;
|
|
25733
25733
|
}
|
|
25734
25734
|
function bo(e) {
|
|
@@ -25739,7 +25739,7 @@ function bo(e) {
|
|
|
25739
25739
|
const a = r.children, i = typeof e == "function" ? e.call(t, u, t) : e, n = this._makeDomArray(i);
|
|
25740
25740
|
xe(n, null);
|
|
25741
25741
|
const c = a.indexOf(t);
|
|
25742
|
-
_e(a, c, 1, n, r), n.includes(t) || (t.parent = t.prev = t.next = null);
|
|
25742
|
+
_e$1(a, c, 1, n, r), n.includes(t) || (t.parent = t.prev = t.next = null);
|
|
25743
25743
|
});
|
|
25744
25744
|
}
|
|
25745
25745
|
function Eo() {
|
|
@@ -25779,7 +25779,7 @@ function go(e) {
|
|
|
25779
25779
|
});
|
|
25780
25780
|
}
|
|
25781
25781
|
function Ao() {
|
|
25782
|
-
const e = Array.prototype.map.call(this.get(), (u) => ze(u, true)), t = new Ne(e);
|
|
25782
|
+
const e = Array.prototype.map.call(this.get(), (u) => ze(u, true)), t = new Ne$1(e);
|
|
25783
25783
|
for (const u of e)
|
|
25784
25784
|
u.parent = t;
|
|
25785
25785
|
return this._make(e);
|
|
@@ -25945,24 +25945,24 @@ function ko(e, t) {
|
|
|
25945
25945
|
throw new Error("cheerio.load() expects a string");
|
|
25946
25946
|
const n = Kt(a), c = e(r, n, i, null);
|
|
25947
25947
|
class h extends ut {
|
|
25948
|
-
_make(T,
|
|
25949
|
-
const w = m(T,
|
|
25948
|
+
_make(T, A2) {
|
|
25949
|
+
const w = m(T, A2);
|
|
25950
25950
|
return w.prevObject = this, w;
|
|
25951
25951
|
}
|
|
25952
|
-
_parse(T,
|
|
25953
|
-
return e(T,
|
|
25952
|
+
_parse(T, A2, w, v) {
|
|
25953
|
+
return e(T, A2, w, v);
|
|
25954
25954
|
}
|
|
25955
25955
|
_render(T) {
|
|
25956
25956
|
return t(T, this.options);
|
|
25957
25957
|
}
|
|
25958
25958
|
}
|
|
25959
|
-
function m(f, T,
|
|
25959
|
+
function m(f, T, A2 = c, w) {
|
|
25960
25960
|
if (f && de(f))
|
|
25961
25961
|
return f;
|
|
25962
|
-
const v = Kt(w, n), S = typeof
|
|
25962
|
+
const v = Kt(w, n), S = typeof A2 == "string" ? [e(A2, v, false, null)] : "length" in A2 ? A2 : [A2], U2 = de(S) ? S : new h(S, null, v);
|
|
25963
25963
|
if (U2._root = U2, !f)
|
|
25964
25964
|
return new h(void 0, U2, v);
|
|
25965
|
-
const M = typeof f == "string" && Xt
|
|
25965
|
+
const M = typeof f == "string" && Xt(f) ? (
|
|
25966
25966
|
// $(<html>)
|
|
25967
25967
|
e(f, v, false, null).children
|
|
25968
25968
|
) : Po(f) ? (
|
|
@@ -25971,20 +25971,20 @@ function ko(e, t) {
|
|
|
25971
25971
|
) : Array.isArray(f) ? (
|
|
25972
25972
|
// $([dom])
|
|
25973
25973
|
f
|
|
25974
|
-
) : void 0,
|
|
25974
|
+
) : void 0, ee2 = new h(M, U2, v);
|
|
25975
25975
|
if (M)
|
|
25976
|
-
return
|
|
25976
|
+
return ee2;
|
|
25977
25977
|
if (typeof f != "string")
|
|
25978
25978
|
throw new TypeError("Unexpected type of selector");
|
|
25979
|
-
let
|
|
25979
|
+
let he2 = f;
|
|
25980
25980
|
const ae = T ? (
|
|
25981
25981
|
// If we don't have a context, maybe we have a root, from loading
|
|
25982
|
-
typeof T == "string" ? Xt
|
|
25982
|
+
typeof T == "string" ? Xt(T) ? (
|
|
25983
25983
|
// $('li', '<ul>...</ul>')
|
|
25984
25984
|
new h([e(T, v, false, null)], U2, v)
|
|
25985
25985
|
) : (
|
|
25986
25986
|
// $('li', 'ul')
|
|
25987
|
-
(
|
|
25987
|
+
(he2 = `${T} ${he2}`, U2)
|
|
25988
25988
|
) : de(T) ? (
|
|
25989
25989
|
// $('li', $)
|
|
25990
25990
|
T
|
|
@@ -25993,7 +25993,7 @@ function ko(e, t) {
|
|
|
25993
25993
|
new h(Array.isArray(T) ? T : [T], U2, v)
|
|
25994
25994
|
)
|
|
25995
25995
|
) : U2;
|
|
25996
|
-
return ae ? ae.find(
|
|
25996
|
+
return ae ? ae.find(he2) : ee2;
|
|
25997
25997
|
}
|
|
25998
25998
|
return Object.assign(m, ni, {
|
|
25999
25999
|
load: u,
|
|
@@ -26705,7 +26705,7 @@ var d;
|
|
|
26705
26705
|
(function(e) {
|
|
26706
26706
|
e[e.DATA = 0] = "DATA", e[e.RCDATA = 1] = "RCDATA", e[e.RAWTEXT = 2] = "RAWTEXT", e[e.SCRIPT_DATA = 3] = "SCRIPT_DATA", e[e.PLAINTEXT = 4] = "PLAINTEXT", e[e.TAG_OPEN = 5] = "TAG_OPEN", e[e.END_TAG_OPEN = 6] = "END_TAG_OPEN", e[e.TAG_NAME = 7] = "TAG_NAME", e[e.RCDATA_LESS_THAN_SIGN = 8] = "RCDATA_LESS_THAN_SIGN", e[e.RCDATA_END_TAG_OPEN = 9] = "RCDATA_END_TAG_OPEN", e[e.RCDATA_END_TAG_NAME = 10] = "RCDATA_END_TAG_NAME", e[e.RAWTEXT_LESS_THAN_SIGN = 11] = "RAWTEXT_LESS_THAN_SIGN", e[e.RAWTEXT_END_TAG_OPEN = 12] = "RAWTEXT_END_TAG_OPEN", e[e.RAWTEXT_END_TAG_NAME = 13] = "RAWTEXT_END_TAG_NAME", e[e.SCRIPT_DATA_LESS_THAN_SIGN = 14] = "SCRIPT_DATA_LESS_THAN_SIGN", e[e.SCRIPT_DATA_END_TAG_OPEN = 15] = "SCRIPT_DATA_END_TAG_OPEN", e[e.SCRIPT_DATA_END_TAG_NAME = 16] = "SCRIPT_DATA_END_TAG_NAME", e[e.SCRIPT_DATA_ESCAPE_START = 17] = "SCRIPT_DATA_ESCAPE_START", e[e.SCRIPT_DATA_ESCAPE_START_DASH = 18] = "SCRIPT_DATA_ESCAPE_START_DASH", e[e.SCRIPT_DATA_ESCAPED = 19] = "SCRIPT_DATA_ESCAPED", e[e.SCRIPT_DATA_ESCAPED_DASH = 20] = "SCRIPT_DATA_ESCAPED_DASH", e[e.SCRIPT_DATA_ESCAPED_DASH_DASH = 21] = "SCRIPT_DATA_ESCAPED_DASH_DASH", e[e.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN = 22] = "SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN", e[e.SCRIPT_DATA_ESCAPED_END_TAG_OPEN = 23] = "SCRIPT_DATA_ESCAPED_END_TAG_OPEN", e[e.SCRIPT_DATA_ESCAPED_END_TAG_NAME = 24] = "SCRIPT_DATA_ESCAPED_END_TAG_NAME", e[e.SCRIPT_DATA_DOUBLE_ESCAPE_START = 25] = "SCRIPT_DATA_DOUBLE_ESCAPE_START", e[e.SCRIPT_DATA_DOUBLE_ESCAPED = 26] = "SCRIPT_DATA_DOUBLE_ESCAPED", e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH = 27] = "SCRIPT_DATA_DOUBLE_ESCAPED_DASH", e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH = 28] = "SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH", e[e.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN = 29] = "SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN", e[e.SCRIPT_DATA_DOUBLE_ESCAPE_END = 30] = "SCRIPT_DATA_DOUBLE_ESCAPE_END", e[e.BEFORE_ATTRIBUTE_NAME = 31] = "BEFORE_ATTRIBUTE_NAME", e[e.ATTRIBUTE_NAME = 32] = "ATTRIBUTE_NAME", e[e.AFTER_ATTRIBUTE_NAME = 33] = "AFTER_ATTRIBUTE_NAME", e[e.BEFORE_ATTRIBUTE_VALUE = 34] = "BEFORE_ATTRIBUTE_VALUE", e[e.ATTRIBUTE_VALUE_DOUBLE_QUOTED = 35] = "ATTRIBUTE_VALUE_DOUBLE_QUOTED", e[e.ATTRIBUTE_VALUE_SINGLE_QUOTED = 36] = "ATTRIBUTE_VALUE_SINGLE_QUOTED", e[e.ATTRIBUTE_VALUE_UNQUOTED = 37] = "ATTRIBUTE_VALUE_UNQUOTED", e[e.AFTER_ATTRIBUTE_VALUE_QUOTED = 38] = "AFTER_ATTRIBUTE_VALUE_QUOTED", e[e.SELF_CLOSING_START_TAG = 39] = "SELF_CLOSING_START_TAG", e[e.BOGUS_COMMENT = 40] = "BOGUS_COMMENT", e[e.MARKUP_DECLARATION_OPEN = 41] = "MARKUP_DECLARATION_OPEN", e[e.COMMENT_START = 42] = "COMMENT_START", e[e.COMMENT_START_DASH = 43] = "COMMENT_START_DASH", e[e.COMMENT = 44] = "COMMENT", e[e.COMMENT_LESS_THAN_SIGN = 45] = "COMMENT_LESS_THAN_SIGN", e[e.COMMENT_LESS_THAN_SIGN_BANG = 46] = "COMMENT_LESS_THAN_SIGN_BANG", e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH = 47] = "COMMENT_LESS_THAN_SIGN_BANG_DASH", e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH = 48] = "COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH", e[e.COMMENT_END_DASH = 49] = "COMMENT_END_DASH", e[e.COMMENT_END = 50] = "COMMENT_END", e[e.COMMENT_END_BANG = 51] = "COMMENT_END_BANG", e[e.DOCTYPE = 52] = "DOCTYPE", e[e.BEFORE_DOCTYPE_NAME = 53] = "BEFORE_DOCTYPE_NAME", e[e.DOCTYPE_NAME = 54] = "DOCTYPE_NAME", e[e.AFTER_DOCTYPE_NAME = 55] = "AFTER_DOCTYPE_NAME", e[e.AFTER_DOCTYPE_PUBLIC_KEYWORD = 56] = "AFTER_DOCTYPE_PUBLIC_KEYWORD", e[e.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER = 57] = "BEFORE_DOCTYPE_PUBLIC_IDENTIFIER", e[e.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED = 58] = "DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED", e[e.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED = 59] = "DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED", e[e.AFTER_DOCTYPE_PUBLIC_IDENTIFIER = 60] = "AFTER_DOCTYPE_PUBLIC_IDENTIFIER", e[e.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS = 61] = "BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS", e[e.AFTER_DOCTYPE_SYSTEM_KEYWORD = 62] = "AFTER_DOCTYPE_SYSTEM_KEYWORD", e[e.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER = 63] = "BEFORE_DOCTYPE_SYSTEM_IDENTIFIER", e[e.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED = 64] = "DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED", e[e.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED = 65] = "DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED", e[e.AFTER_DOCTYPE_SYSTEM_IDENTIFIER = 66] = "AFTER_DOCTYPE_SYSTEM_IDENTIFIER", e[e.BOGUS_DOCTYPE = 67] = "BOGUS_DOCTYPE", e[e.CDATA_SECTION = 68] = "CDATA_SECTION", e[e.CDATA_SECTION_BRACKET = 69] = "CDATA_SECTION_BRACKET", e[e.CDATA_SECTION_END = 70] = "CDATA_SECTION_END", e[e.CHARACTER_REFERENCE = 71] = "CHARACTER_REFERENCE", e[e.AMBIGUOUS_AMPERSAND = 72] = "AMBIGUOUS_AMPERSAND";
|
|
26707
26707
|
})(d || (d = {}));
|
|
26708
|
-
const K = {
|
|
26708
|
+
const K$1 = {
|
|
26709
26709
|
DATA: d.DATA,
|
|
26710
26710
|
RCDATA: d.RCDATA,
|
|
26711
26711
|
RAWTEXT: d.RAWTEXT,
|
|
@@ -26716,19 +26716,19 @@ const K = {
|
|
|
26716
26716
|
function ec(e) {
|
|
26717
26717
|
return e >= o.DIGIT_0 && e <= o.DIGIT_9;
|
|
26718
26718
|
}
|
|
26719
|
-
function He(e) {
|
|
26719
|
+
function He$1(e) {
|
|
26720
26720
|
return e >= o.LATIN_CAPITAL_A && e <= o.LATIN_CAPITAL_Z;
|
|
26721
26721
|
}
|
|
26722
26722
|
function tc(e) {
|
|
26723
26723
|
return e >= o.LATIN_SMALL_A && e <= o.LATIN_SMALL_Z;
|
|
26724
26724
|
}
|
|
26725
26725
|
function me(e) {
|
|
26726
|
-
return tc(e) || He(e);
|
|
26726
|
+
return tc(e) || He$1(e);
|
|
26727
26727
|
}
|
|
26728
26728
|
function ur(e) {
|
|
26729
26729
|
return me(e) || ec(e);
|
|
26730
26730
|
}
|
|
26731
|
-
function nt(e) {
|
|
26731
|
+
function nt$1(e) {
|
|
26732
26732
|
return e + 32;
|
|
26733
26733
|
}
|
|
26734
26734
|
function cs(e) {
|
|
@@ -27435,7 +27435,7 @@ class rc {
|
|
|
27435
27435
|
break;
|
|
27436
27436
|
}
|
|
27437
27437
|
default:
|
|
27438
|
-
u.tagName += String.fromCodePoint(He(t) ? nt(t) : t);
|
|
27438
|
+
u.tagName += String.fromCodePoint(He$1(t) ? nt$1(t) : t);
|
|
27439
27439
|
}
|
|
27440
27440
|
}
|
|
27441
27441
|
// RCDATA less-than sign state
|
|
@@ -27767,7 +27767,7 @@ class rc {
|
|
|
27767
27767
|
break;
|
|
27768
27768
|
}
|
|
27769
27769
|
default:
|
|
27770
|
-
this.currentAttr.name += String.fromCodePoint(He(t) ? nt(t) : t);
|
|
27770
|
+
this.currentAttr.name += String.fromCodePoint(He$1(t) ? nt$1(t) : t);
|
|
27771
27771
|
}
|
|
27772
27772
|
}
|
|
27773
27773
|
// After attribute name state
|
|
@@ -28168,8 +28168,8 @@ class rc {
|
|
|
28168
28168
|
// Before DOCTYPE name state
|
|
28169
28169
|
//------------------------------------------------------------------
|
|
28170
28170
|
_stateBeforeDoctypeName(t) {
|
|
28171
|
-
if (He(t))
|
|
28172
|
-
this._createDoctypeToken(String.fromCharCode(nt(t))), this.state = d.DOCTYPE_NAME;
|
|
28171
|
+
if (He$1(t))
|
|
28172
|
+
this._createDoctypeToken(String.fromCharCode(nt$1(t))), this.state = d.DOCTYPE_NAME;
|
|
28173
28173
|
else
|
|
28174
28174
|
switch (t) {
|
|
28175
28175
|
case o.SPACE:
|
|
@@ -28222,7 +28222,7 @@ class rc {
|
|
|
28222
28222
|
break;
|
|
28223
28223
|
}
|
|
28224
28224
|
default:
|
|
28225
|
-
u.name += String.fromCodePoint(He(t) ? nt(t) : t);
|
|
28225
|
+
u.name += String.fromCodePoint(He$1(t) ? nt$1(t) : t);
|
|
28226
28226
|
}
|
|
28227
28227
|
}
|
|
28228
28228
|
// After DOCTYPE name state
|
|
@@ -28640,7 +28640,7 @@ const ds = /* @__PURE__ */ new Set([s.DD, s.DT, s.LI, s.OPTGROUP, s.OPTION, s.P,
|
|
|
28640
28640
|
s.TH,
|
|
28641
28641
|
s.THEAD,
|
|
28642
28642
|
s.TR
|
|
28643
|
-
]), Tt
|
|
28643
|
+
]), Tt = /* @__PURE__ */ new Set([
|
|
28644
28644
|
s.APPLET,
|
|
28645
28645
|
s.CAPTION,
|
|
28646
28646
|
s.HTML,
|
|
@@ -28650,7 +28650,7 @@ const ds = /* @__PURE__ */ new Set([s.DD, s.DT, s.LI, s.OPTGROUP, s.OPTION, s.P,
|
|
|
28650
28650
|
s.TD,
|
|
28651
28651
|
s.TEMPLATE,
|
|
28652
28652
|
s.TH
|
|
28653
|
-
]), sc = /* @__PURE__ */ new Set([...Tt
|
|
28653
|
+
]), sc = /* @__PURE__ */ new Set([...Tt, s.OL, s.UL]), ac = /* @__PURE__ */ new Set([...Tt, s.BUTTON]), ar = /* @__PURE__ */ new Set([s.ANNOTATION_XML, s.MI, s.MN, s.MO, s.MS, s.MTEXT]), ir = /* @__PURE__ */ new Set([s.DESC, s.FOREIGN_OBJECT, s.TITLE]), ic = /* @__PURE__ */ new Set([s.TR, s.TEMPLATE, s.HTML]), nc = /* @__PURE__ */ new Set([s.TBODY, s.TFOOT, s.THEAD, s.TEMPLATE, s.HTML]), oc = /* @__PURE__ */ new Set([s.TABLE, s.TEMPLATE, s.HTML]), cc = /* @__PURE__ */ new Set([s.TD, s.TH]);
|
|
28654
28654
|
class dc {
|
|
28655
28655
|
get currentTmplContentOrNode() {
|
|
28656
28656
|
return this._isInTemplate() ? this.treeAdapter.getTemplateContent(this.current) : this.current;
|
|
@@ -28779,7 +28779,7 @@ class dc {
|
|
|
28779
28779
|
return true;
|
|
28780
28780
|
}
|
|
28781
28781
|
hasInScope(t) {
|
|
28782
|
-
return this.hasInDynamicScope(t, Tt
|
|
28782
|
+
return this.hasInDynamicScope(t, Tt);
|
|
28783
28783
|
}
|
|
28784
28784
|
hasInListItemScope(t) {
|
|
28785
28785
|
return this.hasInDynamicScope(t, sc);
|
|
@@ -28794,7 +28794,7 @@ class dc {
|
|
|
28794
28794
|
case E.HTML: {
|
|
28795
28795
|
if (au.has(u))
|
|
28796
28796
|
return true;
|
|
28797
|
-
if (Tt
|
|
28797
|
+
if (Tt.has(u))
|
|
28798
28798
|
return false;
|
|
28799
28799
|
break;
|
|
28800
28800
|
}
|
|
@@ -28867,11 +28867,11 @@ class dc {
|
|
|
28867
28867
|
}
|
|
28868
28868
|
}
|
|
28869
28869
|
const Gt = 3;
|
|
28870
|
-
var te;
|
|
28870
|
+
var te$1;
|
|
28871
28871
|
(function(e) {
|
|
28872
28872
|
e[e.Marker = 0] = "Marker", e[e.Element = 1] = "Element";
|
|
28873
|
-
})(te || (te = {}));
|
|
28874
|
-
const nr = { type: te.Marker };
|
|
28873
|
+
})(te$1 || (te$1 = {}));
|
|
28874
|
+
const nr = { type: te$1.Marker };
|
|
28875
28875
|
class hc {
|
|
28876
28876
|
constructor(t) {
|
|
28877
28877
|
this.treeAdapter = t, this.entries = [], this.bookmark = null;
|
|
@@ -28883,7 +28883,7 @@ class hc {
|
|
|
28883
28883
|
const r = [], a = u.length, i = this.treeAdapter.getTagName(t), n = this.treeAdapter.getNamespaceURI(t);
|
|
28884
28884
|
for (let c = 0; c < this.entries.length; c++) {
|
|
28885
28885
|
const h = this.entries[c];
|
|
28886
|
-
if (h.type === te.Marker)
|
|
28886
|
+
if (h.type === te$1.Marker)
|
|
28887
28887
|
break;
|
|
28888
28888
|
const { element: m } = h;
|
|
28889
28889
|
if (this.treeAdapter.getTagName(m) === i && this.treeAdapter.getNamespaceURI(m) === n) {
|
|
@@ -28912,7 +28912,7 @@ class hc {
|
|
|
28912
28912
|
}
|
|
28913
28913
|
pushElement(t, u) {
|
|
28914
28914
|
this._ensureNoahArkCondition(t), this.entries.unshift({
|
|
28915
|
-
type: te.Element,
|
|
28915
|
+
type: te$1.Element,
|
|
28916
28916
|
element: t,
|
|
28917
28917
|
token: u
|
|
28918
28918
|
});
|
|
@@ -28920,7 +28920,7 @@ class hc {
|
|
|
28920
28920
|
insertElementAfterBookmark(t, u) {
|
|
28921
28921
|
const r = this.entries.indexOf(this.bookmark);
|
|
28922
28922
|
this.entries.splice(r, 0, {
|
|
28923
|
-
type: te.Element,
|
|
28923
|
+
type: te$1.Element,
|
|
28924
28924
|
element: t,
|
|
28925
28925
|
token: u
|
|
28926
28926
|
});
|
|
@@ -28940,11 +28940,11 @@ class hc {
|
|
|
28940
28940
|
}
|
|
28941
28941
|
//Search
|
|
28942
28942
|
getElementEntryInScopeWithTagName(t) {
|
|
28943
|
-
const u = this.entries.find((r) => r.type === te.Marker || this.treeAdapter.getTagName(r.element) === t);
|
|
28944
|
-
return u && u.type === te.Element ? u : null;
|
|
28943
|
+
const u = this.entries.find((r) => r.type === te$1.Marker || this.treeAdapter.getTagName(r.element) === t);
|
|
28944
|
+
return u && u.type === te$1.Element ? u : null;
|
|
28945
28945
|
}
|
|
28946
28946
|
getElementEntry(t) {
|
|
28947
|
-
return this.entries.find((u) => u.type === te.Element && u.element === t);
|
|
28947
|
+
return this.entries.find((u) => u.type === te$1.Element && u.element === t);
|
|
28948
28948
|
}
|
|
28949
28949
|
}
|
|
28950
28950
|
const oe = {
|
|
@@ -29480,7 +29480,7 @@ class Es {
|
|
|
29480
29480
|
this._insertElement(t, E.HTML), this.tokenizer.state = u, this.originalInsertionMode = this.insertionMode, this.insertionMode = l.TEXT;
|
|
29481
29481
|
}
|
|
29482
29482
|
switchToPlaintextParsing() {
|
|
29483
|
-
this.insertionMode = l.TEXT, this.originalInsertionMode = l.IN_BODY, this.tokenizer.state = K.PLAINTEXT;
|
|
29483
|
+
this.insertionMode = l.TEXT, this.originalInsertionMode = l.IN_BODY, this.tokenizer.state = K$1.PLAINTEXT;
|
|
29484
29484
|
}
|
|
29485
29485
|
//Fragment parsing
|
|
29486
29486
|
/** @protected */
|
|
@@ -29503,7 +29503,7 @@ class Es {
|
|
|
29503
29503
|
switch (this.fragmentContextID) {
|
|
29504
29504
|
case s.TITLE:
|
|
29505
29505
|
case s.TEXTAREA: {
|
|
29506
|
-
this.tokenizer.state = K.RCDATA;
|
|
29506
|
+
this.tokenizer.state = K$1.RCDATA;
|
|
29507
29507
|
break;
|
|
29508
29508
|
}
|
|
29509
29509
|
case s.STYLE:
|
|
@@ -29512,15 +29512,15 @@ class Es {
|
|
|
29512
29512
|
case s.NOEMBED:
|
|
29513
29513
|
case s.NOFRAMES:
|
|
29514
29514
|
case s.NOSCRIPT: {
|
|
29515
|
-
this.tokenizer.state = K.RAWTEXT;
|
|
29515
|
+
this.tokenizer.state = K$1.RAWTEXT;
|
|
29516
29516
|
break;
|
|
29517
29517
|
}
|
|
29518
29518
|
case s.SCRIPT: {
|
|
29519
|
-
this.tokenizer.state = K.SCRIPT_DATA;
|
|
29519
|
+
this.tokenizer.state = K$1.SCRIPT_DATA;
|
|
29520
29520
|
break;
|
|
29521
29521
|
}
|
|
29522
29522
|
case s.PLAINTEXT: {
|
|
29523
|
-
this.tokenizer.state = K.PLAINTEXT;
|
|
29523
|
+
this.tokenizer.state = K$1.PLAINTEXT;
|
|
29524
29524
|
break;
|
|
29525
29525
|
}
|
|
29526
29526
|
}
|
|
@@ -29680,7 +29680,7 @@ class Es {
|
|
|
29680
29680
|
_reconstructActiveFormattingElements() {
|
|
29681
29681
|
const t = this.activeFormattingElements.entries.length;
|
|
29682
29682
|
if (t) {
|
|
29683
|
-
const u = this.activeFormattingElements.entries.findIndex((a) => a.type === te.Marker || this.openElements.contains(a.element)), r = u === -1 ? t - 1 : u - 1;
|
|
29683
|
+
const u = this.activeFormattingElements.entries.findIndex((a) => a.type === te$1.Marker || this.openElements.contains(a.element)), r = u === -1 ? t - 1 : u - 1;
|
|
29684
29684
|
for (let a = r; a >= 0; a--) {
|
|
29685
29685
|
const i = this.activeFormattingElements.entries[a];
|
|
29686
29686
|
this._insertElement(i.token, this.treeAdapter.getNamespaceURI(i.element)), i.element = this.openElements.current;
|
|
@@ -29821,15 +29821,15 @@ class Es {
|
|
|
29821
29821
|
}
|
|
29822
29822
|
switch (this.insertionMode) {
|
|
29823
29823
|
case l.INITIAL: {
|
|
29824
|
-
Ue(this, t);
|
|
29824
|
+
Ue$1(this, t);
|
|
29825
29825
|
break;
|
|
29826
29826
|
}
|
|
29827
29827
|
case l.BEFORE_HTML: {
|
|
29828
|
-
Ye(this, t);
|
|
29828
|
+
Ye$1(this, t);
|
|
29829
29829
|
break;
|
|
29830
29830
|
}
|
|
29831
29831
|
case l.BEFORE_HEAD: {
|
|
29832
|
-
je(this, t);
|
|
29832
|
+
je$1(this, t);
|
|
29833
29833
|
break;
|
|
29834
29834
|
}
|
|
29835
29835
|
case l.IN_HEAD: {
|
|
@@ -29868,7 +29868,7 @@ class Es {
|
|
|
29868
29868
|
break;
|
|
29869
29869
|
}
|
|
29870
29870
|
case l.IN_COLUMN_GROUP: {
|
|
29871
|
-
_t
|
|
29871
|
+
_t(this, t);
|
|
29872
29872
|
break;
|
|
29873
29873
|
}
|
|
29874
29874
|
case l.AFTER_BODY: {
|
|
@@ -29889,15 +29889,15 @@ class Es {
|
|
|
29889
29889
|
}
|
|
29890
29890
|
switch (this.insertionMode) {
|
|
29891
29891
|
case l.INITIAL: {
|
|
29892
|
-
Ue(this, t);
|
|
29892
|
+
Ue$1(this, t);
|
|
29893
29893
|
break;
|
|
29894
29894
|
}
|
|
29895
29895
|
case l.BEFORE_HTML: {
|
|
29896
|
-
Ye(this, t);
|
|
29896
|
+
Ye$1(this, t);
|
|
29897
29897
|
break;
|
|
29898
29898
|
}
|
|
29899
29899
|
case l.BEFORE_HEAD: {
|
|
29900
|
-
je(this, t);
|
|
29900
|
+
je$1(this, t);
|
|
29901
29901
|
break;
|
|
29902
29902
|
}
|
|
29903
29903
|
case l.IN_HEAD: {
|
|
@@ -29923,7 +29923,7 @@ class Es {
|
|
|
29923
29923
|
break;
|
|
29924
29924
|
}
|
|
29925
29925
|
case l.IN_COLUMN_GROUP: {
|
|
29926
|
-
_t
|
|
29926
|
+
_t(this, t);
|
|
29927
29927
|
break;
|
|
29928
29928
|
}
|
|
29929
29929
|
case l.AFTER_BODY: {
|
|
@@ -29965,7 +29965,7 @@ class Es {
|
|
|
29965
29965
|
break;
|
|
29966
29966
|
}
|
|
29967
29967
|
case l.IN_TABLE_TEXT: {
|
|
29968
|
-
Fe(this, t);
|
|
29968
|
+
Fe$1(this, t);
|
|
29969
29969
|
break;
|
|
29970
29970
|
}
|
|
29971
29971
|
case l.AFTER_BODY: {
|
|
@@ -29994,7 +29994,7 @@ class Es {
|
|
|
29994
29994
|
break;
|
|
29995
29995
|
}
|
|
29996
29996
|
case l.IN_TABLE_TEXT: {
|
|
29997
|
-
Fe(this, t);
|
|
29997
|
+
Fe$1(this, t);
|
|
29998
29998
|
break;
|
|
29999
29999
|
}
|
|
30000
30000
|
}
|
|
@@ -30021,7 +30021,7 @@ class Es {
|
|
|
30021
30021
|
_startTagOutsideForeignContent(t) {
|
|
30022
30022
|
switch (this.insertionMode) {
|
|
30023
30023
|
case l.INITIAL: {
|
|
30024
|
-
Ue(this, t);
|
|
30024
|
+
Ue$1(this, t);
|
|
30025
30025
|
break;
|
|
30026
30026
|
}
|
|
30027
30027
|
case l.BEFORE_HTML: {
|
|
@@ -30033,7 +30033,7 @@ class Es {
|
|
|
30033
30033
|
break;
|
|
30034
30034
|
}
|
|
30035
30035
|
case l.IN_HEAD: {
|
|
30036
|
-
J(this, t);
|
|
30036
|
+
J$1(this, t);
|
|
30037
30037
|
break;
|
|
30038
30038
|
}
|
|
30039
30039
|
case l.IN_HEAD_NO_SCRIPT: {
|
|
@@ -30049,11 +30049,11 @@ class Es {
|
|
|
30049
30049
|
break;
|
|
30050
30050
|
}
|
|
30051
30051
|
case l.IN_TABLE: {
|
|
30052
|
-
Re(this, t);
|
|
30052
|
+
Re$1(this, t);
|
|
30053
30053
|
break;
|
|
30054
30054
|
}
|
|
30055
30055
|
case l.IN_TABLE_TEXT: {
|
|
30056
|
-
Fe(this, t);
|
|
30056
|
+
Fe$1(this, t);
|
|
30057
30057
|
break;
|
|
30058
30058
|
}
|
|
30059
30059
|
case l.IN_CAPTION: {
|
|
@@ -30065,7 +30065,7 @@ class Es {
|
|
|
30065
30065
|
break;
|
|
30066
30066
|
}
|
|
30067
30067
|
case l.IN_TABLE_BODY: {
|
|
30068
|
-
Rt
|
|
30068
|
+
Rt(this, t);
|
|
30069
30069
|
break;
|
|
30070
30070
|
}
|
|
30071
30071
|
case l.IN_ROW: {
|
|
@@ -30118,7 +30118,7 @@ class Es {
|
|
|
30118
30118
|
_endTagOutsideForeignContent(t) {
|
|
30119
30119
|
switch (this.insertionMode) {
|
|
30120
30120
|
case l.INITIAL: {
|
|
30121
|
-
Ue(this, t);
|
|
30121
|
+
Ue$1(this, t);
|
|
30122
30122
|
break;
|
|
30123
30123
|
}
|
|
30124
30124
|
case l.BEFORE_HTML: {
|
|
@@ -30142,7 +30142,7 @@ class Es {
|
|
|
30142
30142
|
break;
|
|
30143
30143
|
}
|
|
30144
30144
|
case l.IN_BODY: {
|
|
30145
|
-
Lt
|
|
30145
|
+
Lt(this, t);
|
|
30146
30146
|
break;
|
|
30147
30147
|
}
|
|
30148
30148
|
case l.TEXT: {
|
|
@@ -30154,7 +30154,7 @@ class Es {
|
|
|
30154
30154
|
break;
|
|
30155
30155
|
}
|
|
30156
30156
|
case l.IN_TABLE_TEXT: {
|
|
30157
|
-
Fe(this, t);
|
|
30157
|
+
Fe$1(this, t);
|
|
30158
30158
|
break;
|
|
30159
30159
|
}
|
|
30160
30160
|
case l.IN_CAPTION: {
|
|
@@ -30211,15 +30211,15 @@ class Es {
|
|
|
30211
30211
|
onEof(t) {
|
|
30212
30212
|
switch (this.insertionMode) {
|
|
30213
30213
|
case l.INITIAL: {
|
|
30214
|
-
Ue(this, t);
|
|
30214
|
+
Ue$1(this, t);
|
|
30215
30215
|
break;
|
|
30216
30216
|
}
|
|
30217
30217
|
case l.BEFORE_HTML: {
|
|
30218
|
-
Ye(this, t);
|
|
30218
|
+
Ye$1(this, t);
|
|
30219
30219
|
break;
|
|
30220
30220
|
}
|
|
30221
30221
|
case l.BEFORE_HEAD: {
|
|
30222
|
-
je(this, t);
|
|
30222
|
+
je$1(this, t);
|
|
30223
30223
|
break;
|
|
30224
30224
|
}
|
|
30225
30225
|
case l.IN_HEAD: {
|
|
@@ -30251,7 +30251,7 @@ class Es {
|
|
|
30251
30251
|
break;
|
|
30252
30252
|
}
|
|
30253
30253
|
case l.IN_TABLE_TEXT: {
|
|
30254
|
-
Fe(this, t);
|
|
30254
|
+
Fe$1(this, t);
|
|
30255
30255
|
break;
|
|
30256
30256
|
}
|
|
30257
30257
|
case l.IN_TEMPLATE: {
|
|
@@ -30396,17 +30396,17 @@ function Yc(e, t) {
|
|
|
30396
30396
|
const u = t.forceQuirks ? X$1.QUIRKS : Tc(t);
|
|
30397
30397
|
Ec(t) || e._err(t, b.nonConformingDoctype), e.treeAdapter.setDocumentMode(e.document, u), e.insertionMode = l.BEFORE_HTML;
|
|
30398
30398
|
}
|
|
30399
|
-
function Ue(e, t) {
|
|
30399
|
+
function Ue$1(e, t) {
|
|
30400
30400
|
e._err(t, b.missingDoctype, true), e.treeAdapter.setDocumentMode(e.document, X$1.QUIRKS), e.insertionMode = l.BEFORE_HTML, e._processToken(t);
|
|
30401
30401
|
}
|
|
30402
30402
|
function jc(e, t) {
|
|
30403
|
-
t.tagID === s.HTML ? (e._insertElement(t, E.HTML), e.insertionMode = l.BEFORE_HEAD) : Ye(e, t);
|
|
30403
|
+
t.tagID === s.HTML ? (e._insertElement(t, E.HTML), e.insertionMode = l.BEFORE_HEAD) : Ye$1(e, t);
|
|
30404
30404
|
}
|
|
30405
30405
|
function Vc(e, t) {
|
|
30406
30406
|
const u = t.tagID;
|
|
30407
|
-
(u === s.HTML || u === s.HEAD || u === s.BODY || u === s.BR) && Ye(e, t);
|
|
30407
|
+
(u === s.HTML || u === s.HEAD || u === s.BODY || u === s.BR) && Ye$1(e, t);
|
|
30408
30408
|
}
|
|
30409
|
-
function Ye(e, t) {
|
|
30409
|
+
function Ye$1(e, t) {
|
|
30410
30410
|
e._insertFakeRootElement(), e.insertionMode = l.BEFORE_HEAD, e._processToken(t);
|
|
30411
30411
|
}
|
|
30412
30412
|
function $c(e, t) {
|
|
@@ -30420,17 +30420,17 @@ function $c(e, t) {
|
|
|
30420
30420
|
break;
|
|
30421
30421
|
}
|
|
30422
30422
|
default:
|
|
30423
|
-
je(e, t);
|
|
30423
|
+
je$1(e, t);
|
|
30424
30424
|
}
|
|
30425
30425
|
}
|
|
30426
30426
|
function Gc(e, t) {
|
|
30427
30427
|
const u = t.tagID;
|
|
30428
|
-
u === s.HEAD || u === s.BODY || u === s.HTML || u === s.BR ? je(e, t) : e._err(t, b.endTagWithoutMatchingOpenElement);
|
|
30428
|
+
u === s.HEAD || u === s.BODY || u === s.HTML || u === s.BR ? je$1(e, t) : e._err(t, b.endTagWithoutMatchingOpenElement);
|
|
30429
30429
|
}
|
|
30430
|
-
function je(e, t) {
|
|
30430
|
+
function je$1(e, t) {
|
|
30431
30431
|
e._insertFakeElement(p.HEAD, s.HEAD), e.headElement = e.openElements.current, e.insertionMode = l.IN_HEAD, e._processToken(t);
|
|
30432
30432
|
}
|
|
30433
|
-
function J(e, t) {
|
|
30433
|
+
function J$1(e, t) {
|
|
30434
30434
|
switch (t.tagID) {
|
|
30435
30435
|
case s.HTML: {
|
|
30436
30436
|
G$1(e, t);
|
|
@@ -30445,20 +30445,20 @@ function J(e, t) {
|
|
|
30445
30445
|
break;
|
|
30446
30446
|
}
|
|
30447
30447
|
case s.TITLE: {
|
|
30448
|
-
e._switchToTextParsing(t, K.RCDATA);
|
|
30448
|
+
e._switchToTextParsing(t, K$1.RCDATA);
|
|
30449
30449
|
break;
|
|
30450
30450
|
}
|
|
30451
30451
|
case s.NOSCRIPT: {
|
|
30452
|
-
e.options.scriptingEnabled ? e._switchToTextParsing(t, K.RAWTEXT) : (e._insertElement(t, E.HTML), e.insertionMode = l.IN_HEAD_NO_SCRIPT);
|
|
30452
|
+
e.options.scriptingEnabled ? e._switchToTextParsing(t, K$1.RAWTEXT) : (e._insertElement(t, E.HTML), e.insertionMode = l.IN_HEAD_NO_SCRIPT);
|
|
30453
30453
|
break;
|
|
30454
30454
|
}
|
|
30455
30455
|
case s.NOFRAMES:
|
|
30456
30456
|
case s.STYLE: {
|
|
30457
|
-
e._switchToTextParsing(t, K.RAWTEXT);
|
|
30457
|
+
e._switchToTextParsing(t, K$1.RAWTEXT);
|
|
30458
30458
|
break;
|
|
30459
30459
|
}
|
|
30460
30460
|
case s.SCRIPT: {
|
|
30461
|
-
e._switchToTextParsing(t, K.SCRIPT_DATA);
|
|
30461
|
+
e._switchToTextParsing(t, K$1.SCRIPT_DATA);
|
|
30462
30462
|
break;
|
|
30463
30463
|
}
|
|
30464
30464
|
case s.TEMPLATE: {
|
|
@@ -30512,7 +30512,7 @@ function zc(e, t) {
|
|
|
30512
30512
|
case s.META:
|
|
30513
30513
|
case s.NOFRAMES:
|
|
30514
30514
|
case s.STYLE: {
|
|
30515
|
-
J(e, t);
|
|
30515
|
+
J$1(e, t);
|
|
30516
30516
|
break;
|
|
30517
30517
|
}
|
|
30518
30518
|
case s.NOSCRIPT: {
|
|
@@ -30565,7 +30565,7 @@ function Kc(e, t) {
|
|
|
30565
30565
|
case s.STYLE:
|
|
30566
30566
|
case s.TEMPLATE:
|
|
30567
30567
|
case s.TITLE: {
|
|
30568
|
-
e._err(t, b.abandonedHeadElementChild), e.openElements.push(e.headElement, s.HEAD), J(e, t), e.openElements.remove(e.headElement);
|
|
30568
|
+
e._err(t, b.abandonedHeadElementChild), e.openElements.push(e.headElement, s.HEAD), J$1(e, t), e.openElements.remove(e.headElement);
|
|
30569
30569
|
break;
|
|
30570
30570
|
}
|
|
30571
30571
|
case s.HEAD: {
|
|
@@ -30593,9 +30593,9 @@ function Xc(e, t) {
|
|
|
30593
30593
|
}
|
|
30594
30594
|
}
|
|
30595
30595
|
function Ge(e, t) {
|
|
30596
|
-
e._insertFakeElement(p.BODY, s.BODY), e.insertionMode = l.IN_BODY, Ot
|
|
30596
|
+
e._insertFakeElement(p.BODY, s.BODY), e.insertionMode = l.IN_BODY, Ot(e, t);
|
|
30597
30597
|
}
|
|
30598
|
-
function Ot
|
|
30598
|
+
function Ot(e, t) {
|
|
30599
30599
|
switch (t.type) {
|
|
30600
30600
|
case O.CHARACTER: {
|
|
30601
30601
|
_s(e, t);
|
|
@@ -30614,7 +30614,7 @@ function Ot$1(e, t) {
|
|
|
30614
30614
|
break;
|
|
30615
30615
|
}
|
|
30616
30616
|
case O.END_TAG: {
|
|
30617
|
-
Lt
|
|
30617
|
+
Lt(e, t);
|
|
30618
30618
|
break;
|
|
30619
30619
|
}
|
|
30620
30620
|
case O.EOF: {
|
|
@@ -30668,7 +30668,7 @@ function a0(e, t) {
|
|
|
30668
30668
|
e.openElements.hasInButtonScope(s.P) && e._closePElement(), e._insertElement(t, E.HTML);
|
|
30669
30669
|
}
|
|
30670
30670
|
function i0(e, t) {
|
|
30671
|
-
e.openElements.hasInButtonScope(s.P) && e._closePElement(), e._insertElement(t, E.HTML), e.tokenizer.state = K.PLAINTEXT;
|
|
30671
|
+
e.openElements.hasInButtonScope(s.P) && e._closePElement(), e._insertElement(t, E.HTML), e.tokenizer.state = K$1.PLAINTEXT;
|
|
30672
30672
|
}
|
|
30673
30673
|
function n0(e, t) {
|
|
30674
30674
|
e.openElements.hasInScope(s.BUTTON) && (e.openElements.generateImpliedEndTags(), e.openElements.popUntilTagNamePopped(s.BUTTON)), e._reconstructActiveFormattingElements(), e._insertElement(t, E.HTML), e.framesetOk = false;
|
|
@@ -30709,16 +30709,16 @@ function b0(e, t) {
|
|
|
30709
30709
|
t.tagName = p.IMG, t.tagID = s.IMG, gs(e, t);
|
|
30710
30710
|
}
|
|
30711
30711
|
function E0(e, t) {
|
|
30712
|
-
e._insertElement(t, E.HTML), e.skipNextNewLine = true, e.tokenizer.state = K.RCDATA, e.originalInsertionMode = e.insertionMode, e.framesetOk = false, e.insertionMode = l.TEXT;
|
|
30712
|
+
e._insertElement(t, E.HTML), e.skipNextNewLine = true, e.tokenizer.state = K$1.RCDATA, e.originalInsertionMode = e.insertionMode, e.framesetOk = false, e.insertionMode = l.TEXT;
|
|
30713
30713
|
}
|
|
30714
30714
|
function T0(e, t) {
|
|
30715
|
-
e.openElements.hasInButtonScope(s.P) && e._closePElement(), e._reconstructActiveFormattingElements(), e.framesetOk = false, e._switchToTextParsing(t, K.RAWTEXT);
|
|
30715
|
+
e.openElements.hasInButtonScope(s.P) && e._closePElement(), e._reconstructActiveFormattingElements(), e.framesetOk = false, e._switchToTextParsing(t, K$1.RAWTEXT);
|
|
30716
30716
|
}
|
|
30717
30717
|
function _0(e, t) {
|
|
30718
|
-
e.framesetOk = false, e._switchToTextParsing(t, K.RAWTEXT);
|
|
30718
|
+
e.framesetOk = false, e._switchToTextParsing(t, K$1.RAWTEXT);
|
|
30719
30719
|
}
|
|
30720
30720
|
function hr(e, t) {
|
|
30721
|
-
e._switchToTextParsing(t, K.RAWTEXT);
|
|
30721
|
+
e._switchToTextParsing(t, K$1.RAWTEXT);
|
|
30722
30722
|
}
|
|
30723
30723
|
function g0(e, t) {
|
|
30724
30724
|
e._reconstructActiveFormattingElements(), e._insertElement(t, E.HTML), e.framesetOk = false, e.insertionMode = e.insertionMode === l.IN_TABLE || e.insertionMode === l.IN_CAPTION || e.insertionMode === l.IN_TABLE_BODY || e.insertionMode === l.IN_ROW || e.insertionMode === l.IN_CELL ? l.IN_SELECT_IN_TABLE : l.IN_SELECT;
|
|
@@ -30854,7 +30854,7 @@ function G$1(e, t) {
|
|
|
30854
30854
|
case s.BGSOUND:
|
|
30855
30855
|
case s.BASEFONT:
|
|
30856
30856
|
case s.TEMPLATE: {
|
|
30857
|
-
J(e, t);
|
|
30857
|
+
J$1(e, t);
|
|
30858
30858
|
break;
|
|
30859
30859
|
}
|
|
30860
30860
|
case s.BODY: {
|
|
@@ -31000,7 +31000,7 @@ function vs(e, t) {
|
|
|
31000
31000
|
break;
|
|
31001
31001
|
}
|
|
31002
31002
|
}
|
|
31003
|
-
function Lt
|
|
31003
|
+
function Lt(e, t) {
|
|
31004
31004
|
switch (t.tagID) {
|
|
31005
31005
|
case s.A:
|
|
31006
31006
|
case s.B:
|
|
@@ -31124,7 +31124,7 @@ function Wt(e, t) {
|
|
|
31124
31124
|
}
|
|
31125
31125
|
}
|
|
31126
31126
|
else
|
|
31127
|
-
rt(e, t);
|
|
31127
|
+
rt$1(e, t);
|
|
31128
31128
|
}
|
|
31129
31129
|
function U0(e, t) {
|
|
31130
31130
|
e.openElements.clearBackToTableContext(), e.activeFormattingElements.insertMarker(), e._insertElement(t, E.HTML), e.insertionMode = l.IN_CAPTION;
|
|
@@ -31139,18 +31139,18 @@ function q0(e, t) {
|
|
|
31139
31139
|
e.openElements.clearBackToTableContext(), e._insertElement(t, E.HTML), e.insertionMode = l.IN_TABLE_BODY;
|
|
31140
31140
|
}
|
|
31141
31141
|
function Y0(e, t) {
|
|
31142
|
-
e.openElements.clearBackToTableContext(), e._insertFakeElement(p.TBODY, s.TBODY), e.insertionMode = l.IN_TABLE_BODY, Rt
|
|
31142
|
+
e.openElements.clearBackToTableContext(), e._insertFakeElement(p.TBODY, s.TBODY), e.insertionMode = l.IN_TABLE_BODY, Rt(e, t);
|
|
31143
31143
|
}
|
|
31144
31144
|
function j0(e, t) {
|
|
31145
31145
|
e.openElements.hasInTableScope(s.TABLE) && (e.openElements.popUntilTagNamePopped(s.TABLE), e._resetInsertionMode(), e._processStartTag(t));
|
|
31146
31146
|
}
|
|
31147
31147
|
function V0(e, t) {
|
|
31148
|
-
As(t) ? e._appendElement(t, E.HTML) : rt(e, t), t.ackSelfClosing = true;
|
|
31148
|
+
As(t) ? e._appendElement(t, E.HTML) : rt$1(e, t), t.ackSelfClosing = true;
|
|
31149
31149
|
}
|
|
31150
31150
|
function $0(e, t) {
|
|
31151
31151
|
!e.formElement && e.openElements.tmplCount === 0 && (e._insertElement(t, E.HTML), e.formElement = e.openElements.current, e.openElements.pop());
|
|
31152
31152
|
}
|
|
31153
|
-
function Re(e, t) {
|
|
31153
|
+
function Re$1(e, t) {
|
|
31154
31154
|
switch (t.tagID) {
|
|
31155
31155
|
case s.TD:
|
|
31156
31156
|
case s.TH:
|
|
@@ -31161,7 +31161,7 @@ function Re(e, t) {
|
|
|
31161
31161
|
case s.STYLE:
|
|
31162
31162
|
case s.SCRIPT:
|
|
31163
31163
|
case s.TEMPLATE: {
|
|
31164
|
-
J(e, t);
|
|
31164
|
+
J$1(e, t);
|
|
31165
31165
|
break;
|
|
31166
31166
|
}
|
|
31167
31167
|
case s.COL: {
|
|
@@ -31195,7 +31195,7 @@ function Re(e, t) {
|
|
|
31195
31195
|
break;
|
|
31196
31196
|
}
|
|
31197
31197
|
default:
|
|
31198
|
-
rt(e, t);
|
|
31198
|
+
rt$1(e, t);
|
|
31199
31199
|
}
|
|
31200
31200
|
}
|
|
31201
31201
|
function Ze(e, t) {
|
|
@@ -31221,12 +31221,12 @@ function Ze(e, t) {
|
|
|
31221
31221
|
case s.TR:
|
|
31222
31222
|
break;
|
|
31223
31223
|
default:
|
|
31224
|
-
rt(e, t);
|
|
31224
|
+
rt$1(e, t);
|
|
31225
31225
|
}
|
|
31226
31226
|
}
|
|
31227
|
-
function rt(e, t) {
|
|
31227
|
+
function rt$1(e, t) {
|
|
31228
31228
|
const u = e.fosterParentingEnabled;
|
|
31229
|
-
e.fosterParentingEnabled = true, Ot
|
|
31229
|
+
e.fosterParentingEnabled = true, Ot(e, t), e.fosterParentingEnabled = u;
|
|
31230
31230
|
}
|
|
31231
31231
|
function Ns(e, t) {
|
|
31232
31232
|
e.pendingCharacterTokens.push(t);
|
|
@@ -31234,11 +31234,11 @@ function Ns(e, t) {
|
|
|
31234
31234
|
function xs(e, t) {
|
|
31235
31235
|
e.pendingCharacterTokens.push(t), e.hasNonWhitespacePendingCharacterToken = true;
|
|
31236
31236
|
}
|
|
31237
|
-
function Fe(e, t) {
|
|
31237
|
+
function Fe$1(e, t) {
|
|
31238
31238
|
let u = 0;
|
|
31239
31239
|
if (e.hasNonWhitespacePendingCharacterToken)
|
|
31240
31240
|
for (; u < e.pendingCharacterTokens.length; u++)
|
|
31241
|
-
rt(e, e.pendingCharacterTokens[u]);
|
|
31241
|
+
rt$1(e, e.pendingCharacterTokens[u]);
|
|
31242
31242
|
else
|
|
31243
31243
|
for (; u < e.pendingCharacterTokens.length; u++)
|
|
31244
31244
|
e._insertCharacters(e.pendingCharacterTokens[u]);
|
|
@@ -31247,7 +31247,7 @@ function Fe(e, t) {
|
|
|
31247
31247
|
const Is = /* @__PURE__ */ new Set([s.CAPTION, s.COL, s.COLGROUP, s.TBODY, s.TD, s.TFOOT, s.TH, s.THEAD, s.TR]);
|
|
31248
31248
|
function G0(e, t) {
|
|
31249
31249
|
const u = t.tagID;
|
|
31250
|
-
Is.has(u) ? e.openElements.hasInTableScope(s.CAPTION) && (e.openElements.generateImpliedEndTags(), e.openElements.popUntilTagNamePopped(s.CAPTION), e.activeFormattingElements.clearToLastMarker(), e.insertionMode = l.IN_TABLE, Re(e, t)) : G$1(e, t);
|
|
31250
|
+
Is.has(u) ? e.openElements.hasInTableScope(s.CAPTION) && (e.openElements.generateImpliedEndTags(), e.openElements.popUntilTagNamePopped(s.CAPTION), e.activeFormattingElements.clearToLastMarker(), e.insertionMode = l.IN_TABLE, Re$1(e, t)) : G$1(e, t);
|
|
31251
31251
|
}
|
|
31252
31252
|
function W0(e, t) {
|
|
31253
31253
|
const u = t.tagID;
|
|
@@ -31269,7 +31269,7 @@ function W0(e, t) {
|
|
|
31269
31269
|
case s.TR:
|
|
31270
31270
|
break;
|
|
31271
31271
|
default:
|
|
31272
|
-
Lt
|
|
31272
|
+
Lt(e, t);
|
|
31273
31273
|
}
|
|
31274
31274
|
}
|
|
31275
31275
|
function Lu(e, t) {
|
|
@@ -31283,11 +31283,11 @@ function Lu(e, t) {
|
|
|
31283
31283
|
break;
|
|
31284
31284
|
}
|
|
31285
31285
|
case s.TEMPLATE: {
|
|
31286
|
-
J(e, t);
|
|
31286
|
+
J$1(e, t);
|
|
31287
31287
|
break;
|
|
31288
31288
|
}
|
|
31289
31289
|
default:
|
|
31290
|
-
_t
|
|
31290
|
+
_t(e, t);
|
|
31291
31291
|
}
|
|
31292
31292
|
}
|
|
31293
31293
|
function z0(e, t) {
|
|
@@ -31303,13 +31303,13 @@ function z0(e, t) {
|
|
|
31303
31303
|
case s.COL:
|
|
31304
31304
|
break;
|
|
31305
31305
|
default:
|
|
31306
|
-
_t
|
|
31306
|
+
_t(e, t);
|
|
31307
31307
|
}
|
|
31308
31308
|
}
|
|
31309
|
-
function _t
|
|
31309
|
+
function _t(e, t) {
|
|
31310
31310
|
e.openElements.currentTagId === s.COLGROUP && (e.openElements.pop(), e.insertionMode = l.IN_TABLE, e._processToken(t));
|
|
31311
31311
|
}
|
|
31312
|
-
function Rt
|
|
31312
|
+
function Rt(e, t) {
|
|
31313
31313
|
switch (t.tagID) {
|
|
31314
31314
|
case s.TR: {
|
|
31315
31315
|
e.openElements.clearBackToTableBodyContext(), e._insertElement(t, E.HTML), e.insertionMode = l.IN_ROW;
|
|
@@ -31326,11 +31326,11 @@ function Rt$1(e, t) {
|
|
|
31326
31326
|
case s.TBODY:
|
|
31327
31327
|
case s.TFOOT:
|
|
31328
31328
|
case s.THEAD: {
|
|
31329
|
-
e.openElements.hasTableBodyContextInTableScope() && (e.openElements.clearBackToTableBodyContext(), e.openElements.pop(), e.insertionMode = l.IN_TABLE, Re(e, t));
|
|
31329
|
+
e.openElements.hasTableBodyContextInTableScope() && (e.openElements.clearBackToTableBodyContext(), e.openElements.pop(), e.insertionMode = l.IN_TABLE, Re$1(e, t));
|
|
31330
31330
|
break;
|
|
31331
31331
|
}
|
|
31332
31332
|
default:
|
|
31333
|
-
Re(e, t);
|
|
31333
|
+
Re$1(e, t);
|
|
31334
31334
|
}
|
|
31335
31335
|
}
|
|
31336
31336
|
function nu(e, t) {
|
|
@@ -31373,11 +31373,11 @@ function Dt(e, t) {
|
|
|
31373
31373
|
case s.TFOOT:
|
|
31374
31374
|
case s.THEAD:
|
|
31375
31375
|
case s.TR: {
|
|
31376
|
-
e.openElements.hasInTableScope(s.TR) && (e.openElements.clearBackToTableRowContext(), e.openElements.pop(), e.insertionMode = l.IN_TABLE_BODY, Rt
|
|
31376
|
+
e.openElements.hasInTableScope(s.TR) && (e.openElements.clearBackToTableRowContext(), e.openElements.pop(), e.insertionMode = l.IN_TABLE_BODY, Rt(e, t));
|
|
31377
31377
|
break;
|
|
31378
31378
|
}
|
|
31379
31379
|
default:
|
|
31380
|
-
Re(e, t);
|
|
31380
|
+
Re$1(e, t);
|
|
31381
31381
|
}
|
|
31382
31382
|
}
|
|
31383
31383
|
function Ss(e, t) {
|
|
@@ -31435,7 +31435,7 @@ function K0(e, t) {
|
|
|
31435
31435
|
case s.HTML:
|
|
31436
31436
|
break;
|
|
31437
31437
|
default:
|
|
31438
|
-
Lt
|
|
31438
|
+
Lt(e, t);
|
|
31439
31439
|
}
|
|
31440
31440
|
}
|
|
31441
31441
|
function Cs(e, t) {
|
|
@@ -31465,7 +31465,7 @@ function Cs(e, t) {
|
|
|
31465
31465
|
}
|
|
31466
31466
|
case s.SCRIPT:
|
|
31467
31467
|
case s.TEMPLATE: {
|
|
31468
|
-
J(e, t);
|
|
31468
|
+
J$1(e, t);
|
|
31469
31469
|
break;
|
|
31470
31470
|
}
|
|
31471
31471
|
}
|
|
@@ -31511,7 +31511,7 @@ function J0(e, t) {
|
|
|
31511
31511
|
case s.STYLE:
|
|
31512
31512
|
case s.TEMPLATE:
|
|
31513
31513
|
case s.TITLE: {
|
|
31514
|
-
J(e, t);
|
|
31514
|
+
J$1(e, t);
|
|
31515
31515
|
break;
|
|
31516
31516
|
}
|
|
31517
31517
|
// Re-process the token in the appropriate mode
|
|
@@ -31520,7 +31520,7 @@ function J0(e, t) {
|
|
|
31520
31520
|
case s.TBODY:
|
|
31521
31521
|
case s.TFOOT:
|
|
31522
31522
|
case s.THEAD: {
|
|
31523
|
-
e.tmplInsertionModeStack[0] = l.IN_TABLE, e.insertionMode = l.IN_TABLE, Re(e, t);
|
|
31523
|
+
e.tmplInsertionModeStack[0] = l.IN_TABLE, e.insertionMode = l.IN_TABLE, Re$1(e, t);
|
|
31524
31524
|
break;
|
|
31525
31525
|
}
|
|
31526
31526
|
case s.COL: {
|
|
@@ -31528,7 +31528,7 @@ function J0(e, t) {
|
|
|
31528
31528
|
break;
|
|
31529
31529
|
}
|
|
31530
31530
|
case s.TR: {
|
|
31531
|
-
e.tmplInsertionModeStack[0] = l.IN_TABLE_BODY, e.insertionMode = l.IN_TABLE_BODY, Rt
|
|
31531
|
+
e.tmplInsertionModeStack[0] = l.IN_TABLE_BODY, e.insertionMode = l.IN_TABLE_BODY, Rt(e, t);
|
|
31532
31532
|
break;
|
|
31533
31533
|
}
|
|
31534
31534
|
case s.TD:
|
|
@@ -31561,7 +31561,7 @@ function Ls(e, t) {
|
|
|
31561
31561
|
gt(e, t);
|
|
31562
31562
|
}
|
|
31563
31563
|
function gt(e, t) {
|
|
31564
|
-
e.insertionMode = l.IN_BODY, Ot
|
|
31564
|
+
e.insertionMode = l.IN_BODY, Ot(e, t);
|
|
31565
31565
|
}
|
|
31566
31566
|
function ud(e, t) {
|
|
31567
31567
|
switch (t.tagID) {
|
|
@@ -31578,7 +31578,7 @@ function ud(e, t) {
|
|
|
31578
31578
|
break;
|
|
31579
31579
|
}
|
|
31580
31580
|
case s.NOFRAMES: {
|
|
31581
|
-
J(e, t);
|
|
31581
|
+
J$1(e, t);
|
|
31582
31582
|
break;
|
|
31583
31583
|
}
|
|
31584
31584
|
}
|
|
@@ -31593,7 +31593,7 @@ function sd(e, t) {
|
|
|
31593
31593
|
break;
|
|
31594
31594
|
}
|
|
31595
31595
|
case s.NOFRAMES: {
|
|
31596
|
-
J(e, t);
|
|
31596
|
+
J$1(e, t);
|
|
31597
31597
|
break;
|
|
31598
31598
|
}
|
|
31599
31599
|
}
|
|
@@ -31605,7 +31605,7 @@ function id(e, t) {
|
|
|
31605
31605
|
t.tagID === s.HTML ? G$1(e, t) : ct(e, t);
|
|
31606
31606
|
}
|
|
31607
31607
|
function ct(e, t) {
|
|
31608
|
-
e.insertionMode = l.IN_BODY, Ot
|
|
31608
|
+
e.insertionMode = l.IN_BODY, Ot(e, t);
|
|
31609
31609
|
}
|
|
31610
31610
|
function nd(e, t) {
|
|
31611
31611
|
switch (t.tagID) {
|
|
@@ -31614,7 +31614,7 @@ function nd(e, t) {
|
|
|
31614
31614
|
break;
|
|
31615
31615
|
}
|
|
31616
31616
|
case s.NOFRAMES: {
|
|
31617
|
-
J(e, t);
|
|
31617
|
+
J$1(e, t);
|
|
31618
31618
|
break;
|
|
31619
31619
|
}
|
|
31620
31620
|
}
|
|
@@ -31769,16 +31769,16 @@ function Id(e, t, u) {
|
|
|
31769
31769
|
}
|
|
31770
31770
|
const pe = {
|
|
31771
31771
|
// Re-exports from domhandler
|
|
31772
|
-
isCommentNode: Nt
|
|
31772
|
+
isCommentNode: Nt,
|
|
31773
31773
|
isElementNode: I,
|
|
31774
|
-
isTextNode: se,
|
|
31774
|
+
isTextNode: se$1,
|
|
31775
31775
|
//Node construction
|
|
31776
31776
|
createDocument() {
|
|
31777
|
-
const e = new Ne([]);
|
|
31777
|
+
const e = new Ne$1([]);
|
|
31778
31778
|
return e["x-mode"] = X$1.NO_QUIRKS, e;
|
|
31779
31779
|
},
|
|
31780
31780
|
createDocumentFragment() {
|
|
31781
|
-
return new Ne([]);
|
|
31781
|
+
return new Ne$1([]);
|
|
31782
31782
|
},
|
|
31783
31783
|
createElement(e, t, u) {
|
|
31784
31784
|
const r = /* @__PURE__ */ Object.create(null), a = /* @__PURE__ */ Object.create(null), i = /* @__PURE__ */ Object.create(null);
|
|
@@ -31812,7 +31812,7 @@ const pe = {
|
|
|
31812
31812
|
},
|
|
31813
31813
|
setDocumentType(e, t, u, r) {
|
|
31814
31814
|
const a = Id(t, u, r);
|
|
31815
|
-
let i = e.children.find((n) => Qt
|
|
31815
|
+
let i = e.children.find((n) => Qt(n) && n.name === "!doctype");
|
|
31816
31816
|
i ? i.data = a ?? null : (i = new lu("!doctype", a), pe.appendChild(e, i)), i["x-name"] = t, i["x-publicId"] = u, i["x-systemId"] = r;
|
|
31817
31817
|
},
|
|
31818
31818
|
setDocumentMode(e, t) {
|
|
@@ -31829,11 +31829,11 @@ const pe = {
|
|
|
31829
31829
|
},
|
|
31830
31830
|
insertText(e, t) {
|
|
31831
31831
|
const u = e.children[e.children.length - 1];
|
|
31832
|
-
u && se(u) ? u.data += t : pe.appendChild(e, pe.createTextNode(t));
|
|
31832
|
+
u && se$1(u) ? u.data += t : pe.appendChild(e, pe.createTextNode(t));
|
|
31833
31833
|
},
|
|
31834
31834
|
insertTextBefore(e, t, u) {
|
|
31835
31835
|
const r = e.children[e.children.indexOf(u) - 1];
|
|
31836
|
-
r && se(r) ? r.data += t : pe.insertBefore(e, pe.createTextNode(t), u);
|
|
31836
|
+
r && se$1(r) ? r.data += t : pe.insertBefore(e, pe.createTextNode(t), u);
|
|
31837
31837
|
},
|
|
31838
31838
|
adoptAttributes(e, t) {
|
|
31839
31839
|
for (let u = 0; u < t.length; u++) {
|
|
@@ -31881,7 +31881,7 @@ const pe = {
|
|
|
31881
31881
|
},
|
|
31882
31882
|
//Node types
|
|
31883
31883
|
isDocumentTypeNode(e) {
|
|
31884
|
-
return Qt
|
|
31884
|
+
return Qt(e) && e.name === "!doctype";
|
|
31885
31885
|
},
|
|
31886
31886
|
// Source code location
|
|
31887
31887
|
setNodeSourceCodeLocation(e, t) {
|
|
@@ -31906,7 +31906,7 @@ function yd(e) {
|
|
|
31906
31906
|
const t = "length" in e ? e : [e];
|
|
31907
31907
|
for (let r = 0; r < t.length; r += 1) {
|
|
31908
31908
|
const a = t[r];
|
|
31909
|
-
Te(a) && Array.prototype.splice.call(t, r, 1, ...a.children);
|
|
31909
|
+
Te$1(a) && Array.prototype.splice.call(t, r, 1, ...a.children);
|
|
31910
31910
|
}
|
|
31911
31911
|
let u = "";
|
|
31912
31912
|
for (let r = 0; r < t.length; r += 1) {
|
|
@@ -31915,7 +31915,7 @@ function yd(e) {
|
|
|
31915
31915
|
}
|
|
31916
31916
|
return u;
|
|
31917
31917
|
}
|
|
31918
|
-
const Od = eo((e, t, u, r) => t._useHtmlParser2 ? Ii(e, t) : Sd(e, t, u, r)), Ps = ko(Od, (e, t) => t._useHtmlParser2 ? xt
|
|
31918
|
+
const Od = eo((e, t, u, r) => t._useHtmlParser2 ? Ii(e, t) : Sd(e, t, u, r)), Ps = ko(Od, (e, t) => t._useHtmlParser2 ? xt(e, t) : yd(e)), Ms = [
|
|
31919
31919
|
{
|
|
31920
31920
|
// Match any URL as fallback
|
|
31921
31921
|
pattern: "^https?://",
|
|
@@ -32435,13 +32435,13 @@ const Ld = (e) => {
|
|
|
32435
32435
|
}, a = u.displayFields || r, i = (y) => {
|
|
32436
32436
|
const W2 = e[y];
|
|
32437
32437
|
return typeof W2 == "string" ? W2 : void 0;
|
|
32438
|
-
}, n = fr(i("title") || "Untitled"), c = i("description") || "", h = i("image") || "", m = i("favicon"), f = u.useMetadataUrlLink && i("url") || t, T = i("siteName") || Bs(f),
|
|
32438
|
+
}, n = fr(i("title") || "Untitled"), c = i("description") || "", h = i("image") || "", m = i("favicon"), f = u.useMetadataUrlLink && i("url") || t, T = i("siteName") || Bs(f), A2 = pr(n, 80), w = pr(fr(c), 160), v = [];
|
|
32439
32439
|
h && a.image !== void 0 && v.push({
|
|
32440
32440
|
order: a.image,
|
|
32441
32441
|
section: "image",
|
|
32442
|
-
html: At
|
|
32442
|
+
html: At(
|
|
32443
32443
|
j(h),
|
|
32444
|
-
j(
|
|
32444
|
+
j(A2),
|
|
32445
32445
|
"card-image",
|
|
32446
32446
|
void 0,
|
|
32447
32447
|
'loading="lazy"'
|
|
@@ -32459,7 +32459,7 @@ const Ld = (e) => {
|
|
|
32459
32459
|
order: a.title,
|
|
32460
32460
|
section: "header",
|
|
32461
32461
|
isHeader: true,
|
|
32462
|
-
html: `<div class="card-title">${j(
|
|
32462
|
+
html: `<div class="card-title">${j(A2)}</div>`
|
|
32463
32463
|
}), a.siteName !== void 0 && U2.push({
|
|
32464
32464
|
order: a.siteName,
|
|
32465
32465
|
section: "header",
|
|
@@ -32485,24 +32485,24 @@ const Ld = (e) => {
|
|
|
32485
32485
|
"favicon"
|
|
32486
32486
|
].includes(y))
|
|
32487
32487
|
continue;
|
|
32488
|
-
const
|
|
32489
|
-
if (
|
|
32490
|
-
let
|
|
32488
|
+
const Ce2 = a[y];
|
|
32489
|
+
if (Ce2 !== void 0) {
|
|
32490
|
+
let Me2 = "";
|
|
32491
32491
|
if (Array.isArray(W2)) {
|
|
32492
|
-
const
|
|
32493
|
-
|
|
32492
|
+
const Pt = W2.slice(0, 3).map((Hs) => `<li>${j(String(Hs))}</li>`).join("");
|
|
32493
|
+
Me2 = `<div class="card-field card-${y}">
|
|
32494
32494
|
<div class="field-label">${j(y)}:</div>
|
|
32495
|
-
<ul class="field-list">${
|
|
32495
|
+
<ul class="field-list">${Pt}</ul>
|
|
32496
32496
|
</div>`;
|
|
32497
32497
|
} else
|
|
32498
|
-
|
|
32498
|
+
Me2 = `<div class="card-field card-${y}">
|
|
32499
32499
|
<span class="field-label">${j(y)}:</span>
|
|
32500
32500
|
<span class="field-value">${j(String(W2))}</span>
|
|
32501
32501
|
</div>`;
|
|
32502
32502
|
v.push({
|
|
32503
|
-
order:
|
|
32503
|
+
order: Ce2,
|
|
32504
32504
|
section: "enhanced",
|
|
32505
|
-
html:
|
|
32505
|
+
html: Me2
|
|
32506
32506
|
});
|
|
32507
32507
|
}
|
|
32508
32508
|
}
|
|
@@ -32518,40 +32518,40 @@ const Ld = (e) => {
|
|
|
32518
32518
|
"locale",
|
|
32519
32519
|
"favicon"
|
|
32520
32520
|
].includes(y) || a[y] === void 0 && M.push(y);
|
|
32521
|
-
let
|
|
32521
|
+
let ee2 = 1e3;
|
|
32522
32522
|
for (const y of M) {
|
|
32523
32523
|
const W2 = e[y];
|
|
32524
|
-
let
|
|
32524
|
+
let Ce2 = "";
|
|
32525
32525
|
if (Array.isArray(W2)) {
|
|
32526
|
-
const
|
|
32527
|
-
|
|
32526
|
+
const Me2 = W2.slice(0, 3).map((Pt) => `<li>${j(String(Pt))}</li>`).join("");
|
|
32527
|
+
Ce2 = `<div class="card-field card-${y}">
|
|
32528
32528
|
<div class="field-label">${j(y)}:</div>
|
|
32529
|
-
<ul class="field-list">${
|
|
32529
|
+
<ul class="field-list">${Me2}</ul>
|
|
32530
32530
|
</div>`;
|
|
32531
32531
|
} else
|
|
32532
|
-
|
|
32532
|
+
Ce2 = `<div class="card-field card-${y}">
|
|
32533
32533
|
<span class="field-label">${j(y)}:</span>
|
|
32534
32534
|
<span class="field-value">${j(String(W2))}</span>
|
|
32535
32535
|
</div>`;
|
|
32536
32536
|
v.push({
|
|
32537
|
-
order:
|
|
32537
|
+
order: ee2++,
|
|
32538
32538
|
section: "enhanced",
|
|
32539
|
-
html:
|
|
32539
|
+
html: Ce2
|
|
32540
32540
|
});
|
|
32541
32541
|
}
|
|
32542
|
-
const
|
|
32542
|
+
const he2 = U2.sort((y, W2) => y.order - W2.order);
|
|
32543
32543
|
let ae = "";
|
|
32544
|
-
|
|
32545
|
-
${
|
|
32544
|
+
he2.length > 0 && (ae = `<div class="card-header">
|
|
32545
|
+
${he2.map((y) => y.html).join("")}
|
|
32546
32546
|
</div>`);
|
|
32547
32547
|
const ge = v.filter((y) => !y.isHeader).sort((y, W2) => y.order - W2.order), ie = ge.filter((y) => y.section === "image"), Ru = ge.filter(
|
|
32548
32548
|
(y) => y.section === "body" || y.section === "enhanced"
|
|
32549
32549
|
), Du = ie.map((y) => y.html).join("");
|
|
32550
|
-
let
|
|
32551
|
-
Ru.length > 0 && (
|
|
32552
|
-
const ku = ae ||
|
|
32550
|
+
let kt = "";
|
|
32551
|
+
Ru.length > 0 && (kt = Ru.map((y) => y.html).join(""));
|
|
32552
|
+
const ku = ae || kt ? `<div class="card-body">
|
|
32553
32553
|
${ae}
|
|
32554
|
-
${
|
|
32554
|
+
${kt}
|
|
32555
32555
|
</div>` : "", Us = i("siteName")?.toLowerCase().includes("amazon") ? "card-container card-amazon" : "card-container", Fs = a.url !== void 0 ? `<a href="${j(f)}" target="_blank" rel="noopener noreferrer" class="card-link">
|
|
32556
32556
|
${Du}
|
|
32557
32557
|
${ku}
|
|
@@ -32563,273 +32563,283 @@ const Ld = (e) => {
|
|
|
32563
32563
|
};
|
|
32564
32564
|
/*!
|
|
32565
32565
|
* name: mark-deco
|
|
32566
|
-
* version: 0.
|
|
32566
|
+
* version: 0.15.0
|
|
32567
32567
|
* description: Flexible Markdown to HTML conversion library
|
|
32568
32568
|
* author: Kouji Matsui (@kekyo@mi.kekyo.net)
|
|
32569
32569
|
* license: MIT
|
|
32570
32570
|
* repository.url: https://github.com/kekyo/mark-deco.git
|
|
32571
|
-
* git.commit.hash:
|
|
32571
|
+
* git.commit.hash: e293e83ab3b88ab4bc77b92c51ee38275f33c948
|
|
32572
32572
|
*/
|
|
32573
|
-
function
|
|
32574
|
-
const
|
|
32573
|
+
function X(t) {
|
|
32574
|
+
const e = /^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/, n = t.match(e);
|
|
32575
32575
|
if (!n)
|
|
32576
32576
|
return {
|
|
32577
32577
|
data: {},
|
|
32578
|
-
content:
|
|
32578
|
+
content: t
|
|
32579
32579
|
};
|
|
32580
|
-
const
|
|
32580
|
+
const o2 = n[1] || "", r = t.slice(n[0].length);
|
|
32581
32581
|
try {
|
|
32582
|
-
const
|
|
32582
|
+
const a = load(o2, { schema: JSON_SCHEMA });
|
|
32583
32583
|
return {
|
|
32584
|
-
data:
|
|
32584
|
+
data: a && typeof a == "object" && !Array.isArray(a) ? a : {},
|
|
32585
32585
|
content: r
|
|
32586
32586
|
};
|
|
32587
|
-
} catch (
|
|
32588
|
-
const
|
|
32589
|
-
throw new Error(`Failed to parse frontmatter YAML: ${
|
|
32587
|
+
} catch (a) {
|
|
32588
|
+
const f = a instanceof Error ? a.message : "Unknown YAML parsing error";
|
|
32589
|
+
throw new Error(`Failed to parse frontmatter YAML: ${f}`);
|
|
32590
32590
|
}
|
|
32591
32591
|
}
|
|
32592
|
-
function
|
|
32593
|
-
if (!
|
|
32592
|
+
function He(t) {
|
|
32593
|
+
if (!t || Object.keys(t).length === 0)
|
|
32594
32594
|
return "";
|
|
32595
|
-
const
|
|
32596
|
-
return typeof
|
|
32597
|
-
`) ?
|
|
32595
|
+
const e = dump(t, { lineWidth: 0 });
|
|
32596
|
+
return typeof e != "string" || e.length === 0 ? "" : e.endsWith(`
|
|
32597
|
+
`) ? e : `${e}
|
|
32598
32598
|
`;
|
|
32599
32599
|
}
|
|
32600
|
-
function
|
|
32601
|
-
const n =
|
|
32600
|
+
function Y(t, e) {
|
|
32601
|
+
const n = e ?? "";
|
|
32602
32602
|
return `${`---
|
|
32603
|
-
${
|
|
32603
|
+
${He(t)}---
|
|
32604
32604
|
`}${n}`;
|
|
32605
32605
|
}
|
|
32606
|
-
const
|
|
32607
|
-
},
|
|
32608
|
-
debug:
|
|
32609
|
-
info:
|
|
32610
|
-
warn:
|
|
32611
|
-
error:
|
|
32612
|
-
},
|
|
32606
|
+
const U = () => {
|
|
32607
|
+
}, Te = {
|
|
32608
|
+
debug: U,
|
|
32609
|
+
info: U,
|
|
32610
|
+
warn: U,
|
|
32611
|
+
error: U
|
|
32612
|
+
}, Le = {
|
|
32613
32613
|
debug: console.debug,
|
|
32614
32614
|
info: console.info,
|
|
32615
32615
|
warn: console.warn,
|
|
32616
32616
|
error: console.error
|
|
32617
|
-
},
|
|
32618
|
-
const
|
|
32619
|
-
if (
|
|
32620
|
-
const
|
|
32621
|
-
|
|
32617
|
+
}, Oe = () => Te, Ye = () => Le, R = (t) => {
|
|
32618
|
+
const e = {}, n = t.slice(1, -1).trim(), o2 = n.match(/\.([a-zA-Z0-9_-]+)/g);
|
|
32619
|
+
if (o2) {
|
|
32620
|
+
const f = o2.map((m) => m.slice(1));
|
|
32621
|
+
e.class = f.join(" ");
|
|
32622
32622
|
}
|
|
32623
32623
|
const r = n.match(/#([a-zA-Z0-9_-]+)/);
|
|
32624
|
-
r && r[1] && (
|
|
32625
|
-
const
|
|
32626
|
-
if (
|
|
32627
|
-
for (const
|
|
32628
|
-
const [
|
|
32629
|
-
|
|
32624
|
+
r && r[1] && (e.id = r[1]);
|
|
32625
|
+
const a = n.match(/([a-zA-Z0-9_-]+)=["']?([^"'\s]*)["']?/g);
|
|
32626
|
+
if (a)
|
|
32627
|
+
for (const f of a) {
|
|
32628
|
+
const [m, u] = f.split("=");
|
|
32629
|
+
m && u && m !== "class" && m !== "id" && (e[m] = u.replace(/["']/g, ""));
|
|
32630
32630
|
}
|
|
32631
|
-
return
|
|
32632
|
-
},
|
|
32633
|
-
const
|
|
32634
|
-
return `<pre><code${
|
|
32635
|
-
},
|
|
32636
|
-
|
|
32631
|
+
return e;
|
|
32632
|
+
}, Fe = (t) => {
|
|
32633
|
+
const e = t.lang ? ` class="language-${t.lang}"` : "", n = t.value.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">");
|
|
32634
|
+
return `<pre><code${e}>${n}</code></pre>`;
|
|
32635
|
+
}, A = (t, e) => {
|
|
32636
|
+
t.data || (t.data = {}), t.data.hProperties || (t.data.hProperties = {}), Object.entries(e).forEach(([n, o2]) => {
|
|
32637
32637
|
if (n === "class") {
|
|
32638
|
-
const r =
|
|
32639
|
-
r ? typeof r == "string" && r.startsWith("language-") ?
|
|
32638
|
+
const r = t.data.hProperties.class;
|
|
32639
|
+
r ? typeof r == "string" && r.startsWith("language-") ? t.data.hProperties.class = `${r} ${o2}` : t.data.hProperties.class = `${r} ${o2}` : t.data.hProperties.class = o2;
|
|
32640
32640
|
} else
|
|
32641
|
-
|
|
32641
|
+
t.data.hProperties[n] = o2;
|
|
32642
32642
|
});
|
|
32643
|
-
},
|
|
32644
|
-
visit(
|
|
32645
|
-
if (
|
|
32646
|
-
const r =
|
|
32643
|
+
}, Ce = () => (t) => {
|
|
32644
|
+
visit(t, (e, n, o2) => {
|
|
32645
|
+
if (e.type === "heading" && e.children?.length > 0) {
|
|
32646
|
+
const r = e.children[e.children.length - 1];
|
|
32647
32647
|
if (r?.type === "text" && r.value) {
|
|
32648
|
-
const
|
|
32649
|
-
if (
|
|
32650
|
-
const
|
|
32651
|
-
r.value =
|
|
32648
|
+
const a = r.value.match(/^(.*?)\s*(\{[^}]+\})\s*$/);
|
|
32649
|
+
if (a) {
|
|
32650
|
+
const f = a[1].trim(), m = a[2], u = R(m);
|
|
32651
|
+
r.value = f, A(e, u);
|
|
32652
32652
|
}
|
|
32653
32653
|
}
|
|
32654
32654
|
}
|
|
32655
|
-
if (
|
|
32656
|
-
const r =
|
|
32655
|
+
if (e.type === "paragraph" && e.children?.length > 0) {
|
|
32656
|
+
const r = e.children[e.children.length - 1];
|
|
32657
32657
|
if (r?.type === "text" && r.value) {
|
|
32658
|
-
const
|
|
32659
|
-
if (
|
|
32660
|
-
const
|
|
32661
|
-
r.value =
|
|
32658
|
+
const a = r.value.match(/^(.*?)\s*(\{[^}]+\})\s*$/);
|
|
32659
|
+
if (a) {
|
|
32660
|
+
const f = a[1].trim(), m = a[2], u = R(m);
|
|
32661
|
+
r.value = f, A(e, u);
|
|
32662
32662
|
}
|
|
32663
32663
|
}
|
|
32664
32664
|
}
|
|
32665
|
-
if (
|
|
32666
|
-
const r =
|
|
32665
|
+
if (e.type === "link" && o2 && typeof n == "number") {
|
|
32666
|
+
const r = o2.children[n + 1];
|
|
32667
32667
|
if (r?.type === "text" && r.value) {
|
|
32668
|
-
const
|
|
32669
|
-
if (
|
|
32670
|
-
const
|
|
32671
|
-
|
|
32668
|
+
const a = r.value.match(/^\s*(\{[^}]+\})/);
|
|
32669
|
+
if (a) {
|
|
32670
|
+
const f = a[1], m = R(f);
|
|
32671
|
+
A(e, m), r.value = r.value.replace(a[0], "");
|
|
32672
32672
|
}
|
|
32673
32673
|
}
|
|
32674
32674
|
}
|
|
32675
|
-
if (
|
|
32676
|
-
const r =
|
|
32675
|
+
if (e.type === "image" && o2 && typeof n == "number") {
|
|
32676
|
+
const r = o2.children[n + 1];
|
|
32677
32677
|
if (r?.type === "text" && r.value) {
|
|
32678
|
-
const
|
|
32679
|
-
if (
|
|
32680
|
-
const
|
|
32681
|
-
|
|
32678
|
+
const a = r.value.match(/^\s*(\{[^}]+\})/);
|
|
32679
|
+
if (a) {
|
|
32680
|
+
const f = a[1], m = R(f);
|
|
32681
|
+
A(e, m), r.value = r.value.replace(a[0], "");
|
|
32682
32682
|
}
|
|
32683
32683
|
}
|
|
32684
32684
|
}
|
|
32685
|
-
if (
|
|
32686
|
-
const r =
|
|
32685
|
+
if (e.type === "listItem" && e.children?.length > 0) {
|
|
32686
|
+
const r = e.children[e.children.length - 1];
|
|
32687
32687
|
if (r?.type === "paragraph" && r.children?.length > 0) {
|
|
32688
|
-
const
|
|
32689
|
-
if (
|
|
32690
|
-
const
|
|
32691
|
-
if (
|
|
32692
|
-
const
|
|
32693
|
-
|
|
32688
|
+
const a = r.children[r.children.length - 1];
|
|
32689
|
+
if (a?.type === "text" && a.value) {
|
|
32690
|
+
const f = a.value.match(/^(.*?)\s*(\{[^}]+\})\s*$/);
|
|
32691
|
+
if (f) {
|
|
32692
|
+
const m = f[1].trim(), u = f[2], c = R(u);
|
|
32693
|
+
a.value = m, A(e, c);
|
|
32694
32694
|
}
|
|
32695
32695
|
}
|
|
32696
32696
|
}
|
|
32697
32697
|
}
|
|
32698
|
-
if (
|
|
32699
|
-
const r =
|
|
32698
|
+
if (e.type === "list" && o2 && typeof n == "number") {
|
|
32699
|
+
const r = o2.children[n + 1];
|
|
32700
32700
|
if (r?.type === "paragraph" && r.children?.length === 1) {
|
|
32701
|
-
const
|
|
32702
|
-
if (
|
|
32703
|
-
const
|
|
32704
|
-
if (
|
|
32705
|
-
const
|
|
32706
|
-
|
|
32701
|
+
const a = r.children[0];
|
|
32702
|
+
if (a?.type === "text" && a.value) {
|
|
32703
|
+
const f = a.value.match(/^\s*(\{[^}]+\})\s*$/);
|
|
32704
|
+
if (f) {
|
|
32705
|
+
const m = f[1], u = R(m);
|
|
32706
|
+
A(e, u), o2.children.splice(n + 1, 1);
|
|
32707
32707
|
}
|
|
32708
32708
|
}
|
|
32709
32709
|
}
|
|
32710
32710
|
}
|
|
32711
|
-
if (
|
|
32712
|
-
const r =
|
|
32711
|
+
if (e.type === "blockquote" && e.children?.length > 0) {
|
|
32712
|
+
const r = e.children[e.children.length - 1];
|
|
32713
32713
|
if (r?.type === "paragraph" && r.children?.length > 0) {
|
|
32714
|
-
const
|
|
32715
|
-
if (
|
|
32716
|
-
const
|
|
32717
|
-
if (
|
|
32718
|
-
const
|
|
32719
|
-
|
|
32714
|
+
const a = r.children[r.children.length - 1];
|
|
32715
|
+
if (a?.type === "text" && a.value) {
|
|
32716
|
+
const f = a.value.match(/^(.*?)\s*(\{[^}]+\})\s*$/);
|
|
32717
|
+
if (f) {
|
|
32718
|
+
const m = f[1].trim(), u = f[2], c = R(u);
|
|
32719
|
+
a.value = m, A(e, c);
|
|
32720
32720
|
}
|
|
32721
32721
|
}
|
|
32722
32722
|
}
|
|
32723
32723
|
}
|
|
32724
|
-
if (
|
|
32725
|
-
const r =
|
|
32724
|
+
if (e.type === "blockquote" && o2 && typeof n == "number") {
|
|
32725
|
+
const r = o2.children[n + 1];
|
|
32726
32726
|
if (r?.type === "paragraph" && r.children?.length === 1) {
|
|
32727
|
-
const
|
|
32728
|
-
if (
|
|
32729
|
-
const
|
|
32730
|
-
if (
|
|
32731
|
-
const
|
|
32732
|
-
|
|
32727
|
+
const a = r.children[0];
|
|
32728
|
+
if (a?.type === "text" && a.value) {
|
|
32729
|
+
const f = a.value.match(/^\s*(\{[^}]+\})\s*$/);
|
|
32730
|
+
if (f) {
|
|
32731
|
+
const m = f[1], u = R(m);
|
|
32732
|
+
A(e, u), o2.children.splice(n + 1, 1);
|
|
32733
32733
|
}
|
|
32734
32734
|
}
|
|
32735
32735
|
}
|
|
32736
32736
|
}
|
|
32737
|
-
if (
|
|
32738
|
-
const r =
|
|
32737
|
+
if (e.type === "inlineCode" && o2 && typeof n == "number") {
|
|
32738
|
+
const r = o2.children[n + 1];
|
|
32739
32739
|
if (r?.type === "text" && r.value) {
|
|
32740
|
-
const
|
|
32741
|
-
if (
|
|
32742
|
-
const
|
|
32743
|
-
|
|
32740
|
+
const a = r.value.match(/^\s*(\{[^}]+\})/);
|
|
32741
|
+
if (a) {
|
|
32742
|
+
const f = a[1], m = R(f);
|
|
32743
|
+
A(e, m), r.value = r.value.replace(a[0], "");
|
|
32744
32744
|
}
|
|
32745
32745
|
}
|
|
32746
32746
|
}
|
|
32747
|
-
if (
|
|
32748
|
-
const r =
|
|
32747
|
+
if (e.type === "code" && e.meta) {
|
|
32748
|
+
const r = e.meta.match(/\{([^}]+)\}/);
|
|
32749
32749
|
if (r) {
|
|
32750
|
-
const
|
|
32750
|
+
const a = `{${r[1]}}`, f = R(a), m = {
|
|
32751
32751
|
type: "html",
|
|
32752
|
-
value: `<div class="${
|
|
32753
|
-
|
|
32754
|
-
).filter(([u]) => u !== "class").map(([u,
|
|
32752
|
+
value: `<div class="${f.class || ""}" ${Object.entries(
|
|
32753
|
+
f
|
|
32754
|
+
).filter(([u]) => u !== "class").map(([u, c]) => `${u}="${c}"`).join(" ")}>${Fe(e)}</div>`
|
|
32755
32755
|
};
|
|
32756
|
-
|
|
32756
|
+
o2 && typeof n == "number" && (o2.children[n] = m), e.meta = e.meta.replace(r[0], "").trim() || null;
|
|
32757
32757
|
}
|
|
32758
32758
|
}
|
|
32759
32759
|
});
|
|
32760
|
-
},
|
|
32761
|
-
visit(
|
|
32762
|
-
if (
|
|
32760
|
+
}, Re = () => (t) => {
|
|
32761
|
+
visit(t, "element", (e) => {
|
|
32762
|
+
if (e.tagName === "img") {
|
|
32763
32763
|
const n = Ys();
|
|
32764
|
-
|
|
32765
|
-
const
|
|
32766
|
-
|
|
32764
|
+
e.properties || (e.properties = {});
|
|
32765
|
+
const o2 = e.properties.style || "", r = o2 ? `${o2}; ${n}` : n;
|
|
32766
|
+
e.properties.style = r;
|
|
32767
32767
|
}
|
|
32768
32768
|
});
|
|
32769
|
-
},
|
|
32769
|
+
}, D = (t) => t ? "value" in t && typeof t.value == "string" ? t.value : "children" in t && Array.isArray(t.children) ? t.children.map((e) => D(e)).join("") : "" : "", G = (t) => {
|
|
32770
|
+
if (!Number.isFinite(t))
|
|
32771
|
+
return 1;
|
|
32772
|
+
const e = Math.trunc(t);
|
|
32773
|
+
return Math.min(6, Math.max(1, e));
|
|
32774
|
+
}, B = (t) => G(t ?? 1), Ie = (t) => {
|
|
32770
32775
|
const {
|
|
32771
|
-
frontmatter:
|
|
32776
|
+
frontmatter: e,
|
|
32772
32777
|
hasTitle: n,
|
|
32773
|
-
transform:
|
|
32778
|
+
transform: o2,
|
|
32774
32779
|
allowTitleWrite: r,
|
|
32775
|
-
|
|
32776
|
-
|
|
32777
|
-
|
|
32778
|
-
|
|
32780
|
+
headingBaseLevel: a,
|
|
32781
|
+
onHeadingApplied: f
|
|
32782
|
+
} = t, m = o2 === "extractAndRemove", u = B(a), c = u - 1;
|
|
32783
|
+
return (l2) => {
|
|
32784
|
+
if (!e || !l2.children || l2.children.length === 0)
|
|
32779
32785
|
return;
|
|
32780
|
-
let
|
|
32781
|
-
for (;
|
|
32782
|
-
const
|
|
32783
|
-
if (
|
|
32784
|
-
const
|
|
32785
|
-
|
|
32786
|
-
|
|
32787
|
-
|
|
32788
|
-
|
|
32789
|
-
|
|
32790
|
-
|
|
32791
|
-
|
|
32792
|
-
|
|
32786
|
+
let h = 0;
|
|
32787
|
+
for (; h < l2.children.length; h++) {
|
|
32788
|
+
const s2 = l2.children[h];
|
|
32789
|
+
if (s2.type === "heading") {
|
|
32790
|
+
const i = s2;
|
|
32791
|
+
if (G(i.depth + c) !== u)
|
|
32792
|
+
break;
|
|
32793
|
+
const p2 = l2.children[h + 1], g2 = p2 && p2.position ? p2.position.start?.offset : void 0, y = D(i).trim();
|
|
32794
|
+
m && l2.children.splice(h, 1);
|
|
32795
|
+
let w = false;
|
|
32796
|
+
!n && r && y.length > 0 && (e.title = y, w = true), f && f({
|
|
32797
|
+
headingText: y,
|
|
32798
|
+
position: i.position,
|
|
32799
|
+
nextNodeStartOffset: g2,
|
|
32800
|
+
titleWritten: w,
|
|
32801
|
+
headingRemoved: m
|
|
32793
32802
|
});
|
|
32794
32803
|
break;
|
|
32795
32804
|
}
|
|
32796
|
-
if (!(
|
|
32805
|
+
if (!(s2.type === "thematicBreak" || s2.type === "html" && typeof s2.value == "string" && s2.value.trim() === "") && !(s2.type === "paragraph" && s2.children?.length === 0))
|
|
32797
32806
|
break;
|
|
32798
32807
|
}
|
|
32799
32808
|
};
|
|
32800
|
-
},
|
|
32801
|
-
const { transform:
|
|
32802
|
-
if (
|
|
32809
|
+
}, ee = (t, e, n) => {
|
|
32810
|
+
const { transform: o2, allowTitleWrite: r, headingBaseLevel: a } = n;
|
|
32811
|
+
if (o2 === "none")
|
|
32803
32812
|
return {
|
|
32804
|
-
content:
|
|
32813
|
+
content: t,
|
|
32805
32814
|
headingRemoved: false,
|
|
32806
32815
|
titleWritten: false
|
|
32807
32816
|
};
|
|
32808
|
-
const
|
|
32809
|
-
let
|
|
32810
|
-
const h = unified().use(remarkParse).use(
|
|
32811
|
-
frontmatter:
|
|
32812
|
-
hasTitle:
|
|
32813
|
-
transform:
|
|
32817
|
+
const f = e != null && Object.prototype.hasOwnProperty.call(e, "title") && e.title !== void 0 && e.title !== null;
|
|
32818
|
+
let m = false, u = false, c, l2;
|
|
32819
|
+
const h = unified().use(remarkParse).use(Ie, {
|
|
32820
|
+
frontmatter: e,
|
|
32821
|
+
hasTitle: f,
|
|
32822
|
+
transform: o2,
|
|
32814
32823
|
allowTitleWrite: r,
|
|
32815
|
-
|
|
32816
|
-
|
|
32824
|
+
headingBaseLevel: a,
|
|
32825
|
+
onHeadingApplied: (i) => {
|
|
32826
|
+
if (m = i.headingRemoved, u = i.titleWritten, !i.headingRemoved)
|
|
32817
32827
|
return;
|
|
32818
|
-
const
|
|
32819
|
-
let
|
|
32820
|
-
typeof
|
|
32828
|
+
const d2 = i.position?.start?.offset ?? 0;
|
|
32829
|
+
let p2 = i.position?.end?.offset ?? d2;
|
|
32830
|
+
typeof i.nextNodeStartOffset == "number" && i.nextNodeStartOffset >= p2 ? p2 = i.nextNodeStartOffset : p2 = t.length, c = d2, l2 = p2;
|
|
32821
32831
|
}
|
|
32822
|
-
}),
|
|
32823
|
-
return h.runSync(
|
|
32824
|
-
content:
|
|
32832
|
+
}), s2 = h.parse(t);
|
|
32833
|
+
return h.runSync(s2), m && c !== void 0 && l2 !== void 0 ? {
|
|
32834
|
+
content: t.slice(0, c) + t.slice(l2),
|
|
32825
32835
|
headingRemoved: true,
|
|
32826
|
-
titleWritten:
|
|
32836
|
+
titleWritten: u
|
|
32827
32837
|
} : {
|
|
32828
|
-
content:
|
|
32838
|
+
content: t,
|
|
32829
32839
|
headingRemoved: false,
|
|
32830
32840
|
titleWritten: false
|
|
32831
32841
|
};
|
|
32832
|
-
}, { html:
|
|
32842
|
+
}, { html: Ne2 } = he, Ae = {
|
|
32833
32843
|
indent_size: 2,
|
|
32834
32844
|
indent_char: " ",
|
|
32835
32845
|
max_preserve_newlines: 2,
|
|
@@ -32841,357 +32851,378 @@ const _ = () => {
|
|
|
32841
32851
|
unformatted: ["code", "pre", "textarea"],
|
|
32842
32852
|
content_unformatted: ["pre", "code", "textarea"],
|
|
32843
32853
|
extra_liners: []
|
|
32844
|
-
},
|
|
32845
|
-
if (
|
|
32846
|
-
return
|
|
32847
|
-
if (Array.isArray(
|
|
32848
|
-
return
|
|
32849
|
-
if (
|
|
32850
|
-
const
|
|
32851
|
-
for (const [
|
|
32852
|
-
n[
|
|
32854
|
+
}, K = (t) => {
|
|
32855
|
+
if (t instanceof Date)
|
|
32856
|
+
return t.toISOString();
|
|
32857
|
+
if (Array.isArray(t))
|
|
32858
|
+
return t.map(K);
|
|
32859
|
+
if (t && typeof t == "object") {
|
|
32860
|
+
const e = Object.entries(t).filter(([, o2]) => o2 !== void 0).sort(([o2], [r]) => o2 < r ? -1 : o2 > r ? 1 : 0), n = {};
|
|
32861
|
+
for (const [o2, r] of e)
|
|
32862
|
+
n[o2] = K(r);
|
|
32853
32863
|
return n;
|
|
32854
32864
|
}
|
|
32855
|
-
return
|
|
32856
|
-
},
|
|
32857
|
-
const
|
|
32858
|
-
for (const a of
|
|
32859
|
-
const
|
|
32860
|
-
for (;
|
|
32861
|
-
|
|
32862
|
-
for (;
|
|
32863
|
-
|
|
32864
|
-
const
|
|
32865
|
-
|
|
32866
|
-
const
|
|
32867
|
-
|
|
32865
|
+
return t;
|
|
32866
|
+
}, W = (t) => JSON.stringify(K(t ?? {})), Pe = (t, e) => `${t}-${e.join("-")}`, _e = (t, e) => {
|
|
32867
|
+
const n = [], o2 = [], r = B(e);
|
|
32868
|
+
for (const a of t) {
|
|
32869
|
+
const f = Math.max(1, a.level - r + 1);
|
|
32870
|
+
for (; o2.length > f; )
|
|
32871
|
+
o2.pop();
|
|
32872
|
+
for (; o2.length < f; )
|
|
32873
|
+
o2.push(0);
|
|
32874
|
+
const m = f - 1;
|
|
32875
|
+
o2[m] = (o2[m] || 0) + 1;
|
|
32876
|
+
const u = o2.slice(0, f);
|
|
32877
|
+
n.push({
|
|
32868
32878
|
level: a.level,
|
|
32869
32879
|
text: a.text,
|
|
32870
|
-
numbers:
|
|
32880
|
+
numbers: u
|
|
32871
32881
|
});
|
|
32872
32882
|
}
|
|
32873
|
-
return
|
|
32874
|
-
},
|
|
32875
|
-
const
|
|
32876
|
-
return
|
|
32877
|
-
},
|
|
32878
|
-
const
|
|
32879
|
-
for (const
|
|
32883
|
+
return n;
|
|
32884
|
+
}, te = (t, e, n) => {
|
|
32885
|
+
const o2 = jd(e);
|
|
32886
|
+
return o2 !== void 0 ? `${t}-${o2}` : n();
|
|
32887
|
+
}, je = (t) => {
|
|
32888
|
+
const e = [], n = [];
|
|
32889
|
+
for (const o2 of t) {
|
|
32880
32890
|
const r = {
|
|
32881
|
-
level:
|
|
32882
|
-
text:
|
|
32883
|
-
id:
|
|
32891
|
+
level: o2.level,
|
|
32892
|
+
text: o2.text,
|
|
32893
|
+
id: o2.id,
|
|
32884
32894
|
children: []
|
|
32885
32895
|
};
|
|
32886
32896
|
for (; n.length > 0; ) {
|
|
32887
|
-
const
|
|
32888
|
-
if (
|
|
32897
|
+
const a = n[n.length - 1];
|
|
32898
|
+
if (a && a.level >= o2.level)
|
|
32889
32899
|
n.pop();
|
|
32890
32900
|
else
|
|
32891
32901
|
break;
|
|
32892
32902
|
}
|
|
32893
32903
|
if (n.length === 0)
|
|
32894
|
-
|
|
32904
|
+
e.push(r);
|
|
32895
32905
|
else {
|
|
32896
|
-
const
|
|
32897
|
-
|
|
32906
|
+
const a = n[n.length - 1];
|
|
32907
|
+
a && a.children.push(r);
|
|
32898
32908
|
}
|
|
32899
32909
|
n.push(r);
|
|
32900
32910
|
}
|
|
32901
|
-
return
|
|
32902
|
-
},
|
|
32903
|
-
const { plugins:
|
|
32904
|
-
for (const
|
|
32905
|
-
if (r.has(
|
|
32911
|
+
return e;
|
|
32912
|
+
}, et = (t) => {
|
|
32913
|
+
const { plugins: e = [], logger: n = Oe(), fetcher: o2 } = t, r = /* @__PURE__ */ new Map();
|
|
32914
|
+
for (const s2 of e) {
|
|
32915
|
+
if (r.has(s2.name))
|
|
32906
32916
|
throw new Error(
|
|
32907
|
-
`Plugin with name '${
|
|
32917
|
+
`Plugin with name '${s2.name}' is already registered`
|
|
32908
32918
|
);
|
|
32909
|
-
r.set(
|
|
32919
|
+
r.set(s2.name, s2);
|
|
32910
32920
|
}
|
|
32911
|
-
const
|
|
32912
|
-
const
|
|
32913
|
-
return
|
|
32914
|
-
},
|
|
32915
|
-
const
|
|
32921
|
+
const a = async (s2, i, d2) => {
|
|
32922
|
+
const p2 = r.get(s2);
|
|
32923
|
+
return p2 ? await p2.processBlock(i, d2) : `<pre><code class="language-${s2}">${R$1(i)}</code></pre>`;
|
|
32924
|
+
}, f = (s2, i, d2) => {
|
|
32925
|
+
const p2 = {
|
|
32916
32926
|
logger: n,
|
|
32917
|
-
signal:
|
|
32918
|
-
frontmatter:
|
|
32919
|
-
getUniqueId:
|
|
32920
|
-
fetcher:
|
|
32927
|
+
signal: i,
|
|
32928
|
+
frontmatter: s2,
|
|
32929
|
+
getUniqueId: d2,
|
|
32930
|
+
fetcher: o2
|
|
32921
32931
|
};
|
|
32922
|
-
return () => async (
|
|
32923
|
-
const
|
|
32932
|
+
return () => async (g2) => {
|
|
32933
|
+
const y = [];
|
|
32924
32934
|
visit(
|
|
32925
|
-
|
|
32935
|
+
g2,
|
|
32926
32936
|
"code",
|
|
32927
|
-
(
|
|
32928
|
-
if (!
|
|
32937
|
+
(w, b2, k2) => {
|
|
32938
|
+
if (!w.lang || !r.has(w.lang))
|
|
32929
32939
|
return;
|
|
32930
|
-
const
|
|
32931
|
-
const
|
|
32940
|
+
const F2 = (async () => {
|
|
32941
|
+
const L2 = {
|
|
32932
32942
|
type: "html",
|
|
32933
|
-
value: await
|
|
32934
|
-
|
|
32935
|
-
|
|
32936
|
-
|
|
32943
|
+
value: await a(
|
|
32944
|
+
w.lang,
|
|
32945
|
+
w.value,
|
|
32946
|
+
p2
|
|
32937
32947
|
)
|
|
32938
32948
|
};
|
|
32939
|
-
|
|
32949
|
+
k2 && typeof b2 == "number" && (k2.children[b2] = L2);
|
|
32940
32950
|
})();
|
|
32941
|
-
|
|
32951
|
+
y.push(F2);
|
|
32942
32952
|
}
|
|
32943
|
-
), await Promise.all(
|
|
32953
|
+
), await Promise.all(y);
|
|
32944
32954
|
};
|
|
32945
|
-
},
|
|
32946
|
-
const
|
|
32947
|
-
visit(w, "heading", (
|
|
32948
|
-
|
|
32955
|
+
}, m = (s2, i, d2 = false, p2 = false, g2 = "", y = 1) => () => (w) => {
|
|
32956
|
+
const b2 = [], k2 = B(y), F2 = k2 - 1, P2 = (v) => G(v + F2), L2 = [];
|
|
32957
|
+
visit(w, "heading", (v) => {
|
|
32958
|
+
if (v.depth >= 1 && v.depth <= 6) {
|
|
32959
|
+
const H2 = P2(v.depth);
|
|
32960
|
+
v.data || (v.data = {}), v.data.hName = `h${H2}`, L2.push({ node: v, level: H2 });
|
|
32961
|
+
}
|
|
32949
32962
|
});
|
|
32950
|
-
let
|
|
32951
|
-
if (
|
|
32952
|
-
const
|
|
32953
|
-
level:
|
|
32954
|
-
text:
|
|
32963
|
+
let S = [];
|
|
32964
|
+
if (d2) {
|
|
32965
|
+
const v = L2.map(({ node: H2, level: I2 }) => ({
|
|
32966
|
+
level: I2,
|
|
32967
|
+
text: D(H2)
|
|
32955
32968
|
}));
|
|
32956
|
-
|
|
32957
|
-
|
|
32958
|
-
|
|
32959
|
-
|
|
32960
|
-
|
|
32961
|
-
|
|
32962
|
-
|
|
32963
|
-
|
|
32964
|
-
|
|
32965
|
-
|
|
32966
|
-
|
|
32967
|
-
|
|
32968
|
-
|
|
32969
|
-
|
|
32970
|
-
|
|
32971
|
-
|
|
32972
|
-
|
|
32973
|
-
|
|
32969
|
+
S = _e(
|
|
32970
|
+
v,
|
|
32971
|
+
k2
|
|
32972
|
+
);
|
|
32973
|
+
}
|
|
32974
|
+
const O2 = [];
|
|
32975
|
+
L2.forEach(({ node: v, level: H2 }, I2) => {
|
|
32976
|
+
const N2 = D(v), $2 = v.data?.hProperties?.id;
|
|
32977
|
+
let E2;
|
|
32978
|
+
if ($2)
|
|
32979
|
+
E2 = $2;
|
|
32980
|
+
else if (d2 && p2) {
|
|
32981
|
+
const x2 = te(
|
|
32982
|
+
g2,
|
|
32983
|
+
N2,
|
|
32984
|
+
() => i(N2)
|
|
32985
|
+
).replace(`${g2}-`, "");
|
|
32986
|
+
for (; O2.length > 0; ) {
|
|
32987
|
+
const C2 = O2[O2.length - 1];
|
|
32988
|
+
if (C2 && C2.level >= H2)
|
|
32989
|
+
O2.pop();
|
|
32974
32990
|
else
|
|
32975
32991
|
break;
|
|
32976
32992
|
}
|
|
32977
|
-
const
|
|
32978
|
-
|
|
32979
|
-
level:
|
|
32980
|
-
contentId:
|
|
32993
|
+
const j2 = O2.map((C2) => C2.contentId);
|
|
32994
|
+
E2 = j2.length > 0 ? `${g2}-${j2.join("-")}-${x2}` : `${g2}-${x2}`, O2.push({
|
|
32995
|
+
level: H2,
|
|
32996
|
+
contentId: x2
|
|
32981
32997
|
});
|
|
32982
|
-
} else if (
|
|
32983
|
-
const
|
|
32984
|
-
|
|
32985
|
-
|
|
32986
|
-
|
|
32987
|
-
) :
|
|
32998
|
+
} else if (d2 && I2 < S.length) {
|
|
32999
|
+
const x2 = S[I2];
|
|
33000
|
+
x2 ? E2 = Pe(
|
|
33001
|
+
g2,
|
|
33002
|
+
x2.numbers
|
|
33003
|
+
) : E2 = i(N2);
|
|
32988
33004
|
} else
|
|
32989
|
-
|
|
32990
|
-
|
|
32991
|
-
level:
|
|
32992
|
-
text:
|
|
32993
|
-
id:
|
|
33005
|
+
E2 = i(N2);
|
|
33006
|
+
v.data || (v.data = {}), v.data.hProperties || (v.data.hProperties = {}), $2 || (v.data.hProperties.id = E2), b2.push({
|
|
33007
|
+
level: H2,
|
|
33008
|
+
text: N2,
|
|
33009
|
+
id: E2
|
|
32994
33010
|
});
|
|
32995
33011
|
});
|
|
32996
|
-
const
|
|
32997
|
-
|
|
32998
|
-
}, u = (
|
|
33012
|
+
const _2 = je(b2);
|
|
33013
|
+
s2.push(..._2);
|
|
33014
|
+
}, u = (s2) => {
|
|
32999
33015
|
throw n.error(
|
|
33000
|
-
`Failed to process markdown: ${
|
|
33016
|
+
`Failed to process markdown: ${s2 instanceof Error ? s2.message : "Unknown error"}`
|
|
33001
33017
|
), new Error(
|
|
33002
|
-
`Failed to process markdown: ${
|
|
33018
|
+
`Failed to process markdown: ${s2 instanceof Error ? s2.message : "Unknown error"}`
|
|
33003
33019
|
);
|
|
33004
|
-
},
|
|
33020
|
+
}, c = async (s2, i, d2, p2, g2, y) => {
|
|
33005
33021
|
const {
|
|
33006
|
-
signal:
|
|
33007
|
-
useContentStringHeaderId:
|
|
33008
|
-
useHierarchicalHeadingId:
|
|
33009
|
-
|
|
33010
|
-
|
|
33011
|
-
|
|
33012
|
-
|
|
33013
|
-
|
|
33014
|
-
|
|
33015
|
-
|
|
33016
|
-
|
|
33017
|
-
|
|
33018
|
-
|
|
33019
|
-
|
|
33020
|
-
|
|
33021
|
-
|
|
33022
|
-
|
|
33023
|
-
|
|
33024
|
-
|
|
33025
|
-
|
|
33026
|
-
|
|
33022
|
+
signal: w,
|
|
33023
|
+
useContentStringHeaderId: b2 = false,
|
|
33024
|
+
useHierarchicalHeadingId: k2 = true,
|
|
33025
|
+
headingBaseLevel: F2,
|
|
33026
|
+
advancedOptions: P2
|
|
33027
|
+
} = d2 ?? {}, L2 = B(F2), {
|
|
33028
|
+
allowDangerousHtml: S = true,
|
|
33029
|
+
htmlOptions: O2 = Ae,
|
|
33030
|
+
gfmOptions: _2 = {},
|
|
33031
|
+
remarkPlugins: v = [],
|
|
33032
|
+
rehypePlugins: H2 = []
|
|
33033
|
+
} = P2 || {}, I2 = [];
|
|
33034
|
+
let N2 = 0;
|
|
33035
|
+
const $2 = () => `${i}-${++N2}`;
|
|
33036
|
+
let E2 = unified().use(remarkParse);
|
|
33037
|
+
if (v)
|
|
33038
|
+
for (const T of v)
|
|
33039
|
+
Array.isArray(T) ? E2 = E2.use(T[0], T[1]) : E2 = E2.use(T);
|
|
33040
|
+
let x2 = E2.use(remarkGfm, _2).use(Ce).use(
|
|
33041
|
+
m(
|
|
33042
|
+
I2,
|
|
33043
|
+
b2 ? (T) => te(i, T, $2) : $2,
|
|
33044
|
+
k2,
|
|
33027
33045
|
b2,
|
|
33028
|
-
|
|
33029
|
-
|
|
33046
|
+
i,
|
|
33047
|
+
L2
|
|
33030
33048
|
)
|
|
33031
|
-
).use(
|
|
33032
|
-
if (
|
|
33033
|
-
for (const T of
|
|
33034
|
-
Array.isArray(T) ?
|
|
33035
|
-
const
|
|
33049
|
+
).use(f(p2, w, $2)).use(remarkRehype, { allowDangerousHtml: S }).use(Re).use(rehypeStringify, { allowDangerousHtml: S });
|
|
33050
|
+
if (H2)
|
|
33051
|
+
for (const T of H2)
|
|
33052
|
+
Array.isArray(T) ? x2 = x2.use(T[0], T[1]) : x2 = x2.use(T);
|
|
33053
|
+
const j2 = await x2.process(g2), M = String(j2);
|
|
33036
33054
|
return {
|
|
33037
|
-
html:
|
|
33038
|
-
frontmatter:
|
|
33039
|
-
changed:
|
|
33040
|
-
headingTree:
|
|
33041
|
-
composeMarkdown: () =>
|
|
33042
|
-
uniqueIdPrefix:
|
|
33055
|
+
html: Ne2(M, O2),
|
|
33056
|
+
frontmatter: p2,
|
|
33057
|
+
changed: y,
|
|
33058
|
+
headingTree: I2,
|
|
33059
|
+
composeMarkdown: () => y ? Y(p2, g2) : s2,
|
|
33060
|
+
uniqueIdPrefix: i
|
|
33043
33061
|
};
|
|
33044
33062
|
};
|
|
33045
33063
|
return {
|
|
33046
|
-
process: async (
|
|
33064
|
+
process: async (s2, i, d2 = {}) => {
|
|
33047
33065
|
try {
|
|
33048
|
-
const { data:
|
|
33049
|
-
|
|
33066
|
+
const { data: p2, content: g2 } = X(s2), y = B(
|
|
33067
|
+
d2.headingBaseLevel
|
|
33068
|
+
), w = d2.headerTitleTransform ?? "extractAndRemove";
|
|
33069
|
+
let b2 = g2, k2 = false, F2 = false;
|
|
33050
33070
|
if (w !== "none") {
|
|
33051
|
-
const
|
|
33071
|
+
const S = ee(b2, p2, {
|
|
33052
33072
|
allowTitleWrite: true,
|
|
33053
|
-
transform: w
|
|
33073
|
+
transform: w,
|
|
33074
|
+
headingBaseLevel: y
|
|
33054
33075
|
});
|
|
33055
|
-
|
|
33076
|
+
b2 = S.content, k2 = S.headingRemoved, F2 = S.titleWritten;
|
|
33056
33077
|
}
|
|
33057
|
-
|
|
33058
|
-
|
|
33059
|
-
|
|
33060
|
-
|
|
33061
|
-
|
|
33062
|
-
|
|
33063
|
-
|
|
33078
|
+
const P2 = k2 || F2, L2 = {
|
|
33079
|
+
...d2,
|
|
33080
|
+
headingBaseLevel: y
|
|
33081
|
+
};
|
|
33082
|
+
return await c(
|
|
33083
|
+
s2,
|
|
33084
|
+
i,
|
|
33085
|
+
L2,
|
|
33086
|
+
p2,
|
|
33087
|
+
b2,
|
|
33088
|
+
P2
|
|
33064
33089
|
);
|
|
33065
|
-
} catch (
|
|
33066
|
-
return u(
|
|
33090
|
+
} catch (p2) {
|
|
33091
|
+
return u(p2);
|
|
33067
33092
|
}
|
|
33068
33093
|
},
|
|
33069
|
-
processWithFrontmatterTransform: async (
|
|
33094
|
+
processWithFrontmatterTransform: async (s2, i, d2) => {
|
|
33070
33095
|
try {
|
|
33071
|
-
const { data:
|
|
33072
|
-
originalFrontmatter:
|
|
33073
|
-
markdownContent:
|
|
33074
|
-
uniqueIdPrefix:
|
|
33075
|
-
},
|
|
33076
|
-
if (
|
|
33096
|
+
const { data: p2, content: g2 } = X(s2), y = W(p2), w = {
|
|
33097
|
+
originalFrontmatter: p2,
|
|
33098
|
+
markdownContent: g2,
|
|
33099
|
+
uniqueIdPrefix: i
|
|
33100
|
+
}, b2 = await d2.preTransform(w);
|
|
33101
|
+
if (b2 === void 0)
|
|
33077
33102
|
return;
|
|
33078
33103
|
const {
|
|
33079
|
-
frontmatter:
|
|
33080
|
-
uniqueIdPrefix:
|
|
33081
|
-
|
|
33082
|
-
} =
|
|
33083
|
-
|
|
33084
|
-
|
|
33085
|
-
|
|
33104
|
+
frontmatter: k2,
|
|
33105
|
+
uniqueIdPrefix: F2,
|
|
33106
|
+
headerTitleTransform: P2
|
|
33107
|
+
} = b2, L2 = F2 ?? i, S = B(
|
|
33108
|
+
d2.headingBaseLevel
|
|
33109
|
+
), O2 = P2 ?? "extractAndRemove";
|
|
33110
|
+
let _2 = g2, v = false;
|
|
33111
|
+
if (O2 !== "none") {
|
|
33112
|
+
const C2 = ee(_2, k2, {
|
|
33086
33113
|
allowTitleWrite: true,
|
|
33087
|
-
transform:
|
|
33114
|
+
transform: O2,
|
|
33115
|
+
headingBaseLevel: S
|
|
33088
33116
|
});
|
|
33089
|
-
|
|
33090
|
-
}
|
|
33091
|
-
const I2 =
|
|
33092
|
-
|
|
33093
|
-
|
|
33094
|
-
|
|
33095
|
-
|
|
33096
|
-
|
|
33117
|
+
_2 = C2.content, v = C2.headingRemoved || v;
|
|
33118
|
+
}
|
|
33119
|
+
const I2 = W(k2) !== y || v, N2 = {
|
|
33120
|
+
...d2,
|
|
33121
|
+
headingBaseLevel: S
|
|
33122
|
+
}, $2 = await c(
|
|
33123
|
+
s2,
|
|
33124
|
+
L2,
|
|
33125
|
+
N2,
|
|
33126
|
+
k2,
|
|
33127
|
+
_2,
|
|
33097
33128
|
I2
|
|
33098
33129
|
);
|
|
33099
|
-
let
|
|
33100
|
-
if (
|
|
33101
|
-
const
|
|
33102
|
-
frontmatter:
|
|
33130
|
+
let E2 = $2.frontmatter;
|
|
33131
|
+
if (d2.postTransform) {
|
|
33132
|
+
const C2 = {
|
|
33133
|
+
frontmatter: E2,
|
|
33103
33134
|
headingTree: $2.headingTree
|
|
33104
33135
|
};
|
|
33105
|
-
|
|
33136
|
+
E2 = await d2.postTransform(C2);
|
|
33106
33137
|
}
|
|
33107
|
-
const
|
|
33138
|
+
const j2 = W(E2) !== y || v, M = () => j2 ? Y(E2, _2) : s2;
|
|
33108
33139
|
return {
|
|
33109
33140
|
html: $2.html,
|
|
33110
|
-
frontmatter:
|
|
33111
|
-
changed:
|
|
33141
|
+
frontmatter: E2,
|
|
33142
|
+
changed: j2,
|
|
33112
33143
|
headingTree: $2.headingTree,
|
|
33113
33144
|
composeMarkdown: M,
|
|
33114
33145
|
uniqueIdPrefix: $2.uniqueIdPrefix
|
|
33115
33146
|
};
|
|
33116
|
-
} catch (
|
|
33117
|
-
return u(
|
|
33147
|
+
} catch (p2) {
|
|
33148
|
+
return u(p2);
|
|
33118
33149
|
}
|
|
33119
33150
|
}
|
|
33120
33151
|
};
|
|
33121
|
-
},
|
|
33122
|
-
const { maxRedirects: n = 5, timeoutEachRedirect:
|
|
33152
|
+
}, tt = (t, e = {}) => {
|
|
33153
|
+
const { maxRedirects: n = 5, timeoutEachRedirect: o2 = 1e4 } = e;
|
|
33123
33154
|
return {
|
|
33124
33155
|
name: "oembed",
|
|
33125
|
-
processBlock: async (
|
|
33126
|
-
const
|
|
33127
|
-
if (!qd(
|
|
33128
|
-
throw new Error(`Invalid URL: ${
|
|
33156
|
+
processBlock: async (a, f) => {
|
|
33157
|
+
const m = a.trim();
|
|
33158
|
+
if (!qd(m))
|
|
33159
|
+
throw new Error(`Invalid URL: ${m}`);
|
|
33129
33160
|
try {
|
|
33130
33161
|
const u = await Gd(
|
|
33131
|
-
|
|
33162
|
+
m,
|
|
33132
33163
|
n,
|
|
33133
|
-
|
|
33134
|
-
|
|
33135
|
-
|
|
33164
|
+
o2,
|
|
33165
|
+
f,
|
|
33166
|
+
t
|
|
33136
33167
|
);
|
|
33137
|
-
return Wd(u,
|
|
33168
|
+
return Wd(u, m, e);
|
|
33138
33169
|
} catch (u) {
|
|
33139
|
-
|
|
33140
|
-
const
|
|
33141
|
-
return typeof window < "u" ? Xs(
|
|
33170
|
+
f.logger.warn("oEmbed fetch failed for URL:", m, u);
|
|
33171
|
+
const c = Vd(u);
|
|
33172
|
+
return typeof window < "u" ? Xs(m, c) : Xs(m, c);
|
|
33142
33173
|
}
|
|
33143
33174
|
}
|
|
33144
33175
|
};
|
|
33145
|
-
},
|
|
33176
|
+
}, rt = (t = {}) => ({
|
|
33146
33177
|
name: "card",
|
|
33147
|
-
processBlock: async (n,
|
|
33178
|
+
processBlock: async (n, o2) => {
|
|
33148
33179
|
const r = n.trim();
|
|
33149
33180
|
if (!Xd(r))
|
|
33150
33181
|
throw new Error(`Invalid URL: ${r}`);
|
|
33151
33182
|
try {
|
|
33152
|
-
const
|
|
33153
|
-
return th(
|
|
33154
|
-
} catch (
|
|
33155
|
-
|
|
33156
|
-
const
|
|
33157
|
-
return typeof window < "u" ? eh(r,
|
|
33183
|
+
const a = await Jd(r, t, o2);
|
|
33184
|
+
return th(a, r, t);
|
|
33185
|
+
} catch (a) {
|
|
33186
|
+
o2.logger.warn("Card plugin fetch failed for URL:", r, a);
|
|
33187
|
+
const f = Vd(a);
|
|
33188
|
+
return typeof window < "u" ? eh(r, f) : eh(r, f);
|
|
33158
33189
|
}
|
|
33159
33190
|
}
|
|
33160
|
-
}),
|
|
33161
|
-
const { className:
|
|
33191
|
+
}), nt = (t = {}) => {
|
|
33192
|
+
const { className: e = "mermaid", includeId: n = true } = t;
|
|
33162
33193
|
return {
|
|
33163
33194
|
name: "mermaid",
|
|
33164
|
-
processBlock: async (r,
|
|
33165
|
-
const
|
|
33166
|
-
if (!
|
|
33167
|
-
|
|
33168
|
-
const
|
|
33169
|
-
return `<div class="${
|
|
33195
|
+
processBlock: async (r, a) => {
|
|
33196
|
+
const f = r.trim();
|
|
33197
|
+
if (!f) {
|
|
33198
|
+
a.logger.warn("Mermaid plugin received empty content");
|
|
33199
|
+
const l2 = n ? ` id="${a.getUniqueId()}"` : "";
|
|
33200
|
+
return `<div class="${e}-wrapper">
|
|
33170
33201
|
<style>
|
|
33171
|
-
.${
|
|
33202
|
+
.${e}-wrapper .${e} > svg {
|
|
33172
33203
|
width: auto !important;
|
|
33173
33204
|
height: auto !important;
|
|
33174
33205
|
max-width: none !important;
|
|
33175
33206
|
}
|
|
33176
33207
|
</style>
|
|
33177
|
-
<div class="${
|
|
33208
|
+
<div class="${e}"${l2}><!-- Empty mermaid content --></div>
|
|
33178
33209
|
</div>`;
|
|
33179
33210
|
}
|
|
33180
|
-
const
|
|
33211
|
+
const m = n ? ` id="${a.getUniqueId()}"` : "", u = f.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'"), c = `<div class="${e}-wrapper">
|
|
33181
33212
|
<style>
|
|
33182
|
-
.${
|
|
33213
|
+
.${e}-wrapper .${e} > svg {
|
|
33183
33214
|
width: auto !important;
|
|
33184
33215
|
height: auto !important;
|
|
33185
33216
|
max-width: none !important;
|
|
33186
33217
|
}
|
|
33187
33218
|
</style>
|
|
33188
|
-
<div class="${
|
|
33219
|
+
<div class="${e}"${m}>${u}</div>
|
|
33189
33220
|
</div>`;
|
|
33190
|
-
return
|
|
33191
|
-
contentLength:
|
|
33192
|
-
className:
|
|
33221
|
+
return a.logger.debug("Mermaid plugin processed content:", {
|
|
33222
|
+
contentLength: f.length,
|
|
33223
|
+
className: e,
|
|
33193
33224
|
includeId: n
|
|
33194
|
-
}),
|
|
33225
|
+
}), c;
|
|
33195
33226
|
}
|
|
33196
33227
|
};
|
|
33197
33228
|
};
|
|
@@ -33204,100 +33235,100 @@ const _ = () => {
|
|
|
33204
33235
|
* repository.url: https://github.com/kekyo/async-primitives.git
|
|
33205
33236
|
* git.commit.hash: cd35465b7e9b9945049186e7eaeecc0bfba65766
|
|
33206
33237
|
*/
|
|
33207
|
-
const
|
|
33208
|
-
},
|
|
33209
|
-
release:
|
|
33210
|
-
[Symbol.dispose]:
|
|
33211
|
-
},
|
|
33212
|
-
if (!
|
|
33213
|
-
return
|
|
33214
|
-
if (
|
|
33238
|
+
const re = () => {
|
|
33239
|
+
}, ne = {
|
|
33240
|
+
release: re,
|
|
33241
|
+
[Symbol.dispose]: re
|
|
33242
|
+
}, se = (t) => t instanceof Error ? t : typeof t == "string" ? new Error(t) : new Error("Operation aborted"), Be = (t, e) => {
|
|
33243
|
+
if (!t)
|
|
33244
|
+
return ne;
|
|
33245
|
+
if (t.aborted) {
|
|
33215
33246
|
try {
|
|
33216
|
-
|
|
33217
|
-
} catch (
|
|
33218
|
-
console.warn("AbortHook callback error: ",
|
|
33247
|
+
e(se(t.reason));
|
|
33248
|
+
} catch (a) {
|
|
33249
|
+
console.warn("AbortHook callback error: ", a);
|
|
33219
33250
|
}
|
|
33220
|
-
return
|
|
33251
|
+
return ne;
|
|
33221
33252
|
}
|
|
33222
33253
|
let n;
|
|
33223
33254
|
n = () => {
|
|
33224
33255
|
if (n) {
|
|
33225
|
-
const
|
|
33226
|
-
|
|
33256
|
+
const a = t.reason;
|
|
33257
|
+
t.removeEventListener("abort", n), n = void 0;
|
|
33227
33258
|
try {
|
|
33228
|
-
|
|
33229
|
-
} catch (
|
|
33230
|
-
console.warn("AbortHook callback error: ",
|
|
33259
|
+
e(se(a));
|
|
33260
|
+
} catch (f) {
|
|
33261
|
+
console.warn("AbortHook callback error: ", f);
|
|
33231
33262
|
}
|
|
33232
33263
|
}
|
|
33233
33264
|
};
|
|
33234
|
-
const
|
|
33235
|
-
n && (
|
|
33265
|
+
const o2 = () => {
|
|
33266
|
+
n && (t.removeEventListener("abort", n), n = void 0);
|
|
33236
33267
|
};
|
|
33237
|
-
return
|
|
33238
|
-
release:
|
|
33239
|
-
[Symbol.dispose]:
|
|
33268
|
+
return t.addEventListener("abort", n, { once: true }), {
|
|
33269
|
+
release: o2,
|
|
33270
|
+
[Symbol.dispose]: o2
|
|
33240
33271
|
};
|
|
33241
|
-
},
|
|
33242
|
-
typeof setImmediate == "function" ? setImmediate(
|
|
33243
|
-
},
|
|
33244
|
-
let
|
|
33272
|
+
}, Me = (t) => {
|
|
33273
|
+
typeof setImmediate == "function" ? setImmediate(t) : setTimeout(t, 0);
|
|
33274
|
+
}, z = () => new Error("Lock acquisition was aborted"), Ue = (t) => {
|
|
33275
|
+
let e = true;
|
|
33245
33276
|
const n = () => {
|
|
33246
|
-
|
|
33277
|
+
e && (e = false, t());
|
|
33247
33278
|
};
|
|
33248
33279
|
return {
|
|
33249
33280
|
get isActive() {
|
|
33250
|
-
return
|
|
33281
|
+
return e;
|
|
33251
33282
|
},
|
|
33252
33283
|
release: n,
|
|
33253
33284
|
[Symbol.dispose]: n
|
|
33254
33285
|
};
|
|
33255
|
-
},
|
|
33256
|
-
let
|
|
33286
|
+
}, Q = (t = 20) => {
|
|
33287
|
+
let e = false;
|
|
33257
33288
|
const n = [];
|
|
33258
|
-
let
|
|
33289
|
+
let o2 = 0;
|
|
33259
33290
|
const r = () => {
|
|
33260
|
-
var
|
|
33261
|
-
if (
|
|
33291
|
+
var l2;
|
|
33292
|
+
if (e || n.length === 0)
|
|
33262
33293
|
return;
|
|
33263
|
-
const
|
|
33264
|
-
if ((
|
|
33265
|
-
|
|
33294
|
+
const h = n.shift();
|
|
33295
|
+
if ((l2 = h.signal) != null && l2.aborted) {
|
|
33296
|
+
h.reject(z()), a();
|
|
33266
33297
|
return;
|
|
33267
33298
|
}
|
|
33268
|
-
|
|
33269
|
-
const
|
|
33270
|
-
|
|
33271
|
-
},
|
|
33272
|
-
|
|
33273
|
-
},
|
|
33274
|
-
|
|
33275
|
-
},
|
|
33276
|
-
const
|
|
33277
|
-
|
|
33278
|
-
}, u = async (
|
|
33279
|
-
if (
|
|
33280
|
-
if (
|
|
33281
|
-
throw
|
|
33282
|
-
return new Promise((
|
|
33283
|
-
const
|
|
33299
|
+
e = true;
|
|
33300
|
+
const s2 = Ue(f);
|
|
33301
|
+
h.resolve(s2);
|
|
33302
|
+
}, a = () => {
|
|
33303
|
+
o2++, o2 >= t ? (o2 = 0, Me(r)) : r();
|
|
33304
|
+
}, f = () => {
|
|
33305
|
+
e && (e = false, a());
|
|
33306
|
+
}, m = (l2) => {
|
|
33307
|
+
const h = n.indexOf(l2);
|
|
33308
|
+
h !== -1 && n.splice(h, 1);
|
|
33309
|
+
}, u = async (l2) => {
|
|
33310
|
+
if (l2) {
|
|
33311
|
+
if (l2.aborted)
|
|
33312
|
+
throw z();
|
|
33313
|
+
return new Promise((h, s2) => {
|
|
33314
|
+
const i = {
|
|
33284
33315
|
resolve: void 0,
|
|
33285
33316
|
reject: void 0,
|
|
33286
|
-
signal:
|
|
33287
|
-
},
|
|
33288
|
-
|
|
33317
|
+
signal: l2
|
|
33318
|
+
}, d2 = Be(l2, () => {
|
|
33319
|
+
m(i), s2(z());
|
|
33289
33320
|
});
|
|
33290
|
-
|
|
33291
|
-
|
|
33292
|
-
},
|
|
33293
|
-
|
|
33294
|
-
}, n.push(
|
|
33321
|
+
i.resolve = (p2) => {
|
|
33322
|
+
d2.release(), h(p2);
|
|
33323
|
+
}, i.reject = (p2) => {
|
|
33324
|
+
d2.release(), s2(p2);
|
|
33325
|
+
}, n.push(i), r();
|
|
33295
33326
|
});
|
|
33296
33327
|
} else
|
|
33297
|
-
return new Promise((
|
|
33328
|
+
return new Promise((h, s2) => {
|
|
33298
33329
|
n.push({
|
|
33299
|
-
resolve:
|
|
33300
|
-
reject:
|
|
33330
|
+
resolve: h,
|
|
33331
|
+
reject: s2
|
|
33301
33332
|
}), r();
|
|
33302
33333
|
});
|
|
33303
33334
|
};
|
|
@@ -33307,202 +33338,202 @@ const X = () => {
|
|
|
33307
33338
|
wait: u
|
|
33308
33339
|
},
|
|
33309
33340
|
get isLocked() {
|
|
33310
|
-
return
|
|
33341
|
+
return e;
|
|
33311
33342
|
},
|
|
33312
33343
|
get pendingCount() {
|
|
33313
33344
|
return n.length;
|
|
33314
33345
|
}
|
|
33315
33346
|
};
|
|
33316
|
-
},
|
|
33317
|
-
const
|
|
33318
|
-
const
|
|
33319
|
-
for (const [
|
|
33320
|
-
|
|
33321
|
-
for (const
|
|
33322
|
-
|
|
33323
|
-
return
|
|
33347
|
+
}, qe = () => {
|
|
33348
|
+
const t = /* @__PURE__ */ new Map(), e = Q(), n = (u = Date.now()) => {
|
|
33349
|
+
const c = [];
|
|
33350
|
+
for (const [l2, h] of t.entries())
|
|
33351
|
+
h.ttl !== void 0 && (h.ttl === 0 || u > h.timestamp + h.ttl) && c.push(l2);
|
|
33352
|
+
for (const l2 of c)
|
|
33353
|
+
t.delete(l2);
|
|
33354
|
+
return c;
|
|
33324
33355
|
};
|
|
33325
33356
|
return {
|
|
33326
33357
|
get: async (u) => {
|
|
33327
|
-
const
|
|
33328
|
-
if (!
|
|
33358
|
+
const c = t.get(u);
|
|
33359
|
+
if (!c)
|
|
33329
33360
|
return null;
|
|
33330
|
-
if (
|
|
33331
|
-
const
|
|
33361
|
+
if (c.ttl !== void 0 && (c.ttl === 0 || Date.now() > c.timestamp + c.ttl)) {
|
|
33362
|
+
const h = await e.lock();
|
|
33332
33363
|
try {
|
|
33333
|
-
const
|
|
33334
|
-
if (
|
|
33335
|
-
const
|
|
33336
|
-
(
|
|
33364
|
+
const s2 = t.get(u);
|
|
33365
|
+
if (s2 && s2.ttl !== void 0) {
|
|
33366
|
+
const i = Date.now();
|
|
33367
|
+
(s2.ttl === 0 || i > s2.timestamp + s2.ttl) && t.delete(u);
|
|
33337
33368
|
}
|
|
33338
33369
|
return null;
|
|
33339
33370
|
} finally {
|
|
33340
|
-
|
|
33371
|
+
h.release();
|
|
33341
33372
|
}
|
|
33342
33373
|
}
|
|
33343
|
-
return
|
|
33374
|
+
return c.data;
|
|
33344
33375
|
},
|
|
33345
|
-
set: async (u,
|
|
33346
|
-
const
|
|
33347
|
-
data:
|
|
33376
|
+
set: async (u, c, l2) => {
|
|
33377
|
+
const h = {
|
|
33378
|
+
data: c,
|
|
33348
33379
|
timestamp: Date.now()
|
|
33349
33380
|
};
|
|
33350
|
-
|
|
33351
|
-
const
|
|
33381
|
+
l2 !== void 0 && (h.ttl = l2);
|
|
33382
|
+
const s2 = await e.lock();
|
|
33352
33383
|
try {
|
|
33353
|
-
|
|
33384
|
+
t.set(u, h);
|
|
33354
33385
|
} finally {
|
|
33355
|
-
|
|
33386
|
+
s2.release();
|
|
33356
33387
|
}
|
|
33357
33388
|
},
|
|
33358
33389
|
delete: async (u) => {
|
|
33359
|
-
const
|
|
33390
|
+
const c = await e.lock();
|
|
33360
33391
|
try {
|
|
33361
|
-
|
|
33392
|
+
t.delete(u);
|
|
33362
33393
|
} finally {
|
|
33363
|
-
|
|
33394
|
+
c.release();
|
|
33364
33395
|
}
|
|
33365
33396
|
},
|
|
33366
33397
|
clear: async () => {
|
|
33367
|
-
const u = await
|
|
33398
|
+
const u = await e.lock();
|
|
33368
33399
|
try {
|
|
33369
|
-
|
|
33400
|
+
t.clear();
|
|
33370
33401
|
} finally {
|
|
33371
33402
|
u.release();
|
|
33372
33403
|
}
|
|
33373
33404
|
},
|
|
33374
33405
|
size: async () => {
|
|
33375
|
-
if (Array.from(
|
|
33406
|
+
if (Array.from(t.entries()).length === 0)
|
|
33376
33407
|
return 0;
|
|
33377
|
-
const
|
|
33408
|
+
const c = await e.lock();
|
|
33378
33409
|
try {
|
|
33379
|
-
return n(),
|
|
33410
|
+
return n(), t.size;
|
|
33380
33411
|
} finally {
|
|
33381
|
-
|
|
33412
|
+
c.release();
|
|
33382
33413
|
}
|
|
33383
33414
|
}
|
|
33384
33415
|
};
|
|
33385
33416
|
};
|
|
33386
|
-
function
|
|
33387
|
-
return `fetch:${
|
|
33417
|
+
function J(t, e, n) {
|
|
33418
|
+
return `fetch:${t}:${e}:${n}`;
|
|
33388
33419
|
}
|
|
33389
|
-
const
|
|
33420
|
+
const ot = (t, e = 6e4, n, o2) => {
|
|
33390
33421
|
const {
|
|
33391
33422
|
cache: r = true,
|
|
33392
|
-
cacheTTL:
|
|
33423
|
+
cacheTTL: a = 3600 * 1e3,
|
|
33393
33424
|
// 1 hour default
|
|
33394
|
-
cacheFailures:
|
|
33395
|
-
failureCacheTTL:
|
|
33425
|
+
cacheFailures: f = true,
|
|
33426
|
+
failureCacheTTL: m = 300 * 1e3
|
|
33396
33427
|
// 5 minutes default for failures
|
|
33397
|
-
} = {}, u = r ? n ||
|
|
33428
|
+
} = {}, u = r ? n || qe() : void 0;
|
|
33398
33429
|
return {
|
|
33399
|
-
rawFetcher: async (
|
|
33430
|
+
rawFetcher: async (l2, h, s2, i) => {
|
|
33400
33431
|
if (r && u) {
|
|
33401
|
-
const
|
|
33402
|
-
if (
|
|
33432
|
+
const g2 = J(l2, h, t), y = await u.get(g2);
|
|
33433
|
+
if (y)
|
|
33403
33434
|
try {
|
|
33404
|
-
const
|
|
33405
|
-
if (
|
|
33406
|
-
return
|
|
33435
|
+
const w = JSON.parse(y);
|
|
33436
|
+
if (w.type === "success")
|
|
33437
|
+
return i?.info(`Cache HIT (success) for URL: ${l2}`), new Response(w.data, {
|
|
33407
33438
|
status: 200,
|
|
33408
33439
|
statusText: "OK",
|
|
33409
33440
|
headers: {
|
|
33410
|
-
"Content-Type":
|
|
33441
|
+
"Content-Type": h,
|
|
33411
33442
|
"X-Cache": "HIT"
|
|
33412
33443
|
}
|
|
33413
33444
|
});
|
|
33414
|
-
if (
|
|
33415
|
-
throw
|
|
33416
|
-
|
|
33417
|
-
`Cache entry type ${
|
|
33445
|
+
if (w.type === "error" && f)
|
|
33446
|
+
throw i?.info(`Cache HIT (error) for URL: ${l2}`), new Error("Cached error");
|
|
33447
|
+
i?.debug(
|
|
33448
|
+
`Cache entry type ${w.type} not eligible for use, cacheFailures: ${f}`
|
|
33418
33449
|
);
|
|
33419
|
-
} catch (
|
|
33420
|
-
if (
|
|
33421
|
-
`Failed to parse cached entry for URL ${
|
|
33422
|
-
|
|
33423
|
-
),
|
|
33424
|
-
|
|
33450
|
+
} catch (w) {
|
|
33451
|
+
if (i?.warn(
|
|
33452
|
+
`Failed to parse cached entry for URL ${l2}:`,
|
|
33453
|
+
w
|
|
33454
|
+
), w instanceof SyntaxError)
|
|
33455
|
+
i?.debug("JSON parse error, continuing to network fetch");
|
|
33425
33456
|
else
|
|
33426
|
-
throw
|
|
33457
|
+
throw w;
|
|
33427
33458
|
}
|
|
33428
33459
|
else
|
|
33429
|
-
|
|
33460
|
+
i?.info(`Cache MISS for URL: ${l2}`);
|
|
33430
33461
|
}
|
|
33431
|
-
let
|
|
33462
|
+
let d2, p2 = null;
|
|
33432
33463
|
try {
|
|
33433
|
-
|
|
33434
|
-
h,
|
|
33464
|
+
d2 = await Yd(
|
|
33435
33465
|
l2,
|
|
33436
|
-
|
|
33466
|
+
h,
|
|
33437
33467
|
t,
|
|
33438
|
-
|
|
33439
|
-
|
|
33468
|
+
e,
|
|
33469
|
+
s2,
|
|
33470
|
+
i
|
|
33440
33471
|
);
|
|
33441
|
-
} catch (
|
|
33442
|
-
if (
|
|
33472
|
+
} catch (g2) {
|
|
33473
|
+
if (p2 = g2, r && u && f)
|
|
33443
33474
|
try {
|
|
33444
|
-
const
|
|
33475
|
+
const y = J(l2, h, t), w = {
|
|
33445
33476
|
type: "error",
|
|
33446
33477
|
data: "",
|
|
33447
33478
|
error: {
|
|
33448
|
-
message:
|
|
33449
|
-
...
|
|
33479
|
+
message: p2.message,
|
|
33480
|
+
...p2.message.includes("HTTP error, status:") && {
|
|
33450
33481
|
status: parseInt(
|
|
33451
|
-
|
|
33482
|
+
p2.message.match(/status: (\d+)/)?.[1] || "0"
|
|
33452
33483
|
)
|
|
33453
33484
|
}
|
|
33454
33485
|
},
|
|
33455
33486
|
timestamp: Date.now()
|
|
33456
33487
|
};
|
|
33457
33488
|
await u.set(
|
|
33458
|
-
|
|
33459
|
-
JSON.stringify(
|
|
33460
|
-
|
|
33461
|
-
),
|
|
33462
|
-
} catch (
|
|
33463
|
-
|
|
33489
|
+
y,
|
|
33490
|
+
JSON.stringify(w),
|
|
33491
|
+
m
|
|
33492
|
+
), i?.debug(`Cached error for URL: ${l2}`);
|
|
33493
|
+
} catch (y) {
|
|
33494
|
+
i?.warn(`Failed to cache error for URL ${l2}:`, y), console.warn("Failed to cache error:", y);
|
|
33464
33495
|
}
|
|
33465
|
-
throw
|
|
33496
|
+
throw p2;
|
|
33466
33497
|
}
|
|
33467
|
-
if (r && u &&
|
|
33498
|
+
if (r && u && d2.ok)
|
|
33468
33499
|
try {
|
|
33469
|
-
const
|
|
33500
|
+
const g2 = await d2.clone().text(), y = J(l2, h, t), w = {
|
|
33470
33501
|
type: "success",
|
|
33471
|
-
data:
|
|
33502
|
+
data: g2,
|
|
33472
33503
|
timestamp: Date.now()
|
|
33473
33504
|
};
|
|
33474
33505
|
await u.set(
|
|
33475
|
-
|
|
33476
|
-
JSON.stringify(
|
|
33477
|
-
|
|
33478
|
-
),
|
|
33479
|
-
} catch (
|
|
33480
|
-
|
|
33481
|
-
}
|
|
33482
|
-
return
|
|
33506
|
+
y,
|
|
33507
|
+
JSON.stringify(w),
|
|
33508
|
+
a
|
|
33509
|
+
), i?.debug(`Cached successful response for URL: ${l2}`);
|
|
33510
|
+
} catch (g2) {
|
|
33511
|
+
i?.warn(`Failed to cache response for URL ${l2}:`, g2), console.warn("Failed to cache response:", g2);
|
|
33512
|
+
}
|
|
33513
|
+
return d2;
|
|
33483
33514
|
},
|
|
33484
|
-
userAgent:
|
|
33515
|
+
userAgent: t
|
|
33485
33516
|
};
|
|
33486
33517
|
};
|
|
33487
33518
|
function setupProcessor(config) {
|
|
33488
33519
|
const plugins = [];
|
|
33489
|
-
const logger =
|
|
33490
|
-
const fetcher =
|
|
33520
|
+
const logger = Ye();
|
|
33521
|
+
const fetcher = ot(
|
|
33491
33522
|
"mark-deco-cli/0.0.1",
|
|
33492
33523
|
5e3,
|
|
33493
|
-
|
|
33524
|
+
qe()
|
|
33494
33525
|
);
|
|
33495
33526
|
const enabledPlugins = config.noPlugins ? [] : Array.isArray(config.plugins) ? config.plugins : ["oembed", "card", "mermaid"];
|
|
33496
33527
|
if (enabledPlugins.includes("oembed") && config.oembed?.enabled !== false) {
|
|
33497
|
-
plugins.push(
|
|
33528
|
+
plugins.push(tt($d, {}));
|
|
33498
33529
|
}
|
|
33499
33530
|
if (enabledPlugins.includes("card") && config.card?.enabled !== false) {
|
|
33500
|
-
plugins.push(
|
|
33531
|
+
plugins.push(rt({}));
|
|
33501
33532
|
}
|
|
33502
33533
|
if (enabledPlugins.includes("mermaid") && config.mermaid?.enabled !== false) {
|
|
33503
|
-
plugins.push(
|
|
33534
|
+
plugins.push(nt({}));
|
|
33504
33535
|
}
|
|
33505
|
-
return
|
|
33536
|
+
return et({
|
|
33506
33537
|
plugins,
|
|
33507
33538
|
logger,
|
|
33508
33539
|
fetcher
|
|
@@ -33539,8 +33570,13 @@ async function main() {
|
|
|
33539
33570
|
).default(false)
|
|
33540
33571
|
).addOption(
|
|
33541
33572
|
new commander.Option(
|
|
33542
|
-
"--
|
|
33543
|
-
"
|
|
33573
|
+
"--heading-base-level <level>",
|
|
33574
|
+
"Base heading level for markdown headings"
|
|
33575
|
+
).argParser((value) => Number.parseInt(value, 10)).default(1)
|
|
33576
|
+
).addOption(
|
|
33577
|
+
new commander.Option(
|
|
33578
|
+
"--header-title-transform <mode>",
|
|
33579
|
+
"Control how the first base-level heading is applied to frontmatter.title (extract, extractAndRemove, none)"
|
|
33544
33580
|
).choices(["extract", "extractAndRemove", "none"])
|
|
33545
33581
|
).addOption(
|
|
33546
33582
|
new commander.Option(
|
|
@@ -33559,14 +33595,16 @@ async function main() {
|
|
|
33559
33595
|
const mergedOptions = { ...config, ...options2 };
|
|
33560
33596
|
const markdown = await readInput(options2.input);
|
|
33561
33597
|
const processor = setupProcessor(mergedOptions);
|
|
33562
|
-
const
|
|
33598
|
+
const headerTitleTransform = options2.headerTitleTransform ?? config.headerTitleTransform ?? "extractAndRemove";
|
|
33599
|
+
const headingBaseLevel = options2.headingBaseLevel ?? config.headingBaseLevel ?? 1;
|
|
33563
33600
|
const result = await processor.process(
|
|
33564
33601
|
markdown,
|
|
33565
33602
|
options2.uniqueIdPrefix || "section",
|
|
33566
33603
|
{
|
|
33567
33604
|
useHierarchicalHeadingId: options2.hierarchicalHeadingId ?? true,
|
|
33568
33605
|
useContentStringHeaderId: options2.contentBasedHeadingId ?? false,
|
|
33569
|
-
|
|
33606
|
+
headingBaseLevel,
|
|
33607
|
+
headerTitleTransform
|
|
33570
33608
|
}
|
|
33571
33609
|
);
|
|
33572
33610
|
await writeOutput(result.html, options2.output);
|