@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/lib/index.js CHANGED
@@ -1,783 +1,580 @@
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
- var R = /* @__PURE__ */ ((e) => (e.Amendements = "amendements", e))(R || {});
4
- const L = Object.values(R);
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 I = Object.values(S);
7
- function N(e) {
8
- return e.charAt(0).toUpperCase() + e.slice(1);
1
+ import { A as e, F as t, I as n, L as r, M as i, N as a, O as o, P as s, R as c, _ as l, a as ee, c as te, d as ne, f as re, g as ie, h as ae, i as oe, j as se, k as ce, l as le, m as ue, n as de, o as fe, p as pe, r as me, s as he, t as ge, u as _e, v as ve, y as ye, z as be } from "./amendements-D3Jr9MQa.js";
2
+ import { $ as xe, A as u, At as d, B as f, C as p, Ct as m, D as h, Dt as g, E as _, Et as v, G as y, I as b, It as x, J as S, K as C, L as w, M as T, Mt as E, N as D, Nt as O, O as k, Ot as A, P as j, Pt as M, Q as Se, R as Ce, S as we, St as Te, T as Ee, Tt as De, U as Oe, V as ke, W as Ae, X as je, Y as Me, Z as Ne, _ as Pe, _t as Fe, a as Ie, at as Le, b as Re, bt as ze, c as Be, ct as Ve, d as He, dt as Ue, et as We, f as Ge, ft as Ke, g as qe, gt as Je, h as Ye, ht as Xe, i as Ze, it as Qe, j as N, jt as $e, k as et, kt as tt, l as nt, lt as rt, m as it, mt as at, n as ot, nt as st, o as ct, ot as lt, p as ut, pt as dt, q as ft, rt as pt, st as mt, tt as ht, u as gt, ut as _t, v as vt, vt as yt, w as bt, wt as xt, x as St, xt as Ct, y as wt, yt as Tt, z as Et } from "./questions-CsNQoayp.js";
3
+ //#region src/api.ts
4
+ var P = /* @__PURE__ */ function(e) {
5
+ return e.Amendements = "amendements", e;
6
+ }({}), Dt = Object.values(P), F = /* @__PURE__ */ function(e) {
7
+ return 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;
8
+ }({}), Ot = Object.values(F);
9
+ //#endregion
10
+ //#region src/strings.ts
11
+ function kt(e) {
12
+ return e.charAt(0).toUpperCase() + e.slice(1);
9
13
  }
10
- function c(e) {
11
- return e.charAt(0).toLowerCase() + e.slice(1);
14
+ function I(e) {
15
+ return e.charAt(0).toLowerCase() + e.slice(1);
12
16
  }
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
- function M(e) {
15
- if (e.actesLegislatifs !== void 0) {
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
- }
17
+ //#endregion
18
+ //#region src/dossiers_legislatifs.ts
19
+ var L = /* @__PURE__ */ function(e) {
20
+ return e.Failure = "FAILURE", e.Success = "SUCCESS", e;
21
+ }({}), R = /* @__PURE__ */ function(e) {
22
+ return e.Failure = "FAILURE", e.InProgress = "IN_PROGRESS", e.Success = "SUCCESS", e;
23
+ }({});
24
+ function At(e) {
25
+ if (e.actesLegislatifs !== void 0) {
26
+ for (let t of H(e.actesLegislatifs)) if (t.codeActe.match(/^AN.*-COM-FOND-SAISIE$/) !== null && t.organeRef !== void 0 && t.organeRef !== "PO211494") return t.organeRef;
27
+ }
20
28
  }
21
- function u(e) {
22
- switch (e) {
23
- case "Accord":
24
- case "adopté":
25
- case "adopté, dans les conditions prévues à l'article 45, alinéa 3, de la Constitution":
26
- case "adoptée":
27
- case "adopté sans modification":
28
- case "adoptée sans modification":
29
- case "Conforme":
30
- case "considérée comme définitive en application de l'article 151-7 du Règlement":
31
- case "considérée comme définitive en application de l'article 151-9 du Règlement":
32
- case "Motion adopté(e)":
33
- return "SUCCESS";
34
- case "Désaccord":
35
- case "Motion rejeté(e)":
36
- case "rejeté":
37
- case "rejetée":
38
- return "FAILURE";
39
- case "adopté avec modifications":
40
- case "adoptée avec modifications":
41
- case "De droit (article 61 alinéa 1 de la Constitution)":
42
- case "modifié":
43
- case "modifiée":
44
- case "Motion de censure 49-2":
45
- case "Partiellement conforme":
46
- return "IN_PROGRESS";
47
- case "Soixante députés au moins":
48
- case "Soixante sénateurs au moins":
49
- return "CONSTITU";
50
- default:
51
- return "IN_PROGRESS";
52
- }
29
+ function z(e) {
30
+ switch (e) {
31
+ case "Accord":
32
+ case "adopté":
33
+ case "adopté, dans les conditions prévues à l'article 45, alinéa 3, de la Constitution":
34
+ case "adoptée":
35
+ case "adopté sans modification":
36
+ case "adoptée sans modification":
37
+ case "Conforme":
38
+ case "considérée comme définitive en application de l'article 151-7 du Règlement":
39
+ case "considérée comme définitive en application de l'article 151-9 du Règlement":
40
+ case "Motion adopté(e)": return R.Success;
41
+ case "Désaccord":
42
+ case "Motion rejeté(e)":
43
+ case "rejeté":
44
+ case "rejetée": return R.Failure;
45
+ case "adopté avec modifications":
46
+ case "adoptée avec modifications":
47
+ case "De droit (article 61 alinéa 1 de la Constitution)":
48
+ case "modifié":
49
+ case "modifiée":
50
+ case "Motion de censure 49-2":
51
+ case "Partiellement conforme": return R.InProgress;
52
+ case "Soixante députés au moins":
53
+ case "Soixante sénateurs au moins": return "CONSTITU";
54
+ default: return R.InProgress;
55
+ }
53
56
  }
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)
63
- };
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)
70
- };
71
- }
72
- case "Decision_Type": {
73
- const o = n.statutConclusion.libelle;
74
- if (o === void 0)
75
- return null;
76
- const r = u(o);
77
- let s;
78
- switch (e.procedureParlementaire.code) {
79
- case "PROCEDURE_PARLEMENTAIRE_2":
80
- ["rejeté", "rejetée"].includes(o) && e.actesLegislatifs !== void 0 && e.actesLegislatifs.length === 1 && (s = "FAILURE");
81
- break;
82
- case "PROCEDURE_PARLEMENTAIRE_8":
83
- // Résolution
84
- case "PROCEDURE_PARLEMENTAIRE_22":
85
- r === "SUCCESS" ? s = "SUCCESS" : r === "FAILURE" && (s = "FAILURE");
86
- break;
87
- }
88
- return {
89
- currentStatus: r,
90
- finalStatus: s,
91
- label: c(o)
92
- };
93
- }
94
- case "DecisionMotionCensure_Type":
95
- return t = n.decision.libelle, t === void 0 ? null : {
96
- currentStatus: u(t),
97
- finalStatus: (
98
- // Not sure for other cases => To improve.
99
- // Engagement de la responsabilité gouvernementale
100
- e.procedureParlementaire.code === "PROCEDURE_PARLEMENTAIRE_13" && t === "Motion rejeté(e)" ? "FAILURE" : "SUCCESS"
101
- ),
102
- // TODO: Not sure of this `true` value
103
- label: c(t)
104
- };
105
- case "DecisionRecevabiliteBureau_Type":
106
- return t = n.decision.libelle, t === void 0 ? null : {
107
- currentStatus: u(t),
108
- label: c(t)
109
- };
110
- case "DeclarationGouvernement_Type":
111
- return t = n.typeDeclaration.libelle, t === void 0 ? null : {
112
- currentStatus: u(t),
113
- label: c(t)
114
- };
115
- case "DepotMotionCensure_Type":
116
- return t = n.typeMotionCensure.libelle, t === void 0 ? null : {
117
- currentStatus: u(t),
118
- label: c(t)
119
- };
120
- case "DepotRapport_Type":
121
- return [
122
- "DossierCommissionEnquete_Type",
123
- "DossierMissionControle_Type",
124
- "DossierMissionInformation_Type"
125
- ].includes(e.xsiType) ? {
126
- currentStatus: i[0].organe.codeType,
127
- finalStatus: "SUCCESS",
128
- label: "rapport déposé"
129
- } : null;
130
- case "MotionProcedure_Type":
131
- return t = n.typeMotion.libelle, t === void 0 ? null : {
132
- currentStatus: u(t),
133
- label: c(t)
134
- };
135
- case "Promulgation_Type":
136
- return {
137
- currentStatus: "SUCCESS",
138
- finalStatus: "SUCCESS",
139
- label: "promulgué"
140
- };
141
- case "RetraitInitiative_Type":
142
- return {
143
- currentStatus: "FAILURE",
144
- finalStatus: "FAILURE",
145
- label: "retiré"
146
- };
147
- case "SaisineConseilConstit_Type":
148
- return t = n.casSaisine.libelle, t === void 0 ? null : {
149
- currentStatus: u(t),
150
- label: c(t)
151
- };
152
- default:
153
- return null;
154
- }
57
+ function B(e, t) {
58
+ let n = t[t.length - 1], r;
59
+ switch (n.xsiType) {
60
+ case "Adoption_Europe_Type": {
61
+ let e = n.statutAdoption.libelle;
62
+ return e === void 0 ? null : {
63
+ currentStatus: z(e),
64
+ label: I(e)
65
+ };
66
+ }
67
+ case "ConclusionEtapeCC_Type": {
68
+ let e = n.statutConclusion.libelle;
69
+ return e === void 0 ? null : {
70
+ currentStatus: z(e),
71
+ label: I(e)
72
+ };
73
+ }
74
+ case "Decision_Type": {
75
+ let t = n.statutConclusion.libelle;
76
+ if (t === void 0) return null;
77
+ let r = z(t), i;
78
+ switch (e.procedureParlementaire.code) {
79
+ case "PROCEDURE_PARLEMENTAIRE_2":
80
+ ["rejeté", "rejetée"].includes(t) && e.actesLegislatifs !== void 0 && e.actesLegislatifs.length === 1 && (i = L.Failure);
81
+ break;
82
+ case "PROCEDURE_PARLEMENTAIRE_8":
83
+ case "PROCEDURE_PARLEMENTAIRE_22":
84
+ r === R.Success ? i = L.Success : r === R.Failure && (i = L.Failure);
85
+ break;
86
+ default: break;
87
+ }
88
+ return {
89
+ currentStatus: r,
90
+ finalStatus: i,
91
+ label: I(t)
92
+ };
93
+ }
94
+ case "DecisionMotionCensure_Type": return r = n.decision.libelle, r === void 0 ? null : {
95
+ currentStatus: z(r),
96
+ finalStatus: e.procedureParlementaire.code === "PROCEDURE_PARLEMENTAIRE_13" && r === "Motion rejeté(e)" ? L.Failure : L.Success,
97
+ label: I(r)
98
+ };
99
+ case "DecisionRecevabiliteBureau_Type": return r = n.decision.libelle, r === void 0 ? null : {
100
+ currentStatus: z(r),
101
+ label: I(r)
102
+ };
103
+ case "DeclarationGouvernement_Type": return r = n.typeDeclaration.libelle, r === void 0 ? null : {
104
+ currentStatus: z(r),
105
+ label: I(r)
106
+ };
107
+ case "DepotMotionCensure_Type": return r = n.typeMotionCensure.libelle, r === void 0 ? null : {
108
+ currentStatus: z(r),
109
+ label: I(r)
110
+ };
111
+ case "DepotRapport_Type": return [
112
+ "DossierCommissionEnquete_Type",
113
+ "DossierMissionControle_Type",
114
+ "DossierMissionInformation_Type"
115
+ ].includes(e.xsiType) ? {
116
+ currentStatus: t[0].organe.codeType,
117
+ finalStatus: L.Success,
118
+ label: "rapport déposé"
119
+ } : null;
120
+ case "MotionProcedure_Type": return r = n.typeMotion.libelle, r === void 0 ? null : {
121
+ currentStatus: z(r),
122
+ label: I(r)
123
+ };
124
+ case "Promulgation_Type": return {
125
+ currentStatus: R.Success,
126
+ finalStatus: L.Success,
127
+ label: "promulgué"
128
+ };
129
+ case "RetraitInitiative_Type": return {
130
+ currentStatus: R.Failure,
131
+ finalStatus: L.Failure,
132
+ label: "retiré"
133
+ };
134
+ case "SaisineConseilConstit_Type": return r = n.casSaisine.libelle, r === void 0 ? null : {
135
+ currentStatus: z(r),
136
+ label: I(r)
137
+ };
138
+ default: return null;
139
+ }
155
140
  }
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;
162
- }
163
- return null;
141
+ function V(e, t, n) {
142
+ if (n !== void 0) for (let r of [...n].reverse()) {
143
+ let n = r.actesLegislatifs ? V(e, [...t, r], r.actesLegislatifs) : B(e, [...t, r]);
144
+ if (n !== null) return n;
145
+ }
146
+ return null;
164
147
  }
