@mailwoman/codex 4.3.0 → 4.5.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 (78) hide show
  1. package/out/address-system-conventions.d.ts +2 -2
  2. package/out/address-system-conventions.js +4 -4
  3. package/out/au/delivery-service.d.ts +165 -0
  4. package/out/au/delivery-service.d.ts.map +1 -0
  5. package/out/au/delivery-service.js +132 -0
  6. package/out/au/delivery-service.js.map +1 -0
  7. package/out/au/index.d.ts +15 -0
  8. package/out/au/index.d.ts.map +1 -0
  9. package/out/au/index.js +15 -0
  10. package/out/au/index.js.map +1 -0
  11. package/out/au/level-designator.d.ts +150 -0
  12. package/out/au/level-designator.d.ts.map +1 -0
  13. package/out/au/level-designator.js +156 -0
  14. package/out/au/level-designator.js.map +1 -0
  15. package/out/au/postcode.d.ts +40 -0
  16. package/out/au/postcode.d.ts.map +1 -0
  17. package/out/au/postcode.js +37 -0
  18. package/out/au/postcode.js.map +1 -0
  19. package/out/au/state.d.ts +31 -0
  20. package/out/au/state.d.ts.map +1 -0
  21. package/out/au/state.js +31 -0
  22. package/out/au/state.js.map +1 -0
  23. package/out/country/country.d.ts +18 -17
  24. package/out/country/country.d.ts.map +1 -1
  25. package/out/country/country.js +17 -16
  26. package/out/country/country.js.map +1 -1
  27. package/out/country/index.d.ts +1 -1
  28. package/out/country/index.d.ts.map +1 -1
  29. package/out/country/index.js +1 -1
  30. package/out/country/index.js.map +1 -1
  31. package/out/country/names.d.ts +1 -1
  32. package/out/country/names.js +1 -1
  33. package/out/fr/cedex.d.ts +35 -0
  34. package/out/fr/cedex.d.ts.map +1 -0
  35. package/out/fr/cedex.js +43 -0
  36. package/out/fr/cedex.js.map +1 -0
  37. package/out/fr/index.d.ts +1 -0
  38. package/out/fr/index.d.ts.map +1 -1
  39. package/out/fr/index.js +1 -0
  40. package/out/fr/index.js.map +1 -1
  41. package/out/index.d.ts +3 -1
  42. package/out/index.d.ts.map +1 -1
  43. package/out/index.js +2 -0
  44. package/out/index.js.map +1 -1
  45. package/out/nz/delivery-service.d.ts +102 -0
  46. package/out/nz/delivery-service.d.ts.map +1 -0
  47. package/out/nz/delivery-service.js +110 -0
  48. package/out/nz/delivery-service.js.map +1 -0
  49. package/out/nz/index.d.ts +12 -0
  50. package/out/nz/index.d.ts.map +1 -0
  51. package/out/nz/index.js +12 -0
  52. package/out/nz/index.js.map +1 -0
  53. package/out/nz/postcode.d.ts +31 -0
  54. package/out/nz/postcode.d.ts.map +1 -0
  55. package/out/nz/postcode.js +28 -0
  56. package/out/nz/postcode.js.map +1 -0
  57. package/out/postcode-systems.d.ts +1 -1
  58. package/out/postcode-systems.d.ts.map +1 -1
  59. package/out/postcode-systems.js +4 -0
  60. package/out/postcode-systems.js.map +1 -1
  61. package/out/us/floor-designator.d.ts +104 -0
  62. package/out/us/floor-designator.d.ts.map +1 -0
  63. package/out/us/floor-designator.js +84 -0
  64. package/out/us/floor-designator.js.map +1 -0
  65. package/out/us/index.d.ts +6 -2
  66. package/out/us/index.d.ts.map +1 -1
  67. package/out/us/index.js +6 -2
  68. package/out/us/index.js.map +1 -1
  69. package/out/us/military-address.d.ts +143 -0
  70. package/out/us/military-address.d.ts.map +1 -0
  71. package/out/us/military-address.js +156 -0
  72. package/out/us/military-address.js.map +1 -0
  73. package/out/us/street-directional.d.ts +4 -2
  74. package/out/us/street-directional.d.ts.map +1 -1
  75. package/out/us/street-directional.js +4 -2
  76. package/out/us/street-directional.js.map +1 -1
  77. package/out/us/zipcode.d.ts +1 -1
  78. package/package.json +4 -2
