@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/loaders.js CHANGED
@@ -1,21 +1,21 @@
1
- import o from "fs-extra";
1
+ import r from "fs-extra";
2
2
  import B from "node:assert";
3
3
  import s from "node:path";
4
4
  import "glob";
5
5
  import "node:fs/promises";
6
6
  import { getChangedFilesSinceCommit as ue } from "./git.js";
7
7
  import { z as e } from "zod";
8
- import { E as x, F as K, G as Y, H as T, I as z, J as F, B as ie } from "./amendements-Bab1iUCY.js";
9
- import { C as me, D as se, F as ve, j as de, L as pe, e as ge, M as Ie, b as Ve, P as Fe, R as De, O as Xe, S as Pe, a6 as fe, a2 as we, ag as Oe, a8 as Re, a4 as qe, a0 as Le, ae as xe, aa as $e, ac as Me, aw as l, ax as oe, ay as W, az as ae, ai as Ne, al as ze, am as ke, ah as Te, aj as Ue, ak as Je } from "./questions-BiakXZ6q.js";
10
- var h = /* @__PURE__ */ ((t) => (t[t.SingleFile = 0] = "SingleFile", t[t.SegmentedFiles = 1] = "SegmentedFiles", t))(h || {}), V = /* @__PURE__ */ ((t) => (t[t.None = 0] = "None", t[t.ActeursEtOrganes = 1] = "ActeursEtOrganes", t[t.Agendas = 2] = "Agendas", t[t.Amendements = 4] = "Amendements", t[t.DossiersLegislatifs = 8] = "DossiersLegislatifs", t[t.Photos = 16] = "Photos", t[t.Scrutins = 32] = "Scrutins", t[t.Questions = 64] = "Questions", t[t.ComptesRendusSeances = 128] = "ComptesRendusSeances", t[t.ComptesRendusCommissions = 256] = "ComptesRendusCommissions", t[t.ComptesRendus = 512] = "ComptesRendus", t[t.All = 1023] = "All", t))(V || {});
11
- function* L(t, i = []) {
12
- const n = s.join(t, ...i);
13
- if (o.existsSync(n))
14
- for (const a of o.readdirSync(n)) {
15
- if (a[0] === ".")
8
+ import { E as x, F as K, G as Y, H as T, I as z, J as V, B as ie } from "./amendements-Blw6Aa6-.js";
9
+ import { C as me, D as se, F as Ce, j as de, L as pe, e as ge, M as Ie, b as Fe, P as Ve, R as De, O as Pe, S as Xe, a6 as fe, a2 as Oe, ag as we, a8 as qe, a4 as Le, a0 as Re, ae as xe, aa as $e, ac as Me, aw as l, ax as oe, ay as W, az as ae, ai as Ne, al as ze, am as ke, ah as Te, aj as Ue, ak as Je } from "./questions-XokaUGcy.js";
10
+ var h = /* @__PURE__ */ ((t) => (t[t.SingleFile = 0] = "SingleFile", t[t.SegmentedFiles = 1] = "SegmentedFiles", t))(h || {}), F = /* @__PURE__ */ ((t) => (t[t.None = 0] = "None", t[t.ActeursEtOrganes = 1] = "ActeursEtOrganes", t[t.Agendas = 2] = "Agendas", t[t.Amendements = 4] = "Amendements", t[t.DossiersLegislatifs = 8] = "DossiersLegislatifs", t[t.Photos = 16] = "Photos", t[t.Scrutins = 32] = "Scrutins", t[t.Questions = 64] = "Questions", t[t.ComptesRendus = 128] = "ComptesRendus", t[t.All = 255] = "All", t))(F || {});
11
+ function* R(t, n = []) {
12
+ const i = s.join(t, ...n);
13
+ if (r.existsSync(i))
14
+ for (const o of r.readdirSync(i)) {
15
+ if (o[0] === ".")
16
16
  continue;
17
- const p = s.join(n, a), f = [...i, a];
18
- o.statSync(p).isDirectory() ? yield* L(t, f) : yield f;
17
+ const p = s.join(i, o), f = [...n, o];
18
+ r.statSync(p).isDirectory() ? yield* R(t, f) : yield f;
19
19
  }
20
20
  }
21
21
  const Qe = [
@@ -45,7 +45,7 @@ const Qe = [
45
45
  description: "L'état civil est la situation de la personne dans la société, résultat d'une procédure écrite d'identification administrative."
46
46
  }), Ge = e.object({
47
47
  catSocPro: e.string().optional().meta({ description: "Catégorie socio professionelle de l'INSEE." }),
48
- famSocPro: ve.optional().meta({
48
+ famSocPro: Ce.optional().meta({
49
49
  description: "Famille socio professionelle de l'INSEE."
50
50
  })
51
51
  }), He = e.object({
@@ -235,7 +235,7 @@ const Qe = [
235
235
  }).meta({
236
236
  description: "Le rôle du secrétaire administratif est d'assister le président dans tous les aspects du fonctionnement du groupe : à ce titre, il est notamment chargé de l'organisation matérielle des activités du groupe (dont les missions et les réceptions) et établit les comptes rendus de ses réunions. Cette définition {@link http://www2.assemblee-nationale.fr/decouvrir-l-assemblee/role-et-pouvoirs-de-l-assemblee-nationale/les-relations-interparlementaires/les-groupes-d-amitie | du secrétaire administratif d'un groupe d'amitié} se rapproche de celle des autres organes ({@link http://www.assemblee-nationale.fr/connaissance/reglement.pdf | Groupes Parlementaires} Article 20, etc.)"
237
237
  }), ct = e.object({
238
- codeNatureDep: Ve.optional(),
238
+ codeNatureDep: Fe.optional(),
239
239
  code: e.string().optional(),
240
240
  libelle: se.optional()
241
241
  }), ut = e.object({
@@ -247,7 +247,7 @@ const Qe = [
247
247
  }), H = e.lazy(
248
248
  () => e.object({
249
249
  schemaVersion: e.string().optional(),
250
- xsiType: Xe.optional(),
250
+ xsiType: Pe.optional(),
251
251
  uid: T().meta({ description: "Identifiant unique de l'organe" }),
252
252
  codeType: ge,
253
253
  libelle: e.string().meta({ description: "Nom complet." }),
@@ -273,7 +273,7 @@ const Qe = [
273
273
  secretariat: lt.optional(),
274
274
  numero: e.string().optional(),
275
275
  lieu: mt.optional(),
276
- positionPolitique: Fe.optional(),
276
+ positionPolitique: Ve.optional(),
277
277
  preseance: e.string().optional().meta({
278
278
  description: "Plus le groupe politique est important, plus la préséance est proche de 1. Nombre entier. Uniquement renseigné pour les groupes politiques (dont le codeType est égal à GP)."
279
279
  }),
@@ -308,28 +308,28 @@ const Qe = [
308
308
  acteurs: e.array(_e)
309
309
  });
310
310
  function gt(t) {
311
- const i = _e.safeParse(JSON.parse(t));
312
- if (!i.success)
313
- throw new Error(ee("ActeurClean", i.error));
314
- return i.data;
311
+ const n = _e.safeParse(JSON.parse(t));
312
+ if (!n.success)
313
+ throw new Error(ee("ActeurClean", n.error));
314
+ return n.data;
315
315
  }
316
316
  function ft(t) {
317
- const i = H.safeParse(JSON.parse(t));
318
- if (!i.success)
319
- throw new Error(ee("OrganeClean", i.error));
320
- return i.data;
317
+ const n = H.safeParse(JSON.parse(t));
318
+ if (!n.success)
319
+ throw new Error(ee("OrganeClean", n.error));
320
+ return n.data;
321
321
  }
322
322
  function _t(t) {
323
- const i = he.safeParse(JSON.parse(t));
324
- if (!i.success)
325
- throw new Error(ee("DeportClean", i.error));
326
- return i.data;
323
+ const n = he.safeParse(JSON.parse(t));
324
+ if (!n.success)
325
+ throw new Error(ee("DeportClean", n.error));
326
+ return n.data;
327
327
  }
328
328
  function ht(t) {
329
- const i = pt.safeParse(JSON.parse(t));
330
- if (!i.success)
331
- throw new Error(ee("ActeursEtOrganesClean", i.error));
332
- return i.data;
329
+ const n = pt.safeParse(JSON.parse(t));
330
+ if (!n.success)
331
+ throw new Error(ee("ActeursEtOrganesClean", n.error));
332
+ return n.data;
333
333
  }
334
334
  function jt(t) {
335
335
  return JSON.stringify(t, null, 2);
@@ -343,11 +343,11 @@ function bt(t) {
343
343
  function yt(t) {
344
344
  return JSON.stringify(t, null, 2);
345
345
  }
346
- function ee(t, i) {
347
- const n = i.issues.map((a) => ` - ${a.path.join(".")}: ${a.message}`).join(`
346
+ function ee(t, n) {
347
+ const i = n.issues.map((o) => ` - ${o.path.join(".")}: ${o.message}`).join(`
348
348
  `);
349
349
  return `Invalid ${t}:
350
- ${n}`;
350
+ ${i}`;
351
351
  }
352
352
  const Z = {
353
353
  toActeur: gt,
@@ -371,10 +371,10 @@ const Z = {
371
371
  id: e.string().optional(),
372
372
  qualite: e.string().optional()
373
373
  }).meta({ description: "Orateur de la séance du débat." }), At = e.object({
374
- orateur: F(ne)
375
- }), Ct = e.union([
374
+ orateur: V(ne)
375
+ }), vt = e.union([
376
376
  At,
377
- F(ne),
377
+ V(ne),
378
378
  ne,
379
379
  e.string()
380
380
  ]), M = e.lazy(
@@ -390,11 +390,11 @@ const Z = {
390
390
  code_style: e.string().optional(),
391
391
  code_parole: e.string().optional(),
392
392
  valeur: e.string().optional(),
393
- orateurs: Ct.optional(),
393
+ orateurs: vt.optional(),
394
394
  texte: e.union([k, e.string()]).optional(),
395
- paragraphe: F(M).optional(),
396
- interExtraction: F(M).optional(),
397
- point: F(M).optional(),
395
+ paragraphe: V(M).optional(),
396
+ interExtraction: V(M).optional(),
397
+ point: V(M).optional(),
398
398
  structure: e.string().optional(),
399
399
  id_acteur: e.string().optional(),
400
400
  id_mandat: e.string().optional(),
@@ -406,27 +406,27 @@ const Z = {
406
406
  adt: e.string().optional(),
407
407
  ssadt: e.string().optional(),
408
408
  roledebat: e.string().optional(),
409
- changementPresidence: F(M).optional(),
409
+ changementPresidence: V(M).optional(),
410
410
  type_debat: e.string().optional(),
411
- decision: Pe.optional().meta({
411
+ decision: Xe.optional().meta({
412
412
  description: "Décision prise à l'issue du point de débat."
413
413
  }),
414
414
  ouvertureSeance: M.optional(),
415
415
  qualite: e.string().optional(),
416
416
  nom_orateur: e.string().optional()
417
417
  }).meta({ description: "Point de la séance du débat." })
418
- ), vt = e.object({
418
+ ), Ct = e.object({
419
419
  point: M
420
420
  }), It = e.object({
421
421
  journee: e.string(),
422
422
  session: e.string()
423
- }), Vt = e.object({
423
+ }), Ft = e.object({
424
424
  quantiemes: It,
425
- ouvertureSeance: F(M).optional(),
426
- point: F(M),
427
- finSeance: vt.optional(),
428
- paragraphe: F(M).optional()
429
- }).meta({ description: "Contenu de la séance du débat." }), Ft = e.object({
425
+ ouvertureSeance: V(M).optional(),
426
+ point: V(M),
427
+ finSeance: Ct.optional(),
428
+ paragraphe: V(M).optional()
429
+ }).meta({ description: "Contenu de la séance du débat." }), Vt = e.object({
430
430
  id_syceron: e.string(),
431
431
  intitule: e.string().optional(),
432
432
  sousIntitule: e.string().optional(),
@@ -434,26 +434,26 @@ const Z = {
434
434
  }), E = e.lazy(
435
435
  () => e.object({
436
436
  valeur_pts_odj: e.string().optional(),
437
- titreStruct: Ft,
438
- para: F(
437
+ titreStruct: Vt,
438
+ para: V(
439
439
  e.union([k, e.string(), e.unknown()])
440
440
  ).optional(),
441
- sommaire2: F(E).optional(),
442
- sommaire3: F(E).optional(),
443
- presidentSeance: F(k).optional(),
441
+ sommaire2: V(E).optional(),
442
+ sommaire3: V(E).optional(),
443
+ presidentSeance: V(k).optional(),
444
444
  type_debat: e.string().optional()
445
445
  }).meta({ description: "Sommaire de la séance du débat." })
446
446
  ), Dt = e.object({
447
447
  presidentSeance: k.meta({
448
448
  description: "Président de la séance."
449
449
  }),
450
- sommaire1: F(E).meta({
450
+ sommaire1: V(E).meta({
451
451
  description: "Premier niveau de sommaire."
452
452
  }),
453
- sommaire3: F(E).optional().meta({ description: "Troisième niveau de sommaire." }),
454
- sommaire2: F(E).optional().meta({ description: "Second niveau de sommaire." }),
455
- para: F(k).optional().meta({ description: "Paragraphe de texte libre dans le sommaire." })
456
- }).meta({ description: "Sommaire de la séance du débat." }), Xt = e.object({
453
+ sommaire3: V(E).optional().meta({ description: "Troisième niveau de sommaire." }),
454
+ sommaire2: V(E).optional().meta({ description: "Second niveau de sommaire." }),
455
+ para: V(k).optional().meta({ description: "Paragraphe de texte libre dans le sommaire." })
456
+ }).meta({ description: "Sommaire de la séance du débat." }), Pt = e.object({
457
457
  dateSeance: e.string(),
458
458
  dateSeanceJour: e.string(),
459
459
  numSeanceJour: e.string(),
@@ -476,56 +476,56 @@ const Z = {
476
476
  }),
477
477
  seanceRef: e.string(),
478
478
  sessionRef: e.string(),
479
- metadonnees: Xt,
480
- contenu: Vt,
479
+ metadonnees: Pt,
480
+ contenu: Ft,
481
481
  videoUrl: e.string().optional(),
482
482
  videoTimecode: e.number().optional()
483
483
  }).meta({
484
484
  title: "Débat",
485
485
  description: "Compte rendu des débats en séance."
486
- }), Pt = e.object({
486
+ }), Xt = e.object({
487
487
  comptesRendus: e.array(je)
488
488
  });
489
- function wt(t) {
490
- const i = je.safeParse(JSON.parse(t));
491
- if (!i.success)
492
- throw new Error(Se("CompteRenduClean", i.error));
493
- return i.data;
494
- }
495
489
  function Ot(t) {
496
- const i = Pt.safeParse(JSON.parse(t));
497
- if (!i.success)
498
- throw new Error(Se("ComptesRendusClean", i.error));
499
- return i.data;
490
+ const n = je.safeParse(JSON.parse(t));
491
+ if (!n.success)
492
+ throw new Error(Se("CompteRenduClean", n.error));
493
+ return n.data;
500
494
  }
501
- function Rt(t) {
502
- return JSON.stringify(t, null, 2);
495
+ function wt(t) {
496
+ const n = Xt.safeParse(JSON.parse(t));
497
+ if (!n.success)
498
+ throw new Error(Se("ComptesRendusClean", n.error));
499
+ return n.data;
503
500
  }
504
501
  function qt(t) {
505
502
  return JSON.stringify(t, null, 2);
506
503
  }
507
- function Se(t, i) {
508
- const n = i.issues.map((a) => ` - ${a.path.join(".")}: ${a.message}`).join(`
504
+ function Lt(t) {
505
+ return JSON.stringify(t, null, 2);
506
+ }
507
+ function Se(t, n) {
508
+ const i = n.issues.map((o) => ` - ${o.path.join(".")}: ${o.message}`).join(`
509
509
  `);
510
510
  return `Invalid ${t}:
511
- ${n}`;
511
+ ${i}`;
512
512
  }
513
513
  const re = {
514
- toCompteRendu: wt,
515
- compteRenduToJson: Rt,
516
- toComptesRendus: Ot,
517
- comptesRendusToJson: qt
518
- }, Lt = e.object({
514
+ toCompteRendu: Ot,
515
+ compteRenduToJson: qt,
516
+ toComptesRendus: wt,
517
+ comptesRendusToJson: Lt
518
+ }, Rt = e.object({
519
519
  texte: e.string().optional()
520
520
  }), xt = e.object({
521
521
  libelle: e.string()
522
522
  }), $t = e.object({
523
- code: we,
523
+ code: Oe,
524
524
  libelle: fe
525
525
  }), Mt = e.object({
526
- codeTypeVote: qe,
527
- libelleTypeVote: Re,
528
- typeMajorite: Oe.meta({
526
+ codeTypeVote: Le,
527
+ libelleTypeVote: qe,
528
+ typeMajorite: we.meta({
529
529
  description: "La signification de ce champ n'est pas définie."
530
530
  })
531
531
  }), be = e.object({
@@ -544,17 +544,17 @@ const re = {
544
544
  }),
545
545
  annonce: fe,
546
546
  decompte: be
547
- }), X = e.object({
547
+ }), P = e.object({
548
548
  acteurRef: K().meta({ description: "Référence à l'acteur votant" }),
549
549
  mandatRef: e.string(),
550
550
  parDelegation: e.boolean().optional(),
551
551
  numPlace: e.number().optional(),
552
- causePositionVote: Le.optional()
552
+ causePositionVote: Re.optional()
553
553
  }), zt = e.object({
554
- nonVotants: e.array(X).optional(),
555
- pour: e.array(X).optional(),
556
- contre: e.array(X).optional(),
557
- abstentions: e.array(X).optional()
554
+ nonVotants: e.array(P).optional(),
555
+ pour: e.array(P).optional(),
556
+ contre: e.array(P).optional(),
557
+ abstentions: e.array(P).optional()
558
558
  }), kt = e.object({
559
559
  positionMajoritaire: xe,
560
560
  decompteVoix: be,
@@ -567,17 +567,17 @@ const re = {
567
567
  organeRef: z(),
568
568
  groupes: e.array(Tt)
569
569
  }), Jt = e.object({
570
- nonVotants: e.array(X).optional(),
571
- pour: e.array(X).optional(),
572
- contre: e.array(X).optional(),
573
- abstentions: e.array(X).optional(),
574
- nonVotantsVolontaires: e.array(X).optional()
570
+ nonVotants: e.array(P).optional(),
571
+ pour: e.array(P).optional(),
572
+ contre: e.array(P).optional(),
573
+ abstentions: e.array(P).optional(),
574
+ nonVotantsVolontaires: e.array(P).optional()
575
575
  }), Qt = e.object({
576
- nonVotants: e.array(X).optional(),
577
- pour: e.array(X).optional(),
578
- contre: e.array(X).optional(),
579
- abstentions: e.array(X).optional(),
580
- nonVotantsVolontaires: e.array(X).optional(),
576
+ nonVotants: e.array(P).optional(),
577
+ pour: e.array(P).optional(),
578
+ contre: e.array(P).optional(),
579
+ abstentions: e.array(P).optional(),
580
+ nonVotantsVolontaires: e.array(P).optional(),
581
581
  dysfonctionnement: Jt.optional()
582
582
  }), ye = e.object({
583
583
  schemaVersion: e.string().optional(),
@@ -602,7 +602,7 @@ const re = {
602
602
  typeVote: Mt,
603
603
  sort: $t,
604
604
  titre: e.string().meta({ description: "Objet du vote." }),
605
- demandeur: Lt,
605
+ demandeur: Rt,
606
606
  objet: xt,
607
607
  modePublicationDesVotes: Me.meta({
608
608
  description: "La signification de ce champ n'est pas définie."
@@ -615,16 +615,16 @@ const re = {
615
615
  scrutins: e.array(ye)
616
616
  });
617
617
  function Wt(t) {
618
- const i = ye.safeParse(JSON.parse(t));
619
- if (!i.success)
620
- throw new Error(Ae("ScrutinClean", i.error));
621
- return i.data;
618
+ const n = ye.safeParse(JSON.parse(t));
619
+ if (!n.success)
620
+ throw new Error(Ae("ScrutinClean", n.error));
621
+ return n.data;
622
622
  }
623
623
  function Zt(t) {
624
- const i = Et.safeParse(JSON.parse(t));
625
- if (!i.success)
626
- throw new Error(Ae("ScrutinsClean", i.error));
627
- return i.data;
624
+ const n = Et.safeParse(JSON.parse(t));
625
+ if (!n.success)
626
+ throw new Error(Ae("ScrutinsClean", n.error));
627
+ return n.data;
628
628
  }
629
629
  function Bt(t) {
630
630
  return JSON.stringify(t, null, 2);
@@ -632,18 +632,18 @@ function Bt(t) {
632
632
  function Gt(t) {
633
633
  return JSON.stringify(t, null, 2);
634
634
  }
635
- function Ae(t, i) {
636
- const n = i.issues.map((a) => ` - ${a.path.join(".")}: ${a.message}`).join(`
635
+ function Ae(t, n) {
636
+ const i = n.issues.map((o) => ` - ${o.path.join(".")}: ${o.message}`).join(`
637
637
  `);
638
638
  return `Invalid ${t}:
639
- ${n}`;
639
+ ${i}`;
640
640
  }
641
641
  const le = {
642
642
  toScrutin: Wt,
643
643
  scrutinToJson: Bt,
644
644
  toScrutins: Zt,
645
645
  scrutinsToJson: Gt
646
- }, A = {
646
+ }, v = {
647
647
  acteursEtOrganes: [
648
648
  {
649
649
  // AMO10 (XVII)
@@ -918,16 +918,16 @@ const le = {
918
918
  name: "AMO40_deputes_actifs_mandats_actifs_organes_divises_XVII",
919
919
  ignoreForWeb: !0,
920
920
  legislature: l.DixSept,
921
- repairZip: async (t, i) => {
922
- const n = s.join(i, t.filename);
923
- await o.pathExists(n) && await o.remove(n), await o.mkdir(n), await o.pathExists(
924
- s.join(i, `${t.filename}.temp`, "acteur")
925
- ) && await o.move(
926
- s.join(i, `${t.filename}.temp`, "acteur"),
927
- s.join(n, "acteur")
928
- ), await o.move(
929
- s.join(i, `${t.filename}.temp`, "organe"),
930
- s.join(n, "organe")
921
+ repairZip: async (t, n) => {
922
+ const i = s.join(n, t.filename);
923
+ await r.pathExists(i) && await r.remove(i), await r.mkdir(i), await r.pathExists(
924
+ s.join(n, `${t.filename}.temp`, "acteur")
925
+ ) && await r.move(
926
+ s.join(n, `${t.filename}.temp`, "acteur"),
927
+ s.join(i, "acteur")
928
+ ), await r.move(
929
+ s.join(n, `${t.filename}.temp`, "organe"),
930
+ s.join(i, "organe")
931
931
  );
932
932
  },
933
933
  structure: h.SegmentedFiles,
@@ -963,16 +963,16 @@ const le = {
963
963
  name: "AMO40_deputes_actifs_mandats_actifs_organes_divises_XVI",
964
964
  ignoreForWeb: !0,
965
965
  legislature: l.Seize,
966
- repairZip: async (t, i) => {
967
- const n = s.join(i, t.filename);
968
- await o.pathExists(n) && await o.remove(n), await o.mkdir(n), await o.pathExists(
969
- s.join(i, `${t.filename}.temp`, "acteur")
970
- ) && await o.move(
971
- s.join(i, `${t.filename}.temp`, "acteur"),
972
- s.join(n, "acteur")
973
- ), await o.move(
974
- s.join(i, `${t.filename}.temp`, "organe"),
975
- s.join(n, "organe")
966
+ repairZip: async (t, n) => {
967
+ const i = s.join(n, t.filename);
968
+ await r.pathExists(i) && await r.remove(i), await r.mkdir(i), await r.pathExists(
969
+ s.join(n, `${t.filename}.temp`, "acteur")
970
+ ) && await r.move(
971
+ s.join(n, `${t.filename}.temp`, "acteur"),
972
+ s.join(i, "acteur")
973
+ ), await r.move(
974
+ s.join(n, `${t.filename}.temp`, "organe"),
975
+ s.join(i, "organe")
976
976
  );
977
977
  },
978
978
  structure: h.SegmentedFiles,
@@ -1008,14 +1008,14 @@ const le = {
1008
1008
  name: "AMO40_deputes_actifs_mandats_actifs_organes_divises_XV",
1009
1009
  ignoreForWeb: !0,
1010
1010
  legislature: l.Quinze,
1011
- repairZip: async (t, i) => {
1012
- const n = s.join(i, t.filename);
1013
- await o.pathExists(n) && await o.remove(n), await o.mkdir(n), await o.move(
1014
- s.join(i, `${t.filename}.temp`, "acteur"),
1015
- s.join(n, "acteur")
1016
- ), await o.move(
1017
- s.join(i, `${t.filename}.temp`, "organe"),
1018
- s.join(n, "organe")
1011
+ repairZip: async (t, n) => {
1012
+ const i = s.join(n, t.filename);
1013
+ await r.pathExists(i) && await r.remove(i), await r.mkdir(i), await r.move(
1014
+ s.join(n, `${t.filename}.temp`, "acteur"),
1015
+ s.join(i, "acteur")
1016
+ ), await r.move(
1017
+ s.join(n, `${t.filename}.temp`, "organe"),
1018
+ s.join(i, "organe")
1019
1019
  );
1020
1020
  },
1021
1021
  structure: h.SegmentedFiles,
@@ -1041,17 +1041,17 @@ const le = {
1041
1041
  name: "AMO50_acteurs_mandats_organes_divises_XVII",
1042
1042
  ignoreForWeb: !0,
1043
1043
  legislature: l.DixSept,
1044
- repairZip: async (t, i) => {
1045
- const n = s.join(i, t.filename);
1046
- await o.pathExists(n) && await o.remove(n), await o.mkdir(n), await o.move(
1047
- s.join(i, `${t.filename}.temp`, "mandat"),
1048
- s.join(n, "mandat")
1049
- ), await o.move(
1050
- s.join(i, `${t.filename}.temp`, "acteur"),
1051
- s.join(n, "acteur")
1052
- ), await o.move(
1053
- s.join(i, `${t.filename}.temp`, "organe"),
1054
- s.join(n, "organe")
1044
+ repairZip: async (t, n) => {
1045
+ const i = s.join(n, t.filename);
1046
+ await r.pathExists(i) && await r.remove(i), await r.mkdir(i), await r.move(
1047
+ s.join(n, `${t.filename}.temp`, "mandat"),
1048
+ s.join(i, "mandat")
1049
+ ), await r.move(
1050
+ s.join(n, `${t.filename}.temp`, "acteur"),
1051
+ s.join(i, "acteur")
1052
+ ), await r.move(
1053
+ s.join(n, `${t.filename}.temp`, "organe"),
1054
+ s.join(i, "organe")
1055
1055
  );
1056
1056
  },
1057
1057
  structure: h.SegmentedFiles,
@@ -1077,17 +1077,17 @@ const le = {
1077
1077
  name: "AMO50_acteurs_mandats_organes_divises_XVI",
1078
1078
  ignoreForWeb: !0,
1079
1079
  legislature: l.Seize,
1080
- repairZip: async (t, i) => {
1081
- const n = s.join(i, t.filename);
1082
- await o.pathExists(n) && await o.remove(n), await o.mkdir(n), await o.move(
1083
- s.join(i, `${t.filename}.temp`, "mandat"),
1084
- s.join(n, "mandat")
1085
- ), await o.move(
1086
- s.join(i, `${t.filename}.temp`, "acteur"),
1087
- s.join(n, "acteur")
1088
- ), await o.move(
1089
- s.join(i, `${t.filename}.temp`, "organe"),
1090
- s.join(n, "organe")
1080
+ repairZip: async (t, n) => {
1081
+ const i = s.join(n, t.filename);
1082
+ await r.pathExists(i) && await r.remove(i), await r.mkdir(i), await r.move(
1083
+ s.join(n, `${t.filename}.temp`, "mandat"),
1084
+ s.join(i, "mandat")
1085
+ ), await r.move(
1086
+ s.join(n, `${t.filename}.temp`, "acteur"),
1087
+ s.join(i, "acteur")
1088
+ ), await r.move(
1089
+ s.join(n, `${t.filename}.temp`, "organe"),
1090
+ s.join(i, "organe")
1091
1091
  );
1092
1092
  },
1093
1093
  structure: h.SegmentedFiles,
@@ -1113,17 +1113,17 @@ const le = {
1113
1113
  name: "AMO50_acteurs_mandats_organes_divises_XV",
1114
1114
  ignoreForWeb: !0,
1115
1115
  legislature: l.Quinze,
1116
- repairZip: async (t, i) => {
1117
- const n = s.join(i, t.filename);
1118
- await o.pathExists(n) && await o.remove(n), await o.mkdir(n), await o.move(
1119
- s.join(i, `${t.filename}.temp`, "mandat"),
1120
- s.join(n, "mandat")
1121
- ), await o.move(
1122
- s.join(i, `${t.filename}.temp`, "acteur"),
1123
- s.join(n, "acteur")
1124
- ), await o.move(
1125
- s.join(i, `${t.filename}.temp`, "organe"),
1126
- s.join(n, "organe")
1116
+ repairZip: async (t, n) => {
1117
+ const i = s.join(n, t.filename);
1118
+ await r.pathExists(i) && await r.remove(i), await r.mkdir(i), await r.move(
1119
+ s.join(n, `${t.filename}.temp`, "mandat"),
1120
+ s.join(i, "mandat")
1121
+ ), await r.move(
1122
+ s.join(n, `${t.filename}.temp`, "acteur"),
1123
+ s.join(i, "acteur")
1124
+ ), await r.move(
1125
+ s.join(n, `${t.filename}.temp`, "organe"),
1126
+ s.join(i, "organe")
1127
1127
  );
1128
1128
  },
1129
1129
  structure: h.SegmentedFiles,
@@ -1336,57 +1336,16 @@ const le = {
1336
1336
  url: "https://data.assemblee-nationale.fr/static/openData/repository/16/questions/questions_orales_sans_debat/Questions_orales_sans_debat.json.zip"
1337
1337
  }
1338
1338
  ],
1339
- comptesRendusSeances: [
1340
- {
1341
- filename: "Comptes_Rendus_Seances_XVII.xml",
1342
- name: "Comptes_Rendus_Seances_XVII",
1343
- legislature: l.DixSept,
1344
- repairZip: async (t, i) => {
1345
- const n = s.join(i, t.filename);
1346
- await o.pathExists(n) && await o.remove(n), await o.move(
1347
- s.join(i, `${t.filename}.temp`, "xml"),
1348
- n
1349
- );
1350
- },
1351
- structure: h.SegmentedFiles,
1352
- title: "Comptes rendus des séances publiques de la XVIIème législature",
1353
- url: "https://data.assemblee-nationale.fr/static/openData/repository/17/vp/syceronbrut/syseron.xml.zip"
1354
- },
1355
- {
1356
- filename: "Comptes_Rendus_Seances_XVI.xml",
1357
- name: "Comptes_Rendus_Seances_XVI",
1358
- legislature: l.Seize,
1359
- repairZip: async (t, i) => {
1360
- const n = s.join(i, t.filename);
1361
- await o.pathExists(n) && await o.remove(n), await o.move(
1362
- s.join(i, `${t.filename}.temp`, "xml"),
1363
- n
1364
- );
1365
- },
1366
- structure: h.SegmentedFiles,
1367
- title: "Comptes rendus des séances publiques de la XVIème législature",
1368
- url: "https://data.assemblee-nationale.fr/static/openData/repository/16/vp/syceronbrut/syseron.xml.zip"
1369
- }
1370
- ],
1371
- comptesRendusCommissions: [
1372
- {
1373
- filename: "Comptes_Rendus_Commissions_XVII.xml",
1374
- name: "Comptes_Rendus_Commissions_XVII",
1375
- legislature: l.DixSept,
1376
- structure: h.SegmentedFiles,
1377
- title: "Comptes rendus des commissions de la XVIIème législature"
1378
- }
1379
- ],
1380
1339
  comptesRendus: [
1381
1340
  {
1382
1341
  filename: "Comptes_Rendus_Seances_XVII.xml",
1383
1342
  name: "Comptes_Rendus_Seances_XVII",
1384
1343
  legislature: l.DixSept,
1385
- repairZip: async (t, i) => {
1386
- const n = s.join(i, t.filename);
1387
- await o.pathExists(n) && await o.remove(n), await o.move(
1388
- s.join(i, `${t.filename}.temp`, "xml"),
1389
- n
1344
+ repairZip: async (t, n) => {
1345
+ const i = s.join(n, t.filename);
1346
+ await r.pathExists(i) && await r.remove(i), await r.move(
1347
+ s.join(n, `${t.filename}.temp`, "xml"),
1348
+ i
1390
1349
  );
1391
1350
  },
1392
1351
  structure: h.SegmentedFiles,
@@ -1397,81 +1356,73 @@ const le = {
1397
1356
  filename: "Comptes_Rendus_Seances_XVI.xml",
1398
1357
  name: "Comptes_Rendus_Seances_XVI",
1399
1358
  legislature: l.Seize,
1400
- repairZip: async (t, i) => {
1401
- const n = s.join(i, t.filename);
1402
- await o.pathExists(n) && await o.remove(n), await o.move(
1403
- s.join(i, `${t.filename}.temp`, "xml"),
1404
- n
1359
+ repairZip: async (t, n) => {
1360
+ const i = s.join(n, t.filename);
1361
+ await r.pathExists(i) && await r.remove(i), await r.move(
1362
+ s.join(n, `${t.filename}.temp`, "xml"),
1363
+ i
1405
1364
  );
1406
1365
  },
1407
1366
  structure: h.SegmentedFiles,
1408
1367
  title: "Comptes rendus des séances publiques de la XVIème législature",
1409
1368
  url: "https://data.assemblee-nationale.fr/static/openData/repository/16/vp/syceronbrut/syseron.xml.zip"
1410
- },
1411
- {
1412
- filename: "Comptes_Rendus_Commissions_XVII.xml",
1413
- name: "Comptes_Rendus_Commissions_XVII",
1414
- legislature: l.DixSept,
1415
- structure: h.SegmentedFiles,
1416
- title: "Comptes rendus des commissions de la XVIIème législature"
1417
1369
  }
1418
1370
  ]
1419
1371
  };
1420
- function* N(t, i, n, a, p, { log: f = !1, noValidation: _ = !1, sinceCommits: m } = {}) {
1372
+ function* N(t, n, i, o, p, { log: f = !1, noValidation: _ = !1, sinceCommits: m } = {}) {
1421
1373
  const S = /* @__PURE__ */ new Set();
1422
- for (const C of n) {
1423
- if (C.ignoreForWeb || !Ht(i, C))
1374
+ for (const A of i) {
1375
+ if (A.ignoreForWeb || !Ht(n, A))
1424
1376
  continue;
1425
- const v = s.join(t, `${C.name}_nettoye`), I = m ? m[C.name] : void 0, q = I ? ue(v, I, {
1377
+ const C = s.join(t, `${A.name}_nettoye`), I = m ? m[A.name] : void 0, L = I ? ue(C, I, {
1426
1378
  diffFilter: "AMR"
1427
1379
  }) : null;
1428
1380
  f && I && (console.log(
1429
- `Filtering files changed since commit ${I} in ${v}`
1430
- ), console.log(`Found ${q?.size || 0} changed files`));
1431
- for (const D of L(v, p)) {
1381
+ `Filtering files changed since commit ${I} in ${C}`
1382
+ ), console.log(`Found ${L?.size || 0} changed files`));
1383
+ for (const D of R(C, p)) {
1432
1384
  if (!D[D.length - 1].endsWith(".json"))
1433
1385
  continue;
1434
- const P = s.join(v, ...D), w = s.join(...D), O = q?.get(w);
1435
- if (q != null && O == null)
1386
+ const X = s.join(C, ...D), O = s.join(...D), w = L?.get(O);
1387
+ if (L != null && w == null)
1436
1388
  continue;
1437
- f && console.log(`Loading file: ${P}…`);
1438
- let r = o.readFileSync(P, { encoding: "utf8" });
1439
- const u = _ ? JSON.parse(r) : a(r);
1389
+ f && console.log(`Loading file: ${X}…`);
1390
+ const a = r.readFileSync(X, { encoding: "utf8" }), u = _ ? JSON.parse(a) : o(a);
1440
1391
  S.has(u.uid) || (S.add(u.uid), yield {
1441
- datasetLegislature: C.legislature,
1442
- filePath: P,
1392
+ datasetLegislature: A.legislature,
1393
+ filePath: X,
1443
1394
  item: u,
1444
- ...O && { gitStatus: O }
1445
- }, r = null);
1395
+ ...w && { gitStatus: w }
1396
+ });
1446
1397
  }
1447
1398
  if (I) {
1448
1399
  const D = ue(
1449
- v,
1400
+ C,
1450
1401
  I,
1451
1402
  {
1452
1403
  diffFilter: "D"
1453
1404
  }
1454
1405
  );
1455
- for (const [$, P] of D.entries()) {
1456
- const w = s.join(v, $);
1457
- f && console.log(`Deleted file: ${w}`);
1458
- const r = { uid: s.parse($).name };
1406
+ for (const [$, X] of D.entries()) {
1407
+ const O = s.join(C, $);
1408
+ f && console.log(`Deleted file: ${O}`);
1409
+ const a = { uid: s.parse($).name };
1459
1410
  yield {
1460
- datasetLegislature: C.legislature,
1461
- filePath: w,
1462
- item: r,
1463
- gitStatus: P
1411
+ datasetLegislature: A.legislature,
1412
+ filePath: O,
1413
+ item: a,
1414
+ gitStatus: X
1464
1415
  };
1465
1416
  }
1466
1417
  }
1467
1418
  }
1468
1419
  S.clear();
1469
1420
  }
1470
- function Ht(t, i) {
1471
- const n = Array.isArray(t) ? t : t !== void 0 ? [t] : [];
1472
- return t === void 0 || n.includes(0) || i.legislature === l.All ? !0 : n.includes(i.legislature);
1421
+ function Ht(t, n) {
1422
+ const i = Array.isArray(t) ? t : t !== void 0 ? [t] : [];
1423
+ return t === void 0 || i.includes(0) || n.legislature === l.All ? !0 : i.includes(n.legislature);
1473
1424
  }
1474
- function* cn(t, i, n = {}, a) {
1425
+ function* cn(t, n, i = {}, o) {
1475
1426
  for (const {
1476
1427
  datasetLegislature: p,
1477
1428
  item: f,
@@ -1479,11 +1430,11 @@ function* cn(t, i, n = {}, a) {
1479
1430
  gitStatus: m
1480
1431
  } of N(
1481
1432
  t,
1482
- i,
1483
- a ?? A.acteursEtOrganes,
1433
+ n,
1434
+ o ?? v.acteursEtOrganes,
1484
1435
  Z.toActeur,
1485
1436
  ["acteurs"],
1486
- n
1437
+ i
1487
1438
  ))
1488
1439
  yield {
1489
1440
  acteur: f,
@@ -1492,7 +1443,7 @@ function* cn(t, i, n = {}, a) {
1492
1443
  ...m && { gitStatus: m }
1493
1444
  };
1494
1445
  }
1495
- function* un(t, i, n = {}, a) {
1446
+ function* un(t, n, i = {}, o) {
1496
1447
  for (const {
1497
1448
  item: p,
1498
1449
  datasetLegislature: f,
@@ -1500,11 +1451,11 @@ function* un(t, i, n = {}, a) {
1500
1451
  gitStatus: m
1501
1452
  } of N(
1502
1453
  t,
1503
- i,
1504
- a ?? A.acteursEtOrganes,
1454
+ n,
1455
+ o ?? v.acteursEtOrganes,
1505
1456
  Z.toOrgane,
1506
1457
  ["organes"],
1507
- n
1458
+ i
1508
1459
  ))
1509
1460
  yield {
1510
1461
  organe: p,
@@ -1513,7 +1464,7 @@ function* un(t, i, n = {}, a) {
1513
1464
  ...m && { gitStatus: m }
1514
1465
  };
1515
1466
  }
1516
- function* mn(t, i, n = {}, a) {
1467
+ function* mn(t, n, i = {}, o) {
1517
1468
  for (const {
1518
1469
  datasetLegislature: p,
1519
1470
  item: f,
@@ -1521,11 +1472,11 @@ function* mn(t, i, n = {}, a) {
1521
1472
  gitStatus: m
1522
1473
  } of N(
1523
1474
  t,
1524
- i,
1525
- a ?? A.amendements,
1475
+ n,
1476
+ o ?? v.amendements,
1526
1477
  ie.toAmendement,
1527
1478
  [],
1528
- n
1479
+ i
1529
1480
  ))
1530
1481
  yield {
1531
1482
  amendement: f,
@@ -1534,7 +1485,7 @@ function* mn(t, i, n = {}, a) {
1534
1485
  ...m && { gitStatus: m }
1535
1486
  };
1536
1487
  }
1537
- function* dn(t, i, n = {}, a) {
1488
+ function* dn(t, n, i = {}, o) {
1538
1489
  for (const {
1539
1490
  item: p,
1540
1491
  datasetLegislature: f,
@@ -1542,11 +1493,11 @@ function* dn(t, i, n = {}, a) {
1542
1493
  gitStatus: m
1543
1494
  } of N(
1544
1495
  t,
1545
- i,
1546
- a ?? A.dossiersLegislatifs,
1496
+ n,
1497
+ o ?? v.dossiersLegislatifs,
1547
1498
  W.toDocument,
1548
1499
  ["documents"],
1549
- n
1500
+ i
1550
1501
  ))
1551
1502
  yield {
1552
1503
  document: p,
@@ -1555,7 +1506,7 @@ function* dn(t, i, n = {}, a) {
1555
1506
  ...m && { gitStatus: m }
1556
1507
  };
1557
1508
  }
1558
- function* pn(t, i, n = {}, a) {
1509
+ function* pn(t, n, i = {}, o) {
1559
1510
  for (const {
1560
1511
  item: p,
1561
1512
  datasetLegislature: f,
@@ -1563,11 +1514,11 @@ function* pn(t, i, n = {}, a) {
1563
1514
  gitStatus: m
1564
1515
  } of N(
1565
1516
  t,
1566
- i,
1567
- a ?? A.dossiersLegislatifs,
1517
+ n,
1518
+ o ?? v.dossiersLegislatifs,
1568
1519
  W.toDossierParlementaire,
1569
1520
  ["dossiers"],
1570
- n
1521
+ i
1571
1522
  ))
1572
1523
  yield {
1573
1524
  dossierParlementaire: p,
@@ -1576,7 +1527,7 @@ function* pn(t, i, n = {}, a) {
1576
1527
  ...m && { gitStatus: m }
1577
1528
  };
1578
1529
  }
1579
- function* gn(t, i, n = {}, a) {
1530
+ function* gn(t, n, i = {}, o) {
1580
1531
  for (const {
1581
1532
  item: p,
1582
1533
  datasetLegislature: f,
@@ -1584,11 +1535,11 @@ function* gn(t, i, n = {}, a) {
1584
1535
  gitStatus: m
1585
1536
  } of N(
1586
1537
  t,
1587
- i,
1588
- a ?? A.agendas,
1538
+ n,
1539
+ o ?? v.agendas,
1589
1540
  oe.toReunion,
1590
1541
  [],
1591
- n
1542
+ i
1592
1543
  ))
1593
1544
  yield {
1594
1545
  reunion: p,
@@ -1597,7 +1548,7 @@ function* gn(t, i, n = {}, a) {
1597
1548
  ...m && { gitStatus: m }
1598
1549
  };
1599
1550
  }
1600
- function* fn(t, i, n = {}, a) {
1551
+ function* fn(t, n, i = {}, o) {
1601
1552
  for (const {
1602
1553
  item: p,
1603
1554
  datasetLegislature: f,
@@ -1605,11 +1556,11 @@ function* fn(t, i, n = {}, a) {
1605
1556
  gitStatus: m
1606
1557
  } of N(
1607
1558
  t,
1608
- i,
1609
- a ?? A.scrutins,
1559
+ n,
1560
+ o ?? v.scrutins,
1610
1561
  le.toScrutin,
1611
1562
  [],
1612
- n
1563
+ i
1613
1564
  ))
1614
1565
  yield {
1615
1566
  scrutin: p,
@@ -1618,7 +1569,7 @@ function* fn(t, i, n = {}, a) {
1618
1569
  ...m && { gitStatus: m }
1619
1570
  };
1620
1571
  }
1621
- function* _n(t, i, n = {}, a) {
1572
+ function* _n(t, n, i = {}, o) {
1622
1573
  for (const {
1623
1574
  item: p,
1624
1575
  datasetLegislature: f,
@@ -1626,11 +1577,11 @@ function* _n(t, i, n = {}, a) {
1626
1577
  gitStatus: m
1627
1578
  } of N(
1628
1579
  t,
1629
- i,
1630
- a ?? A.questions,
1580
+ n,
1581
+ o ?? v.questions,
1631
1582
  ae.toQuestion,
1632
1583
  [],
1633
- n
1584
+ i
1634
1585
  ))
1635
1586
  yield {
1636
1587
  question: p,
@@ -1639,7 +1590,7 @@ function* _n(t, i, n = {}, a) {
1639
1590
  ...m && { gitStatus: m }
1640
1591
  };
1641
1592
  }
1642
- function* hn(t, i, n = {}, a) {
1593
+ function* hn(t, n, i = {}, o) {
1643
1594
  for (const {
1644
1595
  item: p,
1645
1596
  datasetLegislature: f,
@@ -1647,11 +1598,11 @@ function* hn(t, i, n = {}, a) {
1647
1598
  gitStatus: m
1648
1599
  } of N(
1649
1600
  t,
1650
- i,
1651
- a ?? A.comptesRendusSeances.concat(A.comptesRendusCommissions),
1601
+ n,
1602
+ o ?? v.comptesRendus,
1652
1603
  re.toCompteRendu,
1653
1604
  [],
1654
- n
1605
+ i
1655
1606
  ))
1656
1607
  yield {
1657
1608
  compteRendu: p,
@@ -1660,58 +1611,58 @@ function* hn(t, i, n = {}, a) {
1660
1611
  ...m && { gitStatus: m }
1661
1612
  };
1662
1613
  }
1663
- function jn(t, i, n, { log: a = !1 } = {}) {
1614
+ function jn(t, n, i, { log: o = !1 } = {}) {
1664
1615
  const p = {}, f = {};
1665
- if (i & V.ActeursEtOrganes)
1666
- for (const r of A.acteursEtOrganes) {
1667
- if (r.ignoreForWeb || n !== l.All && r.legislature !== l.All && n !== r.legislature)
1616
+ if (n & F.ActeursEtOrganes)
1617
+ for (const a of v.acteursEtOrganes) {
1618
+ if (a.ignoreForWeb || i !== l.All && a.legislature !== l.All && i !== a.legislature)
1668
1619
  continue;
1669
1620
  const u = s.join(
1670
1621
  t,
1671
- r.filename.replace(/\.json$/, "_nettoye")
1622
+ a.filename.replace(/\.json$/, "_nettoye")
1672
1623
  );
1673
- for (const d of L(u, ["acteurs"])) {
1624
+ for (const d of R(u, ["acteurs"])) {
1674
1625
  if (!d[d.length - 1].endsWith(".json"))
1675
1626
  continue;
1676
1627
  const c = s.join(u, ...d);
1677
- a && console.log(`Loading file: ${c}…`);
1678
- const j = o.readFileSync(c, {
1628
+ o && console.log(`Loading file: ${c}…`);
1629
+ const j = r.readFileSync(c, {
1679
1630
  encoding: "utf8"
1680
1631
  }), g = Z.toActeur(j);
1681
1632
  p[g.uid] === void 0 && (p[g.uid] = g);
1682
1633
  }
1683
- for (const d of L(u, ["organes"])) {
1634
+ for (const d of R(u, ["organes"])) {
1684
1635
  if (!d[d.length - 1].endsWith(".json"))
1685
1636
  continue;
1686
1637
  const c = s.join(u, ...d);
1687
- a && console.log(`Loading file: ${c}…`);
1688
- const j = o.readFileSync(c, {
1638
+ o && console.log(`Loading file: ${c}…`);
1639
+ const j = r.readFileSync(c, {
1689
1640
  encoding: "utf8"
1690
1641
  }), g = Z.toOrgane(j);
1691
1642
  f[g.uid] === void 0 && (f[g.uid] = g);
1692
1643
  }
1693
1644
  }
1694
1645
  const _ = {}, m = {}, S = {};
1695
- if (i & V.Agendas)
1696
- for (const r of A.agendas) {
1697
- if (r.ignoreForWeb || n !== l.All && r.legislature !== l.All && n !== r.legislature)
1646
+ if (n & F.Agendas)
1647
+ for (const a of v.agendas) {
1648
+ if (a.ignoreForWeb || i !== l.All && a.legislature !== l.All && i !== a.legislature)
1698
1649
  continue;
1699
1650
  const u = s.join(
1700
1651
  t,
1701
- r.filename.replace(/\.json$/, "_nettoye")
1652
+ a.filename.replace(/\.json$/, "_nettoye")
1702
1653
  );
1703
- for (const d of L(u)) {
1654
+ for (const d of R(u)) {
1704
1655
  if (!d[d.length - 1].endsWith(".json"))
1705
1656
  continue;
1706
1657
  const c = s.join(u, ...d);
1707
- a && console.log(`Loading file: ${c}…`);
1708
- const j = o.readFileSync(c, {
1658
+ o && console.log(`Loading file: ${c}…`);
1659
+ const j = r.readFileSync(c, {
1709
1660
  encoding: "utf8"
1710
1661
  }), g = oe.toReunion(j);
1711
1662
  _[g.uid] === void 0 && (_[g.uid] = g);
1712
- const R = g.timestampDebut.toISOString().split("T")[0];
1713
- let U = m[R];
1714
- U === void 0 && (U = m[R] = []), U.push(g);
1663
+ const q = g.timestampDebut.toISOString().split("T")[0];
1664
+ let U = m[q];
1665
+ U === void 0 && (U = m[q] = []), U.push(g);
1715
1666
  const J = g.odj;
1716
1667
  if (J !== void 0)
1717
1668
  for (const Q of J.pointsOdj || [])
@@ -1721,251 +1672,251 @@ function jn(t, i, n, { log: a = !1 } = {}) {
1721
1672
  }
1722
1673
  }
1723
1674
  }
1724
- const C = {};
1725
- if (i & V.Amendements)
1726
- for (const r of A.amendements) {
1727
- if (r.ignoreForWeb || n !== l.All && r.legislature !== l.All && n !== r.legislature)
1675
+ const A = {};
1676
+ if (n & F.Amendements)
1677
+ for (const a of v.amendements) {
1678
+ if (a.ignoreForWeb || i !== l.All && a.legislature !== l.All && i !== a.legislature)
1728
1679
  continue;
1729
1680
  const u = s.join(
1730
1681
  t,
1731
- r.filename.replace(/\.json$/, "_nettoye")
1682
+ a.filename.replace(/\.json$/, "_nettoye")
1732
1683
  );
1733
- for (const d of L(u)) {
1684
+ for (const d of R(u)) {
1734
1685
  if (!d[d.length - 1].endsWith(".json"))
1735
1686
  continue;
1736
1687
  const c = s.join(u, ...d);
1737
- a && console.log(`Loading file: ${c}…`);
1738
- const j = o.readFileSync(c, {
1688
+ o && console.log(`Loading file: ${c}…`);
1689
+ const j = r.readFileSync(c, {
1739
1690
  encoding: "utf8"
1740
1691
  }), g = ie.toAmendement(j);
1741
- C[g.uid] === void 0 && (C[g.uid] = g);
1692
+ A[g.uid] === void 0 && (A[g.uid] = g);
1742
1693
  }
1743
1694
  }
1744
- const v = {}, I = {}, q = {}, D = {};
1745
- if (i & V.DossiersLegislatifs)
1746
- for (const r of A.dossiersLegislatifs) {
1747
- if (r.ignoreForWeb || n !== l.All && r.legislature !== l.All && n !== r.legislature)
1695
+ const C = {}, I = {}, L = {}, D = {};
1696
+ if (n & F.DossiersLegislatifs)
1697
+ for (const a of v.dossiersLegislatifs) {
1698
+ if (a.ignoreForWeb || i !== l.All && a.legislature !== l.All && i !== a.legislature)
1748
1699
  continue;
1749
1700
  const u = s.join(
1750
1701
  t,
1751
- r.filename.replace(/\.json$/, "_nettoye")
1702
+ a.filename.replace(/\.json$/, "_nettoye")
1752
1703
  );
1753
- for (const d of L(u, ["documents"])) {
1704
+ for (const d of R(u, ["documents"])) {
1754
1705
  if (!d[d.length - 1].endsWith(".json"))
1755
1706
  continue;
1756
1707
  const c = s.join(u, ...d);
1757
- a && console.log(`Loading file: ${c}…`);
1758
- const j = o.readFileSync(c, {
1708
+ o && console.log(`Loading file: ${c}…`);
1709
+ const j = r.readFileSync(c, {
1759
1710
  encoding: "utf8"
1760
1711
  }), g = W.toDocument(j);
1761
- v[g.uid] === void 0 && (v[g.uid] = g);
1712
+ C[g.uid] === void 0 && (C[g.uid] = g);
1762
1713
  }
1763
- for (const d of L(u, ["dossiers"])) {
1714
+ for (const d of R(u, ["dossiers"])) {
1764
1715
  if (!d[d.length - 1].endsWith(".json"))
1765
1716
  continue;
1766
1717
  const c = s.join(u, ...d);
1767
- a && console.log(`Loading file: ${c}…`);
1768
- const j = o.readFileSync(c, {
1718
+ o && console.log(`Loading file: ${c}…`);
1719
+ const j = r.readFileSync(c, {
1769
1720
  encoding: "utf8"
1770
- }), g = W.toDossierParlementaire(j), R = g.titreDossier;
1771
- R.senatChemin && I[R.senatChemin] === void 0 && (I[R.senatChemin] = g), R.titreChemin && q[R.titreChemin] === void 0 && (q[R.titreChemin] = g), D[g.uid] === void 0 && (D[g.uid] = g);
1721
+ }), g = W.toDossierParlementaire(j), q = g.titreDossier;
1722
+ q.senatChemin && I[q.senatChemin] === void 0 && (I[q.senatChemin] = g), q.titreChemin && L[q.titreChemin] === void 0 && (L[q.titreChemin] = g), D[g.uid] === void 0 && (D[g.uid] = g);
1772
1723
  }
1773
1724
  }
1774
1725
  let $ = {};
1775
- if (i & V.Photos) {
1726
+ if (n & F.Photos) {
1776
1727
  {
1777
- const r = s.join(
1728
+ const a = s.join(
1778
1729
  t,
1779
1730
  `photos_deputes_${// TODO: Handle Legislature.All.
1780
- n === l.All ? l.DixSept : n}`,
1731
+ i === l.All ? l.DixSept : i}`,
1781
1732
  "deputes.json"
1782
1733
  );
1783
- if (o.existsSync(r)) {
1784
- a && console.log(`Loading file: ${r}`);
1785
- const u = o.readFileSync(r, { encoding: "utf8" });
1734
+ if (r.existsSync(a)) {
1735
+ o && console.log(`Loading file: ${a}`);
1736
+ const u = r.readFileSync(a, { encoding: "utf8" });
1786
1737
  Object.assign($, JSON.parse(u));
1787
- } else a && console.log(`Ignoring missing file: ${r}`);
1738
+ } else o && console.log(`Ignoring missing file: ${a}`);
1788
1739
  }
1789
1740
  {
1790
- const r = s.join(
1741
+ const a = s.join(
1791
1742
  t,
1792
1743
  "photos_senateurs",
1793
1744
  "senateurs.json"
1794
1745
  );
1795
- if (o.existsSync(r)) {
1796
- a && console.log(`Loading file: ${r}`);
1797
- const u = o.readFileSync(r, { encoding: "utf8" });
1746
+ if (r.existsSync(a)) {
1747
+ o && console.log(`Loading file: ${a}`);
1748
+ const u = r.readFileSync(a, { encoding: "utf8" });
1798
1749
  Object.assign($, JSON.parse(u));
1799
- } else a && console.log(`Ignoring missing file: ${r}`);
1750
+ } else o && console.log(`Ignoring missing file: ${a}`);
1800
1751
  }
1801
1752
  }
1802
- const P = {};
1803
- if (i & V.Scrutins)
1804
- for (const r of A.scrutins) {
1805
- if (r.ignoreForWeb || n !== l.All && r.legislature !== l.All && n !== r.legislature)
1753
+ const X = {};
1754
+ if (n & F.Scrutins)
1755
+ for (const a of v.scrutins) {
1756
+ if (a.ignoreForWeb || i !== l.All && a.legislature !== l.All && i !== a.legislature)
1806
1757
  continue;
1807
1758
  const u = s.join(
1808
1759
  t,
1809
- r.filename.replace(/\.json$/, "_nettoye")
1760
+ a.filename.replace(/\.json$/, "_nettoye")
1810
1761
  );
1811
- for (const d of L(u)) {
1762
+ for (const d of R(u)) {
1812
1763
  if (!d[d.length - 1].endsWith(".json"))
1813
1764
  continue;
1814
1765
  const c = s.join(u, ...d);
1815
- a && console.log(`Loading file: ${c}…`);
1816
- const j = o.readFileSync(c, {
1766
+ o && console.log(`Loading file: ${c}…`);
1767
+ const j = r.readFileSync(c, {
1817
1768
  encoding: "utf8"
1818
1769
  }), g = le.toScrutin(j);
1819
- P[g.uid] === void 0 && (P[g.uid] = g);
1770
+ X[g.uid] === void 0 && (X[g.uid] = g);
1820
1771
  }
1821
1772
  }
1822
- const w = {};
1823
- if (i & V.Questions)
1824
- for (const r of A.questions) {
1825
- if (r.ignoreForWeb || n !== l.All && r.legislature !== l.All && n !== r.legislature)
1773
+ const O = {};
1774
+ if (n & F.Questions)
1775
+ for (const a of v.questions) {
1776
+ if (a.ignoreForWeb || i !== l.All && a.legislature !== l.All && i !== a.legislature)
1826
1777
  continue;
1827
1778
  const u = s.join(
1828
1779
  t,
1829
- r.filename.replace(/\.json$/, "_nettoye")
1780
+ a.filename.replace(/\.json$/, "_nettoye")
1830
1781
  );
1831
- for (const d of L(u)) {
1782
+ for (const d of R(u)) {
1832
1783
  if (!d[d.length - 1].endsWith(".json"))
1833
1784
  continue;
1834
1785
  const c = s.join(u, ...d);
1835
- a && console.log(`Loading file: ${c}…`);
1836
- const j = o.readFileSync(c, {
1786
+ o && console.log(`Loading file: ${c}…`);
1787
+ const j = r.readFileSync(c, {
1837
1788
  encoding: "utf8"
1838
1789
  }), g = ae.toQuestion(j);
1839
- w[g.uid] === void 0 && (w[g.uid] = g);
1790
+ O[g.uid] === void 0 && (O[g.uid] = g);
1840
1791
  }
1841
1792
  }
1842
- const O = {};
1843
- if (i & V.ComptesRendusSeances)
1844
- for (const r of A.comptesRendusSeances) {
1845
- if (r.ignoreForWeb || n !== l.All && r.legislature !== l.All && n !== r.legislature)
1793
+ const w = {};
1794
+ if (n & F.ComptesRendus)
1795
+ for (const a of v.comptesRendus) {
1796
+ if (a.ignoreForWeb || i !== l.All && a.legislature !== l.All && i !== a.legislature)
1846
1797
  continue;
1847
1798
  const u = s.join(
1848
1799
  t,
1849
- r.filename.replace(/\.json$/, "_nettoye")
1800
+ a.filename.replace(/\.json$/, "_nettoye")
1850
1801
  );
1851
- for (const d of L(u)) {
1802
+ for (const d of R(u)) {
1852
1803
  if (!d[d.length - 1].endsWith(".json"))
1853
1804
  continue;
1854
1805
  const c = s.join(u, ...d);
1855
- a && console.log(`Loading file: ${c}…`);
1856
- const j = o.readFileSync(c, {
1806
+ o && console.log(`Loading file: ${c}…`);
1807
+ const j = r.readFileSync(c, {
1857
1808
  encoding: "utf8"
1858
1809
  }), g = re.toCompteRendu(j);
1859
- O[g.uid] === void 0 && (O[g.uid] = g);
1810
+ w[g.uid] === void 0 && (w[g.uid] = g);
1860
1811
  }
1861
1812
  }
1862
1813
  return {
1863
1814
  acteurByUid: p,
1864
- amendementByUid: C,
1865
- documentByUid: v,
1815
+ amendementByUid: A,
1816
+ documentByUid: C,
1866
1817
  dossierParlementaireBySenatChemin: I,
1867
- dossierParlementaireByTitreChemin: q,
1818
+ dossierParlementaireByTitreChemin: L,
1868
1819
  dossierParlementaireByUid: D,
1869
1820
  organeByUid: f,
1870
1821
  photoByUid: $,
1871
1822
  reunionByUid: _,
1872
1823
  reunionsByDay: m,
1873
1824
  reunionsByDossierUid: S,
1874
- scrutinByUid: P,
1875
- questionByUid: w,
1876
- compteRenduByUid: O
1825
+ scrutinByUid: X,
1826
+ questionByUid: O,
1827
+ compteRenduByUid: w
1877
1828
  };
1878
1829
  }
1879
- function Sn(t, i, n, { log: a = !1 } = {}) {
1830
+ function Sn(t, n, i, { log: o = !1 } = {}) {
1880
1831
  const p = {}, f = {};
1881
- if (i & V.ActeursEtOrganes)
1882
- for (const r of A.acteursEtOrganes) {
1883
- if (r.ignoreForWeb || n !== l.All && r.legislature !== l.All && n !== r.legislature)
1832
+ if (n & F.ActeursEtOrganes)
1833
+ for (const a of v.acteursEtOrganes) {
1834
+ if (a.ignoreForWeb || i !== l.All && a.legislature !== l.All && i !== a.legislature)
1884
1835
  continue;
1885
1836
  const u = s.join(
1886
1837
  t,
1887
- r.filename.replace(/\.json$/, "_nettoye.json")
1838
+ a.filename.replace(/\.json$/, "_nettoye.json")
1888
1839
  );
1889
- a && console.log(`Loading file: ${u}`);
1890
- const d = o.readFileSync(u, { encoding: "utf8" }), y = Z.toActeursEtOrganes(d);
1840
+ o && console.log(`Loading file: ${u}`);
1841
+ const d = r.readFileSync(u, { encoding: "utf8" }), y = Z.toActeursEtOrganes(d);
1891
1842
  for (const c of y.acteurs)
1892
1843
  p[c.uid] === void 0 && (p[c.uid] = c);
1893
1844
  for (const c of y.organes)
1894
1845
  f[c.uid] === void 0 && (f[c.uid] = c);
1895
1846
  }
1896
1847
  const _ = {}, m = {}, S = {};
1897
- if (i & V.Agendas)
1898
- for (const r of A.agendas) {
1899
- if (r.ignoreForWeb || n !== l.All && r.legislature !== l.All && n !== r.legislature)
1848
+ if (n & F.Agendas)
1849
+ for (const a of v.agendas) {
1850
+ if (a.ignoreForWeb || i !== l.All && a.legislature !== l.All && i !== a.legislature)
1900
1851
  continue;
1901
1852
  const u = s.join(
1902
1853
  t,
1903
- r.filename.replace(/\.json$/, "_nettoye.json")
1854
+ a.filename.replace(/\.json$/, "_nettoye.json")
1904
1855
  );
1905
- a && console.log(`Loading file: ${u}`);
1906
- const d = o.readFileSync(u, { encoding: "utf8" }), y = oe.toAgendas(d);
1856
+ o && console.log(`Loading file: ${u}`);
1857
+ const d = r.readFileSync(u, { encoding: "utf8" }), y = oe.toAgendas(d);
1907
1858
  for (const c of y.reunions) {
1908
1859
  _[c.uid] === void 0 && (_[c.uid] = c);
1909
1860
  const j = c.timestampDebut.toISOString().split("T")[0];
1910
1861
  let g = m[j];
1911
1862
  g === void 0 && (g = m[j] = []), g.push(c);
1912
- const R = c.odj;
1913
- if (R !== void 0)
1914
- for (const U of R.pointsOdj || [])
1863
+ const q = c.odj;
1864
+ if (q !== void 0)
1865
+ for (const U of q.pointsOdj || [])
1915
1866
  for (const J of U.dossiersLegislatifsRefs || []) {
1916
1867
  let Q = S[J];
1917
1868
  Q === void 0 && (Q = S[J] = []), Q.push(c);
1918
1869
  }
1919
1870
  }
1920
1871
  }
1921
- const C = {};
1922
- if (i & V.Amendements)
1923
- for (const r of A.amendements) {
1924
- if (r.ignoreForWeb || n !== l.All && r.legislature !== l.All && n !== r.legislature)
1872
+ const A = {};
1873
+ if (n & F.Amendements)
1874
+ for (const a of v.amendements) {
1875
+ if (a.ignoreForWeb || i !== l.All && a.legislature !== l.All && i !== a.legislature)
1925
1876
  continue;
1926
1877
  const u = s.join(
1927
1878
  t,
1928
- r.filename.replace(/\.json$/, "_nettoye.json")
1879
+ a.filename.replace(/\.json$/, "_nettoye.json")
1929
1880
  );
1930
- a && console.log(`Loading file: ${u}`);
1931
- const d = o.readFileSync(u, { encoding: "utf8" }), y = ie.toAmendements(d);
1881
+ o && console.log(`Loading file: ${u}`);
1882
+ const d = r.readFileSync(u, { encoding: "utf8" }), y = ie.toAmendements(d);
1932
1883
  for (const c of y.textesLegislatifs)
1933
1884
  for (const j of c.amendements)
1934
- C[j.uid] === void 0 && (C[j.uid] = j);
1885
+ A[j.uid] === void 0 && (A[j.uid] = j);
1935
1886
  }
1936
- const v = {}, I = {}, q = {}, D = {};
1937
- if (i & V.DossiersLegislatifs)
1938
- for (const r of A.dossiersLegislatifs) {
1939
- if (r.ignoreForWeb || n !== l.All && r.legislature !== l.All && n !== r.legislature)
1887
+ const C = {}, I = {}, L = {}, D = {};
1888
+ if (n & F.DossiersLegislatifs)
1889
+ for (const a of v.dossiersLegislatifs) {
1890
+ if (a.ignoreForWeb || i !== l.All && a.legislature !== l.All && i !== a.legislature)
1940
1891
  continue;
1941
1892
  const u = s.join(
1942
1893
  t,
1943
- r.filename.replace(/\.json$/, "_nettoye.json")
1894
+ a.filename.replace(/\.json$/, "_nettoye.json")
1944
1895
  );
1945
- a && console.log(`Loading file: ${u}`);
1946
- const d = o.readFileSync(u, { encoding: "utf8" }), y = W.toDossiersLegislatifs(d);
1896
+ o && console.log(`Loading file: ${u}`);
1897
+ const d = r.readFileSync(u, { encoding: "utf8" }), y = W.toDossiersLegislatifs(d);
1947
1898
  for (const c of y.textesLegislatifs)
1948
- v[c.uid] === void 0 && (v[c.uid] = c);
1899
+ C[c.uid] === void 0 && (C[c.uid] = c);
1949
1900
  for (const c of y.dossiersParlementaires) {
1950
1901
  const j = c.titreDossier;
1951
- j.senatChemin && I[j.senatChemin] === void 0 && (I[j.senatChemin] = c), j.titreChemin && q[j.titreChemin] === void 0 && (q[j.titreChemin] = c), D[c.uid] === void 0 && (D[c.uid] = c);
1902
+ j.senatChemin && I[j.senatChemin] === void 0 && (I[j.senatChemin] = c), j.titreChemin && L[j.titreChemin] === void 0 && (L[j.titreChemin] = c), D[c.uid] === void 0 && (D[c.uid] = c);
1952
1903
  }
1953
1904
  }
1954
1905
  const $ = {};
1955
- if (i & V.Photos) {
1956
- const r = {};
1906
+ if (n & F.Photos) {
1907
+ const a = {};
1957
1908
  {
1958
1909
  const u = s.join(
1959
1910
  t,
1960
1911
  `photos_deputes_${// TODO: Handle Legislature.All.
1961
- n === l.All ? l.DixSept : n}`,
1912
+ i === l.All ? l.DixSept : i}`,
1962
1913
  "deputes.json"
1963
1914
  );
1964
- if (o.existsSync(u)) {
1965
- a && console.log(`Loading file: ${u}`);
1966
- const d = o.readFileSync(u, { encoding: "utf8" });
1967
- Object.assign(r, JSON.parse(d));
1968
- } else a && console.log(`Ignoring missing file: ${u}`);
1915
+ if (r.existsSync(u)) {
1916
+ o && console.log(`Loading file: ${u}`);
1917
+ const d = r.readFileSync(u, { encoding: "utf8" });
1918
+ Object.assign(a, JSON.parse(d));
1919
+ } else o && console.log(`Ignoring missing file: ${u}`);
1969
1920
  }
1970
1921
  {
1971
1922
  const u = s.join(
@@ -1973,196 +1924,196 @@ function Sn(t, i, n, { log: a = !1 } = {}) {
1973
1924
  "photos_senateurs",
1974
1925
  "senateurs.json"
1975
1926
  );
1976
- if (o.existsSync(u)) {
1977
- a && console.log(`Loading file: ${u}`);
1978
- const d = o.readFileSync(u, { encoding: "utf8" });
1979
- Object.assign(r, JSON.parse(d));
1980
- } else a && console.log(`Ignoring missing file: ${u}`);
1927
+ if (r.existsSync(u)) {
1928
+ o && console.log(`Loading file: ${u}`);
1929
+ const d = r.readFileSync(u, { encoding: "utf8" });
1930
+ Object.assign(a, JSON.parse(d));
1931
+ } else o && console.log(`Ignoring missing file: ${u}`);
1981
1932
  }
1982
1933
  }
1983
- const P = {};
1984
- if (i & V.Scrutins)
1985
- for (const r of A.scrutins) {
1986
- if (r.ignoreForWeb || n !== l.All && r.legislature !== l.All && n !== r.legislature)
1934
+ const X = {};
1935
+ if (n & F.Scrutins)
1936
+ for (const a of v.scrutins) {
1937
+ if (a.ignoreForWeb || i !== l.All && a.legislature !== l.All && i !== a.legislature)
1987
1938
  continue;
1988
1939
  const u = s.join(
1989
1940
  t,
1990
- r.filename.replace(/\.json$/, "_nettoye.json")
1941
+ a.filename.replace(/\.json$/, "_nettoye.json")
1991
1942
  );
1992
- a && console.log(`Loading file: ${u}`);
1993
- const d = o.readFileSync(u, { encoding: "utf8" }), y = le.toScrutins(d);
1943
+ o && console.log(`Loading file: ${u}`);
1944
+ const d = r.readFileSync(u, { encoding: "utf8" }), y = le.toScrutins(d);
1994
1945
  for (const c of y.scrutins)
1995
- P[c.uid] === void 0 && (P[c.uid] = c);
1946
+ X[c.uid] === void 0 && (X[c.uid] = c);
1996
1947
  }
1997
- const w = {};
1998
- if (i & V.Questions)
1999
- for (const r of A.questions) {
2000
- if (r.ignoreForWeb || n !== l.All && r.legislature !== l.All && n !== r.legislature)
1948
+ const O = {};
1949
+ if (n & F.Questions)
1950
+ for (const a of v.questions) {
1951
+ if (a.ignoreForWeb || i !== l.All && a.legislature !== l.All && i !== a.legislature)
2001
1952
  continue;
2002
1953
  const u = s.join(
2003
1954
  t,
2004
- r.filename.replace(/\.json$/, "_nettoye.json")
1955
+ a.filename.replace(/\.json$/, "_nettoye.json")
2005
1956
  );
2006
- a && console.log(`Loading file: ${u}`);
2007
- const d = o.readFileSync(u, { encoding: "utf8" }), y = ae.toQuestions(d);
1957
+ o && console.log(`Loading file: ${u}`);
1958
+ const d = r.readFileSync(u, { encoding: "utf8" }), y = ae.toQuestions(d);
2008
1959
  for (const c of y.questions)
2009
- w[c.uid] === void 0 && (w[c.uid] = c);
1960
+ O[c.uid] === void 0 && (O[c.uid] = c);
2010
1961
  }
2011
- const O = {};
2012
- if (i & V.ComptesRendusSeances)
2013
- for (const r of A.comptesRendusSeances) {
2014
- if (r.ignoreForWeb || n !== l.All && r.legislature !== l.All && n !== r.legislature)
1962
+ const w = {};
1963
+ if (n & F.ComptesRendus)
1964
+ for (const a of v.comptesRendus) {
1965
+ if (a.ignoreForWeb || i !== l.All && a.legislature !== l.All && i !== a.legislature)
2015
1966
  continue;
2016
1967
  const u = s.join(
2017
1968
  t,
2018
- r.filename.replace(/\.json$/, "_nettoye.json")
1969
+ a.filename.replace(/\.json$/, "_nettoye.json")
2019
1970
  );
2020
- a && console.log(`Loading file: ${u}`);
2021
- const d = o.readFileSync(u, { encoding: "utf8" }), y = re.toComptesRendus(d);
1971
+ o && console.log(`Loading file: ${u}`);
1972
+ const d = r.readFileSync(u, { encoding: "utf8" }), y = re.toComptesRendus(d);
2022
1973
  for (const c of y.comptesRendus)
2023
- O[c.uid] === void 0 && (O[c.uid] = c);
1974
+ w[c.uid] === void 0 && (w[c.uid] = c);
2024
1975
  }
2025
1976
  return {
2026
1977
  acteurByUid: p,
2027
- amendementByUid: C,
2028
- documentByUid: v,
1978
+ amendementByUid: A,
1979
+ documentByUid: C,
2029
1980
  dossierParlementaireBySenatChemin: I,
2030
- dossierParlementaireByTitreChemin: q,
1981
+ dossierParlementaireByTitreChemin: L,
2031
1982
  dossierParlementaireByUid: D,
2032
1983
  organeByUid: f,
2033
1984
  photoByUid: $,
2034
1985
  reunionByUid: _,
2035
1986
  reunionsByDay: m,
2036
1987
  reunionsByDossierUid: S,
2037
- scrutinByUid: P,
2038
- questionByUid: w,
2039
- compteRenduByUid: O
1988
+ scrutinByUid: X,
1989
+ questionByUid: O,
1990
+ compteRenduByUid: w
2040
1991
  };
2041
1992
  }
2042
- function bn(t, i, n) {
2043
- const a = s.join(t, "Documents"), p = Kt(a, i), f = s.join(p, "index.json");
2044
- if (!o.pathExistsSync(f))
1993
+ function bn(t, n, i) {
1994
+ const o = s.join(t, "Documents"), p = Kt(o, n), f = s.join(p, "index.json");
1995
+ if (!r.pathExistsSync(f))
2045
1996
  return;
2046
- const _ = o.readJsonSync(f);
2047
- for (const m of n)
2048
- for (const { filename: S, url: C } of _[m] ?? [])
1997
+ const _ = r.readJsonSync(f);
1998
+ for (const m of i)
1999
+ for (const { filename: S, url: A } of _[m] ?? [])
2049
2000
  if (S !== void 0)
2050
- return { format: m, path: s.join(p, S), url: C };
2001
+ return { format: m, path: s.join(p, S), url: A };
2051
2002
  }
2052
- function yn(t, i, { log: n = !1 } = {}) {
2053
- const a = s.join(
2003
+ function yn(t, n, { log: i = !1 } = {}) {
2004
+ const o = s.join(
2054
2005
  t,
2055
2006
  `photos_deputes_${// TODO: Handle Legislature.All.
2056
- i === l.All ? l.DixSept : i}`,
2007
+ n === l.All ? l.DixSept : n}`,
2057
2008
  "deputes.json"
2058
2009
  );
2059
- n && console.log(`Loading file: ${a}`);
2060
- const p = o.readFileSync(a, { encoding: "utf8" });
2010
+ i && console.log(`Loading file: ${o}`);
2011
+ const p = r.readFileSync(o, { encoding: "utf8" });
2061
2012
  return JSON.parse(p);
2062
2013
  }
2063
- function An(t, { log: i = !1 } = {}) {
2064
- const n = s.join(
2014
+ function An(t, { log: n = !1 } = {}) {
2015
+ const i = s.join(
2065
2016
  t,
2066
2017
  "photos_senateurs",
2067
2018
  "senateurs.json"
2068
2019
  );
2069
- i && console.log(`Loading file: ${n}`);
2070
- const a = o.readFileSync(n, { encoding: "utf8" });
2071
- return JSON.parse(a);
2020
+ n && console.log(`Loading file: ${i}`);
2021
+ const o = r.readFileSync(i, { encoding: "utf8" });
2022
+ return JSON.parse(o);
2072
2023
  }
2073
- function Kt(t, i) {
2074
- const n = i.match(Ne);
2024
+ function Kt(t, n) {
2025
+ const i = n.match(Ne);
2075
2026
  B.notStrictEqual(
2076
- n,
2027
+ i,
2077
2028
  null,
2078
- `Unexpected structure for document UID: ${i}`
2029
+ `Unexpected structure for document UID: ${n}`
2079
2030
  );
2080
- const a = n.groups, p = s.join(
2031
+ const o = i.groups, p = s.join(
2081
2032
  t,
2082
- a.documentType ?? a.documentType2
2083
- ), f = s.join(p, a.chambre ?? a.chambre2), _ = s.join(
2033
+ o.documentType ?? o.documentType2
2034
+ ), f = s.join(p, o.chambre ?? o.chambre2), _ = s.join(
2084
2035
  f,
2085
- a.republique ?? a.republique2
2036
+ o.republique ?? o.republique2
2086
2037
  ), m = s.join(
2087
2038
  _,
2088
- a.legislature ?? a.legislature2
2089
- ), S = a.etat;
2039
+ o.legislature ?? o.legislature2
2040
+ ), S = o.etat;
2090
2041
  if (S === void 0)
2091
- return o.ensureDirSync(m), s.join(m, i);
2092
- const C = s.join(m, S);
2093
- let v = "000000" + (a.numero ?? a.numero2);
2094
- v = v.substring(v.length - 6);
2095
- const I = s.join(C, v.substring(0, 3));
2096
- return o.ensureDirSync(I), s.join(I, i);
2042
+ return r.ensureDirSync(m), s.join(m, n);
2043
+ const A = s.join(m, S);
2044
+ let C = "000000" + (o.numero ?? o.numero2);
2045
+ C = C.substring(C.length - 6);
2046
+ const I = s.join(A, C.substring(0, 3));
2047
+ return r.ensureDirSync(I), s.join(I, n);
2097
2048
  }
2098
- function Cn(t, i) {
2099
- return Ce(t, i, Ue);
2049
+ function vn(t, n) {
2050
+ return ve(t, n, Ue);
2100
2051
  }
2101
- function vn(t, i) {
2102
- const n = ze.exec(i);
2052
+ function Cn(t, n) {
2053
+ const i = ze.exec(n);
2103
2054
  B.notStrictEqual(
2104
- n,
2055
+ i,
2105
2056
  null,
2106
- `Unexpected structure for reunion UID: ${i}`
2057
+ `Unexpected structure for reunion UID: ${n}`
2107
2058
  );
2108
- const a = s.join(t, n[1]), p = s.join(a, n[2]), f = s.join(p, n[3]), _ = s.join(f, n[4]), m = s.join(_, n[5]);
2109
- let S = "000000000" + n[6];
2059
+ const o = s.join(t, i[1]), p = s.join(o, i[2]), f = s.join(p, i[3]), _ = s.join(f, i[4]), m = s.join(_, i[5]);
2060
+ let S = "000000000" + i[6];
2110
2061
  S = S.substring(S.length - 9);
2111
- const C = s.join(m, S.substring(0, 3)), v = s.join(C, S.substring(3, 3));
2112
- return o.ensureDirSync(v), s.join(v, i);
2062
+ const A = s.join(m, S.substring(0, 3)), C = s.join(A, S.substring(3, 3));
2063
+ return r.ensureDirSync(C), s.join(C, n);
2113
2064
  }
2114
- function In(t, i) {
2115
- const n = ke.exec(i);
2065
+ function In(t, n) {
2066
+ const i = ke.exec(n);
2116
2067
  B.notStrictEqual(
2117
- n,
2068
+ i,
2118
2069
  null,
2119
- `Unexpected structure for scrutin UID: ${i}`
2070
+ `Unexpected structure for scrutin UID: ${n}`
2120
2071
  );
2121
- const a = s.join(t, n[1]), p = s.join(a, n[2]), f = s.join(p, n[3]);
2122
- let _ = "000000" + n[4];
2072
+ const o = s.join(t, i[1]), p = s.join(o, i[2]), f = s.join(p, i[3]);
2073
+ let _ = "000000" + i[4];
2123
2074
  _ = _.substring(_.length - 6);
2124
2075
  const m = s.join(f, _.substring(0, 3));
2125
- return o.ensureDirSync(m), s.join(m, i);
2076
+ return r.ensureDirSync(m), s.join(m, n);
2126
2077
  }
2127
- function Vn(t, i) {
2128
- return Ce(t, i, Je);
2078
+ function Fn(t, n) {
2079
+ return ve(t, n, Je);
2129
2080
  }
2130
- function Fn(t, i) {
2131
- const n = Te.exec(i);
2081
+ function Vn(t, n) {
2082
+ const i = Te.exec(n);
2132
2083
  B.notStrictEqual(
2133
- n,
2084
+ i,
2134
2085
  null,
2135
- `Unexpected structure for object with UID: ${i}`
2086
+ `Unexpected structure for object with UID: ${n}`
2136
2087
  );
2137
- const a = s.join(t, n[2]), p = s.join(a, n[3]), f = s.join(p, n[4]), _ = s.join(f, n[5]);
2138
- let m = "000000000" + n[7];
2088
+ const o = s.join(t, i[2]), p = s.join(o, i[3]), f = s.join(p, i[4]), _ = s.join(f, i[5]);
2089
+ let m = "000000000" + i[7];
2139
2090
  m = m.substring(m.length - 9);
2140
- const S = s.join(_, m.substring(0, 3)), C = s.join(S, m.substring(3, 3));
2141
- return o.ensureDirSync(C), s.join(C, i);
2091
+ const S = s.join(_, m.substring(0, 3)), A = s.join(S, m.substring(3, 3));
2092
+ return r.ensureDirSync(A), s.join(A, n);
2142
2093
  }
2143
- function Ce(t, i, n) {
2144
- const a = n.exec(i);
2094
+ function ve(t, n, i) {
2095
+ const o = i.exec(n);
2145
2096
  B.notStrictEqual(
2146
- a,
2097
+ o,
2147
2098
  null,
2148
- `Unexpected structure for object with UID: ${i}`
2099
+ `Unexpected structure for object with UID: ${n}`
2149
2100
  );
2150
- const p = s.join(t, a[1]), f = s.join(p, a[2]);
2151
- let _ = "000000" + a[3];
2101
+ const p = s.join(t, o[1]), f = s.join(p, o[2]);
2102
+ let _ = "000000" + o[3];
2152
2103
  _ = _.substring(_.length - 6);
2153
2104
  const m = s.join(f, _.substring(0, 3));
2154
- return o.ensureDirSync(m), s.join(m, i);
2105
+ return r.ensureDirSync(m), s.join(m, n);
2155
2106
  }
2156
- async function b(t, i) {
2157
- const n = s.join(i, t.filename);
2158
- await o.pathExists(n) && await o.remove(n), await o.pathExists(s.join(i, `${t.filename}.temp`, "json")) ? await o.move(
2159
- s.join(i, `${t.filename}.temp`, "json"),
2160
- n
2161
- ) : await o.mkdir(n);
2107
+ async function b(t, n) {
2108
+ const i = s.join(n, t.filename);
2109
+ await r.pathExists(i) && await r.remove(i), await r.pathExists(s.join(n, `${t.filename}.temp`, "json")) ? await r.move(
2110
+ s.join(n, `${t.filename}.temp`, "json"),
2111
+ i
2112
+ ) : await r.mkdir(i);
2162
2113
  }
2163
2114
  export {
2164
- V as EnabledDatasets,
2165
- A as datasets,
2115
+ F as EnabledDatasets,
2116
+ v as datasets,
2166
2117
  cn as iterLoadAssembleeActeurs,
2167
2118
  mn as iterLoadAssembleeAmendements,
2168
2119
  hn as iterLoadAssembleeComptesRendus,
@@ -2177,11 +2128,11 @@ export {
2177
2128
  bn as loadAssembleeDocumentFile,
2178
2129
  yn as loadAssembleePhotosDeputes,
2179
2130
  An as loadAssembleePhotosSenateurs,
2180
- Fn as pathFromCompteRenduUid,
2131
+ Vn as pathFromCompteRenduUid,
2181
2132
  Kt as pathFromDocumentUid,
2182
- Cn as pathFromDossierParlementaireUid,
2183
- Vn as pathFromQuestionUid,
2184
- vn as pathFromReunionUid,
2133
+ vn as pathFromDossierParlementaireUid,
2134
+ Fn as pathFromQuestionUid,
2135
+ Cn as pathFromReunionUid,
2185
2136
  In as pathFromScrutinUid,
2186
- L as walkDir
2137
+ R as walkDir
2187
2138
  };