@tricoteuses/tisseuse 0.21.1 → 0.21.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.
@@ -183,6 +183,7 @@ var h = class {
183
183
  length = 0;
184
184
  usedInputs = void 0;
185
185
  variables = {};
186
+ textTitlesInfos;
186
187
  constructor(e, t = 0) {
187
188
  this.input = e, this.offset = t;
188
189
  }
@@ -294,7 +295,7 @@ var h = class {
294
295
  let i = Math.max(0, r.offset - t);
295
296
  for (let t = r.offset; t >= i; t--) {
296
297
  let i = new h(r.input, t);
297
- i.variables = { ...r.variables }, i.currentArticle = r.currentArticle, i.currentText = r.currentText;
298
+ i.variables = { ...r.variables }, i.currentArticle = r.currentArticle, i.currentText = r.currentText, i.textTitlesInfos = r.textTitlesInfos;
298
299
  let a = (Array.isArray(e) ? _(e, { exportVariables: !0 }) : e)(i);
299
300
  if (a !== void 0 && i.offset === r.offset) {
300
301
  let e = a;
@@ -1647,7 +1648,7 @@ var J = x(g(S(" de la République française", { flags: "i" }), S(" du pays", {
1647
1648
  default: null,
1648
1649
  value: (e) => e[1]
1649
1650
  }),
1650
- x([T, v(w(pt), { value: (e, t) => ({
1651
+ x([T, v((e) => w(e.textTitlesInfos?.textCidByTitleRestWordsTree ?? pt)(e), { value: (e, t) => ({
1651
1652
  ...e,
1652
1653
  titleRest: t.text()
1653
1654
  }) })], {
@@ -1663,44 +1664,54 @@ var J = x(g(S(" de la République française", { flags: "i" }), S(" du pays", {
1663
1664
  value: (e) => e[1]
1664
1665
  }),
1665
1666
  x(We, { default: "" })
1666
- ], { value: (e) => {
1667
- let { nature: t, type: n } = e[0], { date: r, num: i } = e[2] ?? e[4] ?? {}, { cid: a, titleRest: o } = e[3] ?? {};
1668
- if (a === void 0 && r === void 0 && i === void 0) return;
1669
- let s = /* @__PURE__ */ new Set();
1670
- if (r !== void 0) {
1671
- let e = mt[t]?.[r];
1667
+ ], { value: (e, t) => {
1668
+ let n = t.textTitlesInfos, r = (e) => {
1669
+ if (!n) return W[e];
1670
+ let t = n.textInfosByCid[e];
1671
+ return t && {
1672
+ nature: t[0],
1673
+ title: t[1]
1674
+ };
1675
+ }, i = n?.textsCidsByNatureAndDate ?? mt, a = n?.textsCidsByNatureAndNum ?? ht, { nature: o, type: s } = e[0], { date: c, num: l } = e[2] ?? e[4] ?? {}, { cid: u, titleRest: d } = e[3] ?? {};
1676
+ if (u === void 0 && c === void 0 && l === void 0) return;
1677
+ let f = /* @__PURE__ */ new Set();
1678
+ if (c !== void 0) {
1679
+ let e = i[o]?.[c];
1672
1680
  if (e !== void 0) {
1673
1681
  let t = bt(e);
1674
- s = s.size === 0 ? new Set(t) : s.intersection(new Set(t));
1682
+ f = f.size === 0 ? new Set(t) : f.intersection(new Set(t));
1675
1683
  }
1676
1684
  }
1677
- if (i !== void 0) {
1678
- let e = ht[t]?.[i];
1685
+ if (l !== void 0) {
1686
+ let e = a[o]?.[l];
1679
1687
  if (e !== void 0) {
1680
1688
  let t = bt(e);
1681
- s = s.size === 0 ? new Set(t) : s.intersection(new Set(t));
1689
+ f = f.size === 0 ? new Set(t) : f.intersection(new Set(t));
1682
1690
  }
1683
1691
  }
1684
- if (a !== void 0) {
1685
- let e = Array.isArray(a) ? a : [a];
1686
- s = s.size === 0 ? new Set(e) : s.intersection(new Set(e.filter((e) => W[e].nature === t)));
1692
+ if (u !== void 0) {
1693
+ let e = Array.isArray(u) ? u : [u];
1694
+ f = f.size === 0 ? new Set(e) : f.intersection(new Set(e.filter((e) => r(e)?.nature === o)));
1687
1695
  }
1688
- let c = s.size === 1 ? s.values().next().value : void 0, l = c === void 0 ? void 0 : W[c];
1696
+ let p = f.size === 1 ? f.values().next().value : void 0, m = p === void 0 ? void 0 : r(p);
1689
1697
  return Object.fromEntries(Object.entries({
1690
- cid: c,
1691
- candidateCids: t === "CODE" && s.size > 1 ? [...s] : void 0,
1692
- date: r,
1693
- nature: t ?? l?.nature,
1694
- num: i,
1695
- title: l?.title,
1696
- titleRest: o,
1697
- type: n
1698
+ cid: p,
1699
+ candidateCids: o === "CODE" && f.size > 1 ? [...f] : void 0,
1700
+ date: c,
1701
+ nature: o ?? m?.nature,
1702
+ num: l,
1703
+ title: m?.title,
1704
+ titleRest: d,
1705
+ type: s
1698
1706
  }).filter(([, e]) => e !== void 0));
1699
- } }), _([w(ft), x(We, { default: "" })], { value: (e) => {
1700
- let { cid: t } = e[0], n = typeof t == "string" ? W[t] : void 0;
1707
+ } }), _([(e) => w(e.textTitlesInfos?.textCidByOtherTitleWordsTree ?? ft)(e), x(We, { default: "" })], { value: (e, t) => {
1708
+ let { cid: n } = e[0], r = typeof n == "string" ? t.textTitlesInfos?.textInfosByCid[n] : void 0, i = t.textTitlesInfos ? r && {
1709
+ nature: r[0],
1710
+ title: r[1]
1711
+ } : typeof n == "string" ? W[n] : void 0;
1701
1712
  return Object.fromEntries(Object.entries({
1702
- cid: t,
1703
- ...n ?? {},
1713
+ cid: n,
1714
+ ...i ?? {},
1704
1715
  type: "texte"
1705
1716
  }).filter(([, e]) => e !== void 0));
1706
1717
  } })), Ct = _([
@@ -1,4 +1,4 @@
1
- import { d as e, i as t, o as n, r, t as i } from "./resolver-CzmDH4S3.js";
1
+ import { d as e, i as t, o as n, r, t as i } from "./resolver-BBrU9oGB.js";
2
2
  //#region src/lib/f_legi/resolver.ts
3
3
  var a = [
4
4
  "article_location_diffs",