165
- function j(e) {
166
- const i = v(e, [], e.actesLegislatifs);
167
- return i !== null ? i : {
168
- currentStatus: "IN_PROGRESS",
169
- label: "en cours"
170
- };
148
+ function jt(e) {
149
+ let t = V(e, [], e.actesLegislatifs);
150
+ return t === null ? {
151
+ currentStatus: R.InProgress,
152
+ label: "en cours"
153
+ } : t;
171
154
  }
172
- function* A(e) {
173
- for (const i of e)
174
- yield i, i.actesLegislatifs !== void 0 && (yield* A(i.actesLegislatifs));
155
+ function* H(e) {
156
+ for (let t of e) yield t, t.actesLegislatifs !== void 0 && (yield* H(t.actesLegislatifs));
175
157
  }
176
- function* C(e) {
177
- yield e;
178
- for (const i of e.divisions ?? [])
179
- yield* C(i);
158
+ function* U(e) {
159
+ yield e;
160
+ for (let t of e.divisions ?? []) yield* U(t);
180
161
  }
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));
186
- }
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));
190
- }
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));
194
- }
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));
199
- }
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)
206
- if (r.uid === e.odjRef) {
207
- e.odj = r;
208
- break;
209
- }
210
- }
211
- }
212
- }
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));
216
- }
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));
220
- }
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));
225
- }
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));
231
- }
232
- e.votes = t;
233
- }
234
- for (const t of e.actesLegislatifs || [])
235
- h(t, i, n);
236
- }
237
- return e;
162
+ //#endregion
163
+ //#region src/inserters.ts
164
+ function W(e, t, n) {
165
+ if (!n.has(e.uid)) {
166
+ if (n.add(e.uid), t.documentByUid !== void 0 && e.depotInitialLectureDefinitiveRef !== void 0) {
167
+ let r = t.documentByUid[e.depotInitialLectureDefinitiveRef];
168
+ r !== void 0 && (e.depotInitialLectureDefinitive = r, q(r, t, n));
169
+ }
170
+ if (t.organeByUid !== void 0 && e.organeRef !== void 0) {
171
+ let r = t.organeByUid[e.organeRef];
172
+ r !== void 0 && (e.organe = r, Y(r, t, n));
173
+ }
174
+ if (t.organeByUid !== void 0 && e.provenanceRef !== void 0) {
175
+ let r = t.organeByUid[e.provenanceRef];
176
+ r !== void 0 && (e.provenance = r, Y(r, t, n));
177
+ }
178
+ if (t.acteurByUid !== void 0 && e.rapporteurs !== void 0) for (let r of e.rapporteurs) {
179
+ let e = t.acteurByUid[r.acteurRef];
180
+ e !== void 0 && (r.acteur = e, G(e, t, n));
181
+ }
182
+ if (t.reunionByUid !== void 0 && e.reunionRef !== void 0) {
183
+ let r = t.reunionByUid[e.reunionRef];
184
+ if (r !== void 0 && (e.reunion = r, X(r, t, n), e.odjRef !== void 0)) {
185
+ let t = r.odj;
186
+ if (t !== void 0 && t.pointsOdj !== void 0) {
187
+ for (let n of t.pointsOdj) if (n.uid === e.odjRef) {
188
+ e.odj = n;
189
+ break;
190
+ }
191
+ }
192
+ }
193
+ }
194
+ if (t.documentByUid !== void 0 && e.texteAdopteRef !== void 0) {
195
+ let r = t.documentByUid[e.texteAdopteRef];
196
+ r !== void 0 && (e.texteAdopte = r, q(r, t, n));
197
+ }
198
+ if (t.documentByUid !== void 0 && e.texteAssocieRef !== void 0) {
199
+ let r = t.documentByUid[e.texteAssocieRef];
200
+ r !== void 0 && (e.texteAssocie = r, q(r, t, n));
201
+ }
202
+ if (t.documentByUid !== void 0 && e.textesAssocies !== void 0) for (let r of e.textesAssocies) {
203
+ let e = t.documentByUid[r.texteAssocieRef];
204
+ e !== void 0 && (r.texteAssocie = e, q(e, t, n));
205
+ }
206
+ if (t.scrutinByUid !== void 0 && e.voteRefs !== void 0) {
207
+ let r = [];
208
+ for (let i of e.voteRefs) {
209
+ let e = t.scrutinByUid[i];
210
+ e !== void 0 && (r.push(e), Z(e, t, n));
211
+ }
212
+ e.votes = r;
213
+ }
214
+ for (let r of e.actesLegislatifs || []) W(r, t, n);
215
+ }
216
+ return e;
238
217
  }
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));
246
- }
247
- t.organes = o;
248
- }
249
- return e;
218
+ function G(e, t, n) {
219
+ if (!n.has(e.uid) && (n.add(e.uid), t.organeByUid !== void 0)) for (let r of e.mandats || []) {
220
+ let e = [];
221
+ for (let i of r.organesRefs) {
222
+ let r = t.organeByUid[i];
223
+ r !== void 0 && (e.push(r), Y(r, t, n));
224
+ }
225
+ r.organes = e;
226
+ }
227
+ return e;
250
228
  }
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));
258
- }
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));
262
- }
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));
266
- }
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));
270
- }
271
- if (i.acteurByUid !== void 0 && t.cosignatairesRefs !== void 0) {
272
- const s = [];
273
- for (const l of t.cosignatairesRefs || []) {
274
- const f = i.acteurByUid[l];
275
- f !== void 0 && (s.push(f), p(f, i, n));
276
- }
277
- t.cosignataires = s;
278
- }
279
- }
280
- return e;
229
+ function Mt(e, t, n) {
230
+ if (!n.has(e.uid)) {
231
+ n.add(e.uid);
232
+ let r = e.signataires, i = r.auteur;
233
+ if (t.acteurByUid !== void 0 && i.acteurRef !== void 0) {
234
+ let e = t.acteurByUid[i.acteurRef];
235
+ e !== void 0 && (i.acteur = e, G(e, t, n));
236
+ }
237
+ if (t.organeByUid !== void 0 && i.auteurRapporteurOrganeRef !== void 0) {
238
+ let e = t.organeByUid[i.auteurRapporteurOrganeRef];
239
+ e !== void 0 && (i.auteurRapporteurOrgane = e, Y(e, t, n));
240
+ }
241
+ if (t.organeByUid !== void 0 && i.gouvernementRef !== void 0) {
242
+ let e = t.organeByUid[i.gouvernementRef];
243
+ e !== void 0 && (i.gouvernement = e, Y(e, t, n));
244
+ }
245
+ if (t.organeByUid !== void 0 && i.groupePolitiqueRef !== void 0) {
246
+ let e = t.organeByUid[i.groupePolitiqueRef];
247
+ e !== void 0 && (i.groupePolitique = e, Y(e, t, n));
248
+ }
249
+ if (t.acteurByUid !== void 0 && r.cosignatairesRefs !== void 0) {
250
+ let e = [];
251
+ for (let i of r.cosignatairesRefs || []) {
252
+ let r = t.acteurByUid[i];
253
+ r !== void 0 && (e.push(r), G(r, t, n));
254
+ }
255
+ r.cosignataires = e;
256
+ }
257
+ }
258
+ return e;
281
259
  }
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));
288
- }
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));
292
- }
293
- }
294
- if (i.dossierByUid !== void 0) {
295
- const t = i.dossierByUid[e.dossierRef];
296
- t !== void 0 && (e.dossier = t, T(t, i, n));
297
- }
298
- for (const t of e.divisions || [])
299
- O(t, i, n);
300
- return e;
260
+ function K(e, t, n) {
261
+ for (let r of e.auteurs) {
262
+ let e = r.acteur;
263
+ if (t.acteurByUid !== void 0 && e !== void 0) {
264
+ let r = t.acteurByUid[e.acteurRef];
265
+ r !== void 0 && (e.acteur = r, G(r, t, n));
266
+ }
267
+ if (t.organeByUid !== void 0 && r.organeRef !== void 0) {
268
+ let e = t.organeByUid[r.organeRef];
269
+ e !== void 0 && (r.organe = e, Y(e, t, n));
270
+ }
271
+ }
272
+ if (t.dossierByUid !== void 0) {
273
+ let r = t.dossierByUid[e.dossierRef];
274
+ r !== void 0 && (e.dossier = r, J(r, t, n));
275
+ }
276
+ for (let r of e.divisions || []) K(r, t, n);
277
+ return e;
301
278
  }
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));
310
- }
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));
314
- }
315
- }
316
- if (i.dossierByUid !== void 0) {
317
- const t = i.dossierByUid[e.dossierRef];
318
- t !== void 0 && (e.dossier = t, T(t, i, n));
319
- }
320
- for (const t of e.divisions || [])
321
- O(t, i, n);
322
- }
323
- return e;
279
+ function q(e, t, n) {
280
+ if (!n.has(e.uid)) {
281
+ n.add(e.uid);
282
+ for (let r of e.auteurs) {
283
+ let e = r.acteur;
284
+ if (t.acteurByUid !== void 0 && e !== void 0) {
285
+ let r = t.acteurByUid[e.acteurRef];
286
+ r !== void 0 && (e.acteur = r, G(r, t, n));
287
+ }
288
+ if (t.organeByUid !== void 0 && r.organeRef !== void 0) {
289
+ let e = t.organeByUid[r.organeRef];
290
+ e !== void 0 && (r.organe = e, Y(e, t, n));
291
+ }
292
+ }
293
+ if (t.dossierByUid !== void 0) {
294
+ let r = t.dossierByUid[e.dossierRef];
295
+ r !== void 0 && (e.dossier = r, J(r, t, n));
296
+ }
297
+ for (let r of e.divisions || []) K(r, t, n);
298
+ }
299
+ return e;
324
300
  }
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) {
336
- for (const s of r.mandats || [])
337
- if (s.uid === o.mandatRef) {
338
- o.mandat = s;
339
- break;
340
- }
341
- }
342
- }
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));
346
- }
347
- }
348
- }
349
- return e;
301
+ function J(e, t, n) {
302
+ if (!n.has(e.uid)) {
303
+ n.add(e.uid);
304
+ for (let r of e.actesLegislatifs ?? []) W(r, t, n);
305
+ let r = e.initiateur;
306
+ if (r !== void 0) {
307
+ if (t.acteurByUid !== void 0) for (let e of r.acteurs || []) {
308
+ let r = t.acteurByUid[e.acteurRef];
309
+ if (r !== void 0 && (e.acteur = r, G(r, t, n)), r !== void 0 && e.mandatRef !== void 0) {
310
+ for (let t of r.mandats || []) if (t.uid === e.mandatRef) {
311
+ e.mandat = t;
312
+ break;
313
+ }
314
+ }
315
+ }
316
+ if (t.organeByUid !== void 0 && r.organeRef !== void 0) {
317
+ let e = t.organeByUid[r.organeRef];
318
+ e !== void 0 && (r.organe = e, Y(e, t, n));
319
+ }
320
+ }
321
+ }
322
+ return e;
350
323
  }
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));
356
- }
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));
360
- }
361
- }
362
- return e;
324
+ function Y(e, t, n) {
325
+ if (!n.has(e.uid)) {
326
+ if (n.add(e.uid), t.organeByUid !== void 0 && e.organeParentRef !== void 0) {
327
+ let r = t.organeByUid[e.organeParentRef];
328
+ r !== void 0 && (e.organeParent = r, Y(r, t, n));
329
+ }
330
+ if (t.organeByUid !== void 0 && e.organePrecedentRef !== void 0) {
331
+ let r = t.organeByUid[e.organePrecedentRef];
332
+ r !== void 0 && (e.organePrecedent = r, Y(r, t, n));
333
+ }
334
+ }
335
+ return e;
363
336
  }
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));
373
- }
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));
379
- }
380
- }
381
- }
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));
385
- }
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));
392
- }
393
- }
394
- }
395
- return e;
337
+ function X(e, t, n) {
338
+ if (!n.has(e.uid)) {
339
+ n.add(e.uid);
340
+ let r = e.demandeurs;
341
+ if (r !== void 0) {
342
+ if (t.acteurByUid !== void 0) for (let e of r.acteurs || []) {
343
+ let r = t.acteurByUid[e.acteurRef];
344
+ r !== void 0 && (e.acteur = r, G(r, t, n));
345
+ }
346
+ if (t.organeByUid !== void 0) {
347
+ let e = r.organe;
348
+ if (e !== void 0) {
349
+ let r = t.organeByUid[e.organeRef];
350
+ r !== void 0 && (e.organe = r, Y(r, t, n));
351
+ }
352
+ }
353
+ }
354
+ if (t.organeByUid !== void 0 && e.organeReuniRef !== void 0) {
355
+ let r = t.organeByUid[e.organeReuniRef];
356
+ r !== void 0 && (e.organeReuni = r, Y(r, t, n));
357
+ }
358
+ if (t.acteurByUid !== void 0) {
359
+ let r = e.participants;
360
+ if (r !== void 0) for (let e of r.participantsInternes || []) {
361
+ let r = t.acteurByUid[e.acteurRef];
362
+ r !== void 0 && (e.acteur = r, G(r, t, n));
363
+ }
364
+ }
365
+ }
366
+ return e;
396
367
  }
