{
  "schemaVersion": 1,
  "slug": "baby-shower-calculator",
  "category": "party",
  "kind": "implementation",
  "independentValidation": false,
  "implementationHash": "b7f3f3d72d475b26c8122b3fa7fda40d78126f7e38124ff4a276e80a478cc338",
  "provenance": "Generated from the calculation contract used by the published page. Publication is not external validation.",
  "sourceFiles": [
    "data/calculators/baby-shower-calculator.json",
    "src/engine.js"
  ],
  "runtimeSource": "/sources/engine.txt",
  "runtimeHash": "5c888d8898afbdee36267bb9977829e1e2ac568f6677c8ee87469c139864645c",
  "scope": "The compute function records implemented equations, constants, lookup tables and custom rules. Inputs record defaults and allowed values; outputs record precision and units. Defaults are examples, not recommendations. General background references are not evidence for this specific algorithm.",
  "publishedFormula": {
    "formula": "Q = ⌈(g + 0.5 v) × m⌉",
    "vars": [
      [
        "g",
        "Guests"
      ],
      [
        "v",
        "VIP guests"
      ],
      [
        "m",
        "Per-person multiplier"
      ],
      [
        "Q",
        "Item quantity"
      ]
    ],
    "note": "m depends on the meal: snacks 1, brunch 1.4, lunch 1.6; savoury bites use 2 × m; all quantities round up."
  },
  "externalEvidence": null,
  "contract": {
    "compute": "const mult = meal === 'lunch' ? 1.6 : meal === 'brunch' ? 1.4 : 1; const eff = guests + vipGuests*0.5; return { savouryBites: Math.ceil(eff*2*mult), dessertServings: Math.ceil(eff*1.5), drinkServings: Math.ceil(eff*(1.5 + hours*0.6)), plates: Math.ceil(eff*1.5), cups: Math.ceil(eff*(2 + hours*0.5)), napkins: Math.ceil(eff*3), cakeServings: Math.ceil(eff*1.2) };",
    "inputs": [
      {
        "name": "guests",
        "type": "number",
        "default": 20,
        "min": 1,
        "max": 500,
        "step": 1,
        "slider": true
      },
      {
        "name": "hours",
        "type": "number",
        "default": 3,
        "min": 1,
        "max": 12,
        "step": 0.5,
        "slider": true
      },
      {
        "name": "meal",
        "type": "select",
        "default": "snacks",
        "options": [
          {
            "value": "snacks"
          },
          {
            "value": "lunch"
          },
          {
            "value": "brunch"
          }
        ]
      },
      {
        "name": "vipGuests",
        "type": "number",
        "default": 2,
        "min": 0,
        "max": 200,
        "step": 1,
        "slider": true
      }
    ],
    "outputs": [
      {
        "name": "savouryBites",
        "precision": 0,
        "unit": ""
      },
      {
        "name": "dessertServings",
        "precision": 0,
        "unit": ""
      },
      {
        "name": "drinkServings",
        "precision": 0,
        "unit": ""
      },
      {
        "name": "plates",
        "precision": 0,
        "unit": ""
      },
      {
        "name": "cups",
        "precision": 0,
        "unit": ""
      },
      {
        "name": "napkins",
        "precision": 0,
        "unit": ""
      },
      {
        "name": "cakeServings",
        "precision": 0,
        "unit": ""
      }
    ],
    "interpret": null
  }
}