@@ -0,0 +1,156 @@
1
+ /**
2
+ * @copyright Sister Software
3
+ * @license AGPL-3.0
4
+ * @author Teffen Ellis, et al.
5
+ *
6
+ * Australia Post AMAS floor/level designators — the sub-premise vocabulary that names a FLOOR of a
7
+ * building rather than a numbered unit on that floor: `Level 3`, `L 12`, `Ground Floor`,
8
+ * `Mezzanine`.
9
+ *
10
+ * Sourcing (accessed 2026-06-12):
11
+ *
12
+ * - **Australia Post AMAS** (Address Matching Approval System) defines the Level Designator type and
13
+ * its approved abbreviation. The verbatim AMAS description: "LEVEL" is the full word; "L" is
14
+ * the approved abbreviation. The standard phrase format is `LEVEL <number>`, e.g. "LEVEL 3"
15
+ * or "L 3" (abbreviation always uppercase in AMAS output). Australia Post's own barcode
16
+ * addressing booklet (SAP 8838883) lists "LEVEL" and "L" as the level type; the Correct
17
+ * Addressing brochure (SAP 8833878, Nov 2022) gives the example `LEVEL 3 / 60 MARGARET ST /
18
+ * SYDNEY NSW 2000`. The AMAS Data Extract Format document (v4.2) confirms "LEVEL" → "L" as
19
+ * the sole level abbreviation pair.
20
+ * - **Ground floor** is treated by AMAS as `LEVEL G` (with the identifier "G"). Australia Post's
21
+ * addressing guidelines state that ground floor should be written as "LEVEL G"; the full word
22
+ * "GROUND" is a recognized alias for the identifier, not a separate designator type.
23
+ * - **Mezzanine**, **Lower Ground**, and **Upper Ground** appear in AS 4590.1-2017 (the Australian
24
+ * Standard for interchange of client information) as recognized level-type values alongside
25
+ * LEVEL and GROUND. AS 4590.1-2017 Table 3 "Level type": B (Basement), G (Ground), MEZZANINE
26
+ * (M), LG (Lower Ground), UG (Upper Ground), L (Level), OD (Observation Deck), P (Parking /
27
+ * Podium), RT (Rooftop). These are the values a Geocoded National Address File (GNAF) record
28
+ * may carry in the LEVEL_TYPE_CODE column, which mirrors the AP AMAS level-type vocabulary.
29
+ * - "LVL" and "LG" appear as widely-recognized surface variants in real AU addresses (Open Addresses
30
+ * AU export, accessed via OpenAddresses) though AS 4590.1-2017 and AMAS canonicalize to "L"
31
+ * and "LG" respectively; the variants are included in {@link AU_LEVEL_DESIGNATOR_VARIANTS} so
32
+ * the parser can RECOGNIZE them without synthesizing them.
33
+ *
34
+ * @see {@link https://auspost.com.au/sending/guidelines/addressing-guidelines Australia Post addressing guidelines}
35
+ * @see {@link https://auspost.com.au/content/dam/auspost_corp/media/documents/correct-addressing.pdf Australia Post Correct Addressing brochure (Nov 2022)}
36
+ * @see {@link https://auspost.com.au/content/dam/auspost_corp/media/documents/Barcode_hints_tips.pdf Australia Post barcode addressing booklet}
37
+ * @see {@link https://www.iso.org/standard/67840.html AS 4590.1-2017 — Interchange of client information}
38
+ */
39
+ /**
40
+ * AMAS / AS 4590.1-2017 level-type table (Table 3). Verbatim codes; see the module header for
41
+ * provenance. Ordered with the most-common forms first for match priority.
42
+ */
43
+ export const AU_LEVEL_DESIGNATORS = [
44
+ { code: "L", name: "LEVEL", abbreviation: "L", requiresNumber: true },
45
+ { code: "G", name: "GROUND", abbreviation: "G", requiresNumber: false },
46
+ { code: "B", name: "BASEMENT", abbreviation: "B", requiresNumber: true },
47
+ { code: "M", name: "MEZZANINE", abbreviation: "M", requiresNumber: false },
48
+ { code: "LG", name: "LOWER GROUND", abbreviation: "LG", requiresNumber: false },
49
+ { code: "UG", name: "UPPER GROUND", abbreviation: "UG", requiresNumber: false },
50
+ { code: "OD", name: "OBSERVATION DECK", abbreviation: "OD", requiresNumber: false },
51
+ { code: "P", name: "PARKING", abbreviation: "P", requiresNumber: true },
52
+ { code: "RT", name: "ROOFTOP", abbreviation: "RT", requiresNumber: false },
53
+ ];
54
+ /**
55
+ * Recognized surface variants for each AMAS level code — the canonical code/abbreviation pair PLUS
56
+ * additional forms found in real AU addresses (Open Addresses export) that the parser must
57
+ * RECOGNIZE but the synthesis layer should not favor over the canonical form.
58
+ *
59
+ * Synthesis uses only the first element (the AMAS canonical surface). Recognition accepts all.
60
+ */
61
+ export const AU_LEVEL_DESIGNATOR_VARIANTS = {
62
+ L: ["L", "LEVEL", "LVL", "LEVL", "LEV"],
63
+ G: ["G", "GROUND", "GRD", "GF", "GROUND FLOOR"],
64
+ B: ["B", "BASEMENT", "BSMT", "LOWER LEVEL"],
65
+ M: ["M", "MEZZANINE", "MEZZ", "MEZZANINE LEVEL"],
66
+ LG: ["LG", "LOWER GROUND", "LOWER GROUND FLOOR"],
67
+ UG: ["UG", "UPPER GROUND", "UPPER GROUND FLOOR"],
68
+ OD: ["OD", "OBSERVATION DECK"],
69
+ P: ["P", "PARKING", "PODIUM"],
70
+ RT: ["RT", "ROOFTOP", "ROOF"],
71
+ };
72
+ /**
73
+ * Inverse lookup: every variant (abbreviation or surface form) → the canonical AMAS code.
74
+ * Lowercase-keyed for case-insensitive matching (`"level"` → `"L"`, `"bsmt"` → `"B"`).
75
+ */
76
+ export const AU_LEVEL_DESIGNATOR_LOOKUP = (() => {
77
+ // Structural integrity check: every code must have at least one non-empty variant. Throw at
78
+ // module load time so a malformed table entry fails loud rather than silently producing an empty
79
+ // lexicon (the "builder must round-trip loud" rule from the task contract).
80
+ for (const { code } of AU_LEVEL_DESIGNATORS) {
81
+ const variants = AU_LEVEL_DESIGNATOR_VARIANTS[code];
82
+ if (!variants || variants.length === 0) {
83
+ throw new Error(`[codex/au/level-designator] code "${code}" has no variants in AU_LEVEL_DESIGNATOR_VARIANTS`);
84
+ }
85
+ for (const v of variants) {
86
+ if (!v || !v.trim()) {
87
+ throw new Error(`[codex/au/level-designator] code "${code}" has an empty or blank variant in AU_LEVEL_DESIGNATOR_VARIANTS`);
88
+ }
89
+ }
90
+ }
91
+ const out = new Map();
92
+ for (const { code } of AU_LEVEL_DESIGNATORS) {
93
+ for (const variant of AU_LEVEL_DESIGNATOR_VARIANTS[code]) {
94
+ const key = variant.toLowerCase();
95
+ if (!out.has(key))
96
+ out.set(key, code);
97
+ }
98
+ }
99
+ return out;
100
+ })();
101
+ // One regex per level code. Multi-word variants ("LOWER GROUND", "GROUND FLOOR") are matched
102
+ // before their shorter constituents by ordering the variant list longest-first within each code.
103
+ const LEVEL_MATCHERS = (() => {
104
+ const rows = [];
105
+ for (const { code, requiresNumber } of AU_LEVEL_DESIGNATORS) {
106
+ const variants = [...AU_LEVEL_DESIGNATOR_VARIANTS[code]]
107
+ .sort((a, b) => b.length - a.length)
108
+ .map((v) => v.replace(/[.*+?^${}()|[\]\\]/g, "\\$&").replace(/\s+/g, String.raw `\s+`));
109
+ const alts = variants.join("|");
110
+ // Identifier: optional alphanumeric (B2, 12, G). requiresNumber=true → identifier required.
111
+ const tail = requiresNumber
112
+ ? String.raw `\s+([A-Za-z]?\d[\dA-Za-z-]*|\d[\dA-Za-z-]*)`
113
+ : String.raw `(?:\s+([A-Za-z]?\d[\dA-Za-z-]*|\d[\dA-Za-z-]*))?`;
114
+ rows.push({ code, requiresNumber, re: new RegExp(String.raw `^\s*(${alts})${tail}\s*$`, "i") });
115
+ }
116
+ return rows;
117
+ })();
118
+ /**
119
+ * If `input` is a standalone AU level designator phrase ("Level 3", "L 12", "Ground Floor",
120
+ * "Mezzanine", "B 2"), return the canonical code and identifier. Null otherwise. Malformed entries
121
+ * (a requires-number designator with no identifier, e.g. bare "Level") return null — the builder
122
+ * throws loudly when a row in a table violates this constraint.
123
+ */
124
+ export function matchAuLevelDesignator(input) {
125
+ if (typeof input !== "string")
126
+ return null;
127
+ for (const { code, re } of LEVEL_MATCHERS) {
128
+ const m = re.exec(input);
129
+ if (!m)
130
+ continue;
131
+ return {
132
+ matched: m[1].trim(),
133
+ code,
134
+ ...(m[2] ? { identifier: m[2] } : {}),
135
+ };
136
+ }
137
+ return null;
138
+ }
139
+ /** Type-predicate: does the input look like a standalone AU level designator phrase? */
140
+ export function isAuLevelDesignator(input) {
141
+ return matchAuLevelDesignator(input) !== null;
142
+ }
143
+ /**
144
+ * Normalize a recognized level phrase to the AMAS canonical form (`"level 3"` → `"L 3"`, `"ground
145
+ * floor"` → `"G"`). Returns the input unchanged if it isn't a level designator phrase. Throws if a
146
+ * row in {@link AU_LEVEL_DESIGNATORS} is malformed (requires-number entry with no abbreviation or
147
+ * empty name) — the builder must surface structural defects loudly.
148
+ */
149
+ export function normalizeAuLevelDesignator(input) {
150
+ const m = matchAuLevelDesignator(input);
151
+ if (!m)
152
+ return input;
153
+ const row = AU_LEVEL_DESIGNATORS.find((r) => r.code === m.code);
154
+ return m.identifier ? `${row.abbreviation} ${m.identifier.toUpperCase()}` : row.abbreviation;
155
+ }
156
+ //# sourceMappingURL=level-designator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"level-designator.js","sourceRoot":"","sources":["../../au/level-designator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AAwBH;;;GAGG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG;IACnC,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,OAAO,EAAE,YAAY,EAAE,GAAG,EAAE,cAAc,EAAE,IAAI,EAAE;IACrE,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,QAAQ,EAAE,YAAY,EAAE,GAAG,EAAE,cAAc,EAAE,KAAK,EAAE;IACvE,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,YAAY,EAAE,GAAG,EAAE,cAAc,EAAE,IAAI,EAAE;IACxE,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,WAAW,EAAE,YAAY,EAAE,GAAG,EAAE,cAAc,EAAE,KAAK,EAAE;IAC1E,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,cAAc,EAAE,YAAY,EAAE,IAAI,EAAE,cAAc,EAAE,KAAK,EAAE;IAC/E,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,cAAc,EAAE,YAAY,EAAE,IAAI,EAAE,cAAc,EAAE,KAAK,EAAE;IAC/E,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,kBAAkB,EAAE,YAAY,EAAE,IAAI,EAAE,cAAc,EAAE,KAAK,EAAE;IACnF,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,SAAS,EAAE,YAAY,EAAE,GAAG,EAAE,cAAc,EAAE,IAAI,EAAE;IACvE,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,YAAY,EAAE,IAAI,EAAE,cAAc,EAAE,KAAK,EAAE;CAC1B,CAAA;AAKj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AAC,CAAC,IAAI,CAAE,CAAA;IAChE,OAAO,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,YAAY,IAAI,CAAC,CAAC,UAAU,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,YAAY,CAAA;AAC7F,CAAC"}
@@ -0,0 +1,40 @@
1
+ /**
2
+ * @copyright Sister Software
3
+ * @license AGPL-3.0
4
+ * @author Teffen Ellis, et al.
5
+ *
6
+ * Australian postcodes: four digits, written at the end of the last address line after the locality
7
+ * and state (`SYDNEY NSW 2000`). Sourcing (accessed 2026-06-11):
8
+ *
9
+ * - Australia Post's Correct Addressing brochure (SAP 8833878, Nov 2022) — every example carries a
10
+ * 4-digit postcode and the brochure references envelopes "with preprinted four postcode
11
+ * squares".
12
+ * - The barcode addressing booklet documents the coarse first-digit → state prior: "if the Postcode
13
+ * falls in the range 3000-3999 the State abbreviation will be VIC; 4000-4999 will be QLD,
14
+ * etc. … Exceptions to this include ACT Postcodes and Postcodes located on State borders."
15
+ * Because the booklet only enumerates VIC and QLD and flags exceptions, this module
16
+ * deliberately does NOT ship a full first-digit → state table — the shape is the contract,
17
+ * the geographic prior is the gazetteer's job.
18
+ *
19
+ * Note the shape collides with New Zealand's (also 4 digits) — `candidateSystemsForPostcode`
20
+ * returns both, and that ambiguity is by design (shape test, not membership test).
21
+ * @see {@link https://auspost.com.au/content/dam/auspost_corp/media/documents/correct-addressing.pdf Australia Post Correct Addressing brochure (Nov 2022)}
22
+ * @see {@link https://auspost.com.au/content/dam/auspost_corp/media/documents/Barcode_hints_tips.pdf Australia Post barcode addressing booklet}
23
+ */
24
+ import type { Tagged } from "type-fest";
25
+ /**
26
+ * An Australian postcode: four digits.
27
+ *
28
+ * @category Postal
29
+ * @type string
30
+ * @title Australian postcode
31
+ * @pattern ^\d{4}$
32
+ */
33
+ export type AuPostcode = Tagged<string, "AuPostcode">;
34
+ /** The AU postcode shape: exactly four digits. */
35
+ export declare const AU_POSTCODE_PATTERN: RegExp;
36
+ /** Normalize a postcode surface form (trim only — AU has no country-prefix courtesy form). */
37
+ export declare function normalizeAuPostcode(raw: unknown): AuPostcode | null;
38
+ /** Type-predicate for a (normalized) Australian postcode. */
39
+ export declare function isAuPostcode(input: unknown): input is AuPostcode;
40
+ //# sourceMappingURL=postcode.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"postcode.d.ts","sourceRoot":"","sources":["../../au/postcode.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAA;AAEvC;;;;;;;GAOG;AACH,MAAM,MAAM,UAAU,GAAG,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,CAAA;AAErD,kDAAkD;AAClD,eAAO,MAAM,mBAAmB,QAAY,CAAA;AAE5C,8FAA8F;AAC9F,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,OAAO,GAAG,UAAU,GAAG,IAAI,CAInE;AAED,6DAA6D;AAC7D,wBAAgB,YAAY,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,UAAU,CAEhE"}
@@ -0,0 +1,37 @@
1
+ /**
2
+ * @copyright Sister Software
3
+ * @license AGPL-3.0
4
+ * @author Teffen Ellis, et al.
5
+ *
6
+ * Australian postcodes: four digits, written at the end of the last address line after the locality
7
+ * and state (`SYDNEY NSW 2000`). Sourcing (accessed 2026-06-11):
8
+ *
9
+ * - Australia Post's Correct Addressing brochure (SAP 8833878, Nov 2022) — every example carries a
10
+ * 4-digit postcode and the brochure references envelopes "with preprinted four postcode
11
+ * squares".
12
+ * - The barcode addressing booklet documents the coarse first-digit → state prior: "if the Postcode
13
+ * falls in the range 3000-3999 the State abbreviation will be VIC; 4000-4999 will be QLD,
14
+ * etc. … Exceptions to this include ACT Postcodes and Postcodes located on State borders."
15
+ * Because the booklet only enumerates VIC and QLD and flags exceptions, this module
16
+ * deliberately does NOT ship a full first-digit → state table — the shape is the contract,
17
+ * the geographic prior is the gazetteer's job.
18
+ *
19
+ * Note the shape collides with New Zealand's (also 4 digits) — `candidateSystemsForPostcode`
20
+ * returns both, and that ambiguity is by design (shape test, not membership test).
21
+ * @see {@link https://auspost.com.au/content/dam/auspost_corp/media/documents/correct-addressing.pdf Australia Post Correct Addressing brochure (Nov 2022)}
22
+ * @see {@link https://auspost.com.au/content/dam/auspost_corp/media/documents/Barcode_hints_tips.pdf Australia Post barcode addressing booklet}
23
+ */
24
+ /** The AU postcode shape: exactly four digits. */
25
+ export const AU_POSTCODE_PATTERN = /^\d{4}$/;
26
+ /** Normalize a postcode surface form (trim only — AU has no country-prefix courtesy form). */
27
+ export function normalizeAuPostcode(raw) {
28
+ if (typeof raw !== "string")
29
+ return null;
30
+ const s = raw.trim();
31
+ return AU_POSTCODE_PATTERN.test(s) ? s : null;
32
+ }
33
+ /** Type-predicate for a (normalized) Australian postcode. */
34
+ export function isAuPostcode(input) {
35
+ return typeof input === "string" && AU_POSTCODE_PATTERN.test(input);
36
+ }
37
+ //# sourceMappingURL=postcode.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"postcode.js","sourceRoot":"","sources":["../../au/postcode.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAcH,kDAAkD;AAClD,MAAM,CAAC,MAAM,mBAAmB,GAAG,SAAS,CAAA;AAE5C,8FAA8F;AAC9F,MAAM,UAAU,mBAAmB,CAAC,GAAY;IAC/C,IAAI,OAAO,GAAG,KAAK,QAAQ;QAAE,OAAO,IAAI,CAAA;IACxC,MAAM,CAAC,GAAG,GAAG,CAAC,IAAI,EAAE,CAAA;IACpB,OAAO,mBAAmB,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAE,CAAgB,CAAC,CAAC,CAAC,IAAI,CAAA;AAC9D,CAAC;AAED,6DAA6D;AAC7D,MAAM,UAAU,YAAY,CAAC,KAAc;IAC1C,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,mBAAmB,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;AACpE,CAAC"}
@@ -0,0 +1,31 @@
1
+ /**
2
+ * @copyright Sister Software
3
+ * @license AGPL-3.0
4
+ * @author Teffen Ellis, et al.
5
+ *
6
+ * Australian states and territories (ISO 3166-2:AU). Australia Post's addressing guidelines put the
7
+ * state abbreviation on the last line between the locality and the 4-digit postcode ("Line 3
8
+ * should contain the locality or suburb, state and postcode and be written in capital letters" —
9
+ * addressing guidelines, accessed 2026-06-11), e.g. `SYDNEY NSW 2000`, `BUNBURY WA 6230`, `EUROA
10
+ * VIC 3664`. The abbreviation set is the ISO 3166-2:AU subdivision codes, which are the same
11
+ * codes Australia Post's own examples use (NSW, VIC, WA, QLD, ACT appear across the addressing
12
+ * guidelines and the barcode booklet).
13
+ * @see {@link https://auspost.com.au/sending/guidelines/addressing-guidelines Australia Post addressing guidelines}
14
+ * @see {@link https://www.iso.org/obp/ui/#iso:code:3166:AU ISO 3166-2:AU}
15
+ */
16
+ /** State/territory abbreviation → full name (ISO 3166-2:AU subdivision set). */
17
+ export declare const AU_STATE_ABBREVIATIONS: {
18
+ readonly ACT: "Australian Capital Territory";
19
+ readonly NSW: "New South Wales";
20
+ readonly NT: "Northern Territory";
21
+ readonly QLD: "Queensland";
22
+ readonly SA: "South Australia";
23
+ readonly TAS: "Tasmania";
24
+ readonly VIC: "Victoria";
25
+ readonly WA: "Western Australia";
26
+ };
27
+ /** An Australian state/territory abbreviation as written on the last address line. */
28
+ export type AuStateAbbreviation = keyof typeof AU_STATE_ABBREVIATIONS;
29
+ /** Type-predicate for an AU state/territory abbreviation (case-insensitive). */
30
+ export declare function isAuStateAbbreviation(input: unknown): input is AuStateAbbreviation;
31
+ //# sourceMappingURL=state.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"state.d.ts","sourceRoot":"","sources":["../../au/state.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,gFAAgF;AAChF,eAAO,MAAM,sBAAsB;;;;;;;;;CASQ,CAAA;AAE3C,sFAAsF;AACtF,MAAM,MAAM,mBAAmB,GAAG,MAAM,OAAO,sBAAsB,CAAA;AAErE,gFAAgF;AAChF,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,mBAAmB,CAElF"}
@@ -0,0 +1,31 @@
1
+ /**
2
+ * @copyright Sister Software
3
+ * @license AGPL-3.0
4
+ * @author Teffen Ellis, et al.
5
+ *
6
+ * Australian states and territories (ISO 3166-2:AU). Australia Post's addressing guidelines put the
7
+ * state abbreviation on the last line between the locality and the 4-digit postcode ("Line 3
8
+ * should contain the locality or suburb, state and postcode and be written in capital letters" —
9
+ * addressing guidelines, accessed 2026-06-11), e.g. `SYDNEY NSW 2000`, `BUNBURY WA 6230`, `EUROA
10
+ * VIC 3664`. The abbreviation set is the ISO 3166-2:AU subdivision codes, which are the same
11
+ * codes Australia Post's own examples use (NSW, VIC, WA, QLD, ACT appear across the addressing
12
+ * guidelines and the barcode booklet).
13
+ * @see {@link https://auspost.com.au/sending/guidelines/addressing-guidelines Australia Post addressing guidelines}
14
+ * @see {@link https://www.iso.org/obp/ui/#iso:code:3166:AU ISO 3166-2:AU}
15
+ */
16
+ /** State/territory abbreviation → full name (ISO 3166-2:AU subdivision set). */
17
+ export const AU_STATE_ABBREVIATIONS = {
18
+ ACT: "Australian Capital Territory",
19
+ NSW: "New South Wales",
20
+ NT: "Northern Territory",
21
+ QLD: "Queensland",
22
+ SA: "South Australia",
23
+ TAS: "Tasmania",
24
+ VIC: "Victoria",
25
+ WA: "Western Australia",
26
+ };
27
+ /** Type-predicate for an AU state/territory abbreviation (case-insensitive). */
28
+ export function isAuStateAbbreviation(input) {
29
+ return typeof input === "string" && Object.hasOwn(AU_STATE_ABBREVIATIONS, input.toUpperCase());
30
+ }
31
+ //# sourceMappingURL=state.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"state.js","sourceRoot":"","sources":["../../au/state.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,gFAAgF;AAChF,MAAM,CAAC,MAAM,sBAAsB,GAAG;IACrC,GAAG,EAAE,8BAA8B;IACnC,GAAG,EAAE,iBAAiB;IACtB,EAAE,EAAE,oBAAoB;IACxB,GAAG,EAAE,YAAY;IACjB,EAAE,EAAE,iBAAiB;IACrB,GAAG,EAAE,UAAU;IACf,GAAG,EAAE,UAAU;IACf,EAAE,EAAE,mBAAmB;CACmB,CAAA;AAK3C,gFAAgF;AAChF,MAAM,UAAU,qBAAqB,CAAC,KAAc;IACnD,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,MAAM,CAAC,MAAM,CAAC,sBAAsB,EAAE,KAAK,CAAC,WAAW,EAAE,CAAC,CAAA;AAC/F,CAAC"}
@@ -4,19 +4,19 @@
4
4
  * @author Teffen Ellis, et al.
