@tricoteuses/assemblee 2.4.0 → 2.4.2

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/loaders.js CHANGED
@@ -2,16 +2,15 @@ import Q from "node:assert";
2
2
  import i from "fs-extra";
3
3
  import n from "node:path";
4
4
  import "node:crypto";
5
- import { L as a, X as U, Y as M, Z as q, _ as Z, $ as B, a0 as N } from "./scrutins-DhX6h3KY.js";
6
- import "glob";
7
- import { C as J } from "./amendements-40Z7OJLT.js";
8
- import "node:fs/promises";
9
- var F = /* @__PURE__ */ ((s) => (s[s.None = 0] = "None", s[s.ActeursEtOrganes = 1] = "ActeursEtOrganes", s[s.Agendas = 2] = "Agendas", s[s.Amendements = 4] = "Amendements", s[s.DossiersLegislatifs = 8] = "DossiersLegislatifs", s[s.Photos = 16] = "Photos", s[s.Scrutins = 32] = "Scrutins", s[s.Questions = 64] = "Questions", s[s.ComptesRendusSeances = 128] = "ComptesRendusSeances", s[s.All = 255] = "All", s))(F || {});
5
+ import { L as a, a1 as R, a2 as Z, a3 as q, a4 as B, a5 as J, a6 as N, Y as H, $ as Y, a0 as G, X as K, Z as ee, _ as te } from "./uids-DaRrTkI-.js";
6
+ import { w as L } from "./file_systems-CzTtoLWb.js";
7
+ import { C as w } from "./amendements-40Z7OJLT.js";
8
+ var v = /* @__PURE__ */ ((s) => (s[s.None = 0] = "None", s[s.ActeursEtOrganes = 1] = "ActeursEtOrganes", s[s.Agendas = 2] = "Agendas", s[s.Amendements = 4] = "Amendements", s[s.DossiersLegislatifs = 8] = "DossiersLegislatifs", s[s.Photos = 16] = "Photos", s[s.Scrutins = 32] = "Scrutins", s[s.Questions = 64] = "Questions", s[s.ComptesRendusSeances = 128] = "ComptesRendusSeances", s[s.All = 255] = "All", s))(v || {});
10
9
  function y(s, t) {
11
10
  const e = n.join(t, s.filename);
12
11
  i.existsSync(e) && i.removeSync(e), i.existsSync(n.join(t, "json")) ? i.moveSync(n.join(t, "json"), e) : i.mkdirSync(e);
13
12
  }
