@tricoteuses/assemblee 3.0.18 → 3.1.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.
Files changed (40) hide show
  1. package/README.md +2 -2
  2. package/lib/{amendements-Bab1iUCY.js → amendements-Blw6Aa6-.js} +3 -3
  3. package/lib/amendements-DiMsxlUL.js +178 -0
  4. package/lib/cleaners/actes_legislatifs.d.ts +2 -2
  5. package/lib/cleaners/acteurs.d.ts +7 -2
  6. package/lib/cleaners/amendements.d.ts +2 -2
  7. package/lib/cleaners/documents.d.ts +1 -1
  8. package/lib/cleaners/dossiers_legislatifs.d.ts +1 -1
  9. package/lib/cleaners/organes.d.ts +1 -1
  10. package/lib/cleaners/reunions.d.ts +1 -1
  11. package/lib/cleaners/scrutins.d.ts +10 -2
  12. package/lib/cleaners.js +576 -485
  13. package/lib/datasets.d.ts +2 -6
  14. package/lib/git.js +54 -51
  15. package/lib/index.js +263 -257
  16. package/lib/inserters.d.ts +22 -2
  17. package/lib/loaders.js +495 -544
  18. package/lib/logger.d.ts +1 -1
  19. package/lib/parsers.js +5 -5
  20. package/lib/{questions-BiakXZ6q.js → questions-XokaUGcy.js} +4 -1
  21. package/lib/registries.d.ts +4 -4
  22. package/lib/schemas/clean/acteurs_et_organes.d.ts +37 -37
  23. package/lib/schemas/clean/amendements.d.ts +38 -25
  24. package/lib/schemas/clean/dossiers_legislatifs.d.ts +16 -16
  25. package/lib/schemas/clean/scrutins.d.ts +2 -2
  26. package/lib/schemas/enriched/acteurs_et_organes.d.ts +2 -2
  27. package/lib/schemas/enriched/amendements.d.ts +135 -15
  28. package/lib/schemas/enriched/dossiers_legislatifs.d.ts +12 -12
  29. package/lib/schemas/enriched/scrutins.d.ts +2 -2
  30. package/lib/schemas/raw/acteurs_et_organes.d.ts +99 -99
  31. package/lib/schemas/raw/agendas.d.ts +11 -11
  32. package/lib/schemas/raw/amendements.d.ts +49 -37
  33. package/lib/schemas/raw/dossiers_legislatifs.d.ts +146 -63
  34. package/lib/schemas/raw/questions.d.ts +44 -44
  35. package/lib/schemas/raw/scrutins.d.ts +4 -4
  36. package/lib/scripts/retrieve_documents.d.ts +5 -1
  37. package/lib/scripts/retrieve_open_data.d.ts +4 -0
  38. package/lib/scripts/shared/cli_helpers.d.ts +8 -0
  39. package/package.json +26 -26
  40. package/lib/amendements-BKGwufEi.js +0 -170
package/lib/index.js CHANGED
@@ -1,9 +1,9 @@
1
- import { A as k, n as Q, B as J, C as z, D as H, T as W, s as Y, k as K, m as Z, u as ee, o as ie, d as te, a as oe, b as ne, q as re, v as se, w as ae, e as ce, f as ue, c as fe, g as pe, h as le, i as de, j as me, l as ye, p as ge, x as Re, t as Se, y as ve, z as Ae, r as he } from "./amendements-Bab1iUCY.js";
2
- import { a0 as Te, C as xe, W as _e, b as Pe, a2 as Ce, e as Ee, a4 as Ue, S as Be, D as De, E as be, F as Ie, q as Le, L as Ne, a6 as Me, a8 as je, aa as $e, M as Ve, ac as Xe, N as we, O as qe, ap as Fe, u as Ge, ae as ke, P as Qe, w as Je, y as ze, Q as He, Y as We, R as Ye, j as Ke, B as Ze, ag as ei, T as ii, _ as ti, I as oi, U as ni, aq as ri, $ as si, c as ai, V as ci, a as ui, a1 as fi, d as pi, a3 as li, ah as di, K as mi, f as yi, ai as gi, ar as Ri, as as Si, aj as vi, an as Ai, k as hi, g as Oi, n as Ti, l as xi, h as _i, a5 as Pi, a7 as Ci, a9 as Ei, m as Ui, ab as Bi, s as Di, o as bi, ao as Ii, t as Li, ad as Ni, p as Mi, v as ji, x as $i, z as Vi, ak as Xi, X as wi, r as qi, i as Fi, al as Gi, A as ki, am as Qi, at as Ji, af as zi, G as Hi, Z as Wi, H as Yi, J as Ki } from "./questions-BiakXZ6q.js";
1
+ import { A as k, n as Q, B as J, C as z, D as H, T as W, s as Y, k as K, m as Z, u as ee, o as ie, d as te, a as oe, b as ne, q as re, v as se, w as ae, e as ce, f as ue, c as fe, g as pe, h as le, i as de, j as me, l as ye, p as ge, x as Re, t as Se, y as ve, z as Ae, r as he } from "./amendements-Blw6Aa6-.js";
2
+ import { a0 as Te, C as xe, W as _e, b as Pe, a2 as Ce, e as Ee, a4 as Ue, S as Be, D as be, E as De, F as Le, q as Ie, L as Ne, a6 as Me, a8 as je, aa as $e, M as Ve, ac as Xe, N as we, O as qe, ap as Fe, u as Ge, ae as ke, P as Qe, w as Je, y as ze, Q as He, Y as We, R as Ye, j as Ke, B as Ze, ag as ei, T as ii, _ as ti, I as oi, U as ni, aq as ri, $ as si, c as ai, V as ci, a as ui, a1 as fi, d as pi, a3 as li, ah as di, K as mi, f as yi, ai as gi, ar as Ri, as as Si, aj as vi, an as Ai, k as hi, g as Oi, n as Ti, l as xi, h as _i, a5 as Pi, a7 as Ci, a9 as Ei, m as Ui, ab as Bi, s as bi, o as Di, ao as Li, t as Ii, ad as Ni, p as Mi, v as ji, x as $i, z as Vi, ak as Xi, X as wi, r as qi, i as Fi, al as Gi, A as ki, am as Qi, at as Ji, af as zi, G as Hi, Z as Wi, H as Yi, J as Ki } from "./questions-XokaUGcy.js";
3
3
  var R = /* @__PURE__ */ ((e) => (e.Amendements = "amendements", e))(R || {});