5
5
  *
6
6
  * Country recognition for the `country` parity lever. The ISO 3166-1 base (names + alpha-2/alpha-3)
7
- * is salvaged from isp-nexus `spatial/countries` ({@link ./names.ts}, {@link ./codes.ts}); this adds
8
- * the layer ISO doesn't carry — the **surface forms** addresses actually use (endonyms + common
9
- * abbreviations: "USA"/"United States"/"U.S."; "Deutschland"/"Germany"; "España"/"Spain") — plus a
10
- * {@link matchCountry} resolver the corpus country-shard + parsing reuse. Same shape as the other
11
- * codex matchers (street-suffix, directional, po-box).
7
+ * is salvaged from isp-nexus `spatial/countries` ({@link ./names.ts}, {@link ./codes.ts}); this
8
+ * adds the layer ISO doesn't carry — the **surface forms** addresses actually use (endonyms +
9
+ * common abbreviations: "USA"/"United States"/"U.S."; "Deutschland"/"Germany"; "España"/"Spain")
10
+ * — plus a {@link matchCountry} resolver the corpus country-shard + parsing reuse. Same shape as
11
+ * the other codex matchers (street-suffix, directional, po-box).
12
12
  */
13
13
  import { Alpha3ToCountryRecord, CountryISO2, type CountryISO3 } from "./codes.js";
