@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
@@ -1 +1 @@
1
- {"version":3,"file":"LeadingAreaDeclassifier.js","sourceRoot":"","sources":["../../solvers/LeadingAreaDeclassifier.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,MAAM,WAAW,GAAG;IACnB,KAAK,EAAE,IAAI,GAAG,CAAiB,CAAC,UAAU,EAAE,QAAQ,EAAE,SAAS,CAAC,CAAC;IACjE,OAAO,EAAE,IAAI,GAAG,CAAiB,CAAC,UAAU,CAAC,CAAC;CACiB,CAAA;AAEhE;;GAEG;AACH,MAAM,OAAO,uBAAuB;IACnC,KAAK,CAAC,OAAsB;QAC3B,KAAK,MAAM,QAAQ,IAAI,OAAO,CAAC,SAAS,EAAE,CAAC;YAC1C,4CAA4C;YAC5C,IAAI,0BAA0B,GAAG,CAAC,CAAA;YAElC,KAAK,MAAM,EAAE,cAAc,EAAE,IAAI,EAAE,IAAI,QAAQ,CAAC,OAAO,EAAE,CAAC;gBACzD,IAAI,WAAW,CAAC,KAAK,CAAC,GAAG,CAAC,cAAc,CAAC;oBAAE,SAAQ;gBACnD,IAAI,WAAW,CAAC,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC;oBAAE,SAAQ;gBAErD,0BAA0B,GAAG,IAAI,CAAC,GAAG,CAAA;YACtC,CAAC;YAED,QAAQ,CAAC,OAAO,GAAG,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,EAAE,cAAc,EAAE,IAAI,EAAE,EAAE,EAAE;gBACvE,MAAM,OAAO,G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AAI,WAAW,CAAC,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC;oBAAE,SAAQ;gBAErD,0BAA0B,GAAG,IAAI,CAAC,GAAG,CAAA;YACtC,CAAC;YAED,QAAQ,CAAC,OAAO,GAAG,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,EAAE,cAAc,EAAE,IAAI,EAAE,EAAE,EAAE;gBACvE,MAAM,OAAO,GAAG,WAAW,CAAC,KAAK,CAAC,GAAG,CAAC,cAAc,CAAC,CAAA;gBAErD,0EAA0E;gBAC1E,OAAO,CAAC,CAAC,OAAO,IAAI,IAAI,CAAC,GAAG,GAAG,0BAA0B,CAAC,CAAA;YAC3D,CAAC,CAAC,CAAA;QACH,CAAC;QAED,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC,CAAA;QACnD,OAAO,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAA;IACxF,CAAC;CACD"}
@@ -5,26 +5,21 @@
5
5
  */
6
6
  import { HashMapSolver, TokenContext } from "@mailwoman/core";
7
7
  /**
8
- * If a 'multistreet' classification was detected then add a new solution which covers all streets
9
- * included.
8
+ * If a 'multistreet' classification was detected then add a new solution which covers all streets included.
10
9
  *
11
- * The ExclusiveCartesianSolver ensures that each public classification can exist only once per
12
- * solution (ie. we can't have two postalcodes).
10
+ * The ExclusiveCartesianSolver ensures that each public classification can exist only once per solution (ie. we can't
11
+ * have two postalcodes).
13
12
  *
14
- * Intersections are the only exception to this rule, so rather than modifying the
15
- * ExclusiveCartesianSolver we use this solver to create the missing intersection solutions (those
16
- * with 2x 'street' labels).
13
+ * Intersections are the only exception to this rule, so rather than modifying the ExclusiveCartesianSolver we use this
14
+ * solver to create the missing intersection solutions (those with 2x 'street' labels).
17
15
  *
18
- * One of the challenges is that there could be many different interpretations of the admin tokens,
19
- * so we need to ensure that each of those permutations is also represented by a distinct
20
- * intersection solution.
16
+ * One of the challenges is that there could be many different interpretations of the admin tokens, so we need to ensure
17
+ * that each of those permutations is also represented by a distinct intersection solution.
21
18
  *
22
- * The solver works by iterating over existing solutions looking for any which identified a street,
23
- * it then clones that solution, removes any tokens less granular than street and attempts to add
24
- * the new street token in its place.
19
+ * The solver works by iterating over existing solutions looking for any which identified a street, it then clones that
20
+ * solution, removes any tokens less granular than street and attempts to add the new street token in its place.
25
21
  *
26
- * Care is taken to ensure that the resulting solution does not contain tokens in overlapping
27
- * positions.
22
+ * Care is taken to ensure that the resulting solution does not contain tokens in overlapping positions.
28
23
  */
29
24
  export declare class MultiStreetSolver extends HashMapSolver {
30
25
  solve(context: TokenContext): void;
@@ -1 +1 @@
1
- {"version":3,"file":"MultiStreetSolver.d.ts","sourceRoot":"","sources":["../../solvers/MultiStreetSolver.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAuB,aAAa,EAAY,YAAY,EAAE,MAAM,iBAAiB,CAAA;AAa5F;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,qBAAa,iBAAkB,SAAQ,aAAa;IACnD,KAAK,CAAC,OAAO,EAAE,YAAY,GAAG,IAAI;CAoElC"}
1
+ {"version":3,"file":"MultiStreetSolver.d.ts","sourceRoot":"","sources":["../../solvers/MultiStreetSolver.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAuB,aAAa,EAAY,YAAY,EAAE,MAAM,iBAAiB,CAAA;AAa5F;;;;;;;;;;;;;;;;GAgBG;AACH,qBAAa,iBAAkB,SAAQ,aAAa;IACnD,KAAK,CAAC,OAAO,EAAE,YAAY,GAAG,IAAI;CAoElC"}
@@ -15,26 +15,21 @@ const MORE_GRANULAR_THAN_STREET = new Set([
15
15
  "venue",
16
16
  ]);
17
17
  /**
18
- * If a 'multistreet' classification was detected then add a new solution which covers all streets
19
- * included.
18
+ * If a 'multistreet' classification was detected then add a new solution which covers all streets included.
20
19
  *
21
- * The ExclusiveCartesianSolver ensures that each public classification can exist only once per
22
- * solution (ie. we can't have two postalcodes).
20
+ * The ExclusiveCartesianSolver ensures that each public classification can exist only once per solution (ie. we can't
21
+ * have two postalcodes).
23
22
  *
24
- * Intersections are the only exception to this rule, so rather than modifying the
25
- * ExclusiveCartesianSolver we use this solver to create the missing intersection solutions (those
26
- * with 2x 'street' labels).
23
+ * Intersections are the only exception to this rule, so rather than modifying the ExclusiveCartesianSolver we use this
24
+ * solver to create the missing intersection solutions (those with 2x 'street' labels).
27
25
  *
28
- * One of the challenges is that there could be many different interpretations of the admin tokens,
29
- * so we need to ensure that each of those permutations is also represented by a distinct
30
- * intersection solution.
26
+ * One of the challenges is that there could be many different interpretations of the admin tokens, so we need to ensure
27
+ * that each of those permutations is also represented by a distinct intersection solution.
31
28
  *
32
- * The solver works by iterating over existing solutions looking for any which identified a street,
33
- * it then clones that solution, removes any tokens less granular than street and attempts to add
34
- * the new street token in its place.
29
+ * The solver works by iterating over existing solutions looking for any which identified a street, it then clones that
30
+ * solution, removes any tokens less granular than street and attempts to add the new street token in its place.
35
31
  *
36
- * Care is taken to ensure that the resulting solution does not contain tokens in overlapping
37
- * positions.
32
+ * Care is taken to ensure that the resulting solution does not contain tokens in overlapping positions.
38
33
  */
39
34
  export class MultiStreetSolver extends HashMapSolver {
40
35
  solve(context) {
@@ -1 +1 @@
1
- {"version":3,"file":"MultiStreetSolver.js","sourceRoot":"","sources":["../../solvers/MultiStreetSolver.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAuB,aAAa,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AAE5F,oEAAoE;AACpE,oDAA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rF,CAAC,CAAC;iBACD,OAAO,CAAC,CAAC,eAAe,EAAE,EAAE;gBAC5B,gEAAgE;gBAEhE,OAAO,IAAI,QAAQ,CAAC,CAAC,GAAG,SAAS,CAAC,OAAO,EAAE,eAAe,CAAC,CAAC,CAAA;YAC7D,CAAC,CAAC,CAAA;QACJ,CAAC,CAAC,CAAA;QAEF,OAAO,CAAC,SAAS,GAAG,CAAC,GAAG,OAAO,CAAC,SAAS,EAAE,GAAG,qBAAqB,CAAC,CAAA;IACrE,CAAC;CACD;AAED,SAAS,MAAM,CAAI,GAAQ,EAAE,SAA4B;IACxD,MAAM,aAAa,GAAG,GAAG;SACvB,MAAM,CAAC,OAAO,CAAC;SACf,MAAM,CAAC,CAAC,GAAG,EAAE,IAAI,EAAE,EAAE;QACrB,MAAM,GAAG,GAAG,SAAS,CAAC,IAAI,CAAC,CAAA;QAE3B,IAAI,CAAC,GAAG;YAAE,OAAO,GAAG,CAAA;QAEpB,OAAO,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,EAAE,IAAI,CAAC,CAAA;IAC/C,CAAC,EAAE,IAAI,GAAG,EAAE,CAAC;SACZ,MAAM,EAAE,CAAA;IAEV,OAAO,KAAK,CAAC,IAAI,CAAC,aAAa,CAAC,CAAA;AACjC,CAAC"}
@@ -5,8 +5,8 @@
5
5
  */
6
6
  import type { Solver, SolverContext } from "@mailwoman/core";
7
7
  /**
8
- * Applies a penalty to solutions where the postcode may have recieved a high score with an uncommon
9
- * position in the address.
8
+ * Applies a penalty to solutions where the postcode may have recieved a high score with an uncommon position in the
9
+ * address.
10
10
  *
11
11
  * E.g. rua godinho de faria 1200
12
12
  */
@@ -1 +1 @@
1
- {"version":3,"file":"PostcodePositionPenalty.d.ts","sourceRoot":"","sources":["../../solvers/PostcodePositionPenalty.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAI5D;;;;;GAKG;AACH,qBAAa,uBAAwB,YAAW,MAAM;IACrD,KAAK,CAAC,EAAE,SAAS,EAAE,EAAE,aAAa,GAAG,IAAI;CAmBzC"}
1
+ {"version":3,"file":"PostcodePositionPenalty.d.ts","sourceRoot":"","sources":["../../solvers/PostcodePositionPenalty.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAI5D;;;;;GAKG;AACH,qBAAa,uBAAwB,YAAW,MAAM;IACrD,KAAK,CAAC,EAAE,SAAS,EAAE,EAAE,aAAa,GAAG,IAAI;CAqBzC"}
@@ -5,8 +5,8 @@
5
5
  */
6
6
  const basePenalty = 0.1;
7
7
  /**
8
- * Applies a penalty to solutions where the postcode may have recieved a high score with an uncommon
9
- * position in the address.
8
+ * Applies a penalty to solutions where the postcode may have recieved a high score with an uncommon position in the
9
+ * address.
10
10
  *
11
11
  * E.g. rua godinho de faria 1200
12
12
  */
@@ -1 +1 @@
1
- {"version":3,"file":"PostcodePositionPenalty.js","sourceRoot":"","sources":["../../solvers/PostcodePositionPenalty.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,MAAM,WAAW,GAAG,GAAG,CAAA;AAEvB;;;;;GAKG;AACH,MAAM,OAAO,uBAAuB;IACnC,KAAK,CAAC,EAAE,SAAS,EAAiB;QACjC,KAAK,MAAM,QAAQ,IAAI,SAAS,EAAE,CAAC;YAClC,oEAAoE;YACpE,MAAM,QAAQ,GAAG,QAAQ,CAAC,IAAI,CAAC,UAAU,CAAC,CAAA;YAC1C,IAAI,CAAC,QAAQ;gBAAE,SAAQ;YAEvB,8DAA8D;YAC9D,MAAM,WAAW,GAAG,QAAQ,CAAC,IAAI,CAAC,cAAc,CAAC,CAAA;YACjD,IAAI,WAAW;gBAAE,SAAQ;YAEzB,yFAAyF;YACzF,MAAM,WAAW,GAAG,QAAQ,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAA;YAEpD,IAAI,WAAW,KAAK,CAAC,IAAI,WAAW,IAAI,CAAC;gBAAE,SAAQ;YAEnD,wBAAwB;YACxB,QAAQ,CAAC,OAAO,IAAI,WAAW,CAAA;QAChC,CAAC;IACF,CAAC;CACD"}
1
+ {"version":3,"file":"PostcodePositionPenalty.js","sourceRoot":"","sources":["../../solvers/PostcodePositionPenalty.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,MAAM,WAAW,GAAG,GAAG,CAAA;AAEvB;;;;;GAKG;AACH,MAAM,OAAO,uBAAuB;IACnC,KAAK,CAAC,EAAE,SAAS,EAAiB;QACjC,KAAK,MAAM,QAAQ,IAAI,SAAS,EAAE,CAAC;YAClC,oEAAoE;YACpE,MAAM,QAAQ,GAAG,QAAQ,CAAC,IAAI,CAAC,UAAU,CAAC,CAAA;YAE1C,IAAI,CAAC,QAAQ;gBAAE,SAAQ;YAEvB,8DAA8D;YAC9D,MAAM,WAAW,GAAG,QAAQ,CAAC,IAAI,CAAC,cAAc,CAAC,CAAA;YAEjD,IAAI,WAAW;gBAAE,SAAQ;YAEzB,yFAAyF;YACzF,MAAM,WAAW,GAAG,QAAQ,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAA;YAEpD,IAAI,WAAW,KAAK,CAAC,IAAI,WAAW,IAAI,CAAC;gBAAE,SAAQ;YAEnD,wBAAwB;YACxB,QAAQ,CAAC,OAAO,IAAI,WAAW,CAAA;QAChC,CAAC;IACF,CAAC;CACD"}
@@ -81,13 +81,11 @@ export declare class Span extends Graph<Span> {
81
81
  * Returns the distance between two Spans
82
82
  *
83
83
  * @todo Use graph to find prev and next spans for a more accurate result
84
- *
85
84
  * @todo Or base 'distance' on word distance (slop) rather than characters
86
85
  */
87
86
  distance(that: Pick<Span, "start" | "end">): number;
88
87
  /**
89
- * Returns the coverage of the span, i.e. the number of characters covered by the span and its
90
- * children.
88
+ * Returns the coverage of the span, i.e. the number of characters covered by the span and its children.
91
89
  */
92
90
  get coverage(): number;
93
91
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"Span.d.ts","sourceRoot":"","sources":["../../tokenization/Span.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAMH,OAAO,EACN,KAAK,cAAc,EACnB,KAAK,mBAAmB,EACxB,uBAAuB,EACvB,MAAM,qCAAqC,CAAA;AAC5C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAA;AAC5D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAA;AAC1E,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAA;AACtE,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAA;AAIlC,MAAM,WAAW,mBAAmB;IACnC,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,eAAe,CAAC,EAAE,QAAQ,CAAC,cAAc,CAAC,CAAA;IAC1C,QAAQ,CAAC,EAAE,QAAQ,CAAC,IAAI,CAAC,CAAA;CACzB;AAED,QAAA,MAAM,OAAO,EAAE,OAAO,MAAyB,CAAA;AAE/C,MAAM,WAAW,cAAc;IAE9B,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,MAAM,CAAA;IACb,GAAG,EAAE,MAAM,CAAA;IACX,UAAU,EAAE,MAAM,CAAA;IAClB,eAAe,EAAE,mBAAmB,EAAE,CAAA;IACtC,QAAQ,EAAE,cAAc,EAAE,CAAA;IAC1B,OAAO,EAAE,cAAc,EAAE,CAAA;CACzB;AAED;;GAEG;AACH,qBAAa,IAAK,SAAQ,KAAK,CAAC,IAAI,CAAC;;IAEpC;;OAEG;IACI,KAAK,EAAE,MAAM,CAAA;IAEpB;;OAEG;IACI,GAAG,EAAG,MAAM,CAAA;IAEnB;;OAEG;IACH,SAAS,CAAC,MAAM,CAAC,SAAS,SAAI;IAE9B;;OAEG;IACH,QAA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CAAC,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,OAAO,GAAG,KAAK,CAAC,GAAG,MAAM;IAU1D;;OAEG;IACH,IAAW,QAAQ,IAAI,MAAM,CAW5B;IAED;;OAEG;IACH,IAAW,SAAS,IAAI,WAAW,CAAC,WAAW,CAAC,qBAAqB,GAAG,mBAAmB,CAAC,CAAC,CAwB5F;IAED;;OAEG;IACI,MAAM,IAAI,cAAc;IAiBf,QAAQ;IAWxB;;OAEG;IACH,MAAM,CAAC,eAAe,CAAC,GAAG,KAAK,EAAE,IAAI,EAAE;CAavC;AAED,MAAM,MAAM,QAAQ,GAAG,kBAAkB,GAAG,SAAS,GAAG,OAAO,GAAG,cAAc,GAAG,SAAS,GAAG,aAAa,CAAA;AAE5G;;;;GAIG;AACH,eAAO,MAAM,eAAe,EAAE,SAAS,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,CAAC,EAYvE,CAAA"}
@@ -116,7 +116,6 @@ export class Span extends Graph {
116
116
  * Returns the distance between two Spans
117
117
  *
118
118
  * @todo Use graph to find prev and next spans for a more accurate result
119
- *
120
119
  * @todo Or base 'distance' on word distance (slop) rather than characters
121
120
  */
122
121
  distance(that) {
@@ -128,8 +127,7 @@ export class Span extends Graph {
128
127
  return this.start - that.end;
129
128
  }
130
129
  /**
131
- * Returns the coverage of the span, i.e. the number of characters covered by the span and its
132
- * children.
130
+ * Returns the coverage of the span, i.e. the number of characters covered by the span and its children.
133
131
  */
134
132
  get coverage() {
135
133
  if (this.children.size) {
@@ -1 +1 @@
1
- {"version":3,"file":"Span.js","sourceRoot":"","sources":["../../tokenization/Span.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,iGAAiG;AACjG,gGAAgG;AAChG,+FAA+F;AAC/F,wEAAwE;AACxE,OAAO,EAGN,uBAAuB,GACvB,MAAM,qCAAqC,CAAA;AAI5C,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAA;AAElC,MAAM,eAAe,GAAG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E,IAAI,CAAC,IAAI,KAAK,CAAC,OAAO,EAAE,EAAE,CAAC;YACzC,IAAI,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC;gBAClB,IAAI,CAAC,gBAAgB,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAE,CAAC,CAAA;YACzC,CAAC;YAED,IAAI,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC;gBAClB,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAE,CAAC,CAAA;YACrC,CAAC;QACF,CAAC;QAED,OAAO,KAAK,CAAA;IACb,CAAC;;AAKF;;;;GAIG;AACH,MAAM,CAAC,MAAM,eAAe,GAAiD;IAC5E,+CAA+C;IAC/C,CAAC,OAAO,EAAE,SAAS,CAAC;IAEpB,8GAA8G;IAC9G,CAAC,oCAAoC,EAAE,aAAa,CAAC;IAErD,8CAA8C;IAC9C,CAAC,eAAe,EAAE,OAAO,CAAC;IAE1B,gEAAgE;IAChE,CAAC,kBAAkB,EAAE,cAAc,CAAC;CACpC,CAAA"}
@@ -27,8 +27,7 @@ export declare class TokenContext {
27
27
  /**
28
28
  * Evaluate and rank the solutions.
29
29
  *
30
- * This method is called after the solver has generated solutions, modifying the solutions
31
- * in-place.
30
+ * This method is called after the solver has generated solutions, modifying the solutions in-place.
32
31
  */
33
32
  evaluateAndRank(solutionLimit: number): void;
34
33
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../tokenization/context.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAGN,KAAK,kBAAkB,EACvB,KAAK,QAAQ,EACb,MAAM,wBAAwB,CAAA;AAE/B,OAAO,EAAE,KAAK,cAAc,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAGrD,MAAM,WAAW,sBAAsB;IACtC,IAAI,EAAE,cAAc,CAAA;IACpB,SAAS,EA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AAM,IAAI,sBAAsB;CAQvC"}
@@ -57,8 +57,7 @@ export class TokenContext {
57
57
  /**
58
58
  * Evaluate and rank the solutions.
59
59
  *
60
- * This method is called after the solver has generated solutions, modifying the solutions
61
- * in-place.
60
+ * This method is called after the solver has generated solutions, modifying the solutions in-place.
62
61
  */
63
62
  evaluateAndRank(solutionLimit) {
64
63
  if (this.#solutions.length === 0)
@@ -1 +1 @@
1
- {"version":3,"file":"context.js","sourceRoot":"","sources":["../../tokenization/context.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EACN,qBAAqB,EACrB,oCAAoC,GAGpC,MAAM,wBAAwB,CAAA;AAC/B,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAC1C,OAAO,EAAuB,IAAI,EAAE,MAAM,WAAW,CAAA;AACrD,OAAO,EAAE,kBAAkB,EAAE,4BAA4B,EAAE,oBAAoB,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AASjH;;GAEG;AACH,MAAM,OAAO,YAAY;IACxB,KAAK,CAAO;IACZ,SAAS,GAAW,EAAE,CAAA;IACtB,SAAS,GAAW,CAAC,CAAA;IAErB,UAAU,GAAe,EAAE,CAAA;IAE3B,IAAW,SAAS;QACnB,OAAO,IAAI,CAAC,UAAU,CAAA;IACvB,CAAC;IAED,IAAW,SAAS,CAAC,aAAyB;QAC7C,iFAAiF;QACjF,yDAAyD;QACzD,wDAAwD;QAExD,4DAA4D;QAC5D,wDAAwD;QACxD,KAAK;QACL,IAAI;QAEJ,IAAI,CAAC,UAAU,GAAG,aAAa,CAAA;IAChC,CAAC;IAED,IAAW,IAAI;QACd,OAAO,IAAI,CAAC,KAAK,CAAA;IAClB,CAAC;IAED;;OAEG;IACH,IAAW,QAAQ;QAClB,OAAO,IAAI,CAAC,SAAS,CAAA;IACtB,CAAC;IAED,YAAY,QAAgB,EAAE;QAC7B,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA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
7
  /**
8
- * A pattern matching combining diacritical marks, variation selectors, and other characters that
9
- * are often used in text normalization.
8
+ * A pattern matching combining diacritical marks, variation selectors, and other characters that are often used in text
9
+ * normalization.
10
10
  */
11
11
  const CombiningDiacriticalPattern = regenerate()
12
12
  .add(0x200d) // ZERO WIDTH JOINER (U+200D)
@@ -17,9 +17,8 @@ export interface PermutateOptions {
17
17
  /**
18
18
  * Produce all the possible token groups from adjacent input tokens (without reordering tokens).
19
19
  *
20
- * Example: ['soho', 'new', 'york', 'usa'] [ ['soho', 'new', 'york', 'usa'], ['soho', 'new',
21
- * 'york'], ['soho', 'new'], ['soho'], ['new', 'york', 'usa'], ['new', 'york'], ['new'], ['york',
22
- * 'usa'], ['york'], ['usa'], ]
20
+ * Example: ['soho', 'new', 'york', 'usa'] [ ['soho', 'new', 'york', 'usa'], ['soho', 'new', 'york'], ['soho', 'new'],
21
+ * ['soho'], ['new', 'york', 'usa'], ['new', 'york'], ['new'], ['york', 'usa'], ['york'], ['usa'], ]
23
22
  *
24
23
  * @param spans - The spans to permutate
25
24
  *
@@ -1 +1 @@
1
- {"version":3,"file":"permutate.d.ts","sourceRoot":"","sources":["../../tokenization/permutate.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAiEhC,MAAM,WAAW,gBAAgB;IAChC;;OAEG;IACH,IAAI,EAAE,MAAM,CAAA;IAEZ;;OAEG;IACH,EAAE,EAAE,MAAM,CAAA;CACV;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,QAAQ,CAAC,IAAI,CAAC,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,EAAE,gBAAgB,GAAG,IAAI,EAAE,CAQvF"}
1
+ {"version":3,"file":"permutate.d.ts","sourceRoot":"","sources":["../../tokenization/permutate.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAiEhC,MAAM,WAAW,gBAAgB;IAChC;;OAEG;IACH,IAAI,EAAE,MAAM,CAAA;IAEZ;;OAEG;IACH,EAAE,EAAE,MAAM,CAAA;CACV;AAED;;;;;;;;;GASG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,QAAQ,CAAC,IAAI,CAAC,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,EAAE,gBAAgB,GAAG,IAAI,EAAE,CAQvF"}
@@ -8,8 +8,8 @@ const JOIN_CHAR = " ";
8
8
  /**
9
9
  * Produce all the possible token groups from adjacent input tokens (without reordering tokens)
10
10
  *
11
- * WindowMin: the minimum amount of tokens which can be returned in a single window windowMax: the
12
- * maximum amount of tokens which can be returned in a single window
11
+ * WindowMin: the minimum amount of tokens which can be returned in a single window windowMax: the maximum amount of
12
+ * tokens which can be returned in a single window
13
13
  *
14
14
  * Note: we should honor word boundary delimiters (such as comma) when creating permutations ported:
15
15
  * https://github.com/pelias/placeholder/blob/master/lib/permutations.js
@@ -55,9 +55,8 @@ function permutateRec(prevSpan, currentSpan, windowCur, windowMin, windowMax, pe
55
55
  /**
56
56
  * Produce all the possible token groups from adjacent input tokens (without reordering tokens).
57
57
  *
58
- * Example: ['soho', 'new', 'york', 'usa'] [ ['soho', 'new', 'york', 'usa'], ['soho', 'new',
59
- * 'york'], ['soho', 'new'], ['soho'], ['new', 'york', 'usa'], ['new', 'york'], ['new'], ['york',
60
- * 'usa'], ['york'], ['usa'], ]
58
+ * Example: ['soho', 'new', 'york', 'usa'] [ ['soho', 'new', 'york', 'usa'], ['soho', 'new', 'york'], ['soho', 'new'],
59
+ * ['soho'], ['new', 'york', 'usa'], ['new', 'york'], ['new'], ['york', 'usa'], ['york'], ['usa'], ]
61
60
  *
62
61
  * @param spans - The spans to permutate
63
62
  *
@@ -1 +1 @@
1
- {"version":3,"file":"permutate.js","sourceRoot":"","sources":["../../tokenization/permutate.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,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AAM,EAAE,CAAC;QACb,WAAW,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE;YACzC,YAAY,CAAC,IAAI,EAAE,IAAI,EAAE,SAAS,GAAG,CAAC,EAAE,SAAS,EAAE,SAAS,EAAE,YAAY,CAAC,CAAA;QAC5E,CAAC,CAAC,CAAA;IACH,CAAC;IAED,IAAI,SAAS,IAAI,SAAS,EAAE,CAAC;QAC5B,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;IACxB,CAAC;AACF,CAAC;AAcD;;;;;;;;;GASG;AACH,MAAM,UAAU,SAAS,CAAC,KAAqB,EAAE,EAAE,IAAI,EAAE,EAAE,EAAoB;IAC9E,MAAM,YAAY,GAAW,EAAE,CAAA;IAE/B,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QAC1B,YAAY,CAAC,IAAI,IAAI,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,YAAY,CAAC,CAAA;IAC1D,CAAC;IAED,OAAO,YAAY,CAAA;AACpB,CAAC"}
@@ -18,9 +18,8 @@
18
18
  import type { Span } from "../tokenization/index.js";
19
19
  import type { ComponentTag } from "./component.js";
20
20
  /**
21
- * Sections in Mailwoman are sub-Spans of the tokenized input (split by boundary characters: commas,
22
- * line breaks, etc.). They are surfaced as `Span` instances in `TokenContext.sections`; this alias
23
- * documents the call-site intent.
21
+ * Sections in Mailwoman are sub-Spans of the tokenized input (split by boundary characters: commas, line breaks, etc.).
22
+ * They are surfaced as `Span` instances in `TokenContext.sections`; this alias documents the call-site intent.
24
23
  */
25
24
  export type Section = Span;
26
25
  /**
@@ -28,16 +27,15 @@ export type Section = Span;
28
27
  *
29
28
  * - `rule`: emitted by a legacy rule classifier through the adapter.
30
29
  * - `neural`: emitted by an ONNX-backed sequence classifier.
31
- * - `merged`: synthetic source for a merger that fused proposals from multiple classifiers (rare;
32
- * mostly for telemetry on `merged` ids).
30
+ * - `merged`: synthetic source for a merger that fused proposals from multiple classifiers (rare; mostly for telemetry on
31
+ * `merged` ids).
33
32
  */
34
33
  export type ClassificationProposalSource = "rule" | "neural" | "merged";
35
34
  /**
36
35
  * A typed classification candidate produced by any classifier.
37
36
  *
38
- * Mirrors Mailwoman's pre-refactor per-component output shape with the addition of `source` and
39
- * `source_id` so downstream code can identify the origin of each proposal without consulting
40
- * external state.
37
+ * Mirrors Mailwoman's pre-refactor per-component output shape with the addition of `source` and `source_id` so
38
+ * downstream code can identify the origin of each proposal without consulting external state.
41
39
  */
42
40
  export interface ClassificationProposal {
43
41
  /** Span this proposal applies to. */
@@ -49,19 +47,19 @@ export interface ClassificationProposal {
49
47
  /** Provenance — which classifier family produced this proposal. */
50
48
  source: ClassificationProposalSource;
51
49
  /**
52
- * Identifier of the specific classifier instance. Rule wrappers use the legacy classifier's
53
- * stable id (e.g. `house_number`, `postcode`, `whos_on_first`). Neural classifiers use a
54
- * versioned model id like `neural-v0.3.1-en-us`.
50
+ * Identifier of the specific classifier instance. Rule wrappers use the legacy classifier's stable id (e.g.
51
+ * `house_number`, `postcode`, `whos_on_first`). Neural classifiers use a versioned model id like
52
+ * `neural-v0.3.1-en-us`.
55
53
  */
56
54
  source_id: string;
57
55
  /**
58
- * Solver penalty applied to this proposal. Higher penalty makes the proposal less likely to
59
- * appear in the winning solution.
56
+ * Solver penalty applied to this proposal. Higher penalty makes the proposal less likely to appear in the winning
57
+ * solution.
60
58
  */
61
59
  penalty: number;
62
60
  /**
63
- * Opaque metadata for debugging and telemetry. Never consulted by the solver. Common keys:
64
- * `languages`, `flags`, `legacyClassification`.
61
+ * Opaque metadata for debugging and telemetry. Never consulted by the solver. Common keys: `languages`, `flags`,
62
+ * `legacyClassification`.
65
63
  */
66
64
  metadata?: Record<string, unknown>;
67
65
  }
@@ -79,15 +77,15 @@ export interface ClassifierContext {
79
77
  /**
80
78
  * Plug-in contract every classifier implements.
81
79
  *
82
- * Construction must be cheap; per-classification work runs in {@link classify}. Pre-flight work
83
- * (loading dictionaries, warming up an ONNX session) belongs in the optional `ready()` step.
80
+ * Construction must be cheap; per-classification work runs in {@link classify}. Pre-flight work (loading dictionaries,
81
+ * warming up an ONNX session) belongs in the optional `ready()` step.
84
82
  */
85
83
  export interface ProposalClassifier {
86
84
  /** Stable identifier. Used as `source_id` on emitted proposals. */
87
85
  readonly id: string;
88
86
  /**
89
- * Components this classifier may emit. Enforced — proposals for tags outside this list are
90
- * dropped by the adapter with a warning.
87
+ * Components this classifier may emit. Enforced — proposals for tags outside this list are dropped by the adapter
88
+ * with a warning.
91
89
  */
92
90
  readonly emits: readonly ComponentTag[];
93
91
  /**
@@ -99,14 +97,14 @@ export interface ProposalClassifier {
99
97
  /** Optional async pre-flight. */
100
98
  ready?(): Promise<void>;
101
99
  /**
102
- * Classify a section. Implementations MUST NOT throw — return an empty array on failure and log
103
- * via the project logger.
100
+ * Classify a section. Implementations MUST NOT throw — return an empty array on failure and log via the project
101
+ * logger.
104
102
  */
105
103
  classify(section: Section, context: ClassifierContext): Promise<ClassificationProposal[]>;
106
104
  }
107
105
  /**
108
- * Convenience: synchronous classifier (legacy rule wrappers usually fit here). The adapter wraps
109
- * these into the async `ProposalClassifier` interface so the solver path stays uniform.
106
+ * Convenience: synchronous classifier (legacy rule wrappers usually fit here). The adapter wraps these into the async
107
+ * `ProposalClassifier` interface so the solver path stays uniform.
110
108
  */
111
109
  export interface SyncProposalClassifier {
112
110
  readonly id: string;
@@ -1 +1 @@
1
- {"version":3,"file":"classifier.d.ts","sourceRoot":"","sources":["../../types/classifier.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,0BAA0B,CAAA;AACpD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAElD;;;;GAIG;AACH,MAAM,MAAM,OAAO,GAAG,IAAI,CAAA;AAE1B;;;;;;;GAOG;AACH,MAAM,MAAM,4BAA4B,GA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IACnE,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;IAEnB;;;OAGG;IACH,QAAQ,CAAC,KAAK,EAAE,SAAS,YAAY,EAAE,CAAA;IAEvC;;;;OAIG;IACH,QAAQ,CAAC,OAAO,EAAE,SAAS,CAAC,MAAM,GAAG,GAAG,CAAC,EAAE,CAAA;IAE3C,iCAAiC;IACjC,KAAK,CAAC,IAAI,OAAO,CAAC,IAAI,CAAC,CAAA;IAEvB;;;OAGG;IACH,QAAQ,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC,sBAAsB,EAAE,CAAC,CAAA;CACzF;AAED;;;GAGG;AACH,MAAM,WAAW,sBAAsB;IACtC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;IACnB,QAAQ,CAAC,KAAK,EAAE,SAAS,YAAY,EAAE,CAAA;IACvC,QAAQ,CAAC,OAAO,EAAE,SAAS,CAAC,MAAM,GAAG,GAAG,CAAC,EAAE,CAAA;IAC3C,YAAY,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,iBAAiB,GAAG,sBAAsB,EAAE,CAAA;CACpF"}
@@ -20,12 +20,11 @@
20
20
  * The canonical address component tag union, ordered by phase and locale.
21
21
  *
22
22
  * - Universal (Phase 1): country, region, locality, dependent_locality, postcode, subregion
23
- * - Street-level (Phase 2): house_number, street, street_prefix*, street_suffix, intersection_a/b,
24
- * unit
23
+ * - Street-level (Phase 2): house_number, street, street_prefix*, street_suffix, intersection_a/b, unit
25
24
  * - Venue-level (Phase 3): venue, attention, po_box
26
25
  * - FR-specific: cedex
27
- * - JP-specific (Phase 6, declared but unused before then): prefecture, municipality, district,
28
- * block, sub_block, building_number, building_name
26
+ * - JP-specific (Phase 6, declared but unused before then): prefecture, municipality, district, block, sub_block,
27
+ * building_number, building_name
29
28
  */
30
29
  export declare const COMPONENT_TAGS: readonly ["country", "region", "locality", "dependent_locality", "postcode", "subregion", "house_number", "street", "street_prefix", "street_prefix_particle", "street_suffix", "intersection_a", "intersection_b", "unit", "venue", "attention", "po_box", "cedex", "prefecture", "municipality", "district", "block", "sub_block", "building_number", "building_name"];
31
30
  /** Union of every recognized address component tag. */
@@ -33,10 +32,10 @@ export type ComponentTag = (typeof COMPONENT_TAGS)[number];
33
32
  /**
34
33
  * BIO-encoded label set: one `O` plus a `B-` / `I-` pair per tag.
35
34
  *
36
- * Used as the per-token output alphabet for the sequence-labeling neural model. Inference decodes a
37
- * stream of these back into character-aligned `ClassificationProposal`s.
35
+ * Used as the per-token output alphabet for the sequence-labeling neural model. Inference decodes a stream of these
36
+ * back into character-aligned `ClassificationProposal`s.
38
37
  */
39
38
  export declare const BIO_LABELS: readonly ["O", ...("B-country" | "B-house_number" | "B-locality" | "B-postcode" | "B-region" | "B-street_prefix" | "B-street_suffix" | "B-street" | "B-unit" | "B-venue" | "B-attention" | "B-municipality" | "B-district" | "B-dependent_locality" | "B-subregion" | "B-street_prefix_particle" | "B-intersection_a" | "B-intersection_b" | "B-po_box" | "B-cedex" | "B-prefecture" | "B-block" | "B-sub_block" | "B-building_number" | "B-building_name" | "I-country" | "I-house_number" | "I-locality" | "I-postcode" | "I-region" | "I-street_prefix" | "I-street_suffix" | "I-street" | "I-unit" | "I-venue" | "I-attention" | "I-municipality" | "I-district" | "I-dependent_locality" | "I-subregion" | "I-street_prefix_particle" | "I-intersection_a" | "I-intersection_b" | "I-po_box" | "I-cedex" | "I-prefecture" | "I-block" | "I-sub_block" | "I-building_number" | "I-building_name")[]];
40
39
  /** Union of every BIO label. */
41
- export type BioLabel = (typeof BIO_LABELS)[number];
40
+ export type BIOLabel = (typeof BIO_LABELS)[number];
42
41
  //# sourceMappingURL=component.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../types/component.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH;;;;;;;;;;GAUG;AACH,eAAO,MAAM,cAAc,0WA+BjB,CAAA;AAEV,uDAAuD;AACvD,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,CAAC,CAAA;AAE1D;;;;;GAKG;AACH,eAAO,MAAM,UAAU,02BAAwF,CAAA;AAE/G,gCAAgC;AAChC,MAAM,MAAM,QAAQ,GAAG,CAAC,OAAO,UAAU,CAAC,CAAC,MAAM,CAAC,CAAA"}
1
+ {"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../types/component.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH;;;;;;;;;GASG;AACH,eAAO,MAAM,cAAc,0WA+BjB,CAAA;AAEV,uDAAuD;AACvD,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,CAAC,CAAA;AAE1D;;;;;GAKG;AACH,eAAO,MAAM,UAAU,02BAAwF,CAAA;AAE/G,gCAAgC;AAChC,MAAM,MAAM,QAAQ,GAAG,CAAC,OAAO,UAAU,CAAC,CAAC,MAAM,CAAC,CAAA"}
@@ -20,12 +20,11 @@
20
20
  * The canonical address component tag union, ordered by phase and locale.
21
21
  *
22
22
  * - Universal (Phase 1): country, region, locality, dependent_locality, postcode, subregion
23
- * - Street-level (Phase 2): house_number, street, street_prefix*, street_suffix, intersection_a/b,
24
- * unit
23
+ * - Street-level (Phase 2): house_number, street, street_prefix*, street_suffix, intersection_a/b, unit
25
24
  * - Venue-level (Phase 3): venue, attention, po_box
26
25
  * - FR-specific: cedex
27
- * - JP-specific (Phase 6, declared but unused before then): prefecture, municipality, district,
28
- * block, sub_block, building_number, building_name
26
+ * - JP-specific (Phase 6, declared but unused before then): prefecture, municipality, district, block, sub_block,
27
+ * building_number, building_name
29
28
  */
30
29
  export const COMPONENT_TAGS = [
31
30
  // Universal
@@ -62,8 +61,8 @@ export const COMPONENT_TAGS = [
62
61
  /**
63
62
  * BIO-encoded label set: one `O` plus a `B-` / `I-` pair per tag.
64
63
  *
65
- * Used as the per-token output alphabet for the sequence-labeling neural model. Inference decodes a
66
- * stream of these back into character-aligned `ClassificationProposal`s.
64
+ * Used as the per-token output alphabet for the sequence-labeling neural model. Inference decodes a stream of these
65
+ * back into character-aligned `ClassificationProposal`s.
67
66
  */
68
67
  export const BIO_LABELS = ["O", ...COMPONENT_TAGS.flatMap((tag) => [`B-${tag}`, `I-${tag}`])];
69
68
  //# sourceMappingURL=component.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"component.js","sourceRoot":"","sources":["../../types/component.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG;IAC7B,YAAY;IACZ,SAAS;IACT,QAAQ;IACR,UAAU;IACV,oBAAoB;IACpB,UAAU;IACV,WAAW;IACX,eAAe;IACf,cAAc;IACd,QAAQ;IACR,eAAe;IACf,wBAAwB;IACxB,eAAe;IACf,gBAAgB;IAChB,gBAAgB;IAChB,MAAM;IACN,cAAc;IACd,OAAO;IACP,WAAW;IACX,QAAQ;IACR,cAAc;IACd,OAAO;IACP,yDAAyD;IACzD,YAAY;IACZ,cAAc;IACd,UAAU;IACV,OAAO;IACP,WAAW;IACX,iBAAiB;IACjB,eAAe;CACN,CAAA;AAKV;;;;;GAKG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,GAAG,EAAE,GAAG,cAAc,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,KAAK,GAAG,EAAE,EAAE,KAAK,GAAG,EAAE,CAAU,CAAC,CAAU,CAAA"}
1
+ {"version":3,"file":"component.js","sourceRoot":"","sources":["../../types/component.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG;IAC7B,YAAY;IACZ,SAAS;IACT,QAAQ;IACR,UAAU;IACV,oBAAoB;IACpB,UAAU;IACV,WAAW;IACX,eAAe;IACf,cAAc;IACd,QAAQ;IACR,eAAe;IACf,wBAAwB;IACxB,eAAe;IACf,gBAAgB;IAChB,gBAAgB;IAChB,MAAM;IACN,cAAc;IACd,OAAO;IACP,WAAW;IACX,QAAQ;IACR,cAAc;IACd,OAAO;IACP,yDAAyD;IACzD,YAAY;IACZ,cAAc;IACd,UAAU;IACV,OAAO;IACP,WAAW;IACX,iBAAiB;IACjB,eAAe;CACN,CAAA;AAKV;;;;;GAKG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,GAAG,EAAE,GAAG,cAAc,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,KAAK,GAAG,EAAE,EAAE,KAAK,GAAG,EAAE,CAAU,CAAC,CAAU,CAAA"}
@@ -18,21 +18,21 @@
18
18
  import type { Classification } from "../classification/index.js";
19
19
  import type { ComponentTag } from "./component.js";
20
20
  /**
21
- * Translate a legacy classification tag into a canonical {@link ComponentTag}, or `null` if the
22
- * legacy tag has no externally visible component equivalent.
21
+ * Translate a legacy classification tag into a canonical {@link ComponentTag}, or `null` if the legacy tag has no
22
+ * externally visible component equivalent.
23
23
  */
24
24
  export declare function legacyClassificationToComponentTag(legacy: Classification): ComponentTag | null;
25
25
  /**
26
- * The full set of legacy tags that have a `ComponentTag` mapping. Useful for adapter wrappers that
27
- * filter the span graph by "which legacy tags do I expect this classifier to produce."
26
+ * The full set of legacy tags that have a `ComponentTag` mapping. Useful for adapter wrappers that filter the span
27
+ * graph by "which legacy tags do I expect this classifier to produce."
28
28
  */
29
29
  export declare const MAPPED_LEGACY_CLASSIFICATIONS: Classification[];
30
30
  /**
31
- * Translate a canonical {@link ComponentTag} into a legacy {@link Classification}, or `null` when the
32
- * component has no legacy equivalent (e.g. JP-specific tags that don't exist in the rule path).
31
+ * Translate a canonical {@link ComponentTag} into a legacy {@link Classification}, or `null` when the component has no
32
+ * legacy equivalent (e.g. JP-specific tags that don't exist in the rule path).
33
33
  *
34
- * Used by the parser-level proposal pipeline to write surviving neural proposals back into the
35
- * `TokenContext`'s span graph as classifications the solver can read.
34
+ * Used by the parser-level proposal pipeline to write surviving neural proposals back into the `TokenContext`'s span
35
+ * graph as classifications the solver can read.
36
36
  */
37
37
  export declare function componentTagToLegacyClassification(component: ComponentTag): Classification | null;
38
38
  //# sourceMappingURL=mapping.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"mapping.d.ts","sourceRoot":"","sources":["../../types/mapping.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAA;AAChE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAqBlD;;;GAGG;AACH,wBAAgB,kCAAkC,CAAC,MAAM,EAAE,cAAc,GAAG,YAAY,GAAG,IAAI,CAE9F;AAED;;;GAGG;AACH,eAAO,MAAM,6BAA6B,EAAuC,cAAc,EAAE,CAAA;AAejG;;;;;;GAMG;AACH,wBAAgB,kCAAkC,CAAC,SAAS,EAAE,YAAY,GAAG,cAAc,GAAG,IAAI,CAEjG"}
1
+ {"version":3,"file":"mapping.d.ts","sourceRoot":"","sources":["../../types/mapping.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAA;AAChE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAqBlD;;;GAGG;AACH,wBAAgB,kCAAkC,CAAC,MAAM,EAAE,cAAc,GAAG,YAAY,GAAG,IAAI,CAE9F;AAED;;;GAGG;AACH,eAAO,MAAM,6BAA6B,EAAuC,cAAc,EAAE,CAAA;AAiBjG;;;;;;GAMG;AACH,wBAAgB,kCAAkC,CAAC,SAAS,EAAE,YAAY,GAAG,cAAc,GAAG,IAAI,CAEjG"}