4
- const I = Object.values(R);
4
+ const L = Object.values(R);
5
5
  var S = /* @__PURE__ */ ((e) => (e.Acte_organe = "acte.organe", e.Acte_provenance = "acte.provenance", e.Acte_rapporteurs_acteur = "acte.rapporteurs.acteur", e.Acte_reunion = "acte.reunion", e.Acte_texteAdopte = "acte.texteAdopte", e.Acte_texteAssocie = "acte.texteAssocie", e.Acte_textesAssocies_texteAssocie = "acte.textesAssocies.texteAssocie", e.Acte_votes = "acte.votes", e.Acteur_mandats_organes = "acteur.mandats.organes", e.Amendement_signataires_auteur_acteur = "amendement.signataires.auteur.acteur", e.Amendement_signataires_auteur_auteurRapporteurOrgane = "amendement.signataires.auteur.auteurRapporteurOrgane", e.Amendement_signataires_auteur_gouvernement = "amendement.signataires.auteur.gouvernement", e.Amendement_signataires_auteur_groupePolitique = "amendement.signataires.auteur.groupePolitique", e.Amendement_signataires_cosignataires = "amendement.signataires.cosignataires", e.Amendement_texteLegislatif = "amendement.texteLegislatif", e.Document_auteurs_acteur_acteur = "document.auteurs.acteur.acteur", e.Document_auteurs_organe = "document.auteurs.organe", e.Document_dossier = "document.dossier", e.Dossier_initiateur_acteurs_acteur = "dossier.initiateur.acteurs.acteur", e.Dossier_initiateur_organe = "dossier.initiateur.organe", e.Organe_organeParent = "organe.organeParent", e.Organe_organePrecedent = "organe.organePrecedent", e.Reunion_demandeurs_acteurs_acteur = "reunion.demandeurs.acteurs.acteur", e.Reunion_demandeurs_organe_organe = "reunion.demandeurs.organe.organe", e.Reunion_organeReuni = "reunion.organeReuni", e.Reunion_participants_participantsInternes_acteur = "reunion.participants.participantsInternes.acteur", e.Scrutin_miseAuPoint = "scrutin.miseAuPoint", e.Scrutin_organe = "scrutin.organe", e.Scrutin_ventilationVotes_groupes_organe = "scrutin.ventilationVotes.groupes.organe", e))(S || {});
6
- const L = Object.values(S);
6
+ const I = Object.values(S);
7
7
  function N(e) {
8
8
  return e.charAt(0).toUpperCase() + e.slice(1);
9
9
  }
