@tricoteuses/assemblee 3.7.0 → 3.7.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.
|
@@ -11,12 +11,14 @@ export interface ArtifactManifest extends ArtifactVersion {
|
|
|
11
11
|
sha256: string;
|
|
12
12
|
}
|
|
13
13
|
export interface DiscoveryOptions {
|
|
14
|
+
circuitBreakerCooldownMs?: number;
|
|
14
15
|
fetch?: typeof fetch;
|
|
15
16
|
probeCount?: number;
|
|
16
17
|
timeoutMs?: number;
|
|
17
18
|
}
|
|
18
19
|
export interface DownloadOptions {
|
|
19
20
|
chunkSizeBytes?: number;
|
|
21
|
+
circuitBreakerCooldownMs?: number;
|
|
20
22
|
fetch?: typeof fetch;
|
|
21
23
|
maxRetryDurationMs?: number;
|
|
22
24
|
now?: () => number;
|
|
@@ -37,6 +39,8 @@ export interface DownloadRetryEvent {
|
|
|
37
39
|
request: number;
|
|
38
40
|
sourceUrl: string;
|
|
39
41
|
}
|
|
42
|
+
/** Forget a previously tripped circuit breaker (mainly useful in tests). */
|
|
43
|
+
export declare function resetCircuitBreaker(): void;
|
|
40
44
|
export declare function formatDuration(milliseconds: number): string;
|
|
41
45
|
export interface ErrorDiagnostic {
|
|
42
46
|
cause?: ErrorDiagnostic;
|
package/lib/parsers.js
CHANGED
|
@@ -8546,13 +8546,15 @@ var ed = [
|
|
|
8546
8546
|
"Section"
|
|
8547
8547
|
];
|
|
8548
8548
|
function td(e) {
|
|
8549
|
-
let t = Nu(Pu(e)), n = [], r = [], i = "generalExpose", a = null, o = null, s = t("h1, h2, h3, h4, h5, h6, p.assnatFPFexpogentitre1, p.assnatFPFexpogentexte, li.assnatFPFexpogentexte, li.assnatFPFprojetloiartexte, p.assnatFPFprojetloiartexte, p.assnatFPFfinartexte, table, img").toArray(),
|
|
8550
|
-
o && (
|
|
8549
|
+
let t = Nu(Pu(e)), n = [], r = [], i = "generalExpose", a = null, o = null, s = [], c = t("h1, h2, h3, h4, h5, h6, p.assnatPastille, p.assnatFPFexpogentitre1, p.assnatFPFexpogentexte, li.assnatFPFexpogentexte, li.assnatFPFprojetloiartexte, p.assnatFPFprojetloiartexte, p.assnatFPFfinartexte, table, img").toArray(), l = () => {
|
|
8550
|
+
o && s.length > 0 && (o.alineas = nd(s)), s = [];
|
|
8551
|
+
}, u = () => {
|
|
8552
|
+
o && (l(), n.push(o), o = null);
|
|
8551
8553
|
};
|
|
8552
|
-
for (let e of
|
|
8554
|
+
for (let e of c) {
|
|
8553
8555
|
if (i === "done") break;
|
|
8554
|
-
let
|
|
8555
|
-
if (!(v && g.length === 0) && !(
|
|
8556
|
+
let c = t(e), g = Q(c.text()), _ = sd(c), v = _ !== null, y = _ !== null && _ >= 2 && _ <= 5, b = c.hasClass("assnatFPFexpogentitre1"), x = c.hasClass("assnatFPFexpogentexte"), S = c.hasClass("assnatPastille"), te = c.hasClass("assnatFPFprojetloiartexte"), ne = c.hasClass("assnatFPFfinartexte"), re = c.is("table"), ie = c.is("img"), ae = c.find("img").length > 0;
|
|
8557
|
+
if (!(v && g.length === 0) && !(re && c.find("p.assnatFARTT08Bleu").length > 0) && !(re && od(c)) && !(x && g.length === 0)) {
|
|
8556
8558
|
if (i === "generalExpose") {
|
|
8557
8559
|
if (_ === 1) {
|
|
8558
8560
|
let e = g.toLowerCase();
|
|
@@ -8563,93 +8565,148 @@ function td(e) {
|
|
|
8563
8565
|
e.includes("exposé général des motifs") && (a ?? (a = Zu("D_EXPOSE", "Exposé des motifs", 1, 1)));
|
|
8564
8566
|
}
|
|
8565
8567
|
if (y && (a && n.push(a), a = null, i = "hierarchy"), a) {
|
|
8566
|
-
if (
|
|
8567
|
-
let e =
|
|
8568
|
+
if (ie) {
|
|
8569
|
+
let e = ud(c);
|
|
8568
8570
|
if (e) {
|
|
8569
|
-
var
|
|
8570
|
-
(
|
|
8571
|
+
var d;
|
|
8572
|
+
(d = a).alineas ?? (d.alineas = []), a.alineas.push(e);
|
|
8571
8573
|
}
|
|
8572
8574
|
} else if ((_ === 1 || _ === 6) && g.length > 0) {
|
|
8573
|
-
var
|
|
8574
|
-
(
|
|
8575
|
+
var f;
|
|
8576
|
+
(f = a).titres ?? (f.titres = []), a.titres.push($(c));
|
|
8575
8577
|
} else if (b || x) {
|
|
8576
|
-
let e =
|
|
8578
|
+
let e = ae ? cd(c) : $(c);
|
|
8577
8579
|
if (e) {
|
|
8578
|
-
var
|
|
8579
|
-
(
|
|
8580
|
+
var p;
|
|
8581
|
+
(p = a).alineas ?? (p.alineas = []), a.alineas.push(e);
|
|
8580
8582
|
}
|
|
8581
|
-
} else if (
|
|
8582
|
-
var
|
|
8583
|
-
(
|
|
8583
|
+
} else if (re) {
|
|
8584
|
+
var ee;
|
|
8585
|
+
(ee = a).alineas ?? (ee.alineas = []), a.alineas.push($u(c));
|
|
8584
8586
|
}
|
|
8585
8587
|
continue;
|
|
8586
8588
|
}
|
|
8587
8589
|
}
|
|
8588
8590
|
if (Qu(g)) {
|
|
8589
|
-
|
|
8591
|
+
u(), a && (n.push(a), a = null), i = "done";
|
|
8590
8592
|
continue;
|
|
8591
8593
|
}
|
|
8592
8594
|
if (_ !== 1) {
|
|
8593
8595
|
if (y) {
|
|
8594
|
-
|
|
8596
|
+
u();
|
|
8595
8597
|
let e = _ - 2, t = ed[e];
|
|
8596
8598
|
for (; r.length > 0 && r[r.length - 1] >= e;) r.pop();
|
|
8597
8599
|
r.push(e);
|
|
8598
8600
|
let a = Zu(`D_${Xu(g)}`, t, e + 1, r.length);
|
|
8599
|
-
a.titres = [$(
|
|
8601
|
+
a.titres = [$(c)], n.push(a), i = "hierarchy";
|
|
8600
8602
|
continue;
|
|
8601
8603
|
}
|
|
8602
8604
|
if (_ === 6) {
|
|
8603
|
-
|
|
8605
|
+
u();
|
|
8604
8606
|
let e = r.length + 1;
|
|
8605
|
-
o = Zu(`D_${Xu(g)}`, "Article", 5, e), o.titres = [$(
|
|
8607
|
+
o = Zu(`D_${Xu(g)}`, "Article", 5, e), o.titres = [$(c)], s = [], i = "articleBody";
|
|
8606
8608
|
continue;
|
|
8607
8609
|
}
|
|
8608
8610
|
if (S && i === "articleBody" && o) {
|
|
8609
|
-
|
|
8611
|
+
s.push({
|
|
8612
|
+
type: "marker",
|
|
8613
|
+
number: ad(g)
|
|
8614
|
+
});
|
|
8615
|
+
continue;
|
|
8616
|
+
}
|
|
8617
|
+
if (te && i === "articleBody" && o) {
|
|
8610
8618
|
if (g.length === 0) continue;
|
|
8611
|
-
|
|
8619
|
+
s.push({
|
|
8620
|
+
type: "content",
|
|
8621
|
+
content: $(c)
|
|
8622
|
+
});
|
|
8612
8623
|
continue;
|
|
8613
8624
|
}
|
|
8614
|
-
if (
|
|
8615
|
-
|
|
8616
|
-
|
|
8625
|
+
if (re && i === "articleBody" && o) {
|
|
8626
|
+
s.push({
|
|
8627
|
+
type: "content",
|
|
8628
|
+
content: $u(c)
|
|
8629
|
+
});
|
|
8617
8630
|
continue;
|
|
8618
8631
|
}
|
|
8619
|
-
if (
|
|
8620
|
-
i = "articleExpose";
|
|
8632
|
+
if (ne && o) {
|
|
8633
|
+
l(), i = "articleExpose";
|
|
8621
8634
|
continue;
|
|
8622
8635
|
}
|
|
8623
8636
|
if (b && i === "articleBody" && o) {
|
|
8624
|
-
i = "articleExpose";
|
|
8637
|
+
l(), i = "articleExpose";
|
|
8625
8638
|
continue;
|
|
8626
8639
|
}
|
|
8627
8640
|
if (i === "articleExpose" && o) {
|
|
8628
8641
|
if (b) continue;
|
|
8629
8642
|
if (x) {
|
|
8630
8643
|
var m;
|
|
8631
|
-
(m = o).exposeDesMotifs ?? (m.exposeDesMotifs = []), o.exposeDesMotifs.push($(
|
|
8644
|
+
(m = o).exposeDesMotifs ?? (m.exposeDesMotifs = []), o.exposeDesMotifs.push($(c));
|
|
8632
8645
|
continue;
|
|
8633
8646
|
}
|
|
8634
|
-
if (
|
|
8647
|
+
if (re) {
|
|
8635
8648
|
var h;
|
|
8636
|
-
(h = o).exposeDesMotifs ?? (h.exposeDesMotifs = []), o.exposeDesMotifs.push($u(
|
|
8649
|
+
(h = o).exposeDesMotifs ?? (h.exposeDesMotifs = []), o.exposeDesMotifs.push($u(c));
|
|
8637
8650
|
}
|
|
8638
8651
|
}
|
|
8639
8652
|
}
|
|
8640
8653
|
}
|
|
8641
8654
|
}
|
|
8642
|
-
return
|
|
8655
|
+
return u(), a && n.push(a), { subdivisions: n };
|
|
8643
8656
|
}
|
|
8644
8657
|
function nd(e) {
|
|
8658
|
+
let t = e.flatMap((e) => e.type === "content" ? [e.content] : []);
|
|
8659
|
+
if (e.length - t.length === 0) return t;
|
|
8660
|
+
let n = [], r, i;
|
|
8661
|
+
for (let a of e) {
|
|
8662
|
+
if (a.type === "content") {
|
|
8663
|
+
if (!r) return t;
|
|
8664
|
+
r.contents.push(a.content);
|
|
8665
|
+
continue;
|
|
8666
|
+
}
|
|
8667
|
+
if (a.number === void 0 || (i === void 0 ? a.number !== 1 : a.number <= i)) return t;
|
|
8668
|
+
r = {
|
|
8669
|
+
number: a.number,
|
|
8670
|
+
contents: []
|
|
8671
|
+
}, n.push(r), i = a.number;
|
|
8672
|
+
}
|
|
8673
|
+
rd(n);
|
|
8674
|
+
let a = [];
|
|
8675
|
+
for (let e = 0; e < n.length; e++) {
|
|
8676
|
+
let r = n[e], i = n[e + 1], o = i ? i.number - r.number : 1;
|
|
8677
|
+
if (r.contents.length < o) return t;
|
|
8678
|
+
for (let e = 0; e < o - 1; e++) a.push(r.contents[e]);
|
|
8679
|
+
a.push(id(r.contents.slice(o - 1)));
|
|
8680
|
+
}
|
|
8681
|
+
return a;
|
|
8682
|
+
}
|
|
8683
|
+
function rd(e) {
|
|
8684
|
+
for (let t = 0; t < e.length - 1; t++) {
|
|
8685
|
+
let n = e[t].contents, r = e[t + 1].contents, i = n[n.length - 1];
|
|
8686
|
+
i?.texte?.trim() === "«" && r.some(({ html: e }) => /<table\b/.test(e ?? "")) && (n.pop(), r.unshift(i));
|
|
8687
|
+
}
|
|
8688
|
+
}
|
|
8689
|
+
function id(e) {
|
|
8690
|
+
return {
|
|
8691
|
+
texte: e.flatMap(({ texte: e }) => e === void 0 ? [] : [e]).join("\n"),
|
|
8692
|
+
html: e.flatMap(({ html: e }) => e === void 0 ? [] : [e]).join("\n")
|
|
8693
|
+
};
|
|
8694
|
+
}
|
|
8695
|
+
function ad(e) {
|
|
8696
|
+
let t = /^\((\d+)\)$/.exec(e);
|
|
8697
|
+
if (!t) return;
|
|
8698
|
+
let n = Number(t[1]);
|
|
8699
|
+
return Number.isSafeInteger(n) && n > 0 ? n : void 0;
|
|
8700
|
+
}
|
|
8701
|
+
function od(e) {
|
|
8645
8702
|
let t = e.children("tbody").children("tr").add(e.children("tr"));
|
|
8646
8703
|
return t.length === 1 && t.children("td").length === 1 && e.find("h6, .assnatFPFexpogentexte").length > 0;
|
|
8647
8704
|
}
|
|
8648
|
-
function
|
|
8705
|
+
function sd(e) {
|
|
8649
8706
|
for (let t = 1; t <= 6; t++) if (e.is(`h${t}`)) return t;
|
|
8650
8707
|
return null;
|
|
8651
8708
|
}
|
|
8652
|
-
function
|
|
8709
|
+
function cd(e) {
|
|
8653
8710
|
let t = e.clone();
|
|
8654
8711
|
t.find("img").remove();
|
|
8655
8712
|
let n = Q(t.text());
|
|
@@ -8658,14 +8715,14 @@ function id(e) {
|
|
|
8658
8715
|
html: Q(t.html())
|
|
8659
8716
|
} : null;
|
|
8660
8717
|
}
|
|
8661
|
-
function
|
|
8718
|
+
function ld(e) {
|
|
8662
8719
|
if (!e || !/^\d+$/.test(e)) return;
|
|
8663
8720
|
let t = Number(e);
|
|
8664
8721
|
return t > 0 ? t : void 0;
|
|
8665
8722
|
}
|
|
8666
|
-
function
|
|
8723
|
+
function ud(e) {
|
|
8667
8724
|
if (!e.attr("src")) return null;
|
|
8668
|
-
let t =
|
|
8725
|
+
let t = ld(e.attr("width")), n = ld(e.attr("height"));
|
|
8669
8726
|
return t === 15 && n === 15 || t === 2 && n === 138 ? null : {
|
|
8670
8727
|
texte: Q(e.attr("alt") ?? ""),
|
|
8671
8728
|
html: e.prop("outerHTML") || ""
|
|
@@ -8673,7 +8730,7 @@ function od(e) {
|
|
|
8673
8730
|
}
|
|
8674
8731
|
//#endregion
|
|
8675
8732
|
//#region src/parsers/plf/later_stage.ts
|
|
8676
|
-
function
|
|
8733
|
+
function dd(e) {
|
|
8677
8734
|
let t = Nu(Pu(e)), n = [], r = [], i = null, a = null, o = null, s = !1, c = t("p.assnat2PartieNum, p.assnat2PartieIntit, p.assnat4TitreNum, p.assnat4TitreNum0, p.assnat4TitreIntit, p.assnat9ArticleNum, p.assnatLoiTexte, p.assnat1TomeNum, table, p.assnat5ChapitreIntit, p.assnat5ChapitreIntit0, p.assnat5ChapitreNum, p.assnat5ChapitreNum0, p.assnat6SectionIntit, p.assnat6SectionIntit0, p.assnat6SectionNum, p.assnat6SectionNum0").toArray();
|
|
8678
8735
|
for (let e of c) {
|
|
8679
8736
|
let c = t(e), l = Q(c.text());
|
|
@@ -8682,7 +8739,7 @@ function sd(e) {
|
|
|
8682
8739
|
if (d) {
|
|
8683
8740
|
for (i && (n.push(i), i = null); r.length > 0 && r[r.length - 1] >= 0;) r.pop();
|
|
8684
8741
|
r.push(0);
|
|
8685
|
-
let e =
|
|
8742
|
+
let e = fd(a, $(c));
|
|
8686
8743
|
a = null, o = null;
|
|
8687
8744
|
let t = Zu(`D_${Xu(e.texte ?? l)}`, "Partie", 1, r.length);
|
|
8688
8745
|
t.titres = [e], n.push(t);
|
|
@@ -8695,7 +8752,7 @@ function sd(e) {
|
|
|
8695
8752
|
if (p) {
|
|
8696
8753
|
for (i && (n.push(i), i = null); r.length > 0 && r[r.length - 1] >= 1;) r.pop();
|
|
8697
8754
|
r.push(1);
|
|
8698
|
-
let e =
|
|
8755
|
+
let e = fd(o, $(c));
|
|
8699
8756
|
o = null;
|
|
8700
8757
|
let t = Zu(`D_${Xu(e.texte ?? l)}`, "Titre", 2, r.length);
|
|
8701
8758
|
t.titres = [e], n.push(t);
|
|
@@ -8733,7 +8790,7 @@ function sd(e) {
|
|
|
8733
8790
|
}
|
|
8734
8791
|
return i && n.push(i), { subdivisions: n };
|
|
8735
8792
|
}
|
|
8736
|
-
function
|
|
8793
|
+
function fd(e, t) {
|
|
8737
8794
|
return e === null ? t : {
|
|
8738
8795
|
texte: `${e.texte} : ${t.texte}`,
|
|
8739
8796
|
html: `${e.html} : ${t.html}`
|
|
@@ -8741,20 +8798,20 @@ function cd(e, t) {
|
|
|
8741
8798
|
}
|
|
8742
8799
|
//#endregion
|
|
8743
8800
|
//#region src/parsers/plf/variant_detection.ts
|
|
8744
|
-
var
|
|
8801
|
+
var pd = [
|
|
8745
8802
|
"assnatFPFexpogentexte",
|
|
8746
8803
|
"assnatFPFexpogentitre1",
|
|
8747
8804
|
"assnatFPFexpogentitre2",
|
|
8748
8805
|
"assnatFPFexpogentitre3",
|
|
8749
8806
|
"assnatFPFexpogentitre4"
|
|
8750
8807
|
];
|
|
8751
|
-
function
|
|
8808
|
+
function md(e) {
|
|
8752
8809
|
let t = Nu(Pu(e));
|
|
8753
|
-
return t("h1, h2, h3, h4, h5, h6").toArray().some((e) => Q(t(e).text()).normalize("NFD").replace(/[\u0300-\u036f]/g, "").toLowerCase().includes("expose general des motifs")) || t(
|
|
8810
|
+
return t("h1, h2, h3, h4, h5, h6").toArray().some((e) => Q(t(e).text()).normalize("NFD").replace(/[\u0300-\u036f]/g, "").toLowerCase().includes("expose general des motifs")) || t(pd.map((e) => `.${e}`).join(", ")).length > 0 ? "depot" : "laterStage";
|
|
8754
8811
|
}
|
|
8755
8812
|
//#endregion
|
|
8756
8813
|
//#region src/parsers/plf/credits.ts
|
|
8757
|
-
var
|
|
8814
|
+
var hd = {
|
|
8758
8815
|
bg: {
|
|
8759
8816
|
budgetType: "budgetGeneral",
|
|
8760
8817
|
libelle: "Budget général"
|
|
@@ -8772,15 +8829,15 @@ var dd = {
|
|
|
8772
8829
|
libelle: "Comptes de concours financiers"
|
|
8773
8830
|
}
|
|
8774
8831
|
};
|
|
8775
|
-
function
|
|
8832
|
+
function gd(e) {
|
|
8776
8833
|
if (!e) return [];
|
|
8777
|
-
let t = Nu(Pu(e)), n =
|
|
8834
|
+
let t = Nu(Pu(e)), n = Sd(t);
|
|
8778
8835
|
if (n.length === 0) return [];
|
|
8779
8836
|
let r = [];
|
|
8780
8837
|
for (let e of n) {
|
|
8781
8838
|
let n = [], i;
|
|
8782
8839
|
for (let r of e.tableEls) {
|
|
8783
|
-
let e =
|
|
8840
|
+
let e = bd(t, r);
|
|
8784
8841
|
n.push(...e.missions), e.total && (i = e.total);
|
|
8785
8842
|
}
|
|
8786
8843
|
n.length === 0 && !e.estConformeVersionPrecedente || r.push({
|
|
@@ -8796,7 +8853,7 @@ function fd(e) {
|
|
|
8796
8853
|
}
|
|
8797
8854
|
return r;
|
|
8798
8855
|
}
|
|
8799
|
-
function
|
|
8856
|
+
function _d(e) {
|
|
8800
8857
|
let t = Q(e).replace(/[\u2212\u2011]/g, "-").replace(/\s/g, "").replace(/[^0-9,.-]/g, ""), n = (t.match(/,/g) ?? []).length;
|
|
8801
8858
|
if (n > 1) return;
|
|
8802
8859
|
let r = n === 1 ? t.replace(/\./g, "").replace(",", ".") : t;
|
|
@@ -8804,23 +8861,23 @@ function pd(e) {
|
|
|
8804
8861
|
let i = Number(r);
|
|
8805
8862
|
return Number.isNaN(i) ? void 0 : i;
|
|
8806
8863
|
}
|
|
8807
|
-
function
|
|
8864
|
+
function vd(e) {
|
|
8808
8865
|
let t = Q(e);
|
|
8809
8866
|
if (!/\(\s*ligne\s+supprim(?:ée|ee)\s*\)\s*$/i.test(t)) return t.replace(/\s*\(\s*ligne\s+nouvelle\s*\)\s*$/i, "").trim();
|
|
8810
8867
|
}
|
|
8811
|
-
function
|
|
8812
|
-
let n =
|
|
8868
|
+
function yd(e, t) {
|
|
8869
|
+
let n = _d(t(e[1]).text()), r = _d(t(e[2]).text());
|
|
8813
8870
|
return e.length >= 5 ? {
|
|
8814
8871
|
autorisationEngagement: n,
|
|
8815
8872
|
creditPaiement: r,
|
|
8816
|
-
autorisationEngagementAnnule:
|
|
8817
|
-
creditPaiementAnnule:
|
|
8873
|
+
autorisationEngagementAnnule: _d(t(e[3]).text()),
|
|
8874
|
+
creditPaiementAnnule: _d(t(e[4]).text())
|
|
8818
8875
|
} : {
|
|
8819
8876
|
autorisationEngagement: n,
|
|
8820
8877
|
creditPaiement: r
|
|
8821
8878
|
};
|
|
8822
8879
|
}
|
|
8823
|
-
function
|
|
8880
|
+
function bd(e, t) {
|
|
8824
8881
|
let n = [], r = null, i = null, a, o = e(t).find("tbody tr").toArray(), s = o.some((t) => {
|
|
8825
8882
|
let n = (e(t).find("td").first().attr("style") || "").replace(/[\n\t]/g, " ");
|
|
8826
8883
|
return /border-top/.test(n);
|
|
@@ -8830,7 +8887,7 @@ function gd(e, t) {
|
|
|
8830
8887
|
if (o.length < 3) continue;
|
|
8831
8888
|
let c = e(o[0]), l = (c.attr("style") || "").replace(/[\n\t]/g, " "), u = Q(c.text());
|
|
8832
8889
|
if (!u) continue;
|
|
8833
|
-
let d = /^total/i.test(u), f =
|
|
8890
|
+
let d = /^total/i.test(u), f = yd(o, e);
|
|
8834
8891
|
if (d) {
|
|
8835
8892
|
a = f;
|
|
8836
8893
|
continue;
|
|
@@ -8844,7 +8901,7 @@ function gd(e, t) {
|
|
|
8844
8901
|
}
|
|
8845
8902
|
if (s ? /border-top/.test(l) : /border-bottom/.test(l)) {
|
|
8846
8903
|
r && n.push(r);
|
|
8847
|
-
let e =
|
|
8904
|
+
let e = vd(c.text());
|
|
8848
8905
|
if (e === void 0) {
|
|
8849
8906
|
r = null, i = null;
|
|
8850
8907
|
continue;
|
|
@@ -8858,7 +8915,7 @@ function gd(e, t) {
|
|
|
8858
8915
|
continue;
|
|
8859
8916
|
}
|
|
8860
8917
|
if (r) {
|
|
8861
|
-
let e =
|
|
8918
|
+
let e = vd(c.text());
|
|
8862
8919
|
if (e === void 0) {
|
|
8863
8920
|
i = null;
|
|
8864
8921
|
continue;
|
|
@@ -8874,11 +8931,11 @@ function gd(e, t) {
|
|
|
8874
8931
|
total: a
|
|
8875
8932
|
};
|
|
8876
8933
|
}
|
|
8877
|
-
function
|
|
8934
|
+
function xd(e, t) {
|
|
8878
8935
|
let n = e(t).find("tr").slice(0, 3).find("th, td").toArray().map((t) => Q(e(t).text()).toLocaleLowerCase("fr"));
|
|
8879
8936
|
return n.some((e) => e.includes("mission / programme")) && n.some((e) => e.includes("autorisation") && e.includes("engagement")) && n.some((e) => e.includes("crédit") && e.includes("paiement"));
|
|
8880
8937
|
}
|
|
8881
|
-
function
|
|
8938
|
+
function Sd(e) {
|
|
8882
8939
|
let t, n, r = !1, i = /* @__PURE__ */ new Map(), a = e("p, h1, h2, h3, h4, h5, h6, a:not([href]), table").toArray().filter((t) => e(t).parents("table").length === 0);
|
|
8883
8940
|
for (let o of a) {
|
|
8884
8941
|
let a = e(o);
|
|
@@ -8895,7 +8952,7 @@ function vd(e) {
|
|
|
8895
8952
|
for (let t of e) {
|
|
8896
8953
|
let e = i.get(t);
|
|
8897
8954
|
e ? e.estConformeVersionPrecedente = !0 : i.set(t, {
|
|
8898
|
-
...
|
|
8955
|
+
...hd[t],
|
|
8899
8956
|
tableEls: [],
|
|
8900
8957
|
estConformeVersionPrecedente: !0
|
|
8901
8958
|
});
|
|
@@ -8911,7 +8968,7 @@ function vd(e) {
|
|
|
8911
8968
|
s !== /COMPTES\s+DE\s+CONCOURS\s+FINANCIERS/i.test(e) && (n = s ? "cas" : "ccf");
|
|
8912
8969
|
continue;
|
|
8913
8970
|
}
|
|
8914
|
-
if (!
|
|
8971
|
+
if (!xd(e, o)) continue;
|
|
8915
8972
|
let s = t === "B" ? "bg" : t === "C" ? "ba" : t === "D" ? n : void 0;
|
|
8916
8973
|
if (!s) continue;
|
|
8917
8974
|
r = !0;
|
|
@@ -8921,7 +8978,7 @@ function vd(e) {
|
|
|
8921
8978
|
continue;
|
|
8922
8979
|
}
|
|
8923
8980
|
i.set(s, {
|
|
8924
|
-
...
|
|
8981
|
+
...hd[s],
|
|
8925
8982
|
tableEls: [o],
|
|
8926
8983
|
estConformeVersionPrecedente: !1
|
|
8927
8984
|
});
|
|
@@ -8930,8 +8987,8 @@ function vd(e) {
|
|
|
8930
8987
|
}
|
|
8931
8988
|
//#endregion
|
|
8932
8989
|
//#region src/parsers/plf/index.ts
|
|
8933
|
-
function
|
|
8934
|
-
return e ?
|
|
8990
|
+
function Cd(e) {
|
|
8991
|
+
return e ? md(e) === "depot" ? td(e) : dd(e) : { subdivisions: [] };
|
|
8935
8992
|
}
|
|
8936
8993
|
//#endregion
|
|
8937
|
-
export { Ju as iterRechercheAmendements, Yu as iterRechercheRawAmendements,
|
|
8994
|
+
export { Ju as iterRechercheAmendements, Yu as iterRechercheRawAmendements, Cd as parsePlf, gd as parsePlfCredits, Wu as parseTexte };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function ensureSenateurPhoto(urlPhoto: string, photoFilePath: string, width: number, height: number): Promise<void>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|