@brandlab-digital/site-core 3.13.0 → 3.15.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.
- package/README.md +105 -0
- package/dist/area-map.d.ts +36 -3
- package/dist/area-map.d.ts.map +1 -1
- package/dist/area-map.js +71 -11
- package/dist/area-map.js.map +1 -1
- package/dist/business.d.ts +97 -0
- package/dist/business.d.ts.map +1 -1
- package/dist/business.js +128 -0
- package/dist/business.js.map +1 -1
- package/dist/council-register.d.ts +53 -0
- package/dist/council-register.d.ts.map +1 -0
- package/dist/council-register.js +113 -0
- package/dist/council-register.js.map +1 -0
- package/dist/geography.js +2 -2
- package/dist/geography.js.map +1 -1
- package/dist/jobs.d.ts +74 -0
- package/dist/jobs.d.ts.map +1 -0
- package/dist/jobs.js +116 -0
- package/dist/jobs.js.map +1 -0
- package/dist/locations.d.ts +10 -0
- package/dist/locations.d.ts.map +1 -1
- package/dist/locations.js +15 -0
- package/dist/locations.js.map +1 -1
- package/dist/navigation.d.ts +37 -1
- package/dist/navigation.d.ts.map +1 -1
- package/dist/navigation.js +107 -2
- package/dist/navigation.js.map +1 -1
- package/dist/page-titles.d.ts +71 -0
- package/dist/page-titles.d.ts.map +1 -0
- package/dist/page-titles.js +161 -0
- package/dist/page-titles.js.map +1 -0
- package/dist/project.d.ts +23 -0
- package/dist/project.d.ts.map +1 -1
- package/dist/project.js +33 -1
- package/dist/project.js.map +1 -1
- package/dist/section-order.d.ts +49 -3
- package/dist/section-order.d.ts.map +1 -1
- package/dist/section-order.js +108 -3
- package/dist/section-order.js.map +1 -1
- package/dist/strategy.d.ts +208 -0
- package/dist/strategy.d.ts.map +1 -1
- package/dist/strategy.js +340 -2
- package/dist/strategy.js.map +1 -1
- package/package.json +13 -1
package/dist/jobs.d.ts
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The job log (`src/data/jobs.ts`, 3.14.0): one row per completed job the owner has confirmed, shared by `NearbyJobs`,
|
|
3
|
+
* project cards, the area map's job places and head-tier decisions. A job names its suburb (registry slug), service
|
|
4
|
+
* and what was done; its month is optional, because owners often remember the job but not when (a card then shows the
|
|
5
|
+
* suburb without "Recent" or a date: "Tree removal nearby: Ryde"). Photos are media-manifest ids, so each carries its
|
|
6
|
+
* provenance; only genuine photos of that job may illustrate it.
|
|
7
|
+
*
|
|
8
|
+
* Distances rank job cards and are never printed: location copy carries no kilometre figures (L10).
|
|
9
|
+
*/
|
|
10
|
+
import type { SuburbCentreLookup } from './locations.js';
|
|
11
|
+
import type { BrandlabMediaEntry, BrandlabMediaManifest } from './media.js';
|
|
12
|
+
export interface BrandlabJob {
|
|
13
|
+
/** A stable kebab-case id; genuine photos of the job name it in their media entry's `job`. */
|
|
14
|
+
readonly id: string;
|
|
15
|
+
/** The registry suburb slug, for example "ryde". */
|
|
16
|
+
readonly suburb: string;
|
|
17
|
+
/** The service slug, as the site's service catalogue names it. */
|
|
18
|
+
readonly service: string;
|
|
19
|
+
/** What was done, in one line of Australian English. */
|
|
20
|
+
readonly outcome: string;
|
|
21
|
+
/** YYYY-MM, when the owner knows it. */
|
|
22
|
+
readonly month?: string;
|
|
23
|
+
/** Media-manifest ids of genuine photos of this job. */
|
|
24
|
+
readonly photos?: readonly string[];
|
|
25
|
+
/** Who confirmed the job and when, for example "Owner, WhatsApp 3 Oct 2026". */
|
|
26
|
+
readonly source: string;
|
|
27
|
+
}
|
|
28
|
+
/** Job cards show jobs within this distance of the page's suburb (v2: the 10 km cap on job cards). */
|
|
29
|
+
export declare const JOB_CARD_MAX_KM = 10;
|
|
30
|
+
/** Cards per page (playbook: 1 to 3). */
|
|
31
|
+
export declare const JOB_CARD_LIMIT = 3;
|
|
32
|
+
/**
|
|
33
|
+
* Validates the job log. With the media manifest, every photo must exist, be `genuine` (stock and AI images never
|
|
34
|
+
* stand for the client's work) and, when its entry names a job, name this one.
|
|
35
|
+
*/
|
|
36
|
+
export declare function defineJobs<const T extends readonly BrandlabJob[]>(jobs: T, options?: {
|
|
37
|
+
readonly media?: BrandlabMediaManifest;
|
|
38
|
+
}): T;
|
|
39
|
+
/** A job's photos from the media manifest, in order, with their ids and provenance. */
|
|
40
|
+
export declare function jobPhotos(job: BrandlabJob, media: BrandlabMediaManifest): (BrandlabMediaEntry & {
|
|
41
|
+
readonly id: string;
|
|
42
|
+
})[];
|
|
43
|
+
/**
|
|
44
|
+
* A job card's label: "{Service} in {Suburb}" for the page's own suburb, "{Service} nearby: {Suburb}" for any other
|
|
45
|
+
* (L4 needs the "nearby" label). Only a dated job says "Recent" (or `prefix`; `''` for none) and ends with
|
|
46
|
+
* ", {Month Year}": "Recent tree removal nearby: Ryde, May 2026", but "Tree removal nearby: Ryde" when the month is
|
|
47
|
+
* unknown, because an undated job may not be recent.
|
|
48
|
+
*/
|
|
49
|
+
export declare function jobCardLabel(job: BrandlabJob, options: {
|
|
50
|
+
readonly service: string;
|
|
51
|
+
readonly suburbName: string;
|
|
52
|
+
readonly pageSuburb?: string;
|
|
53
|
+
readonly prefix?: string;
|
|
54
|
+
}): string;
|
|
55
|
+
export interface BrandlabNearbyJob<T extends BrandlabJob = BrandlabJob> {
|
|
56
|
+
readonly job: T;
|
|
57
|
+
/** For ranking only; never printed. */
|
|
58
|
+
readonly distanceKm: number;
|
|
59
|
+
readonly sameSuburb: boolean;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* The job cards for a page about `origin`: its own suburb's jobs first, then other jobs by real distance between
|
|
63
|
+
* registry centres, within `maxKm` (10) and at most `limit` (3); newest first among equals, undated last. Jobs whose
|
|
64
|
+
* suburb has no centre are left out. Filter by `service` for a service-in-suburb page.
|
|
65
|
+
*/
|
|
66
|
+
export declare function nearbyJobs<T extends BrandlabJob>(origin: string, jobs: readonly T[], options: {
|
|
67
|
+
readonly centreOf: SuburbCentreLookup;
|
|
68
|
+
readonly service?: string;
|
|
69
|
+
readonly maxKm?: number;
|
|
70
|
+
readonly limit?: number;
|
|
71
|
+
}): BrandlabNearbyJob<T>[];
|
|
72
|
+
/** One place per job, for the area map's job markers (`overviewMap`, `regionMap`, `suburbLocator` take `jobs`). */
|
|
73
|
+
export declare function jobPlaces(jobs: readonly BrandlabJob[]): string[];
|
|
74
|
+
//# sourceMappingURL=jobs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jobs.d.ts","sourceRoot":"","sources":["../src/jobs.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAA;AAExD,OAAO,KAAK,EAAE,kBAAkB,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAA;AAE3E,MAAM,WAAW,WAAW;IAC1B,8FAA8F;IAC9F,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;IACnB,oDAAoD;IACpD,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;IACvB,kEAAkE;IAClE,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;IACxB,wDAAwD;IACxD,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;IACxB,wCAAwC;IACxC,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAA;IACvB,wDAAwD;IACxD,QAAQ,CAAC,MAAM,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;IACnC,gFAAgF;IAChF,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;CACxB;AAED,sGAAsG;AACtG,eAAO,MAAM,eAAe,KAAK,CAAA;AACjC,yCAAyC;AACzC,eAAO,MAAM,cAAc,IAAI,CAAA;AAY/B;;;GAGG;AACH,wBAAgB,UAAU,CAAC,KAAK,CAAC,CAAC,SAAS,SAAS,WAAW,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,OAAO,GAAE;IAAE,QAAQ,CAAC,KAAK,CAAC,EAAE,qBAAqB,CAAA;CAAO,GAAG,CAAC,CA4BvI;AAED,uFAAuF;AACvF,wBAAgB,SAA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** Job cards show jobs within this distance of the page's suburb (v2: the 10 km cap on job cards). */
|
|
3
|
+
export const JOB_CARD_MAX_KM = 10;
|
|
4
|
+
/** Cards per page (playbook: 1 to 3). */
|
|
5
|
+
export const JOB_CARD_LIMIT = 3;
|
|
6
|
+
const SLUG = /^[a-z0-9]+(?:-[a-z0-9]+)*$/;
|
|
7
|
+
const MONTH = /^\d{4}-(?:0[1-9]|1[0-2])$/;
|
|
8
|
+
const JOB_KEYS = ['id', 'suburb', 'service', 'outcome', 'month', 'photos', 'source'];
|
|
9
|
+
function assertText(value, field, maximum) {
|
|
10
|
+
if (typeof value !== 'string' || !value.trim() || value.trim() !== value || value.length > maximum || /[\u0000-\u001f\u007f]/.test(value)) {
|
|
11
|
+
throw new Error(`${field} must be bounded, trimmed text.`);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Validates the job log. With the media manifest, every photo must exist, be `genuine` (stock and AI images never
|
|
16
|
+
* stand for the client's work) and, when its entry names a job, name this one.
|
|
17
|
+
*/
|
|
18
|
+
export function defineJobs(jobs, options = {}) {
|
|
19
|
+
if (!Array.isArray(jobs))
|
|
20
|
+
throw new Error('The job log must be a list.');
|
|
21
|
+
const ids = new Set();
|
|
22
|
+
jobs.forEach((job, index) => {
|
|
23
|
+
const field = `jobs[${index}]`;
|
|
24
|
+
if (!job || typeof job !== 'object' || Array.isArray(job))
|
|
25
|
+
throw new Error(`${field} must be a record.`);
|
|
26
|
+
const unknown = Object.keys(job).find((key) => !JOB_KEYS.includes(key));
|
|
27
|
+
if (unknown)
|
|
28
|
+
throw new Error(`${field}.${unknown} is not a job field.`);
|
|
29
|
+
if (typeof job.id !== 'string' || !SLUG.test(job.id))
|
|
30
|
+
throw new Error(`${field}.id must be a kebab-case id.`);
|
|
31
|
+
if (ids.has(job.id))
|
|
32
|
+
throw new Error(`The job log lists "${job.id}" more than once.`);
|
|
33
|
+
ids.add(job.id);
|
|
34
|
+
if (typeof job.suburb !== 'string' || !SLUG.test(job.suburb))
|
|
35
|
+
throw new Error(`${field}.suburb must be the registry suburb slug.`);
|
|
36
|
+
if (typeof job.service !== 'string' || !SLUG.test(job.service))
|
|
37
|
+
throw new Error(`${field}.service must be the service slug.`);
|
|
38
|
+
assertText(job.outcome, `${field}.outcome`, 300);
|
|
39
|
+
assertText(job.source, `${field}.source`, 200);
|
|
40
|
+
if (job.month !== undefined && (typeof job.month !== 'string' || !MONTH.test(job.month)))
|
|
41
|
+
throw new Error(`${field}.month must be YYYY-MM, or left out.`);
|
|
42
|
+
if (job.photos !== undefined) {
|
|
43
|
+
if (!Array.isArray(job.photos))
|
|
44
|
+
throw new Error(`${field}.photos must be a list of media ids.`);
|
|
45
|
+
for (const id of job.photos) {
|
|
46
|
+
if (!options.media)
|
|
47
|
+
continue;
|
|
48
|
+
const entry = Object.hasOwn(options.media, id) ? options.media[id] : undefined;
|
|
49
|
+
if (!entry)
|
|
50
|
+
throw new Error(`${field}.photos: "${id}" is not in the media manifest.`);
|
|
51
|
+
if (entry.provenance !== 'genuine')
|
|
52
|
+
throw new Error(`${field}.photos: "${id}" is ${entry.provenance}; only genuine photos show a job.`);
|
|
53
|
+
if (entry.job !== undefined && entry.job !== job.id)
|
|
54
|
+
throw new Error(`${field}.photos: "${id}" is a photo of ${entry.job}, not ${job.id}.`);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
return jobs;
|
|
59
|
+
}
|
|
60
|
+
/** A job's photos from the media manifest, in order, with their ids and provenance. */
|
|
61
|
+
export function jobPhotos(job, media) {
|
|
62
|
+
return (job.photos ?? []).flatMap((id) => (Object.hasOwn(media, id) ? [{ id, ...media[id] }] : []));
|
|
63
|
+
}
|
|
64
|
+
function formatMonth(month) {
|
|
65
|
+
return new Intl.DateTimeFormat('en-AU', { month: 'long', year: 'numeric', timeZone: 'UTC' }).format(new Date(`${month}-01T00:00:00Z`));
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* A job card's label: "{Service} in {Suburb}" for the page's own suburb, "{Service} nearby: {Suburb}" for any other
|
|
69
|
+
* (L4 needs the "nearby" label). Only a dated job says "Recent" (or `prefix`; `''` for none) and ends with
|
|
70
|
+
* ", {Month Year}": "Recent tree removal nearby: Ryde, May 2026", but "Tree removal nearby: Ryde" when the month is
|
|
71
|
+
* unknown, because an undated job may not be recent.
|
|
72
|
+
*/
|
|
73
|
+
export function jobCardLabel(job, options) {
|
|
74
|
+
const service = options.service.trim().toLowerCase();
|
|
75
|
+
const where = job.suburb === options.pageSuburb ? `in ${options.suburbName}` : `nearby: ${options.suburbName}`;
|
|
76
|
+
if (!job.month)
|
|
77
|
+
return `${capitalise(service)} ${where}`;
|
|
78
|
+
const prefix = (options.prefix ?? 'Recent').trim();
|
|
79
|
+
const lead = prefix ? `${prefix} ${service}` : capitalise(service);
|
|
80
|
+
return `${lead} ${where}, ${formatMonth(job.month)}`;
|
|
81
|
+
}
|
|
82
|
+
function capitalise(text) {
|
|
83
|
+
return text.charAt(0).toUpperCase() + text.slice(1);
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* The job cards for a page about `origin`: its own suburb's jobs first, then other jobs by real distance between
|
|
87
|
+
* registry centres, within `maxKm` (10) and at most `limit` (3); newest first among equals, undated last. Jobs whose
|
|
88
|
+
* suburb has no centre are left out. Filter by `service` for a service-in-suburb page.
|
|
89
|
+
*/
|
|
90
|
+
export function nearbyJobs(origin, jobs, options) {
|
|
91
|
+
const from = options.centreOf(origin);
|
|
92
|
+
if (!from)
|
|
93
|
+
return [];
|
|
94
|
+
const maxKm = options.maxKm ?? JOB_CARD_MAX_KM;
|
|
95
|
+
const limit = options.limit ?? JOB_CARD_LIMIT;
|
|
96
|
+
const found = [];
|
|
97
|
+
for (const job of jobs) {
|
|
98
|
+
if (options.service !== undefined && job.service !== options.service)
|
|
99
|
+
continue;
|
|
100
|
+
const sameSuburb = job.suburb === origin;
|
|
101
|
+
const to = sameSuburb ? from : options.centreOf(job.suburb);
|
|
102
|
+
if (!to)
|
|
103
|
+
continue;
|
|
104
|
+
const distanceKm = sameSuburb ? 0 : distanceBetweenCentresKm(from, to);
|
|
105
|
+
if (distanceKm <= maxKm)
|
|
106
|
+
found.push({ job, distanceKm, sameSuburb });
|
|
107
|
+
}
|
|
108
|
+
return found
|
|
109
|
+
.sort((left, right) => left.distanceKm - right.distanceKm || (right.job.month ?? '').localeCompare(left.job.month ?? ''))
|
|
110
|
+
.slice(0, limit);
|
|
111
|
+
}
|
|
112
|
+
/** One place per job, for the area map's job markers (`overviewMap`, `regionMap`, `suburbLocator` take `jobs`). */
|
|
113
|
+
export function jobPlaces(jobs) {
|
|
114
|
+
return jobs.map((job) => job.suburb);
|
|
115
|
+
}
|
|
116
|
+
//# sourceMappingURL=jobs.js.map
|
package/dist/jobs.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jobs.js","sourceRoot":"","sources":["../src/jobs.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,wBAAwB,EAAE,MAAM,gBAAgB,CAAA;AAoBzD,sGAAsG;AACtG,MAAM,CAAC,MAAM,eAAe,GAAG,EAAE,CAAA;AACjC,yCAAyC;AACzC,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,CAAA;AAE/B,MAAM,IAAI,GAAG,4BAA4B,CAAA;AACzC,MAAM,KAAK,GAAG,2BAA2B,CAAA;AACzC,MAAM,QAAQ,GAAG,CAAC,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAA;AAEpF,SAAS,UAAU,CAAC,KAAc,EAAE,KAAa,EAAE,OAAe;IAChE,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,KAAK,CAAC,IAAI,EAAE,KAAK,KAAK,IAAI,KAAK,CAAC,MAAM,GAAG,OAAO,IAAI,uBAAuB,CAAC,IAAI,CAA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AO,KAAK,SAAS,IAAI,GAAG,CAAC,OAAO,KAAK,OAAO,CAAC,OAAO;YAAE,SAAQ;QAC9E,MAAM,UAAU,GAAG,GAAG,CAAC,MAAM,KAAK,MAAM,CAAA;QACxC,MAAM,EAAE,GAAG,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,MAAM,CAAC,CAAA;QAC3D,IAAI,CAAC,EAAE;YAAE,SAAQ;QACjB,MAAM,UAAU,GAAG,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,wBAAwB,CAAC,IAAI,EAAE,EAAE,CAAC,CAAA;QACtE,IAAI,UAAU,IAAI,KAAK;YAAE,KAAK,CAAC,IAAI,CAAC,EAAE,GAAG,EAAE,UAAU,EAAE,UAAU,EAAE,CAAC,CAAA;IACtE,CAAC;IACD,OAAO,KAAK;SACT,IAAI,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC,UAAU,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC,aAAa,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC;SACxH,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,CAAA;AACpB,CAAC;AAED,mHAAmH;AACnH,MAAM,UAAU,SAAS,CAAC,IAA4B;IACpD,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,MAAM,CAAC,CAAA;AACtC,CAAC","sourcesContent":["/**\n * The job log (`src/data/jobs.ts`, 3.14.0): one row per completed job the owner has confirmed, shared by `NearbyJobs`,\n * project cards, the area map's job places and head-tier decisions. A job names its suburb (registry slug), service\n * and what was done; its month is optional, because owners often remember the job but not when (a card then shows the\n * suburb without \"Recent\" or a date: \"Tree removal nearby: Ryde\"). Photos are media-manifest ids, so each carries its\n * provenance; only genuine photos of that job may illustrate it.\n *\n * Distances rank job cards and are never printed: location copy carries no kilometre figures (L10).\n */\nimport type { SuburbCentreLookup } from './locations.js'\nimport { distanceBetweenCentresKm } from './locations.js'\nimport type { BrandlabMediaEntry, BrandlabMediaManifest } from './media.js'\n\nexport interface BrandlabJob {\n /** A stable kebab-case id; genuine photos of the job name it in their media entry's `job`. */\n readonly id: string\n /** The registry suburb slug, for example \"ryde\". */\n readonly suburb: string\n /** The service slug, as the site's service catalogue names it. */\n readonly service: string\n /** What was done, in one line of Australian English. */\n readonly outcome: string\n /** YYYY-MM, when the owner knows it. */\n readonly month?: string\n /** Media-manifest ids of genuine photos of this job. */\n readonly photos?: readonly string[]\n /** Who confirmed the job and when, for example \"Owner, WhatsApp 3 Oct 2026\". */\n readonly source: string\n}\n\n/** Job cards show jobs within this distance of the page's suburb (v2: the 10 km cap on job cards). */\nexport const JOB_CARD_MAX_KM = 10\n/** Cards per page (playbook: 1 to 3). */\nexport const JOB_CARD_LIMIT = 3\n\nconst SLUG = /^[a-z0-9]+(?:-[a-z0-9]+)*$/\nconst MONTH = /^\\d{4}-(?:0[1-9]|1[0-2])$/\nconst JOB_KEYS = ['id', 'suburb', 'service', 'outcome', 'month', 'photos', 'source']\n\nfunction assertText(value: unknown, field: string, maximum: number) {\n if (typeof value !== 'string' || !value.trim() || value.trim() !== value || value.length > maximum || /[\\u0000-\\u001f\\u007f]/.test(value)) {\n throw new Error(`${field} must be bounded, trimmed text.`)\n }\n}\n\n/**\n * Validates the job log. With the media manifest, every photo must exist, be `genuine` (stock and AI images never\n * stand for the client's work) and, when its entry names a job, name this one.\n */\nexport function defineJobs<const T extends readonly BrandlabJob[]>(jobs: T, options: { readonly media?: BrandlabMediaManifest } = {}): T {\n if (!Array.isArray(jobs)) throw new Error('The job log must be a list.')\n const ids = new Set<string>()\n jobs.forEach((job, index) => {\n const field = `jobs[${index}]`\n if (!job || typeof job !== 'object' || Array.isArray(job)) throw new Error(`${field} must be a record.`)\n const unknown = Object.keys(job).find((key) => !JOB_KEYS.includes(key))\n if (unknown) throw new Error(`${field}.${unknown} is not a job field.`)\n if (typeof job.id !== 'string' || !SLUG.test(job.id)) throw new Error(`${field}.id must be a kebab-case id.`)\n if (ids.has(job.id)) throw new Error(`The job log lists \"${job.id}\" more than once.`)\n ids.add(job.id)\n if (typeof job.suburb !== 'string' || !SLUG.test(job.suburb)) throw new Error(`${field}.suburb must be the registry suburb slug.`)\n if (typeof job.service !== 'string' || !SLUG.test(job.service)) throw new Error(`${field}.service must be the service slug.`)\n assertText(job.outcome, `${field}.outcome`, 300)\n assertText(job.source, `${field}.source`, 200)\n if (job.month !== undefined && (typeof job.month !== 'string' || !MONTH.test(job.month))) throw new Error(`${field}.month must be YYYY-MM, or left out.`)\n if (job.photos !== undefined) {\n if (!Array.isArray(job.photos)) throw new Error(`${field}.photos must be a list of media ids.`)\n for (const id of job.photos) {\n if (!options.media) continue\n const entry = Object.hasOwn(options.media, id) ? options.media[id] : undefined\n if (!entry) throw new Error(`${field}.photos: \"${id}\" is not in the media manifest.`)\n if (entry.provenance !== 'genuine') throw new Error(`${field}.photos: \"${id}\" is ${entry.provenance}; only genuine photos show a job.`)\n if (entry.job !== undefined && entry.job !== job.id) throw new Error(`${field}.photos: \"${id}\" is a photo of ${entry.job}, not ${job.id}.`)\n }\n }\n })\n return jobs\n}\n\n/** A job's photos from the media manifest, in order, with their ids and provenance. */\nexport function jobPhotos(job: BrandlabJob, media: BrandlabMediaManifest): (BrandlabMediaEntry & { readonly id: string })[] {\n return (job.photos ?? []).flatMap((id) => (Object.hasOwn(media, id) ? [{ id, ...media[id]! }] : []))\n}\n\nfunction formatMonth(month: string): string {\n return new Intl.DateTimeFormat('en-AU', { month: 'long', year: 'numeric', timeZone: 'UTC' }).format(new Date(`${month}-01T00:00:00Z`))\n}\n\n/**\n * A job card's label: \"{Service} in {Suburb}\" for the page's own suburb, \"{Service} nearby: {Suburb}\" for any other\n * (L4 needs the \"nearby\" label). Only a dated job says \"Recent\" (or `prefix`; `''` for none) and ends with\n * \", {Month Year}\": \"Recent tree removal nearby: Ryde, May 2026\", but \"Tree removal nearby: Ryde\" when the month is\n * unknown, because an undated job may not be recent.\n */\nexport function jobCardLabel(\n job: BrandlabJob,\n options: { readonly service: string; readonly suburbName: string; readonly pageSuburb?: string; readonly prefix?: string },\n): string {\n const service = options.service.trim().toLowerCase()\n const where = job.suburb === options.pageSuburb ? `in ${options.suburbName}` : `nearby: ${options.suburbName}`\n if (!job.month) return `${capitalise(service)} ${where}`\n const prefix = (options.prefix ?? 'Recent').trim()\n const lead = prefix ? `${prefix} ${service}` : capitalise(service)\n return `${lead} ${where}, ${formatMonth(job.month)}`\n}\n\nfunction capitalise(text: string): string {\n return text.charAt(0).toUpperCase() + text.slice(1)\n}\n\nexport interface BrandlabNearbyJob<T extends BrandlabJob = BrandlabJob> {\n readonly job: T\n /** For ranking only; never printed. */\n readonly distanceKm: number\n readonly sameSuburb: boolean\n}\n\n/**\n * The job cards for a page about `origin`: its own suburb's jobs first, then other jobs by real distance between\n * registry centres, within `maxKm` (10) and at most `limit` (3); newest first among equals, undated last. Jobs whose\n * suburb has no centre are left out. Filter by `service` for a service-in-suburb page.\n */\nexport function nearbyJobs<T extends BrandlabJob>(\n origin: string,\n jobs: readonly T[],\n options: { readonly centreOf: SuburbCentreLookup; readonly service?: string; readonly maxKm?: number; readonly limit?: number },\n): BrandlabNearbyJob<T>[] {\n const from = options.centreOf(origin)\n if (!from) return []\n const maxKm = options.maxKm ?? JOB_CARD_MAX_KM\n const limit = options.limit ?? JOB_CARD_LIMIT\n const found: BrandlabNearbyJob<T>[] = []\n for (const job of jobs) {\n if (options.service !== undefined && job.service !== options.service) continue\n const sameSuburb = job.suburb === origin\n const to = sameSuburb ? from : options.centreOf(job.suburb)\n if (!to) continue\n const distanceKm = sameSuburb ? 0 : distanceBetweenCentresKm(from, to)\n if (distanceKm <= maxKm) found.push({ job, distanceKm, sameSuburb })\n }\n return found\n .sort((left, right) => left.distanceKm - right.distanceKm || (right.job.month ?? '').localeCompare(left.job.month ?? ''))\n .slice(0, limit)\n}\n\n/** One place per job, for the area map's job markers (`overviewMap`, `regionMap`, `suburbLocator` take `jobs`). */\nexport function jobPlaces(jobs: readonly BrandlabJob[]): string[] {\n return jobs.map((job) => job.suburb)\n}\n"]}
|
package/dist/locations.d.ts
CHANGED
|
@@ -60,6 +60,16 @@ export declare function nearestServedSuburbs(origin: string, served: readonly st
|
|
|
60
60
|
centreOf: SuburbCentreLookup;
|
|
61
61
|
limit?: number;
|
|
62
62
|
}): string[];
|
|
63
|
+
/**
|
|
64
|
+
* The nearest served places to `origin` with their distances (3.14.0): nearest first, at most `limit` (6), and only
|
|
65
|
+
* within `maxKm` when given. Centres come from `getSuburbCentre` in `site-core/geography` (the registry's NSW Spatial
|
|
66
|
+
* Services label points, the same the area map uses). The distance ranks and filters; location copy never prints it.
|
|
67
|
+
*/
|
|
68
|
+
export declare function nearestSuburbsWithin(origin: string, served: readonly string[], options: {
|
|
69
|
+
centreOf: SuburbCentreLookup;
|
|
70
|
+
limit?: number;
|
|
71
|
+
maxKm?: number;
|
|
72
|
+
}): RankedSuburb[];
|
|
63
73
|
/**
|
|
64
74
|
* An existing neighbour list ordered by distance from `origin`, keeping every
|
|
65
75
|
* member: places with a centre first, nearest first; places without one after
|
package/dist/locations.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"locations.d.ts","sourceRoot":"","sources":["../src/locations.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;;;;;;;;;GAUG;AACH,MAAM,MAAM,wBAAwB,GAChC,KAAK,GACL,MAAM,GACN,kBAAkB,GAClB,sBAAsB,GACtB,oBAAoB,CAAA;AAExB,eAAO,MAAM,0BAA0B,EAAE,SAAS,wBAAwB,EAMxE,CAAA;AAEF;;;;GAIG;AACH,MAAM,WAAW,6BAA6B;IAC5C,QAAQ,EAAE,OAAO,GAAG,gBAA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G;AACH,wBAAgB,oBAAoB,CAClC,UAAU,EAAE,gCAAgC,GAC3C,sBAAsB,CAuCxB"}
|
package/dist/locations.js
CHANGED
|
@@ -80,6 +80,21 @@ export function nearestServedSuburbs(origin, served, options) {
|
|
|
80
80
|
throw new Error('nearestServedSuburbs limit must be a positive integer.');
|
|
81
81
|
return rankSuburbsByDistance(origin, served, options.centreOf).slice(0, limit).map((entry) => entry.slug);
|
|
82
82
|
}
|
|
83
|
+
/**
|
|
84
|
+
* The nearest served places to `origin` with their distances (3.14.0): nearest first, at most `limit` (6), and only
|
|
85
|
+
* within `maxKm` when given. Centres come from `getSuburbCentre` in `site-core/geography` (the registry's NSW Spatial
|
|
86
|
+
* Services label points, the same the area map uses). The distance ranks and filters; location copy never prints it.
|
|
87
|
+
*/
|
|
88
|
+
export function nearestSuburbsWithin(origin, served, options) {
|
|
89
|
+
const limit = options.limit ?? 6;
|
|
90
|
+
if (!Number.isInteger(limit) || limit < 1)
|
|
91
|
+
throw new Error('nearestSuburbsWithin limit must be a positive integer.');
|
|
92
|
+
if (options.maxKm !== undefined && !(options.maxKm > 0))
|
|
93
|
+
throw new Error('nearestSuburbsWithin maxKm must be above zero.');
|
|
94
|
+
return rankSuburbsByDistance(origin, served, options.centreOf)
|
|
95
|
+
.filter((entry) => options.maxKm === undefined || entry.distanceKm <= options.maxKm)
|
|
96
|
+
.slice(0, limit);
|
|
97
|
+
}
|
|
83
98
|
/**
|
|
84
99
|
* An existing neighbour list ordered by distance from `origin`, keeping every
|
|
85
100
|
* member: places with a centre first, nearest first; places without one after
|
package/dist/locations.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"locations.js","sourceRoot":"","sources":["../src/locations.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAoBH,MAAM,CAAC,MAAM,0BAA0B,GAAwC,MAAM,CAAC,MAAM,CAAC;IAC3F,KAAK;IACL,MAAM;IACN,kBAAkB;IAClB,sBAAsB;IACtB,oBAAoB;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AE,IAAI,EAAE,MAAM,EAAE,CAAC,CAAA;QACvG,CAAC;QACD,OAAO,MAAM,CAAC,MAAM,CAAC;YACnB,IAAI;YACJ,GAAG,qBAAqB,CAAC,IAAI,EAAE,UAAU,CAAC,QAAQ,CAAE;YACpD,iBAAiB,EAAE,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC;YACrC,SAAS,EAAE,KAAK;SACjB,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;IACF,MAAM,MAAM,GAAG,IAAI,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC,CAAA;IACnE,OAAO,MAAM,CAAC,MAAM,CAAC;QACnB,eAAe,EAAE,UAAU,CAAC,QAAQ,CAAC,OAAO;QAC5C,aAAa,EAAE,UAAU,CAAC,MAAM,CAAC,OAAO;QACxC,SAAS,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC,GAAG,UAAU,CAAC,SAAS,CAAC,CAAC;QACnD,kBAAkB,EAAE,MAAM,CAAC,MAAM,CAC/B,UAAU,CAAC,kBAAkB,CAAC,GAAG,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,GAAG,SAAS,EAAE,CAAC,CAAC,CAClF;QACD,SAAS;QACT,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC;QAC/B,GAAG,EAAE,CAAC,IAAY,EAAE,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC;QACvC,GAAG,EAAE,CAAC,IAAY,EAAE,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC;KACxC,CAAC,CAAA;AACJ,CAAC","sourcesContent":["/**\n * Location publication and geography-registry contracts.\n *\n * Brandlab owns route correctness and shared geography. Projects own their\n * content, evidence and publication decisions.\n */\n\n/**\n * What qualifies a location page under the Brandlab evidence standard (3.4.0):\n *\n * - `job`: a verified job in the place from the last three years, with a photo, date and the work done;\n * - `base`: the business's base suburb;\n * - `facts-and-demand`: two or more sourced decision facts that differ from its nearest siblings, plus demand evidence;\n * - `existing-performance`: an existing page with 2 or more organic clicks in the last 12 months, or an organic enquiry;\n * - `approved-exception`: an estate Romie keeps indexed outside the standard, named with a review date.\n *\n * A page without evidence stays indexed and goes on the site's review list; evidence never hides a page.\n */\nexport type BrandlabLocationEvidence =\n | 'job'\n | 'base'\n | 'facts-and-demand'\n | 'existing-performance'\n | 'approved-exception'\n\nexport const BRANDLAB_LOCATION_EVIDENCE: readonly BrandlabLocationEvidence[] = Object.freeze([\n 'job',\n 'base',\n 'facts-and-demand',\n 'existing-performance',\n 'approved-exception',\n])\n\n/**\n * The preferred location publication contract. A project owner explicitly\n * decides whether a route is indexable after checking customer usefulness,\n * geographic correctness and available evidence.\n */\nexport interface BrandlabLocationRouteDecision {\n indexing: 'index' | 'noindex-follow'\n rationale: string\n reviewedAt?: string\n /** The evidence that qualifies the page (3.4.0); an indexable page without any is on the review list. */\n evidence?: readonly BrandlabLocationEvidence[]\n /** An open review flag (3.4.0): what the page is missing. The page keeps its indexing while it is reviewed. */\n review?: string\n}\n\nexport function defineLocationRouteDecision<const T extends BrandlabLocationRouteDecision>(\n input: T,\n): T {\n if (input.indexing !== 'index' && input.indexing !== 'noindex-follow') {\n throw new Error('Location route indexing must be \"index\" or \"noindex-follow\".')\n }\n if (!input.rationale.trim()) {\n throw new Error('Location route decision requires a concise rationale.')\n }\n if (input.reviewedAt && Number.isNaN(Date.parse(input.reviewedAt))) {\n throw new Error('Location route decision reviewedAt must be a valid date.')\n }\n if (input.evidence !== undefined) {\n if (!Array.isArray(input.evidence)) {\n throw new Error('Location route decision evidence must be a list.')\n }\n const unknown = input.evidence.find((kind) => !BRANDLAB_LOCATION_EVIDENCE.includes(kind))\n if (unknown !== undefined) {\n throw new Error(`Location route decision evidence \"${String(unknown)}\" is not one of ${BRANDLAB_LOCATION_EVIDENCE.join(', ')}.`)\n }\n if (new Set(input.evidence).size !== input.evidence.length) {\n throw new Error('Location route decision evidence lists a kind more than once.')\n }\n }\n if (input.review !== undefined && (typeof input.review !== 'string' || !input.review.trim())) {\n throw new Error('Location route decision review must say what the page is missing.')\n }\n return input\n}\n\n// ---------------------------------------------------------------------------\n// Suburb centres and distance-ranked neighbours (3.4.0)\n// ---------------------------------------------------------------------------\n\n/** A suburb's centre: a point inside it, in GDA2020 degrees (site-core/geography's nswSuburbCentres). */\nexport interface SuburbCentre {\n latitude: number\n longitude: number\n}\n\n/** Looks up a place's centre; undefined when the place has none (for example a region or a site-owned location). */\nexport type SuburbCentreLookup = (slug: string) => SuburbCentre | undefined\n\nconst EARTH_RADIUS_KM = 6371.0088\n\n/** Great-circle distance between two centres in kilometres. */\nexport function distanceBetweenCentresKm(from: SuburbCentre, to: SuburbCentre): number {\n const radians = (degrees: number) => (degrees * Math.PI) / 180\n const latitudeDelta = radians(to.latitude - from.latitude)\n const longitudeDelta = radians(to.longitude - from.longitude)\n const haversine =\n Math.sin(latitudeDelta / 2) ** 2 +\n Math.cos(radians(from.latitude)) * Math.cos(radians(to.latitude)) * Math.sin(longitudeDelta / 2) ** 2\n return 2 * EARTH_RADIUS_KM * Math.asin(Math.min(1, Math.sqrt(haversine)))\n}\n\nexport interface RankedSuburb {\n slug: string\n distanceKm: number\n}\n\n/**\n * Places ranked by distance from `origin`, nearest first (ties by slug), without\n * the origin itself, repeats or places that have no centre. Empty when the\n * origin has no centre.\n */\nexport function rankSuburbsByDistance(\n origin: string,\n candidates: readonly string[],\n centreOf: SuburbCentreLookup,\n): RankedSuburb[] {\n const from = centreOf(origin)\n if (!from) return []\n const seen = new Set<string>([origin])\n const ranked: RankedSuburb[] = []\n for (const slug of candidates) {\n if (seen.has(slug)) continue\n seen.add(slug)\n const to = centreOf(slug)\n if (to) ranked.push({ slug, distanceKm: distanceBetweenCentresKm(from, to) })\n }\n return ranked.sort((a, b) => a.distanceKm - b.distanceKm || a.slug.localeCompare(b.slug))\n}\n\n/**\n * The nearest served places to `origin` by distance between centres, for a\n * suburb page's nearby block (4–6 is the standard). Pass only places with an\n * indexable page, so the block never links a noindex page.\n */\nexport function nearestServedSuburbs(\n origin: string,\n served: readonly string[],\n options: { centreOf: SuburbCentreLookup; limit?: number },\n): string[] {\n const limit = options.limit ?? 6\n if (!Number.isInteger(limit) || limit < 1) throw new Error('nearestServedSuburbs limit must be a positive integer.')\n return rankSuburbsByDistance(origin, served, options.centreOf).slice(0, limit).map((entry) => entry.slug)\n}\n\n/**\n * An existing neighbour list ordered by distance from `origin`, keeping every\n * member: places with a centre first, nearest first; places without one after\n * them in their original order. Unchanged when the origin has no centre.\n */\nexport function sortSuburbsByDistance<T extends string>(\n origin: string,\n slugs: readonly T[],\n centreOf: SuburbCentreLookup,\n): T[] {\n const from = centreOf(origin)\n if (!from) return [...slugs]\n const located: { slug: T; distanceKm: number; index: number }[] = []\n const unlocated: T[] = []\n slugs.forEach((slug, index) => {\n const to = centreOf(slug)\n if (to) located.push({ slug, distanceKm: distanceBetweenCentresKm(from, to), index })\n else unlocated.push(slug)\n })\n located.sort((a, b) => a.distanceKm - b.distanceKm || a.index - b.index)\n return [...located.map((entry) => entry.slug), ...unlocated]\n}\n\nexport interface NeighbourOrderProblem {\n /** Position in the list of the first place that is nearer than the one before it. */\n index: number\n slug: string\n previous: string\n detail: string\n}\n\n/**\n * Why a neighbour list is not ranked by distance from `origin`, or null when it\n * is. Places without a centre are ignored; `toleranceKm` absorbs rounding.\n */\nexport function findNeighbourOrderProblem(\n origin: string,\n slugs: readonly string[],\n centreOf: SuburbCentreLookup,\n toleranceKm = 0.05,\n): NeighbourOrderProblem | null {\n const from = centreOf(origin)\n if (!from) return null\n let previous: RankedSuburb | undefined\n for (const [index, slug] of slugs.entries()) {\n const to = centreOf(slug)\n if (!to) continue\n const current = { slug, distanceKm: distanceBetweenCentresKm(from, to) }\n if (previous && current.distanceKm + toleranceKm < previous.distanceKm) {\n return {\n index,\n slug,\n previous: previous.slug,\n detail: `${slug} (${current.distanceKm.toFixed(1)} km) is listed after ${previous.slug} (${previous.distanceKm.toFixed(1)} km); nearby places are ranked nearest first`,\n }\n }\n previous = current\n }\n return null\n}\n\nexport function resolveLocationRouteIndexing(\n decision: BrandlabLocationRouteDecision | null | undefined,\n): 'index' | 'noindex-follow' {\n if (!decision) {\n throw new Error('Location route decision is required.')\n }\n return defineLocationRouteDecision(decision).indexing\n}\n\n// ---------------------------------------------------------------------------\n// Geography registries (standards/registry/*-geography.json)\n// ---------------------------------------------------------------------------\n\nexport interface RegistryRegion {\n slug: string\n name: string\n /** Preferred query-facing region label for titles and primary headings. */\n seoName: string\n /** Recognised search/display variants; these never create additional URLs. */\n alternateNames?: readonly string[]\n /** 'the' → copy reads \"the Eastern Suburbs\"; 'none' → \"Western Sydney\". */\n articleForm: 'the' | 'none'\n councilSlugs: readonly string[]\n}\n\nexport interface RegistrySubRegion {\n slug: string\n name: string\n parentRegionSlug: string\n /** Council-combo sub-region membership. */\n councilSlugs?: readonly string[]\n /** Explicit suburb membership for district-style sub-regions. */\n suburbSlugs?: readonly string[]\n /** Provenance for promoted project districts or audited groupings. */\n source?: string\n}\n\n/**\n * Internal service-coverage partition. Coverage groups have no public name,\n * route, metadata, schema, sitemap, breadcrumb, navigation, or page model.\n */\nexport interface RegistryCoverageGroup {\n slug: string\n /** Maintainer-facing label; never render this value as customer copy. */\n adminLabel: string\n regionSlug: string\n visibility: 'internal'\n}\n\nexport interface RegistryCouncil {\n slug: string\n name: string\n}\n\nexport interface RegistrySuburb {\n name: string\n slug: string\n regionSlug: string\n /** Internal service-coverage partition; never a page parent or URL segment. */\n coverageGroupSlug?: string\n councilSlug: string\n /** Secondary council memberships for split localities. */\n sharedCouncilSlugs?: readonly string[]\n /** Australia Post-matched postcode. */\n postcode: string\n /** Stewardship notes for boundary bindings and corrections. */\n notes?: string\n}\n\nexport type RegistryNonSuburbEntityType =\n | 'rural-locality'\n | 'natural-area'\n | 'protected-area'\n | 'waterbody'\n\n/**\n * Official NSW geography retained for spatial and council completeness but\n * excluded from the normal website suburb catalog.\n */\nexport interface RegistryNonSuburbLocality {\n name: string\n slug: string\n regionSlug: string\n councilSlug: string\n sharedCouncilSlugs?: readonly string[]\n postcode: null\n entityType: RegistryNonSuburbEntityType\n officialUrbanity: 'R'\n defaultWebsiteEligibility: false\n eligibilityReason: string\n notes?: string\n}\n\nexport type RegistryOfficialLocality = RegistrySuburb | RegistryNonSuburbLocality\n\nexport interface WebsiteLocationPolicyExclusionGroup {\n reasonCode: string\n reason: string\n slugs: readonly string[]\n}\n\nexport interface WebsiteLocationPolicyExcludedLocality {\n entityType: RegistryNonSuburbEntityType\n officialUrbanity: 'R'\n reason: string\n}\n\n/**\n * Website eligibility policy layered over factual geography.\n *\n * The registry continues to retain every official locality. The policy keeps\n * owner-excluded places out of normal project location catalogs and records\n * how existing public URLs must be retired.\n */\nexport interface WebsiteLocationPolicy {\n version: string\n generated: string\n registryVersion: string\n scope: string\n defaultCandidateRule: string\n projectOverrideRule: string\n sourceSnapshot: string\n defaultExcludedSuburbGroups: readonly WebsiteLocationPolicyExclusionGroup[]\n excludedLocalities: Readonly<Record<string, WebsiteLocationPolicyExcludedLocality>>\n}\n\nexport interface GeographyRegistry {\n version: string\n generated: string\n /** Provenance: where the registry data was derived from. */\n sources?: readonly string[]\n /** Stewardship notes for maintainers. */\n notes?: string\n regions: readonly RegistryRegion[]\n subRegions: readonly RegistrySubRegion[]\n /** Backend-only groupings used to select served suburbs. */\n coverageGroups: readonly RegistryCoverageGroup[]\n /** Legacy slug → canonical slug. */\n aliases: Readonly<Record<string, string>>\n councils: readonly RegistryCouncil[]\n /** Postcode-backed candidates only; this does not itself approve pages. */\n suburbs: readonly RegistrySuburb[]\n /** Official non-suburb geography excluded from default website locations. */\n nonSuburbLocalities: readonly RegistryNonSuburbLocality[]\n}\n\nexport type RegistryEntityKind = 'region' | 'subRegion' | 'council' | 'suburb'\n\n/** Canonical Brandlab slugify — identical to the benchmark implementation. */\nexport function toLocationSlug(name: string): string {\n return name\n .toLowerCase()\n .replace(/[^a-z0-9]+/g, '-')\n .replace(/(^-|-$)/g, '')\n}\n\n/**\n * Resolve a possibly-legacy slug within an explicit registry entity kind.\n *\n * Entity context is required because canonical suburb slugs such as\n * `blacktown`, `hornsby`, `randwick`, and `willoughby` are also legacy council\n * aliases. A canonical slug for the requested kind always wins over an alias.\n */\nexport function resolveRegistryAlias(\n slug: string,\n registry: GeographyRegistry,\n kind: RegistryEntityKind | readonly RegistryEntityKind[],\n): string {\n const kinds = Array.isArray(kind) ? kind : [kind]\n const canonicalSets = kinds.map((entityKind) => getRegistrySlugSet(registry, entityKind))\n\n if (canonicalSets.some((slugSet) => slugSet.has(slug))) return slug\n\n const target = registry.aliases[slug]\n if (!target) return slug\n\n return canonicalSets.some((slugSet) => slugSet.has(target)) ? target : slug\n}\n\nexport interface CatalogRegistryIssue {\n kind:\n | 'unknown-region'\n | 'unknown-coverage-group'\n | 'unknown-council'\n | 'unknown-suburb'\n | 'excluded-website-locality'\n | 'excluded-by-policy'\n | 'suburb-region-mismatch'\n | 'suburb-coverage-group-mismatch'\n | 'suburb-council-mismatch'\n slug: string\n detail: string\n}\n\nexport interface CatalogValidationOptions {\n /** Website-location policy layered over the registry; enables `excluded-by-policy`. */\n policy?: WebsiteLocationPolicy\n /** Policy-excluded slugs the project deliberately keeps live (see defineLocationEstate). */\n retainedExclusions?: readonly string[]\n /** Slugs the project publishes outside the registry (see defineLocationEstate's siteOwned). */\n siteOwned?: readonly string[]\n}\n\nexport interface CatalogForValidation {\n regionSlugs: readonly string[]\n /** Backend coverage selectors; these are never treated as region/page slugs. */\n coverageGroupSlugs?: readonly string[]\n suburbs: readonly {\n slug: string\n regionSlug: string\n coverageGroupSlug?: string\n councilSlug?: string\n }[]\n}\n\n/**\n * Expand internal coverage selectors to canonical suburb slugs.\n *\n * This helper only answers where a business serves. It does not approve pages,\n * static params, sitemap entries, schema nodes, or internal links.\n */\nexport function getCoverageGroupSuburbSlugs(\n coverageGroupSlugs: readonly string[],\n registry: GeographyRegistry,\n): string[] {\n const knownCoverageGroupSlugs = new Set(registry.coverageGroups.map((group) => group.slug))\n const unknownCoverageGroupSlug = coverageGroupSlugs.find(\n (slug) => !knownCoverageGroupSlugs.has(slug),\n )\n if (unknownCoverageGroupSlug) {\n throw new Error(`Unknown registry coverage group \"${unknownCoverageGroupSlug}\".`)\n }\n\n const selected = new Set(coverageGroupSlugs)\n return registry.suburbs\n .filter(\n (suburb) => suburb.coverageGroupSlug && selected.has(suburb.coverageGroupSlug),\n )\n .map((suburb) => suburb.slug)\n}\n\n/**\n * Validate a project catalog subset against the shared registry. Alias slugs\n * are resolved before comparison so migrated repos that kept live URLs can\n * still pass. Returns an empty array when the subset is clean.\n */\nexport function validateCatalogAgainstRegistry(\n catalog: CatalogForValidation,\n registry: GeographyRegistry,\n options: CatalogValidationOptions = {},\n): CatalogRegistryIssue[] {\n const issues: CatalogRegistryIssue[] = []\n if (options.policy) assertPolicyMatchesRegistry(options.policy, registry)\n const policyExclusions = options.policy ? getPolicyExcludedSlugs(options.policy) : undefined\n const retained = new Set(options.retainedExclusions ?? [])\n const siteOwned = new Set(options.siteOwned ?? [])\n const regionSlugSet = new Set(registry.regions.map((region) => region.slug))\n const subRegionSlugSet = new Set(registry.subRegions.map((subRegion) => subRegion.slug))\n const coverageGroupSlugSet = new Set(registry.coverageGroups.map((group) => group.slug))\n const councilSlugSet = new Set(registry.councils.map((council) => council.slug))\n const suburbBySlug = new Map(registry.suburbs.map((suburb) => [suburb.slug, suburb]))\n const nonSuburbLocalityBySlug = new Map(\n registry.nonSuburbLocalities.map((locality) => [locality.slug, locality]),\n )\n\n for (const rawRegionSlug of catalog.regionSlugs) {\n const regionSlug = resolveRegistryAlias(rawRegionSlug, registry, ['region', 'subRegion'])\n if (!regionSlugSet.has(regionSlug) && !subRegionSlugSet.has(regionSlug) && !siteOwned.has(rawRegionSlug)) {\n issues.push({\n kind: 'unknown-region',\n slug: rawRegionSlug,\n detail: `Region slug \"${rawRegionSlug}\" is not a registry region, sub-region, or alias.`,\n })\n }\n }\n\n for (const coverageGroupSlug of catalog.coverageGroupSlugs ?? []) {\n if (!coverageGroupSlugSet.has(coverageGroupSlug)) {\n issues.push({\n kind: 'unknown-coverage-group',\n slug: coverageGroupSlug,\n detail: `Coverage group slug \"${coverageGroupSlug}\" is not an internal registry coverage group.`,\n })\n }\n }\n\n for (const suburb of catalog.suburbs) {\n const resolvedSuburbSlug = suburbBySlug.has(suburb.slug)\n ? suburb.slug\n : resolveRegistryAlias(suburb.slug, registry, 'suburb')\n const registrySuburb = suburbBySlug.get(resolvedSuburbSlug)\n\n if (!registrySuburb) {\n if (siteOwned.has(suburb.slug) && !nonSuburbLocalityBySlug.has(suburb.slug)) continue\n const excludedLocality = nonSuburbLocalityBySlug.get(suburb.slug)\n if (excludedLocality && options.policy && retained.has(suburb.slug)) continue\n if (excludedLocality) {\n issues.push({\n kind: 'excluded-website-locality',\n slug: suburb.slug,\n detail: `Official locality \"${suburb.slug}\" is classified as ${excludedLocality.entityType} and excluded from the normal website suburb catalog: ${excludedLocality.eligibilityReason}`,\n })\n continue\n }\n issues.push({\n kind: 'unknown-suburb',\n slug: suburb.slug,\n detail: `Suburb slug \"${suburb.slug}\" is not in the registry (not gazetted, or needs adding to the registry first).`,\n })\n continue\n }\n\n if (policyExclusions?.has(registrySuburb.slug) && !retained.has(suburb.slug)) {\n issues.push({\n kind: 'excluded-by-policy',\n slug: suburb.slug,\n detail: `Suburb \"${suburb.slug}\" is excluded by website-location policy ${options.policy!.version}: ${policyExclusions.get(registrySuburb.slug)}`,\n })\n }\n\n const regionSlug = resolveRegistryAlias(suburb.regionSlug, registry, ['region', 'subRegion'])\n const regionMatches =\n registrySuburb.regionSlug === regionSlug ||\n registry.subRegions.some(\n (subRegion) =>\n subRegion.slug === regionSlug &&\n subRegion.parentRegionSlug === registrySuburb.regionSlug &&\n (subRegion.suburbSlugs?.includes(registrySuburb.slug) ||\n subRegion.councilSlugs?.some(\n (councilSlug) =>\n councilSlug === registrySuburb.councilSlug ||\n registrySuburb.sharedCouncilSlugs?.includes(councilSlug),\n )),\n )\n\n if (!regionMatches) {\n issues.push({\n kind: 'suburb-region-mismatch',\n slug: suburb.slug,\n detail: `Suburb \"${suburb.slug}\" is assigned to \"${suburb.regionSlug}\" but the registry places it in \"${registrySuburb.regionSlug}\".`,\n })\n }\n\n if (suburb.coverageGroupSlug) {\n if (!coverageGroupSlugSet.has(suburb.coverageGroupSlug)) {\n issues.push({\n kind: 'unknown-coverage-group',\n slug: suburb.coverageGroupSlug,\n detail: `Coverage group slug \"${suburb.coverageGroupSlug}\" is not an internal registry coverage group.`,\n })\n } else if (registrySuburb.coverageGroupSlug !== suburb.coverageGroupSlug) {\n issues.push({\n kind: 'suburb-coverage-group-mismatch',\n slug: suburb.slug,\n detail: `Suburb \"${suburb.slug}\" is assigned to coverage group \"${suburb.coverageGroupSlug}\" but the registry places it under \"${registrySuburb.coverageGroupSlug ?? 'none'}\".`,\n })\n }\n }\n\n if (suburb.councilSlug) {\n const councilSlug = resolveRegistryAlias(suburb.councilSlug, registry, 'council')\n if (!councilSlugSet.has(councilSlug)) {\n issues.push({\n kind: 'unknown-council',\n slug: suburb.councilSlug,\n detail: `Council slug \"${suburb.councilSlug}\" is not a registry council or alias.`,\n })\n } else if (\n registrySuburb.councilSlug !== councilSlug &&\n !registrySuburb.sharedCouncilSlugs?.includes(councilSlug)\n ) {\n issues.push({\n kind: 'suburb-council-mismatch',\n slug: suburb.slug,\n detail: `Suburb \"${suburb.slug}\" is assigned to council \"${suburb.councilSlug}\" but the registry places it under \"${registrySuburb.councilSlug}\".`,\n })\n }\n }\n }\n\n return issues\n}\n\nfunction getRegistrySlugSet(\n registry: GeographyRegistry,\n kind: RegistryEntityKind,\n): ReadonlySet<string> {\n switch (kind) {\n case 'region':\n return new Set(registry.regions.map((region) => region.slug))\n case 'subRegion':\n return new Set(registry.subRegions.map((subRegion) => subRegion.slug))\n case 'council':\n return new Set(registry.councils.map((council) => council.slug))\n case 'suburb':\n return new Set(registry.suburbs.map((suburb) => suburb.slug))\n }\n}\n\nfunction assertPolicyMatchesRegistry(policy: WebsiteLocationPolicy, registry: GeographyRegistry) {\n if (!policy || typeof policy !== 'object' || policy.registryVersion !== registry.version) {\n throw new Error(\n `Website-location policy ${policy?.version ?? 'unknown'} applies to registry ${policy?.registryVersion ?? 'unknown'}, not ${registry.version}.`,\n )\n }\n}\n\n/** Slug → reason for every suburb or locality the website-location policy excludes. */\nfunction getPolicyExcludedSlugs(policy: WebsiteLocationPolicy): ReadonlyMap<string, string> {\n const excluded = new Map<string, string>()\n for (const group of policy.defaultExcludedSuburbGroups) {\n for (const slug of group.slugs) excluded.set(slug, group.reason)\n }\n for (const [slug, locality] of Object.entries(policy.excludedLocalities)) {\n excluded.set(slug, locality.reason)\n }\n return excluded\n}\n\n// ---------------------------------------------------------------------------\n// Published location estate (src/data/locations/estate.ts)\n// ---------------------------------------------------------------------------\n\nexport interface BrandlabRetainedLocationExclusion {\n slug: string\n /** Why this policy-excluded page stays live, for example a pending SEO decision. */\n reason: string\n}\n\n/**\n * Locations a site publishes outside the shared geography registry, for\n * example service areas beyond the registry's coverage. They skip registry\n * resolution and website-location policy, so each group states why.\n */\nexport interface BrandlabSiteOwnedLocations {\n /** Why these pages are published outside the registry (at most 500 characters). */\n reason: string\n /** Kebab-case slugs, each also listed in `published` and none a registry location or alias. */\n slugs: readonly string[]\n}\n\nexport interface BrandlabLocationEstateDefinition {\n registry: GeographyRegistry\n policy: WebsiteLocationPolicy\n /** Every published location slug, written as literal data; never derived from a registry list. */\n published: readonly string[]\n /** Published slugs the website-location policy excludes but the project keeps live (registry slugs only). */\n retainedExclusions: readonly BrandlabRetainedLocationExclusion[]\n /** Published slugs the site owns outside the registry, grouped by reason (default none). */\n siteOwned?: readonly BrandlabSiteOwnedLocations[]\n}\n\nexport type BrandlabRegistryLocationKind = 'region' | 'subRegion' | 'suburb' | 'locality'\n\nexport type BrandlabLocationEstateEntryKind = BrandlabRegistryLocationKind | 'site-owned'\n\nexport interface BrandlabRegistryLocationEstateEntry {\n slug: string\n kind: BrandlabRegistryLocationKind\n /** Registry slug the entry resolves to; differs from `slug` only for a legacy alias. */\n registrySlug: string\n name: string\n retainedExclusion: boolean\n siteOwned: false\n}\n\nexport interface BrandlabSiteOwnedLocationEstateEntry {\n slug: string\n kind: 'site-owned'\n /** Site-owned locations have no registry record; the site's own data names them. */\n registrySlug?: undefined\n name?: undefined\n retainedExclusion: false\n siteOwned: true\n /** The reason its siteOwned group declares. */\n reason: string\n}\n\nexport type BrandlabLocationEstateEntry =\n | BrandlabRegistryLocationEstateEntry\n | BrandlabSiteOwnedLocationEstateEntry\n\nexport interface BrandlabLocationEstate {\n registryVersion: string\n policyVersion: string\n published: readonly string[]\n retainedExclusions: readonly BrandlabRetainedLocationExclusion[]\n /** The site-owned groups as declared; `[]` when the site publishes registry locations only. */\n siteOwned: readonly BrandlabSiteOwnedLocations[]\n entries: readonly BrandlabLocationEstateEntry[]\n has(slug: string): boolean\n get(slug: string): BrandlabLocationEstateEntry | undefined\n}\n\nexport type BrandlabLocationEstateIssueKind =\n | 'invalid-estate'\n | 'policy-registry-mismatch'\n | 'invalid-slug'\n | 'duplicate-slug'\n | 'unknown-location'\n | 'excluded-by-policy'\n | 'invalid-retained-exclusion'\n | 'duplicate-retained-exclusion'\n | 'retained-exclusion-not-published'\n | 'retained-exclusion-not-excluded'\n | 'retained-exclusion-site-owned'\n | 'invalid-site-owned'\n | 'duplicate-site-owned'\n | 'site-owned-not-published'\n | 'site-owned-in-registry'\n\nexport interface BrandlabLocationEstateIssue {\n kind: BrandlabLocationEstateIssueKind\n slug: string\n detail: string\n}\n\nconst LOCATION_SLUG_PATTERN = /^[a-z0-9]+(?:-[a-z0-9]+)*$/\n\ninterface EstateLocation {\n kind: BrandlabRegistryLocationKind\n registrySlug: string\n name: string\n}\n\nconst estateLookups = new WeakMap<GeographyRegistry, ReadonlyMap<string, EstateLocation>>()\n\n/** Canonical registry entities by slug; suburbs win over regions, sub-regions and localities. */\nfunction getEstateLookup(registry: GeographyRegistry) {\n let lookup = estateLookups.get(registry)\n if (!lookup) {\n const entries = new Map<string, EstateLocation>()\n const add = (kind: BrandlabRegistryLocationKind, records: readonly { slug: string; name: string }[]) => {\n for (const record of records) {\n if (!entries.has(record.slug)) {\n entries.set(record.slug, { kind, registrySlug: record.slug, name: record.name })\n }\n }\n }\n add('suburb', registry.suburbs)\n add('region', registry.regions)\n add('subRegion', registry.subRegions)\n add('locality', registry.nonSuburbLocalities)\n lookup = entries\n estateLookups.set(registry, lookup)\n }\n return lookup\n}\n\nfunction resolveEstateLocation(slug: string, registry: GeographyRegistry): EstateLocation | undefined {\n const lookup = getEstateLookup(registry)\n const direct = lookup.get(slug)\n if (direct) return direct\n const target = registry.aliases[slug]\n const aliased = target ? lookup.get(target) : undefined\n return aliased && aliased.kind !== 'locality' ? aliased : undefined\n}\n\n/**\n * The registry location or alias a site-owned slug would shadow. Councils and\n * coverage groups are not location pages, so a site may own a page at one of\n * their slugs.\n */\nfunction registryLocationAt(slug: string, registry: GeographyRegistry): string | undefined {\n const location = getEstateLookup(registry).get(slug)\n if (location) return `the registry ${location.kind === 'subRegion' ? 'sub-region' : location.kind} \"${location.name}\"`\n const target = Object.hasOwn(registry.aliases, slug) ? registry.aliases[slug] : undefined\n return target ? `a registry alias of \"${target}\"` : undefined\n}\n\nconst SITE_OWNED_KEYS = new Set(['reason', 'slugs'])\n\n/** Site-owned slug → reason, with every issue in the declaration. */\nfunction readSiteOwned(\n siteOwned: readonly BrandlabSiteOwnedLocations[],\n registry: GeographyRegistry,\n issues: BrandlabLocationEstateIssue[],\n): Map<string, string> {\n const owned = new Map<string, string>()\n siteOwned.forEach((group, index) => {\n const label = `siteOwned[${index}]`\n if (\n !group ||\n typeof group !== 'object' ||\n Array.isArray(group) ||\n Object.keys(group).some((key) => !SITE_OWNED_KEYS.has(key))\n ) {\n issues.push({ kind: 'invalid-site-owned', slug: '', detail: `${label} must be { reason, slugs }.` })\n return\n }\n const reason = typeof group.reason === 'string' ? group.reason.trim() : ''\n if (!reason || group.reason.length > 500) {\n issues.push({\n kind: 'invalid-site-owned',\n slug: '',\n detail: `${label} needs a concise reason (at most 500 characters) for publishing outside the registry.`,\n })\n return\n }\n if (!Array.isArray(group.slugs) || group.slugs.length === 0) {\n issues.push({ kind: 'invalid-site-owned', slug: '', detail: `${label} must list at least one slug.` })\n return\n }\n for (const slug of group.slugs) {\n if (typeof slug !== 'string' || !LOCATION_SLUG_PATTERN.test(slug)) {\n issues.push({\n kind: 'invalid-site-owned',\n slug: String(slug),\n detail: `${label} slugs must be lowercase kebab-case.`,\n })\n continue\n }\n if (owned.has(slug)) {\n issues.push({ kind: 'duplicate-site-owned', slug, detail: `\"${slug}\" is declared site-owned more than once.` })\n continue\n }\n const shadowed = registryLocationAt(slug, registry)\n if (shadowed) {\n issues.push({\n kind: 'site-owned-in-registry',\n slug,\n detail: `\"${slug}\" is ${shadowed} in registry ${registry.version}; publish the registry location instead of declaring it site-owned.`,\n })\n continue\n }\n owned.set(slug, group.reason)\n }\n })\n return owned\n}\n\n/**\n * Policy-aware estate validation. Returns every issue instead of throwing so\n * conformance can report them alongside its own rules.\n */\nexport function validateLocationEstate(\n definition: BrandlabLocationEstateDefinition,\n): BrandlabLocationEstateIssue[] {\n const issues: BrandlabLocationEstateIssue[] = []\n if (\n !definition ||\n typeof definition !== 'object' ||\n !definition.registry ||\n !definition.policy ||\n !Array.isArray(definition.published) ||\n !Array.isArray(definition.retainedExclusions) ||\n (definition.siteOwned !== undefined && !Array.isArray(definition.siteOwned))\n ) {\n return [{\n kind: 'invalid-estate',\n slug: '',\n detail: 'A location estate requires registry, policy, published and retainedExclusions; siteOwned, when given, is a list.',\n }]\n }\n const { registry, policy } = definition\n try {\n assertPolicyMatchesRegistry(policy, registry)\n } catch (error) {\n return [{ kind: 'policy-registry-mismatch', slug: '', detail: (error as Error).message }]\n }\n const siteOwned = readSiteOwned(definition.siteOwned ?? [], registry, issues)\n const excluded = getPolicyExcludedSlugs(policy)\n const retained = new Map<string, BrandlabRetainedLocationExclusion>()\n for (const exclusion of definition.retainedExclusions) {\n const slug = exclusion?.slug\n if (\n typeof slug !== 'string' ||\n typeof exclusion.reason !== 'string' ||\n !exclusion.reason.trim() ||\n exclusion.reason.length > 500\n ) {\n issues.push({\n kind: 'invalid-retained-exclusion',\n slug: String(slug ?? ''),\n detail: 'A retained exclusion needs its slug and a concise reason.',\n })\n continue\n }\n if (retained.has(slug)) {\n issues.push({ kind: 'duplicate-retained-exclusion', slug, detail: `\"${slug}\" is declared more than once.` })\n continue\n }\n if (siteOwned.has(slug)) {\n issues.push({\n kind: 'retained-exclusion-site-owned',\n slug,\n detail: `\"${slug}\" is site-owned; retained exclusions apply only to registry locations the policy excludes.`,\n })\n continue\n }\n retained.set(slug, exclusion)\n }\n\n const published = new Set<string>()\n for (const slug of definition.published) {\n if (typeof slug !== 'string' || !LOCATION_SLUG_PATTERN.test(slug)) {\n issues.push({ kind: 'invalid-slug', slug: String(slug), detail: 'Location slugs must be lowercase kebab-case.' })\n continue\n }\n if (published.has(slug)) {\n issues.push({ kind: 'duplicate-slug', slug, detail: `\"${slug}\" is published more than once.` })\n continue\n }\n published.add(slug)\n if (siteOwned.has(slug)) continue\n const location = resolveEstateLocation(slug, registry)\n if (!location) {\n issues.push({\n kind: 'unknown-location',\n slug,\n detail: `\"${slug}\" is not a region, sub-region, suburb, locality or alias in registry ${registry.version}, and not declared in siteOwned.`,\n })\n continue\n }\n const reason =\n excluded.get(location.registrySlug) ??\n (location.kind === 'locality'\n ? 'Official locality excluded from the default website location catalogue.'\n : undefined)\n if (reason && !retained.has(slug)) {\n issues.push({\n kind: 'excluded-by-policy',\n slug,\n detail: `\"${slug}\" is excluded by website-location policy ${policy.version} (${reason}) and is not declared in retainedExclusions.`,\n })\n }\n if (!reason && retained.has(slug)) {\n issues.push({\n kind: 'retained-exclusion-not-excluded',\n slug,\n detail: `\"${slug}\" is not excluded by policy ${policy.version}; remove it from retainedExclusions.`,\n })\n }\n }\n for (const slug of retained.keys()) {\n if (!published.has(slug)) {\n issues.push({\n kind: 'retained-exclusion-not-published',\n slug,\n detail: `\"${slug}\" is declared as retained but is not published.`,\n })\n }\n }\n for (const slug of siteOwned.keys()) {\n if (!published.has(slug)) {\n issues.push({\n kind: 'site-owned-not-published',\n slug,\n detail: `\"${slug}\" is declared site-owned but is not published.`,\n })\n }\n }\n return issues\n}\n\n/**\n * Declares the published location estate (`src/data/locations/estate.ts`).\n * Fails on unknown slugs and on policy-excluded slugs that are not declared\n * as retained, so a registry or policy update can never silently add or drop\n * a published page. Locations outside the registry are published only when a\n * `siteOwned` group declares them with its reason.\n */\nexport function defineLocationEstate(\n definition: BrandlabLocationEstateDefinition,\n): BrandlabLocationEstate {\n const issues = validateLocationEstate(definition)\n if (issues.length > 0) {\n const shown = issues.slice(0, 20).map((entry) => `- ${entry.kind} ${entry.slug}: ${entry.detail}`)\n const more = issues.length > shown.length ? `\\n- …and ${issues.length - shown.length} more` : ''\n throw new Error(`Invalid location estate:\\n${shown.join('\\n')}${more}`)\n }\n const retained = new Set(definition.retainedExclusions.map((exclusion) => exclusion.slug))\n const siteOwned = Object.freeze(\n (definition.siteOwned ?? []).map((group) =>\n Object.freeze({ reason: group.reason, slugs: Object.freeze([...group.slugs]) }),\n ),\n )\n const ownedReason = new Map(siteOwned.flatMap((group) => group.slugs.map((slug) => [slug, group.reason] as const)))\n const entries = definition.published.map((slug): BrandlabLocationEstateEntry => {\n const reason = ownedReason.get(slug)\n if (reason !== undefined) {\n return Object.freeze({ slug, kind: 'site-owned', retainedExclusion: false, siteOwned: true, reason })\n }\n return Object.freeze({\n slug,\n ...resolveEstateLocation(slug, definition.registry)!,\n retainedExclusion: retained.has(slug),\n siteOwned: false,\n })\n })\n const bySlug = new Map(entries.map((entry) => [entry.slug, entry]))\n return Object.freeze({\n registryVersion: definition.registry.version,\n policyVersion: definition.policy.version,\n published: Object.freeze([...definition.published]),\n retainedExclusions: Object.freeze(\n definition.retainedExclusions.map((exclusion) => Object.freeze({ ...exclusion })),\n ),\n siteOwned,\n entries: Object.freeze(entries),\n has: (slug: string) => bySlug.has(slug),\n get: (slug: string) => bySlug.get(slug),\n })\n}\n"]}
|
|
1
|
+
{"version":3,"file":"locations.js","sourceRoot":"","sources":["../src/locations.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAoBH,MAAM,CAAC,MAAM,0BAA0B,GAAwC,MAAM,CAAC,MAAM,CAAC;IAC3F,KAAK;IACL,MAAM;IACN,kBAAkB;IAClB,sBAAsB;IACtB,oBAAoB;CACrB,CAAC,CAAA;AAiBF,MAAM,UAAU,2BAA2B,CACzC,KAAQ;IAER,IAAI,KAAK,CAAC,QAAQ,KAAK,OAAO,IAAI,KAAK,CAAC,QAAQ,KAAK,gBAAgB,EAAE,CAAC;QACtE,MAAM,IAAI,KAAK,CAAC,8DAA8D,CAAC,CAAA;IACjF,CAAC;IACD,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,IAAI,EAAE,EAAE,CAAC;QAC5B,MAAM,IAAI,KAAK,CAAC,uDAAuD,CAAC,CAAA;IAC1E,CAAC;IACD,IAAI,KAAK,CAAC,UAAU,IAAI,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,EAAE,CAAC;QACnE,MAAM,IAAI,KAAK,CAAC,0DAA0D,CAAC,CAAA;IAC7E,CAAC;IACD,IAAI,KAAK,CAAC,QAAQ,KAAK,SAAS,EAAE,CAAC;QACjC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,QAAQ,CAAC,EAAE,CAAC;YACnC,MAAM,IAAI,KAAK,CAAC,kDAAkD,CAAC,CAAA;QACrE,CAAC;QACD,MAAM,OAAO,GAAG,KAAK,CAAC,QAAQ,CAAC,IAA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;YACJ,GAAG,qBAAqB,CAAC,IAAI,EAAE,UAAU,CAAC,QAAQ,CAAE;YACpD,iBAAiB,EAAE,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC;YACrC,SAAS,EAAE,KAAK;SACjB,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;IACF,MAAM,MAAM,GAAG,IAAI,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC,CAAA;IACnE,OAAO,MAAM,CAAC,MAAM,CAAC;QACnB,eAAe,EAAE,UAAU,CAAC,QAAQ,CAAC,OAAO;QAC5C,aAAa,EAAE,UAAU,CAAC,MAAM,CAAC,OAAO;QACxC,SAAS,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC,GAAG,UAAU,CAAC,SAAS,CAAC,CAAC;QACnD,kBAAkB,EAAE,MAAM,CAAC,MAAM,CAC/B,UAAU,CAAC,kBAAkB,CAAC,GAAG,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,GAAG,SAAS,EAAE,CAAC,CAAC,CAClF;QACD,SAAS;QACT,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC;QAC/B,GAAG,EAAE,CAAC,IAAY,EAAE,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC;QACvC,GAAG,EAAE,CAAC,IAAY,EAAE,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC;KACxC,CAAC,CAAA;AACJ,CAAC","sourcesContent":["/**\n * Location publication and geography-registry contracts.\n *\n * Brandlab owns route correctness and shared geography. Projects own their\n * content, evidence and publication decisions.\n */\n\n/**\n * What qualifies a location page under the Brandlab evidence standard (3.4.0):\n *\n * - `job`: a verified job in the place from the last three years, with a photo, date and the work done;\n * - `base`: the business's base suburb;\n * - `facts-and-demand`: two or more sourced decision facts that differ from its nearest siblings, plus demand evidence;\n * - `existing-performance`: an existing page with 2 or more organic clicks in the last 12 months, or an organic enquiry;\n * - `approved-exception`: an estate Romie keeps indexed outside the standard, named with a review date.\n *\n * A page without evidence stays indexed and goes on the site's review list; evidence never hides a page.\n */\nexport type BrandlabLocationEvidence =\n | 'job'\n | 'base'\n | 'facts-and-demand'\n | 'existing-performance'\n | 'approved-exception'\n\nexport const BRANDLAB_LOCATION_EVIDENCE: readonly BrandlabLocationEvidence[] = Object.freeze([\n 'job',\n 'base',\n 'facts-and-demand',\n 'existing-performance',\n 'approved-exception',\n])\n\n/**\n * The preferred location publication contract. A project owner explicitly\n * decides whether a route is indexable after checking customer usefulness,\n * geographic correctness and available evidence.\n */\nexport interface BrandlabLocationRouteDecision {\n indexing: 'index' | 'noindex-follow'\n rationale: string\n reviewedAt?: string\n /** The evidence that qualifies the page (3.4.0); an indexable page without any is on the review list. */\n evidence?: readonly BrandlabLocationEvidence[]\n /** An open review flag (3.4.0): what the page is missing. The page keeps its indexing while it is reviewed. */\n review?: string\n}\n\nexport function defineLocationRouteDecision<const T extends BrandlabLocationRouteDecision>(\n input: T,\n): T {\n if (input.indexing !== 'index' && input.indexing !== 'noindex-follow') {\n throw new Error('Location route indexing must be \"index\" or \"noindex-follow\".')\n }\n if (!input.rationale.trim()) {\n throw new Error('Location route decision requires a concise rationale.')\n }\n if (input.reviewedAt && Number.isNaN(Date.parse(input.reviewedAt))) {\n throw new Error('Location route decision reviewedAt must be a valid date.')\n }\n if (input.evidence !== undefined) {\n if (!Array.isArray(input.evidence)) {\n throw new Error('Location route decision evidence must be a list.')\n }\n const unknown = input.evidence.find((kind) => !BRANDLAB_LOCATION_EVIDENCE.includes(kind))\n if (unknown !== undefined) {\n throw new Error(`Location route decision evidence \"${String(unknown)}\" is not one of ${BRANDLAB_LOCATION_EVIDENCE.join(', ')}.`)\n }\n if (new Set(input.evidence).size !== input.evidence.length) {\n throw new Error('Location route decision evidence lists a kind more than once.')\n }\n }\n if (input.review !== undefined && (typeof input.review !== 'string' || !input.review.trim())) {\n throw new Error('Location route decision review must say what the page is missing.')\n }\n return input\n}\n\n// ---------------------------------------------------------------------------\n// Suburb centres and distance-ranked neighbours (3.4.0)\n// ---------------------------------------------------------------------------\n\n/** A suburb's centre: a point inside it, in GDA2020 degrees (site-core/geography's nswSuburbCentres). */\nexport interface SuburbCentre {\n latitude: number\n longitude: number\n}\n\n/** Looks up a place's centre; undefined when the place has none (for example a region or a site-owned location). */\nexport type SuburbCentreLookup = (slug: string) => SuburbCentre | undefined\n\nconst EARTH_RADIUS_KM = 6371.0088\n\n/** Great-circle distance between two centres in kilometres. */\nexport function distanceBetweenCentresKm(from: SuburbCentre, to: SuburbCentre): number {\n const radians = (degrees: number) => (degrees * Math.PI) / 180\n const latitudeDelta = radians(to.latitude - from.latitude)\n const longitudeDelta = radians(to.longitude - from.longitude)\n const haversine =\n Math.sin(latitudeDelta / 2) ** 2 +\n Math.cos(radians(from.latitude)) * Math.cos(radians(to.latitude)) * Math.sin(longitudeDelta / 2) ** 2\n return 2 * EARTH_RADIUS_KM * Math.asin(Math.min(1, Math.sqrt(haversine)))\n}\n\nexport interface RankedSuburb {\n slug: string\n distanceKm: number\n}\n\n/**\n * Places ranked by distance from `origin`, nearest first (ties by slug), without\n * the origin itself, repeats or places that have no centre. Empty when the\n * origin has no centre.\n */\nexport function rankSuburbsByDistance(\n origin: string,\n candidates: readonly string[],\n centreOf: SuburbCentreLookup,\n): RankedSuburb[] {\n const from = centreOf(origin)\n if (!from) return []\n const seen = new Set<string>([origin])\n const ranked: RankedSuburb[] = []\n for (const slug of candidates) {\n if (seen.has(slug)) continue\n seen.add(slug)\n const to = centreOf(slug)\n if (to) ranked.push({ slug, distanceKm: distanceBetweenCentresKm(from, to) })\n }\n return ranked.sort((a, b) => a.distanceKm - b.distanceKm || a.slug.localeCompare(b.slug))\n}\n\n/**\n * The nearest served places to `origin` by distance between centres, for a\n * suburb page's nearby block (4–6 is the standard). Pass only places with an\n * indexable page, so the block never links a noindex page.\n */\nexport function nearestServedSuburbs(\n origin: string,\n served: readonly string[],\n options: { centreOf: SuburbCentreLookup; limit?: number },\n): string[] {\n const limit = options.limit ?? 6\n if (!Number.isInteger(limit) || limit < 1) throw new Error('nearestServedSuburbs limit must be a positive integer.')\n return rankSuburbsByDistance(origin, served, options.centreOf).slice(0, limit).map((entry) => entry.slug)\n}\n\n/**\n * The nearest served places to `origin` with their distances (3.14.0): nearest first, at most `limit` (6), and only\n * within `maxKm` when given. Centres come from `getSuburbCentre` in `site-core/geography` (the registry's NSW Spatial\n * Services label points, the same the area map uses). The distance ranks and filters; location copy never prints it.\n */\nexport function nearestSuburbsWithin(\n origin: string,\n served: readonly string[],\n options: { centreOf: SuburbCentreLookup; limit?: number; maxKm?: number },\n): RankedSuburb[] {\n const limit = options.limit ?? 6\n if (!Number.isInteger(limit) || limit < 1) throw new Error('nearestSuburbsWithin limit must be a positive integer.')\n if (options.maxKm !== undefined && !(options.maxKm > 0)) throw new Error('nearestSuburbsWithin maxKm must be above zero.')\n return rankSuburbsByDistance(origin, served, options.centreOf)\n .filter((entry) => options.maxKm === undefined || entry.distanceKm <= options.maxKm)\n .slice(0, limit)\n}\n\n/**\n * An existing neighbour list ordered by distance from `origin`, keeping every\n * member: places with a centre first, nearest first; places without one after\n * them in their original order. Unchanged when the origin has no centre.\n */\nexport function sortSuburbsByDistance<T extends string>(\n origin: string,\n slugs: readonly T[],\n centreOf: SuburbCentreLookup,\n): T[] {\n const from = centreOf(origin)\n if (!from) return [...slugs]\n const located: { slug: T; distanceKm: number; index: number }[] = []\n const unlocated: T[] = []\n slugs.forEach((slug, index) => {\n const to = centreOf(slug)\n if (to) located.push({ slug, distanceKm: distanceBetweenCentresKm(from, to), index })\n else unlocated.push(slug)\n })\n located.sort((a, b) => a.distanceKm - b.distanceKm || a.index - b.index)\n return [...located.map((entry) => entry.slug), ...unlocated]\n}\n\nexport interface NeighbourOrderProblem {\n /** Position in the list of the first place that is nearer than the one before it. */\n index: number\n slug: string\n previous: string\n detail: string\n}\n\n/**\n * Why a neighbour list is not ranked by distance from `origin`, or null when it\n * is. Places without a centre are ignored; `toleranceKm` absorbs rounding.\n */\nexport function findNeighbourOrderProblem(\n origin: string,\n slugs: readonly string[],\n centreOf: SuburbCentreLookup,\n toleranceKm = 0.05,\n): NeighbourOrderProblem | null {\n const from = centreOf(origin)\n if (!from) return null\n let previous: RankedSuburb | undefined\n for (const [index, slug] of slugs.entries()) {\n const to = centreOf(slug)\n if (!to) continue\n const current = { slug, distanceKm: distanceBetweenCentresKm(from, to) }\n if (previous && current.distanceKm + toleranceKm < previous.distanceKm) {\n return {\n index,\n slug,\n previous: previous.slug,\n detail: `${slug} (${current.distanceKm.toFixed(1)} km) is listed after ${previous.slug} (${previous.distanceKm.toFixed(1)} km); nearby places are ranked nearest first`,\n }\n }\n previous = current\n }\n return null\n}\n\nexport function resolveLocationRouteIndexing(\n decision: BrandlabLocationRouteDecision | null | undefined,\n): 'index' | 'noindex-follow' {\n if (!decision) {\n throw new Error('Location route decision is required.')\n }\n return defineLocationRouteDecision(decision).indexing\n}\n\n// ---------------------------------------------------------------------------\n// Geography registries (standards/registry/*-geography.json)\n// ---------------------------------------------------------------------------\n\nexport interface RegistryRegion {\n slug: string\n name: string\n /** Preferred query-facing region label for titles and primary headings. */\n seoName: string\n /** Recognised search/display variants; these never create additional URLs. */\n alternateNames?: readonly string[]\n /** 'the' → copy reads \"the Eastern Suburbs\"; 'none' → \"Western Sydney\". */\n articleForm: 'the' | 'none'\n councilSlugs: readonly string[]\n}\n\nexport interface RegistrySubRegion {\n slug: string\n name: string\n parentRegionSlug: string\n /** Council-combo sub-region membership. */\n councilSlugs?: readonly string[]\n /** Explicit suburb membership for district-style sub-regions. */\n suburbSlugs?: readonly string[]\n /** Provenance for promoted project districts or audited groupings. */\n source?: string\n}\n\n/**\n * Internal service-coverage partition. Coverage groups have no public name,\n * route, metadata, schema, sitemap, breadcrumb, navigation, or page model.\n */\nexport interface RegistryCoverageGroup {\n slug: string\n /** Maintainer-facing label; never render this value as customer copy. */\n adminLabel: string\n regionSlug: string\n visibility: 'internal'\n}\n\nexport interface RegistryCouncil {\n slug: string\n name: string\n}\n\nexport interface RegistrySuburb {\n name: string\n slug: string\n regionSlug: string\n /** Internal service-coverage partition; never a page parent or URL segment. */\n coverageGroupSlug?: string\n councilSlug: string\n /** Secondary council memberships for split localities. */\n sharedCouncilSlugs?: readonly string[]\n /** Australia Post-matched postcode. */\n postcode: string\n /** Stewardship notes for boundary bindings and corrections. */\n notes?: string\n}\n\nexport type RegistryNonSuburbEntityType =\n | 'rural-locality'\n | 'natural-area'\n | 'protected-area'\n | 'waterbody'\n\n/**\n * Official NSW geography retained for spatial and council completeness but\n * excluded from the normal website suburb catalog.\n */\nexport interface RegistryNonSuburbLocality {\n name: string\n slug: string\n regionSlug: string\n councilSlug: string\n sharedCouncilSlugs?: readonly string[]\n postcode: null\n entityType: RegistryNonSuburbEntityType\n officialUrbanity: 'R'\n defaultWebsiteEligibility: false\n eligibilityReason: string\n notes?: string\n}\n\nexport type RegistryOfficialLocality = RegistrySuburb | RegistryNonSuburbLocality\n\nexport interface WebsiteLocationPolicyExclusionGroup {\n reasonCode: string\n reason: string\n slugs: readonly string[]\n}\n\nexport interface WebsiteLocationPolicyExcludedLocality {\n entityType: RegistryNonSuburbEntityType\n officialUrbanity: 'R'\n reason: string\n}\n\n/**\n * Website eligibility policy layered over factual geography.\n *\n * The registry continues to retain every official locality. The policy keeps\n * owner-excluded places out of normal project location catalogs and records\n * how existing public URLs must be retired.\n */\nexport interface WebsiteLocationPolicy {\n version: string\n generated: string\n registryVersion: string\n scope: string\n defaultCandidateRule: string\n projectOverrideRule: string\n sourceSnapshot: string\n defaultExcludedSuburbGroups: readonly WebsiteLocationPolicyExclusionGroup[]\n excludedLocalities: Readonly<Record<string, WebsiteLocationPolicyExcludedLocality>>\n}\n\nexport interface GeographyRegistry {\n version: string\n generated: string\n /** Provenance: where the registry data was derived from. */\n sources?: readonly string[]\n /** Stewardship notes for maintainers. */\n notes?: string\n regions: readonly RegistryRegion[]\n subRegions: readonly RegistrySubRegion[]\n /** Backend-only groupings used to select served suburbs. */\n coverageGroups: readonly RegistryCoverageGroup[]\n /** Legacy slug → canonical slug. */\n aliases: Readonly<Record<string, string>>\n councils: readonly RegistryCouncil[]\n /** Postcode-backed candidates only; this does not itself approve pages. */\n suburbs: readonly RegistrySuburb[]\n /** Official non-suburb geography excluded from default website locations. */\n nonSuburbLocalities: readonly RegistryNonSuburbLocality[]\n}\n\nexport type RegistryEntityKind = 'region' | 'subRegion' | 'council' | 'suburb'\n\n/** Canonical Brandlab slugify — identical to the benchmark implementation. */\nexport function toLocationSlug(name: string): string {\n return name\n .toLowerCase()\n .replace(/[^a-z0-9]+/g, '-')\n .replace(/(^-|-$)/g, '')\n}\n\n/**\n * Resolve a possibly-legacy slug within an explicit registry entity kind.\n *\n * Entity context is required because canonical suburb slugs such as\n * `blacktown`, `hornsby`, `randwick`, and `willoughby` are also legacy council\n * aliases. A canonical slug for the requested kind always wins over an alias.\n */\nexport function resolveRegistryAlias(\n slug: string,\n registry: GeographyRegistry,\n kind: RegistryEntityKind | readonly RegistryEntityKind[],\n): string {\n const kinds = Array.isArray(kind) ? kind : [kind]\n const canonicalSets = kinds.map((entityKind) => getRegistrySlugSet(registry, entityKind))\n\n if (canonicalSets.some((slugSet) => slugSet.has(slug))) return slug\n\n const target = registry.aliases[slug]\n if (!target) return slug\n\n return canonicalSets.some((slugSet) => slugSet.has(target)) ? target : slug\n}\n\nexport interface CatalogRegistryIssue {\n kind:\n | 'unknown-region'\n | 'unknown-coverage-group'\n | 'unknown-council'\n | 'unknown-suburb'\n | 'excluded-website-locality'\n | 'excluded-by-policy'\n | 'suburb-region-mismatch'\n | 'suburb-coverage-group-mismatch'\n | 'suburb-council-mismatch'\n slug: string\n detail: string\n}\n\nexport interface CatalogValidationOptions {\n /** Website-location policy layered over the registry; enables `excluded-by-policy`. */\n policy?: WebsiteLocationPolicy\n /** Policy-excluded slugs the project deliberately keeps live (see defineLocationEstate). */\n retainedExclusions?: readonly string[]\n /** Slugs the project publishes outside the registry (see defineLocationEstate's siteOwned). */\n siteOwned?: readonly string[]\n}\n\nexport interface CatalogForValidation {\n regionSlugs: readonly string[]\n /** Backend coverage selectors; these are never treated as region/page slugs. */\n coverageGroupSlugs?: readonly string[]\n suburbs: readonly {\n slug: string\n regionSlug: string\n coverageGroupSlug?: string\n councilSlug?: string\n }[]\n}\n\n/**\n * Expand internal coverage selectors to canonical suburb slugs.\n *\n * This helper only answers where a business serves. It does not approve pages,\n * static params, sitemap entries, schema nodes, or internal links.\n */\nexport function getCoverageGroupSuburbSlugs(\n coverageGroupSlugs: readonly string[],\n registry: GeographyRegistry,\n): string[] {\n const knownCoverageGroupSlugs = new Set(registry.coverageGroups.map((group) => group.slug))\n const unknownCoverageGroupSlug = coverageGroupSlugs.find(\n (slug) => !knownCoverageGroupSlugs.has(slug),\n )\n if (unknownCoverageGroupSlug) {\n throw new Error(`Unknown registry coverage group \"${unknownCoverageGroupSlug}\".`)\n }\n\n const selected = new Set(coverageGroupSlugs)\n return registry.suburbs\n .filter(\n (suburb) => suburb.coverageGroupSlug && selected.has(suburb.coverageGroupSlug),\n )\n .map((suburb) => suburb.slug)\n}\n\n/**\n * Validate a project catalog subset against the shared registry. Alias slugs\n * are resolved before comparison so migrated repos that kept live URLs can\n * still pass. Returns an empty array when the subset is clean.\n */\nexport function validateCatalogAgainstRegistry(\n catalog: CatalogForValidation,\n registry: GeographyRegistry,\n options: CatalogValidationOptions = {},\n): CatalogRegistryIssue[] {\n const issues: CatalogRegistryIssue[] = []\n if (options.policy) assertPolicyMatchesRegistry(options.policy, registry)\n const policyExclusions = options.policy ? getPolicyExcludedSlugs(options.policy) : undefined\n const retained = new Set(options.retainedExclusions ?? [])\n const siteOwned = new Set(options.siteOwned ?? [])\n const regionSlugSet = new Set(registry.regions.map((region) => region.slug))\n const subRegionSlugSet = new Set(registry.subRegions.map((subRegion) => subRegion.slug))\n const coverageGroupSlugSet = new Set(registry.coverageGroups.map((group) => group.slug))\n const councilSlugSet = new Set(registry.councils.map((council) => council.slug))\n const suburbBySlug = new Map(registry.suburbs.map((suburb) => [suburb.slug, suburb]))\n const nonSuburbLocalityBySlug = new Map(\n registry.nonSuburbLocalities.map((locality) => [locality.slug, locality]),\n )\n\n for (const rawRegionSlug of catalog.regionSlugs) {\n const regionSlug = resolveRegistryAlias(rawRegionSlug, registry, ['region', 'subRegion'])\n if (!regionSlugSet.has(regionSlug) && !subRegionSlugSet.has(regionSlug) && !siteOwned.has(rawRegionSlug)) {\n issues.push({\n kind: 'unknown-region',\n slug: rawRegionSlug,\n detail: `Region slug \"${rawRegionSlug}\" is not a registry region, sub-region, or alias.`,\n })\n }\n }\n\n for (const coverageGroupSlug of catalog.coverageGroupSlugs ?? []) {\n if (!coverageGroupSlugSet.has(coverageGroupSlug)) {\n issues.push({\n kind: 'unknown-coverage-group',\n slug: coverageGroupSlug,\n detail: `Coverage group slug \"${coverageGroupSlug}\" is not an internal registry coverage group.`,\n })\n }\n }\n\n for (const suburb of catalog.suburbs) {\n const resolvedSuburbSlug = suburbBySlug.has(suburb.slug)\n ? suburb.slug\n : resolveRegistryAlias(suburb.slug, registry, 'suburb')\n const registrySuburb = suburbBySlug.get(resolvedSuburbSlug)\n\n if (!registrySuburb) {\n if (siteOwned.has(suburb.slug) && !nonSuburbLocalityBySlug.has(suburb.slug)) continue\n const excludedLocality = nonSuburbLocalityBySlug.get(suburb.slug)\n if (excludedLocality && options.policy && retained.has(suburb.slug)) continue\n if (excludedLocality) {\n issues.push({\n kind: 'excluded-website-locality',\n slug: suburb.slug,\n detail: `Official locality \"${suburb.slug}\" is classified as ${excludedLocality.entityType} and excluded from the normal website suburb catalog: ${excludedLocality.eligibilityReason}`,\n })\n continue\n }\n issues.push({\n kind: 'unknown-suburb',\n slug: suburb.slug,\n detail: `Suburb slug \"${suburb.slug}\" is not in the registry (not gazetted, or needs adding to the registry first).`,\n })\n continue\n }\n\n if (policyExclusions?.has(registrySuburb.slug) && !retained.has(suburb.slug)) {\n issues.push({\n kind: 'excluded-by-policy',\n slug: suburb.slug,\n detail: `Suburb \"${suburb.slug}\" is excluded by website-location policy ${options.policy!.version}: ${policyExclusions.get(registrySuburb.slug)}`,\n })\n }\n\n const regionSlug = resolveRegistryAlias(suburb.regionSlug, registry, ['region', 'subRegion'])\n const regionMatches =\n registrySuburb.regionSlug === regionSlug ||\n registry.subRegions.some(\n (subRegion) =>\n subRegion.slug === regionSlug &&\n subRegion.parentRegionSlug === registrySuburb.regionSlug &&\n (subRegion.suburbSlugs?.includes(registrySuburb.slug) ||\n subRegion.councilSlugs?.some(\n (councilSlug) =>\n councilSlug === registrySuburb.councilSlug ||\n registrySuburb.sharedCouncilSlugs?.includes(councilSlug),\n )),\n )\n\n if (!regionMatches) {\n issues.push({\n kind: 'suburb-region-mismatch',\n slug: suburb.slug,\n detail: `Suburb \"${suburb.slug}\" is assigned to \"${suburb.regionSlug}\" but the registry places it in \"${registrySuburb.regionSlug}\".`,\n })\n }\n\n if (suburb.coverageGroupSlug) {\n if (!coverageGroupSlugSet.has(suburb.coverageGroupSlug)) {\n issues.push({\n kind: 'unknown-coverage-group',\n slug: suburb.coverageGroupSlug,\n detail: `Coverage group slug \"${suburb.coverageGroupSlug}\" is not an internal registry coverage group.`,\n })\n } else if (registrySuburb.coverageGroupSlug !== suburb.coverageGroupSlug) {\n issues.push({\n kind: 'suburb-coverage-group-mismatch',\n slug: suburb.slug,\n detail: `Suburb \"${suburb.slug}\" is assigned to coverage group \"${suburb.coverageGroupSlug}\" but the registry places it under \"${registrySuburb.coverageGroupSlug ?? 'none'}\".`,\n })\n }\n }\n\n if (suburb.councilSlug) {\n const councilSlug = resolveRegistryAlias(suburb.councilSlug, registry, 'council')\n if (!councilSlugSet.has(councilSlug)) {\n issues.push({\n kind: 'unknown-council',\n slug: suburb.councilSlug,\n detail: `Council slug \"${suburb.councilSlug}\" is not a registry council or alias.`,\n })\n } else if (\n registrySuburb.councilSlug !== councilSlug &&\n !registrySuburb.sharedCouncilSlugs?.includes(councilSlug)\n ) {\n issues.push({\n kind: 'suburb-council-mismatch',\n slug: suburb.slug,\n detail: `Suburb \"${suburb.slug}\" is assigned to council \"${suburb.councilSlug}\" but the registry places it under \"${registrySuburb.councilSlug}\".`,\n })\n }\n }\n }\n\n return issues\n}\n\nfunction getRegistrySlugSet(\n registry: GeographyRegistry,\n kind: RegistryEntityKind,\n): ReadonlySet<string> {\n switch (kind) {\n case 'region':\n return new Set(registry.regions.map((region) => region.slug))\n case 'subRegion':\n return new Set(registry.subRegions.map((subRegion) => subRegion.slug))\n case 'council':\n return new Set(registry.councils.map((council) => council.slug))\n case 'suburb':\n return new Set(registry.suburbs.map((suburb) => suburb.slug))\n }\n}\n\nfunction assertPolicyMatchesRegistry(policy: WebsiteLocationPolicy, registry: GeographyRegistry) {\n if (!policy || typeof policy !== 'object' || policy.registryVersion !== registry.version) {\n throw new Error(\n `Website-location policy ${policy?.version ?? 'unknown'} applies to registry ${policy?.registryVersion ?? 'unknown'}, not ${registry.version}.`,\n )\n }\n}\n\n/** Slug → reason for every suburb or locality the website-location policy excludes. */\nfunction getPolicyExcludedSlugs(policy: WebsiteLocationPolicy): ReadonlyMap<string, string> {\n const excluded = new Map<string, string>()\n for (const group of policy.defaultExcludedSuburbGroups) {\n for (const slug of group.slugs) excluded.set(slug, group.reason)\n }\n for (const [slug, locality] of Object.entries(policy.excludedLocalities)) {\n excluded.set(slug, locality.reason)\n }\n return excluded\n}\n\n// ---------------------------------------------------------------------------\n// Published location estate (src/data/locations/estate.ts)\n// ---------------------------------------------------------------------------\n\nexport interface BrandlabRetainedLocationExclusion {\n slug: string\n /** Why this policy-excluded page stays live, for example a pending SEO decision. */\n reason: string\n}\n\n/**\n * Locations a site publishes outside the shared geography registry, for\n * example service areas beyond the registry's coverage. They skip registry\n * resolution and website-location policy, so each group states why.\n */\nexport interface BrandlabSiteOwnedLocations {\n /** Why these pages are published outside the registry (at most 500 characters). */\n reason: string\n /** Kebab-case slugs, each also listed in `published` and none a registry location or alias. */\n slugs: readonly string[]\n}\n\nexport interface BrandlabLocationEstateDefinition {\n registry: GeographyRegistry\n policy: WebsiteLocationPolicy\n /** Every published location slug, written as literal data; never derived from a registry list. */\n published: readonly string[]\n /** Published slugs the website-location policy excludes but the project keeps live (registry slugs only). */\n retainedExclusions: readonly BrandlabRetainedLocationExclusion[]\n /** Published slugs the site owns outside the registry, grouped by reason (default none). */\n siteOwned?: readonly BrandlabSiteOwnedLocations[]\n}\n\nexport type BrandlabRegistryLocationKind = 'region' | 'subRegion' | 'suburb' | 'locality'\n\nexport type BrandlabLocationEstateEntryKind = BrandlabRegistryLocationKind | 'site-owned'\n\nexport interface BrandlabRegistryLocationEstateEntry {\n slug: string\n kind: BrandlabRegistryLocationKind\n /** Registry slug the entry resolves to; differs from `slug` only for a legacy alias. */\n registrySlug: string\n name: string\n retainedExclusion: boolean\n siteOwned: false\n}\n\nexport interface BrandlabSiteOwnedLocationEstateEntry {\n slug: string\n kind: 'site-owned'\n /** Site-owned locations have no registry record; the site's own data names them. */\n registrySlug?: undefined\n name?: undefined\n retainedExclusion: false\n siteOwned: true\n /** The reason its siteOwned group declares. */\n reason: string\n}\n\nexport type BrandlabLocationEstateEntry =\n | BrandlabRegistryLocationEstateEntry\n | BrandlabSiteOwnedLocationEstateEntry\n\nexport interface BrandlabLocationEstate {\n registryVersion: string\n policyVersion: string\n published: readonly string[]\n retainedExclusions: readonly BrandlabRetainedLocationExclusion[]\n /** The site-owned groups as declared; `[]` when the site publishes registry locations only. */\n siteOwned: readonly BrandlabSiteOwnedLocations[]\n entries: readonly BrandlabLocationEstateEntry[]\n has(slug: string): boolean\n get(slug: string): BrandlabLocationEstateEntry | undefined\n}\n\nexport type BrandlabLocationEstateIssueKind =\n | 'invalid-estate'\n | 'policy-registry-mismatch'\n | 'invalid-slug'\n | 'duplicate-slug'\n | 'unknown-location'\n | 'excluded-by-policy'\n | 'invalid-retained-exclusion'\n | 'duplicate-retained-exclusion'\n | 'retained-exclusion-not-published'\n | 'retained-exclusion-not-excluded'\n | 'retained-exclusion-site-owned'\n | 'invalid-site-owned'\n | 'duplicate-site-owned'\n | 'site-owned-not-published'\n | 'site-owned-in-registry'\n\nexport interface BrandlabLocationEstateIssue {\n kind: BrandlabLocationEstateIssueKind\n slug: string\n detail: string\n}\n\nconst LOCATION_SLUG_PATTERN = /^[a-z0-9]+(?:-[a-z0-9]+)*$/\n\ninterface EstateLocation {\n kind: BrandlabRegistryLocationKind\n registrySlug: string\n name: string\n}\n\nconst estateLookups = new WeakMap<GeographyRegistry, ReadonlyMap<string, EstateLocation>>()\n\n/** Canonical registry entities by slug; suburbs win over regions, sub-regions and localities. */\nfunction getEstateLookup(registry: GeographyRegistry) {\n let lookup = estateLookups.get(registry)\n if (!lookup) {\n const entries = new Map<string, EstateLocation>()\n const add = (kind: BrandlabRegistryLocationKind, records: readonly { slug: string; name: string }[]) => {\n for (const record of records) {\n if (!entries.has(record.slug)) {\n entries.set(record.slug, { kind, registrySlug: record.slug, name: record.name })\n }\n }\n }\n add('suburb', registry.suburbs)\n add('region', registry.regions)\n add('subRegion', registry.subRegions)\n add('locality', registry.nonSuburbLocalities)\n lookup = entries\n estateLookups.set(registry, lookup)\n }\n return lookup\n}\n\nfunction resolveEstateLocation(slug: string, registry: GeographyRegistry): EstateLocation | undefined {\n const lookup = getEstateLookup(registry)\n const direct = lookup.get(slug)\n if (direct) return direct\n const target = registry.aliases[slug]\n const aliased = target ? lookup.get(target) : undefined\n return aliased && aliased.kind !== 'locality' ? aliased : undefined\n}\n\n/**\n * The registry location or alias a site-owned slug would shadow. Councils and\n * coverage groups are not location pages, so a site may own a page at one of\n * their slugs.\n */\nfunction registryLocationAt(slug: string, registry: GeographyRegistry): string | undefined {\n const location = getEstateLookup(registry).get(slug)\n if (location) return `the registry ${location.kind === 'subRegion' ? 'sub-region' : location.kind} \"${location.name}\"`\n const target = Object.hasOwn(registry.aliases, slug) ? registry.aliases[slug] : undefined\n return target ? `a registry alias of \"${target}\"` : undefined\n}\n\nconst SITE_OWNED_KEYS = new Set(['reason', 'slugs'])\n\n/** Site-owned slug → reason, with every issue in the declaration. */\nfunction readSiteOwned(\n siteOwned: readonly BrandlabSiteOwnedLocations[],\n registry: GeographyRegistry,\n issues: BrandlabLocationEstateIssue[],\n): Map<string, string> {\n const owned = new Map<string, string>()\n siteOwned.forEach((group, index) => {\n const label = `siteOwned[${index}]`\n if (\n !group ||\n typeof group !== 'object' ||\n Array.isArray(group) ||\n Object.keys(group).some((key) => !SITE_OWNED_KEYS.has(key))\n ) {\n issues.push({ kind: 'invalid-site-owned', slug: '', detail: `${label} must be { reason, slugs }.` })\n return\n }\n const reason = typeof group.reason === 'string' ? group.reason.trim() : ''\n if (!reason || group.reason.length > 500) {\n issues.push({\n kind: 'invalid-site-owned',\n slug: '',\n detail: `${label} needs a concise reason (at most 500 characters) for publishing outside the registry.`,\n })\n return\n }\n if (!Array.isArray(group.slugs) || group.slugs.length === 0) {\n issues.push({ kind: 'invalid-site-owned', slug: '', detail: `${label} must list at least one slug.` })\n return\n }\n for (const slug of group.slugs) {\n if (typeof slug !== 'string' || !LOCATION_SLUG_PATTERN.test(slug)) {\n issues.push({\n kind: 'invalid-site-owned',\n slug: String(slug),\n detail: `${label} slugs must be lowercase kebab-case.`,\n })\n continue\n }\n if (owned.has(slug)) {\n issues.push({ kind: 'duplicate-site-owned', slug, detail: `\"${slug}\" is declared site-owned more than once.` })\n continue\n }\n const shadowed = registryLocationAt(slug, registry)\n if (shadowed) {\n issues.push({\n kind: 'site-owned-in-registry',\n slug,\n detail: `\"${slug}\" is ${shadowed} in registry ${registry.version}; publish the registry location instead of declaring it site-owned.`,\n })\n continue\n }\n owned.set(slug, group.reason)\n }\n })\n return owned\n}\n\n/**\n * Policy-aware estate validation. Returns every issue instead of throwing so\n * conformance can report them alongside its own rules.\n */\nexport function validateLocationEstate(\n definition: BrandlabLocationEstateDefinition,\n): BrandlabLocationEstateIssue[] {\n const issues: BrandlabLocationEstateIssue[] = []\n if (\n !definition ||\n typeof definition !== 'object' ||\n !definition.registry ||\n !definition.policy ||\n !Array.isArray(definition.published) ||\n !Array.isArray(definition.retainedExclusions) ||\n (definition.siteOwned !== undefined && !Array.isArray(definition.siteOwned))\n ) {\n return [{\n kind: 'invalid-estate',\n slug: '',\n detail: 'A location estate requires registry, policy, published and retainedExclusions; siteOwned, when given, is a list.',\n }]\n }\n const { registry, policy } = definition\n try {\n assertPolicyMatchesRegistry(policy, registry)\n } catch (error) {\n return [{ kind: 'policy-registry-mismatch', slug: '', detail: (error as Error).message }]\n }\n const siteOwned = readSiteOwned(definition.siteOwned ?? [], registry, issues)\n const excluded = getPolicyExcludedSlugs(policy)\n const retained = new Map<string, BrandlabRetainedLocationExclusion>()\n for (const exclusion of definition.retainedExclusions) {\n const slug = exclusion?.slug\n if (\n typeof slug !== 'string' ||\n typeof exclusion.reason !== 'string' ||\n !exclusion.reason.trim() ||\n exclusion.reason.length > 500\n ) {\n issues.push({\n kind: 'invalid-retained-exclusion',\n slug: String(slug ?? ''),\n detail: 'A retained exclusion needs its slug and a concise reason.',\n })\n continue\n }\n if (retained.has(slug)) {\n issues.push({ kind: 'duplicate-retained-exclusion', slug, detail: `\"${slug}\" is declared more than once.` })\n continue\n }\n if (siteOwned.has(slug)) {\n issues.push({\n kind: 'retained-exclusion-site-owned',\n slug,\n detail: `\"${slug}\" is site-owned; retained exclusions apply only to registry locations the policy excludes.`,\n })\n continue\n }\n retained.set(slug, exclusion)\n }\n\n const published = new Set<string>()\n for (const slug of definition.published) {\n if (typeof slug !== 'string' || !LOCATION_SLUG_PATTERN.test(slug)) {\n issues.push({ kind: 'invalid-slug', slug: String(slug), detail: 'Location slugs must be lowercase kebab-case.' })\n continue\n }\n if (published.has(slug)) {\n issues.push({ kind: 'duplicate-slug', slug, detail: `\"${slug}\" is published more than once.` })\n continue\n }\n published.add(slug)\n if (siteOwned.has(slug)) continue\n const location = resolveEstateLocation(slug, registry)\n if (!location) {\n issues.push({\n kind: 'unknown-location',\n slug,\n detail: `\"${slug}\" is not a region, sub-region, suburb, locality or alias in registry ${registry.version}, and not declared in siteOwned.`,\n })\n continue\n }\n const reason =\n excluded.get(location.registrySlug) ??\n (location.kind === 'locality'\n ? 'Official locality excluded from the default website location catalogue.'\n : undefined)\n if (reason && !retained.has(slug)) {\n issues.push({\n kind: 'excluded-by-policy',\n slug,\n detail: `\"${slug}\" is excluded by website-location policy ${policy.version} (${reason}) and is not declared in retainedExclusions.`,\n })\n }\n if (!reason && retained.has(slug)) {\n issues.push({\n kind: 'retained-exclusion-not-excluded',\n slug,\n detail: `\"${slug}\" is not excluded by policy ${policy.version}; remove it from retainedExclusions.`,\n })\n }\n }\n for (const slug of retained.keys()) {\n if (!published.has(slug)) {\n issues.push({\n kind: 'retained-exclusion-not-published',\n slug,\n detail: `\"${slug}\" is declared as retained but is not published.`,\n })\n }\n }\n for (const slug of siteOwned.keys()) {\n if (!published.has(slug)) {\n issues.push({\n kind: 'site-owned-not-published',\n slug,\n detail: `\"${slug}\" is declared site-owned but is not published.`,\n })\n }\n }\n return issues\n}\n\n/**\n * Declares the published location estate (`src/data/locations/estate.ts`).\n * Fails on unknown slugs and on policy-excluded slugs that are not declared\n * as retained, so a registry or policy update can never silently add or drop\n * a published page. Locations outside the registry are published only when a\n * `siteOwned` group declares them with its reason.\n */\nexport function defineLocationEstate(\n definition: BrandlabLocationEstateDefinition,\n): BrandlabLocationEstate {\n const issues = validateLocationEstate(definition)\n if (issues.length > 0) {\n const shown = issues.slice(0, 20).map((entry) => `- ${entry.kind} ${entry.slug}: ${entry.detail}`)\n const more = issues.length > shown.length ? `\\n- …and ${issues.length - shown.length} more` : ''\n throw new Error(`Invalid location estate:\\n${shown.join('\\n')}${more}`)\n }\n const retained = new Set(definition.retainedExclusions.map((exclusion) => exclusion.slug))\n const siteOwned = Object.freeze(\n (definition.siteOwned ?? []).map((group) =>\n Object.freeze({ reason: group.reason, slugs: Object.freeze([...group.slugs]) }),\n ),\n )\n const ownedReason = new Map(siteOwned.flatMap((group) => group.slugs.map((slug) => [slug, group.reason] as const)))\n const entries = definition.published.map((slug): BrandlabLocationEstateEntry => {\n const reason = ownedReason.get(slug)\n if (reason !== undefined) {\n return Object.freeze({ slug, kind: 'site-owned', retainedExclusion: false, siteOwned: true, reason })\n }\n return Object.freeze({\n slug,\n ...resolveEstateLocation(slug, definition.registry)!,\n retainedExclusion: retained.has(slug),\n siteOwned: false,\n })\n })\n const bySlug = new Map(entries.map((entry) => [entry.slug, entry]))\n return Object.freeze({\n registryVersion: definition.registry.version,\n policyVersion: definition.policy.version,\n published: Object.freeze([...definition.published]),\n retainedExclusions: Object.freeze(\n definition.retainedExclusions.map((exclusion) => Object.freeze({ ...exclusion })),\n ),\n siteOwned,\n entries: Object.freeze(entries),\n has: (slug: string) => bySlug.has(slug),\n get: (slug: string) => bySlug.get(slug),\n })\n}\n"]}
|