(function () {
"use strict";
const scriptElement = document.currentScript;
const siteRoot = new URL(".", scriptElement.src);
const dataReleaseKey = new URL(scriptElement.src).searchParams.get("v") || "evidence-os-live";
const projectMapLabels = {
runtime: ["Task input", "Policy gate", "Human approval", "Bounded action"],
research: ["Research question", "Evidence trail", "Reproduction audit", "Review boundary"],
provenance: ["Source lineage", "Model output", "Agreement risk", "Validation gate"],
operator: ["Input queue", "Evidence review", "Human gate", "Draft action"],
feed: ["Source stream", "Freshness check", "Data boundary", "Review view"],
market: ["Simulation input", "Integrity check", "Evidence ledger", "Review gate"],
environment: ["Public source", "Baseline window", "Anomaly signal", "Validation"],
shield: ["Assumption layer", "Boundary model", "Engineering review", "Claim gate"],
governance: ["Invariant draft", "Test case", "Review gate", "Revision"],
memory: ["Source node", "Tagged trace", "Retention rule", "Audit path"],
energy: ["Hardware baseline", "Workload", "Measurement", "Reproduction"],
archive: ["Record", "Context", "Preservation", "Reference"]
};
function siteUrl(path) {
return new URL(String(path || "").replace(/^\/+/, ""), siteRoot).href;
}
async function loadJson(path) {
const dataUrl = new URL(siteUrl(path));
dataUrl.searchParams.set("v", dataReleaseKey);
const response = await fetch(dataUrl.href, { cache: "no-store" });
if (!response.ok) {
throw new Error("DATA_UNAVAILABLE");
}
return response.json();
}
function escapeHtml(value) {
return String(value ?? "").replace(/[&<>"']/g, (character) => ({
"&": "&",
"<": "<",
">": ">",
"\"": """,
"'": "'"
})[character]);
}
function statusClass(value) {
const normalized = String(value || "").toLowerCase();
if (normalized.includes("verified") || normalized.includes("public link") || normalized.includes("implementation") || normalized.includes("completed") || normalized.includes("deployed")) return "ok";
if (normalized.includes("archive")) return "archive";
if (normalized.includes("verify") || normalized.includes("draft") || normalized.includes("private")) return "warn";
return "info";
}
function badge(value) {
return `${escapeHtml(value)} `;
}
function projectName(project) {
return project.public_name || project.name || "Aureon platform";
}
function projectDescriptor(project) {
return project.category || project.type || project.source_status || "Public platform";
}
function updateSourceBadge(update) {
return `${escapeHtml(update.source_name || "Public source")} `;
}
function updateSourceLink(update) {
if (!update.source_url) return "";
const isExternal = /^https?:\/\//i.test(update.source_url);
const href = isExternal ? update.source_url : siteUrl(update.source_url);
const attributes = isExternal ? ' target="_blank" rel="noopener noreferrer"' : "";
return `${escapeHtml(update.source_label || "Open the source")} ↗ `;
}
function formatUpdateDate(value, compact = false) {
const parsed = new Date(`${value}T00:00:00Z`);
if (Number.isNaN(parsed.getTime())) return String(value || "");
return new Intl.DateTimeFormat("en-GB", compact
? { day: "numeric", month: "short", timeZone: "UTC" }
: { day: "numeric", month: "short", year: "numeric", timeZone: "UTC" }).format(parsed);
}
function externalLink(url, label, className = "btn compact") {
if (!url) return "";
return `${escapeHtml(label)} `;
}
function localLink(path, label, className = "btn compact") {
return `${escapeHtml(label)} `;
}
function sourceGroup(project) {
const value = `${project.source_status} ${project.verification_status}`.toLowerCase();
if (value.includes("verified") || value.includes("public code") || value.includes("public research")) return "verified";
if (value.includes("archive")) return "archive";
if (value.includes("draft") || value.includes("private")) return "draft";
return "to-verify";
}
function projectRow(project) {
const sources = [
externalLink(project.github_url, "GitHub"),
externalLink(project.zenodo_url, "Zenodo")
].filter(Boolean).join("");
return `
${escapeHtml(project.source_status || project.type || "Public source")}
${escapeHtml(projectName(project))}
${escapeHtml(project.type)}
${escapeHtml(project.category)}
${badge(project.status)}
${badge(project.source_status)}${escapeHtml(project.verification_status)}
${escapeHtml(project.summary)}
${escapeHtml(project.next_step || "Next validation defined")}
${localLink(project.page_url, "Open project", "btn compact primary")}${sources || 'No public source '}
`;
}
function populateSelect(select, values, allLabel) {
if (!select) return;
const current = select.value;
select.innerHTML = `${escapeHtml(allLabel)} ` + values
.map((value) => `${escapeHtml(value)} `)
.join("");
if (["all", ...values].includes(current)) select.value = current;
}
function setupProjectTable(projects, tableBody) {
const scope = tableBody.closest("[data-registry]") || document;
const searchInput = scope.querySelector("[data-search]");
const categoryFilter = scope.querySelector("[data-category-filter]");
const statusFilter = scope.querySelector("[data-status-filter]");
const sourceFilter = scope.querySelector("[data-source-filter]");
const sortSelect = scope.querySelector("[data-sort-select]");
const clearButton = scope.querySelector("[data-clear-filters]");
const resultCount = scope.querySelector("[data-result-count]");
const limit = Number(tableBody.dataset.limit || 0);
const state = { key: "name", direction: "asc" };
populateSelect(categoryFilter, [...new Set(projects.map((project) => project.category))].sort(), "All categories");
populateSelect(statusFilter, [...new Set(projects.map((project) => project.status))].sort(), "All statuses");
function updateSortIndicators() {
scope.querySelectorAll("th[data-sort]").forEach((header) => {
const active = header.dataset.sort === state.key;
header.setAttribute("aria-sort", active ? (state.direction === "asc" ? "ascending" : "descending") : "none");
});
if (sortSelect) sortSelect.value = `${state.key}:${state.direction}`;
}
function render() {
const query = String(searchInput?.value || "").trim().toLowerCase();
const category = categoryFilter?.value || "all";
const status = statusFilter?.value || "all";
const source = sourceFilter?.value || "all";
const filtered = projects.filter((project) => {
const haystack = [
project.name,
project.type,
project.category,
project.status,
project.source_status,
project.summary,
project.technical_summary,
project.caution,
project.next_step
].join(" ").toLowerCase();
return (!query || haystack.includes(query))
&& (category === "all" || project.category === category)
&& (status === "all" || project.status === status)
&& (source === "all" || sourceGroup(project) === source);
}).sort((left, right) => {
const result = String(left[state.key] || "").localeCompare(String(right[state.key] || ""), "en", { sensitivity: "base" });
return state.direction === "asc" ? result : -result;
});
const visible = limit ? filtered.slice(0, limit) : filtered;
tableBody.innerHTML = visible.length
? visible.map(projectRow).join("")
: `No projects match the selected filters. `;
if (resultCount) {
resultCount.textContent = `${filtered.length} of ${projects.length} projects`;
}
updateSortIndicators();
}
[searchInput, categoryFilter, statusFilter, sourceFilter].forEach((control) => {
if (control) control.addEventListener(control.tagName === "INPUT" ? "input" : "change", render);
});
scope.querySelectorAll("th[data-sort] button").forEach((button) => {
button.addEventListener("click", () => {
const key = button.closest("th").dataset.sort;
if (state.key === key) {
state.direction = state.direction === "asc" ? "desc" : "asc";
} else {
state.key = key;
state.direction = "asc";
}
render();
});
});
if (sortSelect) {
sortSelect.addEventListener("change", () => {
[state.key, state.direction] = sortSelect.value.split(":");
render();
});
}
if (clearButton) {
clearButton.addEventListener("click", () => {
if (searchInput) searchInput.value = "";
[categoryFilter, statusFilter, sourceFilter].forEach((control) => {
if (control) control.value = "all";
});
state.key = "name";
state.direction = "asc";
render();
});
}
render();
}
function renderStats(projects) {
document.querySelectorAll("[data-project-stats]").forEach((container) => {
const verified = projects.filter((project) => sourceGroup(project) === "verified").length;
const review = projects.filter((project) => ["to-verify", "draft"].includes(sourceGroup(project))).length;
const categories = new Set(projects.map((project) => project.category)).size;
const stats = [
[projects.length, "Portfolio entries"],
[verified, "Verified public-source entries"],
[review, "Review-bound entries"],
[categories, "Portfolio categories"]
];
container.innerHTML = stats.map(([value, label]) => `${value} ${escapeHtml(label)}
`).join("");
});
}
async function renderEcosystem(projects) {
const container = document.querySelector("[data-project-graph]");
if (!container) return;
try {
const graph = await loadJson("data/project-graph.json");
const bySlug = new Map(projects.map((project) => [project.slug, project]));
const groups = new Map();
graph.nodes.forEach((node) => {
if (!groups.has(node.group)) groups.set(node.group, []);
const project = bySlug.get(node.slug);
if (project) groups.get(node.group).push(projectName(project));
});
const nodes = [...groups.entries()].map(([group, names]) => `
${escapeHtml(group)} ${escapeHtml(names.join(" / "))}
`).join("");
const relations = graph.edges.filter((edge) => bySlug.has(edge.from) && bySlug.has(edge.to)).map((edge) => {
const from = bySlug.get(edge.from) ? projectName(bySlug.get(edge.from)) : edge.from;
const to = bySlug.get(edge.to) ? projectName(bySlug.get(edge.to)) : edge.to;
return `${escapeHtml(from)} -> ${escapeHtml(to)}: ${escapeHtml(edge.label)} `;
}).join("");
container.innerHTML = `${nodes}
${relations}
`;
} catch (_error) {
showInlineError(container, "The project relationship map is temporarily unavailable.");
}
}
function evidenceStateClass(value) {
const normalized = String(value || "To verify").toLowerCase();
if (normalized.includes("independent")) return "independent";
if (normalized.includes("provider")) return "provider";
if (normalized.includes("company")) return "company";
if (normalized.includes("source")) return "source";
return "verify";
}
function publicationActions(record) {
return [
externalLink(record.source_url, `Open ${record.channel || "source"}`, "evidence-record-link"),
externalLink(record.doi_url, "Open DOI", "evidence-record-link secondary"),
record.internal_url ? localLink(record.internal_url, "Read company context", "evidence-record-link secondary") : ""
].filter(Boolean).join("");
}
function renderPublications(data) {
const records = Array.isArray(data) ? data : (data.records || []);
document.querySelectorAll("[data-publications]").forEach((tableBody) => {
tableBody.innerHTML = records.map((record) => `
${escapeHtml(record.record_group || record.project)}
${escapeHtml(record.title || record.artifact)}
${escapeHtml(record.record_type || record.type)}
${escapeHtml(record.channel || "Not listed")}
${badge(record.evidence_state || record.status)}
${escapeHtml(record.boundary || record.notes)}
${publicationActions(record)}
`).join("");
});
document.querySelectorAll("[data-publications-preview]").forEach((container) => {
const limit = Number(container.dataset.limit || 3);
const previewRecords = [...records].sort((a, b) => Number(Boolean(b.featured)) - Number(Boolean(a.featured))).slice(0, limit);
container.innerHTML = previewRecords.map((record) => `
${badge(record.evidence_state || record.status)}
${escapeHtml(record.title || record.project)} ${escapeHtml(record.record_type || record.artifact)}. ${escapeHtml(record.boundary || record.notes)}
${publicationActions(record)}
`).join("");
});
document.querySelectorAll("[data-evidence-library]").forEach((library) => {
const search = library.querySelector("[data-evidence-search]");
const group = library.querySelector("[data-evidence-group]");
const channel = library.querySelector("[data-evidence-channel]");
const clear = library.querySelector("[data-evidence-clear]");
const resultCount = library.querySelector("[data-evidence-result-count]");
const container = library.querySelector("[data-evidence-records]");
if (!search || !group || !channel || !clear || !resultCount || !container) return;
const addOptions = (select, values) => {
values.forEach((value) => {
const option = document.createElement("option");
option.value = value;
option.textContent = value;
select.appendChild(option);
});
};
addOptions(group, [...new Set(records.map((record) => record.record_group).filter(Boolean))].sort());
addOptions(channel, [...new Set(records.map((record) => record.channel).filter(Boolean))].sort());
const renderFilteredRecords = () => {
const query = search.value.trim().toLowerCase();
const groupValue = group.value;
const channelValue = channel.value;
const filtered = records.filter((record) => {
const searchable = [record.title, record.record_type, record.author, record.channel, record.record_group, record.boundary].join(" ").toLowerCase();
return (!query || searchable.includes(query)) && (!groupValue || record.record_group === groupValue) && (!channelValue || record.channel === channelValue);
});
resultCount.textContent = filtered.length === records.length ? "All public records shown" : "Filtered public records shown";
if (!records.length) {
container.innerHTML = 'No evidence records are available in this public view. Use the public research index or contact the company for a scoped evidence request.
';
return;
}
if (!filtered.length) {
container.innerHTML = 'No records match these filters. Clear the search or change the record group and channel.
';
return;
}
container.innerHTML = filtered.map((record) => `
${escapeHtml(record.record_group)}
${escapeHtml(record.evidence_state)}
${escapeHtml(record.title)}
Type ${escapeHtml(record.record_type)}
Channel ${escapeHtml(record.channel)}
Author ${escapeHtml(record.author)}
Boundary ${escapeHtml(record.boundary)}
${publicationActions(record)}
`).join("");
};
search.addEventListener("input", renderFilteredRecords);
group.addEventListener("change", renderFilteredRecords);
channel.addEventListener("change", renderFilteredRecords);
clear.addEventListener("click", () => {
search.value = "";
group.value = "";
channel.value = "";
search.focus();
renderFilteredRecords();
});
renderFilteredRecords();
});
}
function renderResearch(data) {
const profiles = data.profiles || [];
const papers = data.papers || [];
const uniquePapers = papers.filter((paper, index, list) => list.findIndex((candidate) => candidate.url === paper.url) === index);
const nameById = {};
profiles.forEach((profile) => { nameById[profile.id] = profile.name; });
document.querySelectorAll("[data-research-profiles]").forEach((container) => {
container.innerHTML = profiles.map((profile) => `
${escapeHtml(profile.public_role || profile.role)}
${escapeHtml(profile.name)}
${escapeHtml(profile.summary)}
${(profile.links || []).map((link) => externalLink(link.url, link.label)).join("")}
${(profile.collections || []).map((collection) => `${externalLink(collection.url, collection.label)} — ${escapeHtml(collection.note)}
`).join("")}
`).join("");
});
document.querySelectorAll("[data-research-notes]").forEach((container) => {
container.innerHTML = (data.featured_notes || []).map((note) => `
${escapeHtml(note.record_type)}
${escapeHtml(note.title)}
Published through ${escapeHtml(note.channel)}
${escapeHtml(note.verification_status)}
Author-published public source
${externalLink(note.url, "Read the public note", "research-note-link")}
`).join("");
});
document.querySelectorAll("[data-research]").forEach((tableBody) => {
tableBody.innerHTML = uniquePapers.map((paper) => `
${escapeHtml(nameById[paper.author] || paper.author)}
${escapeHtml(paper.title)}
${escapeHtml(paper.type)}
${escapeHtml(paper.platform)}
${badge(paper.verification_status || "Public source listed; independent review remains separate.")}
${externalLink(paper.url, "View")}${externalLink(paper.doi, "DOI")}${(!paper.url && !paper.doi) ? 'Not listed ' : ""}
`).join("");
});
}
function renderResearchCatalogue(data) {
const orcid = data.orcid || {};
const zenodo = data.zenodo || {};
const breadth = data.research_breadth || {};
const researchOrientation = {
"[data-research-catalogue-orcid-role]": orcid.role || "Persistent researcher identity and public work index",
"[data-research-catalogue-zenodo-role]": zenodo.role || "Formal public repository and DOI source",
"[data-research-catalogue-review-posture]": breadth.review_posture || "Independent challenge and domain-qualified review remain the relevant proof gates.",
"[data-research-catalogue-translation-gate]": breadth.translation_gate || "Translation requires an explicit use case, authority boundary, test method and evidence standard."
};
Object.entries(researchOrientation).forEach(([selector, value]) => {
document.querySelectorAll(selector).forEach((element) => { element.textContent = String(value); });
});
document.querySelectorAll("[data-research-catalogue-boundary]").forEach((element) => {
element.textContent = data.evidence_boundary || "";
});
document.querySelectorAll("[data-research-catalogue-recent]").forEach((container) => {
container.innerHTML = (data.recent_records || []).map((record) => `
${escapeHtml(record.record_type || "Public record")}
${escapeHtml(record.publication_date)}
${escapeHtml(record.title)}
${escapeHtml(record.doi)}
${externalLink(record.url, "Open Zenodo record")}
${externalLink(record.doi_url, "Open DOI")}
`).join("");
});
}
function renderPublicFootprint(data) {
const signals = Array.isArray(data.signals) ? data.signals : [];
const byMetric = Object.fromEntries(signals.map((signal) => [signal.metric, signal]));
const github = byMetric.main_branch_commits || {};
const githubSecondary = github.secondary_metrics || {};
const values = {
public_work_groups: byMetric.public_work_groups?.value,
main_branch_commits: github.value,
research_reads: byMetric.research_reads?.value,
github_stars: githubSecondary.stars,
github_forks: githubSecondary.forks
};
const formatNumber = (value) => new Intl.NumberFormat("en-GB").format(Number(value));
document.querySelectorAll("[data-footprint-value]").forEach((element) => {
const value = values[element.dataset.footprintValue];
if (Number.isFinite(Number(value))) element.textContent = formatNumber(value);
});
const textValues = {
github_summary: `${formatNumber(values.main_branch_commits)} commits · ${formatNumber(values.github_stars)} stars · ${formatNumber(values.github_forks)} forks`,
github_secondary: `${formatNumber(values.github_stars)} stars · ${formatNumber(values.github_forks)} forks · 21 Aug 2026`
};
document.querySelectorAll("[data-footprint-text]").forEach((element) => {
const value = textValues[element.dataset.footprintText];
if (value) element.textContent = value;
});
}
function renderSubstackCatalogue(data) {
const entries = [...(data.entries || [])].sort((left, right) => String(right.published_utc || "").localeCompare(String(left.published_utc || "")));
const themes = [...(data.themes || [])];
const themeById = new Map(themes.map((theme) => [theme.id, theme]));
const formatDate = (value, options = { day: "numeric", month: "short", year: "numeric" }) => {
if (!value) return "Date not listed";
const date = new Date(value.length === 10 ? `${value}T00:00:00Z` : value);
if (Number.isNaN(date.getTime())) return value;
return new Intl.DateTimeFormat("en-GB", { ...options, timeZone: "UTC" }).format(date);
};
document.querySelectorAll("[data-substack-guides]").forEach((container) => {
const guides = entries.filter((entry) => Number(entry.guide_rank) > 0).sort((left, right) => Number(left.guide_rank) - Number(right.guide_rank));
container.innerHTML = guides.map((entry) => `
0${escapeHtml(entry.guide_rank)} / ${escapeHtml(entry.guide_label || "Orientation")}
${escapeHtml(entry.title)}
${escapeHtml(themeById.get(entry.topic)?.description || "Open the author-published orientation note.")}
${externalLink(entry.url, "Open orientation note", "journal-guide-link")}
`).join("");
});
document.querySelectorAll("[data-substack-catalogue]").forEach((container) => {
const section = container.closest("section") || document;
const filterRoot = section.querySelector("[data-substack-filter]");
const searchInput = section.querySelector("[data-substack-search]");
const resultCount = section.querySelector("[data-substack-result-count]");
let activeTheme = "all";
if (filterRoot) {
const filterItems = [{ id: "all", label: "All notes" }, ...themes];
filterRoot.innerHTML = filterItems.map((theme, index) => `${escapeHtml(theme.label)} `).join("");
}
const render = () => {
const query = String(searchInput?.value || "").trim().toLowerCase();
const visibleEntries = entries.filter((entry) => {
const theme = themeById.get(entry.topic);
const matchesTheme = activeTheme === "all" || entry.topic === activeTheme;
const haystack = [entry.title, theme?.label, theme?.description].join(" ").toLowerCase();
return matchesTheme && (!query || haystack.includes(query));
});
if (resultCount) {
resultCount.textContent = visibleEntries.length === entries.length ? "All public notes shown" : "Filtered public notes shown";
}
container.innerHTML = visibleEntries.length ? visibleEntries.map((entry) => {
const theme = themeById.get(entry.topic) || { label: "Unclassified", prompt: "Open the source and assess its evidence boundary." };
const archiveLabel = entry.archive_visible === false ? "Direct public note" : "Archive listed";
const archiveClass = entry.archive_visible === false ? "direct" : "archive";
const artwork = entry.artwork ? `
${entry.artwork_small ? `` : ""}
${escapeHtml(entry.artwork_caption || "Editorial illustration · author-published note")}
` : "";
return `
${artwork}
${escapeHtml(theme.label)} ${archiveLabel}
${escapeHtml(entry.title)}
${entry.subtitle ? `${escapeHtml(entry.subtitle)}
` : ""}
Reading prompt ${escapeHtml(theme.prompt)}
`;
}).join("") : 'No notes match this view. Clear the search or choose another reading theme. The provider archive remains available above.
';
};
filterRoot?.querySelectorAll("[data-substack-filter-value]").forEach((button) => {
button.addEventListener("click", () => {
activeTheme = button.dataset.substackFilterValue || "all";
filterRoot.querySelectorAll("[data-substack-filter-value]").forEach((item) => {
const active = item === button;
item.classList.toggle("is-active", active);
item.setAttribute("aria-pressed", String(active));
});
render();
});
});
searchInput?.addEventListener("input", render);
render();
});
document.querySelectorAll("[data-substack-boundary]").forEach((container) => {
container.textContent = data.verification_status || "";
});
document.querySelectorAll("[data-substack-scope]").forEach((container) => {
container.textContent = data.catalogue_scope || "";
});
document.querySelectorAll("[data-substack-archive]").forEach((container) => {
container.innerHTML = externalLink(data.archive_url, "Open the complete public archive", "btn primary")
+ externalLink(data.profile_url, "Open the publication home", "btn");
});
}
function renderUpdates(data) {
const updates = Array.isArray(data) ? data : (data.records || []);
const controls = document.querySelector("[data-update-controls]");
const searchInput = controls?.querySelector("[data-update-search]");
const clearButton = controls?.querySelector("[data-update-clear]");
const filterBar = document.querySelector("[data-update-filter]");
let activeCategory = "all";
const filteredUpdates = () => {
const query = String(searchInput?.value || "").trim().toLowerCase();
return updates.filter((update) => {
const haystack = [update.title, update.summary, update.category, update.investor_relevance, update.source_name, update.source_label, update.next_validation].join(" ").toLowerCase();
return (activeCategory === "all" || update.category === activeCategory)
&& (!query || haystack.includes(query));
});
};
const render = () => {
const filtered = filteredUpdates();
document.querySelectorAll("[data-update-result-count]").forEach((node) => {
node.textContent = filtered.length === updates.length ? "All milestone themes shown" : "Filtered milestone view";
});
document.querySelectorAll("[data-updates]").forEach((container) => {
const limit = Number(container.dataset.limit || filtered.length);
const visibleUpdates = filtered.slice(0, limit);
container.innerHTML = visibleUpdates.length ? visibleUpdates.map((update) => `
${escapeHtml(formatUpdateDate(update.date, true))} ${escapeHtml(formatUpdateDate(update.date))}
${escapeHtml(update.category)} ${updateSourceBadge(update)}
${escapeHtml(update.title)}
${escapeHtml(update.summary)}
Why it matters ${escapeHtml(update.investor_relevance)}
Next validation ${escapeHtml(update.next_validation)}
`).join("") : 'No milestones match this view. Clear the search or choose another investor signal.
';
});
};
filterBar?.addEventListener("click", (event) => {
const button = event.target.closest("[data-update-filter-value]");
if (!button) return;
activeCategory = button.dataset.updateFilterValue || "all";
filterBar.querySelectorAll("[data-update-filter-value]").forEach((candidate) => {
const active = candidate === button;
candidate.classList.toggle("is-active", active);
candidate.setAttribute("aria-pressed", String(active));
});
render();
});
searchInput?.addEventListener("input", render);
clearButton?.addEventListener("click", () => {
if (searchInput) searchInput.value = "";
activeCategory = "all";
filterBar?.querySelectorAll("[data-update-filter-value]").forEach((button) => {
const active = button.dataset.updateFilterValue === "all";
button.classList.toggle("is-active", active);
button.setAttribute("aria-pressed", String(active));
});
searchInput?.focus();
render();
});
render();
}
function listItems(items) {
return (items || []).map((item) => `${escapeHtml(item)} `).join("");
}
function sourceButtons(project) {
return [
externalLink(project.github_url, "GitHub", "btn"),
externalLink(project.zenodo_url, "Zenodo", "btn"),
externalLink(project.secondary_zenodo_url, "Zenodo record 2", "btn"),
externalLink(project.doi_url, "DOI", "btn")
].filter(Boolean).join("") || 'No verified public source link is listed. ';
}
function relatedCards(project, projects) {
const bySlug = new Map(projects.map((item) => [item.slug, item]));
const relatedProjects = (project.related_projects || []).map((slug) => bySlug.get(slug)).filter((related) => related?.active_company_project === true);
if (!relatedProjects.length) return 'No additional current company platform records are linked here.
';
return relatedProjects.map((related) => `
${escapeHtml(projectDescriptor(related))} ${escapeHtml(projectName(related))} ${escapeHtml(related.summary)}
${localLink(related.page_url, "Open project", "btn compact")}
`).join("");
}
function supportingVisuals(project) {
return (project.supporting_visuals || []).map((visual) => `
`).join("");
}
function renderProjectDetail(project, projects) {
const container = document.querySelector("[data-project-detail]");
if (!container) return;
if (project.active_company_project !== true) {
renderRetiredProjectRoute(container);
return;
}
const labels = projectMapLabels[project.visual_mode] || projectMapLabels.runtime;
const publicBoundary = project.public_safe
? "Public profile with the stated evidence and claim boundaries."
: "Partner or draft concept. Public claims remain restricted pending review.";
document.title = `${projectName(project)} | R&A Consulting`;
const description = document.querySelector('meta[name="description"]');
if (description) description.content = project.summary;
container.innerHTML = `
Back to Projects
${escapeHtml(projectDescriptor(project))}
${escapeHtml(projectName(project))}
${badge(project.status)}${badge(project.source_status)}
${escapeHtml(project.summary)}
${sourceButtons(project)}
Project profile
${escapeHtml(project.visual_label)} ${escapeHtml(project.technical_summary)}
Verification status: ${escapeHtml(project.verification_status)}
${labels.map((label) => `
${escapeHtml(label)}
`).join("")}
Concept map, not operational proof.
${supportingVisuals(project)}
Current state
What exists now ${listItems(project.exists_now)}
Evidence boundary
What is TO VERIFY ${listItems(project.to_verify)}
Public claim boundary
${escapeHtml(publicBoundary)}
Required caution ${escapeHtml(project.caution)}
Next step ${escapeHtml(project.next_step)}
Portfolio links
Related projects Relationships indicate shared questions or workflow context, not validation transfer between projects.
${relatedCards(project, projects)}
Sources
Open project links Public links are listed only where the registry provides them. Missing links remain visibly unverified.
${sourceButtons(project)}${localLink("publications/", "Public records", "btn")}
`;
}
function renderRetiredProjectRoute(container) {
if (!container) return;
document.title = "Archived reference | Aureon Zorza Technologies";
const description = document.querySelector('meta[name="description"]');
if (description) description.content = "Historical route retained for link continuity; it is not a current R&A Consulting product or company research record.";
let robots = document.querySelector('meta[name="robots"]');
if (!robots) {
robots = document.createElement("meta");
robots.name = "robots";
document.head.appendChild(robots);
}
robots.content = "noindex,follow";
container.innerHTML = `
Archived route
Not part of the current company platform registry. This URL remains available only so older links resolve safely. It is not presented as an R&A Consulting product, company research project, evidence of capability, or current investment material.
${localLink("projects/", "Open current platform record", "btn primary")}${localLink("research/", "Open verified research index", "btn")}
`;
}
function showInlineError(container, message) {
if (!container) return;
if (container.tagName === "TBODY") {
container.innerHTML = `${escapeHtml(message)} `;
return;
}
container.innerHTML = `${escapeHtml(message)}
`;
}
function setActiveNavigation() {
const page = document.body.dataset.page;
const selectedNavigation = page === "projects" && window.location.hash === "#blades"
? "applications"
: page;
document.querySelectorAll("[data-nav]").forEach((link) => {
link.classList.remove("active");
link.removeAttribute("aria-current");
if (link.dataset.nav === selectedNavigation) {
link.classList.add("active");
link.setAttribute("aria-current", "page");
}
});
if (page === "projects" && !window.__aureonProjectNavHashBound) {
window.__aureonProjectNavHashBound = true;
window.addEventListener("hashchange", setActiveNavigation);
}
}
function setupHomeControlPath() {
document.querySelectorAll("[data-home-control-map]").forEach((root) => {
const shell = root.querySelector(".home-control-shell");
const tabs = Array.from(root.querySelectorAll("[data-control-tab]"));
const panels = Array.from(root.querySelectorAll("[data-control-panel]"));
const nodes = Array.from(root.querySelectorAll("[data-control-node]"));
if (!shell || !tabs.length || !panels.length) return;
root.classList.add("is-enhanced");
const activate = (stage, moveFocus = false) => {
const nextTab = tabs.find((tab) => tab.dataset.controlTab === stage) || tabs[0];
const activeStage = nextTab.dataset.controlTab;
const activeIndex = tabs.indexOf(nextTab);
shell.dataset.activeControl = activeStage;
tabs.forEach((tab) => {
const active = tab === nextTab;
tab.classList.toggle("is-active", active);
tab.setAttribute("aria-selected", String(active));
tab.tabIndex = active ? 0 : -1;
});
panels.forEach((panel) => {
const active = panel.dataset.controlPanel === activeStage;
panel.classList.toggle("is-active", active);
panel.hidden = !active;
});
nodes.forEach((node) => {
const nodeIndex = tabs.findIndex((tab) => tab.dataset.controlTab === node.dataset.controlNode);
node.classList.toggle("is-active", node.dataset.controlNode === activeStage);
node.classList.toggle("is-past", nodeIndex >= 0 && nodeIndex < activeIndex);
});
if (moveFocus) nextTab.focus();
};
tabs.forEach((tab, index) => {
tab.addEventListener("click", () => activate(tab.dataset.controlTab));
tab.addEventListener("keydown", (event) => {
let targetIndex = null;
if (event.key === "ArrowRight" || event.key === "ArrowDown") targetIndex = (index + 1) % tabs.length;
if (event.key === "ArrowLeft" || event.key === "ArrowUp") targetIndex = (index - 1 + tabs.length) % tabs.length;
if (event.key === "Home") targetIndex = 0;
if (event.key === "End") targetIndex = tabs.length - 1;
if (targetIndex === null) return;
event.preventDefault();
activate(tabs[targetIndex].dataset.controlTab, true);
});
});
const initial = tabs.find((tab) => tab.getAttribute("aria-selected") === "true") || tabs[0];
activate(initial.dataset.controlTab);
});
}
function setupPlatformArchitecture() {
document.querySelectorAll("[data-platform-architecture]").forEach((root) => {
const shell = root.querySelector(".platform-architecture-shell");
const tabs = Array.from(root.querySelectorAll("[data-platform-layer-tab]"));
const panels = Array.from(root.querySelectorAll("[data-platform-layer-panel]"));
const nodes = Array.from(root.querySelectorAll("[data-platform-layer-node]"));
if (!shell || !tabs.length || !panels.length) return;
root.classList.add("is-enhanced");
const activate = (layer, moveFocus = false) => {
const nextTab = tabs.find((tab) => tab.dataset.platformLayerTab === layer) || tabs[0];
const activeLayer = nextTab.dataset.platformLayerTab;
const activeIndex = tabs.indexOf(nextTab);
shell.dataset.activePlatformLayer = activeLayer;
tabs.forEach((tab) => {
const active = tab === nextTab;
tab.classList.toggle("is-active", active);
tab.setAttribute("aria-selected", String(active));
tab.tabIndex = active ? 0 : -1;
});
panels.forEach((panel) => {
const active = panel.dataset.platformLayerPanel === activeLayer;
panel.classList.toggle("is-active", active);
panel.hidden = !active;
});
nodes.forEach((node) => {
const nodeIndex = tabs.findIndex((tab) => tab.dataset.platformLayerTab === node.dataset.platformLayerNode);
node.classList.toggle("is-active", node.dataset.platformLayerNode === activeLayer);
node.classList.toggle("is-past", nodeIndex >= 0 && nodeIndex < activeIndex);
});
if (moveFocus) nextTab.focus();
};
tabs.forEach((tab, index) => {
tab.addEventListener("click", () => activate(tab.dataset.platformLayerTab));
tab.addEventListener("keydown", (event) => {
let targetIndex = null;
if (event.key === "ArrowRight" || event.key === "ArrowDown") targetIndex = (index + 1) % tabs.length;
if (event.key === "ArrowLeft" || event.key === "ArrowUp") targetIndex = (index - 1 + tabs.length) % tabs.length;
if (event.key === "Home") targetIndex = 0;
if (event.key === "End") targetIndex = tabs.length - 1;
if (targetIndex === null) return;
event.preventDefault();
activate(tabs[targetIndex].dataset.platformLayerTab, true);
});
});
const initial = tabs.find((tab) => tab.getAttribute("aria-selected") === "true") || tabs[0];
activate(initial.dataset.platformLayerTab);
});
}
function setupPublicPacketInspector() {
document.querySelectorAll("[data-packet-inspector]").forEach((root) => {
const shell = root.querySelector(".packet-inspector-shell");
const tabs = Array.from(root.querySelectorAll("[data-packet-layer-tab]"));
const panels = Array.from(root.querySelectorAll("[data-packet-layer-panel]"));
const nodes = Array.from(root.querySelectorAll("[data-packet-layer-node]"));
const readout = root.querySelector("[data-packet-readout]");
if (!shell || !tabs.length || !panels.length) return;
root.classList.add("is-enhanced");
const activate = (layer, moveFocus = false) => {
const nextTab = tabs.find((tab) => tab.dataset.packetLayerTab === layer) || tabs[0];
const activeLayer = nextTab.dataset.packetLayerTab;
const activeIndex = tabs.indexOf(nextTab);
const activePanel = panels.find((panel) => panel.dataset.packetLayerPanel === activeLayer) || panels[0];
shell.dataset.activePacketLayer = activeLayer;
tabs.forEach((tab) => {
const active = tab === nextTab;
tab.classList.toggle("is-active", active);
tab.setAttribute("aria-selected", String(active));
tab.tabIndex = active ? 0 : -1;
});
panels.forEach((panel) => {
const active = panel === activePanel;
panel.classList.toggle("is-active", active);
panel.hidden = !active;
});
nodes.forEach((node) => {
const nodeIndex = tabs.findIndex((tab) => tab.dataset.packetLayerTab === node.dataset.packetLayerNode);
node.classList.toggle("is-active", node.dataset.packetLayerNode === activeLayer);
node.classList.toggle("is-past", nodeIndex >= 0 && nodeIndex < activeIndex);
});
if (readout) readout.textContent = activePanel.dataset.packetReadoutLabel || nextTab.textContent.trim();
if (moveFocus) nextTab.focus();
};
tabs.forEach((tab, index) => {
tab.addEventListener("click", () => activate(tab.dataset.packetLayerTab));
tab.addEventListener("keydown", (event) => {
let targetIndex = null;
if (event.key === "ArrowRight" || event.key === "ArrowDown") targetIndex = (index + 1) % tabs.length;
if (event.key === "ArrowLeft" || event.key === "ArrowUp") targetIndex = (index - 1 + tabs.length) % tabs.length;
if (event.key === "Home") targetIndex = 0;
if (event.key === "End") targetIndex = tabs.length - 1;
if (targetIndex === null) return;
event.preventDefault();
activate(tabs[targetIndex].dataset.packetLayerTab, true);
});
});
const initial = tabs.find((tab) => tab.getAttribute("aria-selected") === "true") || tabs[0];
activate(initial.dataset.packetLayerTab);
});
}
function setupLiveFreshnessConsole() {
document.querySelectorAll("[data-live-freshness-console]").forEach((root) => {
const shell = root.querySelector(".freshness-console-shell");
const tabs = Array.from(root.querySelectorAll("[data-freshness-tab]"));
const panels = Array.from(root.querySelectorAll("[data-freshness-panel]"));
const nodes = Array.from(root.querySelectorAll("[data-freshness-node]"));
const readout = root.querySelector("[data-freshness-readout]");
if (!shell || !tabs.length || !panels.length) return;
root.classList.add("is-enhanced");
const activate = (state, moveFocus = false) => {
const nextTab = tabs.find((tab) => tab.dataset.freshnessTab === state) || tabs[0];
const activeState = nextTab.dataset.freshnessTab;
const activeIndex = tabs.indexOf(nextTab);
const activePanel = panels.find((panel) => panel.dataset.freshnessPanel === activeState) || panels[0];
shell.dataset.activeFreshness = activeState;
tabs.forEach((tab) => {
const active = tab === nextTab;
tab.classList.toggle("is-active", active);
tab.setAttribute("aria-selected", String(active));
tab.tabIndex = active ? 0 : -1;
});
panels.forEach((panel) => {
const active = panel === activePanel;
panel.classList.toggle("is-active", active);
panel.hidden = !active;
});
nodes.forEach((node) => {
const nodeIndex = tabs.findIndex((tab) => tab.dataset.freshnessTab === node.dataset.freshnessNode);
node.classList.toggle("is-active", node.dataset.freshnessNode === activeState);
node.classList.toggle("is-past", nodeIndex >= 0 && nodeIndex < activeIndex);
});
if (readout) readout.textContent = activePanel.dataset.freshnessReadoutLabel || nextTab.textContent.trim();
if (moveFocus) nextTab.focus();
};
tabs.forEach((tab, index) => {
tab.addEventListener("click", () => activate(tab.dataset.freshnessTab));
tab.addEventListener("keydown", (event) => {
let targetIndex = null;
if (event.key === "ArrowRight" || event.key === "ArrowDown") targetIndex = (index + 1) % tabs.length;
if (event.key === "ArrowLeft" || event.key === "ArrowUp") targetIndex = (index - 1 + tabs.length) % tabs.length;
if (event.key === "Home") targetIndex = 0;
if (event.key === "End") targetIndex = tabs.length - 1;
if (targetIndex === null) return;
event.preventDefault();
activate(tabs[targetIndex].dataset.freshnessTab, true);
});
});
const initial = tabs.find((tab) => tab.getAttribute("aria-selected") === "true") || tabs[0];
activate(initial.dataset.freshnessTab);
});
}
function setupEngagementRouter() {
document.querySelectorAll("[data-engagement-router]").forEach((root) => {
const shell = root.querySelector(".engagement-router-shell");
const tabs = Array.from(root.querySelectorAll("[data-engagement-route-tab]"));
const panels = Array.from(root.querySelectorAll("[data-engagement-route-panel]"));
const readout = root.querySelector("[data-engagement-router-readout]");
if (!shell || !tabs.length || !panels.length) return;
root.classList.add("is-enhanced");
const activate = (route, moveFocus = false) => {
const nextTab = tabs.find((tab) => tab.dataset.engagementRouteTab === route) || tabs[0];
const activeRoute = nextTab.dataset.engagementRouteTab;
const activePanel = panels.find((panel) => panel.dataset.engagementRoutePanel === activeRoute) || panels[0];
shell.dataset.activeEngagementRoute = activeRoute;
tabs.forEach((tab) => {
const active = tab === nextTab;
tab.classList.toggle("is-active", active);
tab.setAttribute("aria-selected", String(active));
tab.tabIndex = active ? 0 : -1;
});
panels.forEach((panel) => {
const active = panel === activePanel;
panel.classList.toggle("is-active", active);
panel.hidden = !active;
});
if (readout) readout.textContent = activePanel.dataset.engagementRouteLabel || nextTab.textContent.trim();
if (moveFocus) nextTab.focus();
};
tabs.forEach((tab, index) => {
tab.addEventListener("click", () => activate(tab.dataset.engagementRouteTab));
tab.addEventListener("keydown", (event) => {
let targetIndex = null;
if (event.key === "ArrowRight" || event.key === "ArrowDown") targetIndex = (index + 1) % tabs.length;
if (event.key === "ArrowLeft" || event.key === "ArrowUp") targetIndex = (index - 1 + tabs.length) % tabs.length;
if (event.key === "Home") targetIndex = 0;
if (event.key === "End") targetIndex = tabs.length - 1;
if (targetIndex === null) return;
event.preventDefault();
activate(tabs[targetIndex].dataset.engagementRouteTab, true);
});
});
const routeAliases = {
commercial: "pilot",
evaluation: "pilot",
grant: "partner",
sector: "partner",
"technical-review": "research",
company: "investor",
"investor-partner": "investor"
};
const requestedRoute = new URLSearchParams(window.location.search).get("route");
const initialRoute = routeAliases[requestedRoute] || requestedRoute;
const initial = tabs.find((tab) => tab.dataset.engagementRouteTab === initialRoute)
|| tabs.find((tab) => tab.getAttribute("aria-selected") === "true")
|| tabs[0];
activate(initial.dataset.engagementRouteTab);
});
}
function setupResearchEvidencePath() {
document.querySelectorAll("[data-research-evidence-path]").forEach((root) => {
const shell = root.querySelector(".research-proof-shell");
const tabs = Array.from(root.querySelectorAll("[data-research-stage-tab]"));
const panels = Array.from(root.querySelectorAll("[data-research-stage-panel]"));
const nodes = Array.from(root.querySelectorAll("[data-research-stage-node]"));
if (!shell || !tabs.length || !panels.length) return;
root.classList.add("is-enhanced");
const activate = (stage, moveFocus = false) => {
const nextTab = tabs.find((tab) => tab.dataset.researchStageTab === stage) || tabs[0];
const activeStage = nextTab.dataset.researchStageTab;
const activeIndex = tabs.indexOf(nextTab);
shell.dataset.activeResearchStage = activeStage;
tabs.forEach((tab) => {
const active = tab === nextTab;
tab.classList.toggle("is-active", active);
tab.setAttribute("aria-selected", String(active));
tab.tabIndex = active ? 0 : -1;
});
panels.forEach((panel) => {
const active = panel.dataset.researchStagePanel === activeStage;
panel.classList.toggle("is-active", active);
panel.hidden = !active;
});
nodes.forEach((node) => {
const nodeIndex = tabs.findIndex((tab) => tab.dataset.researchStageTab === node.dataset.researchStageNode);
node.classList.toggle("is-active", node.dataset.researchStageNode === activeStage);
node.classList.toggle("is-past", nodeIndex >= 0 && nodeIndex < activeIndex);
});
if (moveFocus) nextTab.focus();
};
tabs.forEach((tab, index) => {
tab.addEventListener("click", () => activate(tab.dataset.researchStageTab));
tab.addEventListener("keydown", (event) => {
let targetIndex = null;
if (event.key === "ArrowRight" || event.key === "ArrowDown") targetIndex = (index + 1) % tabs.length;
if (event.key === "ArrowLeft" || event.key === "ArrowUp") targetIndex = (index - 1 + tabs.length) % tabs.length;
if (event.key === "Home") targetIndex = 0;
if (event.key === "End") targetIndex = tabs.length - 1;
if (targetIndex === null) return;
event.preventDefault();
activate(tabs[targetIndex].dataset.researchStageTab, true);
});
});
const initial = tabs.find((tab) => tab.getAttribute("aria-selected") === "true") || tabs[0];
activate(initial.dataset.researchStageTab);
});
}
function setupInvestorReviewLens() {
document.querySelectorAll("[data-review-lens]").forEach((root) => {
const tabs = Array.from(root.querySelectorAll("[data-review-tab]"));
const panels = Array.from(root.querySelectorAll("[data-review-panel]"));
if (!tabs.length || !panels.length) return;
root.classList.add("is-enhanced");
const activate = (lens, moveFocus = false) => {
const nextTab = tabs.find((tab) => tab.dataset.reviewTab === lens) || tabs[0];
const activeLens = nextTab.dataset.reviewTab;
root.dataset.activeLens = activeLens;
tabs.forEach((tab) => {
const active = tab === nextTab;
tab.classList.toggle("is-active", active);
tab.setAttribute("aria-selected", String(active));
tab.tabIndex = active ? 0 : -1;
});
panels.forEach((panel) => {
const active = panel.dataset.reviewPanel === activeLens;
panel.classList.toggle("is-active", active);
panel.hidden = !active;
});
if (moveFocus) nextTab.focus();
};
tabs.forEach((tab, index) => {
tab.addEventListener("click", () => activate(tab.dataset.reviewTab));
tab.addEventListener("keydown", (event) => {
let targetIndex = null;
if (event.key === "ArrowRight" || event.key === "ArrowDown") targetIndex = (index + 1) % tabs.length;
if (event.key === "ArrowLeft" || event.key === "ArrowUp") targetIndex = (index - 1 + tabs.length) % tabs.length;
if (event.key === "Home") targetIndex = 0;
if (event.key === "End") targetIndex = tabs.length - 1;
if (targetIndex === null) return;
event.preventDefault();
activate(tabs[targetIndex].dataset.reviewTab, true);
});
});
const initial = tabs.find((tab) => tab.classList.contains("is-active")) || tabs[0];
activate(initial.dataset.reviewTab);
});
}
function setupDiligenceReviewQueue() {
document.querySelectorAll("[data-diligence-queue]").forEach((root) => {
const shell = root.querySelector(".diligence-queue-shell");
const tabs = Array.from(root.querySelectorAll("[data-diligence-gate-tab]"));
const panels = Array.from(root.querySelectorAll("[data-diligence-gate-panel]"));
const nodes = Array.from(root.querySelectorAll("[data-diligence-gate-node]"));
if (!shell || !tabs.length || !panels.length) return;
root.classList.add("is-enhanced");
const activate = (gate, moveFocus = false) => {
const nextTab = tabs.find((tab) => tab.dataset.diligenceGateTab === gate) || tabs[0];
const activeGate = nextTab.dataset.diligenceGateTab;
const activeIndex = tabs.indexOf(nextTab);
shell.dataset.activeGate = activeGate;
tabs.forEach((tab) => {
const active = tab === nextTab;
tab.classList.toggle("is-active", active);
tab.setAttribute("aria-selected", String(active));
tab.tabIndex = active ? 0 : -1;
});
panels.forEach((panel) => {
const active = panel.dataset.diligenceGatePanel === activeGate;
panel.classList.toggle("is-active", active);
panel.hidden = !active;
});
nodes.forEach((node) => {
const nodeIndex = tabs.findIndex((tab) => tab.dataset.diligenceGateTab === node.dataset.diligenceGateNode);
node.classList.toggle("is-active", node.dataset.diligenceGateNode === activeGate);
node.classList.toggle("is-past", nodeIndex >= 0 && nodeIndex < activeIndex);
});
if (moveFocus) nextTab.focus();
};
tabs.forEach((tab, index) => {
tab.addEventListener("click", () => activate(tab.dataset.diligenceGateTab));
tab.addEventListener("keydown", (event) => {
let targetIndex = null;
if (event.key === "ArrowRight" || event.key === "ArrowDown") targetIndex = (index + 1) % tabs.length;
if (event.key === "ArrowLeft" || event.key === "ArrowUp") targetIndex = (index - 1 + tabs.length) % tabs.length;
if (event.key === "Home") targetIndex = 0;
if (event.key === "End") targetIndex = tabs.length - 1;
if (targetIndex === null) return;
event.preventDefault();
activate(tabs[targetIndex].dataset.diligenceGateTab, true);
});
});
const initial = tabs.find((tab) => tab.getAttribute("aria-selected") === "true") || tabs[0];
activate(initial.dataset.diligenceGateTab);
});
}
function synchronizePrimaryNavigation() {
const tabs = [
["projects", "Core", "projects/#core"],
["applications", "Applications", "projects/#blades"],
["research", "Research", "research/"],
["publications", "Evidence", "publications/"],
["about", "Company", "about/"],
["investor", "Investor brief", "funding/investor-deck/", "nav-cta"]
];
document.querySelectorAll(".links").forEach((links) => {
links.innerHTML = tabs.map(([id, label, path, className]) => `${escapeHtml(label)} `).join("");
});
document.querySelectorAll(".brand small").forEach((subtitle) => {
subtitle.textContent = "Evidence systems & deep-tech";
});
}
function setupMobileNavigation() {
const mobile = window.matchMedia("(max-width: 900px)");
document.querySelectorAll(".nav").forEach((nav, index) => {
const links = nav.querySelector(".links");
if (!links || nav.querySelector(".nav-toggle")) return;
links.id = links.id || `primary-navigation-${index + 1}`;
const button = document.createElement("button");
button.className = "nav-toggle";
button.type = "button";
button.setAttribute("aria-controls", links.id);
button.innerHTML = 'Menu ';
nav.insertBefore(button, links);
nav.classList.add("nav-enhanced");
const setExpanded = (requested, returnFocus = false) => {
const expanded = mobile.matches ? requested : true;
links.hidden = mobile.matches && !expanded;
button.setAttribute("aria-expanded", String(expanded));
button.setAttribute("aria-label", expanded ? "Close navigation" : "Open navigation");
if (returnFocus) button.focus();
};
button.addEventListener("click", () => {
setExpanded(button.getAttribute("aria-expanded") !== "true");
});
links.addEventListener("click", (event) => {
if (mobile.matches && event.target.closest("a")) setExpanded(false);
});
nav.addEventListener("keydown", (event) => {
if (event.key !== "Escape" || !mobile.matches || button.getAttribute("aria-expanded") !== "true") return;
event.preventDefault();
setExpanded(false, true);
});
const synchroniseMode = () => setExpanded(false);
if (typeof mobile.addEventListener === "function") mobile.addEventListener("change", synchroniseMode);
else mobile.addListener(synchroniseMode);
synchroniseMode();
});
}
function setupProgressiveReveal() {
if (window.matchMedia("(prefers-reduced-motion: reduce)").matches) return;
const main = document.querySelector("main");
if (main) {
Array.from(main.children).forEach((item) => {
const isRevealSection = item.tagName === "SECTION"
|| item.classList.contains("hero")
|| item.classList.contains("band")
|| item.classList.contains("public-review-path");
if (isRevealSection && !item.hasAttribute("data-reveal")) {
item.setAttribute("data-reveal", "");
}
});
}
const items = Array.from(document.querySelectorAll("[data-reveal]"));
if (!items.length) return;
document.documentElement.classList.add("reveal-enabled");
if (!("IntersectionObserver" in window)) {
items.forEach((item) => item.classList.add("is-visible"));
return;
}
const observer = new IntersectionObserver((entries) => {
entries.forEach((entry) => {
if (!entry.isIntersecting) return;
entry.target.classList.add("is-visible");
if (typeof entry.target.animate === "function") {
entry.target.animate([
{ opacity: 0.72, transform: "translateY(12px)" },
{ opacity: 1, transform: "translateY(0)" }
], {
duration: 520,
easing: "cubic-bezier(0.2, 0.75, 0.2, 1)"
});
}
observer.unobserve(entry.target);
});
}, { rootMargin: "0px 0px -8%", threshold: 0.08 });
items.forEach((item) => observer.observe(item));
const revealHashTarget = () => {
const id = decodeURIComponent(window.location.hash.replace(/^#/, ""));
if (!id) return;
const target = document.getElementById(id);
const revealTarget = target && (target.matches("[data-reveal]") ? target : target.closest("[data-reveal]"));
if (!revealTarget) return;
revealTarget.classList.add("is-visible");
observer.unobserve(revealTarget);
};
window.addEventListener("hashchange", revealHashTarget);
window.requestAnimationFrame(revealHashTarget);
}
function renderPublicReviewPath() {
const main = document.querySelector("main");
if (!main || main.querySelector("[data-public-review-path]")) return;
const page = document.body.dataset.page || "home";
if (!["home", "projects", "diligence"].includes(page)) return;
const stages = [
{
id: "core",
label: "Shared core",
path: "projects/#core",
detail: "Source, claim state, human authority and receipt"
},
{
id: "application",
label: "Application blade",
path: "projects/#blades",
detail: "Buyer, mission use case and inherited controls"
},
{
id: "evidence",
label: "Evidence state",
path: "diligence/",
detail: "What exists, what remains open and what is not implied"
},
{
id: "engage",
label: "Appropriate route",
path: "contact/",
detail: "Pilot, sector, research or investor conversation"
}
];
const stageByPage = {
about: "core",
projects: "application",
research: "evidence",
publications: "evidence",
live: "evidence",
diligence: "evidence",
community: "evidence",
updates: "evidence",
vision: "evidence",
funding: "engage",
contact: "engage"
};
const currentId = stageByPage[page] || "";
const currentIndex = stages.findIndex((stage) => stage.id === currentId);
let nextStage = currentIndex >= 0 && currentIndex < stages.length - 1
? stages[currentIndex + 1]
: stages[0];
let nextLabel = `Continue to ${nextStage.label}`;
if (page === "funding") {
nextStage = { label: "founder conversation", path: "contact/" };
nextLabel = "Start a conversation";
} else if (page === "contact") {
nextLabel = "Restart with the company record";
}
const stageMarkup = stages.map((stage, index) => {
const isCurrent = stage.id === currentId;
return `
0${index + 1}
${escapeHtml(stage.label)}
${escapeHtml(stage.detail)}
`;
}).join("");
main.insertAdjacentHTML("beforeend", `
Public review path
Move from the shared core to a blade, its evidence state and the right route.
One sequence makes breadth legible without turning a submission, discussion or research record into a stronger claim. Read the five claim states →
`);
}
function addCompanySourceLink() {
const card = Array.from(document.querySelectorAll("#company .card")).find((item) => /Companies House\s+NI696693/i.test(item.textContent || ""));
if (!card || card.querySelector("[data-company-register-source]")) return;
card.insertAdjacentHTML("beforeend", 'Open the current Companies House record
');
}
function ensureFundingNavigation() {
document.querySelectorAll(".links").forEach((links) => {
if (links.querySelector('[data-nav="funding"]')) return;
const fundingLink = document.createElement("a");
fundingLink.href = siteUrl("funding/");
fundingLink.dataset.nav = "funding";
fundingLink.textContent = "Funding & partners";
const contactLink = links.querySelector('[data-nav="contact"]');
if (contactLink) links.insertBefore(fundingLink, contactLink);
else links.appendChild(fundingLink);
});
document.querySelectorAll(".footer-links").forEach((links) => {
if (links.querySelector('[data-nav="funding-footer"], [href*="funding/"]')) return;
const fundingLink = document.createElement("a");
fundingLink.href = siteUrl("funding/");
fundingLink.dataset.nav = "funding-footer";
fundingLink.textContent = "Funding & partners";
const contactLink = Array.from(links.querySelectorAll("a")).find((link) => /contact/i.test(link.textContent || ""));
if (contactLink) links.insertBefore(fundingLink, contactLink);
else links.appendChild(fundingLink);
});
}
function ensureDiligenceNavigation() {
document.querySelectorAll(".links").forEach((links) => {
if (links.querySelector('[data-nav="diligence"]')) return;
const diligenceLink = document.createElement("a");
diligenceLink.href = siteUrl("diligence/");
diligenceLink.dataset.nav = "diligence";
diligenceLink.textContent = "Diligence hub";
const companyLink = links.querySelector('[data-nav="about"]');
if (companyLink) links.insertBefore(diligenceLink, companyLink);
else links.appendChild(diligenceLink);
});
document.querySelectorAll(".footer-links").forEach((links) => {
if (links.querySelector('[data-nav="diligence-footer"], [data-nav="diligence"], [href*="diligence/"]')) return;
const diligenceLink = document.createElement("a");
diligenceLink.href = siteUrl("diligence/");
diligenceLink.dataset.nav = "diligence-footer";
diligenceLink.textContent = "Diligence hub";
const contactLink = Array.from(links.querySelectorAll("a")).find((link) => /contact/i.test(link.textContent || ""));
if (contactLink) links.insertBefore(diligenceLink, contactLink);
else links.appendChild(diligenceLink);
});
}
function ensureCommunityNavigation() {
document.querySelectorAll(".footer-links").forEach((links) => {
if (links.querySelector('[data-nav="community-footer"], [href*="community/"]')) return;
const communityLink = document.createElement("a");
communityLink.href = siteUrl("community/");
communityLink.dataset.nav = "community-footer";
communityLink.textContent = "Community";
const contactLink = Array.from(links.querySelectorAll("a")).find((link) => /contact/i.test(link.textContent || ""));
if (contactLink) links.insertBefore(communityLink, contactLink);
else links.appendChild(communityLink);
});
}
function ensurePublicEvidenceNavigation() {
document.querySelectorAll(".footer-links").forEach((links) => {
if (links.querySelector('[data-nav="live-footer"], [href*="live/"]')) return;
const liveLink = document.createElement("a");
liveLink.href = siteUrl("live/");
liveLink.dataset.nav = "live-footer";
liveLink.textContent = "Public proof";
const contactLink = Array.from(links.querySelectorAll("a")).find((link) => /contact/i.test(link.textContent || ""));
if (contactLink) links.insertBefore(liveLink, contactLink);
else links.appendChild(liveLink);
});
}
async function initialize() {
synchronizePrimaryNavigation();
setupMobileNavigation();
setActiveNavigation();
setupHomeControlPath();
setupPlatformArchitecture();
setupPublicPacketInspector();
setupLiveFreshnessConsole();
setupEngagementRouter();
setupResearchEvidencePath();
setupInvestorReviewLens();
setupDiligenceReviewQueue();
renderPublicReviewPath();
setupProgressiveReveal();
ensurePublicEvidenceNavigation();
addCompanySourceLink();
const projectDataNeeded = Boolean(
document.querySelector("[data-project-table], [data-project-stats], [data-project-graph], [data-project-detail]")
|| document.body.dataset.projectActive === "true"
);
if (projectDataNeeded) {
let projects;
try {
projects = await loadJson("data/company-platform.json");
const currentCompanyProjects = projects.filter((project) => project.active_company_project === true);
document.querySelectorAll("[data-project-table]").forEach((tableBody) => setupProjectTable(currentCompanyProjects, tableBody));
renderStats(currentCompanyProjects);
await renderEcosystem(currentCompanyProjects);
const slug = document.body.dataset.projectSlug;
const activeProjectRoute = document.body.dataset.projectActive === "true";
if (slug && activeProjectRoute) {
const project = projects.find((item) => item.slug === slug);
if (project && project.active_company_project === true) renderProjectDetail(project, projects);
else renderRetiredProjectRoute(document.querySelector("[data-project-detail]"));
}
} catch (_error) {
document.querySelectorAll("[data-project-table], [data-project-stats], [data-project-graph]").forEach((container) => {
showInlineError(container, "The public platform record is temporarily unavailable. Use the public repository or contact route for source access.");
});
if (document.body.dataset.projectActive === "true") {
showInlineError(document.querySelector("[data-project-detail]"), "The public platform record is temporarily unavailable. Use the public repository or contact route for source access.");
}
}
}
if (document.querySelector("[data-publications], [data-publications-preview], [data-evidence-library]")) {
try {
renderPublications(await loadJson("data/publications.json"));
} catch (_error) {
document.querySelectorAll("[data-publications], [data-publications-preview], [data-evidence-records]").forEach((container) => showInlineError(container, "Public records are temporarily unavailable. Do not infer a hidden register; please retry or use the Research and Contact routes."));
}
}
if (document.querySelector("[data-research], [data-research-profiles], [data-research-notes]")) {
try {
renderResearch(await loadJson("data/research.json"));
} catch (_error) {
document.querySelectorAll("[data-research], [data-research-profiles], [data-research-notes]").forEach((container) => showInlineError(container, "The research index is temporarily unavailable."));
}
}
if (document.querySelector("[data-research-catalogue-recent], [data-research-catalogue-total], [data-research-catalogue-orcid], [data-research-catalogue-zenodo]")) {
try {
renderResearchCatalogue(await loadJson("data/research-catalogue.json"));
} catch (_error) {
document.querySelectorAll("[data-research-catalogue-recent]").forEach((container) => showInlineError(container, "The ORCID and Zenodo orientation records are temporarily unavailable. Use the direct profile links to inspect the source records."));
}
}
if (document.querySelector("[data-footprint-value], [data-footprint-text]")) {
try {
renderPublicFootprint(await loadJson("data/public-attention-snapshot.json"));
} catch (_error) {
// The dated, source-labelled HTML values remain visible as a fail-open fallback.
}
}
if (document.querySelector("[data-substack-catalogue]")) {
try {
renderSubstackCatalogue(await loadJson("data/substack-research-index.json"));
} catch (_error) {
document.querySelectorAll("[data-substack-catalogue]").forEach((container) => showInlineError(container, "The public research-note catalogue is temporarily unavailable."));
}
}
if (document.querySelector("[data-updates]")) {
try {
renderUpdates(await loadJson("data/updates.json"));
} catch (_error) {
document.querySelectorAll("[data-updates]").forEach((container) => showInlineError(container, "Investor milestones are temporarily unavailable."));
}
}
}
initialize();
})();