@mailwoman/core 4.16.2 → 5.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (316) hide show
  1. package/data/chromium-i18n/ssl-address-download.ts +110 -0
  2. package/data/libpostal/resources-download.ts +121 -0
  3. package/out/api/APIClient.d.ts +2 -2
  4. package/out/api/APIClient.d.ts.map +1 -1
  5. package/out/api/APIClient.js +2 -2
  6. package/out/api/APIClient.js.map +1 -1
  7. package/out/api/responses.d.ts.map +1 -1
  8. package/out/api/responses.js.map +1 -1
  9. package/out/classification/Classification.d.ts +3 -4
  10. package/out/classification/Classification.d.ts.map +1 -1
  11. package/out/classification/Classification.js.map +1 -1
  12. package/out/classification/CompositeClassifier.d.ts +1 -1
  13. package/out/classification/CompositeClassifier.d.ts.map +1 -1
  14. package/out/classification/CompositeClassifier.js +1 -1
  15. package/out/classification/CompositeClassifier.js.map +1 -1
  16. package/out/classification/PhraseClassifier.d.ts.map +1 -1
  17. package/out/classification/PhraseClassifier.js.map +1 -1
  18. package/out/classification/SectionClassifier.d.ts.map +1 -1
  19. package/out/classification/SectionClassifier.js.map +1 -1
  20. package/out/classification/WordClassifier.d.ts.map +1 -1
  21. package/out/classification/WordClassifier.js.map +1 -1
  22. package/out/classification/scheme.d.ts.map +1 -1
  23. package/out/classification/scheme.js.map +1 -1
  24. package/out/coarse-placer/coarse-placer.d.ts +28 -34
  25. package/out/coarse-placer/coarse-placer.d.ts.map +1 -1
  26. package/out/coarse-placer/coarse-placer.js +17 -20
  27. package/out/coarse-placer/coarse-placer.js.map +1 -1
  28. package/out/coarse-placer/featurize.d.ts +17 -19
  29. package/out/coarse-placer/featurize.d.ts.map +1 -1
  30. package/out/coarse-placer/featurize.js +17 -19
  31. package/out/coarse-placer/featurize.js.map +1 -1
  32. package/out/collections.d.ts +1 -2
  33. package/out/collections.d.ts.map +1 -1
  34. package/out/collections.js +1 -2
  35. package/out/collections.js.map +1 -1
  36. package/out/data/chromium-i18n/ssl-address-download.d.ts +30 -0
  37. package/out/data/chromium-i18n/ssl-address-download.d.ts.map +1 -0
  38. package/out/data/chromium-i18n/ssl-address-download.js +98 -0
  39. package/out/data/chromium-i18n/ssl-address-download.js.map +1 -0
  40. package/out/data/libpostal/resources-download.d.ts +29 -0
  41. package/out/data/libpostal/resources-download.d.ts.map +1 -0
  42. package/out/data/libpostal/resources-download.js +107 -0
  43. package/out/data/libpostal/resources-download.js.map +1 -0
  44. package/out/db/schema.d.ts +2 -2
  45. package/out/decoder/arbitrate-tree.d.ts +3 -3
  46. package/out/decoder/arbitrate-tree.d.ts.map +1 -1
  47. package/out/decoder/arbitrate-tree.js +5 -5
  48. package/out/decoder/arbitrate-tree.js.map +1 -1
  49. package/out/decoder/build-tree.d.ts +12 -14
  50. package/out/decoder/build-tree.d.ts.map +1 -1
  51. package/out/decoder/build-tree.js +4 -5
  52. package/out/decoder/build-tree.js.map +1 -1
  53. package/out/decoder/calibration.d.ts +3 -4
  54. package/out/decoder/calibration.d.ts.map +1 -1
  55. package/out/decoder/calibration.js +3 -4
  56. package/out/decoder/calibration.js.map +1 -1
  57. package/out/decoder/containment.d.ts +5 -6
  58. package/out/decoder/containment.d.ts.map +1 -1
  59. package/out/decoder/containment.js +5 -6
  60. package/out/decoder/containment.js.map +1 -1
  61. package/out/decoder/index.d.ts +1 -0
  62. package/out/decoder/index.d.ts.map +1 -1
  63. package/out/decoder/index.js +1 -0
  64. package/out/decoder/index.js.map +1 -1
  65. package/out/decoder/proposals-to-tree.d.ts +9 -9
  66. package/out/decoder/proposals-to-tree.d.ts.map +1 -1
  67. package/out/decoder/proposals-to-tree.js +11 -11
  68. package/out/decoder/proposals-to-tree.js.map +1 -1
  69. package/out/decoder/resolve-proposal-overlaps.d.ts +3 -5
  70. package/out/decoder/resolve-proposal-overlaps.d.ts.map +1 -1
  71. package/out/decoder/resolve-proposal-overlaps.js +5 -6
  72. package/out/decoder/resolve-proposal-overlaps.js.map +1 -1
  73. package/out/decoder/serialize-json.d.ts +13 -1
  74. package/out/decoder/serialize-json.d.ts.map +1 -1
  75. package/out/decoder/serialize-json.js +6 -2
  76. package/out/decoder/serialize-json.js.map +1 -1
  77. package/out/decoder/serialize-tuples.d.ts +10 -1
  78. package/out/decoder/serialize-tuples.d.ts.map +1 -1
  79. package/out/decoder/serialize-tuples.js +13 -5
  80. package/out/decoder/serialize-tuples.js.map +1 -1
  81. package/out/decoder/serialize-xml.d.ts +15 -9
  82. package/out/decoder/serialize-xml.d.ts.map +1 -1
  83. package/out/decoder/serialize-xml.js +29 -12
  84. package/out/decoder/serialize-xml.js.map +1 -1
  85. package/out/decoder/types.d.ts +52 -61
  86. package/out/decoder/types.d.ts.map +1 -1
  87. package/out/decoder/types.js +2 -2
  88. package/out/decoder/unknown-spans.d.ts +46 -0
  89. package/out/decoder/unknown-spans.d.ts.map +1 -0
  90. package/out/decoder/unknown-spans.js +56 -0
  91. package/out/decoder/unknown-spans.js.map +1 -0
  92. package/out/decoder/validate-tree.d.ts.map +1 -1
  93. package/out/decoder/validate-tree.js +2 -3
  94. package/out/decoder/validate-tree.js.map +1 -1
  95. package/out/errors/schema.d.ts +1 -2
  96. package/out/errors/schema.d.ts.map +1 -1
  97. package/out/errors/schema.js +1 -2
  98. package/out/errors/schema.js.map +1 -1
  99. package/out/filters/RelationshipFilter.d.ts.map +1 -1
  100. package/out/filters/RelationshipFilter.js.map +1 -1
  101. package/out/formatter/index.d.ts.map +1 -1
  102. package/out/formatter/index.js.map +1 -1
  103. package/out/identifiers.d.ts.map +1 -1
  104. package/out/identifiers.js.map +1 -1
  105. package/out/kysley/client.d.ts +3 -4
  106. package/out/kysley/client.d.ts.map +1 -1
  107. package/out/kysley/client.js +3 -4
  108. package/out/kysley/client.js.map +1 -1
  109. package/out/kysley/dialect-config.d.ts +1 -1
  110. package/out/kysley/dialect-config.d.ts.map +1 -1
  111. package/out/kysley/dialect.d.ts +4 -4
  112. package/out/kysley/dialect.js +4 -4
  113. package/out/kysley/driver.d.ts.map +1 -1
  114. package/out/kysley/driver.js +1 -1
  115. package/out/kysley/driver.js.map +1 -1
  116. package/out/lifecycle/ServiceSymbol.d.ts +2 -4
  117. package/out/lifecycle/ServiceSymbol.d.ts.map +1 -1
  118. package/out/lifecycle/ServiceSymbol.js +2 -4
  119. package/out/lifecycle/ServiceSymbol.js.map +1 -1
  120. package/out/lifecycle/services.d.ts +7 -8
  121. package/out/lifecycle/services.d.ts.map +1 -1
  122. package/out/lifecycle/services.js +5 -4
  123. package/out/lifecycle/services.js.map +1 -1
  124. package/out/locale/locale.d.ts +5 -6
  125. package/out/locale/locale.d.ts.map +1 -1
  126. package/out/locale/registry.d.ts.map +1 -1
  127. package/out/locale/registry.js.map +1 -1
  128. package/out/logging/index.d.ts +1 -0
  129. package/out/logging/index.d.ts.map +1 -1
  130. package/out/logging/index.js +1 -0
  131. package/out/logging/index.js.map +1 -1
  132. package/out/logging/shared.d.ts +2 -2
  133. package/out/logging/shared.js +2 -2
  134. package/out/logging/utils.d.ts +30 -0
  135. package/out/logging/utils.d.ts.map +1 -0
  136. package/out/logging/utils.js +30 -0
  137. package/out/logging/utils.js.map +1 -0
  138. package/out/objects.d.ts +3 -4
  139. package/out/objects.d.ts.map +1 -1
  140. package/out/objects.js +1 -2
  141. package/out/objects.js.map +1 -1
  142. package/out/parser/AddressParser.d.ts +12 -16
  143. package/out/parser/AddressParser.d.ts.map +1 -1
  144. package/out/parser/AddressParser.js.map +1 -1
  145. package/out/parser/proposal-pipeline.d.ts +12 -12
  146. package/out/parser/proposal-pipeline.d.ts.map +1 -1
  147. package/out/parser/proposal-pipeline.js +12 -12
  148. package/out/parser/proposal-pipeline.js.map +1 -1
  149. package/out/parser/solution-to-proposals.d.ts +4 -4
  150. package/out/parser/solution-to-proposals.d.ts.map +1 -1
  151. package/out/parser/solution-to-proposals.js +5 -5
  152. package/out/parser/solution-to-proposals.js.map +1 -1
  153. package/out/pipeline/index.d.ts +1 -1
  154. package/out/pipeline/reconcile-lookups.d.ts +4 -4
  155. package/out/pipeline/reconcile-lookups.d.ts.map +1 -1
  156. package/out/pipeline/reconcile-lookups.js +4 -4
  157. package/out/pipeline/reconcile-lookups.js.map +1 -1
  158. package/out/pipeline/reconcile.d.ts +21 -23
  159. package/out/pipeline/reconcile.d.ts.map +1 -1
  160. package/out/pipeline/reconcile.js +49 -51
  161. package/out/pipeline/reconcile.js.map +1 -1
  162. package/out/pipeline/runtime-pipeline.d.ts +14 -16
  163. package/out/pipeline/runtime-pipeline.d.ts.map +1 -1
  164. package/out/pipeline/runtime-pipeline.js +33 -37
  165. package/out/pipeline/runtime-pipeline.js.map +1 -1
  166. package/out/pipeline/span-logit-aggregation.d.ts +5 -6
  167. package/out/pipeline/span-logit-aggregation.d.ts.map +1 -1
  168. package/out/pipeline/span-logit-aggregation.js +7 -8
  169. package/out/pipeline/span-logit-aggregation.js.map +1 -1
  170. package/out/pipeline/span-proposer.d.ts +18 -22
  171. package/out/pipeline/span-proposer.d.ts.map +1 -1
  172. package/out/pipeline/span-proposer.js +21 -22
  173. package/out/pipeline/span-proposer.js.map +1 -1
  174. package/out/pipeline/types.d.ts +77 -86
  175. package/out/pipeline/types.d.ts.map +1 -1
  176. package/out/policy/defaults.d.ts +5 -6
  177. package/out/policy/defaults.d.ts.map +1 -1
  178. package/out/policy/defaults.js +5 -6
  179. package/out/policy/defaults.js.map +1 -1
  180. package/out/policy/from-config.d.ts +8 -9
  181. package/out/policy/from-config.d.ts.map +1 -1
  182. package/out/policy/from-config.js +8 -9
  183. package/out/policy/from-config.js.map +1 -1
  184. package/out/policy/input-shape-router.d.ts +15 -19
  185. package/out/policy/input-shape-router.d.ts.map +1 -1
  186. package/out/policy/input-shape-router.js +11 -14
  187. package/out/policy/input-shape-router.js.map +1 -1
  188. package/out/policy/policy.d.ts +10 -13
  189. package/out/policy/policy.d.ts.map +1 -1
  190. package/out/policy/registry.d.ts +4 -5
  191. package/out/policy/registry.d.ts.map +1 -1
  192. package/out/policy/registry.js +6 -7
  193. package/out/policy/registry.js.map +1 -1
  194. package/out/resolver/index.d.ts +1 -1
  195. package/out/resolver/index.js +1 -1
  196. package/out/resolver/types.d.ts +212 -216
  197. package/out/resolver/types.d.ts.map +1 -1
  198. package/out/resolver/types.js +32 -39
  199. package/out/resolver/types.js.map +1 -1
  200. package/out/resources/LocaleIndex.d.ts +1 -2
  201. package/out/resources/LocaleIndex.d.ts.map +1 -1
  202. package/out/resources/LocaleIndex.js +1 -2
  203. package/out/resources/LocaleIndex.js.map +1 -1
  204. package/out/resources/ResourceMapCache.d.ts.map +1 -1
  205. package/out/resources/ResourceMapCache.js.map +1 -1
  206. package/out/resources/collections.d.ts +1 -2
  207. package/out/resources/collections.d.ts.map +1 -1
  208. package/out/resources/collections.js +1 -2
  209. package/out/resources/collections.js.map +1 -1
  210. package/out/resources/fs.d.ts.map +1 -1
  211. package/out/resources/fs.js.map +1 -1
  212. package/out/resources/git.d.ts.map +1 -1
  213. package/out/resources/git.js.map +1 -1
  214. package/out/resources/libaddressinput.d.ts +2 -2
  215. package/out/resources/libaddressinput.js +2 -2
  216. package/out/resources/libpostal.d.ts +4 -5
  217. package/out/resources/libpostal.d.ts.map +1 -1
  218. package/out/resources/libpostal.js +6 -7
  219. package/out/resources/libpostal.js.map +1 -1
  220. package/out/resources/set.d.ts +1 -2
  221. package/out/resources/set.d.ts.map +1 -1
  222. package/out/resources/set.js +1 -2
  223. package/out/resources/set.js.map +1 -1
  224. package/out/resources/whosonfirst/DataSourceCache.d.ts.map +1 -1
  225. package/out/resources/whosonfirst/DataSourceCache.js.map +1 -1
  226. package/out/resources/whosonfirst/PlacetypeDataSource.d.ts +1 -1
  227. package/out/resources/whosonfirst/PlacetypeDataSource.d.ts.map +1 -1
  228. package/out/resources/whosonfirst/PlacetypeDataSource.js +1 -1
  229. package/out/resources/whosonfirst/PlacetypeDataSource.js.map +1 -1
  230. package/out/resources/whosonfirst/loader.d.ts +1 -2
  231. package/out/resources/whosonfirst/loader.d.ts.map +1 -1
  232. package/out/resources/whosonfirst/loader.js.map +1 -1
  233. package/out/resources/whosonfirst/placetypes/Placetype.d.ts +6 -9
  234. package/out/resources/whosonfirst/placetypes/Placetype.d.ts.map +1 -1
  235. package/out/resources/whosonfirst/placetypes/Placetype.js +7 -10
  236. package/out/resources/whosonfirst/placetypes/Placetype.js.map +1 -1
  237. package/out/resources/whosonfirst/placetypes/admin.d.ts +1 -2
  238. package/out/resources/whosonfirst/placetypes/admin.d.ts.map +1 -1
  239. package/out/resources/whosonfirst/placetypes/admin.js +1 -2
  240. package/out/resources/whosonfirst/placetypes/admin.js.map +1 -1
  241. package/out/resources/whosonfirst/placetypes/graph.d.ts +10 -10
  242. package/out/resources/whosonfirst/placetypes/graph.d.ts.map +1 -1
  243. package/out/resources/whosonfirst/placetypes/graph.js +0 -0
  244. package/out/resources/whosonfirst/placetypes/graph.js.map +1 -1
  245. package/out/resources/whosonfirst/placetypes/mermaid.d.ts +16 -19
  246. package/out/resources/whosonfirst/placetypes/mermaid.d.ts.map +1 -1
  247. package/out/resources/whosonfirst/placetypes/mermaid.js +15 -16
  248. package/out/resources/whosonfirst/placetypes/mermaid.js.map +1 -1
  249. package/out/resources/whosonfirst/placetypes/tree.d.ts +6 -7
  250. package/out/resources/whosonfirst/placetypes/tree.d.ts.map +1 -1
  251. package/out/resources/whosonfirst/placetypes/tree.js +3 -4
  252. package/out/resources/whosonfirst/placetypes/tree.js.map +1 -1
  253. package/out/routing/index.d.ts +2 -3
  254. package/out/routing/index.d.ts.map +1 -1
  255. package/out/routing/index.js +1 -1
  256. package/out/routing/index.js.map +1 -1
  257. package/out/solver/HashMapSolver.d.ts.map +1 -1
  258. package/out/solver/HashMapSolver.js.map +1 -1
  259. package/out/solver/Solution.d.ts +2 -2
  260. package/out/solver/Solution.d.ts.map +1 -1
  261. package/out/solver/Solution.js +2 -2
  262. package/out/solver/Solution.js.map +1 -1
  263. package/out/solver/mask.d.ts.map +1 -1
  264. package/out/solver/mask.js.map +1 -1
  265. package/out/solvers/LeadingAreaDeclassifier.d.ts.map +1 -1
  266. package/out/solvers/LeadingAreaDeclassifier.js.map +1 -1
  267. package/out/solvers/MultiStreetSolver.d.ts +10 -15
  268. package/out/solvers/MultiStreetSolver.d.ts.map +1 -1
  269. package/out/solvers/MultiStreetSolver.js +10 -15
  270. package/out/solvers/MultiStreetSolver.js.map +1 -1
  271. package/out/solvers/PostcodePositionPenalty.d.ts +2 -2
  272. package/out/solvers/PostcodePositionPenalty.d.ts.map +1 -1
  273. package/out/solvers/PostcodePositionPenalty.js +2 -2
  274. package/out/solvers/PostcodePositionPenalty.js.map +1 -1
  275. package/out/tokenization/Span.d.ts +1 -3
  276. package/out/tokenization/Span.d.ts.map +1 -1
  277. package/out/tokenization/Span.js +1 -3
  278. package/out/tokenization/Span.js.map +1 -1
  279. package/out/tokenization/context.d.ts +1 -2
  280. package/out/tokenization/context.d.ts.map +1 -1
  281. package/out/tokenization/context.js +1 -2
  282. package/out/tokenization/context.js.map +1 -1
  283. package/out/tokenization/normalizer.js +2 -2
  284. package/out/tokenization/permutate.d.ts +2 -3
  285. package/out/tokenization/permutate.d.ts.map +1 -1
  286. package/out/tokenization/permutate.js +4 -5
  287. package/out/tokenization/permutate.js.map +1 -1
  288. package/out/types/classifier.d.ts +21 -23
  289. package/out/types/classifier.d.ts.map +1 -1
  290. package/out/types/component.d.ts +6 -7
  291. package/out/types/component.d.ts.map +1 -1
  292. package/out/types/component.js +5 -6
  293. package/out/types/component.js.map +1 -1
  294. package/out/types/mapping.d.ts +8 -8
  295. package/out/types/mapping.d.ts.map +1 -1
  296. package/out/types/mapping.js +13 -13
  297. package/out/types/mapping.js.map +1 -1
  298. package/out/utils/data-root.d.ts +5 -5
  299. package/out/utils/data-root.js +7 -7
  300. package/out/utils/repo.d.ts +3 -3
  301. package/out/utils/repo.d.ts.map +1 -1
  302. package/out/utils/repo.js +16 -19
  303. package/out/utils/repo.js.map +1 -1
  304. package/out/vitest.config.d.ts.map +1 -1
  305. package/out/vitest.config.js.map +1 -1
  306. package/package.json +18 -18
  307. package/data/chromium-i18n/ssl-address-download.sh +0 -15
  308. package/data/libpostal/resources-download.sh +0 -44
  309. package/out/logging/tables.d.ts +0 -7
  310. package/out/logging/tables.d.ts.map +0 -1
  311. package/out/logging/tables.js +0 -75
  312. package/out/logging/tables.js.map +0 -1
  313. package/out/sets.d.ts +0 -2
  314. package/out/sets.d.ts.map +0 -1
  315. package/out/sets.js +0 -2
  316. package/out/sets.js.map +0 -1
