import { renderChart } from '../public/insight-charts.mjs'; import { escapeHtml as esc } from './html.mjs'; export const businessAssets = ['mero-insights.css', 'business-layouts.css', 'mero-insights.js']; const money = new Intl.NumberFormat('en-US', { style: 'currency', currency: 'USD', maximumFractionDigits: 0 }).format; const date = new Intl.DateTimeFormat('en-US', { month: 'short', day: 'numeric', year: 'numeric', timeZone: 'UTC' }).format; const stages = [ { id: 'discovery', name: 'Discovery', probability: .25 }, { id: 'proposal', name: 'Proposal', probability: .55 }, { id: 'negotiation', name: 'Negotiation', probability: .8 }, ]; const deals = [ { id: 'forma', company: 'Forma Works', mark: 'F', project: 'Retail rollout', stage: 'proposal', amount: 68400, contact: 'Lena Park', owner: 'Maya Chen', close: '2026-12-11', next: 'Walk Lena through the revised rollout estimate on November 24.' }, { id: 'arc', company: 'Arc & Field', mark: 'A', project: 'Identity system', stage: 'discovery', amount: 32500, contact: 'Theo Jones', owner: 'Jon Bell', close: '2026-12-18', next: 'Review the brand audit with Theo and agree the scope for phase one.' }, { id: 'stillwater', company: 'Stillwater', mark: 'S', project: 'Showroom fixtures', stage: 'negotiation', amount: 54200, contact: 'Nina Shah', owner: 'Maya Chen', close: '2026-11-27', next: 'Confirm the installation dates before procurement signs the agreement.' }, { id: 'tandem', company: 'Tandem Labs', mark: 'T', project: 'Member workspace', stage: 'proposal', amount: 41600, contact: 'Alex Reed', owner: 'Eli Rivera', close: '2026-12-14', next: 'Share the phased fit-out schedule with Alex ahead of the budget review.' }, { id: 'cinder', company: 'Cinder Studio', mark: 'C', project: 'Flagship concept', stage: 'discovery', amount: 28000, contact: 'Sofia Wolf', owner: 'Jon Bell', close: '2026-12-21', next: 'Run a materials workshop with Sofia and the retail team.' }, { id: 'union', company: 'Union House', mark: 'U', project: 'Hospitality collection', stage: 'negotiation', amount: 76300, contact: 'Leo Meyer', owner: 'Eli Rivera', close: '2026-11-30', next: 'Send the final sample board for purchasing approval.' }, ]; export { deals as studioDeals }; // Each posting has one signed USD amount. Balances, inflow and outflow derive from the same ledger. const ledger = [ ['2026-08-05', 'Forma Works', 'Client payment', 'FW-081', 18600], ['2026-08-12', 'Linehaul Freight', 'Shipping', 'LF-912', -2860], ['2026-08-18', 'Arc & Field', 'Client payment', 'AF-043', 14300], ['2026-08-24', 'Studio payroll', 'Payroll', 'PR-008', -19300], ['2026-08-28', 'Union House', 'Project deposit', 'UH-121', 22400], ['2026-09-02', 'Tandem Labs', 'Project deposit', 'TL-091', 14250], ['2026-09-08', 'Morrow Supply', 'Materials', 'MS-620', -8120], ['2026-09-17', 'Forma Works', 'Client payment', 'FW-094', 36100], ['2026-09-24', 'Studio payroll', 'Payroll', 'PR-009', -19800], ['2026-09-30', 'Cinder Studio', 'Client payment', 'CS-707', 9600], ['2026-10-02', 'Union House', 'Project deposit', 'UH-135', 24800], ['2026-10-09', 'Morrow Supply', 'Materials', 'MS-641', -12400], ['2026-10-16', 'Stillwater', 'Client payment', 'SW-182', 18500], ['2026-10-23', 'Studio payroll', 'Payroll', 'PR-010', -21600], ['2026-10-29', 'Forma Works', 'Client payment', 'FW-106', 32400], ].map(([day, name, category, reference, amount]) => ({ day, name, category, reference, amount })); const periods = [ { key: '2026-08', name: 'August', short: 'Aug', end: 31 }, { key: '2026-09', name: 'September', short: 'Sep', end: 30 }, { key: '2026-10', name: 'October', short: 'Oct', end: 31 }, ]; const initialBalance = 86400; function destination(screen, params = {}) { const query = new URLSearchParams(Object.entries(params).filter(([, value]) => value)).toString(); return '/layouts/' + screen + (query ? '?' + query : ''); } function link(href, label, { className = '', current = false, id = '', name = '' } = {}) { const safe = esc(href); return `${label}`; } function dateLabel(iso) { return date(new Date(iso + 'T12:00:00Z')); } function stat(label, value, className = '') { return `
Open opportunities · October–December 2026
Total pipeline
${money(total)}Operating account · USD
Closing balance
${money(closing)}${esc(period.name)} ${period.end}, 2026