14
14
  import { type CountryName } from "./names.js";
15
15
  /**
16
16
  * Common real-address surface forms per ISO 3166-1 alpha-2, **canonical English name first** then
17
- * endonym + abbreviations. Curated for the corpus locales + frequent countries (NOT a full 249-entry
18
- * variant table — the ISO base below catches the canonical name/code for everything else). Forms are
19
- * matched case-insensitively; the first entry is the preferred render form.
17
+ * endonym + abbreviations. Curated for the corpus locales + frequent countries (NOT a full
18
+ * 249-entry variant table — the ISO base below catches the canonical name/code for everything
19
+ * else). Forms are matched case-insensitively; the first entry is the preferred render form.
20
20
  */
21
21
  export declare const COUNTRY_SURFACE_FORMS: {
22
22
  readonly US: readonly ["United States", "USA", "US", "U.S.A.", "U.S.", "United States of America", "America"];
@@ -36,11 +36,11 @@ export declare const COUNTRY_SURFACE_FORMS: {
36
36
  readonly JP: readonly ["Japan", "日本", "Nippon", "JP", "JPN"];
37
37
  };
38
38
  export type CountrySurfaceIso2 = keyof typeof COUNTRY_SURFACE_FORMS;
39
- /** alpha-2 → canonical English name (inverted from the salvaged CountryISO2 enum). */
39
+ /** Alpha-2 → canonical English name (inverted from the salvaged CountryISO2 enum). */
40
40
  export declare const ISO2_TO_NAME: ReadonlyMap<string, CountryName>;
41
41
  /**
42
- * Any recognized country surface form / canonical name / alpha-2 / alpha-3 → alpha-2 code. Built once
43
- * at module load, lowercase-keyed. Canonical names + codes from the ISO base, plus the curated
42
+ * Any recognized country surface form / canonical name / alpha-2 / alpha-3 → alpha-2 code. Built
43
+ * once at module load, lowercase-keyed. Canonical names + codes from the ISO base, plus the curated
44
44
  * surface forms (surface forms win on collision — they're the address-facing spellings).
45
45
  */
46
46
  export declare const COUNTRY_LOOKUP: ReadonlyMap<string, string>;
@@ -51,15 +51,16 @@ export interface CountryMatch {
51
51
  matched: string;
52
52
  }
53
53
  /**
54
- * Resolve a token (surface form, canonical name, alpha-2, or alpha-3) to a country. Case-insensitive.
55
- * Returns null if unrecognized. Multi-word names ("United States", "Great Britain") must be passed as
56
- * the whole phrase — the caller decides the span; this matches it.
54
+ * Resolve a token (surface form, canonical name, alpha-2, or alpha-3) to a country.
55
+ * Case-insensitive. Returns null if unrecognized. Multi-word names ("United States", "Great
56
+ * Britain") must be passed as the whole phrase — the caller decides the span; this matches it.
57
57
  */
58
58
  export declare function matchCountry(token: string | null | undefined): CountryMatch | null;
59
59
  /** Case-insensitive check: is the token any recognized country form? */
60
60
  export declare function isCountryToken(token: unknown): boolean;
61
- /** The preferred render forms for an alpha-2 (canonical first), for synth shards. Empty if none curated. */
61
+ /** The preferred render forms for an alpha-2 (canonical first), for synth shards. Empty if none
62
+ curated. */
62
63
  export declare function countrySurfaceForms(iso2: string): readonly string[];
63
- export type { CountryName, CountryISO3 };
64
- export { CountryISO2, Alpha3ToCountryRecord };
64
+ export { Alpha3ToCountryRecord, CountryISO2 };
65
+ export type { CountryISO3, CountryName };
65
66
  //# sourceMappingURL=country.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"country.d.ts","sourceRoot":"","sources":["../../country/country.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,qBAAqB,EAAE,WAAW,EAAE,KAAK,WAAW,EAAE,MAAM,YAAY,CAAA;AACjF,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,YAAY,CAAA;AAE7C;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;CAgB6B,CAAA;AAE/D,MAAM,MAAM,kBAAkB,GAAG,MAAM,OAAO,qBAAqB,CAAA;AAEnE,sFAAsF;AACtF,eAAO,MAAM,YAAY,EAAE,WAAW,CAAC,MAAM,EAAE,WAAW,CAEzD,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,cAAc,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAkBnD,CAAA;AAEJ,wGAAwG;AACxG,MAAM,WAAW,YAAY;IAC5B,IAAI,EAAE,MAAM,CAAA;IACZ,SAAS,EAAE,WAAW,GAAG,SAAS,CAAA;IAClC,OAAO,EAAE,MAAM,CAAA;CACf;AAED;;;;GAIG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OAAO,CAEtD;AAED;WACW;AACX,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,MAAM,EAAE,CAEnE;AAED,OAAO,EAAE,qBAAqB,EAAE,WAAW,EAAE,CAAA;AAC7C,YAAY,EAAE,WAAW,EAAE,WAAW,EAAE,CAAA"}
@@ -4,19 +4,19 @@
4
4
  * @author Teffen Ellis, et al.
5
5
  *
6
6
  * Country recognition for the `country` parity lever. The ISO 3166-1 base (names + alpha-2/alpha-3)
7
- * is salvaged from isp-nexus `spatial/countries` ({@link ./names.ts}, {@link ./codes.ts}); this adds
8
- * the layer ISO doesn't carry — the **surface forms** addresses actually use (endonyms + common
9
- * abbreviations: "USA"/"United States"/"U.S."; "Deutschland"/"Germany"; "España"/"Spain") — plus a
10
- * {@link matchCountry} resolver the corpus country-shard + parsing reuse. Same shape as the other
11
- * codex matchers (street-suffix, directional, po-box).
7
+ * is salvaged from isp-nexus `spatial/countries` ({@link ./names.ts}, {@link ./codes.ts}); this
8
+ * adds the layer ISO doesn't carry — the **surface forms** addresses actually use (endonyms +
9
+ * common abbreviations: "USA"/"United States"/"U.S."; "Deutschland"/"Germany"; "España"/"Spain")
10
+ * — plus a {@link matchCountry} resolver the corpus country-shard + parsing reuse. Same shape as
11
+ * the other codex matchers (street-suffix, directional, po-box).
12
12
  */