@@ -13,9 +13,9 @@ function c(e) {
13
13
  var x = /* @__PURE__ */ ((e) => (e.Failure = "FAILURE", e.Success = "SUCCESS", e))(x || {}), _ = /* @__PURE__ */ ((e) => (e.Failure = "FAILURE", e.InProgress = "IN_PROGRESS", e.Success = "SUCCESS", e))(_ || {});
14
14
  function M(e) {
15
15
  if (e.actesLegislatifs !== void 0) {
16
- for (const t of A(e.actesLegislatifs))
17
- if (t.codeActe.match(/^AN.*-COM-FOND-SAISIE$/) !== null && t.organeRef !== void 0 && t.organeRef !== "PO211494")
18
- return t.organeRef;
16
+ for (const i of A(e.actesLegislatifs))
17
+ if (i.codeActe.match(/^AN.*-COM-FOND-SAISIE$/) !== null && i.organeRef !== void 0 && i.organeRef !== "PO211494")
18
+ return i.organeRef;
19
19
  }
20
20
  }
21
21
  function u(e) {
@@ -51,65 +51,71 @@ function u(e) {
51
51
  return "IN_PROGRESS";
52
52
  }
53
53
  }
54
- function P(e, t) {
55
- const o = t[t.length - 1];
56
- let i = null;
57
- switch (o.xsiType) {
58
- case "Adoption_Europe_Type":
59
- return i = o.statutAdoption.libelle, i === void 0 ? null : {
60
- currentStatus: u(i),
61
- label: c(i)
54
+ function P(e, i) {
55
+ const n = i[i.length - 1];
56
+ let t;
57
+ switch (n.xsiType) {
58
+ case "Adoption_Europe_Type": {
59
+ const o = n.statutAdoption.libelle;
60
+ return o === void 0 ? null : {
61
+ currentStatus: u(o),
62
+ label: c(o)
62
63
  };
63
- case "ConclusionEtapeCC_Type":
64
- return i = o.statutConclusion.libelle, i === void 0 ? null : {
65
- currentStatus: u(i),
66
- label: c(i)
64
+ }
65
+ case "ConclusionEtapeCC_Type": {
66
+ const o = n.statutConclusion.libelle;
67
+ return o === void 0 ? null : {
68
+ currentStatus: u(o),
69
+ label: c(o)
67
70
  };
71
+ }
68
72
  case "Decision_Type": {
69
- if (i = o.statutConclusion.libelle, i === void 0)
73
+ const o = n.statutConclusion.libelle;
74
+ if (o === void 0)
70
75
  return null;
71
- let n = u(i), r;
76
+ const r = u(o);
77
+ let s;
72
78
  switch (e.procedureParlementaire.code) {
73
79
  case "PROCEDURE_PARLEMENTAIRE_2":
74
- ["rejeté", "rejetée"].includes(i) && e.actesLegislatifs !== void 0 && e.actesLegislatifs.length === 1 && (r = "FAILURE");
80
+ ["rejeté", "rejetée"].includes(o) && e.actesLegislatifs !== void 0 && e.actesLegislatifs.length === 1 && (s = "FAILURE");
75
81
  break;
76
82
  case "PROCEDURE_PARLEMENTAIRE_8":
77
83
  // Résolution
78
84
  case "PROCEDURE_PARLEMENTAIRE_22":
79
- n === "SUCCESS" ? r = "SUCCESS" : n === "FAILURE" && (r = "FAILURE");
85
+ r === "SUCCESS" ? s = "SUCCESS" : r === "FAILURE" && (s = "FAILURE");
80
86
  break;
81
87
  }
82
88
  return {
83
- currentStatus: n,
84
- finalStatus: r,
85
- label: c(i)
89
+ currentStatus: r,
90
+ finalStatus: s,
91
+ label: c(o)
86
92
  };
87
93
  }
88
94
  case "DecisionMotionCensure_Type":
89
- return i = o.decision.libelle, i === void 0 ? null : {
90
- currentStatus: u(i),
95
+ return t = n.decision.libelle, t === void 0 ? null : {
96
+ currentStatus: u(t),
91
97
  finalStatus: (
92
98
  // Not sure for other cases => To improve.
93
99
  // Engagement de la responsabilité gouvernementale
94
- e.procedureParlementaire.code === "PROCEDURE_PARLEMENTAIRE_13" && i === "Motion rejeté(e)" ? "FAILURE" : "SUCCESS"
100
+ e.procedureParlementaire.code === "PROCEDURE_PARLEMENTAIRE_13" && t === "Motion rejeté(e)" ? "FAILURE" : "SUCCESS"
95
101
  ),
96
102
  // TODO: Not sure of this `true` value
97
- label: c(i)
103
+ label: c(t)
98
104
  };
99
105
  case "DecisionRecevabiliteBureau_Type":
100
- return i = o.decision.libelle, i === void 0 ? null : {
101
- currentStatus: u(i),
102
- label: c(i)
106
+ return t = n.decision.libelle, t === void 0 ? null : {
107
+ currentStatus: u(t),
108
+ label: c(t)
103
109
  };
104
110
  case "DeclarationGouvernement_Type":
105
- return i = o.typeDeclaration.libelle, i === void 0 ? null : {
106
- currentStatus: u(i),
107
- label: c(i)
111
+ return t = n.typeDeclaration.libelle, t === void 0 ? null : {
112
+ currentStatus: u(t),
113
+ label: c(t)
108
114
  };
109
115
  case "DepotMotionCensure_Type":
110
- return i = o.typeMotionCensure.libelle, i === void 0 ? null : {
111
- currentStatus: u(i),
112
- label: c(i)
116
+ return t = n.typeMotionCensure.libelle, t === void 0 ? null : {
117
+ currentStatus: u(t),
118
+ label: c(t)
113
119
  };
114
120
  case "DepotRapport_Type":
115
121
  return [
@@ -117,14 +123,14 @@ function P(e, t) {
117
123
  "DossierMissionControle_Type",
118
124
  "DossierMissionInformation_Type"
119
125
  ].includes(e.xsiType) ? {
120
- currentStatus: t[0].organe.codeType,
126
+ currentStatus: i[0].organe.codeType,
121
127
  finalStatus: "SUCCESS",
122
128
  label: "rapport déposé"
123
129
  } : null;
124
130
  case "MotionProcedure_Type":
125
- return i = o.typeMotion.libelle, i === void 0 ? null : {
126
- currentStatus: u(i),
127
- label: c(i)
131
+ return t = n.typeMotion.libelle, t === void 0 ? null : {
132
+ currentStatus: u(t),
133
+ label: c(t)
128
134
  };
129
135
  case "Promulgation_Type":
130
136
  return {
@@ -139,64 +145,64 @@ function P(e, t) {
139
145
  label: "retiré"
140
146
  };
141
147
  case "SaisineConseilConstit_Type":
142
- return i = o.casSaisine.libelle, i === void 0 ? null : {
143
- currentStatus: u(i),
144
- label: c(i)
148
+ return t = n.casSaisine.libelle, t === void 0 ? null : {
149
+ currentStatus: u(t),
150
+ label: c(t)
145
151
  };
146
152
  default:
147
153
  return null;
148
154
  }
149
155
  }
150
- function v(e, t, o) {
151
- if (o !== void 0)
152
- for (const i of [...o].reverse()) {
153
- const n = i.actesLegislatifs ? v(e, [...t, i], i.actesLegislatifs) : P(e, [...t, i]);
154
- if (n !== null)
155
- return n;
156
+ function v(e, i, n) {
157
+ if (n !== void 0)
158
+ for (const t of [...n].reverse()) {
159
+ const o = t.actesLegislatifs ? v(e, [...i, t], t.actesLegislatifs) : P(e, [...i, t]);
160
+ if (o !== null)
161
+ return o;
156
162
  }
157
163
  return null;
158
164
  }
159
165
  function j(e) {
160
- const t = v(e, [], e.actesLegislatifs);
161
- return t !== null ? t : {
166
+ const i = v(e, [], e.actesLegislatifs);
167
+ return i !== null ? i : {
162
168
  currentStatus: "IN_PROGRESS",
163
169
  label: "en cours"
164
170
  };
165
171
  }
166
172
  function* A(e) {
167
- for (const t of e)
168
- yield t, t.actesLegislatifs !== void 0 && (yield* A(t.actesLegislatifs));
173
+ for (const i of e)
174
+ yield i, i.actesLegislatifs !== void 0 && (yield* A(i.actesLegislatifs));
169
175
  }
170
176
  function* C(e) {
171
177
  yield e;
172
- for (const t of e.divisions ?? [])
173
- yield* C(t);
178
+ for (const i of e.divisions ?? [])
179
+ yield* C(i);
174
180
  }
175
- function h(e, t, o) {
176
- if (!o.has(e.uid)) {
177
- if (o.add(e.uid), t.documentByUid !== void 0 && e.depotInitialLectureDefinitiveRef !== void 0) {
178
- const i = t.documentByUid[e.depotInitialLectureDefinitiveRef];
179
- i !== void 0 && (e.depotInitialLectureDefinitive = i, m(i, t, o));
181
+ function h(e, i, n) {
182
+ if (!n.has(e.uid)) {
183
+ if (n.add(e.uid), i.documentByUid !== void 0 && e.depotInitialLectureDefinitiveRef !== void 0) {
184
+ const t = i.documentByUid[e.depotInitialLectureDefinitiveRef];
185
+ t !== void 0 && (e.depotInitialLectureDefinitive = t, m(t, i, n));
180
186
  }
181
- if (t.organeByUid !== void 0 && e.organeRef !== void 0) {
182
- const i = t.organeByUid[e.organeRef];
183
- i !== void 0 && (e.organe = i, a(i, t, o));
187
+ if (i.organeByUid !== void 0 && e.organeRef !== void 0) {
188
+ const t = i.organeByUid[e.organeRef];
189
+ t !== void 0 && (e.organe = t, a(t, i, n));
184
190
  }
185
- if (t.organeByUid !== void 0 && e.provenanceRef !== void 0) {
186
- const i = t.organeByUid[e.provenanceRef];
187
- i !== void 0 && (e.provenance = i, a(i, t, o));
191
+ if (i.organeByUid !== void 0 && e.provenanceRef !== void 0) {
192
+ const t = i.organeByUid[e.provenanceRef];
193
+ t !== void 0 && (e.provenance = t, a(t, i, n));
188
194
  }
189
- if (t.acteurByUid !== void 0 && e.rapporteurs !== void 0)
190
- for (const i of e.rapporteurs) {
191
- const n = t.acteurByUid[i.acteurRef];
192
- n !== void 0 && (i.acteur = n, p(n, t, o));
195
+ if (i.acteurByUid !== void 0 && e.rapporteurs !== void 0)
196
+ for (const t of e.rapporteurs) {
197
+ const o = i.acteurByUid[t.acteurRef];
198
+ o !== void 0 && (t.acteur = o, p(o, i, n));
193
199
  }
194
- if (t.reunionByUid !== void 0 && e.reunionRef !== void 0) {
195
- const i = t.reunionByUid[e.reunionRef];
196
- if (i !== void 0 && (e.reunion = i, E(i, t, o), e.odjRef !== void 0)) {
197
- const n = i.odj;
198
- if (n !== void 0 && n.pointsOdj !== void 0) {
199
- for (const r of n.pointsOdj)
200
+ if (i.reunionByUid !== void 0 && e.reunionRef !== void 0) {
201
+ const t = i.reunionByUid[e.reunionRef];
202
+ if (t !== void 0 && (e.reunion = t, E(t, i, n), e.odjRef !== void 0)) {
203
+ const o = t.odj;
204
+ if (o !== void 0 && o.pointsOdj !== void 0) {
205
+ for (const r of o.pointsOdj)
200
206
  if (r.uid === e.odjRef) {
201
207
  e.odj = r;
202
208
  break;
@@ -204,192 +210,192 @@ function h(e, t, o) {
204
210
  }
205
211
  }
206
212
  }
207
- if (t.documentByUid !== void 0 && e.texteAdopteRef !== void 0) {
208
- const i = t.documentByUid[e.texteAdopteRef];
209
- i !== void 0 && (e.texteAdopte = i, m(i, t, o));
213
+ if (i.documentByUid !== void 0 && e.texteAdopteRef !== void 0) {
214
+ const t = i.documentByUid[e.texteAdopteRef];
215
+ t !== void 0 && (e.texteAdopte = t, m(t, i, n));
210
216
  }
211
- if (t.documentByUid !== void 0 && e.texteAssocieRef !== void 0) {
212
- const i = t.documentByUid[e.texteAssocieRef];
213
- i !== void 0 && (e.texteAssocie = i, m(i, t, o));
217
+ if (i.documentByUid !== void 0 && e.texteAssocieRef !== void 0) {
218
+ const t = i.documentByUid[e.texteAssocieRef];
219
+ t !== void 0 && (e.texteAssocie = t, m(t, i, n));
214
220
  }
215
- if (t.documentByUid !== void 0 && e.textesAssocies !== void 0)
216
- for (const i of e.textesAssocies) {
217
- const n = t.documentByUid[i.texteAssocieRef];
218
- n !== void 0 && (i.texteAssocie = n, m(n, t, o));
221
+ if (i.documentByUid !== void 0 && e.textesAssocies !== void 0)
222
+ for (const t of e.textesAssocies) {
223
+ const o = i.documentByUid[t.texteAssocieRef];
224
+ o !== void 0 && (t.texteAssocie = o, m(o, i, n));
219
225
  }
220
- if (t.scrutinByUid !== void 0 && e.voteRefs !== void 0) {
221
- const i = [];
222
- for (const n of e.voteRefs) {
223
- const r = t.scrutinByUid[n];
224
- r !== void 0 && (i.push(r), U(r, t, o));
226
+ if (i.scrutinByUid !== void 0 && e.voteRefs !== void 0) {
227
+ const t = [];
228
+ for (const o of e.voteRefs) {
229
+ const r = i.scrutinByUid[o];
230
+ r !== void 0 && (t.push(r), U(r, i, n));
225
231
  }
226
- e.votes = i;
232
+ e.votes = t;
227
233
  }
228
- for (const i of e.actesLegislatifs || [])
229
- h(i, t, o);
234
+ for (const t of e.actesLegislatifs || [])
235
+ h(t, i, n);
230
236
  }
231
237
  return e;
232
238
  }
233
- function p(e, t, o) {
234
- if (!o.has(e.uid) && (o.add(e.uid), t.organeByUid !== void 0))
235
- for (const i of e.mandats || []) {
236
- const n = [];
237
- for (const r of i.organesRefs) {
238
- const s = t.organeByUid[r];
239
- s !== void 0 && (n.push(s), a(s, t, o));
239
+ function p(e, i, n) {
240
+ if (!n.has(e.uid) && (n.add(e.uid), i.organeByUid !== void 0))
241
+ for (const t of e.mandats || []) {
242
+ const o = [];
243
+ for (const r of t.organesRefs) {
244
+ const s = i.organeByUid[r];
245
+ s !== void 0 && (o.push(s), a(s, i, n));
240
246
  }
241
- i.organes = n;
247
+ t.organes = o;
242
248
  }
243
249
  return e;
244
250
  }
245
- function $(e, t, o) {
246
- if (!o.has(e.uid)) {
247
- o.add(e.uid);
248
- const i = e.signataires, n = i.auteur;
249
- if (t.acteurByUid !== void 0 && n.acteurRef !== void 0) {
250
- const r = t.acteurByUid[n.acteurRef];
251
- r !== void 0 && (n.acteur = r, p(r, t, o));
251
+ function $(e, i, n) {
252
+ if (!n.has(e.uid)) {
253
+ n.add(e.uid);
254
+ const t = e.signataires, o = t.auteur;
255
+ if (i.acteurByUid !== void 0 && o.acteurRef !== void 0) {
256
+ const r = i.acteurByUid[o.acteurRef];
257
+ r !== void 0 && (o.acteur = r, p(r, i, n));
252
258
  }
253
- if (t.organeByUid !== void 0 && n.auteurRapporteurOrganeRef !== void 0) {
254
- const r = t.organeByUid[n.auteurRapporteurOrganeRef];
255
- r !== void 0 && (n.auteurRapporteurOrgane = r, a(r, t, o));
259
+ if (i.organeByUid !== void 0 && o.auteurRapporteurOrganeRef !== void 0) {
260
+ const r = i.organeByUid[o.auteurRapporteurOrganeRef];
261
+ r !== void 0 && (o.auteurRapporteurOrgane = r, a(r, i, n));
256
262
  }
257
- if (t.organeByUid !== void 0 && n.gouvernementRef !== void 0) {
258
- const r = t.organeByUid[n.gouvernementRef];
259
- r !== void 0 && (n.gouvernement = r, a(r, t, o));
263
+ if (i.organeByUid !== void 0 && o.gouvernementRef !== void 0) {
264
+ const r = i.organeByUid[o.gouvernementRef];
265
+ r !== void 0 && (o.gouvernement = r, a(r, i, n));
260
266
  }
261
- if (t.organeByUid !== void 0 && n.groupePolitiqueRef !== void 0) {
262
- const r = t.organeByUid[n.groupePolitiqueRef];
263
- r !== void 0 && (n.groupePolitique = r, a(r, t, o));
267
+ if (i.organeByUid !== void 0 && o.groupePolitiqueRef !== void 0) {
268
+ const r = i.organeByUid[o.groupePolitiqueRef];
269
+ r !== void 0 && (o.groupePolitique = r, a(r, i, n));
264
270
  }
265
- if (t.acteurByUid !== void 0 && i.cosignatairesRefs !== void 0) {
271
+ if (i.acteurByUid !== void 0 && t.cosignatairesRefs !== void 0) {
266
272
  const s = [];
267
- for (const l of i.cosignatairesRefs || []) {
268
- const f = t.acteurByUid[l];
269
- f !== void 0 && (s.push(f), p(f, t, o));
273
+ for (const l of t.cosignatairesRefs || []) {
274
+ const f = i.acteurByUid[l];
275
+ f !== void 0 && (s.push(f), p(f, i, n));
270
276
  }
271
- i.cosignataires = s;
277
+ t.cosignataires = s;
272
278
  }
273
279
  }
274
280
  return e;
275
281
  }
276
- function O(e, t, o) {
277
- for (const i of e.auteurs) {
278
- const n = i.acteur;
279
- if (t.acteurByUid !== void 0 && n !== void 0) {
280
- const r = t.acteurByUid[n.acteurRef];
281
- r !== void 0 && (n.acteur = r, p(r, t, o));
282
+ function O(e, i, n) {
283
+ for (const t of e.auteurs) {
284
+ const o = t.acteur;
285
+ if (i.acteurByUid !== void 0 && o !== void 0) {
286
+ const r = i.acteurByUid[o.acteurRef];
287
+ r !== void 0 && (o.acteur = r, p(r, i, n));
282
288
  }
283
- if (t.organeByUid !== void 0 && i.organeRef !== void 0) {
284
- const r = t.organeByUid[i.organeRef];
285
- r !== void 0 && (i.organe = r, a(r, t, o));
289
+ if (i.organeByUid !== void 0 && t.organeRef !== void 0) {
290
+ const r = i.organeByUid[t.organeRef];
291
+ r !== void 0 && (t.organe = r, a(r, i, n));
286
292
  }
287
293
  }
288
- if (t.dossierByUid !== void 0) {
289
- const i = t.dossierByUid[e.dossierRef];
290
- i !== void 0 && (e.dossier = i, T(i, t, o));
294
+ if (i.dossierByUid !== void 0) {
295
+ const t = i.dossierByUid[e.dossierRef];
296
+ t !== void 0 && (e.dossier = t, T(t, i, n));
291
297
  }
292
- for (const i of e.divisions || [])
293
- O(i, t, o);
298
+ for (const t of e.divisions || [])
299
+ O(t, i, n);
294
300
  return e;
295
301
  }
296
- function m(e, t, o) {
297
- if (!o.has(e.uid)) {
298
- o.add(e.uid);
299
- for (const i of e.auteurs) {
300
- const n = i.acteur;
301
- if (t.acteurByUid !== void 0 && n !== void 0) {
302
- const r = t.acteurByUid[n.acteurRef];
303
- r !== void 0 && (n.acteur = r, p(r, t, o));
302
+ function m(e, i, n) {
303
+ if (!n.has(e.uid)) {
304
+ n.add(e.uid);
305
+ for (const t of e.auteurs) {
306
+ const o = t.acteur;
307
+ if (i.acteurByUid !== void 0 && o !== void 0) {
308
+ const r = i.acteurByUid[o.acteurRef];
309
+ r !== void 0 && (o.acteur = r, p(r, i, n));
304
310
  }
305
- if (t.organeByUid !== void 0 && i.organeRef !== void 0) {
306
- const r = t.organeByUid[i.organeRef];
307
- r !== void 0 && (i.organe = r, a(r, t, o));
311
+ if (i.organeByUid !== void 0 && t.organeRef !== void 0) {
312
+ const r = i.organeByUid[t.organeRef];
313
+ r !== void 0 && (t.organe = r, a(r, i, n));
308
314
  }
309
315
  }
310
- if (t.dossierByUid !== void 0) {
311
- const i = t.dossierByUid[e.dossierRef];
312
- i !== void 0 && (e.dossier = i, T(i, t, o));
316
+ if (i.dossierByUid !== void 0) {
317
+ const t = i.dossierByUid[e.dossierRef];
318
+ t !== void 0 && (e.dossier = t, T(t, i, n));
313
319
  }
314
- for (const i of e.divisions || [])
315
- O(i, t, o);
320
+ for (const t of e.divisions || [])
321
+ O(t, i, n);
316
322
  }
317
323
  return e;
318
324
  }
319
- function T(e, t, o) {
320
- if (!o.has(e.uid)) {
321
- o.add(e.uid);
322
- for (const n of e.actesLegislatifs ?? [])
323
- h(n, t, o);
324
- const i = e.initiateur;
325
- if (i !== void 0) {
326
- if (t.acteurByUid !== void 0)
327
- for (const n of i.acteurs || []) {
328
- const r = t.acteurByUid[n.acteurRef];
329
- if (r !== void 0 && (n.acteur = r, p(r, t, o)), r !== void 0 && n.mandatRef !== void 0) {
325
+ function T(e, i, n) {
326
+ if (!n.has(e.uid)) {
327
+ n.add(e.uid);
328
+ for (const o of e.actesLegislatifs ?? [])
329
+ h(o, i, n);
330
+ const t = e.initiateur;
331
+ if (t !== void 0) {
332
+ if (i.acteurByUid !== void 0)
333
+ for (const o of t.acteurs || []) {
334
+ const r = i.acteurByUid[o.acteurRef];
335
+ if (r !== void 0 && (o.acteur = r, p(r, i, n)), r !== void 0 && o.mandatRef !== void 0) {
330
336
  for (const s of r.mandats || [])
331
- if (s.uid === n.mandatRef) {
332
- n.mandat = s;
337
+ if (s.uid === o.mandatRef) {
338
+ o.mandat = s;
333
339
  break;
334
340
  }
335
341
  }
336
342
  }
337
- if (t.organeByUid !== void 0 && i.organeRef !== void 0) {
338
- const n = t.organeByUid[i.organeRef];
339
- n !== void 0 && (i.organe = n, a(n, t, o));
343
+ if (i.organeByUid !== void 0 && t.organeRef !== void 0) {
344
+ const o = i.organeByUid[t.organeRef];
345
+ o !== void 0 && (t.organe = o, a(o, i, n));
340
346
  }
341
347
  }
342
348
  }
343
349
  return e;
344
350
  }
345
- function a(e, t, o) {
346
- if (!o.has(e.uid)) {
347
- if (o.add(e.uid), t.organeByUid !== void 0 && e.organeParentRef !== void 0) {
348
- const i = t.organeByUid[e.organeParentRef];
349
- i !== void 0 && (e.organeParent = i, a(i, t, o));
351
+ function a(e, i, n) {
352
+ if (!n.has(e.uid)) {
353
+ if (n.add(e.uid), i.organeByUid !== void 0 && e.organeParentRef !== void 0) {
354
+ const t = i.organeByUid[e.organeParentRef];
355
+ t !== void 0 && (e.organeParent = t, a(t, i, n));
350
356
  }
351
- if (t.organeByUid !== void 0 && e.organePrecedentRef !== void 0) {
352
- const i = t.organeByUid[e.organePrecedentRef];
353
- i !== void 0 && (e.organePrecedent = i, a(i, t, o));
357
+ if (i.organeByUid !== void 0 && e.organePrecedentRef !== void 0) {
358
+ const t = i.organeByUid[e.organePrecedentRef];
359
+ t !== void 0 && (e.organePrecedent = t, a(t, i, n));
354
360
  }
355
361
  }
356
362
  return e;
357
363
  }
358
- function E(e, t, o) {
359
- if (!o.has(e.uid)) {
360
- o.add(e.uid);
361
- const i = e.demandeurs;
362
- if (i !== void 0) {
363
- if (t.acteurByUid !== void 0)
364
- for (const n of i.acteurs || []) {
365
- const r = t.acteurByUid[n.acteurRef];
366
- r !== void 0 && (n.acteur = r, p(r, t, o));
364
+ function E(e, i, n) {
365
+ if (!n.has(e.uid)) {
366
+ n.add(e.uid);
367
+ const t = e.demandeurs;
368
+ if (t !== void 0) {
369
+ if (i.acteurByUid !== void 0)
370
+ for (const o of t.acteurs || []) {
371
+ const r = i.acteurByUid[o.acteurRef];
372
+ r !== void 0 && (o.acteur = r, p(r, i, n));
367
373
  }
368
- if (t.organeByUid !== void 0) {
369
- const n = i.organe;
370
- if (n !== void 0) {
371
- const r = t.organeByUid[n.organeRef];
372
- r !== void 0 && (n.organe = r, a(r, t, o));
374
+ if (i.organeByUid !== void 0) {
375
+ const o = t.organe;
376
+ if (o !== void 0) {
377
+ const r = i.organeByUid[o.organeRef];
378
+ r !== void 0 && (o.organe = r, a(r, i, n));
373
379
  }
374
380
  }
375
381
  }
376
- if (t.organeByUid !== void 0 && e.organeReuniRef !== void 0) {
377
- const n = t.organeByUid[e.organeReuniRef];
378
- n !== void 0 && (e.organeReuni = n, a(n, t, o));
382
+ if (i.organeByUid !== void 0 && e.organeReuniRef !== void 0) {
383
+ const o = i.organeByUid[e.organeReuniRef];
384
+ o !== void 0 && (e.organeReuni = o, a(o, i, n));
379
385
  }
380
- if (t.acteurByUid !== void 0) {
381
- const n = e.participants;
382
- if (n !== void 0)
383
- for (const r of n.participantsInternes || []) {
384
- const s = t.acteurByUid[r.acteurRef];
385
- s !== void 0 && (r.acteur = s, p(s, t, o));
386
+ if (i.acteurByUid !== void 0) {
387
+ const o = e.participants;
388
+ if (o !== void 0)
389
+ for (const r of o.participantsInternes || []) {
390
+ const s = i.acteurByUid[r.acteurRef];
391
+ s !== void 0 && (r.acteur = s, p(s, i, n));
386
392
  }
387
393
  }
388
394
  }
389
395
  return e;
390
396
  }
391
- function U(e, t, o) {
392
- return o.has(e.uid) || o.add(e.uid), e;
397
+ function U(e, i, n) {
398
+ return n.has(e.uid) || n.add(e.uid), e;
393
399
  }
394
400
  function V(e) {
395
401
  if (e == null)
@@ -404,7 +410,7 @@ function V(e) {
404
410
  }
405
411
  }
406
412
  var B = /* @__PURE__ */ ((e) => (e.Html = "html", e.Pdf = "pdf", e.RawHtml = "raw-html", e))(B || {});
407
- const D = {
413
+ const b = {
408
414
  ACIN: {
409
415
  directory: "projets",
410
416
  prefix: "pl",
@@ -516,7 +522,7 @@ const D = {
516
522
  suffix: "-a0"
517
523
  }
518
524
  };
519
- function b(e) {
525
+ function D(e) {
520
526
  switch (e) {
521
527
  case "html":
522
528
  return ".asp";
@@ -526,8 +532,8 @@ function b(e) {
526
532
  return ".asp";
527
533
  }
528
534
  }
529
- function* X(e, t = void 0, o = !1) {
530
- if (t === void 0 || t === "raw-html") {
535
+ function* X(e, i = void 0, n = !1) {
536
+ if (i === void 0 || i === "raw-html") {
531
537
  yield {
532
538
  format: "raw-html",
533
539
  type: "dyn-opendata",
@@ -537,30 +543,30 @@ function* X(e, t = void 0, o = !1) {
537
543
  type: "dyn-docs",
538
544
  url: `https://www.assemblee-nationale.fr/dyn/docs/${e.uid}.raw`
539
545
  };
540
- const i = y(
546
+ const t = y(
541
547
  e,
542
548
  "raw-html",
543
- o
549
+ n
544
550
  );
545
- i !== null && (yield {
551
+ t !== null && (yield {
546
552
  format: "raw-html",
547
- type: i.directory.replaceAll("/", "-"),
548
- url: i.url
553
+ type: t.directory.replaceAll("/", "-"),
554
+ url: t.url
549
555
  });
550
556
  }
551
- if (t === void 0 || t === "html") {
552
- const i = y(
557
+ if (i === void 0 || i === "html") {
558
+ const t = y(
553
559
  e,
554
560
  "html",
555
- o
561
+ n
556
562
  );
557
- i !== null && (yield {
563
+ t !== null && (yield {
558
564
  format: "html",
559
- type: i.directory.replaceAll("/", "-"),
560
- url: i.url
565
+ type: t.directory.replaceAll("/", "-"),
566
+ url: t.url
561
567
  });
562
568
  }
563
- if (t === void 0 || t === "pdf") {
569
+ if (i === void 0 || i === "pdf") {
564
570
  yield {
565
571
  format: "raw-html",
566
572
  type: "dyn-opendata",
@@ -570,65 +576,65 @@ function* X(e, t = void 0, o = !1) {
570
576
  type: "dyn-docs",
571
577
  url: `https://www.assemblee-nationale.fr/dyn/docs/${e.uid}.pdf`
572
578
  };
573
- const i = y(
579
+ const t = y(
574
580
  e,
575
581
  "pdf"
576
582
  /* Pdf */
577
583
  );
578
- i !== null && (yield {
584
+ t !== null && (yield {
579
585
  format: "pdf",
580
- type: i.directory.replaceAll("/", "-"),
581
- url: i.url
586
+ type: t.directory.replaceAll("/", "-"),
587
+ url: t.url
582
588
  });
583
589
  }
584
590
  }
585
- function w(e, t) {
586
- const o = y(e, t);
587
- return o === null ? null : o.url;
591
+ function w(e, i) {
592
+ const n = y(e, i);
593
+ return n === null ? null : n.url;
588
594
  }
589
595
  function q(e) {
590
- const t = /^VTANR([0-9]+)L([0-9]+)V([0-9]+)$/.exec(e.uid);
591
- if (t === null)
596
+ const i = /^VTANR([0-9]+)L([0-9]+)V([0-9]+)$/.exec(e.uid);
597
+ if (i === null)
592
598
  return console.log(
593
599
  `Unable to generate URL from scrutin with unexpected UID: "${e.uid}"`
594
600
  ), null;
595
- const o = t[2], i = t[3];
596
- return `http://www2.assemblee-nationale.fr/scrutins/detail/(legislature)/${o}/(num)/${i}`;
601
+ const n = i[2], t = i[3];
602
+ return `http://www2.assemblee-nationale.fr/scrutins/detail/(legislature)/${n}/(num)/${t}`;
597
603
  }
598
- function y(e, t, o = !1) {
599
- const i = b(t), n = /^(.{4})([ANS]*)(R[0-9])([LS]*)([0-9]*)([BTACP]*)(.*)$/.exec(
604
+ function y(e, i, n = !1) {
605
+ const t = D(i), o = /^(.{4})([ANS]*)(R[0-9])([LS]*)([0-9]*)([BTACP]*)(.*)$/.exec(
600
606
  e.uid
601
607
  );
602
- if (n === null)
603
- return o && console.log(
608
+ if (o === null)
609
+ return n && console.log(
604
610
  `Unable to generate URL from document or division with unexpected UID: "${e.uid}"`
605
611
  ), null;
606
- if (n[2] === "SN")
607
- return o && console.log(
612
+ if (o[2] === "SN")
613
+ return n && console.log(
608
614
  `Unable to generate URL for document or division in Sénat. UID: "${e.uid}"`
609
615
  ), null;
610
- const s = n[5];
611
- let l = n[7];
612
- if (t === "raw-html")
616
+ const s = o[5];
617
+ let l = o[7];
618
+ if (i === "raw-html")
613
619
  return {
614
620
  directory: "textes",
615
- url: `https://www.assemblee-nationale.fr/${s}/textes/${l}${i}`
621
+ url: `https://www.assemblee-nationale.fr/${s}/textes/${l}${t}`
616
622
  };
617
623
  let f = {
618
624
  BTC: "TCOM",
619
625
  BTA: "TADO",
620
626
  TAP: "TADO"
621
- }[n[6]] || n[1];
627
+ }[o[6]] || o[1];
622
628
  e.classification !== void 0 && e.classification.sousType !== void 0 && e.classification.sousType.code === "COMPA" && (l = l.replace(/-COMPA/, "-aCOMPA")), f == "AVCE" && (f = `AVCE${e.classification.famille?.classe.code}`);
623
- const d = D[f];
629
+ const d = b[f];
624
630
  if (d === void 0)
625
- return o && console.log(
631
+ return n && console.log(
626
632
  `Unable to generate URL from document or division of UID "${e.uid}" and type "${f}"`
627
633
  ), null;
628
- const g = t === "pdf" ? `pdf/${d.directory}` : d.directory;
634
+ const g = i === "pdf" ? `pdf/${d.directory}` : d.directory;
629
635
  return {
630
636
  directory: g,
631
- url: `https://www.assemblee-nationale.fr/${s}/${g}/${d.prefix}${l}${d.suffix}${i}`
637
+ url: `https://www.assemblee-nationale.fr/${s}/${g}/${d.prefix}${l}${d.suffix}${t}`
632
638
  };
633
639
  }
634
640
  export {
@@ -644,15 +650,15 @@ export {
644
650
  Ee as CodeTypeOrganeSchema,
645
651
  Ue as CodeTypeVoteSchema,
646
652
  Be as DecisionSchema,
647
- De as DepNaisSchema,
653
+ be as DepNaisSchema,
648
654
  H as DivisionTypeSchema,
649
655
  B as DocumentUrlFormat,
650
- be as EtatSchema,
656
+ De as EtatSchema,
651
657
  R as Facet,
652
- Ie as FamSocProEnumSchema,
658
+ Le as FamSocProEnumSchema,
653
659
  x as FinalStatus,
654
660
  S as Follow,
655
- Le as FormatReunionSchema,
661
+ Ie as FormatReunionSchema,
656
662
  Ne as LibelleSchema,
657
663
  Me as LibelleSortScrutinSchema,
658
664
  je as LibelleTypeVoteSchema,
@@ -683,8 +689,8 @@ export {
683
689
  K as accordGouvernementDepotHorsDelaiOptions,
684
690
  ri as acteLegislatifXsiTypeOptions,
685
691
  Z as actionOptions,
686
- I as allFacets,
687
- L as allFollows,
692
+ L as allFacets,
693
+ I as allFollows,
688
694
  ee as avantAApresOptions,
689
695
  N as capitalizeFirstLetter,
690
696
  si as causePositionVoteOptions,
@@ -736,11 +742,11 @@ export {
736
742
  ye as localIso8601StringFromDate,
737
743
  Ui as mandatXsiTypeOptions,
738
744
  Bi as modePublicationDesVotesOptions,
739
- Di as natureTravauxOdjOptions,
740
- bi as organeXsiTypeOptions,
745
+ bi as natureTravauxOdjOptions,
746
+ Di as organeXsiTypeOptions,
741
747
  ge as patchedDateToJson,
742
- Ii as personneAuditionneeXsiTypeOptions,
743
- Li as pointOdjXsiTypeOptions,
748
+ Li as personneAuditionneeXsiTypeOptions,
749
+ Ii as pointOdjXsiTypeOptions,
744
750
  Ni as positionMajoritaireOptions,
745
751
  Mi as positionPolitiqueOptions,
746
752
  ji as presenceOptions,