14
- const h = {
13
+ const S = {
15
14
  acteursEtOrganes: [
16
15
  {
17
16
  // AMO10 (XVII)
@@ -689,738 +688,755 @@ const h = {
689
688
  url: "https://data.assemblee-nationale.fr/static/openData/repository/16/vp/syceronbrut/syseron.xml.zip"
690
689
  }
691
690
  ]
692
- };
693
- function* L(s, t = []) {
694
- const e = n.join(s, ...t);
695
- if (i.existsSync(e))
696
- for (const o of i.readdirSync(e)) {
697
- if (o[0] === ".")
698
- continue;
699
- const d = n.join(e, o), g = [...t, o];
700
- i.statSync(d).isDirectory() ? yield* L(s, g) : yield g;
701
- }
702
- }
703
- function k(s) {
704
- const t = [
705
- "",
706
- "I",
707
- "II",
708
- "III",
709
- "IV",
710
- "V",
711
- "VI",
712
- "VII",
713
- "VIII",
714
- "IX",
715
- "X",
716
- "XI",
717
- "XII",
718
- "XIII",
719
- "XIV",
720
- "XV",
721
- "XVI",
722
- "XVII"
723
- ];
724
- if (s < 1 || s >= t.length) throw new Error("Invalid legislature");
725
- return t[s];
691
+ }, W = [
692
+ 1e3,
693
+ "M",
694
+ 900,
695
+ "CM",
696
+ 500,
697
+ "D",
698
+ 400,
699
+ "CD",
700
+ 100,
701
+ "C",
702
+ 90,
703
+ "XC",
704
+ 50,
705
+ "L",
706
+ 40,
707
+ "XL",
708
+ 10,
709
+ "X",
710
+ 9,
711
+ "IX",
712
+ 5,
713
+ "V",
714
+ 4,
715
+ "IV",
716
+ 1,
717
+ "I"
718
+ ];
719
+ function se(s) {
720
+ if (s < 0)
721
+ return;
722
+ if (s === 0)
723
+ return "0I";
724
+ let t = "";
725
+ for (let e = 0; e < W.length; e += 2)
726
+ for (; s >= W[e]; )
727
+ t += W[e + 1], s -= W[e];
728
+ return t;
726
729
  }
727
- const G = /^((?<documentType>ACIN|ALCN|AVCE|AVIS|DECL|ETDI|LETT|MESS|MION|PION|PNRE|PRJL|RAPP|RINF|RION)(?<chambre>AN|CG|SN)(?<republique>R\d+)[LS](?<legislature>\d+)(?<etat>B|BTA|BTC|TAP)(?<numero>\d+)(-.*)?)|((?<documentType2>MION)(?<chambre2>AN|SN)(?<republique2>R\d+)[LS](?<legislature2>\d+)-N(?<numero2>\d+))$/, H = /^DL(R\d+)(L\d+)N(\d+)$/, Y = /^RU(AN|CG|SN)(R\d+)(L\d+)([AS]\d{4})(IDC|IDFL?|IDS)(\d+)$/, K = /^VT(AN|CG)(R\d+)(L\d+)V(\d+)$/, ee = /^CR(S|C)(AN|CG)(R\d+)(L\d+)(S\d+)((?:O|E|D|PO)\d+)(N\d+)$/, te = /^QAN(R\d+)(L\d+)Q(E|G|OSD)(\d+)$/;
728
- function* x(s, t, e, o, d, g = "json", { noValidation: _ = !1, log: p = !1 } = {}) {
730
+ function* P(s, t, e, r, d, f = "json", { noValidation: _ = !1, log: g = !1 } = {}) {
729
731
  const j = /* @__PURE__ */ new Set();
730
732
  for (const A of e) {
731
- if (A.ignoreForWeb || !se(t, A))
733
+ if (A.ignoreForWeb || !ne(t, A))
732
734
  continue;
733
- const I = new RegExp(`\\.${g}$`), v = n.join(
735
+ const F = new RegExp(`\\.${f}$`), I = n.join(
734
736
  s,
735
- A.filename.replace(I, "_nettoye")
737
+ A.filename.replace(F, "_nettoye")
736
738
  );
737
- for (const b of L(v, d)) {
738
- if (!b[b.length - 1].endsWith(".json"))
739
+ for (const D of L(I, d)) {
740
+ if (!D[D.length - 1].endsWith(".json"))
739
741
  continue;
740
- const $ = n.join(v, ...b);
741
- p && console.log(`Loading file: ${$}…`);
742
- let D = i.readFileSync($, { encoding: "utf8" });
743
- const X = _ ? JSON.parse(D) : o(D);
744
- j.has(X.uid) || (j.add(X.uid), yield { item: X, datasetLegislature: A.legislature }, D = null);
742
+ const x = n.join(I, ...D);
743
+ g && console.log(`Loading file: ${x}…`);
744
+ let X = i.readFileSync(x, { encoding: "utf8" });
745
+ const V = _ ? JSON.parse(X) : r(X);
746
+ j.has(V.uid) || (j.add(V.uid), yield {
747
+ datasetLegislature: A.legislature,
748
+ filePath: x,
749
+ item: V
750
+ }, X = null);
745
751
  }
746
752
  }
747
753
  j.clear();
748
754
  }
749
- function se(s, t) {
755
+ function ne(s, t) {
750
756
  const e = Array.isArray(s) ? s : s !== void 0 ? [s] : [];
751
757
  return s === void 0 || e.includes(0) || t.legislature === a.All ? !0 : e.includes(t.legislature);
752
758
  }
753
759
  function* me(s, t, e = {}) {
754
760
  for (const {
755
- item: o,
756
- datasetLegislature: d
757
- } of x(
761
+ datasetLegislature: r,
762
+ item: d,
763
+ filePath: f
764
+ } of P(
758
765
  s,
759
766
  t,
760
- h.acteursEtOrganes,
761
- U.toActeur,
767
+ S.acteursEtOrganes,
768
+ R.toActeur,
762
769
  ["acteurs"],
763
770
  "json",
764
771
  e
765
772
  ))
766
- yield { acteur: o, datasetLegislature: d };
773
+ yield { acteur: d, datasetLegislature: r, filePath: f };
767
774
  }
768
775
  function* fe(s, t, e = {}) {
769
776
  for (const {
770
- item: o,
771
- datasetLegislature: d
772
- } of x(
777
+ item: r,
778
+ datasetLegislature: d,
779
+ filePath: f
780
+ } of P(
773
781
  s,
774
782
  t,
775
- h.acteursEtOrganes,
776
- U.toOrgane,
783
+ S.acteursEtOrganes,
784
+ R.toOrgane,
777
785
  ["organes"],
778
786
  "json",
779
787
  e
780
788
  ))
781
- yield { organe: o, datasetLegislature: d };
789
+ yield { organe: r, datasetLegislature: d, filePath: f };
782
790
  }
783
791
  function* pe(s, t, e = {}) {
784
792
  for (const {
785
- item: o,
786
- datasetLegislature: d
787
- } of x(
793
+ datasetLegislature: r,
794
+ item: d,
795
+ filePath: f
796
+ } of P(
788
797
  s,
789
798
  t,
790
- h.amendements,
791
- J.toAmendement,
799
+ S.amendements,
800
+ w.toAmendement,
792
801
  [],
793
802
  "json",
794
803
  e
795
804
  ))
796
- yield { amendement: o, datasetLegislature: d };
805
+ yield { amendement: d, datasetLegislature: r, filePath: f };
797
806
  }
798
807
  function* ge(s, t, e = {}) {
799
808
  for (const {
800
- item: o,
801
- datasetLegislature: d
802
- } of x(
809
+ item: r,
810
+ datasetLegislature: d,
811
+ filePath: f
812
+ } of P(
803
813
  s,
804
814
  t,
805
- h.dossiersLegislatifs,
815
+ S.dossiersLegislatifs,
806
816
  q.toDocument,
807
817
  ["documents"],
808
818
  "json",
809
819
  e
810
820
  ))
811
- yield { document: o, datasetLegislature: d };
821
+ yield { document: r, datasetLegislature: d, filePath: f };
812
822
  }
813
823
  function* _e(s, t, e = {}) {
814
824
  for (const {
815
- item: o,
816
- datasetLegislature: d
817
- } of x(
825
+ item: r,
826
+ datasetLegislature: d,
827
+ filePath: f
828
+ } of P(
818
829
  s,
819
830
  t,
820
- h.dossiersLegislatifs,
831
+ S.dossiersLegislatifs,
821
832
  q.toDossierParlementaire,
822
833
  ["dossiers"],
823
834
  "json",
824
835
  e
825
836
  ))
826
- yield { dossierParlementaire: o, datasetLegislature: d };
837
+ yield { dossierParlementaire: r, datasetLegislature: d, filePath: f };
827
838
  }
828
839
  function* je(s, t, e = {}) {
829
840
  for (const {
830
- item: o,
831
- datasetLegislature: d
832
- } of x(
841
+ item: r,
842
+ datasetLegislature: d,
843
+ filePath: f
844
+ } of P(
833
845
  s,
834
846
  t,
835
- h.agendas,
836
- M.toReunion,
847
+ S.agendas,
848
+ Z.toReunion,
837
849
  [],
838
850
  "json",
839
851
  e
840
852
  ))
841
- yield { reunion: o, datasetLegislature: d };
853
+ yield { reunion: r, datasetLegislature: d, filePath: f };
842
854
  }
843
855
  function* ye(s, t, e = {}) {
844
856
  for (const {
845
- item: o,
846
- datasetLegislature: d
847
- } of x(
857
+ item: r,
858
+ datasetLegislature: d,
859
+ filePath: f
860
+ } of P(
848
861
  s,
849
862
  t,
850
- h.scrutins,
851
- Z.toScrutin,
863
+ S.scrutins,
864
+ B.toScrutin,
852
865
  [],
853
866
  "json",
854
867
  e
855
868
  ))
856
- yield { scrutin: o, datasetLegislature: d };
869
+ yield { scrutin: r, datasetLegislature: d, filePath: f };
857
870
  }
858
- function* Se(s, t, e = {}) {
871
+ function* he(s, t, e = {}) {
859
872
  for (const {
860
- item: o,
861
- datasetLegislature: d
862
- } of x(
873
+ item: r,
874
+ datasetLegislature: d,
875
+ filePath: f
876
+ } of P(
863
877
  s,
864
878
  t,
865
- h.questions,
866
- B.toQuestion,
879
+ S.questions,
880
+ J.toQuestion,
867
881
  [],
868
882
  "json",
869
883
  e
870
884
  ))
871
- yield { question: o, datasetLegislature: d };
885
+ yield { question: r, datasetLegislature: d, filePath: f };
872
886
  }
873
- function* he(s, t, e = {}) {
887
+ function* Se(s, t, e = {}) {
874
888
  for (const {
875
- item: o,
876
- datasetLegislature: d
877
- } of x(
889
+ item: r,
890
+ datasetLegislature: d,
891
+ filePath: f
892
+ } of P(
878
893
  s,
879
894
  t,
880
- h.comptesRendusSeances,
895
+ S.comptesRendusSeances,
881
896
  N.toCompteRendu,
882
897
  [],
883
898
  "xml",
884
899
  e
885
900
  ))
886
- yield { compteRendu: o, datasetLegislature: d };
901
+ yield { compteRendu: r, datasetLegislature: d, filePath: f };
887
902
  }
888
903
  function* Ae(s, t) {
889
- const e = `Comptes_Rendus_Commissions_${k(t)}_nettoye`, o = n.join(s, e);
890
- if (i.existsSync(o))
891
- for (const d of E(o))
904
+ const e = `Comptes_Rendus_Commissions_${se(t)}_nettoye`, r = n.join(s, e);
905
+ if (i.existsSync(r))
906
+ for (const d of T(r))
892
907
  try {
893
- const g = i.readFileSync(d, "utf-8");
908
+ const f = i.readFileSync(d, "utf-8");
894
909
  yield {
895
- compteRendu: JSON.parse(g),
896
- datasetLegislature: t
910
+ compteRendu: JSON.parse(f),
911
+ datasetLegislature: t,
912
+ filePath: d
897
913
  };
898
- } catch (g) {
899
- console.warn(`Erreur lors de la lecture du fichier ${d} :`, g);
914
+ } catch (f) {
915
+ console.warn(`Erreur lors de la lecture du fichier ${d} :`, f);
900
916
  }
901
917
  }
902
- function* E(s) {
918
+ function* T(s) {
903
919
  if (i.existsSync(s))
904
920
  for (const t of i.readdirSync(s, { withFileTypes: !0 })) {
905
921
  const e = n.join(s, t.name);
906
- t.isDirectory() ? yield* E(e) : t.isFile() && e.endsWith(".json") && (yield e);
922
+ t.isDirectory() ? yield* T(e) : t.isFile() && e.endsWith(".json") && (yield e);
907
923
  }
908
924
  }
909
- function Ie(s, t, e, { log: o = !1 } = {}) {
910
- const d = {}, g = {};
911
- if (t & F.ActeursEtOrganes)
912
- for (const r of h.acteursEtOrganes) {
913
- if (r.ignoreForWeb || e !== a.All && r.legislature !== a.All && e !== r.legislature)
925
+ function Fe(s, t, e, { log: r = !1 } = {}) {
926
+ const d = {}, f = {};
927
+ if (t & v.ActeursEtOrganes)
928
+ for (const o of S.acteursEtOrganes) {
929
+ if (o.ignoreForWeb || e !== a.All && o.legislature !== a.All && e !== o.legislature)
914
930
  continue;
915
- const c = n.join(
931
+ const u = n.join(
916
932
  s,
917
- r.filename.replace(/\.json$/, "_nettoye")
933
+ o.filename.replace(/\.json$/, "_nettoye")
918
934
  );
919
- for (const u of L(c, ["acteurs"])) {
920
- if (!u[u.length - 1].endsWith(".json"))
935
+ for (const c of L(u, ["acteurs"])) {
936
+ if (!c[c.length - 1].endsWith(".json"))
921
937
  continue;
922
- const l = n.join(c, ...u);
923
- o && console.log(`Loading file: ${l}…`);
924
- const f = i.readFileSync(l, {
938
+ const l = n.join(u, ...c);
939
+ r && console.log(`Loading file: ${l}…`);
940
+ const p = i.readFileSync(l, {
925
941
  encoding: "utf8"
926
- }), m = U.toActeur(f);
942
+ }), m = R.toActeur(p);
927
943
  d[m.uid] === void 0 && (d[m.uid] = m);
928
944
  }
929
- for (const u of L(c, ["organes"])) {
930
- if (!u[u.length - 1].endsWith(".json"))
945
+ for (const c of L(u, ["organes"])) {
946
+ if (!c[c.length - 1].endsWith(".json"))
931
947
  continue;
932
- const l = n.join(c, ...u);
933
- o && console.log(`Loading file: ${l}…`);
934
- const f = i.readFileSync(l, {
948
+ const l = n.join(u, ...c);
949
+ r && console.log(`Loading file: ${l}…`);
950
+ const p = i.readFileSync(l, {
935
951
  encoding: "utf8"
936
- }), m = U.toOrgane(f);
937
- g[m.uid] === void 0 && (g[m.uid] = m);
952
+ }), m = R.toOrgane(p);
953
+ f[m.uid] === void 0 && (f[m.uid] = m);
938
954
  }
939
955
  }
940
- const _ = {}, p = {}, j = {};
941
- if (t & F.Agendas)
942
- for (const r of h.agendas) {
943
- if (r.ignoreForWeb || e !== a.All && r.legislature !== a.All && e !== r.legislature)
956
+ const _ = {}, g = {}, j = {};
957
+ if (t & v.Agendas)
958
+ for (const o of S.agendas) {
959
+ if (o.ignoreForWeb || e !== a.All && o.legislature !== a.All && e !== o.legislature)
944
960
  continue;
945
- const c = n.join(
961
+ const u = n.join(
946
962
  s,
947
- r.filename.replace(/\.json$/, "_nettoye")
963
+ o.filename.replace(/\.json$/, "_nettoye")
948
964
  );
949
- for (const u of L(c)) {
950
- if (!u[u.length - 1].endsWith(".json"))
965
+ for (const c of L(u)) {
966
+ if (!c[c.length - 1].endsWith(".json"))
951
967
  continue;
952
- const l = n.join(c, ...u);
953
- o && console.log(`Loading file: ${l}…`);
954
- const f = i.readFileSync(l, {
968
+ const l = n.join(u, ...c);
969
+ r && console.log(`Loading file: ${l}…`);
970
+ const p = i.readFileSync(l, {
955
971
  encoding: "utf8"
956
- }), m = M.toReunion(f);
972
+ }), m = Z.toReunion(p);
957
973
  _[m.uid] === void 0 && (_[m.uid] = m);
958
- const V = m.timestampDebut.toISOString().split("T")[0];
959
- let R = p[V];
960
- R === void 0 && (R = p[V] = []), R.push(m);
961
- const z = m.odj;
962
- if (z !== void 0)
963
- for (const C of z.pointsOdj || [])
964
- for (const T of C.dossiersLegislatifsRefs || []) {
965
- let W = j[T];
966
- W === void 0 && (W = j[T] = []), W.push(m);
974
+ const b = m.timestampDebut.toISOString().split("T")[0];
975
+ let $ = g[b];
976
+ $ === void 0 && ($ = g[b] = []), $.push(m);
977
+ const U = m.odj;
978
+ if (U !== void 0)
979
+ for (const C of U.pointsOdj || [])
980
+ for (const k of C.dossiersLegislatifsRefs || []) {
981
+ let M = j[k];
982
+ M === void 0 && (M = j[k] = []), M.push(m);
967
983
  }
968
984
  }
969
985
  }
970
986
  const A = {};
971
- if (t & F.Amendements)
972
- for (const r of h.amendements) {
973
- if (r.ignoreForWeb || e !== a.All && r.legislature !== a.All && e !== r.legislature)
987
+ if (t & v.Amendements)
988
+ for (const o of S.amendements) {
989
+ if (o.ignoreForWeb || e !== a.All && o.legislature !== a.All && e !== o.legislature)
974
990
  continue;
975
- const c = n.join(
991
+ const u = n.join(
976
992
  s,
977
- r.filename.replace(/\.json$/, "_nettoye")
993
+ o.filename.replace(/\.json$/, "_nettoye")
978
994
  );
979
- for (const u of L(c)) {
980
- if (!u[u.length - 1].endsWith(".json"))
995
+ for (const c of L(u)) {
996
+ if (!c[c.length - 1].endsWith(".json"))
981
997
  continue;
982
- const l = n.join(c, ...u);
983
- o && console.log(`Loading file: ${l}…`);
984
- const f = i.readFileSync(l, {
998
+ const l = n.join(u, ...c);
999
+ r && console.log(`Loading file: ${l}…`);
1000
+ const p = i.readFileSync(l, {
985
1001
  encoding: "utf8"
986
- }), m = J.toAmendement(f);
1002
+ }), m = w.toAmendement(p);
987
1003
  A[m.uid] === void 0 && (A[m.uid] = m);
988
1004
  }
989
1005
  }
990
- const I = {}, v = {}, b = {}, O = {};
991
- if (t & F.DossiersLegislatifs)
992
- for (const r of h.dossiersLegislatifs) {
993
- if (r.ignoreForWeb || e !== a.All && r.legislature !== a.All && e !== r.legislature)
1006
+ const F = {}, I = {}, D = {}, z = {};
1007
+ if (t & v.DossiersLegislatifs)
1008
+ for (const o of S.dossiersLegislatifs) {
1009
+ if (o.ignoreForWeb || e !== a.All && o.legislature !== a.All && e !== o.legislature)
994
1010
  continue;
995
- const c = n.join(
1011
+ const u = n.join(
996
1012
  s,
997
- r.filename.replace(/\.json$/, "_nettoye")
1013
+ o.filename.replace(/\.json$/, "_nettoye")
998
1014
  );
999
- for (const u of L(c, ["documents"])) {
1000
- if (!u[u.length - 1].endsWith(".json"))
1015
+ for (const c of L(u, ["documents"])) {
1016
+ if (!c[c.length - 1].endsWith(".json"))
1001
1017
  continue;
1002
- const l = n.join(c, ...u);
1003
- o && console.log(`Loading file: ${l}…`);
1004
- const f = i.readFileSync(l, {
1018
+ const l = n.join(u, ...c);
1019
+ r && console.log(`Loading file: ${l}…`);
1020
+ const p = i.readFileSync(l, {
1005
1021
  encoding: "utf8"
1006
- }), m = q.toDocument(f);
1007
- I[m.uid] === void 0 && (I[m.uid] = m);
1022
+ }), m = q.toDocument(p);
1023
+ F[m.uid] === void 0 && (F[m.uid] = m);
1008
1024
  }
1009
- for (const u of L(c, ["dossiers"])) {
1010
- if (!u[u.length - 1].endsWith(".json"))
1025
+ for (const c of L(u, ["dossiers"])) {
1026
+ if (!c[c.length - 1].endsWith(".json"))
1011
1027
  continue;
1012
- const l = n.join(c, ...u);
1013
- o && console.log(`Loading file: ${l}…`);
1014
- const f = i.readFileSync(l, {
1028
+ const l = n.join(u, ...c);
1029
+ r && console.log(`Loading file: ${l}…`);
1030
+ const p = i.readFileSync(l, {
1015
1031
  encoding: "utf8"
1016
- }), m = q.toDossierParlementaire(f), V = m.titreDossier;
1017
- V.senatChemin && v[V.senatChemin] === void 0 && (v[V.senatChemin] = m), V.titreChemin && b[V.titreChemin] === void 0 && (b[V.titreChemin] = m), O[m.uid] === void 0 && (O[m.uid] = m);
1032
+ }), m = q.toDossierParlementaire(p), b = m.titreDossier;
1033
+ b.senatChemin && I[b.senatChemin] === void 0 && (I[b.senatChemin] = m), b.titreChemin && D[b.titreChemin] === void 0 && (D[b.titreChemin] = m), z[m.uid] === void 0 && (z[m.uid] = m);
1018
1034
  }
1019
1035
  }
1020
- let $ = {};
1021
- if (t & F.Photos) {
1036
+ let x = {};
1037
+ if (t & v.Photos) {
1022
1038
  {
1023
- const r = n.join(
1039
+ const o = n.join(
1024
1040
  s,
1025
1041
  `photos_deputes_${// TODO: Handle Legislature.All.
1026
1042
  e === a.All ? a.DixSept : e}`,
1027
1043
  "deputes.json"
1028
1044
  );
1029
- if (i.existsSync(r)) {
1030
- o && console.log(`Loading file: ${r}`);
1031
- const c = i.readFileSync(r, { encoding: "utf8" });
1032
- Object.assign($, JSON.parse(c));
1033
- } else o && console.log(`Ignoring missing file: ${r}`);
1045
+ if (i.existsSync(o)) {
1046
+ r && console.log(`Loading file: ${o}`);
1047
+ const u = i.readFileSync(o, { encoding: "utf8" });
1048
+ Object.assign(x, JSON.parse(u));
1049
+ } else r && console.log(`Ignoring missing file: ${o}`);
1034
1050
  }
1035
1051
  {
1036
- const r = n.join(
1052
+ const o = n.join(
1037
1053
  s,
1038
1054
  "photos_senateurs",
1039
1055
  "senateurs.json"
1040
1056
  );
1041
- if (i.existsSync(r)) {
1042
- o && console.log(`Loading file: ${r}`);
1043
- const c = i.readFileSync(r, { encoding: "utf8" });
1044
- Object.assign($, JSON.parse(c));
1045
- } else o && console.log(`Ignoring missing file: ${r}`);
1057
+ if (i.existsSync(o)) {
1058
+ r && console.log(`Loading file: ${o}`);
1059
+ const u = i.readFileSync(o, { encoding: "utf8" });
1060
+ Object.assign(x, JSON.parse(u));
1061
+ } else r && console.log(`Ignoring missing file: ${o}`);
1046
1062
  }
1047
1063
  }
1048
- const D = {};
1049
- if (t & F.Scrutins)
1050
- for (const r of h.scrutins) {
1051
- if (r.ignoreForWeb || e !== a.All && r.legislature !== a.All && e !== r.legislature)
1064
+ const X = {};
1065
+ if (t & v.Scrutins)
1066
+ for (const o of S.scrutins) {
1067
+ if (o.ignoreForWeb || e !== a.All && o.legislature !== a.All && e !== o.legislature)
1052
1068
  continue;
1053
- const c = n.join(
1069
+ const u = n.join(
1054
1070
  s,
1055
- r.filename.replace(/\.json$/, "_nettoye")
1071
+ o.filename.replace(/\.json$/, "_nettoye")
1056
1072
  );
1057
- for (const u of L(c)) {
1058
- if (!u[u.length - 1].endsWith(".json"))
1073
+ for (const c of L(u)) {
1074
+ if (!c[c.length - 1].endsWith(".json"))
1059
1075
  continue;
1060
- const l = n.join(c, ...u);
1061
- o && console.log(`Loading file: ${l}…`);
1062
- const f = i.readFileSync(l, {
1076
+ const l = n.join(u, ...c);
1077
+ r && console.log(`Loading file: ${l}…`);
1078
+ const p = i.readFileSync(l, {
1063
1079
  encoding: "utf8"
1064
- }), m = Z.toScrutin(f);
1065
- D[m.uid] === void 0 && (D[m.uid] = m);
1080
+ }), m = B.toScrutin(p);
1081
+ X[m.uid] === void 0 && (X[m.uid] = m);
1066
1082
  }
1067
1083
  }
1068
- const X = {};
1069
- if (t & F.Questions)
1070
- for (const r of h.questions) {
1071
- if (r.ignoreForWeb || e !== a.All && r.legislature !== a.All && e !== r.legislature)
1084
+ const V = {};
1085
+ if (t & v.Questions)
1086
+ for (const o of S.questions) {
1087
+ if (o.ignoreForWeb || e !== a.All && o.legislature !== a.All && e !== o.legislature)
1072
1088
  continue;
1073
- const c = n.join(
1089
+ const u = n.join(
1074
1090
  s,
1075
- r.filename.replace(/\.json$/, "_nettoye")
1091
+ o.filename.replace(/\.json$/, "_nettoye")
1076
1092
  );
1077
- for (const u of L(c)) {
1078
- if (!u[u.length - 1].endsWith(".json"))
1093
+ for (const c of L(u)) {
1094
+ if (!c[c.length - 1].endsWith(".json"))
1079
1095
  continue;
1080
- const l = n.join(c, ...u);
1081
- o && console.log(`Loading file: ${l}…`);
1082
- const f = i.readFileSync(l, {
1096
+ const l = n.join(u, ...c);
1097
+ r && console.log(`Loading file: ${l}…`);
1098
+ const p = i.readFileSync(l, {
1083
1099
  encoding: "utf8"
1084
- }), m = B.toQuestion(f);
1085
- X[m.uid] === void 0 && (X[m.uid] = m);
1100
+ }), m = J.toQuestion(p);
1101
+ V[m.uid] === void 0 && (V[m.uid] = m);
1086
1102
  }
1087
1103
  }
1088
- const P = {};
1089
- if (t & F.ComptesRendusSeances)
1090
- for (const r of h.comptesRendusSeances) {
1091
- if (r.ignoreForWeb || e !== a.All && r.legislature !== a.All && e !== r.legislature)
1104
+ const O = {};
1105
+ if (t & v.ComptesRendusSeances)
1106
+ for (const o of S.comptesRendusSeances) {
1107
+ if (o.ignoreForWeb || e !== a.All && o.legislature !== a.All && e !== o.legislature)
1092
1108
  continue;
1093
- const c = n.join(
1109
+ const u = n.join(
1094
1110
  s,
1095
- r.filename.replace(/\.json$/, "_nettoye")
1111
+ o.filename.replace(/\.json$/, "_nettoye")
1096
1112
  );
1097
- for (const u of L(c)) {
1098
- if (!u[u.length - 1].endsWith(".json"))
1113
+ for (const c of L(u)) {
1114
+ if (!c[c.length - 1].endsWith(".json"))
1099
1115
  continue;
1100
- const l = n.join(c, ...u);
1101
- o && console.log(`Loading file: ${l}…`);
1102
- const f = i.readFileSync(l, {
1116
+ const l = n.join(u, ...c);
1117
+ r && console.log(`Loading file: ${l}…`);
1118
+ const p = i.readFileSync(l, {
1103
1119
  encoding: "utf8"
1104
- }), m = N.toCompteRendu(f);
1105
- P[m.uid] === void 0 && (P[m.uid] = m);
1120
+ }), m = N.toCompteRendu(p);
1121
+ O[m.uid] === void 0 && (O[m.uid] = m);
1106
1122
  }
1107
1123
  }
1108
1124
  return {
1109
1125
  acteurByUid: d,
1110
1126
  amendementByUid: A,
1111
- documentByUid: I,
1112
- dossierParlementaireBySenatChemin: v,
1113
- dossierParlementaireByTitreChemin: b,
1114
- dossierParlementaireByUid: O,
1115
- organeByUid: g,
1116
- photoByUid: $,
1127
+ documentByUid: F,
1128
+ dossierParlementaireBySenatChemin: I,
1129
+ dossierParlementaireByTitreChemin: D,
1130
+ dossierParlementaireByUid: z,
1131
+ organeByUid: f,
1132
+ photoByUid: x,
1117
1133
  reunionByUid: _,
1118
- reunionsByDay: p,
1134
+ reunionsByDay: g,
1119
1135
  reunionsByDossierUid: j,
1120
- scrutinByUid: D,
1121
- questionByUid: X,
1122
- compteRenduByUid: P
1136
+ scrutinByUid: X,
1137
+ questionByUid: V,
1138
+ compteRenduByUid: O
1123
1139
  };
1124
1140
  }
1125
- function Fe(s, t, e, { log: o = !1 } = {}) {
1126
- const d = {}, g = {};
1127
- if (t & F.ActeursEtOrganes)
1128
- for (const r of h.acteursEtOrganes) {
1129
- if (r.ignoreForWeb || e !== a.All && r.legislature !== a.All && e !== r.legislature)
1141
+ function ve(s, t, e, { log: r = !1 } = {}) {
1142
+ const d = {}, f = {};
1143
+ if (t & v.ActeursEtOrganes)
1144
+ for (const o of S.acteursEtOrganes) {
1145
+ if (o.ignoreForWeb || e !== a.All && o.legislature !== a.All && e !== o.legislature)
1130
1146
  continue;
1131
- const c = n.join(
1147
+ const u = n.join(
1132
1148
  s,
1133
- r.filename.replace(/\.json$/, "_nettoye.json")
1149
+ o.filename.replace(/\.json$/, "_nettoye.json")
1134
1150
  );
1135
- o && console.log(`Loading file: ${c}`);
1136
- const u = i.readFileSync(c, { encoding: "utf8" }), S = U.toActeursEtOrganes(u);
1137
- for (const l of S.acteurs)
1151
+ r && console.log(`Loading file: ${u}`);
1152
+ const c = i.readFileSync(u, { encoding: "utf8" }), h = R.toActeursEtOrganes(c);
1153
+ for (const l of h.acteurs)
1138
1154
  d[l.uid] === void 0 && (d[l.uid] = l);
1139
- for (const l of S.organes)
1140
- g[l.uid] === void 0 && (g[l.uid] = l);
1155
+ for (const l of h.organes)
1156
+ f[l.uid] === void 0 && (f[l.uid] = l);
1141
1157
  }
1142
- const _ = {}, p = {}, j = {};
1143
- if (t & F.Agendas)
1144
- for (const r of h.agendas) {
1145
- if (r.ignoreForWeb || e !== a.All && r.legislature !== a.All && e !== r.legislature)
1158
+ const _ = {}, g = {}, j = {};
1159
+ if (t & v.Agendas)
1160
+ for (const o of S.agendas) {
1161
+ if (o.ignoreForWeb || e !== a.All && o.legislature !== a.All && e !== o.legislature)
1146
1162
  continue;
1147
- const c = n.join(
1163
+ const u = n.join(
1148
1164
  s,
1149
- r.filename.replace(/\.json$/, "_nettoye.json")
1165
+ o.filename.replace(/\.json$/, "_nettoye.json")
1150
1166
  );
1151
- o && console.log(`Loading file: ${c}`);
1152
- const u = i.readFileSync(c, { encoding: "utf8" }), S = M.toAgendas(u);
1153
- for (const l of S.reunions) {
1167
+ r && console.log(`Loading file: ${u}`);
1168
+ const c = i.readFileSync(u, { encoding: "utf8" }), h = Z.toAgendas(c);
1169
+ for (const l of h.reunions) {
1154
1170
  _[l.uid] === void 0 && (_[l.uid] = l);
1155
- const f = l.timestampDebut.toISOString().split("T")[0];
1156
- let m = p[f];
1157
- m === void 0 && (m = p[f] = []), m.push(l);
1158
- const V = l.odj;
1159
- if (V !== void 0)
1160
- for (const R of V.pointsOdj || [])
1161
- for (const z of R.dossiersLegislatifsRefs || []) {
1162
- let C = j[z];
1163
- C === void 0 && (C = j[z] = []), C.push(l);
1171
+ const p = l.timestampDebut.toISOString().split("T")[0];
1172
+ let m = g[p];
1173
+ m === void 0 && (m = g[p] = []), m.push(l);
1174
+ const b = l.odj;
1175
+ if (b !== void 0)
1176
+ for (const $ of b.pointsOdj || [])
1177
+ for (const U of $.dossiersLegislatifsRefs || []) {
1178
+ let C = j[U];
1179
+ C === void 0 && (C = j[U] = []), C.push(l);
1164
1180
  }
1165
1181
  }
1166
1182
  }
1167
1183
  const A = {};
1168
- if (t & F.Amendements)
1169
- for (const r of h.amendements) {
1170
- if (r.ignoreForWeb || e !== a.All && r.legislature !== a.All && e !== r.legislature)
1184
+ if (t & v.Amendements)
1185
+ for (const o of S.amendements) {
1186
+ if (o.ignoreForWeb || e !== a.All && o.legislature !== a.All && e !== o.legislature)
1171
1187
  continue;
1172
- const c = n.join(
1188
+ const u = n.join(
1173
1189
  s,
1174
- r.filename.replace(/\.json$/, "_nettoye.json")
1190
+ o.filename.replace(/\.json$/, "_nettoye.json")
1175
1191
  );
1176
- o && console.log(`Loading file: ${c}`);
1177
- const u = i.readFileSync(c, { encoding: "utf8" }), S = J.toAmendements(u);
1178
- for (const l of S.textesLegislatifs)
1179
- for (const f of l.amendements)
1180
- A[f.uid] === void 0 && (A[f.uid] = f);
1192
+ r && console.log(`Loading file: ${u}`);
1193
+ const c = i.readFileSync(u, { encoding: "utf8" }), h = w.toAmendements(c);
1194
+ for (const l of h.textesLegislatifs)
1195
+ for (const p of l.amendements)
1196
+ A[p.uid] === void 0 && (A[p.uid] = p);
1181
1197
  }
1182
- const I = {}, v = {}, b = {}, O = {};
1183
- if (t & F.DossiersLegislatifs)
1184
- for (const r of h.dossiersLegislatifs) {
1185
- if (r.ignoreForWeb || e !== a.All && r.legislature !== a.All && e !== r.legislature)
1198
+ const F = {}, I = {}, D = {}, z = {};
1199
+ if (t & v.DossiersLegislatifs)
1200
+ for (const o of S.dossiersLegislatifs) {
1201
+ if (o.ignoreForWeb || e !== a.All && o.legislature !== a.All && e !== o.legislature)
1186
1202
  continue;
1187
- const c = n.join(
1203
+ const u = n.join(
1188
1204
  s,
1189
- r.filename.replace(/\.json$/, "_nettoye.json")
1205
+ o.filename.replace(/\.json$/, "_nettoye.json")
1190
1206
  );
1191
- o && console.log(`Loading file: ${c}`);
1192
- const u = i.readFileSync(c, { encoding: "utf8" }), S = q.toDossiersLegislatifs(u);
1193
- for (const l of S.textesLegislatifs)
1194
- I[l.uid] === void 0 && (I[l.uid] = l);
1195
- for (const l of S.dossiersParlementaires) {
1196
- const f = l.titreDossier;
1197
- f.senatChemin && v[f.senatChemin] === void 0 && (v[f.senatChemin] = l), f.titreChemin && b[f.titreChemin] === void 0 && (b[f.titreChemin] = l), O[l.uid] === void 0 && (O[l.uid] = l);
1207
+ r && console.log(`Loading file: ${u}`);
1208
+ const c = i.readFileSync(u, { encoding: "utf8" }), h = q.toDossiersLegislatifs(c);
1209
+ for (const l of h.textesLegislatifs)
1210
+ F[l.uid] === void 0 && (F[l.uid] = l);
1211
+ for (const l of h.dossiersParlementaires) {
1212
+ const p = l.titreDossier;
1213
+ p.senatChemin && I[p.senatChemin] === void 0 && (I[p.senatChemin] = l), p.titreChemin && D[p.titreChemin] === void 0 && (D[p.titreChemin] = l), z[l.uid] === void 0 && (z[l.uid] = l);
1198
1214
  }
1199
1215
  }
1200
- const $ = {};
1201
- if (t & F.Photos) {
1202
- const r = {};
1216
+ const x = {};
1217
+ if (t & v.Photos) {
1218
+ const o = {};
1203
1219
  {
1204
- const c = n.join(
1220
+ const u = n.join(
1205
1221
  s,
1206
1222
  `photos_deputes_${// TODO: Handle Legislature.All.
1207
1223
  e === a.All ? a.DixSept : e}`,
1208
1224
  "deputes.json"
1209
1225
  );
1210
- if (i.existsSync(c)) {
1211
- o && console.log(`Loading file: ${c}`);
1212
- const u = i.readFileSync(c, { encoding: "utf8" });
1213
- Object.assign(r, JSON.parse(u));
1214
- } else o && console.log(`Ignoring missing file: ${c}`);
1226
+ if (i.existsSync(u)) {
1227
+ r && console.log(`Loading file: ${u}`);
1228
+ const c = i.readFileSync(u, { encoding: "utf8" });
1229
+ Object.assign(o, JSON.parse(c));
1230
+ } else r && console.log(`Ignoring missing file: ${u}`);
1215
1231
  }
1216
1232
  {
1217
- const c = n.join(
1233
+ const u = n.join(
1218
1234
  s,
1219
1235
  "photos_senateurs",
1220
1236
  "senateurs.json"
1221
1237
  );
1222
- if (i.existsSync(c)) {
1223
- o && console.log(`Loading file: ${c}`);
1224
- const u = i.readFileSync(c, { encoding: "utf8" });
1225
- Object.assign(r, JSON.parse(u));
1226
- } else o && console.log(`Ignoring missing file: ${c}`);
1238
+ if (i.existsSync(u)) {
1239
+ r && console.log(`Loading file: ${u}`);
1240
+ const c = i.readFileSync(u, { encoding: "utf8" });
1241
+ Object.assign(o, JSON.parse(c));
1242
+ } else r && console.log(`Ignoring missing file: ${u}`);
1227
1243
  }
1228
1244
  }
1229
- const D = {};
1230
- if (t & F.Scrutins)
1231
- for (const r of h.scrutins) {
1232
- if (r.ignoreForWeb || e !== a.All && r.legislature !== a.All && e !== r.legislature)
1245
+ const X = {};
1246
+ if (t & v.Scrutins)
1247
+ for (const o of S.scrutins) {
1248
+ if (o.ignoreForWeb || e !== a.All && o.legislature !== a.All && e !== o.legislature)
1233
1249
  continue;
1234
- const c = n.join(
1250
+ const u = n.join(
1235
1251
  s,
1236
- r.filename.replace(/\.json$/, "_nettoye.json")
1252
+ o.filename.replace(/\.json$/, "_nettoye.json")
1237
1253
  );
1238
- o && console.log(`Loading file: ${c}`);
1239
- const u = i.readFileSync(c, { encoding: "utf8" }), S = Z.toScrutins(u);
1240
- for (const l of S.scrutins)
1241
- D[l.uid] === void 0 && (D[l.uid] = l);
1254
+ r && console.log(`Loading file: ${u}`);
1255
+ const c = i.readFileSync(u, { encoding: "utf8" }), h = B.toScrutins(c);
1256
+ for (const l of h.scrutins)
1257
+ X[l.uid] === void 0 && (X[l.uid] = l);
1242
1258
  }
1243
- const X = {};
1244
- if (t & F.Questions)
1245
- for (const r of h.questions) {
1246
- if (r.ignoreForWeb || e !== a.All && r.legislature !== a.All && e !== r.legislature)
1259
+ const V = {};
1260
+ if (t & v.Questions)
1261
+ for (const o of S.questions) {
1262
+ if (o.ignoreForWeb || e !== a.All && o.legislature !== a.All && e !== o.legislature)
1247
1263
  continue;
1248
- const c = n.join(
1264
+ const u = n.join(
1249
1265
  s,
1250
- r.filename.replace(/\.json$/, "_nettoye.json")
1266
+ o.filename.replace(/\.json$/, "_nettoye.json")
1251
1267
  );
1252
- o && console.log(`Loading file: ${c}`);
1253
- const u = i.readFileSync(c, { encoding: "utf8" }), S = B.toQuestions(u);
1254
- for (const l of S.questions)
1255
- X[l.uid] === void 0 && (X[l.uid] = l);
1268
+ r && console.log(`Loading file: ${u}`);
1269
+ const c = i.readFileSync(u, { encoding: "utf8" }), h = J.toQuestions(c);
1270
+ for (const l of h.questions)
1271
+ V[l.uid] === void 0 && (V[l.uid] = l);
1256
1272
  }
1257
- const P = {};
1258
- if (t & F.ComptesRendusSeances)
1259
- for (const r of h.comptesRendusSeances) {
1260
- if (r.ignoreForWeb || e !== a.All && r.legislature !== a.All && e !== r.legislature)
1273
+ const O = {};
1274
+ if (t & v.ComptesRendusSeances)
1275
+ for (const o of S.comptesRendusSeances) {
1276
+ if (o.ignoreForWeb || e !== a.All && o.legislature !== a.All && e !== o.legislature)
1261
1277
  continue;
1262
- const c = n.join(
1278
+ const u = n.join(
1263
1279
  s,
1264
- r.filename.replace(/\.json$/, "_nettoye.json")
1280
+ o.filename.replace(/\.json$/, "_nettoye.json")
1265
1281
  );
1266
- o && console.log(`Loading file: ${c}`);
1267
- const u = i.readFileSync(c, { encoding: "utf8" }), S = N.toComptesRendus(u);
1268
- for (const l of S.comptesRendus)
1269
- P[l.uid] === void 0 && (P[l.uid] = l);
1282
+ r && console.log(`Loading file: ${u}`);
1283
+ const c = i.readFileSync(u, { encoding: "utf8" }), h = N.toComptesRendus(c);
1284
+ for (const l of h.comptesRendus)
1285
+ O[l.uid] === void 0 && (O[l.uid] = l);
1270
1286
  }
1271
1287
  return {
1272
1288
  acteurByUid: d,
1273
1289
  amendementByUid: A,
1274
- documentByUid: I,
1275
- dossierParlementaireBySenatChemin: v,
1276
- dossierParlementaireByTitreChemin: b,
1277
- dossierParlementaireByUid: O,
1278
- organeByUid: g,
1279
- photoByUid: $,
1290
+ documentByUid: F,
1291
+ dossierParlementaireBySenatChemin: I,
1292
+ dossierParlementaireByTitreChemin: D,
1293
+ dossierParlementaireByUid: z,
1294
+ organeByUid: f,
1295
+ photoByUid: x,
1280
1296
  reunionByUid: _,
1281
- reunionsByDay: p,
1297
+ reunionsByDay: g,
1282
1298
  reunionsByDossierUid: j,
1283
- scrutinByUid: D,
1284
- questionByUid: X,
1285
- compteRenduByUid: P
1299
+ scrutinByUid: X,
1300
+ questionByUid: V,
1301
+ compteRenduByUid: O
1286
1302
  };
1287
1303
  }
1288
- function ve(s, t, e) {
1289
- const o = n.join(s, "Documents"), d = ne(o, t), g = n.join(d, "index.json");
1290
- if (!i.pathExistsSync(g))
1304
+ function Ie(s, t, e) {
1305
+ const r = n.join(s, "Documents"), d = ie(r, t), f = n.join(d, "index.json");
1306
+ if (!i.pathExistsSync(f))
1291
1307
  return;
1292
- const _ = i.readJsonSync(g);
1293
- for (const p of e)
1294
- for (const { filename: j, url: A } of _[p] ?? [])
1308
+ const _ = i.readJsonSync(f);
1309
+ for (const g of e)
1310
+ for (const { filename: j, url: A } of _[g] ?? [])
1295
1311
  if (j !== void 0)
1296
- return { format: p, path: n.join(d, j), url: A };
1312
+ return { format: g, path: n.join(d, j), url: A };
1297
1313
  }
1298
- function Ve(s, t, { log: e = !1 } = {}) {
1299
- const o = n.join(
1314
+ function be(s, t, { log: e = !1 } = {}) {
1315
+ const r = n.join(
1300
1316
  s,
1301
1317
  `photos_deputes_${// TODO: Handle Legislature.All.
1302
1318
  t === a.All ? a.DixSept : t}`,
1303
1319
  "deputes.json"
1304
1320
  );
1305
- e && console.log(`Loading file: ${o}`);
1306
- const d = i.readFileSync(o, { encoding: "utf8" });
1321
+ e && console.log(`Loading file: ${r}`);
1322
+ const d = i.readFileSync(r, { encoding: "utf8" });
1307
1323
  return JSON.parse(d);
1308
1324
  }
1309
- function be(s, { log: t = !1 } = {}) {
1325
+ function De(s, { log: t = !1 } = {}) {
1310
1326
  const e = n.join(
1311
1327
  s,
1312
1328
  "photos_senateurs",
1313
1329
  "senateurs.json"
1314
1330
  );
1315
1331
  t && console.log(`Loading file: ${e}`);
1316
- const o = i.readFileSync(e, { encoding: "utf8" });
1317
- return JSON.parse(o);
1332
+ const r = i.readFileSync(e, { encoding: "utf8" });
1333
+ return JSON.parse(r);
1318
1334
  }
1319
- function ne(s, t) {
1320
- const e = t.match(G);
1335
+ function ie(s, t) {
1336
+ const e = t.match(H);
1321
1337
  Q.notStrictEqual(
1322
1338
  e,
1323
1339
  null,
1324
1340
  `Unexpected structure for document UID: ${t}`
1325
1341
  );
1326
- const o = e.groups, d = n.join(
1342
+ const r = e.groups, d = n.join(
1327
1343
  s,
1328
- o.documentType ?? o.documentType2
1329
- ), g = n.join(d, o.chambre ?? o.chambre2), _ = n.join(
1330
- g,
1331
- o.republique ?? o.republique2
1332
- ), p = n.join(
1344
+ r.documentType ?? r.documentType2
1345
+ ), f = n.join(d, r.chambre ?? r.chambre2), _ = n.join(
1346
+ f,
1347
+ r.republique ?? r.republique2
1348
+ ), g = n.join(
1333
1349
  _,
1334
- o.legislature ?? o.legislature2
1335
- ), j = o.etat;
1350
+ r.legislature ?? r.legislature2
1351
+ ), j = r.etat;
1336
1352
  if (j === void 0)
1337
- return i.ensureDirSync(p), n.join(p, t);
1338
- const A = n.join(p, j);
1339
- let I = "000000" + (o.numero ?? o.numero2);
1340
- I = I.substring(I.length - 6);
1341
- const v = n.join(A, I.substring(0, 3));
1342
- return i.ensureDirSync(v), n.join(v, t);
1343
- }
1344
- function De(s, t) {
1345
- return w(s, t, H);
1353
+ return i.ensureDirSync(g), n.join(g, t);
1354
+ const A = n.join(g, j);
1355
+ let F = "000000" + (r.numero ?? r.numero2);
1356
+ F = F.substring(F.length - 6);
1357
+ const I = n.join(A, F.substring(0, 3));
1358
+ return i.ensureDirSync(I), n.join(I, t);
1346
1359
  }
1347
1360
  function Xe(s, t) {
1361
+ return E(s, t, ee);
1362
+ }
1363
+ function Ve(s, t) {
1348
1364
  const e = Y.exec(t);
1349
1365
  Q.notStrictEqual(
1350
1366
  e,
1351
1367
  null,
1352
1368
  `Unexpected structure for reunion UID: ${t}`
1353
1369
  );
1354
- const o = n.join(s, e[1]), d = n.join(o, e[2]), g = n.join(d, e[3]), _ = n.join(g, e[4]), p = n.join(_, e[5]);
1370
+ const r = n.join(s, e[1]), d = n.join(r, e[2]), f = n.join(d, e[3]), _ = n.join(f, e[4]), g = n.join(_, e[5]);
1355
1371
  let j = "000000000" + e[6];
1356
1372
  j = j.substring(j.length - 9);
1357
- const A = n.join(p, j.substring(0, 3)), I = n.join(A, j.substring(3, 3));
1358
- return i.ensureDirSync(I), n.join(I, t);
1373
+ const A = n.join(g, j.substring(0, 3)), F = n.join(A, j.substring(3, 3));
1374
+ return i.ensureDirSync(F), n.join(F, t);
1359
1375
  }
1360
1376
  function Le(s, t) {
1361
- const e = K.exec(t);
1377
+ const e = G.exec(t);
1362
1378
  Q.notStrictEqual(
1363
1379
  e,
1364
1380
  null,
1365
1381
  `Unexpected structure for scrutin UID: ${t}`
1366
1382
  );
1367
- const o = n.join(s, e[1]), d = n.join(o, e[2]), g = n.join(d, e[3]);
1383
+ const r = n.join(s, e[1]), d = n.join(r, e[2]), f = n.join(d, e[3]);
1368
1384
  let _ = "000000" + e[4];
1369
1385
  _ = _.substring(_.length - 6);
1370
- const p = n.join(g, _.substring(0, 3));
1371
- return i.ensureDirSync(p), n.join(p, t);
1386
+ const g = n.join(f, _.substring(0, 3));
1387
+ return i.ensureDirSync(g), n.join(g, t);
1372
1388
  }
1373
1389
  function xe(s, t) {
1374
- return w(s, t, te);
1390
+ return E(s, t, te);
1375
1391
  }
1376
- function Oe(s, t) {
1377
- const e = ee.exec(t);
1392
+ function Pe(s, t) {
1393
+ const e = K.exec(t);
1378
1394
  Q.notStrictEqual(
1379
1395
  e,
1380
1396
  null,
1381
1397
  `Unexpected structure for object with UID: ${t}`
1382
1398
  );
1383
- const o = n.join(s, e[2]), d = n.join(o, e[3]), g = n.join(d, e[4]), _ = n.join(g, e[5]);
1384
- let p = "000000000" + e[7];
1385
- p = p.substring(p.length - 9);
1386
- const j = n.join(_, p.substring(0, 3)), A = n.join(j, p.substring(3, 3));
1399
+ const r = n.join(s, e[2]), d = n.join(r, e[3]), f = n.join(d, e[4]), _ = n.join(f, e[5]);
1400
+ let g = "000000000" + e[7];
1401
+ g = g.substring(g.length - 9);
1402
+ const j = n.join(_, g.substring(0, 3)), A = n.join(j, g.substring(3, 3));
1387
1403
  return i.ensureDirSync(A), n.join(A, t);
1388
1404
  }
1389
- function w(s, t, e) {
1390
- const o = e.exec(t);
1405
+ function E(s, t, e) {
1406
+ const r = e.exec(t);
1391
1407
  Q.notStrictEqual(
1392
- o,
1408
+ r,
1393
1409
  null,
1394
1410
  `Unexpected structure for object with UID: ${t}`
1395
1411
  );
1396
- const d = n.join(s, o[1]), g = n.join(d, o[2]);
1397
- let _ = "000000" + o[3];
1412
+ const d = n.join(s, r[1]), f = n.join(d, r[2]);
1413
+ let _ = "000000" + r[3];
1398
1414
  _ = _.substring(_.length - 6);
1399
- const p = n.join(g, _.substring(0, 3));
1400
- return i.ensureDirSync(p), n.join(p, t);
1415
+ const g = n.join(f, _.substring(0, 3));
1416
+ return i.ensureDirSync(g), n.join(g, t);
1401
1417
  }
1402
1418
  export {
1403
- F as EnabledDatasets,
1419
+ v as EnabledDatasets,
1404
1420
  me as iterLoadAssembleeActeurs,
1405
1421
  pe as iterLoadAssembleeAmendements,
1406
- he as iterLoadAssembleeComptesRendus,
1422
+ Se as iterLoadAssembleeComptesRendus,
1407
1423
  Ae as iterLoadAssembleeComptesRendusCommissions,
1408
1424
  ge as iterLoadAssembleeDocuments,
1409
1425
  _e as iterLoadAssembleeDossiersParlementaires,
1410
1426
  fe as iterLoadAssembleeOrganes,
1411
- Se as iterLoadAssembleeQuestions,
1427
+ he as iterLoadAssembleeQuestions,
1412
1428
  je as iterLoadAssembleeReunions,
1413
1429
  ye as iterLoadAssembleeScrutins,
1414
- Ie as loadAssembleeData,
1415
- Fe as loadAssembleeDataFromBigFiles,
1416
- ve as loadAssembleeDocumentFile,
1417
- Ve as loadAssembleePhotosDeputes,
1418
- be as loadAssembleePhotosSenateurs,
1419
- Oe as pathFromCompteRenduUid,
1420
- ne as pathFromDocumentUid,
1421
- De as pathFromDossierParlementaireUid,
1430
+ Fe as loadAssembleeData,
1431
+ ve as loadAssembleeDataFromBigFiles,
1432
+ Ie as loadAssembleeDocumentFile,
1433
+ be as loadAssembleePhotosDeputes,
1434
+ De as loadAssembleePhotosSenateurs,
1435
+ Pe as pathFromCompteRenduUid,
1436
+ ie as pathFromDocumentUid,
1437
+ Xe as pathFromDossierParlementaireUid,
1422
1438
  xe as pathFromQuestionUid,
1423
- Xe as pathFromReunionUid,
1439
+ Ve as pathFromReunionUid,
1424
1440
  Le as pathFromScrutinUid,
1425
1441
  L as walkDir
1426
1442
  };