@@ -16,8 +16,8 @@
16
16
  * schema natively distinguishes them.
17
17
  */
18
18
  /**
19
- * Static mapping table. Tags not in this table map to `null` (treated as "not a component" —
20
- * internal classifier state).
19
+ * Static mapping table. Tags not in this table map to `null` (treated as "not a component" — internal classifier
20
+ * state).
21
21
  */
22
22
  const LEGACY_TO_COMPONENT = {
23
23
  country: "country",
@@ -34,21 +34,21 @@ const LEGACY_TO_COMPONENT = {
34
34
  intersection: "intersection_a",
35
35
  };
36
36
  /**
37
- * Translate a legacy classification tag into a canonical {@link ComponentTag}, or `null` if the
38
- * legacy tag has no externally visible component equivalent.
37
+ * Translate a legacy classification tag into a canonical {@link ComponentTag}, or `null` if the legacy tag has no
38
+ * externally visible component equivalent.
39
39
  */
40
40
  export function legacyClassificationToComponentTag(legacy) {
41
41
  return LEGACY_TO_COMPONENT[legacy] ?? null;
42
42
  }
43
43
  /**
44
- * The full set of legacy tags that have a `ComponentTag` mapping. Useful for adapter wrappers that
45
- * filter the span graph by "which legacy tags do I expect this classifier to produce."
44
+ * The full set of legacy tags that have a `ComponentTag` mapping. Useful for adapter wrappers that filter the span
45
+ * graph by "which legacy tags do I expect this classifier to produce."
46
46
  */
47
47
  export const MAPPED_LEGACY_CLASSIFICATIONS = Object.keys(LEGACY_TO_COMPONENT);
48
48
  /**
49
- * Inverse of {@link LEGACY_TO_COMPONENT}. Picks the FIRST legacy entry that maps to each component —
50
- * for tags with multiple legacy aliases (e.g. `intersection_a` and `intersection_b` both come from
51
- * legacy `intersection`), the deterministic "first wins" rule is documented and tested.
49
+ * Inverse of {@link LEGACY_TO_COMPONENT}. Picks the FIRST legacy entry that maps to each component — for tags with
50
+ * multiple legacy aliases (e.g. `intersection_a` and `intersection_b` both come from legacy `intersection`), the
51
+ * deterministic "first wins" rule is documented and tested.
52
52
  */
53
53
  const COMPONENT_TO_LEGACY = (() => {
54
54
  const out = {};
@@ -59,11 +59,11 @@ const COMPONENT_TO_LEGACY = (() => {
59
59
  return out;
60
60
  })();
61
61
  /**
62
- * Translate a canonical {@link ComponentTag} into a legacy {@link Classification}, or `null` when the
63
- * component has no legacy equivalent (e.g. JP-specific tags that don't exist in the rule path).
62
+ * Translate a canonical {@link ComponentTag} into a legacy {@link Classification}, or `null` when the component has no
63
+ * legacy equivalent (e.g. JP-specific tags that don't exist in the rule path).
64
64
  *
65
- * Used by the parser-level proposal pipeline to write surviving neural proposals back into the
66
- * `TokenContext`'s span graph as classifications the solver can read.
65
+ * Used by the parser-level proposal pipeline to write surviving neural proposals back into the `TokenContext`'s span
66
+ * graph as classifications the solver can read.
67
67
  */
68
68
  export function componentTagToLegacyClassification(component) {
69
69
  return COMPONENT_TO_LEGACY[component] ?? null;
@@ -1 +1 @@
1
- {"version":3,"file":"mapping.js","sourceRoot":"","sources":["../../types/mapping.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAKH;;;GAGG;AACH,MAAM,mBAAmB,GAAkD;IAC1E,OAAO,EAAE,SAAS;IAClB,MAAM,EAAE,QAAQ;IAChB,QAAQ,EAAE,UAAU;IACpB,UAAU,EAAE,oBAAoB;IAChC,QAAQ,EAAE,UAAU;IACpB,YAAY,EAAE,cAAc;IAC5B,MAAM,EAAE,QAAQ;IAChB,aAAa,EAAE,eAAe;IAC9B,aAAa,EAAE,eAAe;IAC9B,IAAI,EAAE,MAAM;IACZ,KAAK,EAAE,OAAO;IACd,YAAY,EAAE,gBAAgB;CAC9B,CAAA;AAED;;;GAGG;AACH,MAAM,U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,IAAI,IAAI,CAAA;AAC3C,CAAC;AAED;;;GAGG;AACH,MAAM,CAAC,MAAM,6BAA6B,GAAG,MAAM,CAAC,IAAI,CAAC,mBAAmB,CAAqB,CAAA;AAEjG;;;;GAIG;AACH,MAAM,mBAAmB,GAAkD,CAAC,GAAG,EAAE;IAChF,MAAM,GAAG,GAAkD,EAAE,CAAA;IAE7D,KAAK,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,mBAAmB,CAA0C,EAAE,CAAC;QAChH,IAAI,CAAC,CAAC,SAAS,IAAI,GAAG,CAAC;YAAE,GAAG,CAAC,SAAS,CAAC,GAAG,MAAM,CAAA;IACjD,CAAC;IAED,OAAO,GAAG,CAAA;AACX,CAAC,CAAC,EAAE,CAAA;AAEJ;;;;;;GAMG;AACH,MAAM,UAAU,kCAAkC,CAAC,SAAuB;IACzE,OAAO,mBAAmB,CAAC,SAAS,CAAC,IAAI,IAAI,CAAA;AAC9C,CAAC"}
@@ -13,14 +13,14 @@
13
13
  /** The Mailwoman data root: `$MAILWOMAN_DATA_ROOT` when set, else the lab default. */
14
14
  export declare function mailwomanDataRoot(): string;
15
15
  /**
16
- * Build an absolute path under the data root, e.g. `dataRootPath("wof", "admin-global-priority.db")`.
17
- * Reads the env on each call, so a late `process.env` change (or a test) is honored.
16
+ * Build an absolute path under the data root, e.g. `dataRootPath("wof", "admin-global-priority.db")`. Reads the env on
17
+ * each call, so a late `process.env` change (or a test) is honored.
18
18
  */
19
19
  export declare function dataRootPath(...segments: string[]): string;
20
20
  /**
21
- * The default WOF shard list the FTS backend probes when no single `--wof-db` is given: the global
22
- * admin-priority shard + the US postcode shard, both under `dataRoot` (defaults to the configured
23
- * {@link mailwomanDataRoot}; callers thread a `--data-root` option through). A fresh array each call.
21
+ * The default WOF shard list the FTS backend probes when no single `--wof-db` is given: the global admin-priority shard
22
+ * + the US postcode shard, both under `dataRoot` (defaults to the configured {@link mailwomanDataRoot}; callers thread a
23
+ * `--data-root` option through). A fresh array each call.
24
24
  */
25
25
  export declare function wofShardPaths(dataRoot?: string): [string, string];
26
26
  //# sourceMappingURL=data-root.d.ts.map
@@ -12,8 +12,8 @@
12
12
  */
13
13
  import { resolvePathBuilder } from "path-ts";
14
14
  /**
15
- * The lab default data root — the ONE place this literal appears. Everything else builds on
16
- * {@link dataRootPath} / {@link mailwomanDataRoot}; override per-deployment with `$MAILWOMAN_DATA_ROOT`.
15
+ * The lab default data root — the ONE place this literal appears. Everything else builds on {@link dataRootPath} /
16
+ * {@link mailwomanDataRoot}; override per-deployment with `$MAILWOMAN_DATA_ROOT`.
17
17
  */
18
18
  const DEFAULT_MAILWOMAN_DATA_ROOT = "/mnt/playpen/mailwoman-data";
19
19
  /** The Mailwoman data root: `$MAILWOMAN_DATA_ROOT` when set, else the lab default. */
@@ -21,16 +21,16 @@ export function mailwomanDataRoot() {
21
21
  return process.env["MAILWOMAN_DATA_ROOT"] ?? DEFAULT_MAILWOMAN_DATA_ROOT;
22
22
  }
23
23
  /**
24
- * Build an absolute path under the data root, e.g. `dataRootPath("wof", "admin-global-priority.db")`.
25
- * Reads the env on each call, so a late `process.env` change (or a test) is honored.
24
+ * Build an absolute path under the data root, e.g. `dataRootPath("wof", "admin-global-priority.db")`. Reads the env on
25
+ * each call, so a late `process.env` change (or a test) is honored.
26
26
  */
27
27
  export function dataRootPath(...segments) {
28
28
  return String(resolvePathBuilder(mailwomanDataRoot(), ...segments));
29
29
  }
30
30
  /**
31
- * The default WOF shard list the FTS backend probes when no single `--wof-db` is given: the global
32
- * admin-priority shard + the US postcode shard, both under `dataRoot` (defaults to the configured
33
- * {@link mailwomanDataRoot}; callers thread a `--data-root` option through). A fresh array each call.
31
+ * The default WOF shard list the FTS backend probes when no single `--wof-db` is given: the global admin-priority shard
32
+ * + the US postcode shard, both under `dataRoot` (defaults to the configured {@link mailwomanDataRoot}; callers thread a
33
+ * `--data-root` option through). A fresh array each call.
34
34
  */
35
35
  export function wofShardPaths(dataRoot = mailwomanDataRoot()) {
36
36
  return [
@@ -29,9 +29,9 @@ export type AddressResource = "chromium-i18n/ssl-address" | "libpostal" | "inter
29
29
  /**
30
30
  * Path builder relative to a address resource dictionary directory.
31
31
  *
32
- * Data lives at `core/data/<resource>/dictionaries/...` so the @mailwoman/core npm package ships
33
- * dictionaries via its `files` glob. Use {@link corePackagePathBuilder} directly for non- dictionary
34
- * assets (e.g. chromium-i18n/ssl-address) that don't have the `dictionaries/` subdir.
32
+ * Data lives at `core/data/<resource>/dictionaries/...` so the @mailwoman/core npm package ships dictionaries via its
33
+ * `files` glob. Use {@link corePackagePathBuilder} directly for non- dictionary assets (e.g. chromium-i18n/ssl-address)
34
+ * that don't have the `dictionaries/` subdir.
35
35
  */
36
36
  export declare function resourceDictionaryPathBuilder<A extends AddressResource, S extends string[]>(resource: A, ...pathSegments: S): PathBuilder<`mailwoman/${Join<["data", A, "dictionaries", ...S], "/">}`>;
37
37
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"repo.d.ts","sourceRoot":"","sources":["../../utils/repo.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,EAA6B,KAAK,IAAI,EAAE,KAAK,WAAW,EAAE,MAAM,SAAS,CAAA;AAEhF;;;;GAIG;AAEH;;GAEG;AACH,eAAO,MAAM,gBAAgB,QAAQ,CAAA;AACrC,MAAM,MAAM,gBAAgB,GAAG,OAAO,gBAAgB,CAAA;AAEtD,QAAA,MAAM,aAAa,EAAG,WAAoB,CAAA;AAC1C,KAAK,aAAa,GAAG,OAAO,aAAa,CAAA;AA6BzC;;GAEG;AACH,eAAO,MAAM,mBAAmB,oDAAiE,CAAA;AAajG,eAAO,MAAM,sBAAsB,oDAAoE,CAAA;AAEvG;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,CAAC,SAAS,MAAM,EAAE,EAClD,GAAG,YAAY,EAAE,CAAC,GAChB,WAAW,CAAC,IAAI,CAAC,CAAC,aAAa,EAAE,gBAAgB,EAAE,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,EAAE,CAAC,4EAGlB;AAED;;GAEG;AACH,eAAO,MAAM,sBAAsB,+BAA8B,CAAA"}
package/out/utils/repo.js CHANGED
@@ -24,16 +24,14 @@ const __dirname = dirname(fileURLToPath(import.meta.url));
24
24
  /**
25
25
  * The absolute path to the root of the repository.
26
26
  *
27
- * In compiled mode this file lives at `core/out/utils/repo.js` (so the PARENT of `utils` is `out/`)
28
- * and in source mode at `core/utils/repo.ts` (the parent is `core/`). Detect the mode by checking
29
- * whether the parent directory (`resolve("..")`) is `out/` — uses `basename` on the resolved path
30
- * rather than a substring match on `__dirname`, so it survives symlinks and output-directory
31
- * renames.
27
+ * In compiled mode this file lives at `core/out/utils/repo.js` (so the PARENT of `utils` is `out/`) and in source mode
28
+ * at `core/utils/repo.ts` (the parent is `core/`). Detect the mode by checking whether the parent directory
29
+ * (`resolve("..")`) is `out/` — uses `basename` on the resolved path rather than a substring match on `__dirname`, so
30
+ * it survives symlinks and output-directory renames.
32
31
  *
33
- * (Earlier this checked `resolve("..", "..")`, which overshoots `out/` to `core/` and so was always
34
- * false — the compiled tree then resolved `CorePackageAbsolutePath` to `core/out` instead of
35
- * `core/`, landing dictionary reads at the nonexistent `core/out/data` and requiring an external
36
- * symlink bridge to find `core/data`. #481.)
32
+ * (Earlier this checked `resolve("..", "..")`, which overshoots `out/` to `core/` and so was always false — the
33
+ * compiled tree then resolved `CorePackageAbsolutePath` to `core/out` instead of `core/`, landing dictionary reads at
34
+ * the nonexistent `core/out/data` and requiring an external symlink bridge to find `core/data`. #481.)
37
35
  */
38
36
  const __isCompiledTree = basename(resolve(__dirname, "..")) === OutDirectoryName;
39
37
  const __upCount = __isCompiledTree ? PathReflection.length : PathReflection.length - 1;
@@ -43,14 +41,13 @@ const RepoRootAbsolutePath = resolve(__dirname, ...Array.from({ length: __upCoun
43
41
  */
44
42
  export const repoRootPathBuilder = createPathBuilderResolver(RepoRootAbsolutePath);
45
43
  /**
46
- * Path builder relative to the `@mailwoman/core` workspace root (the directory containing
47
- * `package.json` for this package).
44
+ * Path builder relative to the `@mailwoman/core` workspace root (the directory containing `package.json` for this
45
+ * package).
48
46
  *
49
- * In compiled mode this resolves to `core/` (one level above `core/out/utils/repo.js`'s `out/`). In
50
- * source mode it's the same `core/` directly above `core/utils/repo.ts`. Used to locate
51
- * package-bundled assets (dictionary data) that live under the workspace root, NOT the repo root —
52
- * so that `npm install @mailwoman/core` ships those assets alongside the JS without any
53
- * post-install copy step.
47
+ * In compiled mode this resolves to `core/` (one level above `core/out/utils/repo.js`'s `out/`). In source mode it's
48
+ * the same `core/` directly above `core/utils/repo.ts`. Used to locate package-bundled assets (dictionary data) that
49
+ * live under the workspace root, NOT the repo root — so that `npm install @mailwoman/core` ships those assets alongside
50
+ * the JS without any post-install copy step.
54
51
  */
55
52
  const CorePackageAbsolutePath = resolve(__dirname, "..", __isCompiledTree ? ".." : "");
56
53
  export const corePackagePathBuilder = createPathBuilderResolver(CorePackageAbsolutePath);
@@ -64,9 +61,9 @@ export function tsOutPathBuilder(...pathSegments) {
64
61
  /**
65
62
  * Path builder relative to a address resource dictionary directory.
66
63
  *
67
- * Data lives at `core/data/<resource>/dictionaries/...` so the @mailwoman/core npm package ships
68
- * dictionaries via its `files` glob. Use {@link corePackagePathBuilder} directly for non- dictionary
69
- * assets (e.g. chromium-i18n/ssl-address) that don't have the `dictionaries/` subdir.
64
+ * Data lives at `core/data/<resource>/dictionaries/...` so the @mailwoman/core npm package ships dictionaries via its
65
+ * `files` glob. Use {@link corePackagePathBuilder} directly for non- dictionary assets (e.g. chromium-i18n/ssl-address)
66
+ * that don't have the `dictionaries/` subdir.
70
67
  */
71
68
  export function resourceDictionaryPathBuilder(resource, ...pathSegments) {
72
69
  return corePackagePathBuilder("data", resource, "dictionaries", ...pathSegments);
@@ -1 +1 @@
1
- {"version":3,"file":"repo.js","sourceRoot":"","sources":["../../utils/repo.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,QAAQ,EAAE,OAAO,E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AAM,EAAE,SAAS,EAAE,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,CAAC,CAAA;AAGjG;;GAEG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,yBAAyB,CAAgB,oBAAoB,CAAC,CAAA;AAEjG;;;;;;;;GAQG;AACH,MAAM,uBAAuB,GAAG,OAAO,CAAC,SAAS,EAAE,IAAI,EAAE,gBAAgB,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAA;AACtF,MAAM,CAAC,MAAM,sBAAsB,GAAG,yBAAyB,CAAgB,uBAAuB,CAAC,CAAA;AAEvG;;GAEG;AACH,MAAM,UAAU,gBAAgB,CAC/B,GAAG,YAAe;IAElB,8DAA8D;IAC9D,OAAO,mBAAmB,CAAC,gBAAgB,EAAE,GAAG,YAAY,CAAQ,CAAA;AACrE,CAAC;AAID;;;;;;GAMG;AACH,MAAM,UAAU,6BAA6B,CAC5C,QAAW,EACX,GAAG,YAAe;IAElB,OAAO,sBAAsB,CAAC,MAAM,EAAE,QAAQ,EAAE,cAAc,EAAE,GAAG,YAAY,CAAC,CAAA;AACjF,CAAC;AAED;;GAEG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,mBAAmB,CAAC,MAAM,CAAC,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"vitest.config.d.ts","sourceRoot":"","sources":["../vitest.config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;;AAWH,wBA0BE"}
1
+ {"version":3,"file":"vitest.config.d.ts","sourceRoot":"","sources":["../vitest.config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;;AAYH,wBA0BE"}
@@ -1 +1 @@
1
- {"version":3,"file":"vitest.config.js","sourceRoot":"","sources":["../vitest.config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,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E,sBAAsB,EAAE,WAAW,EAAE,OAAO,CAAC,IAAI,EAAE,wBAAwB,CAAC,EAAE;YACtF,qFAAqF;YACrF,mFAAmF;YACnF,EAAE,IAAI,EAAE,oBAAoB,EAAE,WAAW,EAAE,OAAO,CAAC,IAAI,EAAE,gCAAgC,CAAC,EAAE;YAC5F,EAAE,IAAI,EAAE,aAAa,EAAE,WAAW,EAAE,OAAO,CAAC,IAAI,EAAE,uBAAuB,CAAC,EAAE;SAC5E;KACD;IACD,IAAI,EAAE;QACL,uFAAuF;QACvF,mFAAmF;QACnF,uDAAuD;QACvD,OAAO,EAAE,IAAI;QACb,OAAO,EAAE,CAAC,oBAAoB,EAAE,WAAW,EAAE,YAAY,CAAC;KAC1D;CACD,CAAC,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mailwoman/core",
3
- "version": "4.16.2",
3
+ "version": "5.0.0",
4
4
  "description": "Mailwoman core: tokenization, classification primitives, solver, formatter, resources, filters, solvers, utils.",
5
5
  "license": "AGPL-3.0-only",
6
6
  "repository": {
@@ -8,7 +8,21 @@
8
8
  "url": "https://github.com/sister-software/mailwoman.git",
9
9
  "directory": "core"
10
10
  },
11
+ "files": [
12
+ "out/**/*.js",
13
+ "out/**/*.js.map",
14
+ "out/**/*.d.ts",
15
+ "out/**/*.d.ts.map",
16
+ "data/**/*",
17
+ "THIRD_PARTY_NOTICES.md"
18
+ ],
11
19
  "type": "module",
20
+ "imports": {
21
+ "#*": {
22
+ "development": "./*.ts",
23
+ "default": "./out/*.js"
24
+ }
25
+ },
12
26
  "exports": {
13
27
  "./package.json": "./package.json",
14
28
  ".": "./out/index.js",
@@ -44,11 +58,8 @@
44
58
  "./filters": "./out/filters/index.js",
45
59
  "./filters/*": "./out/filters/*"
46
60
  },
47
- "imports": {
48
- "#*": {
49
- "development": "./*.ts",
50
- "default": "./out/*.js"
51
- }
61
+ "publishConfig": {
62
+ "access": "public"
52
63
  },
53
64
  "dependencies": {
54
65
  "@fragaria/address-formatter": "^6.7.1",
@@ -67,22 +78,11 @@
67
78
  "pino-pretty": "^13.1.3",
68
79
  "pluralize": "^8.0.0",
69
80
  "regenerate": "^1.4.2",
70
- "spliterator": "^2.2.1",
81
+ "spliterator": "^3.1.0",
71
82
  "table": "^6.9.0"
72
83
  },
73
84
  "devDependencies": {
74
85
  "@types/d3-color": "^3.1.3",
75
86
  "@types/d3-scale-chromatic": "^3.1.0"
76
- },
77
- "files": [
78
- "out/**/*.js",
79
- "out/**/*.js.map",
80
- "out/**/*.d.ts",
81
- "out/**/*.d.ts.map",
82
- "data/**/*",
83
- "THIRD_PARTY_NOTICES.md"
84
- ],
85
- "publishConfig": {
86
- "access": "public"
87
87
  }
88
88
  }
@@ -1,15 +0,0 @@
1
- #!/bin/bash
2
-
3
- # see: https://github.com/googlei18n/libaddressinput/wiki/AddressValidationMetadata
4
-
5
- COUNTRY_CODES=$(curl -sLo- 'https://chromium-i18n.appspot.com/ssl-address/data' \
6
- | jq -r .countries);
7
-
8
- TARGET_DIR='./ssl-address'
9
- mkdir -p "${TARGET_DIR}"
10
-
11
- IFS='~'
12
- for CC in $COUNTRY_CODES; do
13
- echo "-- ${CC} --"
14
- curl -sLo- "https://chromium-i18n.appspot.com/ssl-address/data/${CC}" >> "${TARGET_DIR}/${CC}.json"
15
- done
@@ -1,44 +0,0 @@
1
- #!/bin/bash
2
-
3
- set -euo pipefail
4
-
5
- force_flag=false
6
-
7
- # Parse command line arguments
8
- while [[ "$#" -gt 0 ]]; do
9
- case $1 in
10
- --force) force_flag=true ;;
11
- *) echo "Unknown parameter passed: $1"; exit 1 ;;
12
- esac
13
- shift
14
- done
15
-
16
- # Check if the dictionaries directory exists
17
- if [ -d "./dictionaries" ]; then
18
- if [ "$force_flag" = true ]; then
19
- echo "Warning: The dictionaries directory already exists. Deleting it due to --force flag."
20
- rm -rf "./dictionaries"
21
- else
22
- echo "Error: The dictionaries directory already exists. Please remove it first or use the --force flag."
23
- exit 1
24
- fi
25
- fi
26
-
27
- # Create a temporary directory
28
- temp_dir=$(mktemp -d)
29
-
30
- # Clone the libpostal repository into the temporary directory
31
- git clone --depth 1 https://github.com/openvenues/libpostal.git "$temp_dir/libpostal"
32
-
33
- # Alphabetize the contents of each file in the dictionaries directory inside the clone
34
- for file in "$temp_dir/libpostal/resources/dictionaries/"*; do
35
- if [ -f "$file" ]; then
36
- sort "$file" -o "$file"
37
- fi
38
- done
39
-
40
- # Copy the dictionaries directory from the cloned repository
41
- cp -r "$temp_dir/libpostal/resources/dictionaries" .
42
-
43
- # Remove the temporary directory
44
- rm -rf "$temp_dir"
@@ -1,7 +0,0 @@
1
- /**
2
- * @copyright Sister Software
3
- * @license AGPL-3.0
4
- * @author Teffen Ellis, et al.
5
- */
6
- export {};
7
- //# sourceMappingURL=tables.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"tables.d.ts","sourceRoot":"","sources":["../../logging/tables.ts"],"names":[],"mappings":"AAAA;;;;GAIG"}
@@ -1,75 +0,0 @@
1
- /**
2
- * @copyright Sister Software
3
- * @license AGPL-3.0
4
- * @author Teffen Ellis, et al.
5
- */
6
- export {};
7
- // import * as Colorette from "colorette"
8
- // import jsonColorizer from "json-colorizer"
9
- // import { table, type TableUserConfig } from "table"
10
- // /**
11
- // * Options for formatting a JSON object as a table.
12
- // *
13
- // * @category Logging
14
- // */
15
- // export interface TableFormatOptions extends TableUserConfig {
16
- // alphabetize?: boolean
17
- // }
18
- // export type TableDataEntry = [string | number, ...unknown[]]
19
- // /**
20
- // * Convert a JSON object to a loggable table.
21
- // *
22
- // * @category Logging
23
- // */
24
- // export function printJSONAsTable(json: object, options?: TableFormatOptions) {
25
- // const entries = Object.entries(json)
26
- // return printEntriesAsTable(entries, options)
27
- // }
28
- // /**
29
- // * Convert a map of key-value pairs to a loggable table.
30
- // *
31
- // * @category Logging
32
- // */
33
- // export function printEntriesAsTable(
34
- // dataRow: Iterable<TableDataEntry>,
35
- // { alphabetize, ...options }: TableFormatOptions = {}
36
- // ) {
37
- // let formattedRows: unknown[][] = []
38
- // for (const cells of dataRow) {
39
- // if (cells.length === 0) continue
40
- // const formattedRow: unknown[] = []
41
- // if (cells.length === 1) {
42
- // formattedRow.push(Colorette.bold(Colorette.bgRed(cells[0])))
43
- // formattedRows.push(formattedRow)
44
- // continue
45
- // }
46
- // if (cells.length === 2 && (typeof cells[1] === "undefined" || cells[1] === null)) {
47
- // continue
48
- // }
49
- // formattedRow.push(Colorette.magenta(cells[0]))
50
- // for (const cell of cells.slice(1)) {
51
- // if (typeof cell === "undefined" || cell === null) continue
52
- // if (Array.isArray(cell)) {
53
- // formattedRow.push(Colorette.yellow(cell.join(", ")))
54
- // } else if (typeof cell === "object") {
55
- // formattedRow.push(jsonColorizer.colorize(cell))
56
- // } else {
57
- // formattedRow.push(Colorette.yellow(String(cell)))
58
- // }
59
- // }
60
- // formattedRows.push(formattedRow)
61
- // }
62
- // // Table must have a consistent number of cells...
63
- // const maxCells = Math.max(...formattedRows.map((row) => row.length))
64
- // formattedRows = formattedRows.map((row) => {
65
- // if (row.length < maxCells) {
66
- // return [...row, ...new Array(maxCells - row.length).fill("")]
67
- // }
68
- // return row
69
- // })
70
- // if (alphabetize) {
71
- // formattedRows = formattedRows.sort(([a], [b]) => String(a).localeCompare(String(b)))
72
- // }
73
- // return "\n" + table(formattedRows, options)
74
- // }
75
- //# sourceMappingURL=tables.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"tables.js","sourceRoot":"","sources":["../../logging/tables.ts"],"names":[],"mappings":"AAAA;;;;GAIG;;AAEH,yCAAyC;AACzC,6CAA6C;AAC7C,sDAAsD;AAEtD,MAAM;AACN,sDAAsD;AACtD,KAAK;AACL,uBAAuB;AACvB,MAAM;AACN,gEAAgE;AAChE,yBAAyB;AACzB,IAAI;AAEJ,+DAA+D;AAE/D,MAAM;AACN,gDAAgD;AAChD,KAAK;AACL,uBAAuB;AACvB,MAAM;AACN,iFAAiF;AACjF,wCAAwC;AAExC,gDAAgD;AAChD,IAAI;AAEJ,MAAM;AACN,2DAA2D;AAC3D,KAAK;AACL,uBAAuB;AACvB,MAAM;AACN,uCAAuC;AACvC,sCAAsC;AACtC,wDAAwD;AACxD,MAAM;AACN,uCAAuC;AAEvC,kCAAkC;AAClC,qCAAqC;AAErC,uCAAuC;AAEvC,8BAA8B;AAC9B,kEAAkE;AAClE,sCAAsC;AACtC,cAAc;AACd,MAAM;AAEN,wFAAwF;AACxF,cAAc;AACd,MAAM;AAEN,mDAAmD;AAEnD,yCAAyC;AACzC,gEAAgE;AAEhE,gCAAgC;AAChC,2DAA2D;AAC3D,4CAA4C;AAC5C,sDAAsD;AACtD,cAAc;AACd,wDAAwD;AACxD,OAAO;AACP,MAAM;AAEN,qCAAqC;AACrC,KAAK;AAEL,sDAAsD;AACtD,wEAAwE;AACxE,gDAAgD;AAChD,iCAAiC;AACjC,mEAAmE;AACnE,MAAM;AAEN,eAAe;AACf,MAAM;AAEN,sBAAsB;AACtB,yFAAyF;AACzF,KAAK;AAEL,+CAA+C;AAC/C,IAAI"}
package/out/sets.d.ts DELETED
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=sets.d.ts.map
package/out/sets.d.ts.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"sets.d.ts","sourceRoot":"","sources":["../sets.ts"],"names":[],"mappings":""}
package/out/sets.js DELETED
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=sets.js.map
package/out/sets.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"sets.js","sourceRoot":"","sources":["../sets.ts"],"names":[],"mappings":""}