397
- function U(e, i, n) {
398
- return n.has(e.uid) || n.add(e.uid), e;
368
+ function Z(e, t, n) {
369
+ return n.has(e.uid) || n.add(e.uid), e;
399
370
  }
400
- function V(e) {
401
- if (e == null)
402
- return "Organe inconnu";
403
- switch (e.codeType) {
404
- case "CMP":
405
- return "Commission mixte paritaire";
406
- case "GOUVERNEMENT":
407
- return e.libelle;
408
- default:
409
- return e.libelleAbrege;
410
- }
371
+ //#endregion
372
+ //#region src/organes.ts
373
+ function Nt(e) {
374
+ if (e == null) return "Organe inconnu";
375
+ switch (e.codeType) {
376
+ case "CMP": return "Commission mixte paritaire";
377
+ case "GOUVERNEMENT": return e.libelle;
378
+ default: return e.libelleAbrege;
379
+ }
411
380
  }
412
- var B = /* @__PURE__ */ ((e) => (e.Html = "html", e.Pdf = "pdf", e.RawHtml = "raw-html", e))(B || {});
413
- const b = {
414
- ACIN: {
415
- directory: "projets",
416
- prefix: "pl",
417
- suffix: "-ai"
418
- },
419
- AVCEPRJLOI: {
420
- directory: "projets",
421
- prefix: "pl",
422
- suffix: "-ace"
423
- },
424
- AVCELETTRE: {
425
- directory: "projets",
426
- prefix: "pl",
427
- suffix: "-ace"
428
- },
429
- AVCEPIONLOI: {
430
- directory: "propositions",
431
- prefix: "pion",
432
- suffix: "-ace"
433
- },
434
- AVIS: {
435
- directory: "rapports",
436
- prefix: "r",
437
- suffix: ""
438
- },
439
- ETDI: {
440
- directory: "projets",
441
- prefix: "pl",
442
- suffix: "-ei"
443
- },
444
- LETT: {
445
- directory: "projets",
446
- prefix: "pl",
447
- suffix: "-l"
448
- },
449
- PION: {
450
- directory: "propositions",
451
- prefix: "pion",
452
- suffix: ""
453
- },
454
- PNRE: {
455
- directory: "propositions",
456
- prefix: "pion",
457
- suffix: ""
458
- },
459
- PNREAPPART341: {
460
- directory: "propositions",
461
- prefix: "pion",
462
- suffix: ""
463
- },
464
- PNRECOMENQ: {
465
- directory: "propositions",
466
- prefix: "pion",
467
- suffix: ""
468
- },
469
- PNREMODREGLTAN: {
470
- directory: "propositions",
471
- prefix: "pion",
472
- suffix: ""
473
- },
474
- PNRETVXINSTITEUROP: {
475
- directory: "europe/resolutions",
476
- prefix: "ppe",
477
- suffix: ""
478
- },
479
- PRJL: {
480
- directory: "projets",
481
- prefix: "pl",
482
- suffix: ""
483
- },
484
- RAPP: {
485
- directory: "rapports",
486
- prefix: "r",
487
- suffix: ""
488
- },
489
- RINF: {
490
- directory: "rap-info",
491
- prefix: "i",
492
- suffix: ""
493
- },
494
- RION: {
495
- directory: "",
496
- prefix: "",
497
- suffix: ""
498
- },
499
- TADO: {
500
- directory: "ta",
501
- prefix: "ta",
502
- suffix: ""
503
- },
504
- TCOM: {
505
- directory: "ta-commission",
506
- prefix: "r",
507
- suffix: "-a0"
508
- },
509
- TCOMCOMENQ: {
510
- directory: "ta-commission",
511
- prefix: "r",
512
- suffix: "-a0"
513
- },
514
- TCOMMODREGLTAN: {
515
- directory: "ta-commission",
516
- prefix: "r",
517
- suffix: "-a0"
518
- },
519
- TCOMTVXINSTITEUROP: {
520
- directory: "ta-commission",
521
- prefix: "r",
522
- suffix: "-a0"
523
- }
381
+ //#endregion
382
+ //#region src/urls.ts
383
+ var Q = /* @__PURE__ */ function(e) {
384
+ return e.Html = "html", e.Pdf = "pdf", e.RawHtml = "raw-html", e;
385
+ }({}), Pt = {
386
+ ACIN: {
387
+ directory: "projets",
388
+ prefix: "pl",
389
+ suffix: "-ai"
390
+ },
391
+ AVCEPRJLOI: {
392
+ directory: "projets",
393
+ prefix: "pl",
394
+ suffix: "-ace"
395
+ },
396
+ AVCELETTRE: {
397
+ directory: "projets",
398
+ prefix: "pl",
399
+ suffix: "-ace"
400
+ },
401
+ AVCEPIONLOI: {
402
+ directory: "propositions",
403
+ prefix: "pion",
404
+ suffix: "-ace"
405
+ },
406
+ AVIS: {
407
+ directory: "rapports",
408
+ prefix: "r",
409
+ suffix: ""
410
+ },
411
+ ETDI: {
412
+ directory: "projets",
413
+ prefix: "pl",
414
+ suffix: "-ei"
415
+ },
416
+ LETT: {
417
+ directory: "projets",
418
+ prefix: "pl",
419
+ suffix: "-l"
420
+ },
421
+ PION: {
422
+ directory: "propositions",
423
+ prefix: "pion",
424
+ suffix: ""
425
+ },
426
+ PNRE: {
427
+ directory: "propositions",
428
+ prefix: "pion",
429
+ suffix: ""
430
+ },
431
+ PNREAPPART341: {
432
+ directory: "propositions",
433
+ prefix: "pion",
434
+ suffix: ""
435
+ },
436
+ PNRECOMENQ: {
437
+ directory: "propositions",
438
+ prefix: "pion",
439
+ suffix: ""
440
+ },
441
+ PNREMODREGLTAN: {
442
+ directory: "propositions",
443
+ prefix: "pion",
444
+ suffix: ""
445
+ },
446
+ PNRETVXINSTITEUROP: {
447
+ directory: "europe/resolutions",
448
+ prefix: "ppe",
449
+ suffix: ""
450
+ },
451
+ PRJL: {
452
+ directory: "projets",
453
+ prefix: "pl",
454
+ suffix: ""
455
+ },
456
+ RAPP: {
457
+ directory: "rapports",
458
+ prefix: "r",
459
+ suffix: ""
460
+ },
461
+ RINF: {
462
+ directory: "rap-info",
463
+ prefix: "i",
464
+ suffix: ""
465
+ },
466
+ RION: {
467
+ directory: "",
468
+ prefix: "",
469
+ suffix: ""
470
+ },
471
+ TADO: {
472
+ directory: "ta",
473
+ prefix: "ta",
474
+ suffix: ""
475
+ },
476
+ TCOM: {
477
+ directory: "ta-commission",
478
+ prefix: "r",
479
+ suffix: "-a0"
480
+ },
481
+ TCOMCOMENQ: {
482
+ directory: "ta-commission",
483
+ prefix: "r",
484
+ suffix: "-a0"
485
+ },
486
+ TCOMMODREGLTAN: {
487
+ directory: "ta-commission",
488
+ prefix: "r",
489
+ suffix: "-a0"
490
+ },
491
+ TCOMTVXINSTITEUROP: {
492
+ directory: "ta-commission",
493
+ prefix: "r",
494
+ suffix: "-a0"
495
+ }
524
496
  };
525
- function D(e) {
526
- switch (e) {
527
- case "html":
528
- return ".asp";
529
- case "pdf":
530
- return ".pdf";
531
- case "raw-html":
532
- return ".asp";
533
- }
497
+ function Ft(e) {
498
+ switch (e) {
499
+ case Q.Html: return ".asp";
500
+ case Q.Pdf: return ".pdf";
501
+ case Q.RawHtml: return ".asp";
502
+ }
534
503
  }
535
- function* X(e, i = void 0, n = !1) {
536
- if (i === void 0 || i === "raw-html") {
537
- yield {
538
- format: "raw-html",
539
- type: "dyn-opendata",
540
- url: `https://www.assemblee-nationale.fr/dyn/opendata/${e.uid}.html`
541
- }, yield {
542
- format: "raw-html",
543
- type: "dyn-docs",
544
- url: `https://www.assemblee-nationale.fr/dyn/docs/${e.uid}.raw`
545
- };
546
- const t = y(
547
- e,
548
- "raw-html",
549
- n
550
- );
551
- t !== null && (yield {
552
- format: "raw-html",
553
- type: t.directory.replaceAll("/", "-"),
554
- url: t.url
555
- });
556
- }
557
- if (i === void 0 || i === "html") {
558
- const t = y(
559
- e,
560
- "html",
561
- n
562
- );
563
- t !== null && (yield {
564
- format: "html",
565
- type: t.directory.replaceAll("/", "-"),
566
- url: t.url
567
- });
568
- }
569
- if (i === void 0 || i === "pdf") {
570
- yield {
571
- format: "raw-html",
572
- type: "dyn-opendata",
573
- url: `https://www.assemblee-nationale.fr/dyn/opendata/${e.uid}.html`
574
- }, yield {
575
- format: "pdf",
576
- type: "dyn-docs",
577
- url: `https://www.assemblee-nationale.fr/dyn/docs/${e.uid}.pdf`
578
- };
579
- const t = y(
580
- e,
581
- "pdf"
582
- /* Pdf */
583
- );
584
- t !== null && (yield {
585
- format: "pdf",
586
- type: t.directory.replaceAll("/", "-"),
587
- url: t.url
588
- });
589
- }
504
+ function* It(e, t = void 0, n = !1) {
505
+ if (t === void 0 || t === Q.RawHtml) {
506
+ yield {
507
+ format: Q.RawHtml,
508
+ type: "dyn-opendata",
509
+ url: `https://www.assemblee-nationale.fr/dyn/opendata/${e.uid}.html`
510
+ }, yield {
511
+ format: Q.RawHtml,
512
+ type: "dyn-docs",
513
+ url: `https://www.assemblee-nationale.fr/dyn/docs/${e.uid}.raw`
514
+ };
515
+ let t = $(e, Q.RawHtml, n);
516
+ t !== null && (yield {
517
+ format: Q.RawHtml,
518
+ type: t.directory.replaceAll("/", "-"),
519
+ url: t.url
520
+ });
521
+ }
522
+ if (t === void 0 || t === Q.Html) {
523
+ let t = $(e, Q.Html, n);
524
+ t !== null && (yield {
525
+ format: Q.Html,
526
+ type: t.directory.replaceAll("/", "-"),
527
+ url: t.url
528
+ });
529
+ }
530
+ if (t === void 0 || t === Q.Pdf) {
531
+ yield {
532
+ format: Q.RawHtml,
533
+ type: "dyn-opendata",
534
+ url: `https://www.assemblee-nationale.fr/dyn/opendata/${e.uid}.html`
535
+ }, yield {
536
+ format: Q.Pdf,
537
+ type: "dyn-docs",
538
+ url: `https://www.assemblee-nationale.fr/dyn/docs/${e.uid}.pdf`
539
+ };
540
+ let t = $(e, Q.Pdf);
541
+ t !== null && (yield {
542
+ format: Q.Pdf,
543
+ type: t.directory.replaceAll("/", "-"),
544
+ url: t.url
545
+ });
546
+ }
590
547
  }
591
- function w(e, i) {
592
- const n = y(e, i);
593
- return n === null ? null : n.url;
548
+ function Lt(e, t) {
549
+ let n = $(e, t);
550
+ return n === null ? null : n.url;
594
551
  }
595
- function q(e) {
596
- const i = /^VTANR([0-9]+)L([0-9]+)V([0-9]+)$/.exec(e.uid);
597
- if (i === null)
598
- return console.log(
599
- `Unable to generate URL from scrutin with unexpected UID: "${e.uid}"`
600
- ), null;
601
- const n = i[2], t = i[3];
602
- return `http://www2.assemblee-nationale.fr/scrutins/detail/(legislature)/${n}/(num)/${t}`;
552
+ function Rt(e) {
553
+ let t = /^VTANR([0-9]+)L([0-9]+)V([0-9]+)$/.exec(e.uid);
554
+ return t === null ? (console.log(`Unable to generate URL from scrutin with unexpected UID: "${e.uid}"`), null) : `http://www2.assemblee-nationale.fr/scrutins/detail/(legislature)/${t[2]}/(num)/${t[3]}`;
603
555
  }
604
- function y(e, i, n = !1) {
605
- const t = D(i), o = /^(.{4})([ANS]*)(R[0-9])([LS]*)([0-9]*)([BTACP]*)(.*)$/.exec(
606
- e.uid
607
- );
608
- if (o === null)
609
- return n && console.log(
610
- `Unable to generate URL from document or division with unexpected UID: "${e.uid}"`
611
- ), null;
612
- if (o[2] === "SN")
613
- return n && console.log(
614
- `Unable to generate URL for document or division in Sénat. UID: "${e.uid}"`
615
- ), null;
616
- const s = o[5];
617
- let l = o[7];
618
- if (i === "raw-html")
619
- return {
620
- directory: "textes",
621
- url: `https://www.assemblee-nationale.fr/${s}/textes/${l}${t}`
622
- };
623
- let f = {
624
- BTC: "TCOM",
625
- BTA: "TADO",
626
- TAP: "TADO"
627
- }[o[6]] || o[1];
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}`);
629
- const d = b[f];
630
- if (d === void 0)
631
- return n && console.log(
632
- `Unable to generate URL from document or division of UID "${e.uid}" and type "${f}"`
633
- ), null;
634
- const g = i === "pdf" ? `pdf/${d.directory}` : d.directory;
635
- return {
636
- directory: g,
637
- url: `https://www.assemblee-nationale.fr/${s}/${g}/${d.prefix}${l}${d.suffix}${t}`
638
- };
556
+ function $(e, t, n = !1) {
557
+ let r = Ft(t), i = /^(.{4})([ANS]*)(R[0-9])([LS]*)([0-9]*)([BTACP]*)(.*)$/.exec(e.uid);
558
+ if (i === null) return n && console.log(`Unable to generate URL from document or division with unexpected UID: "${e.uid}"`), null;
559
+ if (i[2] === "SN") return n && console.log(`Unable to generate URL for document or division in Sénat. UID: "${e.uid}"`), null;
560
+ let a = i[5], o = i[7];
561
+ if (t === Q.RawHtml) return {
562
+ directory: "textes",
563
+ url: `https://www.assemblee-nationale.fr/${a}/textes/${o}${r}`
564
+ };
565
+ let s = {
566
+ BTC: "TCOM",
567
+ BTA: "TADO",
568
+ TAP: "TADO"
569
+ }[i[6]] || i[1];
570
+ e.classification !== void 0 && e.classification.sousType !== void 0 && e.classification.sousType.code === "COMPA" && (o = o.replace(/-COMPA/, "-aCOMPA")), s == "AVCE" && (s = `AVCE${e.classification.famille?.classe.code}`);
571
+ let c = Pt[s];
572
+ if (c === void 0) return n && console.log(`Unable to generate URL from document or division of UID "${e.uid}" and type "${s}"`), null;
573
+ let l = t === Q.Pdf ? `pdf/${c.directory}` : c.directory;
574
+ return {
575
+ directory: l,
576
+ url: `https://www.assemblee-nationale.fr/${a}/${l}/${c.prefix}${o}${c.suffix}${r}`
577
+ };
639
578
  }
640
- export {
641
- k as AccordGouvernementDepotHorsDelaiSchema,
642
- Q as ActionSchema,
643
- J as AmendementsConvert,
644
- Te as CausePositionVoteSchema,
645
- xe as CivSchema,
646
- _e as CodeActeSchema,
647
- z as CodeEtatSchema,
648
- Pe as CodeNatureDepSchema,
649
- Ce as CodeSortScrutinSchema,
650
- Ee as CodeTypeOrganeSchema,
651
- Ue as CodeTypeVoteSchema,
652
- Be as DecisionSchema,
653
- be as DepNaisSchema,
654
- H as DivisionTypeSchema,
655
- B as DocumentUrlFormat,
656
- De as EtatSchema,
657
- R as Facet,
658
- Le as FamSocProEnumSchema,
659
- x as FinalStatus,
660
- S as Follow,
661
- Ie as FormatReunionSchema,
662
- Ne as LibelleSchema,
663
- Me as LibelleSortScrutinSchema,
664
- je as LibelleTypeVoteSchema,
665
- $e as LieuVoteSchema,
666
- Ve as MandatXsiTypeSchema,
667
- Xe as ModePublicationDesVotesSchema,
668
- we as NatureTravauxOdjSchema,
669
- qe as OrganeXsiTypeSchema,
670
- Fe as PersonneAuditionneeXsiTypeSchema,
671
- Ge as PointOdjXsiTypeSchema,
672
- ke as PositionMajoritaireSchema,
673
- Qe as PositionPolitiqueSchema,
674
- Je as PresenceSchema,
675
- ze as ProcedureSchema,
676
- He as QuantiemeSchema,
677
- We as QuestionXsiTypeSchema,
678
- Ye as RegimeSchema,
679
- Ke as RegionTypeSchema,
680
- Ze as ReunionXsiTypeSchema,
681
- _ as StatusOnly,
682
- W as TypeAuteurSchema,
683
- ei as TypeMajoriteSchema,
684
- ii as TypePointOdjSchema,
685
- Y as TypePositionSchema,
686
- ti as TypeQuestionSchema,
687
- oi as TypeReunionSchema,
688
- ni as UidXsiTypeSchema,
689
- K as accordGouvernementDepotHorsDelaiOptions,
690
- ri as acteLegislatifXsiTypeOptions,
691
- Z as actionOptions,
692
- L as allFacets,
693
- I as allFollows,
694
- ee as avantAApresOptions,
695
- N as capitalizeFirstLetter,
696
- si as causePositionVoteOptions,
697
- ai as civOptions,
698
- ci as codeActeOptions,
699
- ie as codeEtatOptions,
700
- ui as codeNatureDepOptions,
701
- fi as codeSortScrutinOptions,
702
- pi as codeTypeOrganeOptions,
703
- li as codeTypeVoteOptions,
704
- M as commissionFondUidFromDossier,
705
- di as compteRenduUidRegex,
706
- te as dateFromNullableDateOrIsoString,
707
- oe as dateFromYearMonthDayTimezoneString,
708
- mi as decisionOptions,
709
- yi as depNaisOptions,
710
- ne as displayDateFromLocalIsoString,
711
- re as divisionTypeOptions,
712
- gi as documentUidRegex,
713
- Ri as documentXsiTypeOptions,
714
- Si as dossierParlementaireXsiTypeOptions,
715
- vi as dossierUidRegex,
716
- se as etatAmendementCodeOptions,
717
- ae as etatAmendementLibelleOptions,
718
- Ai as etatCycleDeVieOptions,
719
- hi as etatOptions,
720
- ce as existingDateToJson,
721
- Oi as famSocProEnumOptions,
722
- ue as formatRelativeFrenchTime,
723
- Ti as formatReunionOptions,
724
- fe as frenchDateFormat,
725
- pe as frenchDateSameYearShortFormat,
726
- le as frenchDateWithoutDayOfWeekFromDateOrString,
727
- de as frenchTimeFormat,
728
- me as frenchTimeFromDateOrString,
729
- p as insertActeurReferences,
730
- $ as insertAmendementReferences,
731
- m as insertDocumentReferences,
732
- T as insertDossierReferences,
733
- a as insertOrganeReferences,
734
- E as insertReunionReferences,
735
- U as insertScrutinReferences,
736
- X as iterDocumentOrDivisionUrls,
737
- xi as legislatureOptions,
738
- _i as libelleOptions,
739
- Pi as libelleSortScrutinOptions,
740
- Ci as libelleTypeVoteOptions,
741
- Ei as lieuVoteOptions,
742
- ye as localIso8601StringFromDate,
743
- Ui as mandatXsiTypeOptions,
744
- Bi as modePublicationDesVotesOptions,
745
- bi as natureTravauxOdjOptions,
746
- Di as organeXsiTypeOptions,
747
- ge as patchedDateToJson,
748
- Li as personneAuditionneeXsiTypeOptions,
749
- Ii as pointOdjXsiTypeOptions,
750
- Ni as positionMajoritaireOptions,
751
- Mi as positionPolitiqueOptions,
752
- ji as presenceOptions,
753
- $i as procedureOptions,
754
- Vi as quantiemeOptions,
755
- Xi as questionUidRegex,
756
- wi as questionXsiTypeOptions,
757
- qi as regimeOptions,
758
- Fi as regionTypeOptions,
759
- Gi as reunionUidRegex,
760
- ki as reunionXsiTypeOptions,
761
- Qi as scrutinUidRegex,
762
- V as shortNameFromOrgane,
763
- Re as sortAmendementOptions,
764
- P as stateFromActePath,
765
- v as stateFromActes,
766
- j as stateFromDossier,
767
- u as statusFromCodierLibelle,
768
- Se as typeAuteurOptions,
769
- Ji as typeJoQuestionOptions,
770
- zi as typeMajoriteOptions,
771
- ve as typeMimeNomOptions,
772
- Ae as typeMimeTypeOptions,
773
- Hi as typePointOdjOptions,
774
- he as typePositionOptions,
775
- Wi as typeQuestionOptions,
776
- Yi as typeReunionOptions,
777
- Ki as uidXsiTypeOptions,
778
- c as uncapitalizeFirstLetter,
779
- w as urlFromDocument,
780
- q as urlFromScrutin,
781
- A as walkActes,
782
- C as walkDocumentAndDivisions
783
- };
579
+ //#endregion
580
+ export { te as AccordGouvernementDepotHorsDelaiSchema, le as ActionSchema, ge as AmendementsConvert, Pe as CausePositionVoteSchema, dt as CivSchema, f as CodeActeSchema, _e as CodeEtatSchema, at as CodeNatureDepSchema, vt as CodeSortScrutinSchema, Xe as CodeTypeOrganeSchema, wt as CodeTypeVoteSchema, Oe as DecisionSchema, Je as DepNaisSchema, ne as DivisionTypeSchema, Q as DocumentUrlFormat, y as EtatSchema, P as Facet, Fe as FamSocProEnumSchema, L as FinalStatus, F as Follow, C as FormatReunionSchema, yt as LibelleSchema, Re as LibelleSortScrutinSchema, St as LibelleTypeVoteSchema, we as LieuVoteSchema, Tt as MandatXsiTypeSchema, p as ModePublicationDesVotesSchema, ft as NatureTravauxOdjSchema, ze as OrganeXsiTypeSchema, Be as PersonneAuditionneeXsiTypeSchema, S as PointOdjXsiTypeSchema, bt as PositionMajoritaireSchema, Ct as PositionPolitiqueSchema, Me as PresenceSchema, je as ProcedureSchema, Ne as QuantiemeSchema, b as QuestionXsiTypeSchema, Te as RegimeSchema, m as RegionTypeSchema, Se as ReunionXsiTypeSchema, R as StatusOnly, re as TypeAuteurSchema, Ee as TypeMajoriteSchema, xe as TypePointOdjSchema, pe as TypePositionSchema, w as TypeQuestionSchema, We as TypeReunionSchema, ht as UidXsiTypeSchema, ue as accordGouvernementDepotHorsDelaiOptions, Ze as acteLegislatifXsiTypeOptions, ae as actionOptions, Dt as allFacets, Ot as allFollows, de as avantAApresOptions, kt as capitalizeFirstLetter, _ as causePositionVoteOptions, xt as civOptions, ke as codeActeOptions, ie as codeEtatOptions, De as codeNatureDepOptions, h as codeSortScrutinOptions, v as codeTypeOrganeOptions, k as codeTypeVoteOptions, At as commissionFondUidFromDossier, He as compteRenduUidRegex, o as dateFromNullableDateOrIsoString, ce as dateFromYearMonthDayTimezoneString, Ae as decisionOptions, g as depNaisOptions, e as displayDateFromLocalIsoString, l as divisionTypeOptions, Ge as documentUidRegex, Ie as documentXsiTypeOptions, ct as dossierParlementaireXsiTypeOptions, ut as dossierUidRegex, me as etatAmendementCodeOptions, oe as etatAmendementLibelleOptions, nt as etatCycleDeVieOptions, st as etatOptions, se as existingDateToJson, A as famSocProEnumOptions, i as formatRelativeFrenchTime, pt as formatReunionOptions, a as frenchDateFormat, s as frenchDateSameYearShortFormat, t as frenchDateWithoutDayOfWeekFromDateOrString, n as frenchTimeFormat, r as frenchTimeFromDateOrString, G as insertActeurReferences, Mt as insertAmendementReferences, q as insertDocumentReferences, J as insertDossierReferences, Y as insertOrganeReferences, X as insertReunionReferences, Z as insertScrutinReferences, It as iterDocumentOrDivisionUrls, x as legislatureOptions, tt as libelleOptions, et as libelleSortScrutinOptions, u as libelleTypeVoteOptions, N as lieuVoteOptions, c as localIso8601StringFromDate, d as mandatXsiTypeOptions, T as modePublicationDesVotesOptions, Qe as natureTravauxOdjOptions, $e as organeXsiTypeOptions, be as patchedDateToJson, gt as personneAuditionneeXsiTypeOptions, Le as pointOdjXsiTypeOptions, D as positionMajoritaireOptions, E as positionPolitiqueOptions, lt as presenceOptions, mt as procedureOptions, Ve as quantiemeOptions, it as questionUidRegex, Ce as questionXsiTypeOptions, O as regimeOptions, M as regionTypeOptions, Ye as reunionUidRegex, rt as reunionXsiTypeOptions, qe as scrutinUidRegex, Nt as shortNameFromOrgane, ee as sortAmendementOptions, B as stateFromActePath, V as stateFromActes, jt as stateFromDossier, z as statusFromCodierLibelle, ve as typeAuteurOptions, ot as typeJoQuestionOptions, j as typeMajoriteOptions, fe as typeMimeNomOptions, he as typeMimeTypeOptions, _t as typePointOdjOptions, ye as typePositionOptions, Et as typeQuestionOptions, Ue as typeReunionOptions, Ke as uidXsiTypeOptions, I as uncapitalizeFirstLetter, Lt as urlFromDocument, Rt as urlFromScrutin, H as walkActes, U as walkDocumentAndDivisions };