@tricoteuses/assemblee 3.3.8 → 3.4.1
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/README.md +11 -2
- package/lib/{amendements-Co_qQeCl.js → amendements-D2X2TneW.js} +1 -1
- package/lib/{amendements-s-5GIY_X.js → amendements-DSXfagiR.js} +680 -710
- package/lib/cleaners.js +3 -3
- package/lib/derouleur.d.ts +77 -0
- package/lib/derouleur.js +87 -0
- package/lib/eliasse.d.ts +164 -0
- package/lib/eliasse.js +150 -0
- package/lib/git.js +1 -1
- package/lib/index.js +7 -4
- package/lib/{loaders-Bdc1oCGG.js → loaders-DYFDjudN.js} +2 -2
- package/lib/loaders.js +1 -1
- package/lib/parsers.js +493 -449
- package/lib/registries.d.ts +8 -8
- package/lib/schemas/clean/acteurs_et_organes.d.ts +37 -37
- package/lib/schemas/clean/amendements.d.ts +12 -12
- package/lib/schemas/clean/debats.d.ts +26 -26
- package/lib/schemas/clean/dossiers_legislatifs.d.ts +16 -16
- package/lib/schemas/clean/questions.d.ts +122 -122
- package/lib/schemas/clean/scrutins.d.ts +2 -2
- package/lib/schemas/enriched/acteurs_et_organes.d.ts +2 -2
- package/lib/schemas/enriched/amendements.d.ts +9 -9
- package/lib/schemas/enriched/dossiers_legislatifs.d.ts +12 -12
- package/lib/schemas/enriched/questions.d.ts +108 -108
- package/lib/schemas/enriched/scrutins.d.ts +2 -2
- package/lib/schemas/raw/acteurs_et_organes.d.ts +132 -132
- package/lib/schemas/raw/agendas.d.ts +97 -97
- package/lib/schemas/raw/amendements.d.ts +83 -83
- package/lib/schemas/raw/debats.d.ts +51 -51
- package/lib/schemas/raw/dossiers_legislatifs.d.ts +171 -171
- package/lib/schemas/raw/questions.d.ts +222 -222
- package/lib/schemas/raw/scrutins.d.ts +164 -164
- package/lib/scripts/dataset_safety.test.d.ts +1 -0
- package/lib/scripts/forgejo_pending_status.d.ts +9 -0
- package/lib/scripts/forgejo_pending_status.test.d.ts +1 -0
- package/lib/scripts/monitor_open_data_updates.d.ts +2 -0
- package/lib/scripts/shared/dataset-inputs.d.ts +5 -0
- package/lib/{scrutins-UjCZmd8a.js → scrutins-CGHd_VPY.js} +19 -18
- package/lib/zod_errors-DCnjCNGy.js +34 -0
- package/package.json +11 -1
package/lib/parsers.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { _t as e, gt as t,
|
|
2
|
-
import { t as a } from "./amendements-
|
|
1
|
+
import { _t as e, gt as t, ht as n, r, vt as i } from "./amendements-DSXfagiR.js";
|
|
2
|
+
import { t as a } from "./amendements-D2X2TneW.js";
|
|
3
3
|
import o from "node:assert";
|
|
4
4
|
import s from "fs-extra";
|
|
5
5
|
import c from "node:path";
|
|
6
6
|
import l from "deep-equal";
|
|
7
|
-
import u from "js-yaml";
|
|
7
|
+
import * as u from "js-yaml";
|
|
8
8
|
import { parse as d } from "node-html-parser";
|
|
9
9
|
//#region \0rolldown/runtime.js
|
|
10
10
|
var f = Object.create, p = Object.defineProperty, ee = Object.getOwnPropertyDescriptor, m = Object.getOwnPropertyNames, h = Object.getPrototypeOf, g = Object.prototype.hasOwnProperty, _ = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t.exports), v = (e, t) => {
|
|
@@ -20,17 +20,17 @@ var f = Object.create, p = Object.defineProperty, ee = Object.getOwnPropertyDesc
|
|
|
20
20
|
enumerable: !(r = ee(t, s)) || r.enumerable
|
|
21
21
|
});
|
|
22
22
|
return e;
|
|
23
|
-
},
|
|
23
|
+
}, te = (e, t, n) => (n = e == null ? {} : f(h(e)), y(t || !e || !e.__esModule ? p(n, "default", {
|
|
24
24
|
value: e,
|
|
25
25
|
enumerable: !0
|
|
26
|
-
}) : n, e)),
|
|
26
|
+
}) : n, e)), b;
|
|
27
27
|
(function(e) {
|
|
28
28
|
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";
|
|
29
|
-
})(
|
|
30
|
-
function
|
|
31
|
-
return e.type ===
|
|
29
|
+
})(b || (b = {}));
|
|
30
|
+
function x(e) {
|
|
31
|
+
return e.type === b.Tag || e.type === b.Script || e.type === b.Style;
|
|
32
32
|
}
|
|
33
|
-
var
|
|
33
|
+
var ne = b.Root, re = b.Text, ie = b.Directive, ae = b.Comment, oe = b.Script, se = b.Style, ce = b.Tag, le = b.CDATA, ue = b.Doctype, de = class {
|
|
34
34
|
constructor() {
|
|
35
35
|
this.parent = null, this.prev = null, this.next = null, this.startIndex = null, this.endIndex = null;
|
|
36
36
|
}
|
|
@@ -53,9 +53,9 @@ var te = x.Root, ne = x.Text, re = x.Directive, ie = x.Comment, ae = x.Script, o
|
|
|
53
53
|
this.next = e;
|
|
54
54
|
}
|
|
55
55
|
cloneNode(e = !1) {
|
|
56
|
-
return
|
|
56
|
+
return Te(this, e);
|
|
57
57
|
}
|
|
58
|
-
},
|
|
58
|
+
}, fe = class extends de {
|
|
59
59
|
constructor(e) {
|
|
60
60
|
super(), this.data = e;
|
|
61
61
|
}
|
|
@@ -65,28 +65,28 @@ var te = x.Root, ne = x.Text, re = x.Directive, ie = x.Comment, ae = x.Script, o
|
|
|
65
65
|
set nodeValue(e) {
|
|
66
66
|
this.data = e;
|
|
67
67
|
}
|
|
68
|
-
},
|
|
68
|
+
}, pe = class extends fe {
|
|
69
69
|
constructor() {
|
|
70
|
-
super(...arguments), this.type =
|
|
70
|
+
super(...arguments), this.type = b.Text;
|
|
71
71
|
}
|
|
72
72
|
get nodeType() {
|
|
73
73
|
return 3;
|
|
74
74
|
}
|
|
75
|
-
},
|
|
75
|
+
}, me = class extends fe {
|
|
76
76
|
constructor() {
|
|
77
|
-
super(...arguments), this.type =
|
|
77
|
+
super(...arguments), this.type = b.Comment;
|
|
78
78
|
}
|
|
79
79
|
get nodeType() {
|
|
80
80
|
return 8;
|
|
81
81
|
}
|
|
82
|
-
},
|
|
82
|
+
}, he = class extends fe {
|
|
83
83
|
constructor(e, t) {
|
|
84
|
-
super(t), this.name = e, this.type =
|
|
84
|
+
super(t), this.name = e, this.type = b.Directive;
|
|
85
85
|
}
|
|
86
86
|
get nodeType() {
|
|
87
87
|
return 1;
|
|
88
88
|
}
|
|
89
|
-
},
|
|
89
|
+
}, ge = class extends de {
|
|
90
90
|
constructor(e) {
|
|
91
91
|
super(), this.children = e;
|
|
92
92
|
}
|
|
@@ -102,22 +102,22 @@ var te = x.Root, ne = x.Text, re = x.Directive, ie = x.Comment, ae = x.Script, o
|
|
|
102
102
|
set childNodes(e) {
|
|
103
103
|
this.children = e;
|
|
104
104
|
}
|
|
105
|
-
},
|
|
105
|
+
}, _e = class extends ge {
|
|
106
106
|
constructor() {
|
|
107
|
-
super(...arguments), this.type =
|
|
107
|
+
super(...arguments), this.type = b.CDATA;
|
|
108
108
|
}
|
|
109
109
|
get nodeType() {
|
|
110
110
|
return 4;
|
|
111
111
|
}
|
|
112
|
-
},
|
|
112
|
+
}, ve = class extends ge {
|
|
113
113
|
constructor() {
|
|
114
|
-
super(...arguments), this.type =
|
|
114
|
+
super(...arguments), this.type = b.Root;
|
|
115
115
|
}
|
|
116
116
|
get nodeType() {
|
|
117
117
|
return 9;
|
|
118
118
|
}
|
|
119
|
-
},
|
|
120
|
-
constructor(e, t, n = [], r = e === "script" ?
|
|
119
|
+
}, ye = class extends ge {
|
|
120
|
+
constructor(e, t, n = [], r = e === "script" ? b.Script : e === "style" ? b.Style : b.Tag) {
|
|
121
121
|
super(n), this.name = e, this.attribs = t, this.type = r;
|
|
122
122
|
}
|
|
123
123
|
get nodeType() {
|
|
@@ -138,66 +138,66 @@ var te = x.Root, ne = x.Text, re = x.Directive, ie = x.Comment, ae = x.Script, o
|
|
|
138
138
|
}));
|
|
139
139
|
}
|
|
140
140
|
};
|
|
141
|
-
function
|
|
142
|
-
return
|
|
143
|
-
}
|
|
144
|
-
function ye(e) {
|
|
145
|
-
return e.type === x.CDATA;
|
|
141
|
+
function S(e) {
|
|
142
|
+
return x(e);
|
|
146
143
|
}
|
|
147
144
|
function be(e) {
|
|
148
|
-
return e.type ===
|
|
145
|
+
return e.type === b.CDATA;
|
|
149
146
|
}
|
|
150
147
|
function xe(e) {
|
|
151
|
-
return e.type ===
|
|
148
|
+
return e.type === b.Text;
|
|
152
149
|
}
|
|
153
150
|
function Se(e) {
|
|
154
|
-
return e.type ===
|
|
151
|
+
return e.type === b.Comment;
|
|
155
152
|
}
|
|
156
153
|
function Ce(e) {
|
|
157
|
-
return e.type ===
|
|
154
|
+
return e.type === b.Directive;
|
|
158
155
|
}
|
|
159
|
-
function
|
|
156
|
+
function we(e) {
|
|
157
|
+
return e.type === b.Root;
|
|
158
|
+
}
|
|
159
|
+
function C(e) {
|
|
160
160
|
return Object.prototype.hasOwnProperty.call(e, "children");
|
|
161
161
|
}
|
|
162
|
-
function
|
|
162
|
+
function Te(e, t = !1) {
|
|
163
163
|
let n;
|
|
164
|
-
if (
|
|
165
|
-
else if (
|
|
166
|
-
else if (
|
|
167
|
-
let r = t ?
|
|
164
|
+
if (xe(e)) n = new pe(e.data);
|
|
165
|
+
else if (Se(e)) n = new me(e.data);
|
|
166
|
+
else if (S(e)) {
|
|
167
|
+
let r = t ? Ee(e.children) : [], i = new ye(e.name, { ...e.attribs }, r);
|
|
168
168
|
r.forEach((e) => e.parent = i), e.namespace != null && (i.namespace = e.namespace), e["x-attribsNamespace"] && (i["x-attribsNamespace"] = { ...e["x-attribsNamespace"] }), e["x-attribsPrefix"] && (i["x-attribsPrefix"] = { ...e["x-attribsPrefix"] }), n = i;
|
|
169
|
-
} else if (
|
|
170
|
-
let r = t ?
|
|
169
|
+
} else if (be(e)) {
|
|
170
|
+
let r = t ? Ee(e.children) : [], i = new _e(r);
|
|
171
171
|
r.forEach((e) => e.parent = i), n = i;
|
|
172
|
-
} else if (
|
|
173
|
-
let r = t ?
|
|
172
|
+
} else if (we(e)) {
|
|
173
|
+
let r = t ? Ee(e.children) : [], i = new ve(r);
|
|
174
174
|
r.forEach((e) => e.parent = i), e["x-mode"] && (i["x-mode"] = e["x-mode"]), n = i;
|
|
175
|
-
} else if (
|
|
176
|
-
let t = new
|
|
175
|
+
} else if (Ce(e)) {
|
|
176
|
+
let t = new he(e.name, e.data);
|
|
177
177
|
e["x-name"] != null && (t["x-name"] = e["x-name"], t["x-publicId"] = e["x-publicId"], t["x-systemId"] = e["x-systemId"]), n = t;
|
|
178
178
|
} else throw Error(`Not implemented yet: ${e.type}`);
|
|
179
179
|
return n.startIndex = e.startIndex, n.endIndex = e.endIndex, e.sourceCodeLocation != null && (n.sourceCodeLocation = e.sourceCodeLocation), n;
|
|
180
180
|
}
|
|
181
|
-
function
|
|
182
|
-
let t = e.map((e) =>
|
|
181
|
+
function Ee(e) {
|
|
182
|
+
let t = e.map((e) => Te(e, !0));
|
|
183
183
|
for (let e = 1; e < t.length; e++) t[e].prev = t[e - 1], t[e - 1].next = t[e];
|
|
184
184
|
return t;
|
|
185
185
|
}
|
|
186
186
|
//#endregion
|
|
187
187
|
//#region node_modules/domhandler/lib/esm/index.js
|
|
188
|
-
var
|
|
188
|
+
var De = {
|
|
189
189
|
withStartIndices: !1,
|
|
190
190
|
withEndIndices: !1,
|
|
191
191
|
xmlMode: !1
|
|
192
|
-
},
|
|
192
|
+
}, Oe = class {
|
|
193
193
|
constructor(e, t, n) {
|
|
194
|
-
this.dom = [], this.root = new
|
|
194
|
+
this.dom = [], this.root = new ve(this.dom), this.done = !1, this.tagStack = [this.root], this.lastNode = null, this.parser = null, typeof t == "function" && (n = t, t = De), typeof e == "object" && (t = e, e = void 0), this.callback = e ?? null, this.options = t ?? De, this.elementCB = n ?? null;
|
|
195
195
|
}
|
|
196
196
|
onparserinit(e) {
|
|
197
197
|
this.parser = e;
|
|
198
198
|
}
|
|
199
199
|
onreset() {
|
|
200
|
-
this.dom = [], this.root = new
|
|
200
|
+
this.dom = [], this.root = new ve(this.dom), this.done = !1, this.tagStack = [this.root], this.lastNode = null, this.parser = null;
|
|
201
201
|
}
|
|
202
202
|
onend() {
|
|
203
203
|
this.done || (this.done = !0, this.parser = null, this.handleCallback(null));
|
|
@@ -211,37 +211,37 @@ var Ee = {
|
|
|
211
211
|
this.options.withEndIndices && (e.endIndex = this.parser.endIndex), this.elementCB && this.elementCB(e);
|
|
212
212
|
}
|
|
213
213
|
onopentag(e, t) {
|
|
214
|
-
let n = new
|
|
214
|
+
let n = new ye(e, t, void 0, this.options.xmlMode ? b.Tag : void 0);
|
|
215
215
|
this.addNode(n), this.tagStack.push(n);
|
|
216
216
|
}
|
|
217
217
|
ontext(e) {
|
|
218
218
|
let { lastNode: t } = this;
|
|
219
|
-
if (t && t.type ===
|
|
219
|
+
if (t && t.type === b.Text) t.data += e, this.options.withEndIndices && (t.endIndex = this.parser.endIndex);
|
|
220
220
|
else {
|
|
221
|
-
let t = new
|
|
221
|
+
let t = new pe(e);
|
|
222
222
|
this.addNode(t), this.lastNode = t;
|
|
223
223
|
}
|
|
224
224
|
}
|
|
225
225
|
oncomment(e) {
|
|
226
|
-
if (this.lastNode && this.lastNode.type ===
|
|
226
|
+
if (this.lastNode && this.lastNode.type === b.Comment) {
|
|
227
227
|
this.lastNode.data += e;
|
|
228
228
|
return;
|
|
229
229
|
}
|
|
230
|
-
let t = new
|
|
230
|
+
let t = new me(e);
|
|
231
231
|
this.addNode(t), this.lastNode = t;
|
|
232
232
|
}
|
|
233
233
|
oncommentend() {
|
|
234
234
|
this.lastNode = null;
|
|
235
235
|
}
|
|
236
236
|
oncdatastart() {
|
|
237
|
-
let e = new
|
|
237
|
+
let e = new pe(""), t = new _e([e]);
|
|
238
238
|
this.addNode(t), e.parent = t, this.lastNode = e;
|
|
239
239
|
}
|
|
240
240
|
oncdataend() {
|
|
241
241
|
this.lastNode = null;
|
|
242
242
|
}
|
|
243
243
|
onprocessinginstruction(e, t) {
|
|
244
|
-
let n = new
|
|
244
|
+
let n = new he(e, t);
|
|
245
245
|
this.addNode(n);
|
|
246
246
|
}
|
|
247
247
|
handleCallback(e) {
|
|
@@ -252,38 +252,38 @@ var Ee = {
|
|
|
252
252
|
let t = this.tagStack[this.tagStack.length - 1], n = t.children[t.children.length - 1];
|
|
253
253
|
this.options.withStartIndices && (e.startIndex = this.parser.startIndex), this.options.withEndIndices && (e.endIndex = this.parser.endIndex), t.children.push(e), n && (e.prev = n, n.next = e), e.parent = t, this.lastNode = null;
|
|
254
254
|
}
|
|
255
|
-
},
|
|
255
|
+
}, ke = /["&'<>$\x80-\uFFFF]/g, Ae = /* @__PURE__ */ new Map([
|
|
256
256
|
[34, """],
|
|
257
257
|
[38, "&"],
|
|
258
258
|
[39, "'"],
|
|
259
259
|
[60, "<"],
|
|
260
260
|
[62, ">"]
|
|
261
|
-
]),
|
|
262
|
-
function
|
|
261
|
+
]), je = String.prototype.codePointAt == null ? (e, t) => (e.charCodeAt(t) & 64512) == 55296 ? (e.charCodeAt(t) - 55296) * 1024 + e.charCodeAt(t + 1) - 56320 + 65536 : e.charCodeAt(t) : (e, t) => e.codePointAt(t);
|
|
262
|
+
function Me(e) {
|
|
263
263
|
let t = "", n = 0, r;
|
|
264
|
-
for (; (r =
|
|
265
|
-
let i = r.index, a = e.charCodeAt(i), o =
|
|
266
|
-
o === void 0 ? (t += `${e.substring(n, i)}&#x${
|
|
264
|
+
for (; (r = ke.exec(e)) !== null;) {
|
|
265
|
+
let i = r.index, a = e.charCodeAt(i), o = Ae.get(a);
|
|
266
|
+
o === void 0 ? (t += `${e.substring(n, i)}&#x${je(e, i).toString(16)};`, n = ke.lastIndex += Number((a & 64512) == 55296)) : (t += e.substring(n, i) + o, n = i + 1);
|
|
267
267
|
}
|
|
268
268
|
return t + e.substr(n);
|
|
269
269
|
}
|
|
270
|
-
function
|
|
270
|
+
function Ne(e, t) {
|
|
271
271
|
return function(n) {
|
|
272
272
|
let r, i = 0, a = "";
|
|
273
273
|
for (; r = e.exec(n);) i !== r.index && (a += n.substring(i, r.index)), a += t.get(r[0].charCodeAt(0)), i = r.index + 1;
|
|
274
274
|
return a + n.substring(i);
|
|
275
275
|
};
|
|
276
276
|
}
|
|
277
|
-
var
|
|
277
|
+
var Pe = Ne(/["&\u00A0]/g, /* @__PURE__ */ new Map([
|
|
278
278
|
[34, """],
|
|
279
279
|
[38, "&"],
|
|
280
280
|
[160, " "]
|
|
281
|
-
])),
|
|
281
|
+
])), Fe = Ne(/[&<>\u00A0]/g, /* @__PURE__ */ new Map([
|
|
282
282
|
[38, "&"],
|
|
283
283
|
[60, "<"],
|
|
284
284
|
[62, ">"],
|
|
285
285
|
[160, " "]
|
|
286
|
-
])),
|
|
286
|
+
])), Ie = new Map((/* @__PURE__ */ "altGlyph.altGlyphDef.altGlyphItem.animateColor.animateMotion.animateTransform.clipPath.feBlend.feColorMatrix.feComponentTransfer.feComposite.feConvolveMatrix.feDiffuseLighting.feDisplacementMap.feDistantLight.feDropShadow.feFlood.feFuncA.feFuncB.feFuncG.feFuncR.feGaussianBlur.feImage.feMerge.feMergeNode.feMorphology.feOffset.fePointLight.feSpecularLighting.feSpotLight.feTile.feTurbulence.foreignObject.glyphRef.linearGradient.radialGradient.textPath".split(".")).map((e) => [e.toLowerCase(), e])), Le = new Map((/* @__PURE__ */ "definitionURL.attributeName.attributeType.baseFrequency.baseProfile.calcMode.clipPathUnits.diffuseConstant.edgeMode.filterUnits.glyphRef.gradientTransform.gradientUnits.kernelMatrix.kernelUnitLength.keyPoints.keySplines.keyTimes.lengthAdjust.limitingConeAngle.markerHeight.markerUnits.markerWidth.maskContentUnits.maskUnits.numOctaves.pathLength.patternContentUnits.patternTransform.patternUnits.pointsAtX.pointsAtY.pointsAtZ.preserveAlpha.preserveAspectRatio.primitiveUnits.refX.refY.repeatCount.repeatDur.requiredExtensions.requiredFeatures.specularConstant.specularExponent.spreadMethod.startOffset.stdDeviation.stitchTiles.surfaceScale.systemLanguage.tableValues.targetX.targetY.textLength.viewBox.viewTarget.xChannelSelector.yChannelSelector.zoomAndPan".split(".")).map((e) => [e.toLowerCase(), e])), Re = /* @__PURE__ */ new Set([
|
|
287
287
|
"style",
|
|
288
288
|
"script",
|
|
289
289
|
"xmp",
|
|
@@ -293,18 +293,18 @@ var Ne = Me(/["&\u00A0]/g, /* @__PURE__ */ new Map([
|
|
|
293
293
|
"plaintext",
|
|
294
294
|
"noscript"
|
|
295
295
|
]);
|
|
296
|
-
function
|
|
296
|
+
function ze(e) {
|
|
297
297
|
return e.replace(/"/g, """);
|
|
298
298
|
}
|
|
299
|
-
function
|
|
299
|
+
function Be(e, t) {
|
|
300
300
|
if (!e) return;
|
|
301
|
-
let n = (t.encodeEntities ?? t.decodeEntities) === !1 ?
|
|
301
|
+
let n = (t.encodeEntities ?? t.decodeEntities) === !1 ? ze : t.xmlMode || t.encodeEntities !== "utf8" ? Me : Pe;
|
|
302
302
|
return Object.keys(e).map((r) => {
|
|
303
303
|
let i = e[r] ?? "";
|
|
304
|
-
return t.xmlMode === "foreign" && (r =
|
|
304
|
+
return t.xmlMode === "foreign" && (r = Le.get(r) ?? r), !t.emptyAttrs && !t.xmlMode && i === "" ? r : `${r}="${n(i)}"`;
|
|
305
305
|
}).join(" ");
|
|
306
306
|
}
|
|
307
|
-
var
|
|
307
|
+
var Ve = /* @__PURE__ */ new Set([
|
|
308
308
|
"area",
|
|
309
309
|
"base",
|
|
310
310
|
"basefont",
|
|
@@ -325,25 +325,25 @@ var Be = /* @__PURE__ */ new Set([
|
|
|
325
325
|
"track",
|
|
326
326
|
"wbr"
|
|
327
327
|
]);
|
|
328
|
-
function
|
|
328
|
+
function He(e, t = {}) {
|
|
329
329
|
let n = "length" in e ? e : [e], r = "";
|
|
330
|
-
for (let e = 0; e < n.length; e++) r +=
|
|
330
|
+
for (let e = 0; e < n.length; e++) r += Ue(n[e], t);
|
|
331
331
|
return r;
|
|
332
332
|
}
|
|
333
|
-
function
|
|
333
|
+
function Ue(e, t) {
|
|
334
334
|
switch (e.type) {
|
|
335
|
-
case
|
|
336
|
-
case
|
|
337
|
-
case
|
|
338
|
-
case
|
|
339
|
-
case
|
|
340
|
-
case ae:
|
|
335
|
+
case ne: return He(e.children, t);
|
|
336
|
+
case ue:
|
|
337
|
+
case ie: return qe(e);
|
|
338
|
+
case ae: return Xe(e);
|
|
339
|
+
case le: return Ye(e);
|
|
341
340
|
case oe:
|
|
342
|
-
case se:
|
|
343
|
-
case
|
|
341
|
+
case se:
|
|
342
|
+
case ce: return Ke(e, t);
|
|
343
|
+
case re: return Je(e, t);
|
|
344
344
|
}
|
|
345
345
|
}
|
|
346
|
-
var
|
|
346
|
+
var We = /* @__PURE__ */ new Set([
|
|
347
347
|
"mi",
|
|
348
348
|
"mo",
|
|
349
349
|
"mn",
|
|
@@ -353,93 +353,93 @@ var Ue = /* @__PURE__ */ new Set([
|
|
|
353
353
|
"foreignObject",
|
|
354
354
|
"desc",
|
|
355
355
|
"title"
|
|
356
|
-
]),
|
|
357
|
-
function
|
|
358
|
-
t.xmlMode === "foreign" && (e.name =
|
|
356
|
+
]), Ge = /* @__PURE__ */ new Set(["svg", "math"]);
|
|
357
|
+
function Ke(e, t) {
|
|
358
|
+
t.xmlMode === "foreign" && (e.name = Ie.get(e.name) ?? e.name, e.parent && We.has(e.parent.name) && (t = {
|
|
359
359
|
...t,
|
|
360
360
|
xmlMode: !1
|
|
361
|
-
})), !t.xmlMode &&
|
|
361
|
+
})), !t.xmlMode && Ge.has(e.name) && (t = {
|
|
362
362
|
...t,
|
|
363
363
|
xmlMode: "foreign"
|
|
364
364
|
});
|
|
365
|
-
let n = `<${e.name}`, r =
|
|
366
|
-
return r && (n += ` ${r}`), e.children.length === 0 && (t.xmlMode ? t.selfClosingTags !== !1 : t.selfClosingTags &&
|
|
365
|
+
let n = `<${e.name}`, r = Be(e.attribs, t);
|
|
366
|
+
return r && (n += ` ${r}`), e.children.length === 0 && (t.xmlMode ? t.selfClosingTags !== !1 : t.selfClosingTags && Ve.has(e.name)) ? (t.xmlMode || (n += " "), n += "/>") : (n += ">", e.children.length > 0 && (n += He(e.children, t)), (t.xmlMode || !Ve.has(e.name)) && (n += `</${e.name}>`)), n;
|
|
367
367
|
}
|
|
368
|
-
function
|
|
368
|
+
function qe(e) {
|
|
369
369
|
return `<${e.data}>`;
|
|
370
370
|
}
|
|
371
|
-
function
|
|
371
|
+
function Je(e, t) {
|
|
372
372
|
let n = e.data || "";
|
|
373
|
-
return (t.encodeEntities ?? t.decodeEntities) !== !1 && !(!t.xmlMode && e.parent &&
|
|
373
|
+
return (t.encodeEntities ?? t.decodeEntities) !== !1 && !(!t.xmlMode && e.parent && Re.has(e.parent.name)) && (n = t.xmlMode || t.encodeEntities !== "utf8" ? Me(n) : Fe(n)), n;
|
|
374
374
|
}
|
|
375
|
-
function
|
|
375
|
+
function Ye(e) {
|
|
376
376
|
return `<![CDATA[${e.children[0].data}]]>`;
|
|
377
377
|
}
|
|
378
|
-
function
|
|
378
|
+
function Xe(e) {
|
|
379
379
|
return `<!--${e.data}-->`;
|
|
380
380
|
}
|
|
381
381
|
//#endregion
|
|
382
382
|
//#region node_modules/domutils/lib/esm/stringify.js
|
|
383
|
-
function Xe(e, t) {
|
|
384
|
-
return Ve(e, t);
|
|
385
|
-
}
|
|
386
383
|
function Ze(e, t) {
|
|
387
|
-
return
|
|
384
|
+
return He(e, t);
|
|
388
385
|
}
|
|
389
|
-
function Qe(e) {
|
|
390
|
-
return
|
|
386
|
+
function Qe(e, t) {
|
|
387
|
+
return C(e) ? e.children.map((e) => Ze(e, t)).join("") : "";
|
|
391
388
|
}
|
|
392
389
|
function $e(e) {
|
|
393
|
-
return Array.isArray(e) ? e.map($e).join("") :
|
|
390
|
+
return Array.isArray(e) ? e.map($e).join("") : S(e) ? e.name === "br" ? "\n" : $e(e.children) : be(e) ? $e(e.children) : xe(e) ? e.data : "";
|
|
394
391
|
}
|
|
395
392
|
function et(e) {
|
|
396
|
-
return Array.isArray(e) ? e.map(et).join("") :
|
|
393
|
+
return Array.isArray(e) ? e.map(et).join("") : C(e) && !Se(e) ? et(e.children) : xe(e) ? e.data : "";
|
|
397
394
|
}
|
|
398
|
-
//#endregion
|
|
399
|
-
//#region node_modules/domutils/lib/esm/traversal.js
|
|
400
395
|
function tt(e) {
|
|
401
|
-
return
|
|
396
|
+
return Array.isArray(e) ? e.map(tt).join("") : C(e) && (e.type === b.Tag || be(e)) ? tt(e.children) : xe(e) ? e.data : "";
|
|
402
397
|
}
|
|
398
|
+
//#endregion
|
|
399
|
+
//#region node_modules/domutils/lib/esm/traversal.js
|
|
403
400
|
function nt(e) {
|
|
404
|
-
return e.
|
|
401
|
+
return C(e) ? e.children : [];
|
|
405
402
|
}
|
|
406
403
|
function rt(e) {
|
|
407
|
-
|
|
408
|
-
|
|
404
|
+
return e.parent || null;
|
|
405
|
+
}
|
|
406
|
+
function it(e) {
|
|
407
|
+
let t = rt(e);
|
|
408
|
+
if (t != null) return nt(t);
|
|
409
409
|
let n = [e], { prev: r, next: i } = e;
|
|
410
410
|
for (; r != null;) n.unshift(r), {prev: r} = r;
|
|
411
411
|
for (; i != null;) n.push(i), {next: i} = i;
|
|
412
412
|
return n;
|
|
413
413
|
}
|
|
414
|
-
function
|
|
414
|
+
function at(e, t) {
|
|
415
415
|
return e.attribs?.[t];
|
|
416
416
|
}
|
|
417
|
-
function
|
|
417
|
+
function ot(e, t) {
|
|
418
418
|
return e.attribs != null && Object.prototype.hasOwnProperty.call(e.attribs, t) && e.attribs[t] != null;
|
|
419
419
|
}
|
|
420
|
-
function
|
|
420
|
+
function st(e) {
|
|
421
421
|
return e.name;
|
|
422
422
|
}
|
|
423
|
-
function
|
|
423
|
+
function ct(e) {
|
|
424
424
|
let { next: t } = e;
|
|
425
|
-
for (; t !== null && !
|
|
425
|
+
for (; t !== null && !S(t);) ({next: t} = t);
|
|
426
426
|
return t;
|
|
427
427
|
}
|
|
428
|
-
function
|
|
428
|
+
function lt(e) {
|
|
429
429
|
let { prev: t } = e;
|
|
430
|
-
for (; t !== null && !
|
|
430
|
+
for (; t !== null && !S(t);) ({prev: t} = t);
|
|
431
431
|
return t;
|
|
432
432
|
}
|
|
433
433
|
//#endregion
|
|
434
434
|
//#region node_modules/domutils/lib/esm/manipulation.js
|
|
435
|
-
function
|
|
435
|
+
function ut(e) {
|
|
436
436
|
if (e.prev && (e.prev.next = e.next), e.next && (e.next.prev = e.prev), e.parent) {
|
|
437
437
|
let t = e.parent.children, n = t.lastIndexOf(e);
|
|
438
438
|
n >= 0 && t.splice(n, 1);
|
|
439
439
|
}
|
|
440
440
|
e.next = null, e.prev = null, e.parent = null;
|
|
441
441
|
}
|
|
442
|
-
function
|
|
442
|
+
function dt(e, t) {
|
|
443
443
|
let n = t.prev = e.prev;
|
|
444
444
|
n && (n.next = t);
|
|
445
445
|
let r = t.next = e.next;
|
|
@@ -450,14 +450,14 @@ function ut(e, t) {
|
|
|
450
450
|
n[n.lastIndexOf(e)] = t, e.parent = null;
|
|
451
451
|
}
|
|
452
452
|
}
|
|
453
|
-
function
|
|
454
|
-
if (
|
|
453
|
+
function ft(e, t) {
|
|
454
|
+
if (ut(t), t.next = null, t.parent = e, e.children.push(t) > 1) {
|
|
455
455
|
let n = e.children[e.children.length - 2];
|
|
456
456
|
n.next = t, t.prev = n;
|
|
457
457
|
} else t.prev = null;
|
|
458
458
|
}
|
|
459
|
-
function
|
|
460
|
-
|
|
459
|
+
function pt(e, t) {
|
|
460
|
+
ut(t);
|
|
461
461
|
let { parent: n } = e, r = e.next;
|
|
462
462
|
if (t.next = r, t.prev = e, e.next = t, t.parent = n, r) {
|
|
463
463
|
if (r.prev = t, n) {
|
|
@@ -466,14 +466,14 @@ function ft(e, t) {
|
|
|
466
466
|
}
|
|
467
467
|
} else n && n.children.push(t);
|
|
468
468
|
}
|
|
469
|
-
function
|
|
470
|
-
if (
|
|
469
|
+
function mt(e, t) {
|
|
470
|
+
if (ut(t), t.parent = e, t.prev = null, e.children.unshift(t) !== 1) {
|
|
471
471
|
let n = e.children[1];
|
|
472
472
|
n.prev = t, t.next = n;
|
|
473
473
|
} else t.next = null;
|
|
474
474
|
}
|
|
475
|
-
function
|
|
476
|
-
|
|
475
|
+
function ht(e, t) {
|
|
476
|
+
ut(t);
|
|
477
477
|
let { parent: n } = e;
|
|
478
478
|
if (n) {
|
|
479
479
|
let r = n.children;
|
|
@@ -483,10 +483,10 @@ function mt(e, t) {
|
|
|
483
483
|
}
|
|
484
484
|
//#endregion
|
|
485
485
|
//#region node_modules/domutils/lib/esm/querying.js
|
|
486
|
-
function
|
|
487
|
-
return
|
|
486
|
+
function gt(e, t, n = !0, r = Infinity) {
|
|
487
|
+
return _t(e, Array.isArray(t) ? t : [t], n, r);
|
|
488
488
|
}
|
|
489
|
-
function
|
|
489
|
+
function _t(e, t, n, r) {
|
|
490
490
|
let i = [], a = [Array.isArray(t) ? t : [t]], o = [0];
|
|
491
491
|
for (;;) {
|
|
492
492
|
if (o[0] >= a[0].length) {
|
|
@@ -496,28 +496,28 @@ function gt(e, t, n, r) {
|
|
|
496
496
|
}
|
|
497
497
|
let t = a[0][o[0]++];
|
|
498
498
|
if (e(t) && (i.push(t), --r <= 0)) return i;
|
|
499
|
-
n &&
|
|
499
|
+
n && C(t) && t.children.length > 0 && (o.unshift(0), a.unshift(t.children));
|
|
500
500
|
}
|
|
501
501
|
}
|
|
502
|
-
function
|
|
502
|
+
function vt(e, t) {
|
|
503
503
|
return t.find(e);
|
|
504
504
|
}
|
|
505
|
-
function
|
|
505
|
+
function yt(e, t, n = !0) {
|
|
506
506
|
let r = Array.isArray(t) ? t : [t];
|
|
507
507
|
for (let t = 0; t < r.length; t++) {
|
|
508
508
|
let i = r[t];
|
|
509
|
-
if (
|
|
510
|
-
if (n &&
|
|
511
|
-
let t =
|
|
509
|
+
if (S(i) && e(i)) return i;
|
|
510
|
+
if (n && C(i) && i.children.length > 0) {
|
|
511
|
+
let t = yt(e, i.children, !0);
|
|
512
512
|
if (t) return t;
|
|
513
513
|
}
|
|
514
514
|
}
|
|
515
515
|
return null;
|
|
516
516
|
}
|
|
517
|
-
function yt(e, t) {
|
|
518
|
-
return (Array.isArray(t) ? t : [t]).some((t) => C(t) && e(t) || w(t) && yt(e, t.children));
|
|
519
|
-
}
|
|
520
517
|
function bt(e, t) {
|
|
518
|
+
return (Array.isArray(t) ? t : [t]).some((t) => S(t) && e(t) || C(t) && bt(e, t.children));
|
|
519
|
+
}
|
|
520
|
+
function xt(e, t) {
|
|
521
521
|
let n = [], r = [Array.isArray(t) ? t : [t]], i = [0];
|
|
522
522
|
for (;;) {
|
|
523
523
|
if (i[0] >= r[0].length) {
|
|
@@ -526,58 +526,58 @@ function bt(e, t) {
|
|
|
526
526
|
continue;
|
|
527
527
|
}
|
|
528
528
|
let t = r[0][i[0]++];
|
|
529
|
-
|
|
529
|
+
S(t) && e(t) && n.push(t), C(t) && t.children.length > 0 && (i.unshift(0), r.unshift(t.children));
|
|
530
530
|
}
|
|
531
531
|
}
|
|
532
532
|
//#endregion
|
|
533
533
|
//#region node_modules/domutils/lib/esm/legacy.js
|
|
534
|
-
var
|
|
534
|
+
var St = {
|
|
535
535
|
tag_name(e) {
|
|
536
|
-
return typeof e == "function" ? (t) =>
|
|
536
|
+
return typeof e == "function" ? (t) => S(t) && e(t.name) : e === "*" ? S : (t) => S(t) && t.name === e;
|
|
537
537
|
},
|
|
538
538
|
tag_type(e) {
|
|
539
539
|
return typeof e == "function" ? (t) => e(t.type) : (t) => t.type === e;
|
|
540
540
|
},
|
|
541
541
|
tag_contains(e) {
|
|
542
|
-
return typeof e == "function" ? (t) =>
|
|
542
|
+
return typeof e == "function" ? (t) => xe(t) && e(t.data) : (t) => xe(t) && t.data === e;
|
|
543
543
|
}
|
|
544
544
|
};
|
|
545
|
-
function St(e, t) {
|
|
546
|
-
return typeof t == "function" ? (n) => C(n) && t(n.attribs[e]) : (n) => C(n) && n.attribs[e] === t;
|
|
547
|
-
}
|
|
548
545
|
function Ct(e, t) {
|
|
546
|
+
return typeof t == "function" ? (n) => S(n) && t(n.attribs[e]) : (n) => S(n) && n.attribs[e] === t;
|
|
547
|
+
}
|
|
548
|
+
function wt(e, t) {
|
|
549
549
|
return (n) => e(n) || t(n);
|
|
550
550
|
}
|
|
551
|
-
function
|
|
551
|
+
function Tt(e) {
|
|
552
552
|
let t = Object.keys(e).map((t) => {
|
|
553
553
|
let n = e[t];
|
|
554
|
-
return Object.prototype.hasOwnProperty.call(
|
|
554
|
+
return Object.prototype.hasOwnProperty.call(St, t) ? St[t](n) : Ct(t, n);
|
|
555
555
|
});
|
|
556
|
-
return t.length === 0 ? null : t.reduce(
|
|
556
|
+
return t.length === 0 ? null : t.reduce(wt);
|
|
557
557
|
}
|
|
558
|
-
function
|
|
559
|
-
let n =
|
|
560
|
-
return
|
|
558
|
+
function Et(e, t) {
|
|
559
|
+
let n = Tt(e);
|
|
560
|
+
return n ? n(t) : !0;
|
|
561
561
|
}
|
|
562
|
-
function
|
|
563
|
-
let i =
|
|
564
|
-
return i ?
|
|
562
|
+
function Dt(e, t, n, r = Infinity) {
|
|
563
|
+
let i = Tt(e);
|
|
564
|
+
return i ? gt(i, t, n, r) : [];
|
|
565
565
|
}
|
|
566
|
-
function
|
|
567
|
-
return Array.isArray(t) || (t = [t]),
|
|
568
|
-
}
|
|
569
|
-
function Ot(e, t, n = !0, r = Infinity) {
|
|
570
|
-
return ht(xt.tag_name(e), t, n, r);
|
|
566
|
+
function Ot(e, t, n = !0) {
|
|
567
|
+
return Array.isArray(t) || (t = [t]), yt(Ct("id", e), t, n);
|
|
571
568
|
}
|
|
572
569
|
function kt(e, t, n = !0, r = Infinity) {
|
|
573
|
-
return
|
|
570
|
+
return gt(St.tag_name(e), t, n, r);
|
|
574
571
|
}
|
|
575
572
|
function At(e, t, n = !0, r = Infinity) {
|
|
576
|
-
return
|
|
573
|
+
return gt(Ct("class", e), t, n, r);
|
|
574
|
+
}
|
|
575
|
+
function jt(e, t, n = !0, r = Infinity) {
|
|
576
|
+
return gt(St.tag_type(e), t, n, r);
|
|
577
577
|
}
|
|
578
578
|
//#endregion
|
|
579
579
|
//#region node_modules/domutils/lib/esm/helpers.js
|
|
580
|
-
function
|
|
580
|
+
function Mt(e) {
|
|
581
581
|
let t = e.length;
|
|
582
582
|
for (; --t >= 0;) {
|
|
583
583
|
let n = e[t];
|
|
@@ -592,26 +592,26 @@ function jt(e) {
|
|
|
592
592
|
}
|
|
593
593
|
return e;
|
|
594
594
|
}
|
|
595
|
-
var
|
|
595
|
+
var w;
|
|
596
596
|
(function(e) {
|
|
597
597
|
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";
|
|
598
|
-
})(
|
|
598
|
+
})(w || (w = {}));
|
|
599
599
|
function Nt(e, t) {
|
|
600
600
|
let n = [], r = [];
|
|
601
601
|
if (e === t) return 0;
|
|
602
|
-
let i =
|
|
602
|
+
let i = C(e) ? e : e.parent;
|
|
603
603
|
for (; i;) n.unshift(i), i = i.parent;
|
|
604
|
-
for (i =
|
|
604
|
+
for (i = C(t) ? t : t.parent; i;) r.unshift(i), i = i.parent;
|
|
605
605
|
let a = Math.min(n.length, r.length), o = 0;
|
|
606
606
|
for (; o < a && n[o] === r[o];) o++;
|
|
607
|
-
if (o === 0) return
|
|
607
|
+
if (o === 0) return w.DISCONNECTED;
|
|
608
608
|
let s = n[o - 1], c = s.children, l = n[o], u = r[o];
|
|
609
|
-
return c.indexOf(l) > c.indexOf(u) ? s === t ?
|
|
609
|
+
return c.indexOf(l) > c.indexOf(u) ? s === t ? w.FOLLOWING | w.CONTAINED_BY : w.FOLLOWING : s === e ? w.PRECEDING | w.CONTAINS : w.PRECEDING;
|
|
610
610
|
}
|
|
611
611
|
function Pt(e) {
|
|
612
612
|
return e = e.filter((e, t, n) => !n.includes(e, t + 1)), e.sort((e, t) => {
|
|
613
613
|
let n = Nt(e, t);
|
|
614
|
-
return n &
|
|
614
|
+
return n & w.PRECEDING ? -1 : n & w.FOLLOWING ? 1 : 0;
|
|
615
615
|
}), e;
|
|
616
616
|
}
|
|
617
617
|
//#endregion
|
|
@@ -623,7 +623,7 @@ function Ft(e) {
|
|
|
623
623
|
function It(e) {
|
|
624
624
|
let t = e.children, n = {
|
|
625
625
|
type: "atom",
|
|
626
|
-
items:
|
|
626
|
+
items: kt("entry", t).map((e) => {
|
|
627
627
|
let { children: t } = e, n = { media: Bt(t) };
|
|
628
628
|
T(n, "id", "id", t), T(n, "title", "title", t);
|
|
629
629
|
let r = Vt("link", t)?.attribs.href;
|
|
@@ -644,7 +644,7 @@ function Lt(e) {
|
|
|
644
644
|
let t = Vt("channel", e.children)?.children ?? [], n = {
|
|
645
645
|
type: e.name.substr(0, 3),
|
|
646
646
|
id: "",
|
|
647
|
-
items:
|
|
647
|
+
items: kt("item", e.children).map((e) => {
|
|
648
648
|
let { children: t } = e, n = { media: Bt(t) };
|
|
649
649
|
T(n, "id", "guid", t), T(n, "title", "title", t), T(n, "link", "link", t), T(n, "description", "description", t);
|
|
650
650
|
let r = Ht("pubDate", t) || Ht("dc:date", t);
|
|
@@ -670,7 +670,7 @@ var Rt = [
|
|
|
670
670
|
"width"
|
|
671
671
|
];
|
|
672
672
|
function Bt(e) {
|
|
673
|
-
return
|
|
673
|
+
return kt("media:content", e).map((e) => {
|
|
674
674
|
let { attribs: t } = e, n = {
|
|
675
675
|
medium: t.medium,
|
|
676
676
|
isDefault: !!t.isDefault
|
|
@@ -681,10 +681,10 @@ function Bt(e) {
|
|
|
681
681
|
});
|
|
682
682
|
}
|
|
683
683
|
function Vt(e, t) {
|
|
684
|
-
return
|
|
684
|
+
return kt(e, t, !0, 1)[0];
|
|
685
685
|
}
|
|
686
686
|
function Ht(e, t, n = !1) {
|
|
687
|
-
return
|
|
687
|
+
return et(kt(e, t, n, 1)).trim();
|
|
688
688
|
}
|
|
689
689
|
function T(e, t, n, r, i = !1) {
|
|
690
690
|
let a = Ht(n, r, i);
|
|
@@ -696,47 +696,47 @@ function Ut(e) {
|
|
|
696
696
|
//#endregion
|
|
697
697
|
//#region node_modules/domutils/lib/esm/index.js
|
|
698
698
|
var Wt = /* @__PURE__ */ v({
|
|
699
|
-
DocumentPosition: () =>
|
|
700
|
-
append: () =>
|
|
701
|
-
appendChild: () =>
|
|
699
|
+
DocumentPosition: () => w,
|
|
700
|
+
append: () => pt,
|
|
701
|
+
appendChild: () => ft,
|
|
702
702
|
compareDocumentPosition: () => Nt,
|
|
703
|
-
existsOne: () =>
|
|
704
|
-
filter: () =>
|
|
705
|
-
find: () =>
|
|
706
|
-
findAll: () =>
|
|
707
|
-
findOne: () =>
|
|
708
|
-
findOneChild: () =>
|
|
709
|
-
getAttributeValue: () =>
|
|
710
|
-
getChildren: () =>
|
|
711
|
-
getElementById: () =>
|
|
712
|
-
getElements: () =>
|
|
713
|
-
getElementsByClassName: () =>
|
|
714
|
-
getElementsByTagName: () =>
|
|
715
|
-
getElementsByTagType: () =>
|
|
703
|
+
existsOne: () => bt,
|
|
704
|
+
filter: () => gt,
|
|
705
|
+
find: () => _t,
|
|
706
|
+
findAll: () => xt,
|
|
707
|
+
findOne: () => yt,
|
|
708
|
+
findOneChild: () => vt,
|
|
709
|
+
getAttributeValue: () => at,
|
|
710
|
+
getChildren: () => nt,
|
|
711
|
+
getElementById: () => Ot,
|
|
712
|
+
getElements: () => Dt,
|
|
713
|
+
getElementsByClassName: () => At,
|
|
714
|
+
getElementsByTagName: () => kt,
|
|
715
|
+
getElementsByTagType: () => jt,
|
|
716
716
|
getFeed: () => Ft,
|
|
717
|
-
getInnerHTML: () =>
|
|
718
|
-
getName: () =>
|
|
719
|
-
getOuterHTML: () =>
|
|
720
|
-
getParent: () =>
|
|
721
|
-
getSiblings: () =>
|
|
722
|
-
getText: () =>
|
|
723
|
-
hasAttrib: () =>
|
|
724
|
-
hasChildren: () =>
|
|
725
|
-
innerText: () =>
|
|
726
|
-
isCDATA: () =>
|
|
727
|
-
isComment: () =>
|
|
728
|
-
isDocument: () =>
|
|
729
|
-
isTag: () =>
|
|
730
|
-
isText: () =>
|
|
731
|
-
nextElementSibling: () =>
|
|
732
|
-
prepend: () =>
|
|
733
|
-
prependChild: () =>
|
|
734
|
-
prevElementSibling: () =>
|
|
735
|
-
removeElement: () =>
|
|
736
|
-
removeSubsets: () =>
|
|
737
|
-
replaceElement: () =>
|
|
738
|
-
testElement: () =>
|
|
739
|
-
textContent: () =>
|
|
717
|
+
getInnerHTML: () => Qe,
|
|
718
|
+
getName: () => st,
|
|
719
|
+
getOuterHTML: () => Ze,
|
|
720
|
+
getParent: () => rt,
|
|
721
|
+
getSiblings: () => it,
|
|
722
|
+
getText: () => $e,
|
|
723
|
+
hasAttrib: () => ot,
|
|
724
|
+
hasChildren: () => C,
|
|
725
|
+
innerText: () => tt,
|
|
726
|
+
isCDATA: () => be,
|
|
727
|
+
isComment: () => Se,
|
|
728
|
+
isDocument: () => we,
|
|
729
|
+
isTag: () => S,
|
|
730
|
+
isText: () => xe,
|
|
731
|
+
nextElementSibling: () => ct,
|
|
732
|
+
prepend: () => ht,
|
|
733
|
+
prependChild: () => mt,
|
|
734
|
+
prevElementSibling: () => lt,
|
|
735
|
+
removeElement: () => ut,
|
|
736
|
+
removeSubsets: () => Mt,
|
|
737
|
+
replaceElement: () => dt,
|
|
738
|
+
testElement: () => Et,
|
|
739
|
+
textContent: () => et,
|
|
740
740
|
uniqueSort: () => Pt
|
|
741
741
|
}), Gt = { _useHtmlParser2: !1 };
|
|
742
742
|
function Kt(e, t) {
|
|
@@ -782,10 +782,10 @@ function Zt(e) {
|
|
|
782
782
|
}
|
|
783
783
|
function Qt(e) {
|
|
784
784
|
let t = e ?? (this ? this.root() : []), n = "";
|
|
785
|
-
for (let e = 0; e < t.length; e++) n +=
|
|
785
|
+
for (let e = 0; e < t.length; e++) n += et(t[e]);
|
|
786
786
|
return n;
|
|
787
787
|
}
|
|
788
|
-
function $t(e, t, n = typeof t == "boolean"
|
|
788
|
+
function $t(e, t, n = typeof t == "boolean" ? t : !1) {
|
|
789
789
|
if (!e || typeof e != "string") return null;
|
|
790
790
|
typeof t == "boolean" && (n = t);
|
|
791
791
|
let r = this.load(e, this._options, !1);
|
|
@@ -1189,7 +1189,7 @@ var M = {
|
|
|
1189
1189
|
else if (e === A.Questionmark) this.state = j.InProcessingInstruction, this.sectionStart = this.index + 1;
|
|
1190
1190
|
else if (this.isTagStartChar(e)) {
|
|
1191
1191
|
let t = e | 32;
|
|
1192
|
-
this.sectionStart = this.index, this.
|
|
1192
|
+
this.sectionStart = this.index, this.xmlMode ? this.state = j.InTagName : t === M.ScriptEnd[2] ? this.state = j.BeforeSpecialS : t === M.TitleEnd[2] || t === M.XmpEnd[2] ? this.state = j.BeforeSpecialT : this.state = j.InTagName;
|
|
1193
1193
|
} else e === A.Slash ? this.state = j.BeforeClosingTagName : (this.state = j.Text, this.stateText(e));
|
|
1194
1194
|
}
|
|
1195
1195
|
stateInTagName(e) {
|
|
@@ -1363,7 +1363,9 @@ var M = {
|
|
|
1363
1363
|
case j.InProcessingInstruction:
|
|
1364
1364
|
this.stateInProcessingInstruction(e);
|
|
1365
1365
|
break;
|
|
1366
|
-
case j.InEntity:
|
|
1366
|
+
case j.InEntity:
|
|
1367
|
+
this.stateInEntity();
|
|
1368
|
+
break;
|
|
1367
1369
|
}
|
|
1368
1370
|
this.index++;
|
|
1369
1371
|
}
|
|
@@ -1643,7 +1645,7 @@ var M = {
|
|
|
1643
1645
|
//#endregion
|
|
1644
1646
|
//#region node_modules/htmlparser2/dist/esm/index.js
|
|
1645
1647
|
function Bn(e, t) {
|
|
1646
|
-
let n = new
|
|
1648
|
+
let n = new Oe(void 0, t);
|
|
1647
1649
|
return new zn(n, t).end(e), n.root;
|
|
1648
1650
|
}
|
|
1649
1651
|
//#endregion
|
|
@@ -1660,7 +1662,7 @@ var Vn = /* @__PURE__ */ v({
|
|
|
1660
1662
|
val: () => ir
|
|
1661
1663
|
}), Hn = Object.hasOwn ?? ((e, t) => Object.prototype.hasOwnProperty.call(e, t)), Un = /\s+/, Wn = "data-", Gn = /^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i, Kn = /^{[^]*}$|^\[[^]*]$/;
|
|
1662
1664
|
function qn(e, t, n) {
|
|
1663
|
-
if (!(!e || !
|
|
1665
|
+
if (!(!e || !S(e))) {
|
|
1664
1666
|
if (e.attribs ?? (e.attribs = {}), !t) return e.attribs;
|
|
1665
1667
|
if (Hn(e.attribs, t)) return !n && Gn.test(t) ? t : e.attribs[t];
|
|
1666
1668
|
if (e.name === "option" && t === "value") return Qt(e.children);
|
|
@@ -1675,17 +1677,15 @@ function Yn(e, t) {
|
|
|
1675
1677
|
if (typeof t == "function") {
|
|
1676
1678
|
if (typeof e != "string") throw Error("Bad combination of arguments.");
|
|
1677
1679
|
return E(this, (n, r) => {
|
|
1678
|
-
|
|
1680
|
+
S(n) && Jn(n, e, t.call(n, r, n.attribs[e]));
|
|
1679
1681
|
});
|
|
1680
1682
|
}
|
|
1681
1683
|
return E(this, (n) => {
|
|
1682
|
-
if (
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
Jn(n, t, r);
|
|
1686
|
-
}
|
|
1687
|
-
else Jn(n, e, t);
|
|
1684
|
+
if (S(n)) if (typeof e == "object") for (let t of Object.keys(e)) {
|
|
1685
|
+
let r = e[t];
|
|
1686
|
+
Jn(n, t, r);
|
|
1688
1687
|
}
|
|
1688
|
+
else Jn(n, e, t);
|
|
1689
1689
|
});
|
|
1690
1690
|
}
|
|
1691
1691
|
return arguments.length > 1 ? this : qn(this[0], e, this.options.xmlMode);
|
|
@@ -1707,35 +1707,33 @@ function Qn(e, t) {
|
|
|
1707
1707
|
return e.length = t.length, e;
|
|
1708
1708
|
}
|
|
1709
1709
|
case "tagName":
|
|
1710
|
-
case "nodeName": return
|
|
1710
|
+
case "nodeName": return S(t) ? t.name.toUpperCase() : void 0;
|
|
1711
1711
|
case "href":
|
|
1712
1712
|
case "src": {
|
|
1713
|
-
if (!
|
|
1713
|
+
if (!S(t)) return;
|
|
1714
1714
|
let n = t.attribs?.[e];
|
|
1715
1715
|
return typeof URL < "u" && (e === "href" && (t.tagName === "a" || t.tagName === "link") || e === "src" && (t.tagName === "img" || t.tagName === "iframe" || t.tagName === "audio" || t.tagName === "video" || t.tagName === "source")) && n !== void 0 && this.options.baseURI ? new URL(n, this.options.baseURI).href : n;
|
|
1716
1716
|
}
|
|
1717
|
-
case "innerText": return
|
|
1718
|
-
case "textContent": return
|
|
1719
|
-
case "outerHTML": return t.type ===
|
|
1717
|
+
case "innerText": return tt(t);
|
|
1718
|
+
case "textContent": return et(t);
|
|
1719
|
+
case "outerHTML": return t.type === ne ? this.html() : this.clone().wrap("<container />").parent().html();
|
|
1720
1720
|
case "innerHTML": return this.html();
|
|
1721
|
-
default: return
|
|
1721
|
+
default: return S(t) ? Xn(t, e, this.options.xmlMode) : void 0;
|
|
1722
1722
|
}
|
|
1723
1723
|
}
|
|
1724
1724
|
if (typeof e == "object" || t !== void 0) {
|
|
1725
1725
|
if (typeof t == "function") {
|
|
1726
1726
|
if (typeof e == "object") throw TypeError("Bad combination of arguments.");
|
|
1727
1727
|
return E(this, (n, r) => {
|
|
1728
|
-
|
|
1728
|
+
S(n) && Zn(n, e, t.call(n, r, Xn(n, e, this.options.xmlMode)), this.options.xmlMode);
|
|
1729
1729
|
});
|
|
1730
1730
|
}
|
|
1731
1731
|
return E(this, (n) => {
|
|
1732
|
-
if (
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
Zn(n, t, r, this.options.xmlMode);
|
|
1736
|
-
}
|
|
1737
|
-
else Zn(n, e, t, this.options.xmlMode);
|
|
1732
|
+
if (S(n)) if (typeof e == "object") for (let t of Object.keys(e)) {
|
|
1733
|
+
let r = e[t];
|
|
1734
|
+
Zn(n, t, r, this.options.xmlMode);
|
|
1738
1735
|
}
|
|
1736
|
+
else Zn(n, e, t, this.options.xmlMode);
|
|
1739
1737
|
});
|
|
1740
1738
|
}
|
|
1741
1739
|
}
|
|
@@ -1768,15 +1766,15 @@ function nr(e) {
|
|
|
1768
1766
|
}
|
|
1769
1767
|
function rr(e, t) {
|
|
1770
1768
|
let n = this[0];
|
|
1771
|
-
if (!n || !
|
|
1769
|
+
if (!n || !S(n)) return;
|
|
1772
1770
|
let r = n;
|
|
1773
1771
|
return r.data ?? (r.data = {}), e == null ? er(r) : typeof e == "object" || t !== void 0 ? (E(this, (n) => {
|
|
1774
|
-
|
|
1772
|
+
S(n) && (typeof e == "object" ? $n(n, e) : $n(n, e, t));
|
|
1775
1773
|
}), this) : tr(r, e);
|
|
1776
1774
|
}
|
|
1777
1775
|
function ir(e) {
|
|
1778
1776
|
let t = arguments.length === 0, n = this[0];
|
|
1779
|
-
if (!n || !
|
|
1777
|
+
if (!n || !S(n)) return t ? void 0 : this;
|
|
1780
1778
|
switch (n.name) {
|
|
1781
1779
|
case "textarea": return this.text(e);
|
|
1782
1780
|
case "select": {
|
|
@@ -1804,13 +1802,13 @@ function or(e) {
|
|
|
1804
1802
|
function sr(e) {
|
|
1805
1803
|
let t = or(e);
|
|
1806
1804
|
for (let e of t) E(this, (t) => {
|
|
1807
|
-
|
|
1805
|
+
S(t) && ar(t, e);
|
|
1808
1806
|
});
|
|
1809
1807
|
return this;
|
|
1810
1808
|
}
|
|
1811
1809
|
function cr(e) {
|
|
1812
1810
|
return this.toArray().some((t) => {
|
|
1813
|
-
let n =
|
|
1811
|
+
let n = S(t) && t.attribs.class, r = -1;
|
|
1814
1812
|
if (n && e.length > 0) for (; (r = n.indexOf(e, r + 1)) > -1;) {
|
|
1815
1813
|
let t = r + e.length;
|
|
1816
1814
|
if ((r === 0 || Un.test(n[r - 1])) && (t === n.length || Un.test(n[t]))) return !0;
|
|
@@ -1820,7 +1818,7 @@ function cr(e) {
|
|
|
1820
1818
|
}
|
|
1821
1819
|
function lr(e) {
|
|
1822
1820
|
if (typeof e == "function") return E(this, (t, n) => {
|
|
1823
|
-
if (
|
|
1821
|
+
if (S(t)) {
|
|
1824
1822
|
let r = t.attribs.class || "";
|
|
1825
1823
|
lr.call([t], e.call(t, n, r));
|
|
1826
1824
|
}
|
|
@@ -1829,7 +1827,7 @@ function lr(e) {
|
|
|
1829
1827
|
let t = e.split(Un), n = this.length;
|
|
1830
1828
|
for (let e = 0; e < n; e++) {
|
|
1831
1829
|
let n = this[e];
|
|
1832
|
-
if (!
|
|
1830
|
+
if (!S(n)) continue;
|
|
1833
1831
|
let r = qn(n, "class", !1);
|
|
1834
1832
|
if (r) {
|
|
1835
1833
|
let e = ` ${r} `;
|
|
@@ -1844,32 +1842,30 @@ function lr(e) {
|
|
|
1844
1842
|
}
|
|
1845
1843
|
function ur(e) {
|
|
1846
1844
|
if (typeof e == "function") return E(this, (t, n) => {
|
|
1847
|
-
|
|
1845
|
+
S(t) && ur.call([t], e.call(t, n, t.attribs.class || ""));
|
|
1848
1846
|
});
|
|
1849
1847
|
let t = or(e), n = t.length, r = arguments.length === 0;
|
|
1850
1848
|
return E(this, (e) => {
|
|
1851
|
-
if (
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
-
n !== -1 && (r.splice(n, 1), i = !0, e--);
|
|
1858
|
-
}
|
|
1859
|
-
i && (e.attribs.class = r.join(" "));
|
|
1849
|
+
if (S(e)) if (r) e.attribs.class = "";
|
|
1850
|
+
else {
|
|
1851
|
+
let r = or(e.attribs.class), i = !1;
|
|
1852
|
+
for (let e = 0; e < n; e++) {
|
|
1853
|
+
let n = r.indexOf(t[e]);
|
|
1854
|
+
n !== -1 && (r.splice(n, 1), i = !0, e--);
|
|
1860
1855
|
}
|
|
1856
|
+
i && (e.attribs.class = r.join(" "));
|
|
1861
1857
|
}
|
|
1862
1858
|
});
|
|
1863
1859
|
}
|
|
1864
1860
|
function dr(e, t) {
|
|
1865
1861
|
if (typeof e == "function") return E(this, (n, r) => {
|
|
1866
|
-
|
|
1862
|
+
S(n) && dr.call([n], e.call(n, r, n.attribs.class || "", t), t);
|
|
1867
1863
|
});
|
|
1868
1864
|
if (!e || typeof e != "string") return this;
|
|
1869
1865
|
let n = e.split(Un), r = n.length, i = typeof t == "boolean" ? t ? 1 : -1 : 0, a = this.length;
|
|
1870
1866
|
for (let e = 0; e < a; e++) {
|
|
1871
1867
|
let t = this[e];
|
|
1872
|
-
if (!
|
|
1868
|
+
if (!S(t)) continue;
|
|
1873
1869
|
let a = or(t.attribs.class);
|
|
1874
1870
|
for (let e = 0; e < r; e++) {
|
|
1875
1871
|
let t = a.indexOf(n[e]);
|
|
@@ -2061,18 +2057,16 @@ function Cr(e, t, n) {
|
|
|
2061
2057
|
continue;
|
|
2062
2058
|
}
|
|
2063
2059
|
let e = i(1).toLowerCase(), a = null;
|
|
2064
|
-
if (t.charCodeAt(n) === 40) {
|
|
2065
|
-
if (
|
|
2066
|
-
|
|
2067
|
-
|
|
2068
|
-
|
|
2069
|
-
|
|
2070
|
-
|
|
2071
|
-
|
|
2072
|
-
e === a.charCodeAt(a.length - 1) && br(e) && (a = a.slice(1, -1));
|
|
2073
|
-
}
|
|
2074
|
-
a = yr(a);
|
|
2060
|
+
if (t.charCodeAt(n) === 40) if (hr.has(e)) {
|
|
2061
|
+
if (br(t.charCodeAt(n + 1))) throw Error(`Pseudo-selector ${e} cannot be quoted`);
|
|
2062
|
+
if (a = [], n = Cr(a, t, n + 1), t.charCodeAt(n) !== 41) throw Error(`Missing closing parenthesis in :${e} (${t})`);
|
|
2063
|
+
n += 1;
|
|
2064
|
+
} else {
|
|
2065
|
+
if (a = o(), _r.has(e)) {
|
|
2066
|
+
let e = a.charCodeAt(0);
|
|
2067
|
+
e === a.charCodeAt(a.length - 1) && br(e) && (a = a.slice(1, -1));
|
|
2075
2068
|
}
|
|
2069
|
+
a = yr(a);
|
|
2076
2070
|
}
|
|
2077
2071
|
r.push({
|
|
2078
2072
|
type: P.Pseudo,
|
|
@@ -2115,7 +2109,7 @@ function Cr(e, t, n) {
|
|
|
2115
2109
|
}
|
|
2116
2110
|
//#endregion
|
|
2117
2111
|
//#region node_modules/css-select/lib/esm/sort.js
|
|
2118
|
-
var I = /* @__PURE__ */
|
|
2112
|
+
var I = /* @__PURE__ */ te((/* @__PURE__ */ _(((e, t) => {
|
|
2119
2113
|
t.exports = {
|
|
2120
2114
|
trueFunc: function() {
|
|
2121
2115
|
return !0;
|
|
@@ -2586,10 +2580,8 @@ function ai(e, { adapter: t }, n) {
|
|
|
2586
2580
|
return e === Kr || n && t.isTag(n);
|
|
2587
2581
|
});
|
|
2588
2582
|
for (let t of e) {
|
|
2589
|
-
if (!(t.length > 0 && Tr(t[0]) && t[0].type !== P.Descendant))
|
|
2590
|
-
|
|
2591
|
-
else continue;
|
|
2592
|
-
}
|
|
2583
|
+
if (!(t.length > 0 && Tr(t[0]) && t[0].type !== P.Descendant)) if (r && !t.some(ti)) t.unshift(ni);
|
|
2584
|
+
else continue;
|
|
2593
2585
|
t.unshift(ii);
|
|
2594
2586
|
}
|
|
2595
2587
|
}
|
|
@@ -2730,14 +2722,12 @@ function Di(e, t, n) {
|
|
|
2730
2722
|
}
|
|
2731
2723
|
for (let e = 0; e < i.length && a?.size !== t.length; e++) {
|
|
2732
2724
|
let r = i[e];
|
|
2733
|
-
if ((a ? t.filter((e) =>
|
|
2725
|
+
if ((a ? t.filter((e) => S(e) && !a.has(e)) : t).length === 0) break;
|
|
2734
2726
|
let o = Oi(r, t, n);
|
|
2735
|
-
if (o.length)
|
|
2736
|
-
|
|
2737
|
-
|
|
2738
|
-
|
|
2739
|
-
a = new Set(o);
|
|
2740
|
-
}
|
|
2727
|
+
if (o.length) if (a) o.forEach((e) => a.add(e));
|
|
2728
|
+
else {
|
|
2729
|
+
if (e === i.length - 1) return o;
|
|
2730
|
+
a = new Set(o);
|
|
2741
2731
|
}
|
|
2742
2732
|
}
|
|
2743
2733
|
return a === void 0 ? [] : a.size === t.length ? t : t.filter((e) => a.has(e));
|
|
@@ -2761,7 +2751,7 @@ function ki(e, t, n = {}, r = Infinity) {
|
|
|
2761
2751
|
function Ai(e, t, n, r, i) {
|
|
2762
2752
|
let a = t.findIndex(_i), o = t.slice(0, a), s = t[a], c = t.length - 1 === a ? i : Infinity, l = vi(s.name, s.data, c);
|
|
2763
2753
|
if (l === 0) return [];
|
|
2764
|
-
let u = (o.length === 0 && !Array.isArray(e) ?
|
|
2754
|
+
let u = (o.length === 0 && !Array.isArray(e) ? nt(e).filter(S) : o.length === 0 ? (Array.isArray(e) ? e : [e]).filter(S) : r || o.some(gr) ? ji(e, [o], n, l) : Ni(e, [o], n)).slice(0, l), d = Ti(s.name, u, s.data, n);
|
|
2765
2755
|
if (d.length === 0 || t.length === a + 1) return d;
|
|
2766
2756
|
let f = t.slice(a + 1), p = f.some(gr);
|
|
2767
2757
|
if (p) {
|
|
@@ -2784,10 +2774,10 @@ function ji(e, t, n, r) {
|
|
|
2784
2774
|
return Mi(e, pi(t, n, e), r);
|
|
2785
2775
|
}
|
|
2786
2776
|
function Mi(e, t, n = Infinity) {
|
|
2787
|
-
return
|
|
2777
|
+
return _t((e) => S(e) && t(e), mi(e, Wt, t.shouldTestNextSiblings), !0, n);
|
|
2788
2778
|
}
|
|
2789
2779
|
function Ni(e, t, n) {
|
|
2790
|
-
let r = (Array.isArray(e) ? e : [e]).filter(
|
|
2780
|
+
let r = (Array.isArray(e) ? e : [e]).filter(S);
|
|
2791
2781
|
if (r.length === 0) return r;
|
|
2792
2782
|
let i = pi(t, n);
|
|
2793
2783
|
return i === I.trueFunc ? r : r.filter(i);
|
|
@@ -2887,11 +2877,11 @@ function Vi(e, ...t) {
|
|
|
2887
2877
|
function Hi(e) {
|
|
2888
2878
|
return e.length > 1 ? Array.from(new Set(e)) : e;
|
|
2889
2879
|
}
|
|
2890
|
-
var Ui = Bi(({ parent: e }) => e && !
|
|
2880
|
+
var Ui = Bi(({ parent: e }) => e && !we(e) ? e : null, Hi), Wi = zi((e) => {
|
|
2891
2881
|
let t = [];
|
|
2892
|
-
for (; e.parent && !
|
|
2882
|
+
for (; e.parent && !we(e.parent);) t.push(e.parent), e = e.parent;
|
|
2893
2883
|
return t;
|
|
2894
|
-
}, Pt, (e) => e.reverse()), Gi = Vi(({ parent: e }) => e && !
|
|
2884
|
+
}, Pt, (e) => e.reverse()), Gi = Vi(({ parent: e }) => e && !we(e) ? e : null, Pt, (e) => e.reverse());
|
|
2895
2885
|
function Ki(e) {
|
|
2896
2886
|
let t = [];
|
|
2897
2887
|
if (!e) return this._make(t);
|
|
@@ -2900,7 +2890,7 @@ function Ki(e) {
|
|
|
2900
2890
|
root: this._root?.[0]
|
|
2901
2891
|
}, r = typeof e == "string" ? (t) => Ci(t, e, n) : ia(e);
|
|
2902
2892
|
return E(this, (e) => {
|
|
2903
|
-
for (e && !
|
|
2893
|
+
for (e && !we(e) && !S(e) && (e = e.parent); e && S(e);) {
|
|
2904
2894
|
if (r(e, 0)) {
|
|
2905
2895
|
t.includes(e) || t.push(e);
|
|
2906
2896
|
break;
|
|
@@ -2909,17 +2899,17 @@ function Ki(e) {
|
|
|
2909
2899
|
}
|
|
2910
2900
|
}), this._make(t);
|
|
2911
2901
|
}
|
|
2912
|
-
var qi = Bi((e) =>
|
|
2902
|
+
var qi = Bi((e) => ct(e)), Ji = zi((e) => {
|
|
2913
2903
|
let t = [];
|
|
2914
|
-
for (; e.next;) e = e.next,
|
|
2904
|
+
for (; e.next;) e = e.next, S(e) && t.push(e);
|
|
2915
2905
|
return t;
|
|
2916
|
-
}, Hi), Yi = Vi((e) =>
|
|
2906
|
+
}, Hi), Yi = Vi((e) => ct(e), Hi), Xi = Bi((e) => lt(e)), Zi = zi((e) => {
|
|
2917
2907
|
let t = [];
|
|
2918
|
-
for (; e.prev;) e = e.prev,
|
|
2908
|
+
for (; e.prev;) e = e.prev, S(e) && t.push(e);
|
|
2919
2909
|
return t;
|
|
2920
|
-
}, Hi), Qi = Vi((e) =>
|
|
2910
|
+
}, Hi), Qi = Vi((e) => lt(e), Hi), $i = zi((e) => it(e).filter((t) => S(t) && t !== e), Pt), ea = zi((e) => nt(e).filter(S), Hi);
|
|
2921
2911
|
function ta() {
|
|
2922
|
-
let e = this.toArray().reduce((e, t) =>
|
|
2912
|
+
let e = this.toArray().reduce((e, t) => C(t) ? e.concat(t.children) : e, []);
|
|
2923
2913
|
return this._make(e);
|
|
2924
2914
|
}
|
|
2925
2915
|
function na(e) {
|
|
@@ -2951,7 +2941,7 @@ function oa(e, t, n, r) {
|
|
|
2951
2941
|
}
|
|
2952
2942
|
function sa(e) {
|
|
2953
2943
|
let t = this.toArray();
|
|
2954
|
-
return typeof e == "string" ? wi(t.filter(
|
|
2944
|
+
return typeof e == "string" ? wi(t.filter(S), e, this.options) : e ? t.some(ia(e)) : !1;
|
|
2955
2945
|
}
|
|
2956
2946
|
function ca(e) {
|
|
2957
2947
|
let t = this.toArray();
|
|
@@ -3005,8 +2995,8 @@ function ba(e) {
|
|
|
3005
2995
|
return function(t, n, r, i) {
|
|
3006
2996
|
if (typeof Buffer < "u" && Buffer.isBuffer(t) && (t = t.toString()), typeof t == "string") return e(t, n, r, i);
|
|
3007
2997
|
let a = t;
|
|
3008
|
-
if (!Array.isArray(a) &&
|
|
3009
|
-
let o = new
|
|
2998
|
+
if (!Array.isArray(a) && we(a)) return a;
|
|
2999
|
+
let o = new ve([]);
|
|
3010
3000
|
return xa(a, o), o;
|
|
3011
3001
|
};
|
|
3012
3002
|
}
|
|
@@ -3015,7 +3005,7 @@ function xa(e, t) {
|
|
|
3015
3005
|
t ? t.children = n : t = null;
|
|
3016
3006
|
for (let e = 0; e < n.length; e++) {
|
|
3017
3007
|
let r = n[e];
|
|
3018
|
-
r.parent && r.parent.children !== n &&
|
|
3008
|
+
r.parent && r.parent.children !== n && ut(r), t ? (r.prev = n[e - 1] || null, r.next = n[e + 1] || null) : r.prev = r.next = null, r.parent = t;
|
|
3019
3009
|
}
|
|
3020
3010
|
return t;
|
|
3021
3011
|
}
|
|
@@ -3054,7 +3044,7 @@ function Ca(e, t) {
|
|
|
3054
3044
|
if (typeof i == "object") {
|
|
3055
3045
|
if (i == null) continue;
|
|
3056
3046
|
if (!("length" in i)) {
|
|
3057
|
-
n.push(t ?
|
|
3047
|
+
n.push(t ? Te(i, !0) : i);
|
|
3058
3048
|
continue;
|
|
3059
3049
|
}
|
|
3060
3050
|
}
|
|
@@ -3062,13 +3052,13 @@ function Ca(e, t) {
|
|
|
3062
3052
|
}
|
|
3063
3053
|
return n;
|
|
3064
3054
|
}
|
|
3065
|
-
return [t ?
|
|
3055
|
+
return [t ? Te(e, !0) : e];
|
|
3066
3056
|
}
|
|
3067
3057
|
function wa(e) {
|
|
3068
3058
|
return function(...t) {
|
|
3069
3059
|
let n = this.length - 1;
|
|
3070
3060
|
return E(this, (r, i) => {
|
|
3071
|
-
if (!
|
|
3061
|
+
if (!C(r)) return;
|
|
3072
3062
|
let a = typeof t[0] == "function" ? t[0].call(r, i, this._render(r.children)) : t;
|
|
3073
3063
|
e(this._makeDomArray(a, i < n), r.children, r);
|
|
3074
3064
|
});
|
|
@@ -3106,11 +3096,11 @@ function Aa(e) {
|
|
|
3106
3096
|
let n = this.length - 1, r = this.parents().last();
|
|
3107
3097
|
for (let i = 0; i < this.length; i++) {
|
|
3108
3098
|
let a = this[i], o = typeof t == "function" ? t.call(a, i, a) : typeof t == "string" && !un(t) ? r.find(t).clone() : t, [s] = this._makeDomArray(o, i < n);
|
|
3109
|
-
if (!s || !
|
|
3099
|
+
if (!s || !C(s)) continue;
|
|
3110
3100
|
let c = s, l = 0;
|
|
3111
3101
|
for (; l < c.children.length;) {
|
|
3112
3102
|
let e = c.children[l];
|
|
3113
|
-
|
|
3103
|
+
S(e) ? (c = e, l = 0) : l++;
|
|
3114
3104
|
}
|
|
3115
3105
|
e(a, c, [s]);
|
|
3116
3106
|
}
|
|
@@ -3123,7 +3113,7 @@ var ja = Aa((e, t, n) => {
|
|
|
3123
3113
|
let i = r.children, a = i.indexOf(e);
|
|
3124
3114
|
xa([e], t), Ta(i, a, 0, n, r);
|
|
3125
3115
|
}), Ma = Aa((e, t, n) => {
|
|
3126
|
-
|
|
3116
|
+
C(e) && (xa(e.children, t), xa(n, e));
|
|
3127
3117
|
});
|
|
3128
3118
|
function Na(e) {
|
|
3129
3119
|
return this.parent(e).not("body").each((e, t) => {
|
|
@@ -3134,11 +3124,11 @@ function Pa(e) {
|
|
|
3134
3124
|
let t = this[0];
|
|
3135
3125
|
if (t) {
|
|
3136
3126
|
let n = this._make(typeof e == "function" ? e.call(t, 0, t) : e).insertBefore(t), r;
|
|
3137
|
-
for (let e = 0; e < n.length; e++) n[e].type ===
|
|
3127
|
+
for (let e = 0; e < n.length; e++) n[e].type === ce && (r = n[e]);
|
|
3138
3128
|
let i = 0;
|
|
3139
3129
|
for (; r && i < r.children.length;) {
|
|
3140
3130
|
let e = r.children[i];
|
|
3141
|
-
e.type ===
|
|
3131
|
+
e.type === ce ? (r = e, i = 0) : i++;
|
|
3142
3132
|
}
|
|
3143
3133
|
r && this._make(r).append(this);
|
|
3144
3134
|
}
|
|
@@ -3147,7 +3137,7 @@ function Pa(e) {
|
|
|
3147
3137
|
function Fa(...e) {
|
|
3148
3138
|
let t = this.length - 1;
|
|
3149
3139
|
return E(this, (n, r) => {
|
|
3150
|
-
if (!
|
|
3140
|
+
if (!C(n) || !n.parent) return;
|
|
3151
3141
|
let i = n.parent.children, a = i.indexOf(n);
|
|
3152
3142
|
/* istanbul ignore next */
|
|
3153
3143
|
if (a === -1) return;
|
|
@@ -3169,7 +3159,7 @@ function Ia(e) {
|
|
|
3169
3159
|
function La(...e) {
|
|
3170
3160
|
let t = this.length - 1;
|
|
3171
3161
|
return E(this, (n, r) => {
|
|
3172
|
-
if (!
|
|
3162
|
+
if (!C(n) || !n.parent) return;
|
|
3173
3163
|
let i = n.parent.children, a = i.indexOf(n);
|
|
3174
3164
|
/* istanbul ignore next */
|
|
3175
3165
|
if (a === -1) return;
|
|
@@ -3190,7 +3180,7 @@ function Ra(e) {
|
|
|
3190
3180
|
}
|
|
3191
3181
|
function za(e) {
|
|
3192
3182
|
return E(e ? this.filter(e) : this, (e) => {
|
|
3193
|
-
|
|
3183
|
+
ut(e), e.prev = e.next = e.parent = null;
|
|
3194
3184
|
}), this;
|
|
3195
3185
|
}
|
|
3196
3186
|
function Ba(e) {
|
|
@@ -3203,7 +3193,7 @@ function Ba(e) {
|
|
|
3203
3193
|
}
|
|
3204
3194
|
function Va() {
|
|
3205
3195
|
return E(this, (e) => {
|
|
3206
|
-
if (
|
|
3196
|
+
if (C(e)) {
|
|
3207
3197
|
for (let t of e.children) t.next = t.prev = t.parent = null;
|
|
3208
3198
|
e.children.length = 0;
|
|
3209
3199
|
}
|
|
@@ -3212,10 +3202,10 @@ function Va() {
|
|
|
3212
3202
|
function Ha(e) {
|
|
3213
3203
|
if (e === void 0) {
|
|
3214
3204
|
let e = this[0];
|
|
3215
|
-
return !e || !
|
|
3205
|
+
return !e || !C(e) ? null : this._render(e.children);
|
|
3216
3206
|
}
|
|
3217
3207
|
return E(this, (t) => {
|
|
3218
|
-
if (
|
|
3208
|
+
if (C(t)) {
|
|
3219
3209
|
for (let e of t.children) e.next = e.prev = e.parent = null;
|
|
3220
3210
|
xa(on(e) ? e.toArray() : this._parse(`${e}`, this.options, !1, t).children, t);
|
|
3221
3211
|
}
|
|
@@ -3226,14 +3216,14 @@ function Ua() {
|
|
|
3226
3216
|
}
|
|
3227
3217
|
function Wa(e) {
|
|
3228
3218
|
return e === void 0 ? Qt(this) : typeof e == "function" ? E(this, (t, n) => this._make(t).text(e.call(t, n, Qt([t])))) : E(this, (t) => {
|
|
3229
|
-
if (
|
|
3219
|
+
if (C(t)) {
|
|
3230
3220
|
for (let e of t.children) e.next = e.prev = e.parent = null;
|
|
3231
|
-
xa(new
|
|
3221
|
+
xa(new pe(`${e}`), t);
|
|
3232
3222
|
}
|
|
3233
3223
|
});
|
|
3234
3224
|
}
|
|
3235
3225
|
function Ga() {
|
|
3236
|
-
let e = Array.prototype.map.call(this.get(), (e) =>
|
|
3226
|
+
let e = Array.prototype.map.call(this.get(), (e) => Te(e, !0)), t = new ve(e);
|
|
3237
3227
|
for (let n of e) n.parent = t;
|
|
3238
3228
|
return this._make(e);
|
|
3239
3229
|
}
|
|
@@ -3242,7 +3232,7 @@ function Ga() {
|
|
|
3242
3232
|
var Ka = /* @__PURE__ */ v({ css: () => qa });
|
|
3243
3233
|
function qa(e, t) {
|
|
3244
3234
|
if (e != null && t != null || typeof e == "object" && !Array.isArray(e)) return E(this, (n, r) => {
|
|
3245
|
-
|
|
3235
|
+
S(n) && Ja(n, e, t, r);
|
|
3246
3236
|
});
|
|
3247
3237
|
if (this.length !== 0) return Ya(this[0], e);
|
|
3248
3238
|
}
|
|
@@ -3259,7 +3249,7 @@ function Ja(e, t, n, r) {
|
|
|
3259
3249
|
}
|
|
3260
3250
|
}
|
|
3261
3251
|
function Ya(e, t) {
|
|
3262
|
-
if (!e || !
|
|
3252
|
+
if (!e || !S(e)) return;
|
|
3263
3253
|
let n = Za(e.attribs.style);
|
|
3264
3254
|
if (typeof t == "string") return n[t];
|
|
3265
3255
|
if (Array.isArray(t)) {
|
|
@@ -3296,7 +3286,7 @@ function no() {
|
|
|
3296
3286
|
function ro() {
|
|
3297
3287
|
return this.map((e, t) => {
|
|
3298
3288
|
let n = this._make(t);
|
|
3299
|
-
return
|
|
3289
|
+
return S(t) && t.name === "form" ? n.find($a).toArray() : n.filter($a).toArray();
|
|
3300
3290
|
}).filter("[name!=\"\"]:enabled:not(:submit, :button, :image, :reset, :file):matches([checked], :not(:checkbox, :radio))").map((e, t) => {
|
|
3301
3291
|
let n = this._make(t), r = n.attr("name"), i = n.val() ?? "";
|
|
3302
3292
|
return Array.isArray(i) ? i.map((e) => ({
|
|
@@ -3381,7 +3371,7 @@ function co(e, t) {
|
|
|
3381
3371
|
};
|
|
3382
3372
|
}
|
|
3383
3373
|
function lo(e) {
|
|
3384
|
-
return !!e.name || e.type ===
|
|
3374
|
+
return !!e.name || e.type === ne || e.type === re || e.type === ae;
|
|
3385
3375
|
}
|
|
3386
3376
|
//#endregion
|
|
3387
3377
|
//#region node_modules/parse5/dist/common/unicode.js
|
|
@@ -4165,7 +4155,9 @@ var Jo = class {
|
|
|
4165
4155
|
case B.NULL_CHARACTER:
|
|
4166
4156
|
this.handler.onNullCharacter(this.currentCharacterToken);
|
|
4167
4157
|
break;
|
|
4168
|
-
case B.WHITESPACE_CHARACTER:
|
|
4158
|
+
case B.WHITESPACE_CHARACTER:
|
|
4159
|
+
this.handler.onWhitespaceCharacter(this.currentCharacterToken);
|
|
4160
|
+
break;
|
|
4169
4161
|
}
|
|
4170
4162
|
this.currentCharacterToken = null;
|
|
4171
4163
|
}
|
|
@@ -4178,13 +4170,10 @@ var Jo = class {
|
|
|
4178
4170
|
}), this.active = !1;
|
|
4179
4171
|
}
|
|
4180
4172
|
_appendCharToCurrentCharacterToken(e, t) {
|
|
4181
|
-
if (this.currentCharacterToken) {
|
|
4182
|
-
|
|
4183
|
-
|
|
4184
|
-
|
|
4185
|
-
}
|
|
4186
|
-
this.currentLocation = this.getCurrentLocation(0), this._emitCurrentCharacterToken(this.currentLocation), this.preprocessor.dropParsedChunk();
|
|
4187
|
-
}
|
|
4173
|
+
if (this.currentCharacterToken) if (this.currentCharacterToken.type === e) {
|
|
4174
|
+
this.currentCharacterToken.chars += t;
|
|
4175
|
+
return;
|
|
4176
|
+
} else this.currentLocation = this.getCurrentLocation(0), this._emitCurrentCharacterToken(this.currentLocation), this.preprocessor.dropParsedChunk();
|
|
4188
4177
|
this._createCharacterToken(e, t);
|
|
4189
4178
|
}
|
|
4190
4179
|
_emitCodePoint(e) {
|
|
@@ -5369,7 +5358,10 @@ var Jo = class {
|
|
|
5369
5358
|
case L.NULL:
|
|
5370
5359
|
this._err(z.unexpectedNullCharacter);
|
|
5371
5360
|
break;
|
|
5372
|
-
case L.EOF:
|
|
5361
|
+
case L.EOF:
|
|
5362
|
+
this.emitCurrentDoctype(t), this._emitEOFToken();
|
|
5363
|
+
break;
|
|
5364
|
+
default:
|
|
5373
5365
|
}
|
|
5374
5366
|
}
|
|
5375
5367
|
_stateCdataSection(e) {
|
|
@@ -5399,12 +5391,10 @@ var Jo = class {
|
|
|
5399
5391
|
}
|
|
5400
5392
|
_stateCharacterReference() {
|
|
5401
5393
|
let e = this.entityDecoder.write(this.preprocessor.html, this.preprocessor.pos);
|
|
5402
|
-
if (e < 0)
|
|
5403
|
-
|
|
5404
|
-
|
|
5405
|
-
|
|
5406
|
-
return;
|
|
5407
|
-
}
|
|
5394
|
+
if (e < 0) if (this.preprocessor.lastChunkWritten) e = this.entityDecoder.end();
|
|
5395
|
+
else {
|
|
5396
|
+
this.active = !1, this.preprocessor.pos = this.preprocessor.html.length - 1, this.consumedAfterSnapshot = 0, this.preprocessor.endOfChunkHit = !0;
|
|
5397
|
+
return;
|
|
5408
5398
|
}
|
|
5409
5399
|
e === 0 ? (this.preprocessor.pos = this.entityStartPos, this._flushCodePointConsumedAsCharacterReference(L.AMPERSAND), this.state = !this._isCharacterReferenceInAttribute() && Uo(this.preprocessor.peek(1)) ? J.AMBIGUOUS_AMPERSAND : this.returnState) : this.state = this.returnState;
|
|
5410
5400
|
}
|
|
@@ -5577,7 +5567,9 @@ var Jo = class {
|
|
|
5577
5567
|
case U.SVG:
|
|
5578
5568
|
if (ts.has(r)) return !1;
|
|
5579
5569
|
break;
|
|
5580
|
-
case U.MATHML:
|
|
5570
|
+
case U.MATHML:
|
|
5571
|
+
if (es.has(r)) return !1;
|
|
5572
|
+
break;
|
|
5581
5573
|
}
|
|
5582
5574
|
}
|
|
5583
5575
|
return !0;
|
|
@@ -5602,7 +5594,9 @@ var Jo = class {
|
|
|
5602
5594
|
case U.SVG:
|
|
5603
5595
|
if (ts.has(t)) return !1;
|
|
5604
5596
|
break;
|
|
5605
|
-
case U.MATHML:
|
|
5597
|
+
case U.MATHML:
|
|
5598
|
+
if (es.has(t)) return !1;
|
|
5599
|
+
break;
|
|
5606
5600
|
}
|
|
5607
5601
|
}
|
|
5608
5602
|
return !0;
|
|
@@ -6154,7 +6148,10 @@ var Vs = {
|
|
|
6154
6148
|
case K.SCRIPT:
|
|
6155
6149
|
this.tokenizer.state = Y.SCRIPT_DATA;
|
|
6156
6150
|
break;
|
|
6157
|
-
case K.PLAINTEXT:
|
|
6151
|
+
case K.PLAINTEXT:
|
|
6152
|
+
this.tokenizer.state = Y.PLAINTEXT;
|
|
6153
|
+
break;
|
|
6154
|
+
default:
|
|
6158
6155
|
}
|
|
6159
6156
|
}
|
|
6160
6157
|
_setDocumentType(e) {
|
|
@@ -6261,7 +6258,9 @@ var Vs = {
|
|
|
6261
6258
|
case B.EOF:
|
|
6262
6259
|
this.onEof(e);
|
|
6263
6260
|
break;
|
|
6264
|
-
case B.WHITESPACE_CHARACTER:
|
|
6261
|
+
case B.WHITESPACE_CHARACTER:
|
|
6262
|
+
this.onWhitespaceCharacter(e);
|
|
6263
|
+
break;
|
|
6265
6264
|
}
|
|
6266
6265
|
}
|
|
6267
6266
|
_isIntegrationPoint(e, t, n) {
|
|
@@ -6324,10 +6323,12 @@ var Vs = {
|
|
|
6324
6323
|
return;
|
|
6325
6324
|
}
|
|
6326
6325
|
break;
|
|
6327
|
-
case K.HEAD:
|
|
6328
|
-
|
|
6329
|
-
|
|
6330
|
-
|
|
6326
|
+
case K.HEAD:
|
|
6327
|
+
if (e > 0) {
|
|
6328
|
+
this.insertionMode = X.IN_HEAD;
|
|
6329
|
+
return;
|
|
6330
|
+
}
|
|
6331
|
+
break;
|
|
6331
6332
|
}
|
|
6332
6333
|
this.insertionMode = X.IN_BODY;
|
|
6333
6334
|
}
|
|
@@ -6368,6 +6369,7 @@ var Vs = {
|
|
|
6368
6369
|
beforeElement: null
|
|
6369
6370
|
};
|
|
6370
6371
|
}
|
|
6372
|
+
default:
|
|
6371
6373
|
}
|
|
6372
6374
|
}
|
|
6373
6375
|
return {
|
|
@@ -6431,7 +6433,10 @@ var Vs = {
|
|
|
6431
6433
|
case X.AFTER_BODY:
|
|
6432
6434
|
Ql(this, e);
|
|
6433
6435
|
break;
|
|
6434
|
-
case X.AFTER_AFTER_BODY:
|
|
6436
|
+
case X.AFTER_AFTER_BODY:
|
|
6437
|
+
iu(this, e);
|
|
6438
|
+
break;
|
|
6439
|
+
default:
|
|
6435
6440
|
}
|
|
6436
6441
|
}
|
|
6437
6442
|
onNullCharacter(e) {
|
|
@@ -6472,7 +6477,10 @@ var Vs = {
|
|
|
6472
6477
|
case X.AFTER_BODY:
|
|
6473
6478
|
Ql(this, e);
|
|
6474
6479
|
break;
|
|
6475
|
-
case X.AFTER_AFTER_BODY:
|
|
6480
|
+
case X.AFTER_AFTER_BODY:
|
|
6481
|
+
iu(this, e);
|
|
6482
|
+
break;
|
|
6483
|
+
default:
|
|
6476
6484
|
}
|
|
6477
6485
|
}
|
|
6478
6486
|
onComment(e) {
|
|
@@ -6508,7 +6516,10 @@ var Vs = {
|
|
|
6508
6516
|
$s(this, e);
|
|
6509
6517
|
break;
|
|
6510
6518
|
case X.AFTER_AFTER_BODY:
|
|
6511
|
-
case X.AFTER_AFTER_FRAMESET:
|
|
6519
|
+
case X.AFTER_AFTER_FRAMESET:
|
|
6520
|
+
ec(this, e);
|
|
6521
|
+
break;
|
|
6522
|
+
default:
|
|
6512
6523
|
}
|
|
6513
6524
|
}
|
|
6514
6525
|
onDoctype(e) {
|
|
@@ -6522,7 +6533,10 @@ var Vs = {
|
|
|
6522
6533
|
case X.AFTER_HEAD:
|
|
6523
6534
|
this._err(e, z.misplacedDoctype);
|
|
6524
6535
|
break;
|
|
6525
|
-
case X.IN_TABLE_TEXT:
|
|
6536
|
+
case X.IN_TABLE_TEXT:
|
|
6537
|
+
Al(this, e);
|
|
6538
|
+
break;
|
|
6539
|
+
default:
|
|
6526
6540
|
}
|
|
6527
6541
|
}
|
|
6528
6542
|
onStartTag(e) {
|
|
@@ -6596,7 +6610,10 @@ var Vs = {
|
|
|
6596
6610
|
case X.AFTER_AFTER_BODY:
|
|
6597
6611
|
ru(this, e);
|
|
6598
6612
|
break;
|
|
6599
|
-
case X.AFTER_AFTER_FRAMESET:
|
|
6613
|
+
case X.AFTER_AFTER_FRAMESET:
|
|
6614
|
+
au(this, e);
|
|
6615
|
+
break;
|
|
6616
|
+
default:
|
|
6600
6617
|
}
|
|
6601
6618
|
}
|
|
6602
6619
|
onEndTag(e) {
|
|
@@ -6667,7 +6684,10 @@ var Vs = {
|
|
|
6667
6684
|
case X.AFTER_FRAMESET:
|
|
6668
6685
|
nu(this, e);
|
|
6669
6686
|
break;
|
|
6670
|
-
case X.AFTER_AFTER_BODY:
|
|
6687
|
+
case X.AFTER_AFTER_BODY:
|
|
6688
|
+
iu(this, e);
|
|
6689
|
+
break;
|
|
6690
|
+
default:
|
|
6671
6691
|
}
|
|
6672
6692
|
}
|
|
6673
6693
|
onEof(e) {
|
|
@@ -6714,7 +6734,10 @@ var Vs = {
|
|
|
6714
6734
|
case X.IN_FRAMESET:
|
|
6715
6735
|
case X.AFTER_FRAMESET:
|
|
6716
6736
|
case X.AFTER_AFTER_BODY:
|
|
6717
|
-
case X.AFTER_AFTER_FRAMESET:
|
|
6737
|
+
case X.AFTER_AFTER_FRAMESET:
|
|
6738
|
+
tc(this, e);
|
|
6739
|
+
break;
|
|
6740
|
+
default:
|
|
6718
6741
|
}
|
|
6719
6742
|
}
|
|
6720
6743
|
onWhitespaceCharacter(e) {
|
|
@@ -6752,7 +6775,10 @@ var Vs = {
|
|
|
6752
6775
|
case X.IN_ROW:
|
|
6753
6776
|
gl(this, e);
|
|
6754
6777
|
break;
|
|
6755
|
-
case X.IN_TABLE_TEXT:
|
|
6778
|
+
case X.IN_TABLE_TEXT:
|
|
6779
|
+
Ol(this, e);
|
|
6780
|
+
break;
|
|
6781
|
+
default:
|
|
6756
6782
|
}
|
|
6757
6783
|
}
|
|
6758
6784
|
};
|
|
@@ -7016,7 +7042,10 @@ function bc(e, t) {
|
|
|
7016
7042
|
case B.END_TAG:
|
|
7017
7043
|
fl(e, t);
|
|
7018
7044
|
break;
|
|
7019
|
-
case B.EOF:
|
|
7045
|
+
case B.EOF:
|
|
7046
|
+
pl(e, t);
|
|
7047
|
+
break;
|
|
7048
|
+
default:
|
|
7020
7049
|
}
|
|
7021
7050
|
}
|
|
7022
7051
|
function xc(e, t) {
|
|
@@ -7463,7 +7492,9 @@ function gl(e, t) {
|
|
|
7463
7492
|
case B.CHARACTER:
|
|
7464
7493
|
kl(e, t);
|
|
7465
7494
|
break;
|
|
7466
|
-
case B.WHITESPACE_CHARACTER:
|
|
7495
|
+
case B.WHITESPACE_CHARACTER:
|
|
7496
|
+
Ol(e, t);
|
|
7497
|
+
break;
|
|
7467
7498
|
}
|
|
7468
7499
|
else Dl(e, t);
|
|
7469
7500
|
}
|
|
@@ -7761,7 +7792,10 @@ function Ul(e, t) {
|
|
|
7761
7792
|
e.openElements.hasInSelectScope(K.SELECT) && (e.openElements.popUntilTagNamePopped(K.SELECT), e._resetInsertionMode(), t.tagID !== K.SELECT && e._processStartTag(t));
|
|
7762
7793
|
break;
|
|
7763
7794
|
case K.SCRIPT:
|
|
7764
|
-
case K.TEMPLATE:
|
|
7795
|
+
case K.TEMPLATE:
|
|
7796
|
+
uc(e, t);
|
|
7797
|
+
break;
|
|
7798
|
+
default:
|
|
7765
7799
|
}
|
|
7766
7800
|
}
|
|
7767
7801
|
function Wl(e, t) {
|
|
@@ -7775,7 +7809,10 @@ function Wl(e, t) {
|
|
|
7775
7809
|
case K.SELECT:
|
|
7776
7810
|
e.openElements.hasInSelectScope(K.SELECT) && (e.openElements.popUntilTagNamePopped(K.SELECT), e._resetInsertionMode());
|
|
7777
7811
|
break;
|
|
7778
|
-
case K.TEMPLATE:
|
|
7812
|
+
case K.TEMPLATE:
|
|
7813
|
+
fc(e, t);
|
|
7814
|
+
break;
|
|
7815
|
+
default:
|
|
7779
7816
|
}
|
|
7780
7817
|
}
|
|
7781
7818
|
function Gl(e, t) {
|
|
@@ -7852,7 +7889,10 @@ function $l(e, t) {
|
|
|
7852
7889
|
case K.FRAME:
|
|
7853
7890
|
e._appendElement(t, U.HTML), t.ackSelfClosing = !0;
|
|
7854
7891
|
break;
|
|
7855
|
-
case K.NOFRAMES:
|
|
7892
|
+
case K.NOFRAMES:
|
|
7893
|
+
uc(e, t);
|
|
7894
|
+
break;
|
|
7895
|
+
default:
|
|
7856
7896
|
}
|
|
7857
7897
|
}
|
|
7858
7898
|
function eu(e, t) {
|
|
@@ -7863,7 +7903,10 @@ function tu(e, t) {
|
|
|
7863
7903
|
case K.HTML:
|
|
7864
7904
|
Z(e, t);
|
|
7865
7905
|
break;
|
|
7866
|
-
case K.NOFRAMES:
|
|
7906
|
+
case K.NOFRAMES:
|
|
7907
|
+
uc(e, t);
|
|
7908
|
+
break;
|
|
7909
|
+
default:
|
|
7867
7910
|
}
|
|
7868
7911
|
}
|
|
7869
7912
|
function nu(e, t) {
|
|
@@ -7880,7 +7923,10 @@ function au(e, t) {
|
|
|
7880
7923
|
case K.HTML:
|
|
7881
7924
|
Z(e, t);
|
|
7882
7925
|
break;
|
|
7883
|
-
case K.NOFRAMES:
|
|
7926
|
+
case K.NOFRAMES:
|
|
7927
|
+
uc(e, t);
|
|
7928
|
+
break;
|
|
7929
|
+
default:
|
|
7884
7930
|
}
|
|
7885
7931
|
}
|
|
7886
7932
|
function ou(e, t) {
|
|
@@ -8030,15 +8076,15 @@ function Ou(e, t, n) {
|
|
|
8030
8076
|
return e && (r += e), t ? r += ` PUBLIC ${Du(t)}` : n && (r += " SYSTEM"), n && (r += ` ${Du(n)}`), r;
|
|
8031
8077
|
}
|
|
8032
8078
|
var ku = {
|
|
8033
|
-
isCommentNode:
|
|
8034
|
-
isElementNode:
|
|
8035
|
-
isTextNode:
|
|
8079
|
+
isCommentNode: Se,
|
|
8080
|
+
isElementNode: S,
|
|
8081
|
+
isTextNode: xe,
|
|
8036
8082
|
createDocument() {
|
|
8037
|
-
let e = new
|
|
8083
|
+
let e = new ve([]);
|
|
8038
8084
|
return e["x-mode"] = W.NO_QUIRKS, e;
|
|
8039
8085
|
},
|
|
8040
8086
|
createDocumentFragment() {
|
|
8041
|
-
return new
|
|
8087
|
+
return new ve([]);
|
|
8042
8088
|
},
|
|
8043
8089
|
createElement(e, t, n) {
|
|
8044
8090
|
let r = Object.create(null), i = Object.create(null), a = Object.create(null);
|
|
@@ -8046,14 +8092,14 @@ var ku = {
|
|
|
8046
8092
|
let t = n[e].name;
|
|
8047
8093
|
r[t] = n[e].value, i[t] = n[e].namespace, a[t] = n[e].prefix;
|
|
8048
8094
|
}
|
|
8049
|
-
let o = new
|
|
8095
|
+
let o = new ye(e, r, []);
|
|
8050
8096
|
return o.namespace = t, o["x-attribsNamespace"] = i, o["x-attribsPrefix"] = a, o;
|
|
8051
8097
|
},
|
|
8052
8098
|
createCommentNode(e) {
|
|
8053
|
-
return new
|
|
8099
|
+
return new me(e);
|
|
8054
8100
|
},
|
|
8055
8101
|
createTextNode(e) {
|
|
8056
|
-
return new
|
|
8102
|
+
return new pe(e);
|
|
8057
8103
|
},
|
|
8058
8104
|
appendChild(e, t) {
|
|
8059
8105
|
let n = e.children[e.children.length - 1];
|
|
@@ -8070,8 +8116,8 @@ var ku = {
|
|
|
8070
8116
|
return e.children[0];
|
|
8071
8117
|
},
|
|
8072
8118
|
setDocumentType(e, t, n, r) {
|
|
8073
|
-
let i = Ou(t, n, r), a = e.children.find((e) =>
|
|
8074
|
-
a ? a.data = i ?? null : (a = new
|
|
8119
|
+
let i = Ou(t, n, r), a = e.children.find((e) => Ce(e) && e.name === "!doctype");
|
|
8120
|
+
a ? a.data = i ?? null : (a = new he("!doctype", i), ku.appendChild(e, a)), a["x-name"] = t, a["x-publicId"] = n, a["x-systemId"] = r;
|
|
8075
8121
|
},
|
|
8076
8122
|
setDocumentMode(e, t) {
|
|
8077
8123
|
e["x-mode"] = t;
|
|
@@ -8087,11 +8133,11 @@ var ku = {
|
|
|
8087
8133
|
},
|
|
8088
8134
|
insertText(e, t) {
|
|
8089
8135
|
let n = e.children[e.children.length - 1];
|
|
8090
|
-
n &&
|
|
8136
|
+
n && xe(n) ? n.data += t : ku.appendChild(e, ku.createTextNode(t));
|
|
8091
8137
|
},
|
|
8092
8138
|
insertTextBefore(e, t, n) {
|
|
8093
8139
|
let r = e.children[e.children.indexOf(n) - 1];
|
|
8094
|
-
r &&
|
|
8140
|
+
r && xe(r) ? r.data += t : ku.insertBefore(e, ku.createTextNode(t), n);
|
|
8095
8141
|
},
|
|
8096
8142
|
adoptAttributes(e, t) {
|
|
8097
8143
|
for (let n = 0; n < t.length; n++) {
|
|
@@ -8133,7 +8179,7 @@ var ku = {
|
|
|
8133
8179
|
return e["x-systemId"] ?? "";
|
|
8134
8180
|
},
|
|
8135
8181
|
isDocumentTypeNode(e) {
|
|
8136
|
-
return
|
|
8182
|
+
return Ce(e) && e.name === "!doctype";
|
|
8137
8183
|
},
|
|
8138
8184
|
setNodeSourceCodeLocation(e, t) {
|
|
8139
8185
|
t && (e.startIndex = t.startOffset, e.endIndex = t.endOffset), e.sourceCodeLocation = t;
|
|
@@ -8158,7 +8204,7 @@ function Mu(e) {
|
|
|
8158
8204
|
let t = "length" in e ? e : [e];
|
|
8159
8205
|
for (let e = 0; e < t.length; e += 1) {
|
|
8160
8206
|
let n = t[e];
|
|
8161
|
-
|
|
8207
|
+
we(n) && Array.prototype.splice.call(t, e, 1, ...n.children);
|
|
8162
8208
|
}
|
|
8163
8209
|
let n = "";
|
|
8164
8210
|
for (let e = 0; e < t.length; e += 1) {
|
|
@@ -8167,7 +8213,7 @@ function Mu(e) {
|
|
|
8167
8213
|
}
|
|
8168
8214
|
return n;
|
|
8169
8215
|
}
|
|
8170
|
-
var Nu = co(ba((e, t, n, r) => t._useHtmlParser2 ? Bn(e, t) : Au(e, t, n, r)), (e, t) => t._useHtmlParser2 ?
|
|
8216
|
+
var Nu = co(ba((e, t, n, r) => t._useHtmlParser2 ? Bn(e, t) : Au(e, t, n, r)), (e, t) => t._useHtmlParser2 ? He(e, t) : Mu(e));
|
|
8171
8217
|
//#endregion
|
|
8172
8218
|
//#region src/parsers/utils.ts
|
|
8173
8219
|
function Pu(e, { removeEmptyElements: t = !1 } = {}) {
|
|
@@ -8307,24 +8353,22 @@ function Wu(e, t) {
|
|
|
8307
8353
|
});
|
|
8308
8354
|
continue;
|
|
8309
8355
|
}
|
|
8310
|
-
let
|
|
8311
|
-
if (!f)
|
|
8312
|
-
|
|
8313
|
-
|
|
8314
|
-
|
|
8315
|
-
if (!b || Bu(y) || x !== null && x < 0) {
|
|
8316
|
-
x !== null && x < 0 && (ee = !0);
|
|
8356
|
+
let te = Ru(y), [b, x] = Iu(te);
|
|
8357
|
+
if (!f) if (b !== null && b >= 0 && x !== "Annexe") f = !0;
|
|
8358
|
+
else continue;
|
|
8359
|
+
if (!te || Bu(y) || b !== null && b < 0) {
|
|
8360
|
+
b !== null && b < 0 && (ee = !0);
|
|
8317
8361
|
continue;
|
|
8318
8362
|
}
|
|
8319
8363
|
if (ee) {
|
|
8320
|
-
if (
|
|
8364
|
+
if (b === null) continue;
|
|
8321
8365
|
ee = !1;
|
|
8322
8366
|
}
|
|
8323
8367
|
if (Hu(y)) {
|
|
8324
8368
|
if (!m[e + 1]) break;
|
|
8325
8369
|
continue;
|
|
8326
8370
|
}
|
|
8327
|
-
if (
|
|
8371
|
+
if (b === null) l.length === 0 || c && u.length === 0 ? l.push({
|
|
8328
8372
|
texte: y,
|
|
8329
8373
|
html: v
|
|
8330
8374
|
}) : u.push({
|
|
@@ -8332,14 +8376,14 @@ function Wu(e, t) {
|
|
|
8332
8376
|
html: v
|
|
8333
8377
|
}), c && l.length >= 2 && (c = !1);
|
|
8334
8378
|
else {
|
|
8335
|
-
if (
|
|
8379
|
+
if (x === "ExposeMotifs" && (p = !0), x !== "ExposeMotifs" && p && h.closest(".assnatSection2").length > 0) {
|
|
8336
8380
|
u.push({
|
|
8337
8381
|
texte: y,
|
|
8338
8382
|
html: v
|
|
8339
8383
|
});
|
|
8340
8384
|
continue;
|
|
8341
8385
|
}
|
|
8342
|
-
for (o =
|
|
8386
|
+
for (o = b, l.length > 0 && i.push({
|
|
8343
8387
|
id: `D_${Ru(l[0]?.texte ?? "")}`,
|
|
8344
8388
|
type: s ?? "",
|
|
8345
8389
|
niveau: o + 1,
|
|
@@ -8347,10 +8391,10 @@ function Wu(e, t) {
|
|
|
8347
8391
|
titres: l,
|
|
8348
8392
|
alineas: u
|
|
8349
8393
|
}); a.length > 0 && o < a[a.length - 1];) a.pop();
|
|
8350
|
-
(a.length === 0 || o > a[a.length - 1]) && a.push(o), s =
|
|
8394
|
+
(a.length === 0 || o > a[a.length - 1]) && a.push(o), s = x, l = [{
|
|
8351
8395
|
texte: y,
|
|
8352
8396
|
html: v
|
|
8353
|
-
}], u = [], c = !
|
|
8397
|
+
}], u = [], c = !te.match(/^ARTICLES?(_|$)/) && !te.match(/^EXPOSE_DES_MOTIFS$/);
|
|
8354
8398
|
}
|
|
8355
8399
|
}
|
|
8356
8400
|
l.length > 0 && i.push({
|
|
@@ -8388,22 +8432,22 @@ function Wu(e, t) {
|
|
|
8388
8432
|
}
|
|
8389
8433
|
//#endregion
|
|
8390
8434
|
//#region node_modules/date-fns/formatISO.js
|
|
8391
|
-
function Gu(
|
|
8392
|
-
let
|
|
8393
|
-
if (isNaN(+
|
|
8394
|
-
let a =
|
|
8435
|
+
function Gu(t, n) {
|
|
8436
|
+
let r = i(t, n?.in);
|
|
8437
|
+
if (isNaN(+r)) throw RangeError("Invalid time value");
|
|
8438
|
+
let a = n?.format ?? "extended", o = n?.representation ?? "complete", s = "", c = "", l = a === "extended" ? "-" : "", u = a === "extended" ? ":" : "";
|
|
8395
8439
|
if (o !== "time") {
|
|
8396
|
-
let
|
|
8397
|
-
s = `${r
|
|
8440
|
+
let t = e(r.getDate(), 2), n = e(r.getMonth() + 1, 2);
|
|
8441
|
+
s = `${e(r.getFullYear(), 4)}${l}${n}${l}${t}`;
|
|
8398
8442
|
}
|
|
8399
8443
|
if (o !== "date") {
|
|
8400
|
-
let
|
|
8401
|
-
if (
|
|
8402
|
-
let
|
|
8403
|
-
c = `${
|
|
8444
|
+
let t = r.getTimezoneOffset();
|
|
8445
|
+
if (t !== 0) {
|
|
8446
|
+
let n = Math.abs(t), r = e(Math.trunc(n / 60), 2), i = e(n % 60, 2);
|
|
8447
|
+
c = `${t < 0 ? "+" : "-"}${r}:${i}`;
|
|
8404
8448
|
} else c = "Z";
|
|
8405
|
-
let
|
|
8406
|
-
|
|
8449
|
+
let n = e(r.getHours(), 2), i = e(r.getMinutes(), 2), a = e(r.getSeconds(), 2), o = s === "" ? "" : "T", l = [
|
|
8450
|
+
n,
|
|
8407
8451
|
i,
|
|
8408
8452
|
a
|
|
8409
8453
|
].join(u);
|
|
@@ -8417,28 +8461,28 @@ var Ku = /* @__PURE__ */ RegExp("^(\\ufeff?(= yaml =|---)$[\\s\\S]*?^(?:\\2|\\.\
|
|
|
8417
8461
|
function qu(e) {
|
|
8418
8462
|
return e.replace(Ku, "");
|
|
8419
8463
|
}
|
|
8420
|
-
async function* Ju(e, t,
|
|
8421
|
-
for await (let [c, l] of Yu(e, t,
|
|
8464
|
+
async function* Ju(e, t, n, i, o, s = {}) {
|
|
8465
|
+
for await (let [c, l] of Yu(e, t, n, i, o, s)) a(l), yield [c, r.toAmendement(JSON.stringify(l))];
|
|
8422
8466
|
}
|
|
8423
|
-
async function* Yu(
|
|
8424
|
-
await s.ensureDir(
|
|
8467
|
+
async function* Yu(e, r, i, a, f, p = {}) {
|
|
8468
|
+
await s.ensureDir(e), o.strictEqual(/[?&]date_depot=/.exec(r), null, `URL ${r} already contains a deposit date`), o.strictEqual(/[?&]order=/.exec(r), null, `URL ${r} already contains a sort order`), o.strictEqual(/[?&]page=/.exec(r), null, `URL ${r} already contains a page number`), i && o.notStrictEqual(/[?&]etat=/.exec(r), null, `In incremental mode, URL ${r} must contain an "etat" query parameter`), r += (r.includes("?") ? "&" : "?") + "order=date_depot,desc&page=1", a != null && o.notStrictEqual(/\d{4}-\d{2}-\d{2}/.exec(a), null, `Invalid format for minimum date: ${a}`);
|
|
8425
8469
|
let ee = 0;
|
|
8426
8470
|
iterSearchPages: for (;;) {
|
|
8427
8471
|
p.verbose && console.log(`Fetching amendements search page at ${r}…`);
|
|
8428
8472
|
let m = await fetch(r);
|
|
8429
8473
|
o(m.ok, `Retrieval of search page at ${r} failed with error: ${m.status} ${m.statusText}`);
|
|
8430
|
-
let h = await m.text()
|
|
8431
|
-
if (
|
|
8432
|
-
let
|
|
8433
|
-
o.notStrictEqual(
|
|
8434
|
-
let
|
|
8474
|
+
let h = d(await m.text());
|
|
8475
|
+
if (h.querySelector("div.no-result") !== null) break;
|
|
8476
|
+
let g = h.querySelector("div.mirror-card-subtitle");
|
|
8477
|
+
o.notStrictEqual(g, null);
|
|
8478
|
+
let _ = parseInt(/\d+/.exec(g.text)[0]), v = h.querySelector("div.amendement-list--results-table");
|
|
8479
|
+
o.notStrictEqual(v, null);
|
|
8480
|
+
let y = v.querySelector("table");
|
|
8435
8481
|
o.notStrictEqual(y, null);
|
|
8436
|
-
let
|
|
8437
|
-
o.notStrictEqual(
|
|
8438
|
-
let
|
|
8439
|
-
o
|
|
8440
|
-
let S = x.querySelectorAll("td, th").map((e) => e.text);
|
|
8441
|
-
o(l(S, [
|
|
8482
|
+
let te = y.querySelector("tfoot > tr");
|
|
8483
|
+
o.notStrictEqual(te, null);
|
|
8484
|
+
let b = te.querySelectorAll("td, th").map((e) => e.text);
|
|
8485
|
+
o(l(b, [
|
|
8442
8486
|
"",
|
|
8443
8487
|
"n°",
|
|
8444
8488
|
"Dossier législatif",
|
|
@@ -8450,58 +8494,58 @@ async function* Yu(n, r, i, a, f, p = {}) {
|
|
|
8450
8494
|
"Examiné par",
|
|
8451
8495
|
"Texte visé",
|
|
8452
8496
|
"Date de dépôt"
|
|
8453
|
-
]), `Unexpected columns in ${JSON.stringify(
|
|
8454
|
-
let
|
|
8455
|
-
o.notStrictEqual(
|
|
8456
|
-
for (let l of
|
|
8497
|
+
]), `Unexpected columns in ${JSON.stringify(b, null, 2)}`);
|
|
8498
|
+
let x = y.querySelectorAll("tbody > tr");
|
|
8499
|
+
o.notStrictEqual(x.length, 0);
|
|
8500
|
+
for (let l of x) {
|
|
8457
8501
|
if (ee++, a != null || f != null) {
|
|
8458
|
-
let
|
|
8459
|
-
if (o.strictEqual(
|
|
8460
|
-
let r =
|
|
8461
|
-
if (Gu(
|
|
8502
|
+
let e = l.querySelectorAll("td");
|
|
8503
|
+
if (o.strictEqual(e.length, 11, `Unexpected number of columns in amendment row: ${l.outerHTML}`), a != null) {
|
|
8504
|
+
let r = e[10];
|
|
8505
|
+
if (Gu(n(r.text, "d MMMM y", /* @__PURE__ */ new Date(), { locale: t }), { representation: "date" }) < a) break iterSearchPages;
|
|
8462
8506
|
}
|
|
8463
8507
|
if (f != null) {
|
|
8464
|
-
let r =
|
|
8465
|
-
if (r.text && Gu(
|
|
8508
|
+
let r = e[7];
|
|
8509
|
+
if (r.text && Gu(n(r.text, "d MMMM y", /* @__PURE__ */ new Date(), { locale: t }), { representation: "date" }) < f) continue;
|
|
8466
8510
|
}
|
|
8467
8511
|
}
|
|
8468
8512
|
let m = l.getAttribute("data-href");
|
|
8469
8513
|
o.notStrictEqual(m, void 0);
|
|
8470
8514
|
let h = m.split("/");
|
|
8471
8515
|
o.strictEqual(h[0], "", `Unexpected URL path for amendement: ${m}`), o.strictEqual(h[1], "dyn", `Unexpected URL path for amendement: ${m}`);
|
|
8472
|
-
let g = c.join(
|
|
8516
|
+
let g = c.join(e, ...h.slice(2)) + ".html";
|
|
8473
8517
|
await s.ensureDir(c.dirname(g));
|
|
8474
|
-
let
|
|
8475
|
-
position:
|
|
8518
|
+
let v = await s.pathExists(g) ? await s.readFile(g, "utf8") : null, y = l.outerHTML, te = `---\n${u.dump({
|
|
8519
|
+
position: _ - ee,
|
|
8476
8520
|
search: r.replace(/&page=[\d]+/, "")
|
|
8477
8521
|
}, { sortKeys: !0 })}---\n\n${y}`;
|
|
8478
|
-
if (
|
|
8522
|
+
if (te === v) {
|
|
8479
8523
|
if (i) break iterSearchPages;
|
|
8480
8524
|
continue;
|
|
8481
8525
|
}
|
|
8482
|
-
if (
|
|
8483
|
-
p.verbose && console.log(
|
|
8484
|
-
let
|
|
8485
|
-
if (
|
|
8486
|
-
console.log(`Amendement HTML page not found at ${
|
|
8526
|
+
if (v !== null && qu(v) === y) continue;
|
|
8527
|
+
p.verbose && console.log(v === null ? `Adding amendement search cache: ${g}…` : `Updating amendement search cache: ${g}…`);
|
|
8528
|
+
let b = new URL(m, "https://www.assemblee-nationale.fr/").toString(), x = await fetch(b);
|
|
8529
|
+
if (x.status === 404) {
|
|
8530
|
+
console.log(`Amendement HTML page not found at ${b}. Skipping.`);
|
|
8487
8531
|
continue;
|
|
8488
8532
|
}
|
|
8489
|
-
o(
|
|
8490
|
-
let
|
|
8533
|
+
o(x.ok, `Retrieval of amendement HTML page at ${b} failed with error: ${x.status} ${x.statusText}`);
|
|
8534
|
+
let ne = d(await x.text()).querySelectorAll("li.mirror-card-header--options--content--item");
|
|
8491
8535
|
o.notStrictEqual(ne.length, 0);
|
|
8492
8536
|
let re = ne.find((e) => {
|
|
8493
8537
|
let t = e.querySelector("a > span");
|
|
8494
8538
|
return o.notStrictEqual(t, null, `No <span> in <a> found in ${e.toString()}`), t.text === "Version JSON";
|
|
8495
8539
|
});
|
|
8496
|
-
o.notStrictEqual(re, void 0, `No JSON version found for amendement at ${
|
|
8540
|
+
o.notStrictEqual(re, void 0, `No JSON version found for amendement at ${b}`);
|
|
8497
8541
|
let ie = re.querySelector("a");
|
|
8498
8542
|
o.notStrictEqual(ie, null, `No <a> found in ${re.toString()}`);
|
|
8499
8543
|
let ae = ie.getAttribute("href");
|
|
8500
8544
|
o.notStrictEqual(ae, void 0, `No URL found for JSON version of amendement: ${re.toString()}`);
|
|
8501
8545
|
let oe = new URL(ae, "https://www.assemblee-nationale.fr/").toString(), se = await fetch(oe);
|
|
8502
|
-
o(se.ok, `Retrieval of amendement JSON page at ${oe} failed with error: ${se.status} ${se.statusText}`), yield [m, await se.json()], await s.writeFile(g,
|
|
8546
|
+
o(se.ok, `Retrieval of amendement JSON page at ${oe} failed with error: ${se.status} ${se.statusText}`), yield [m, await se.json()], await s.writeFile(g, te, "utf8");
|
|
8503
8547
|
}
|
|
8504
|
-
let ne =
|
|
8548
|
+
let ne = h.querySelector("div.an-pagination--item > i.an-icons-chevron-right ~ a");
|
|
8505
8549
|
if (ne === null) break;
|
|
8506
8550
|
let re = ne.getAttribute("href");
|
|
8507
8551
|
o.notStrictEqual(re, void 0), r = new URL(re, "https://www.assemblee-nationale.fr/").toString();
|
|
@@ -8551,7 +8595,7 @@ function td(e) {
|
|
|
8551
8595
|
};
|
|
8552
8596
|
for (let e of s) {
|
|
8553
8597
|
if (i === "done") break;
|
|
8554
|
-
let s = t(e), g = Q(s.text()), _ = nd(s), v = _ !== null, y = _ !== null && _ >= 2 && _ <= 5,
|
|
8598
|
+
let s = t(e), g = Q(s.text()), _ = nd(s), v = _ !== null, y = _ !== null && _ >= 2 && _ <= 5, te = s.hasClass("assnatFPFexpogentitre1"), b = s.hasClass("assnatFPFexpogentexte"), x = s.hasClass("assnatFPFprojetloiartexte"), ne = s.hasClass("assnatFPFfinartexte"), re = s.is("table"), ie = s.is("img"), ae = s.find("img").length > 0;
|
|
8555
8599
|
if (!(v && g.length === 0)) {
|
|
8556
8600
|
if (i === "generalExpose") {
|
|
8557
8601
|
if (_ === 1) {
|
|
@@ -8563,7 +8607,7 @@ function td(e) {
|
|
|
8563
8607
|
e.includes("exposé général des motifs") && (a ?? (a = Zu("D_EXPOSE", "Exposé des motifs", 1, 1)));
|
|
8564
8608
|
}
|
|
8565
8609
|
if (y && (a && n.push(a), a = null, i = "hierarchy"), a) {
|
|
8566
|
-
if (
|
|
8610
|
+
if (ie) {
|
|
8567
8611
|
let e = ad(s);
|
|
8568
8612
|
if (e) {
|
|
8569
8613
|
var l;
|
|
@@ -8572,13 +8616,13 @@ function td(e) {
|
|
|
8572
8616
|
} else if ((_ === 1 || _ === 6) && g.length > 0) {
|
|
8573
8617
|
var u;
|
|
8574
8618
|
(u = a).titres ?? (u.titres = []), a.titres.push($(s));
|
|
8575
|
-
} else if (
|
|
8576
|
-
let e =
|
|
8619
|
+
} else if (te || b) {
|
|
8620
|
+
let e = ae ? rd(s) : $(s);
|
|
8577
8621
|
if (e) {
|
|
8578
8622
|
var d;
|
|
8579
8623
|
(d = a).alineas ?? (d.alineas = []), a.alineas.push(e);
|
|
8580
8624
|
}
|
|
8581
|
-
} else if (
|
|
8625
|
+
} else if (re) {
|
|
8582
8626
|
var f;
|
|
8583
8627
|
(f = a).alineas ?? (f.alineas = []), a.alineas.push($u(s));
|
|
8584
8628
|
}
|
|
@@ -8605,32 +8649,32 @@ function td(e) {
|
|
|
8605
8649
|
o = Zu(`D_${Xu(g)}`, "Article", 5, e), o.titres = [$(s)], i = "articleBody";
|
|
8606
8650
|
continue;
|
|
8607
8651
|
}
|
|
8608
|
-
if (
|
|
8652
|
+
if (x && i === "articleBody" && o) {
|
|
8609
8653
|
var p;
|
|
8610
8654
|
(p = o).alineas ?? (p.alineas = []), o.alineas.push($(s));
|
|
8611
8655
|
continue;
|
|
8612
8656
|
}
|
|
8613
|
-
if (
|
|
8657
|
+
if (re && i === "articleBody" && o) {
|
|
8614
8658
|
var ee;
|
|
8615
8659
|
(ee = o).alineas ?? (ee.alineas = []), o.alineas.push($u(s));
|
|
8616
8660
|
continue;
|
|
8617
8661
|
}
|
|
8618
|
-
if (
|
|
8662
|
+
if (ne && o) {
|
|
8619
8663
|
i = "articleExpose";
|
|
8620
8664
|
continue;
|
|
8621
8665
|
}
|
|
8622
|
-
if (
|
|
8666
|
+
if (te && i === "articleBody" && o) {
|
|
8623
8667
|
i = "articleExpose";
|
|
8624
8668
|
continue;
|
|
8625
8669
|
}
|
|
8626
8670
|
if (i === "articleExpose" && o) {
|
|
8627
|
-
if (
|
|
8628
|
-
if (
|
|
8671
|
+
if (te) continue;
|
|
8672
|
+
if (b) {
|
|
8629
8673
|
var m;
|
|
8630
8674
|
(m = o).exposeDesMotifs ?? (m.exposeDesMotifs = []), o.exposeDesMotifs.push($(s));
|
|
8631
8675
|
continue;
|
|
8632
8676
|
}
|
|
8633
|
-
if (
|
|
8677
|
+
if (re) {
|
|
8634
8678
|
var h;
|
|
8635
8679
|
(h = o).exposeDesMotifs ?? (h.exposeDesMotifs = []), o.exposeDesMotifs.push($u(s));
|
|
8636
8680
|
}
|