13
13
  import { Alpha3ToCountryRecord, CountryISO2 } from "./codes.js";
14
14
  import {} from "./names.js";
15
15
  /**
16
16
  * Common real-address surface forms per ISO 3166-1 alpha-2, **canonical English name first** then
17
- * endonym + abbreviations. Curated for the corpus locales + frequent countries (NOT a full 249-entry
18
- * variant table — the ISO base below catches the canonical name/code for everything else). Forms are
19
- * matched case-insensitively; the first entry is the preferred render form.
17
+ * endonym + abbreviations. Curated for the corpus locales + frequent countries (NOT a full
18
+ * 249-entry variant table — the ISO base below catches the canonical name/code for everything
19
+ * else). Forms are matched case-insensitively; the first entry is the preferred render form.
20
20
  */
21
21
  export const COUNTRY_SURFACE_FORMS = {
22
22
  US: ["United States", "USA", "US", "U.S.A.", "U.S.", "United States of America", "America"],
@@ -35,11 +35,11 @@ export const COUNTRY_SURFACE_FORMS = {
35
35
  MX: ["Mexico", "México", "MX", "MEX"],
36
36
  JP: ["Japan", "日本", "Nippon", "JP", "JPN"],
37
37
  };
38
- /** alpha-2 → canonical English name (inverted from the salvaged CountryISO2 enum). */
38
+ /** Alpha-2 → canonical English name (inverted from the salvaged CountryISO2 enum). */
39
39
  export const ISO2_TO_NAME = new Map(Object.entries(CountryISO2).map(([name, code]) => [code, name]));
40
40
  /**
41
- * Any recognized country surface form / canonical name / alpha-2 / alpha-3 → alpha-2 code. Built once
42
- * at module load, lowercase-keyed. Canonical names + codes from the ISO base, plus the curated
41
+ * Any recognized country surface form / canonical name / alpha-2 / alpha-3 → alpha-2 code. Built
42
+ * once at module load, lowercase-keyed. Canonical names + codes from the ISO base, plus the curated
43
43
  * surface forms (surface forms win on collision — they're the address-facing spellings).
44
44
  */
45
45
  export const COUNTRY_LOOKUP = (() => {
@@ -67,9 +67,9 @@ export const COUNTRY_LOOKUP = (() => {
67
67
  return out;
68
68
  })();
69
69
  /**
70
- * Resolve a token (surface form, canonical name, alpha-2, or alpha-3) to a country. Case-insensitive.
71
- * Returns null if unrecognized. Multi-word names ("United States", "Great Britain") must be passed as
72
- * the whole phrase — the caller decides the span; this matches it.
70
+ * Resolve a token (surface form, canonical name, alpha-2, or alpha-3) to a country.
71
+ * Case-insensitive. Returns null if unrecognized. Multi-word names ("United States", "Great
72
+ * Britain") must be passed as the whole phrase — the caller decides the span; this matches it.
73
73
  */
74
74
  export function matchCountry(token) {
75
75
  if (!token || typeof token !== "string")
@@ -83,9 +83,10 @@ export function matchCountry(token) {
83
83
  export function isCountryToken(token) {
84
84
  return typeof token === "string" && COUNTRY_LOOKUP.has(token.trim().toLowerCase());
85
85
  }
86
- /** The preferred render forms for an alpha-2 (canonical first), for synth shards. Empty if none curated. */
86
+ /** The preferred render forms for an alpha-2 (canonical first), for synth shards. Empty if none
87
+ curated. */
87
88
  export function countrySurfaceForms(iso2) {
88
89
  return COUNTRY_SURFACE_FORMS[iso2.toUpperCase()] ?? [];
89
90
  }
90
- export { CountryISO2, Alpha3ToCountryRecord };
91
+ export { Alpha3ToCountryRecord, CountryISO2 };
91
92
  //# sourceMappingURL=country.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"country.js","sourceRoot":"","sources":["../../country/country.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,qBAAqB,EAAE,WAAW,EAAoB,MAAM,YAAY,CAAA;AACjF,OAAO,EAAoB,MAAM,YAAY,CAAA;AAE7C;;;;;GAKG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG;IACpC,EAAE,EAAE,CAAC,eAAe,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,0BAA0B,EAAE,SAAS,CAAC;IAC3F,EAAE,EAAE,CAAC,SAAS,EAAE,aAAa,EAAE,IAAI,EAAE,KAAK,EAAE,6BAA6B,CAAC;IAC1E,EAAE,EAAE,CAAC,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,iBAAiB,CAAC;IAC9C,EAAE,EAAE,CAAC,gBAAgB,EAAE,IAAI,EAAE,eAAe,EAAE,SAAS,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,CAAC;IACjF,EAAE,EAAE,CAAC,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,CAAC;IAC9C,EAAE,EAAE,CAAC,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,CAAC;IACpC,EAAE,EAAE,CAAC,aAAa,EAAE,WAAW,EAAE,iBAAiB,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,CAAC;IAC3E,EAAE,EAAE,CAAC,QAAQ,EAAE,IAAI,EAAE,KAAK,CAAC;IAC3B,EAAE,EAAE,CAAC,WAAW,EAAE,IAAI,EAAE,KAAK,C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AAE,CAAA;AAC1E,CAAC;AAED,wEAAwE;AACxE,MAAM,UAAU,cAAc,CAAC,KAAc;IAC5C,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,cAAc,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC,CAAA;AACnF,CAAC;AAED;WACW;AACX,MAAM,UAAU,mBAAmB,CAAC,IAAY;IAC/C,OAAQ,qBAA2D,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,IAAI,EAAE,CAAA;AAC9F,CAAC;AAED,OAAO,EAAE,qBAAqB,EAAE,WAAW,EAAE,CAAA"}
@@ -5,7 +5,7 @@
5
5
  *
6
6
  * ISO 3166-1 country reference + surface-form recognition (the `country` parity lever).
7
7
  */
8
- export * from "./names.js";
9
8
  export * from "./codes.js";
10
9
  export * from "./country.js";
10
+ export * from "./names.js";
11
11
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../country/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,cAAc,YAAY,CAAA;AAC1B,cAAc,YAAY,CAAA;AAC1B,cAAc,cAAc,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../country/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,cAAc,YAAY,CAAA;AAC1B,cAAc,cAAc,CAAA;AAC5B,cAAc,YAAY,CAAA"}
@@ -5,7 +5,7 @@
5
5
  *
6
6
  * ISO 3166-1 country reference + surface-form recognition (the `country` parity lever).
7
7
  */
8
- export * from "./names.js";
9
8
  export * from "./codes.js";
10
9
  export * from "./country.js";
10
+ export * from "./names.js";
11
11
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../country/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,cAAc,YAAY,CAAA;AAC1B,cAAc,YAAY,CAAA;AAC1B,cAAc,cAAc,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../country/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,cAAc,YAAY,CAAA;AAC1B,cAAc,cAAc,CAAA;AAC5B,cAAc,YAAY,CAAA"}
@@ -7,8 +7,8 @@
7
7
  * List of all countries in the world.
8
8
  *
9
9
  * @category Geographic
10
- * @internal
11
10
  * @see https://en.wikipedia.org/wiki/List_of_countries
11
+ * @internal
12
12
  */
13
13
  export declare const CountryNames: readonly ["Afghanistan", "Albania", "Algeria", "American Samoa", "Andorra", "Angola", "Anguilla", "Antarctica", "Antigua and Barbuda", "Argentina", "Armenia", "Aruba", "Australia", "Austria", "Azerbaijan", "Bahamas", "Bahrain", "Bangladesh", "Barbados", "Belarus", "Belgium", "Belize", "Benin", "Bermuda", "Bhutan", "Bolivia", "Bonaire, Sint Eustatius and Saba", "Bosnia and Herzegovina", "Botswana", "Bouvet Island", "Brazil", "British Indian Ocean Territory", "Brunei Darussalam", "Bulgaria", "Burkina Faso", "Burundi", "Cambodia", "Cameroon", "Canada", "Cape Verde", "Cayman Islands", "Central African Republic", "Chad", "Chile", "China", "Christmas Island", "Cocos (Keeling) Islands", "Colombia", "Comoros", "Congo", "Congo, the Democratic Republic of the", "Cook Islands", "Costa Rica", "Cote DIvoire", "Croatia", "Cuba", "Curaçao", "Cyprus", "Czech Republic", "Denmark", "Djibouti", "Dominica", "Dominican Republic", "Ecuador", "Egypt", "El Salvador", "Equatorial Guinea", "Eritrea", "Estonia", "Ethiopia", "Falkland Islands (Malvinas)", "Faroe Islands", "Fiji", "Finland", "France", "French Guiana", "French Polynesia", "French Southern Territories", "Gabon", "Gambia", "Georgia", "Germany", "Ghana", "Gibraltar", "Greece", "Greenland", "Grenada", "Guadeloupe", "Guam", "Guatemala", "Guernsey", "Guinea", "Guinea-Bissau", "Guyana", "Haiti", "Heard Island and Mcdonald Islands", "Holy See (Vatican City State)", "Honduras", "Hong Kong", "Hungary", "Iceland", "India", "Indonesia", "Iran, Islamic Republic of", "Iraq", "Ireland", "Isle of Man", "Israel", "Italy", "Jamaica", "Japan", "Jersey", "Jordan", "Kazakhstan", "Kenya", "Kiribati", "Korea, Democratic People's Republic of", "Korea, Republic of", "Kuwait", "Kyrgyzstan", "Lao People's Democratic Republic", "Latvia", "Lebanon", "Lesotho", "Liberia", "Libya", "Liechtenstein", "Lithuania", "Luxembourg", "Macao", "Macedonia, the Former Yugoslav Republic of", "Madagascar", "Malawi", "Malaysia", "Maldives", "Mali", "Malta", "Marshall Islands", "Martinique", "Mauritania", "Mauritius", "Mayotte", "Mexico", "Micronesia, Federated States of", "Moldova, Republic of", "Monaco", "Mongolia", "Montenegro", "Montserrat", "Morocco", "Mozambique", "Myanmar", "Namibia", "Nauru", "Nepal", "Netherlands", "New Caledonia", "New Zealand", "Nicaragua", "Niger", "Nigeria", "Niue", "Norfolk Island", "Northern Mariana Islands", "Norway", "Oman", "Pakistan", "Palau", "Palestine, State of", "Panama", "Papua New Guinea", "Paraguay", "Peru", "Philippines", "Pitcairn", "Poland", "Portugal", "Puerto Rico", "Qatar", "Reunion", "Romania", "Russian Federation", "Rwanda", "Saint Barthélemy", "Saint Helena, Ascension and Tristan da Cunha", "Saint Kitts and Nevis", "Saint Lucia", "Saint Martin (French part)", "Saint Pierre and Miquelon", "Saint Vincent and the Grenadines", "Samoa", "San Marino", "Sao Tome and Principe", "Saudi Arabia", "Senegal", "Serbia", "Seychelles", "Sierra Leone", "Singapore", "Sint Maarten (Dutch part)", "Slovakia", "Slovenia", "Solomon Islands", "Somalia", "South Africa", "South Georgia and the South Sandwich Islands", "South Sudan", "Spain", "Sri Lanka", "Sudan", "Suriname", "Svalbard and Jan Mayen", "Swaziland", "Sweden", "Switzerland", "Syrian Arab Republic", "Taiwan (Province of China)", "Tajikistan", "Tanzania, United Republic of", "Thailand", "Timor-Leste", "Togo", "Tokelau", "Tonga", "Trinidad and Tobago", "Tunisia", "Turkey", "Turkmenistan", "Turks and Caicos Islands", "Tuvalu", "Uganda", "Ukraine", "United Arab Emirates", "United Kingdom", "United States", "United States Minor Outlying Islands", "Uruguay", "Uzbekistan", "Vanuatu", "Venezuela", "Viet Nam", "Virgin Islands (British)", "Virgin Islands (U.S.)", "Wallis and Futuna", "Western Sahara", "Yemen", "Zambia", "Zimbabwe", "Åland Islands"];
14
14
  /**
@@ -7,8 +7,8 @@
7
7
  * List of all countries in the world.
8
8
  *
9
9
  * @category Geographic
10
- * @internal
11
10
  * @see https://en.wikipedia.org/wiki/List_of_countries
11
+ * @internal
12
12
  */
13
13
  export const CountryNames = [
14
14
  "Afghanistan",
@@ -0,0 +1,35 @@
1
+ /**
2
+ * @copyright Sister Software
3
+ * @license AGPL-3.0
4
+ * @author Teffen Ellis, et al.
5
+ *
6
+ * CEDEX — Courrier d'Entreprise à Distribution EXceptionnelle (La Poste business routing, NF Z
7
+ * 10-011 §3.4). A CEDEX line replaces the ordinary delivery line for high-volume business
8
+ * recipients: `75008 PARIS CEDEX 08` — the word CEDEX after the distribution office name,
9
+ * optionally followed by a 1–2 digit office number. The component is the `CEDEX [NN]` phrase
10
+ * itself (the schema's `cedex` tag); the preceding postcode/locality keep their own tags.
11
+ *
12
+ * This slice closes the gap PR #516 documented: the shard builder sourced the shape from SCHEMA.mdx
13
+ * prose because codex had no cedex home. Now it does — the builder and any future consumer import
14
+ * from here (the no-load-bearing-trivia discipline: one provenanced source).
15
+ */
16
+ /** Matches a CEDEX phrase: the keyword plus an optional 1–2 digit office number. */
17
+ export declare const CEDEX_PATTERN: RegExp;
18
+ /** A matched CEDEX phrase with its char range and optional office number. */
19
+ export interface CedexMatch {
20
+ /** The full matched phrase as it appears ("CEDEX 08", "Cedex"). */
21
+ matched: string;
22
+ start: number;
23
+ end: number;
24
+ /** The office number when present ("08"), undefined for bare CEDEX. */
25
+ office?: string;
26
+ }
27
+ /**
28
+ * Find the CEDEX phrase in a line, if any. Returns the LAST match — a CEDEX line places the phrase
29
+ * terminally (NF Z 10-011), and any earlier occurrence in pathological input is more likely a venue
30
+ * name fragment.
31
+ */
32
+ export declare function matchCedex(text: string): CedexMatch | null;
33
+ /** True when the string is exactly a CEDEX phrase (the component-value validator). */
34
+ export declare function isCedex(input: unknown): boolean;
35
+ //# sourceMappingURL=cedex.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cedex.d.ts","sourceRoot":"","sources":["../../fr/cedex.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,oFAAoF;AACpF,eAAO,MAAM,aAAa,QAAgC,CAAA;AAE1D,6EAA6E;AAC7E,MAAM,WAAW,UAAU;IAC1B,mEAAmE;IACnE,OAAO,EAAE,MAAM,CAAA;IACf,KAAK,EAAE,MAAM,CAAA;IACb,GAAG,EAAE,MAAM,CAAA;IACX,uEAAuE;IACvE,MAAM,CAAC,EAAE,MAAM,CAAA;CACf;AAED;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,UAAU,GAAG,IAAI,CAY1D;AAED,sFAAsF;AACtF,wBAAgB,OAAO,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAI/C"}