```ts
/** Total the base parts an order of a kit consumes. */
export function explodeKit(catalog: Record<string, { makes: number; parts: [string, number][] }>, kit: string, want: number): Record<string, number> {
  if (!Object.prototype.hasOwnProperty.call(catalog, kit)) {
    throw new Error(`the catalog does not define ${kit}`);
  }
  const totals: Record<string, number> = {};

  function explode(kit: string, want: number) {
    const recipe = catalog[kit];
    const runs = Math.ceil(want / recipe.makes);
    for (const [part, count] of recipe.parts) {
      if (catalog.hasOwnProperty(part)) {
        explode(part, count * runs);
      } else {
        totals[part] = (totals[part] || 0) + count * runs;
      }
    }
  }

  explode(kit, want);
  return totals;
}
```