@tricoteuses/assemblee 3.1.2 → 3.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +21 -3
- package/lib/amendements-D3Jr9MQa.js +3715 -0
- package/lib/amendements-DaB_5WaI.js +152 -0
- package/lib/cleaners.js +594 -653
- package/lib/datasets.d.ts +1 -0
- package/lib/git.js +153 -127
- package/lib/index.d.ts +1 -1
- package/lib/index.js +555 -758
- package/lib/inserters.d.ts +4 -0
- package/lib/loaders-CY8EGNSM.js +1325 -0
- package/lib/loaders.js +2 -2145
- package/lib/parsers.js +8388 -10324
- package/lib/questions-CsNQoayp.js +1581 -0
- package/lib/schemas/clean/scrutins.d.ts +18 -0
- package/lib/schemas/enriched/scrutins.d.ts +8 -0
- package/lib/schemas/raw/scrutins.d.ts +25 -5
- package/package.json +7 -7
- package/lib/amendements-Blw6Aa6-.js +0 -4133
- package/lib/amendements-DiMsxlUL.js +0 -178
- package/lib/questions-XokaUGcy.js +0 -3037
|
@@ -1,178 +0,0 @@
|
|
|
1
|
-
import f from "node:assert";
|
|
2
|
-
import { u as C } from "./amendements-Blw6Aa6-.js";
|
|
3
|
-
const x = {
|
|
4
|
-
false: !1,
|
|
5
|
-
true: !0
|
|
6
|
-
}, E = "http://schemas.assemblee-nationale.fr/referentiel", O = "http://www.w3.org/2001/XMLSchema-instance";
|
|
7
|
-
function u(i, t) {
|
|
8
|
-
const e = i[t];
|
|
9
|
-
if (e == null) {
|
|
10
|
-
delete i[t];
|
|
11
|
-
return;
|
|
12
|
-
}
|
|
13
|
-
const r = x[e];
|
|
14
|
-
return f.notStrictEqual(
|
|
15
|
-
r,
|
|
16
|
-
void 0,
|
|
17
|
-
`Invalid boolean value: ${t} = ${e}`
|
|
18
|
-
), i[t] = r, r;
|
|
19
|
-
}
|
|
20
|
-
function j(i, t) {
|
|
21
|
-
const e = i[t];
|
|
22
|
-
if (e == null) {
|
|
23
|
-
delete i[t];
|
|
24
|
-
return;
|
|
25
|
-
}
|
|
26
|
-
const r = Number.parseInt(e);
|
|
27
|
-
return f(
|
|
28
|
-
!Number.isNaN(r),
|
|
29
|
-
`Invalid number value: ${t} = ${e}`
|
|
30
|
-
), i[t] = r, r;
|
|
31
|
-
}
|
|
32
|
-
function s(i, { recursive: t } = {}) {
|
|
33
|
-
if (i != null) {
|
|
34
|
-
if (Array.isArray(i)) {
|
|
35
|
-
if (i.length === 0)
|
|
36
|
-
return;
|
|
37
|
-
if (t)
|
|
38
|
-
for (const [e, r] of i.entries()) {
|
|
39
|
-
const a = s(r, { recursive: t });
|
|
40
|
-
a !== r && (i[e] = a ?? null);
|
|
41
|
-
}
|
|
42
|
-
return i;
|
|
43
|
-
}
|
|
44
|
-
if (typeof i == "object" && i.constructor === Object) {
|
|
45
|
-
const e = i;
|
|
46
|
-
if (Object.keys(e).length === 0 || e["@xsi:nil"] === "true")
|
|
47
|
-
return;
|
|
48
|
-
const r = e["@xmlns"] ?? e.xmlns;
|
|
49
|
-
if (r !== void 0 && (f.strictEqual(r, E), delete e["@xmlns"], delete e.xmlns), e["@xmlns:xsi"] === O && delete e["@xmlns:xsi"], t)
|
|
50
|
-
for (const [a, o] of Object.entries(e)) {
|
|
51
|
-
const c = s(o, { recursive: t });
|
|
52
|
-
c === void 0 ? delete e[a] : c !== o && (e[a] = c);
|
|
53
|
-
}
|
|
54
|
-
else
|
|
55
|
-
for (const [a, o] of Object.entries(e))
|
|
56
|
-
(o == null || o["@xsi:nil"] === "true" || Array.isArray(o) && o.length === 0 || !Array.isArray(o) && o.constructor === Object && Object.keys(o).length === 0) && delete e[a];
|
|
57
|
-
return Object.keys(e).length === 0 ? void 0 : e;
|
|
58
|
-
}
|
|
59
|
-
return i;
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
function v(i) {
|
|
63
|
-
return Array.isArray(i) ? i : [i];
|
|
64
|
-
}
|
|
65
|
-
function R(i) {
|
|
66
|
-
return i === "Après" ? "Apres" : C.includes(i) ? i : "A";
|
|
67
|
-
}
|
|
68
|
-
function S(i) {
|
|
69
|
-
const t = i;
|
|
70
|
-
s(t);
|
|
71
|
-
const e = t.signataires;
|
|
72
|
-
s(e);
|
|
73
|
-
const r = e.auteur;
|
|
74
|
-
s(r);
|
|
75
|
-
const a = e.cosignataires;
|
|
76
|
-
if (a !== void 0) {
|
|
77
|
-
const n = a.acteurRef;
|
|
78
|
-
n !== void 0 && (e.cosignatairesRefs = v(n)), delete e.cosignataires;
|
|
79
|
-
}
|
|
80
|
-
const o = e.libelle;
|
|
81
|
-
if (o !== void 0) {
|
|
82
|
-
const n = o.replace(/ |\u00A0/g, " ").split(" ").filter(Boolean).join(" ");
|
|
83
|
-
n ? e.libelle = n : delete e.libelle;
|
|
84
|
-
}
|
|
85
|
-
const c = t.pointeurFragmentTexte;
|
|
86
|
-
s(c);
|
|
87
|
-
const d = c.division;
|
|
88
|
-
if (d !== void 0) {
|
|
89
|
-
s(d);
|
|
90
|
-
const n = d.avant_A_Apres;
|
|
91
|
-
n !== void 0 && (delete d.avant_A_Apres, d.avantAApres = n === "Après" ? "Apres" : n);
|
|
92
|
-
}
|
|
93
|
-
const m = c.amendementStandard;
|
|
94
|
-
if (m !== void 0) {
|
|
95
|
-
s(m);
|
|
96
|
-
const n = m.alinea;
|
|
97
|
-
if (n !== void 0) {
|
|
98
|
-
s(n);
|
|
99
|
-
const l = n.avant_A_Apres;
|
|
100
|
-
typeof l == "string" && (delete n.avant_A_Apres, n.avantAApres = R(l)), c.alinea = n;
|
|
101
|
-
}
|
|
102
|
-
delete c.amendementStandard;
|
|
103
|
-
}
|
|
104
|
-
const p = t.corps;
|
|
105
|
-
if (p !== void 0) {
|
|
106
|
-
s(p);
|
|
107
|
-
const n = p.contenuAuteur;
|
|
108
|
-
if (n !== void 0) {
|
|
109
|
-
s(n);
|
|
110
|
-
const l = n.avantAppel;
|
|
111
|
-
l !== void 0 && (s(l), A(l.dispositifAmdtCreditPLF, {
|
|
112
|
-
rectificatif: !1
|
|
113
|
-
}), A(l.dispositifAmdtCreditPLFR, {
|
|
114
|
-
rectificatif: !0
|
|
115
|
-
}), Object.keys(l).length === 0 && delete n.avantAppel), f.strictEqual(n.annexeExposeSommaire, void 0), A(n.dispositifAmdtCreditPLF, {
|
|
116
|
-
rectificatif: !1
|
|
117
|
-
}), A(n.dispositifAmdtCreditPLFR, {
|
|
118
|
-
rectificatif: !0
|
|
119
|
-
});
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
const g = t.cycleDeVie;
|
|
123
|
-
if (g !== void 0) {
|
|
124
|
-
s(g);
|
|
125
|
-
const n = g.etatDesTraitements;
|
|
126
|
-
s(n), s(n.etat), n.sousEtat !== void 0 && s(n.sousEtat);
|
|
127
|
-
}
|
|
128
|
-
const b = t.representations;
|
|
129
|
-
if (b !== void 0) {
|
|
130
|
-
const n = b.representation;
|
|
131
|
-
f(!Array.isArray(n)), t.representation = n, delete t.representations, s(n), f.strictEqual(n.repSource, void 0), f.strictEqual(n.offset, void 0), f.strictEqual(n.dateDispoRepresentation, void 0);
|
|
132
|
-
const l = n.statutRepresentation;
|
|
133
|
-
u(l, "canonique"), u(l, "enregistrement"), u(l, "officielle"), u(l, "transcription"), u(l, "verbatim");
|
|
134
|
-
}
|
|
135
|
-
return t.loiReference !== void 0 && s(t.loiReference), t.discussionCommune !== void 0 && s(t.discussionCommune), t.discussionIdentique !== void 0 && s(t.discussionIdentique), t;
|
|
136
|
-
}
|
|
137
|
-
function A(i, { rectificatif: t }) {
|
|
138
|
-
if (i !== void 0) {
|
|
139
|
-
const e = i.listeProgrammes, r = e === void 0 ? void 0 : Array.isArray(e) ? e : e.programme === void 0 ? void 0 : v(e.programme);
|
|
140
|
-
if (r !== void 0) {
|
|
141
|
-
i.listeProgrammes = r;
|
|
142
|
-
for (const a of r) {
|
|
143
|
-
s(a);
|
|
144
|
-
const o = a.lignesCredits;
|
|
145
|
-
if (o !== void 0) {
|
|
146
|
-
const c = Array.isArray(o) ? o : o.ligneCredit === void 0 ? void 0 : v(o.ligneCredit);
|
|
147
|
-
if (c === void 0)
|
|
148
|
-
delete a.lignesCredits;
|
|
149
|
-
else {
|
|
150
|
-
a.lignesCredits = c;
|
|
151
|
-
for (const d of c)
|
|
152
|
-
t ? y(d) : s(d);
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
function y(i) {
|
|
160
|
-
s(i);
|
|
161
|
-
const t = i.lignesCredits;
|
|
162
|
-
if (t !== void 0) {
|
|
163
|
-
const e = Array.isArray(t) ? t : t.ligneCredit === void 0 ? void 0 : v(t.ligneCredit);
|
|
164
|
-
if (e === void 0)
|
|
165
|
-
delete i.lignesCredits;
|
|
166
|
-
else {
|
|
167
|
-
i.lignesCredits = e;
|
|
168
|
-
for (const r of e)
|
|
169
|
-
y(r);
|
|
170
|
-
}
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
export {
|
|
174
|
-
u as a,
|
|
175
|
-
j as b,
|
|
176
|
-
s as c,
|
|
177
|
-
S as d
|
|
178
|
-
};
|