{
  "type": "scritch",
  "version": 1,
  "source": "example",
  "shapes": [
    {
      "id": 1,
      "type": "ellipse",
      "x": 60,
      "y": 40,
      "w": 200,
      "h": 90,
      "color": "#3b82f6",
      "bgColor": "#3b82f6",
      "width": 4
    },
    { "id": 2, "type": "text", "text": "start", "size": 22, "color": "#1b1e24", "containerId": 1 },

    {
      "id": 3,
      "type": "rect",
      "x": 40,
      "y": 240,
      "w": 240,
      "h": 110,
      "color": "#0f172a",
      "width": 4
    },
    { "id": 4, "type": "text", "text": "for each card", "size": 22, "color": "#0f172a", "containerId": 3 },

    {
      "id": 5,
      "type": "diamond",
      "x": 400,
      "y": 220,
      "w": 260,
      "h": 150,
      "color": "#f97316",
      "width": 4
    },
    { "id": 6, "type": "text", "text": "threw?", "size": 22, "color": "#f97316", "containerId": 5 },

    {
      "id": 7,
      "type": "rect",
      "x": 780,
      "y": 240,
      "w": 220,
      "h": 110,
      "color": "#ef4444",
      "bgColor": "#ef4444",
      "width": 4
    },
    { "id": 8, "type": "text", "text": "collect error", "size": 20, "color": "#1b1e24", "containerId": 7 },

    {
      "id": 9,
      "type": "rect",
      "x": 400,
      "y": 520,
      "w": 260,
      "h": 110,
      "color": "#22c55e",
      "bgColor": "#22c55e",
      "width": 4
    },
    { "id": 10, "type": "text", "text": "keep result", "size": 20, "color": "#1b1e24", "containerId": 9 },

    {
      "id": 11,
      "type": "arrow",
      "x1": 160,
      "y1": 130,
      "x2": 160,
      "y2": 240,
      "color": "#64748b",
      "width": 4,
      "startBinding": 1,
      "endBinding": 3,
      "route": "orthogonal"
    },
    {
      "id": 12,
      "type": "arrow",
      "x1": 280,
      "y1": 295,
      "x2": 400,
      "y2": 295,
      "color": "#64748b",
      "width": 4,
      "startBinding": 3,
      "endBinding": 5,
      "route": "orthogonal"
    },
    {
      "id": 13,
      "type": "arrow",
      "x1": 660,
      "y1": 295,
      "x2": 780,
      "y2": 295,
      "color": "#64748b",
      "width": 4,
      "startBinding": 5,
      "endBinding": 7,
      "route": "orthogonal"
    },
    { "id": 14, "type": "text", "text": "yes", "size": 17, "color": "#64748b", "containerId": 13 },
    {
      "id": 15,
      "type": "arrow",
      "x1": 530,
      "y1": 370,
      "x2": 530,
      "y2": 520,
      "color": "#64748b",
      "width": 4,
      "startBinding": 5,
      "endBinding": 9,
      "route": "orthogonal"
    },
    { "id": 16, "type": "text", "text": "no", "size": 17, "color": "#64748b", "containerId": 15 },

    {
      "id": 17,
      "type": "arrow",
      "x1": 890,
      "y1": 350,
      "x2": 160,
      "y2": 350,
      "color": "#94a3b8",
      "width": 3,
      "strokeStyle": "dashed",
      "startBinding": 7,
      "endBinding": 3,
      "route": "orthogonal"
    },
    { "id": 18, "type": "text", "text": "next card", "size": 16, "color": "#94a3b8", "containerId": 17 },

    {
      "id": 19,
      "type": "text",
      "text": "This whole diagram is one JSON file. The arrows carry no elbow coordinates — they name the boxes they join and let the renderer route around whatever is in the way.",
      "x": 60,
      "y": 700,
      "size": 18,
      "fontFamily": "sans",
      "color": "#475569",
      "boxW": 560
    }
  ]
}
