{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://squaremetry.com/format/v1/schema.json",
  "title": "Squaremetry plan file (.sqm)",
  "description": "A floor plan measured to a standard. Every length and point is a whole number in 0.1 mm (1 m = 10,000; 1 ft = 3,048; 1 in = 254); areas are whole square units of 0.1 mm. Derived areas are optional and always carry the rule set and its version. The address is optional.",
  "type": "object",
  "properties": {
    "format": {
      "type": "string",
      "const": "squaremetry-plan"
    },
    "version": {
      "type": "number",
      "const": 1
    },
    "savedAt": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
    },
    "project": {
      "$ref": "#/$defs/Project"
    },
    "derived": {
      "$ref": "#/$defs/Derived"
    }
  },
  "required": [
    "format",
    "version",
    "project"
  ],
  "$defs": {
    "Project": {
      "type": "object",
      "properties": {
        "schemaVersion": {
          "type": "number",
          "const": 1
        },
        "id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 80
        },
        "name": {
          "type": "string",
          "maxLength": 120
        },
        "units": {
          "type": "string",
          "enum": [
            "metric",
            "imperial"
          ]
        },
        "normProfile": {
          "type": "string",
          "enum": [
            "nl-meetinstructie-2019-07",
            "us-ansi-z765-2021",
            "de-woflv-2004",
            "none"
          ]
        },
        "normChosen": {
          "type": "boolean",
          "const": true
        },
        "floors": {
          "maxItems": 40,
          "type": "array",
          "items": {
            "$ref": "#/$defs/Floor"
          }
        },
        "outdoor": {
          "default": [],
          "type": "array",
          "items": {
            "$ref": "#/$defs/Outdoor"
          }
        },
        "outbuildings": {
          "default": [],
          "type": "array",
          "items": {
            "$ref": "#/$defs/Outbuilding"
          }
        },
        "section": {
          "type": "object",
          "properties": {
            "a": {
              "type": "object",
              "properties": {
                "x": {
                  "type": "integer",
                  "minimum": -9007199254740991,
                  "maximum": 9007199254740991
                },
                "y": {
                  "type": "integer",
                  "minimum": -9007199254740991,
                  "maximum": 9007199254740991
                }
              },
              "required": [
                "x",
                "y"
              ]
            },
            "b": {
              "type": "object",
              "properties": {
                "x": {
                  "type": "integer",
                  "minimum": -9007199254740991,
                  "maximum": 9007199254740991
                },
                "y": {
                  "type": "integer",
                  "minimum": -9007199254740991,
                  "maximum": 9007199254740991
                }
              },
              "required": [
                "x",
                "y"
              ]
            },
            "plan": {
              "type": "boolean"
            }
          },
          "required": [
            "a",
            "b"
          ]
        },
        "view3d": {
          "type": "object",
          "properties": {
            "views": {
              "maxItems": 30,
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80
                  },
                  "mode": {
                    "type": "string",
                    "enum": [
                      "axo",
                      "section",
                      "bird",
                      "eye",
                      "top"
                    ]
                  },
                  "floorId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80
                  },
                  "above": {
                    "type": "boolean"
                  },
                  "pos": {
                    "type": "array",
                    "prefixItems": [
                      {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      }
                    ],
                    "items": false,
                    "minItems": 3,
                    "maxItems": 3
                  },
                  "target": {
                    "type": "array",
                    "prefixItems": [
                      {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      }
                    ],
                    "items": false,
                    "minItems": 3,
                    "maxItems": 3
                  },
                  "look": {
                    "type": "array",
                    "prefixItems": [
                      {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      }
                    ],
                    "items": false,
                    "minItems": 2,
                    "maxItems": 2
                  },
                  "sheet": {
                    "type": "object",
                    "properties": {
                      "alpha": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      "zoom": {
                        "type": "integer",
                        "minimum": 100,
                        "maximum": 20000
                      },
                      "panX": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      "panY": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      "tilt": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9000
                      },
                      "ob": {
                        "type": "integer",
                        "minimum": -9000,
                        "maximum": 9000
                      },
                      "depth": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 1000
                      }
                    },
                    "required": [
                      "alpha",
                      "zoom",
                      "panX",
                      "panY"
                    ]
                  },
                  "cut": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 9007199254740991
                  },
                  "style": {
                    "type": "string",
                    "enum": [
                      "model",
                      "real"
                    ]
                  },
                  "sun": {
                    "type": "object",
                    "properties": {
                      "month": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 12
                      },
                      "minute": {
                        "type": "integer",
                        "minimum": 300,
                        "maximum": 1260
                      }
                    },
                    "required": [
                      "month",
                      "minute"
                    ]
                  },
                  "furnish": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "id",
                  "name",
                  "mode",
                  "floorId",
                  "above"
                ]
              }
            },
            "style": {
              "type": "string",
              "enum": [
                "model",
                "real"
              ]
            },
            "sun": {
              "type": "object",
              "properties": {
                "month": {
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 12
                },
                "minute": {
                  "type": "integer",
                  "minimum": 300,
                  "maximum": 1260
                }
              },
              "required": [
                "month",
                "minute"
              ]
            },
            "furnish": {
              "type": "boolean"
            }
          }
        },
        "dims": {
          "type": "object",
          "properties": {
            "show": {
              "type": "string",
              "enum": [
                "outer",
                "chains",
                "inner",
                "both",
                "none"
              ]
            },
            "style": {
              "type": "string",
              "enum": [
                "illustrated",
                "technical"
              ]
            },
            "sides": {
              "type": "string",
              "enum": [
                "two",
                "all"
              ]
            },
            "inner": {
              "type": "string",
              "enum": [
                "text",
                "lines"
              ]
            }
          },
          "required": [
            "show",
            "style"
          ]
        },
        "prices": {
          "type": "object",
          "properties": {
            "floor": {
              "type": "number",
              "minimum": 0,
              "maximum": 1000000
            },
            "wall": {
              "type": "number",
              "minimum": 0,
              "maximum": 1000000
            },
            "skirting": {
              "type": "number",
              "minimum": 0,
              "maximum": 1000000
            },
            "ceiling": {
              "type": "number",
              "minimum": 0,
              "maximum": 1000000
            }
          }
        },
        "north": {
          "type": "number",
          "minimum": 0,
          "exclusiveMaximum": 360
        },
        "roomSet": {
          "type": "string",
          "enum": [
            "house",
            "apartment",
            "office",
            "shop",
            "mine"
          ]
        },
        "presentation": {
          "type": "object",
          "properties": {
            "title": {
              "type": "string",
              "maxLength": 120
            },
            "by": {
              "type": "string",
              "maxLength": 120
            },
            "intro": {
              "type": "string",
              "maxLength": 2000
            },
            "rooms": {
              "maxItems": 200,
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "floor": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80
                  },
                  "room": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 2000
                  },
                  "note": {
                    "type": "string",
                    "maxLength": 1000
                  }
                },
                "required": [
                  "floor",
                  "room"
                ]
              }
            },
            "look": {
              "type": "object",
              "properties": {
                "bg": {
                  "type": "string",
                  "enum": [
                    "paper",
                    "white",
                    "office",
                    "dark"
                  ]
                },
                "font": {
                  "type": "string",
                  "enum": [
                    "sans",
                    "serif",
                    "mono"
                  ]
                },
                "margin": {
                  "type": "string",
                  "enum": [
                    "tight",
                    "normal",
                    "roomy"
                  ]
                }
              },
              "required": [
                "bg",
                "font",
                "margin"
              ]
            }
          },
          "required": [
            "title",
            "rooms"
          ]
        },
        "survey": {
          "type": "object",
          "properties": {
            "rules": {
              "type": "string",
              "enum": [
                "0.1.0",
                "0.1.1",
                "0.2.0"
              ]
            },
            "kind": {
              "type": "string",
              "enum": [
                "professional",
                "indicative"
              ]
            },
            "address": {
              "type": "string",
              "maxLength": 160
            },
            "postcode": {
              "type": "string",
              "maxLength": 12
            },
            "city": {
              "type": "string",
              "maxLength": 80
            },
            "cadastral": {
              "type": "string",
              "maxLength": 80
            },
            "client": {
              "type": "string",
              "maxLength": 120
            },
            "number": {
              "type": "string",
              "maxLength": 40
            },
            "date": {
              "type": "string",
              "maxLength": 40
            },
            "by": {
              "type": "string",
              "maxLength": 120
            },
            "company": {
              "type": "string",
              "maxLength": 120
            },
            "place": {
              "type": "string",
              "maxLength": 80
            },
            "certificate": {
              "type": "string",
              "enum": [
                "A",
                "B"
              ]
            },
            "source": {
              "type": "string",
              "maxLength": 300
            },
            "under": {
              "type": "integer",
              "minimum": 0,
              "maximum": 20000
            },
            "ag": {
              "type": "object",
              "properties": {
                "value": {
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 9007199254740991
                },
                "source": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 120
                }
              },
              "required": [
                "value",
                "source"
              ]
            },
            "levels": {
              "type": "boolean"
            }
          }
        },
        "locks": {
          "type": "object",
          "properties": {
            "build": {
              "type": "boolean"
            },
            "items": {
              "type": "boolean"
            },
            "notes": {
              "type": "boolean"
            },
            "dims": {
              "type": "boolean"
            }
          }
        },
        "buildings": {
          "maxItems": 20,
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "minLength": 1,
                "maxLength": 80
              },
              "name": {
                "type": "string",
                "maxLength": 80
              },
              "kind": {
                "type": "string",
                "enum": [
                  "garage",
                  "shed",
                  "summerhouse",
                  "carport",
                  "canopy"
                ]
              },
              "sharedWall": {
                "type": "boolean"
              },
              "reachableFromInside": {
                "type": "boolean"
              },
              "lockable": {
                "type": "boolean"
              },
              "separateBagBuilding": {
                "type": "boolean"
              },
              "living": {
                "type": "boolean"
              },
              "foundation": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "enum": [
                      "crawl",
                      "slab",
                      "basement"
                    ]
                  },
                  "floor": {
                    "type": "integer",
                    "minimum": 500,
                    "maximum": 10000
                  },
                  "depth": {
                    "type": "integer",
                    "minimum": 1000,
                    "maximum": 20000
                  }
                },
                "required": [
                  "kind"
                ]
              },
              "adu": {
                "type": "boolean"
              }
            },
            "required": [
              "id",
              "name",
              "kind",
              "sharedWall",
              "reachableFromInside",
              "lockable",
              "separateBagBuilding"
            ]
          }
        },
        "album": {
          "type": "object",
          "properties": {
            "hide": {
              "maxItems": 200,
              "type": "array",
              "items": {
                "type": "string",
                "minLength": 1,
                "maxLength": 160
              }
            },
            "order": {
              "maxItems": 200,
              "type": "array",
              "items": {
                "type": "string",
                "minLength": 1,
                "maxLength": 160
              }
            },
            "own": {
              "maxItems": 20,
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 40
                  },
                  "title": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80
                  },
                  "text": {
                    "type": "string",
                    "maxLength": 2000
                  }
                },
                "required": [
                  "id",
                  "title",
                  "text"
                ]
              }
            }
          }
        },
        "foundation": {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "enum": [
                "crawl",
                "slab",
                "basement"
              ]
            },
            "floor": {
              "type": "integer",
              "minimum": 500,
              "maximum": 10000
            },
            "depth": {
              "type": "integer",
              "minimum": 1000,
              "maximum": 20000
            }
          },
          "required": [
            "kind"
          ]
        },
        "site": {
          "type": "object",
          "properties": {
            "parcel": {
              "minItems": 3,
              "maxItems": 400,
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "x": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  "y": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  }
                },
                "required": [
                  "x",
                  "y"
                ]
              }
            },
            "src": {
              "type": "string",
              "enum": [
                "registry",
                "drawn"
              ]
            },
            "terrain": {
              "type": "object",
              "properties": {
                "pts": {
                  "maxItems": 1200,
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "x": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      "y": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      "z": {
                        "type": "integer",
                        "minimum": -200000,
                        "maximum": 200000
                      },
                      "m": {
                        "type": "boolean",
                        "const": true
                      }
                    },
                    "required": [
                      "x",
                      "y",
                      "z"
                    ]
                  }
                },
                "ahn": {
                  "type": "string",
                  "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                }
              },
              "required": [
                "pts"
              ]
            }
          }
        },
        "systems": {
          "type": "object",
          "properties": {
            "main": {
              "type": "integer",
              "minimum": 10,
              "maximum": 400
            },
            "phases": {
              "anyOf": [
                {
                  "type": "number",
                  "const": 1
                },
                {
                  "type": "number",
                  "const": 3
                }
              ]
            },
            "ufhMax": {
              "type": "integer",
              "minimum": 200000,
              "maximum": 3000000
            },
            "circuits": {
              "maxItems": 60,
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80
                  },
                  "n": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 99
                  },
                  "name": {
                    "type": "string",
                    "maxLength": 80
                  },
                  "amp": {
                    "type": "integer",
                    "minimum": 2,
                    "maximum": 125
                  },
                  "rcd": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 12
                  },
                  "kind": {
                    "type": "string",
                    "enum": [
                      "lights",
                      "sockets",
                      "mixed",
                      "cooker",
                      "washer",
                      "dryer",
                      "dishwasher",
                      "oven",
                      "heat_pump",
                      "ev",
                      "other"
                    ]
                  },
                  "phases": {
                    "anyOf": [
                      {
                        "type": "number",
                        "const": 1
                      },
                      {
                        "type": "number",
                        "const": 3
                      }
                    ]
                  }
                },
                "required": [
                  "id",
                  "n",
                  "name",
                  "amp",
                  "rcd"
                ]
              }
            }
          },
          "required": [
            "circuits"
          ]
        },
        "selfMeasure": {
          "type": "object",
          "properties": {
            "asked": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}Z$"
            },
            "done": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}Z$"
            },
            "checked": {
              "type": "object",
              "properties": {
                "at": {
                  "type": "string",
                  "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}Z$"
                },
                "by": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 120
                }
              },
              "required": [
                "at",
                "by"
              ]
            }
          },
          "required": [
            "asked"
          ]
        },
        "assignment": {
          "type": "object",
          "properties": {
            "kinds": {
              "minItems": 1,
              "maxItems": 4,
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "measure",
                  "plan",
                  "photos",
                  "report"
                ]
              }
            },
            "status": {
              "type": "string",
              "enum": [
                "new",
                "planned",
                "measured",
                "delivered",
                "correction",
                "approved"
              ]
            },
            "client": {
              "type": "string",
              "maxLength": 120
            },
            "ref": {
              "type": "string",
              "maxLength": 40
            },
            "address": {
              "type": "string",
              "maxLength": 160
            },
            "visit": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
            },
            "due": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
            },
            "note": {
              "type": "string",
              "maxLength": 1000
            },
            "log": {
              "maxItems": 60,
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "at": {
                    "type": "string",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}Z$"
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "new",
                      "planned",
                      "measured",
                      "delivered",
                      "correction",
                      "approved"
                    ]
                  }
                },
                "required": [
                  "at",
                  "status"
                ]
              }
            }
          },
          "required": [
            "kinds",
            "status"
          ]
        },
        "approval": {
          "type": "object",
          "properties": {
            "name": {
              "type": "string",
              "minLength": 1,
              "maxLength": 120
            },
            "at": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}Z$"
            },
            "stamp": {
              "type": "string",
              "pattern": "^[0-9a-f]{8}$"
            },
            "sig": {
              "type": "string",
              "pattern": "^[ML0-9 ]{3,12000}$"
            },
            "role": {
              "type": "string",
              "enum": [
                "client",
                "seller"
              ]
            }
          },
          "required": [
            "name",
            "at",
            "stamp"
          ]
        },
        "quote": {
          "type": "object",
          "properties": {
            "number": {
              "type": "string",
              "maxLength": 40
            },
            "client": {
              "type": "string",
              "maxLength": 120
            },
            "date": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
            },
            "valid": {
              "type": "integer",
              "minimum": 1,
              "maximum": 365
            },
            "note": {
              "type": "string",
              "maxLength": 1000
            },
            "lines": {
              "maxItems": 100,
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80
                  },
                  "label": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "from": {
                    "type": "string",
                    "maxLength": 60,
                    "pattern": "^[a-z][a-z0-9]{0,15}(\\.[a-z0-9_-]{1,24}){0,2}$"
                  },
                  "qty": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 1000000
                  },
                  "unit": {
                    "type": "string",
                    "enum": [
                      "pc",
                      "h",
                      "job",
                      "m2",
                      "m"
                    ]
                  },
                  "price": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 1000000
                  },
                  "vat": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 30
                  },
                  "discount": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 100
                  },
                  "markup": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 1000
                  },
                  "vak": {
                    "type": "string",
                    "enum": [
                      "demolition",
                      "building",
                      "finishing",
                      "floors",
                      "tiling",
                      "kitchen",
                      "electrical",
                      "plumbing",
                      "heating",
                      "air",
                      "other"
                    ]
                  }
                },
                "required": [
                  "id",
                  "label",
                  "price",
                  "vat"
                ]
              }
            },
            "signed": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 120
                },
                "at": {
                  "type": "string",
                  "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}Z$"
                },
                "sig": {
                  "type": "string",
                  "pattern": "^[ML0-9 ]{3,12000}$"
                },
                "stamp": {
                  "type": "string",
                  "pattern": "^[0-9a-f]{8}$"
                }
              },
              "required": [
                "name",
                "at",
                "stamp"
              ]
            }
          },
          "required": [
            "date",
            "valid",
            "lines"
          ]
        },
        "checklist": {
          "type": "object",
          "properties": {
            "set": {
              "type": "string",
              "enum": [
                "nl",
                "ansi"
              ]
            },
            "items": {
              "type": "object",
              "propertyNames": {
                "type": "string",
                "enum": [
                  "attic",
                  "bearing",
                  "grade",
                  "heights",
                  "outside",
                  "levels",
                  "sheds"
                ]
              },
              "additionalProperties": {
                "type": "string",
                "enum": [
                  "yes",
                  "no",
                  "na"
                ]
              }
            },
            "notes": {
              "type": "object",
              "propertyNames": {
                "type": "string",
                "enum": [
                  "attic",
                  "bearing",
                  "grade",
                  "heights",
                  "outside",
                  "levels",
                  "sheds"
                ]
              },
              "additionalProperties": {
                "type": "string",
                "maxLength": 300
              }
            },
            "signed": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 120
                },
                "at": {
                  "type": "string",
                  "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}Z$"
                },
                "sig": {
                  "type": "string",
                  "pattern": "^[ML0-9 ]{3,12000}$"
                },
                "stamp": {
                  "type": "string",
                  "pattern": "^[0-9a-f]{8}$"
                }
              },
              "required": [
                "name",
                "at",
                "stamp"
              ]
            }
          },
          "required": [
            "set",
            "items"
          ]
        },
        "sheets": {
          "maxItems": 100,
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "minLength": 1,
                "maxLength": 80
              },
              "name": {
                "type": "string",
                "minLength": 1,
                "maxLength": 80
              },
              "paper": {
                "type": "string",
                "enum": [
                  "a4",
                  "a3",
                  "a2",
                  "a1",
                  "a0",
                  "letter",
                  "tabloid",
                  "arch-c",
                  "arch-d",
                  "arch-e"
                ]
              },
              "landscape": {
                "type": "boolean"
              },
              "block": {
                "type": "boolean"
              },
              "number": {
                "type": "string",
                "maxLength": 12
              },
              "tb": {
                "type": "object",
                "properties": {
                  "hide": {
                    "maxItems": 8,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "project",
                        "client",
                        "title",
                        "scale",
                        "paper",
                        "date",
                        "norm",
                        "sheet"
                      ]
                    }
                  },
                  "own": {
                    "maxItems": 6,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "k": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 30
                        },
                        "v": {
                          "type": "string",
                          "maxLength": 80
                        }
                      },
                      "required": [
                        "k",
                        "v"
                      ]
                    }
                  },
                  "logo": {
                    "type": "object",
                    "properties": {
                      "src": {
                        "type": "string",
                        "maxLength": 200000,
                        "pattern": "^data:image\\/(png|jpeg);base64,[A-Za-z0-9+/=]+$"
                      },
                      "w": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 4000
                      },
                      "h": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 4000
                      }
                    },
                    "required": [
                      "src",
                      "w",
                      "h"
                    ]
                  }
                }
              },
              "views": {
                "maxItems": 24,
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 80
                    },
                    "kind": {
                      "type": "string",
                      "enum": [
                        "plan",
                        "furnish",
                        "services",
                        "reno",
                        "elevation",
                        "section",
                        "walls",
                        "iso",
                        "site",
                        "oneline",
                        "ufh",
                        "light"
                      ]
                    },
                    "floor": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 80
                    },
                    "room": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 2000
                    },
                    "side": {
                      "type": "string",
                      "enum": [
                        "north",
                        "east",
                        "south",
                        "west",
                        "front",
                        "back",
                        "left",
                        "right"
                      ]
                    },
                    "situation": {
                      "type": "string",
                      "enum": [
                        "existing",
                        "works",
                        "after"
                      ]
                    },
                    "corner": {
                      "type": "string",
                      "enum": [
                        "ne",
                        "se",
                        "sw",
                        "nw"
                      ]
                    },
                    "x": {
                      "type": "integer",
                      "minimum": -13000,
                      "maximum": 13000
                    },
                    "y": {
                      "type": "integer",
                      "minimum": -13000,
                      "maximum": 13000
                    },
                    "w": {
                      "type": "integer",
                      "minimum": 50,
                      "maximum": 13000
                    },
                    "h": {
                      "type": "integer",
                      "minimum": 50,
                      "maximum": 13000
                    },
                    "scale": {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 5000
                    },
                    "at": {
                      "type": "object",
                      "properties": {
                        "x": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "y": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        }
                      },
                      "required": [
                        "x",
                        "y"
                      ]
                    },
                    "hide": {
                      "maxItems": 5,
                      "type": "array",
                      "items": {
                        "type": "string",
                        "enum": [
                          "furniture",
                          "symbols",
                          "labels",
                          "notes",
                          "dims"
                        ]
                      }
                    },
                    "title": {
                      "type": "string",
                      "maxLength": 80
                    },
                    "caption": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "id",
                    "kind",
                    "x",
                    "y",
                    "w",
                    "h"
                  ]
                }
              },
              "marks": {
                "maxItems": 300,
                "type": "array",
                "items": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "kind": {
                          "type": "string",
                          "const": "text"
                        },
                        "id": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 80
                        },
                        "x": {
                          "type": "integer",
                          "minimum": -13000,
                          "maximum": 13000
                        },
                        "y": {
                          "type": "integer",
                          "minimum": -13000,
                          "maximum": 13000
                        },
                        "w": {
                          "type": "integer",
                          "minimum": 20,
                          "maximum": 13000
                        },
                        "text": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 2000
                        },
                        "size": {
                          "type": "string",
                          "enum": [
                            "s",
                            "m",
                            "l",
                            "xl"
                          ]
                        },
                        "bold": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "kind",
                        "id",
                        "x",
                        "y",
                        "w",
                        "text",
                        "size"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "kind": {
                          "type": "string",
                          "const": "line"
                        },
                        "id": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 80
                        },
                        "a": {
                          "type": "object",
                          "properties": {
                            "x": {
                              "type": "integer",
                              "minimum": -13000,
                              "maximum": 13000
                            },
                            "y": {
                              "type": "integer",
                              "minimum": -13000,
                              "maximum": 13000
                            }
                          },
                          "required": [
                            "x",
                            "y"
                          ]
                        },
                        "b": {
                          "type": "object",
                          "properties": {
                            "x": {
                              "type": "integer",
                              "minimum": -13000,
                              "maximum": 13000
                            },
                            "y": {
                              "type": "integer",
                              "minimum": -13000,
                              "maximum": 13000
                            }
                          },
                          "required": [
                            "x",
                            "y"
                          ]
                        },
                        "arrow": {
                          "type": "string",
                          "enum": [
                            "end",
                            "both"
                          ]
                        },
                        "dashed": {
                          "type": "boolean"
                        },
                        "weight": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 4
                        }
                      },
                      "required": [
                        "kind",
                        "id",
                        "a",
                        "b",
                        "weight"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "kind": {
                          "type": "string",
                          "const": "area"
                        },
                        "id": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 80
                        },
                        "x": {
                          "type": "integer",
                          "minimum": -13000,
                          "maximum": 13000
                        },
                        "y": {
                          "type": "integer",
                          "minimum": -13000,
                          "maximum": 13000
                        },
                        "w": {
                          "type": "integer",
                          "minimum": 20,
                          "maximum": 13000
                        },
                        "h": {
                          "type": "integer",
                          "minimum": 20,
                          "maximum": 13000
                        },
                        "fill": {
                          "type": "string",
                          "pattern": "^#[0-9a-f]{6}$"
                        },
                        "edge": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "kind",
                        "id",
                        "x",
                        "y",
                        "w",
                        "h",
                        "fill"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "kind": {
                          "type": "string",
                          "const": "dim"
                        },
                        "id": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 80
                        },
                        "vp": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 80
                        },
                        "a": {
                          "type": "object",
                          "properties": {
                            "x": {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            "y": {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            "wall": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 80
                            },
                            "end": {
                              "type": "string",
                              "enum": [
                                "a",
                                "b"
                              ]
                            }
                          },
                          "required": [
                            "x",
                            "y"
                          ]
                        },
                        "b": {
                          "type": "object",
                          "properties": {
                            "x": {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            "y": {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            "wall": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 80
                            },
                            "end": {
                              "type": "string",
                              "enum": [
                                "a",
                                "b"
                              ]
                            }
                          },
                          "required": [
                            "x",
                            "y"
                          ]
                        },
                        "off": {
                          "type": "integer",
                          "minimum": -13000,
                          "maximum": 13000
                        }
                      },
                      "required": [
                        "kind",
                        "id",
                        "vp",
                        "a",
                        "b",
                        "off"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "kind": {
                          "type": "string",
                          "const": "symbol"
                        },
                        "id": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 80
                        },
                        "sym": {
                          "type": "string",
                          "enum": [
                            "north",
                            "scalebar",
                            "legend",
                            "stamp"
                          ]
                        },
                        "x": {
                          "type": "integer",
                          "minimum": -13000,
                          "maximum": 13000
                        },
                        "y": {
                          "type": "integer",
                          "minimum": -13000,
                          "maximum": 13000
                        },
                        "w": {
                          "type": "integer",
                          "minimum": 20,
                          "maximum": 13000
                        },
                        "vp": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 80
                        },
                        "text": {
                          "type": "string",
                          "maxLength": 200
                        }
                      },
                      "required": [
                        "kind",
                        "id",
                        "sym",
                        "x",
                        "y",
                        "w"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "kind": {
                          "type": "string",
                          "const": "table"
                        },
                        "id": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 80
                        },
                        "src": {
                          "type": "string",
                          "enum": [
                            "rooms",
                            "services",
                            "sheets",
                            "circuits",
                            "ufh",
                            "heights",
                            "switching",
                            "csv"
                          ]
                        },
                        "floor": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 80
                        },
                        "x": {
                          "type": "integer",
                          "minimum": -13000,
                          "maximum": 13000
                        },
                        "y": {
                          "type": "integer",
                          "minimum": -13000,
                          "maximum": 13000
                        },
                        "w": {
                          "type": "integer",
                          "minimum": 20,
                          "maximum": 13000
                        },
                        "rows": {
                          "minItems": 1,
                          "maxItems": 100,
                          "type": "array",
                          "items": {
                            "maxItems": 12,
                            "type": "array",
                            "items": {
                              "type": "string",
                              "maxLength": 120
                            }
                          }
                        },
                        "name": {
                          "type": "string",
                          "maxLength": 120
                        }
                      },
                      "required": [
                        "kind",
                        "id",
                        "src",
                        "x",
                        "y",
                        "w"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "kind": {
                          "type": "string",
                          "const": "image"
                        },
                        "id": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 80
                        },
                        "x": {
                          "type": "integer",
                          "minimum": -13000,
                          "maximum": 13000
                        },
                        "y": {
                          "type": "integer",
                          "minimum": -13000,
                          "maximum": 13000
                        },
                        "w": {
                          "type": "integer",
                          "minimum": 20,
                          "maximum": 13000
                        },
                        "h": {
                          "type": "integer",
                          "minimum": 20,
                          "maximum": 13000
                        },
                        "src": {
                          "type": "string",
                          "maxLength": 420000,
                          "pattern": "^data:image\\/(png|jpeg);base64,[A-Za-z0-9+/=]+$"
                        },
                        "name": {
                          "type": "string",
                          "maxLength": 120
                        }
                      },
                      "required": [
                        "kind",
                        "id",
                        "x",
                        "y",
                        "w",
                        "h",
                        "src"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "kind": {
                          "type": "string",
                          "const": "angle"
                        },
                        "id": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 80
                        },
                        "vp": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 80
                        },
                        "a": {
                          "type": "object",
                          "properties": {
                            "x": {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            "y": {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            "wall": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 80
                            },
                            "end": {
                              "type": "string",
                              "enum": [
                                "a",
                                "b"
                              ]
                            }
                          },
                          "required": [
                            "x",
                            "y"
                          ]
                        },
                        "o": {
                          "type": "object",
                          "properties": {
                            "x": {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            "y": {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            "wall": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 80
                            },
                            "end": {
                              "type": "string",
                              "enum": [
                                "a",
                                "b"
                              ]
                            }
                          },
                          "required": [
                            "x",
                            "y"
                          ]
                        },
                        "b": {
                          "type": "object",
                          "properties": {
                            "x": {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            "y": {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            "wall": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 80
                            },
                            "end": {
                              "type": "string",
                              "enum": [
                                "a",
                                "b"
                              ]
                            }
                          },
                          "required": [
                            "x",
                            "y"
                          ]
                        },
                        "r": {
                          "type": "integer",
                          "minimum": 40,
                          "maximum": 2000
                        }
                      },
                      "required": [
                        "kind",
                        "id",
                        "vp",
                        "a",
                        "o",
                        "b",
                        "r"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "kind": {
                          "type": "string",
                          "const": "label"
                        },
                        "id": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 80
                        },
                        "vp": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 80
                        },
                        "at": {
                          "type": "object",
                          "properties": {
                            "x": {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            "y": {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            }
                          },
                          "required": [
                            "x",
                            "y"
                          ]
                        },
                        "x": {
                          "type": "integer",
                          "minimum": -13000,
                          "maximum": 13000
                        },
                        "y": {
                          "type": "integer",
                          "minimum": -13000,
                          "maximum": 13000
                        },
                        "w": {
                          "type": "integer",
                          "minimum": 20,
                          "maximum": 13000
                        },
                        "text": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 300
                        }
                      },
                      "required": [
                        "kind",
                        "id",
                        "vp",
                        "at",
                        "x",
                        "y",
                        "w",
                        "text"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "kind": {
                          "type": "string",
                          "const": "shape"
                        },
                        "id": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 80
                        },
                        "pts": {
                          "minItems": 2,
                          "maxItems": 200,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "x": {
                                "type": "integer",
                                "minimum": -13000,
                                "maximum": 13000
                              },
                              "y": {
                                "type": "integer",
                                "minimum": -13000,
                                "maximum": 13000
                              }
                            },
                            "required": [
                              "x",
                              "y"
                            ]
                          }
                        },
                        "closed": {
                          "type": "boolean"
                        },
                        "weight": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 4
                        },
                        "dashed": {
                          "type": "boolean"
                        },
                        "fill": {
                          "type": "string",
                          "pattern": "^#[0-9a-f]{6}$"
                        }
                      },
                      "required": [
                        "kind",
                        "id",
                        "pts",
                        "weight"
                      ]
                    }
                  ]
                }
              },
              "tpl": {
                "type": "string",
                "maxLength": 80
              }
            },
            "required": [
              "id",
              "name",
              "paper",
              "landscape",
              "views",
              "marks"
            ]
          }
        },
        "docs": {
          "maxItems": 200,
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "pattern": "^d[0-9a-f]{16}$"
              },
              "name": {
                "type": "string",
                "minLength": 1,
                "maxLength": 120
              },
              "type": {
                "type": "string",
                "enum": [
                  "pdf",
                  "png",
                  "jpeg",
                  "webp"
                ]
              },
              "size": {
                "type": "integer",
                "minimum": 1,
                "maximum": 20971520
              },
              "t": {
                "type": "string",
                "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}Z$"
              },
              "floor": {
                "type": "string",
                "minLength": 1,
                "maxLength": 80
              },
              "room": {
                "type": "string",
                "minLength": 1,
                "maxLength": 2000
              }
            },
            "required": [
              "id",
              "name",
              "type",
              "size"
            ]
          }
        },
        "free": {
          "type": "object",
          "properties": {
            "spaces": {
              "maxItems": 41,
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "on": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80
                  },
                  "mesh": {
                    "type": "object",
                    "properties": {
                      "v": {
                        "maxItems": 20000,
                        "type": "array",
                        "items": {
                          "type": "array",
                          "prefixItems": [
                            {
                              "type": "integer",
                              "minimum": -10000000,
                              "maximum": 10000000
                            },
                            {
                              "type": "integer",
                              "minimum": -10000000,
                              "maximum": 10000000
                            },
                            {
                              "type": "integer",
                              "minimum": -10000000,
                              "maximum": 10000000
                            }
                          ],
                          "items": false,
                          "minItems": 3,
                          "maxItems": 3
                        }
                      },
                      "e": {
                        "maxItems": 40000,
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "a": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 199999
                            },
                            "b": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 199999
                            },
                            "s": {
                              "type": "boolean",
                              "const": true
                            },
                            "h": {
                              "type": "boolean",
                              "const": true
                            },
                            "c": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 99999
                            }
                          },
                          "required": [
                            "a",
                            "b"
                          ]
                        }
                      },
                      "f": {
                        "maxItems": 20000,
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "o": {
                              "minItems": 3,
                              "maxItems": 4000,
                              "type": "array",
                              "items": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 199999
                              }
                            },
                            "h": {
                              "maxItems": 200,
                              "type": "array",
                              "items": {
                                "minItems": 3,
                                "maxItems": 4000,
                                "type": "array",
                                "items": {
                                  "type": "integer",
                                  "minimum": 0,
                                  "maximum": 199999
                                }
                              }
                            },
                            "m": {
                              "type": "string",
                              "pattern": "^(#[0-9a-f]{6}|[a-z][a-z0-9-]{1,39})$"
                            },
                            "k": {
                              "type": "string",
                              "pattern": "^(#[0-9a-f]{6}|[a-z][a-z0-9-]{1,39})$"
                            }
                          },
                          "required": [
                            "o"
                          ]
                        }
                      }
                    },
                    "required": [
                      "v",
                      "e",
                      "f"
                    ]
                  },
                  "kids": {
                    "maxItems": 2000,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 80
                        },
                        "def": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 80
                        },
                        "xf": {
                          "type": "object",
                          "properties": {
                            "t": {
                              "type": "array",
                              "prefixItems": [
                                {
                                  "type": "integer",
                                  "minimum": -10000000,
                                  "maximum": 10000000
                                },
                                {
                                  "type": "integer",
                                  "minimum": -10000000,
                                  "maximum": 10000000
                                },
                                {
                                  "type": "integer",
                                  "minimum": -10000000,
                                  "maximum": 10000000
                                }
                              ],
                              "items": false,
                              "minItems": 3,
                              "maxItems": 3
                            },
                            "r": {
                              "type": "array",
                              "prefixItems": [
                                {
                                  "type": "integer",
                                  "minimum": -9007199254740991,
                                  "maximum": 9007199254740991
                                },
                                {
                                  "type": "integer",
                                  "minimum": -9007199254740991,
                                  "maximum": 9007199254740991
                                },
                                {
                                  "type": "integer",
                                  "minimum": -9007199254740991,
                                  "maximum": 9007199254740991
                                }
                              ],
                              "items": false,
                              "minItems": 3,
                              "maxItems": 3
                            },
                            "s": {
                              "type": "array",
                              "prefixItems": [
                                {
                                  "type": "integer",
                                  "minimum": -9007199254740991,
                                  "maximum": 9007199254740991
                                },
                                {
                                  "type": "integer",
                                  "minimum": -9007199254740991,
                                  "maximum": 9007199254740991
                                },
                                {
                                  "type": "integer",
                                  "minimum": -9007199254740991,
                                  "maximum": 9007199254740991
                                }
                              ],
                              "items": false,
                              "minItems": 3,
                              "maxItems": 3
                            }
                          },
                          "required": [
                            "t"
                          ]
                        },
                        "name": {
                          "type": "string",
                          "maxLength": 80
                        },
                        "tag": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 80
                        },
                        "hid": {
                          "type": "boolean",
                          "const": true
                        },
                        "lock": {
                          "type": "boolean",
                          "const": true
                        },
                        "m": {
                          "type": "string",
                          "pattern": "^(#[0-9a-f]{6}|[a-z][a-z0-9-]{1,39})$"
                        }
                      },
                      "required": [
                        "id",
                        "def",
                        "xf"
                      ]
                    }
                  }
                },
                "required": [
                  "on",
                  "mesh",
                  "kids"
                ]
              }
            },
            "defs": {
              "maxItems": 500,
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80
                  },
                  "name": {
                    "type": "string",
                    "maxLength": 80
                  },
                  "kind": {
                    "type": "string",
                    "enum": [
                      "group",
                      "component"
                    ]
                  },
                  "mesh": {
                    "type": "object",
                    "properties": {
                      "v": {
                        "maxItems": 20000,
                        "type": "array",
                        "items": {
                          "type": "array",
                          "prefixItems": [
                            {
                              "type": "integer",
                              "minimum": -10000000,
                              "maximum": 10000000
                            },
                            {
                              "type": "integer",
                              "minimum": -10000000,
                              "maximum": 10000000
                            },
                            {
                              "type": "integer",
                              "minimum": -10000000,
                              "maximum": 10000000
                            }
                          ],
                          "items": false,
                          "minItems": 3,
                          "maxItems": 3
                        }
                      },
                      "e": {
                        "maxItems": 40000,
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "a": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 199999
                            },
                            "b": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 199999
                            },
                            "s": {
                              "type": "boolean",
                              "const": true
                            },
                            "h": {
                              "type": "boolean",
                              "const": true
                            },
                            "c": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 99999
                            }
                          },
                          "required": [
                            "a",
                            "b"
                          ]
                        }
                      },
                      "f": {
                        "maxItems": 20000,
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "o": {
                              "minItems": 3,
                              "maxItems": 4000,
                              "type": "array",
                              "items": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 199999
                              }
                            },
                            "h": {
                              "maxItems": 200,
                              "type": "array",
                              "items": {
                                "minItems": 3,
                                "maxItems": 4000,
                                "type": "array",
                                "items": {
                                  "type": "integer",
                                  "minimum": 0,
                                  "maximum": 199999
                                }
                              }
                            },
                            "m": {
                              "type": "string",
                              "pattern": "^(#[0-9a-f]{6}|[a-z][a-z0-9-]{1,39})$"
                            },
                            "k": {
                              "type": "string",
                              "pattern": "^(#[0-9a-f]{6}|[a-z][a-z0-9-]{1,39})$"
                            }
                          },
                          "required": [
                            "o"
                          ]
                        }
                      }
                    },
                    "required": [
                      "v",
                      "e",
                      "f"
                    ]
                  },
                  "kids": {
                    "maxItems": 2000,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 80
                        },
                        "def": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 80
                        },
                        "xf": {
                          "type": "object",
                          "properties": {
                            "t": {
                              "type": "array",
                              "prefixItems": [
                                {
                                  "type": "integer",
                                  "minimum": -10000000,
                                  "maximum": 10000000
                                },
                                {
                                  "type": "integer",
                                  "minimum": -10000000,
                                  "maximum": 10000000
                                },
                                {
                                  "type": "integer",
                                  "minimum": -10000000,
                                  "maximum": 10000000
                                }
                              ],
                              "items": false,
                              "minItems": 3,
                              "maxItems": 3
                            },
                            "r": {
                              "type": "array",
                              "prefixItems": [
                                {
                                  "type": "integer",
                                  "minimum": -9007199254740991,
                                  "maximum": 9007199254740991
                                },
                                {
                                  "type": "integer",
                                  "minimum": -9007199254740991,
                                  "maximum": 9007199254740991
                                },
                                {
                                  "type": "integer",
                                  "minimum": -9007199254740991,
                                  "maximum": 9007199254740991
                                }
                              ],
                              "items": false,
                              "minItems": 3,
                              "maxItems": 3
                            },
                            "s": {
                              "type": "array",
                              "prefixItems": [
                                {
                                  "type": "integer",
                                  "minimum": -9007199254740991,
                                  "maximum": 9007199254740991
                                },
                                {
                                  "type": "integer",
                                  "minimum": -9007199254740991,
                                  "maximum": 9007199254740991
                                },
                                {
                                  "type": "integer",
                                  "minimum": -9007199254740991,
                                  "maximum": 9007199254740991
                                }
                              ],
                              "items": false,
                              "minItems": 3,
                              "maxItems": 3
                            }
                          },
                          "required": [
                            "t"
                          ]
                        },
                        "name": {
                          "type": "string",
                          "maxLength": 80
                        },
                        "tag": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 80
                        },
                        "hid": {
                          "type": "boolean",
                          "const": true
                        },
                        "lock": {
                          "type": "boolean",
                          "const": true
                        },
                        "m": {
                          "type": "string",
                          "pattern": "^(#[0-9a-f]{6}|[a-z][a-z0-9-]{1,39})$"
                        }
                      },
                      "required": [
                        "id",
                        "def",
                        "xf"
                      ]
                    }
                  },
                  "par": {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "enum": [
                          "shelves",
                          "table",
                          "box",
                          "stair"
                        ]
                      },
                      "w": {
                        "type": "integer",
                        "minimum": 10,
                        "maximum": 1000000
                      },
                      "d": {
                        "type": "integer",
                        "minimum": 10,
                        "maximum": 1000000
                      },
                      "h": {
                        "type": "integer",
                        "minimum": 10,
                        "maximum": 1000000
                      },
                      "n": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 200
                      },
                      "t": {
                        "type": "integer",
                        "minimum": 10,
                        "maximum": 10000
                      }
                    },
                    "required": [
                      "kind",
                      "w",
                      "d",
                      "h",
                      "n",
                      "t"
                    ]
                  },
                  "from": {
                    "type": "string",
                    "maxLength": 120
                  },
                  "use": {
                    "type": "string",
                    "enum": [
                      "terrain"
                    ]
                  }
                },
                "required": [
                  "id",
                  "name",
                  "kind",
                  "mesh"
                ]
              }
            },
            "tags": {
              "maxItems": 100,
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 60
                  },
                  "hid": {
                    "type": "boolean",
                    "const": true
                  },
                  "color": {
                    "type": "string",
                    "pattern": "^#[0-9a-f]{6}$"
                  }
                },
                "required": [
                  "id",
                  "name"
                ]
              }
            },
            "sections": {
              "maxItems": 50,
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80
                  },
                  "name": {
                    "type": "string",
                    "maxLength": 60
                  },
                  "on": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80
                  },
                  "at": {
                    "type": "array",
                    "prefixItems": [
                      {
                        "type": "integer",
                        "minimum": -10000000,
                        "maximum": 10000000
                      },
                      {
                        "type": "integer",
                        "minimum": -10000000,
                        "maximum": 10000000
                      },
                      {
                        "type": "integer",
                        "minimum": -10000000,
                        "maximum": 10000000
                      }
                    ],
                    "items": false,
                    "minItems": 3,
                    "maxItems": 3
                  },
                  "n": {
                    "type": "array",
                    "prefixItems": [
                      {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      }
                    ],
                    "items": false,
                    "minItems": 3,
                    "maxItems": 3
                  },
                  "active": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "id",
                  "name",
                  "on",
                  "at",
                  "n"
                ]
              }
            },
            "views": {
              "maxItems": 30,
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 60
                  },
                  "eye": {
                    "type": "array",
                    "prefixItems": [
                      {
                        "type": "integer",
                        "minimum": -10000000,
                        "maximum": 10000000
                      },
                      {
                        "type": "integer",
                        "minimum": -10000000,
                        "maximum": 10000000
                      },
                      {
                        "type": "integer",
                        "minimum": -10000000,
                        "maximum": 10000000
                      }
                    ],
                    "items": false,
                    "minItems": 3,
                    "maxItems": 3
                  },
                  "at": {
                    "type": "array",
                    "prefixItems": [
                      {
                        "type": "integer",
                        "minimum": -10000000,
                        "maximum": 10000000
                      },
                      {
                        "type": "integer",
                        "minimum": -10000000,
                        "maximum": 10000000
                      },
                      {
                        "type": "integer",
                        "minimum": -10000000,
                        "maximum": 10000000
                      }
                    ],
                    "items": false,
                    "minItems": 3,
                    "maxItems": 3
                  },
                  "ortho": {
                    "type": "boolean"
                  },
                  "style": {
                    "type": "object",
                    "properties": {
                      "edges": {
                        "type": "boolean"
                      },
                      "profiles": {
                        "type": "boolean"
                      },
                      "sketch": {
                        "type": "boolean"
                      },
                      "xray": {
                        "type": "boolean"
                      },
                      "mono": {
                        "type": "boolean"
                      },
                      "hidden": {
                        "type": "boolean"
                      },
                      "shadows": {
                        "type": "boolean"
                      },
                      "month": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 12
                      },
                      "hour": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 23
                      }
                    },
                    "required": [
                      "edges",
                      "profiles",
                      "sketch",
                      "xray",
                      "mono"
                    ]
                  },
                  "hide": {
                    "maxItems": 200,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 80
                    }
                  },
                  "section": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80
                  }
                },
                "required": [
                  "id",
                  "name",
                  "eye",
                  "at"
                ]
              }
            },
            "style": {
              "type": "object",
              "properties": {
                "edges": {
                  "type": "boolean"
                },
                "profiles": {
                  "type": "boolean"
                },
                "sketch": {
                  "type": "boolean"
                },
                "xray": {
                  "type": "boolean"
                },
                "mono": {
                  "type": "boolean"
                },
                "hidden": {
                  "type": "boolean"
                },
                "shadows": {
                  "type": "boolean"
                },
                "month": {
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 12
                },
                "hour": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 23
                }
              },
              "required": [
                "edges",
                "profiles",
                "sketch",
                "xray",
                "mono"
              ]
            },
            "build": {
              "type": "string",
              "enum": [
                "house",
                "loose"
              ]
            }
          },
          "required": [
            "spaces",
            "defs"
          ]
        },
        "energy": {
          "type": "object",
          "properties": {
            "year": {
              "type": "integer",
              "minimum": 1500,
              "maximum": 2100
            },
            "type": {
              "type": "string",
              "enum": [
                "detached",
                "semi",
                "corner",
                "terraced",
                "apartment"
              ]
            },
            "level": {
              "type": "string",
              "enum": [
                "ground",
                "middle",
                "top"
              ]
            },
            "pand": {
              "type": "string",
              "pattern": "^\\d{16}$"
            }
          }
        }
      },
      "required": [
        "schemaVersion",
        "id",
        "name",
        "units",
        "normProfile",
        "floors"
      ],
      "description": "The plan: floors, outdoor spaces and outbuildings, the units the user works in and the measuring standard. schemaVersion is 1."
    },
    "Floor": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 80
        },
        "name": {
          "type": "string",
          "maxLength": 80
        },
        "level": {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991
        },
        "elevation": {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991
        },
        "defaultHeight": {
          "type": "integer",
          "minimum": 1,
          "maximum": 9007199254740991
        },
        "anyPartBelowGrade": {
          "default": false,
          "type": "boolean"
        },
        "walls": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Wall"
          }
        },
        "rooms": {
          "type": "object",
          "propertyNames": {
            "type": "string",
            "minLength": 1,
            "maxLength": 2000
          },
          "additionalProperties": {
            "$ref": "#/$defs/Room"
          }
        },
        "holes": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Hole"
          }
        },
        "openings": {
          "default": [],
          "type": "array",
          "items": {
            "$ref": "#/$defs/Opening"
          }
        },
        "notes": {
          "default": [],
          "maxItems": 500,
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "minLength": 1,
                "maxLength": 80
              },
              "at": {
                "$ref": "#/$defs/Point"
              },
              "text": {
                "type": "string",
                "minLength": 1,
                "maxLength": 200
              },
              "lead": {
                "$ref": "#/$defs/Point"
              },
              "auto": {
                "type": "boolean"
              },
              "style": {
                "type": "string",
                "enum": [
                  "title",
                  "label",
                  "note"
                ]
              },
              "color": {
                "type": "string",
                "pattern": "^#[0-9a-f]{6}$"
              },
              "rot": {
                "type": "integer",
                "minimum": -180,
                "maximum": 180
              },
              "bind": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "enum": [
                      "wall",
                      "opening",
                      "room",
                      "patch"
                    ]
                  },
                  "id": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 2000
                  }
                },
                "required": [
                  "kind",
                  "id"
                ]
              }
            },
            "required": [
              "id",
              "at",
              "text"
            ]
          }
        },
        "lines": {
          "default": [],
          "maxItems": 2000,
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "minLength": 1,
                "maxLength": 80
              },
              "a": {
                "$ref": "#/$defs/Point"
              },
              "b": {
                "$ref": "#/$defs/Point"
              },
              "dashed": {
                "type": "boolean"
              },
              "weight": {
                "type": "integer",
                "minimum": 1,
                "maximum": 4
              },
              "measure": {
                "type": "boolean"
              },
              "via": {
                "maxItems": 400,
                "type": "array",
                "items": {
                  "$ref": "#/$defs/Point"
                }
              },
              "off": {
                "type": "integer",
                "minimum": -200000,
                "maximum": 200000
              },
              "color": {
                "type": "string",
                "pattern": "^#[0-9a-f]{6}$"
              },
              "pattern": {
                "type": "string",
                "const": "dashdot"
              }
            },
            "required": [
              "id",
              "a",
              "b",
              "dashed",
              "weight"
            ]
          }
        },
        "items": {
          "maxItems": 2000,
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "minLength": 1,
                "maxLength": 80
              },
              "element": {
                "type": "string",
                "pattern": "^look\\.[a-z]+\\.[a-z0-9-.]+$"
              },
              "type": {
                "type": "string",
                "minLength": 3,
                "maxLength": 120
              },
              "at": {
                "$ref": "#/$defs/Point"
              },
              "rot": {
                "anyOf": [
                  {
                    "type": "number",
                    "const": 0
                  },
                  {
                    "type": "number",
                    "const": 90
                  },
                  {
                    "type": "number",
                    "const": 180
                  },
                  {
                    "type": "number",
                    "const": 270
                  }
                ]
              },
              "mirror": {
                "type": "boolean"
              },
              "w": {
                "type": "integer",
                "minimum": 1,
                "maximum": 9007199254740991
              },
              "d": {
                "type": "integer",
                "minimum": 1,
                "maximum": 9007199254740991
              },
              "group": {
                "type": "string",
                "minLength": 1,
                "maxLength": 80
              },
              "own": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80
                  },
                  "color": {
                    "type": "string",
                    "pattern": "^#[0-9a-f]{6}$"
                  },
                  "h": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 100000
                  },
                  "model": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^m[0-9a-f]{16}$"
                      },
                      "fmt": {
                        "type": "string",
                        "enum": [
                          "glb",
                          "obj"
                        ]
                      },
                      "w": {
                        "type": "integer",
                        "minimum": 10,
                        "maximum": 1000000
                      },
                      "d": {
                        "type": "integer",
                        "minimum": 10,
                        "maximum": 1000000
                      },
                      "h": {
                        "type": "integer",
                        "minimum": 10,
                        "maximum": 1000000
                      },
                      "tris": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 200000
                      }
                    },
                    "required": [
                      "id",
                      "fmt",
                      "w",
                      "d",
                      "h",
                      "tris"
                    ]
                  }
                },
                "required": [
                  "name",
                  "color"
                ]
              },
              "light": {
                "type": "object",
                "properties": {
                  "on": {
                    "type": "boolean"
                  },
                  "dim": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 100
                  },
                  "k": {
                    "type": "integer",
                    "minimum": 1800,
                    "maximum": 6500
                  }
                },
                "required": [
                  "on",
                  "dim",
                  "k"
                ]
              },
              "h": {
                "type": "integer",
                "minimum": 10,
                "maximum": 40000
              },
              "run": {
                "type": "object",
                "properties": {
                  "upper": {
                    "type": "boolean"
                  },
                  "module": {
                    "type": "integer",
                    "minimum": 1500,
                    "maximum": 12000
                  },
                  "top": {
                    "type": "string",
                    "pattern": "^#[0-9a-f]{6}$"
                  },
                  "front": {
                    "type": "string",
                    "pattern": "^#[0-9a-f]{6}$"
                  },
                  "splash": {
                    "type": "object",
                    "properties": {
                      "h": {
                        "type": "integer",
                        "minimum": 100,
                        "maximum": 15000
                      },
                      "tile": {
                        "type": "object",
                        "properties": {
                          "w": {
                            "type": "integer",
                            "minimum": 100,
                            "maximum": 12000
                          },
                          "h": {
                            "type": "integer",
                            "minimum": 100,
                            "maximum": 12000
                          }
                        },
                        "required": [
                          "w",
                          "h"
                        ]
                      },
                      "color": {
                        "type": "string",
                        "pattern": "^#[0-9a-f]{6}$"
                      }
                    },
                    "required": [
                      "h"
                    ]
                  },
                  "trim": {
                    "type": "boolean"
                  }
                }
              },
              "parts": {
                "type": "object",
                "properties": {
                  "frame": {
                    "type": "object",
                    "properties": {
                      "mat": {
                        "type": "string",
                        "enum": [
                          "oak",
                          "walnut",
                          "white",
                          "black",
                          "steel",
                          "brass",
                          "fabric",
                          "linen",
                          "velvet",
                          "leather",
                          "wool",
                          "rattan"
                        ]
                      },
                      "color": {
                        "type": "string",
                        "pattern": "^#[0-9a-f]{6}$"
                      }
                    }
                  },
                  "cover": {
                    "type": "object",
                    "properties": {
                      "mat": {
                        "type": "string",
                        "enum": [
                          "oak",
                          "walnut",
                          "white",
                          "black",
                          "steel",
                          "brass",
                          "fabric",
                          "linen",
                          "velvet",
                          "leather",
                          "wool",
                          "rattan"
                        ]
                      },
                      "color": {
                        "type": "string",
                        "pattern": "^#[0-9a-f]{6}$"
                      }
                    }
                  }
                }
              },
              "buy": {
                "type": "object",
                "properties": {
                  "budget": {
                    "type": "object",
                    "properties": {
                      "price": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 1000000000
                      },
                      "url": {
                        "type": "string",
                        "maxLength": 500,
                        "pattern": "^https:\\/\\/[^\\s<>\"']+$"
                      },
                      "sku": {
                        "type": "string",
                        "maxLength": 80
                      },
                      "name": {
                        "type": "string",
                        "maxLength": 80
                      }
                    }
                  },
                  "roomy": {
                    "type": "object",
                    "properties": {
                      "price": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 1000000000
                      },
                      "url": {
                        "type": "string",
                        "maxLength": 500,
                        "pattern": "^https:\\/\\/[^\\s<>\"']+$"
                      },
                      "sku": {
                        "type": "string",
                        "maxLength": 80
                      },
                      "name": {
                        "type": "string",
                        "maxLength": 80
                      }
                    }
                  }
                }
              }
            },
            "required": [
              "id",
              "element",
              "type",
              "at",
              "rot",
              "mirror",
              "w",
              "d"
            ]
          }
        },
        "stairs": {
          "maxItems": 100,
          "type": "array",
          "items": {
            "$ref": "#/$defs/Stair"
          }
        },
        "outdoor": {
          "maxItems": 200,
          "type": "array",
          "items": {
            "$ref": "#/$defs/Outdoor"
          }
        },
        "roof": {
          "type": "object",
          "properties": {
            "shape": {
              "type": "string",
              "enum": [
                "gable",
                "hip",
                "shed",
                "flat",
                "mansard"
              ]
            },
            "pitch": {
              "type": "number",
              "minimum": 0,
              "maximum": 80
            },
            "upper": {
              "type": "number",
              "minimum": 0,
              "maximum": 80
            },
            "overhang": {
              "type": "integer",
              "minimum": 0,
              "maximum": 30000
            },
            "ridge": {
              "type": "string",
              "enum": [
                "x",
                "y"
              ]
            },
            "flip": {
              "type": "boolean"
            },
            "knee": {
              "type": "integer",
              "minimum": 0,
              "maximum": 50000
            },
            "covering": {
              "type": "string",
              "enum": [
                "tiles",
                "shingles",
                "slate",
                "metal",
                "bitumen",
                "green"
              ]
            },
            "buildUp": {
              "type": "string",
              "enum": [
                "battens",
                "rafters",
                "panels",
                "deck"
              ]
            },
            "thickness": {
              "type": "integer",
              "minimum": 1,
              "maximum": 10000
            },
            "showBuildUp": {
              "type": "boolean"
            },
            "pitches": {
              "type": "object",
              "properties": {
                "top": {
                  "type": "number",
                  "minimum": 1,
                  "maximum": 80
                },
                "right": {
                  "type": "number",
                  "minimum": 1,
                  "maximum": 80
                },
                "bottom": {
                  "type": "number",
                  "minimum": 1,
                  "maximum": 80
                },
                "left": {
                  "type": "number",
                  "minimum": 1,
                  "maximum": 80
                }
              }
            },
            "dormers": {
              "maxItems": 20,
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80
                  },
                  "side": {
                    "type": "string",
                    "enum": [
                      "top",
                      "right",
                      "bottom",
                      "left"
                    ]
                  },
                  "at": {
                    "type": "object",
                    "properties": {
                      "x": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      "y": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      }
                    },
                    "required": [
                      "x",
                      "y"
                    ]
                  },
                  "width": {
                    "type": "integer",
                    "minimum": 3000,
                    "maximum": 150000
                  },
                  "height": {
                    "type": "integer",
                    "minimum": 10000,
                    "maximum": 60000
                  },
                  "roof": {
                    "type": "string",
                    "enum": [
                      "flat",
                      "gable"
                    ]
                  },
                  "pitch": {
                    "type": "number",
                    "minimum": 5,
                    "maximum": 60
                  }
                },
                "required": [
                  "id",
                  "side",
                  "at",
                  "width",
                  "height",
                  "roof"
                ]
              }
            }
          },
          "required": [
            "shape",
            "pitch",
            "overhang",
            "ridge",
            "covering",
            "buildUp",
            "thickness",
            "showBuildUp"
          ]
        },
        "structures": {
          "maxItems": 200,
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "minLength": 1,
                "maxLength": 80
              },
              "kind": {
                "type": "string",
                "enum": [
                  "chimney",
                  "lift",
                  "column",
                  "beam",
                  "skylight"
                ]
              },
              "a": {
                "$ref": "#/$defs/Point"
              },
              "b": {
                "$ref": "#/$defs/Point"
              },
              "width": {
                "type": "integer",
                "minimum": 1,
                "maximum": 9007199254740991
              },
              "z": {
                "type": "integer",
                "minimum": 0,
                "maximum": 200000
              },
              "depth": {
                "type": "integer",
                "minimum": 1,
                "maximum": 30000
              }
            },
            "required": [
              "id",
              "kind",
              "a",
              "b",
              "width"
            ]
          }
        },
        "symbols": {
          "maxItems": 300,
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "minLength": 1,
                "maxLength": 80
              },
              "kind": {
                "type": "string",
                "enum": [
                  "exit",
                  "extinguisher",
                  "first_aid",
                  "assembly",
                  "alarm",
                  "route",
                  "socket",
                  "socket_double",
                  "switch",
                  "switch_double",
                  "light_ceiling",
                  "light_wall",
                  "data",
                  "thermostat",
                  "meter_box",
                  "smoke",
                  "tap",
                  "drain",
                  "radiator",
                  "water_heater",
                  "socket_cooker",
                  "switch_2way",
                  "dimmer",
                  "light_spot",
                  "water_meter",
                  "soil_stack",
                  "heat_source",
                  "manifold",
                  "vent_supply",
                  "vent_extract",
                  "mv_unit",
                  "ac_indoor",
                  "ac_outdoor",
                  "light_surface",
                  "light_track",
                  "light_linear",
                  "light_strip",
                  "socket_outdoor",
                  "camera",
                  "doorbell"
                ]
              },
              "at": {
                "$ref": "#/$defs/Point"
              },
              "rot": {
                "anyOf": [
                  {
                    "type": "number",
                    "const": 0
                  },
                  {
                    "type": "number",
                    "const": 90
                  },
                  {
                    "type": "number",
                    "const": 180
                  },
                  {
                    "type": "number",
                    "const": 270
                  }
                ]
              },
              "h": {
                "type": "integer",
                "minimum": 0,
                "maximum": 60000
              },
              "grp": {
                "type": "string",
                "minLength": 1,
                "maxLength": 80
              },
              "ctl": {
                "maxItems": 24,
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 80
                }
              }
            },
            "required": [
              "id",
              "kind",
              "at",
              "rot"
            ]
          }
        },
        "patches": {
          "maxItems": 100,
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "minLength": 1,
                "maxLength": 80
              },
              "name": {
                "type": "string",
                "maxLength": 80
              },
              "poly": {
                "$ref": "#/$defs/Polygon"
              },
              "h": {
                "type": "integer",
                "minimum": -100000,
                "maximum": 100000
              },
              "h2": {
                "type": "integer",
                "minimum": -100000,
                "maximum": 100000
              },
              "side": {
                "type": "string",
                "enum": [
                  "top",
                  "right",
                  "bottom",
                  "left"
                ]
              },
              "arcs": {
                "maxItems": 100,
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "i": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 399
                    },
                    "bulge": {
                      "type": "integer",
                      "minimum": -200000,
                      "maximum": 200000
                    }
                  },
                  "required": [
                    "i",
                    "bulge"
                  ]
                }
              },
              "opacity": {
                "type": "integer",
                "minimum": 10,
                "maximum": 100
              },
              "roof": {
                "type": "boolean"
              },
              "floor": {
                "type": "object",
                "properties": {
                  "mat": {
                    "type": "string",
                    "minLength": 3,
                    "maxLength": 120
                  },
                  "color": {
                    "type": "string",
                    "pattern": "^#[0-9a-f]{6}$"
                  },
                  "tex": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^(t[0-9a-f]{16}|lib-[a-z0-9]+(-[a-z0-9]+)*)$"
                      },
                      "w": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 50000
                      },
                      "h": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 50000
                      },
                      "rot": {
                        "anyOf": [
                          {
                            "type": "number",
                            "const": 0
                          },
                          {
                            "type": "number",
                            "const": 90
                          }
                        ]
                      },
                      "name": {
                        "type": "string",
                        "maxLength": 80
                      }
                    },
                    "required": [
                      "id",
                      "w",
                      "h"
                    ]
                  },
                  "kind": {
                    "type": "string",
                    "enum": [
                      "planks",
                      "tiles",
                      "carpet",
                      "stone",
                      "vinyl",
                      "paving",
                      "decking",
                      "gravel",
                      "lawn",
                      "wallpaper",
                      "wall-tiles",
                      "paint"
                    ]
                  },
                  "unit": {
                    "type": "object",
                    "properties": {
                      "w": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 200000
                      },
                      "h": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 500000
                      }
                    },
                    "required": [
                      "w",
                      "h"
                    ]
                  },
                  "waste": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 50
                  },
                  "coats": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 4
                  },
                  "paper": {
                    "type": "object",
                    "properties": {
                      "roll": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 20000
                      },
                      "len": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 500000
                      },
                      "repeat": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 20000
                      },
                      "tex": {
                        "type": "string",
                        "pattern": "^(t[0-9a-f]{16}|lib-[a-z0-9]+(-[a-z0-9]+)*)$"
                      }
                    },
                    "required": [
                      "roll",
                      "len",
                      "repeat"
                    ]
                  },
                  "art": {
                    "maxItems": 12,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "tex": {
                          "type": "string",
                          "pattern": "^(t[0-9a-f]{16}|lib-[a-z0-9]+(-[a-z0-9]+)*)$"
                        },
                        "w": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 100000
                        },
                        "h": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 100000
                        },
                        "x": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 1000000
                        },
                        "z": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 100000
                        }
                      },
                      "required": [
                        "tex",
                        "w",
                        "h",
                        "x",
                        "z"
                      ]
                    }
                  },
                  "upTo": {
                    "type": "integer",
                    "minimum": 100,
                    "maximum": 100000
                  },
                  "bands": {
                    "maxItems": 4,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "to": {
                          "type": "integer",
                          "minimum": 100,
                          "maximum": 100000
                        },
                        "kind": {
                          "type": "string",
                          "enum": [
                            "tiles",
                            "paint"
                          ]
                        },
                        "tile": {
                          "type": "object",
                          "properties": {
                            "w": {
                              "type": "integer",
                              "minimum": 100,
                              "maximum": 12000
                            },
                            "h": {
                              "type": "integer",
                              "minimum": 100,
                              "maximum": 12000
                            }
                          },
                          "required": [
                            "w",
                            "h"
                          ]
                        },
                        "color": {
                          "type": "string",
                          "pattern": "^#[0-9a-f]{6}$"
                        },
                        "pattern": {
                          "type": "string",
                          "enum": [
                            "grid",
                            "brick",
                            "herringbone",
                            "diagonal"
                          ]
                        }
                      },
                      "required": [
                        "to",
                        "kind"
                      ]
                    }
                  },
                  "lay": {
                    "type": "object",
                    "properties": {
                      "pattern": {
                        "type": "string",
                        "enum": [
                          "grid",
                          "brick",
                          "herringbone",
                          "diagonal"
                        ]
                      },
                      "start": {
                        "type": "string",
                        "enum": [
                          "corner",
                          "center",
                          "point"
                        ]
                      },
                      "at": {
                        "type": "object",
                        "properties": {
                          "x": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          },
                          "y": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          }
                        },
                        "required": [
                          "x",
                          "y"
                        ]
                      },
                      "dir": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 179
                      }
                    },
                    "required": [
                      "pattern",
                      "start",
                      "dir"
                    ]
                  }
                }
              }
            },
            "required": [
              "id",
              "name",
              "poly",
              "h"
            ]
          }
        },
        "variant": {
          "type": "object",
          "properties": {
            "name": {
              "type": "string",
              "minLength": 1,
              "maxLength": 80
            },
            "n": {
              "type": "integer",
              "minimum": 0,
              "maximum": 99
            }
          },
          "required": [
            "name",
            "n"
          ]
        },
        "dividers": {
          "maxItems": 500,
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "minLength": 1,
                "maxLength": 80
              },
              "a": {
                "type": "object",
                "properties": {
                  "x": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  "y": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  }
                },
                "required": [
                  "x",
                  "y"
                ]
              },
              "b": {
                "type": "object",
                "properties": {
                  "x": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  "y": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  }
                },
                "required": [
                  "x",
                  "y"
                ]
              }
            },
            "required": [
              "id",
              "a",
              "b"
            ]
          }
        },
        "autoDims": {
          "type": "boolean",
          "const": false
        },
        "origin": {
          "type": "object",
          "properties": {
            "x": {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            },
            "y": {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            }
          },
          "required": [
            "x",
            "y"
          ]
        },
        "frames": {
          "type": "object",
          "properties": {
            "door": {
              "type": "string",
              "pattern": "^#[0-9a-f]{6}$"
            },
            "window": {
              "type": "string",
              "pattern": "^#[0-9a-f]{6}$"
            }
          }
        },
        "building": {
          "type": "string",
          "minLength": 1,
          "maxLength": 80
        },
        "photoPoints": {
          "maxItems": 100,
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "minLength": 1,
                "maxLength": 80
              },
              "at": {
                "type": "object",
                "properties": {
                  "x": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  "y": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  }
                },
                "required": [
                  "x",
                  "y"
                ]
              },
              "dir": {
                "type": "integer",
                "minimum": 0,
                "maximum": 359
              },
              "title": {
                "type": "string",
                "maxLength": 80
              },
              "note": {
                "type": "string",
                "maxLength": 1000
              },
              "photo": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "pattern": "^t[0-9a-f]{16}$"
                  },
                  "t": {
                    "type": "string",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}Z$"
                  }
                },
                "required": [
                  "id"
                ]
              },
              "pano": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "pattern": "^t[0-9a-f]{16}$"
                  },
                  "t": {
                    "type": "string",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}Z$"
                  }
                },
                "required": [
                  "id"
                ]
              }
            },
            "required": [
              "id",
              "at",
              "dir"
            ]
          }
        },
        "split": {
          "type": "boolean",
          "const": true
        },
        "runs": {
          "maxItems": 3000,
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "minLength": 1,
                "maxLength": 80
              },
              "kind": {
                "type": "string",
                "enum": [
                  "cable",
                  "cold",
                  "hot",
                  "drain",
                  "heat_flow",
                  "heat_return",
                  "duct_supply",
                  "duct_extract",
                  "refrigerant",
                  "condensate"
                ]
              },
              "pts": {
                "minItems": 2,
                "maxItems": 200,
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "x": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "y": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "x",
                    "y"
                  ]
                }
              },
              "size": {
                "type": "string",
                "enum": [
                  "4",
                  "6",
                  "10",
                  "1.5",
                  "2.5",
                  "awg14",
                  "awg12",
                  "awg10",
                  "awg8",
                  "awg6"
                ]
              },
              "dia": {
                "type": "integer",
                "minimum": 50,
                "maximum": 5000
              },
              "grp": {
                "type": "string",
                "minLength": 1,
                "maxLength": 80
              },
              "auto": {
                "type": "boolean",
                "const": true
              },
              "up": {
                "type": "integer",
                "minimum": 0,
                "maximum": 300000
              }
            },
            "required": [
              "id",
              "kind",
              "pts"
            ]
          }
        },
        "pins": {
          "maxItems": 200,
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "minLength": 1,
                "maxLength": 80
              },
              "at": {
                "type": "object",
                "properties": {
                  "x": {
                    "type": "integer",
                    "minimum": -100000000,
                    "maximum": 100000000
                  },
                  "y": {
                    "type": "integer",
                    "minimum": -100000000,
                    "maximum": 100000000
                  }
                },
                "required": [
                  "x",
                  "y"
                ]
              },
              "text": {
                "type": "string",
                "minLength": 1,
                "maxLength": 500
              },
              "by": {
                "type": "string",
                "enum": [
                  "client",
                  "office"
                ]
              },
              "name": {
                "type": "string",
                "maxLength": 80
              },
              "t": {
                "type": "string",
                "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}Z$"
              },
              "done": {
                "type": "boolean"
              },
              "reply": {
                "type": "string",
                "maxLength": 500
              }
            },
            "required": [
              "id",
              "at",
              "text",
              "by",
              "t"
            ]
          }
        },
        "scan": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string",
              "minLength": 1,
              "maxLength": 80
            },
            "at": {
              "type": "string",
              "maxLength": 40
            },
            "rooms": {
              "type": "integer",
              "minimum": 0,
              "maximum": 200
            },
            "checks": {
              "default": [],
              "maxItems": 4,
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "axis": {
                    "type": "string",
                    "enum": [
                      "x",
                      "y"
                    ]
                  },
                  "scanned": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 1000000
                  },
                  "measured": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 1000000
                  },
                  "applied": {
                    "type": "boolean"
                  },
                  "by": {
                    "type": "string",
                    "enum": [
                      "tape",
                      "laser"
                    ]
                  },
                  "kind": {
                    "type": "string",
                    "enum": [
                      "inside",
                      "outside"
                    ]
                  }
                },
                "required": [
                  "axis",
                  "scanned",
                  "measured",
                  "applied",
                  "by"
                ]
              }
            },
            "facade": {
              "type": "string",
              "enum": [
                "measured",
                "assumed"
              ]
            },
            "confirmed": {
              "type": "boolean"
            },
            "raw": {
              "type": "string",
              "maxLength": 80
            },
            "synthetic": {
              "type": "boolean"
            }
          },
          "required": [
            "id",
            "at",
            "rooms",
            "facade"
          ]
        },
        "comments": {
          "maxItems": 300,
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "minLength": 1,
                "maxLength": 80
              },
              "at": {
                "type": "object",
                "properties": {
                  "x": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  "y": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  }
                },
                "required": [
                  "x",
                  "y"
                ]
              },
              "by": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 60
                  },
                  "color": {
                    "type": "string",
                    "pattern": "^#[0-9a-f]{6}$"
                  }
                },
                "required": [
                  "name",
                  "color"
                ]
              },
              "text": {
                "type": "string",
                "minLength": 1,
                "maxLength": 1000
              },
              "t": {
                "type": "string",
                "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}(:\\d{2})?Z$"
              },
              "done": {
                "type": "boolean"
              },
              "replies": {
                "maxItems": 50,
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "by": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 60
                        },
                        "color": {
                          "type": "string",
                          "pattern": "^#[0-9a-f]{6}$"
                        }
                      },
                      "required": [
                        "name",
                        "color"
                      ]
                    },
                    "text": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 1000
                    },
                    "t": {
                      "type": "string",
                      "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}(:\\d{2})?Z$"
                    }
                  },
                  "required": [
                    "by",
                    "text",
                    "t"
                  ]
                }
              }
            },
            "required": [
              "id",
              "at",
              "by",
              "text",
              "t"
            ]
          }
        },
        "variants": {
          "maxItems": 9,
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "minLength": 1,
                "maxLength": 80
              },
              "name": {
                "type": "string",
                "maxLength": 80
              },
              "level": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "elevation": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "defaultHeight": {
                "type": "integer",
                "minimum": 1,
                "maximum": 9007199254740991
              },
              "anyPartBelowGrade": {
                "default": false,
                "type": "boolean"
              },
              "walls": {
                "type": "array",
                "items": {
                  "$ref": "#/$defs/Wall"
                }
              },
              "rooms": {
                "type": "object",
                "propertyNames": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 2000
                },
                "additionalProperties": {
                  "$ref": "#/$defs/Room"
                }
              },
              "holes": {
                "type": "array",
                "items": {
                  "$ref": "#/$defs/Hole"
                }
              },
              "openings": {
                "default": [],
                "type": "array",
                "items": {
                  "$ref": "#/$defs/Opening"
                }
              },
              "notes": {
                "default": [],
                "maxItems": 500,
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 80
                    },
                    "at": {
                      "$ref": "#/$defs/Point"
                    },
                    "text": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 200
                    },
                    "lead": {
                      "$ref": "#/$defs/Point"
                    },
                    "auto": {
                      "type": "boolean"
                    },
                    "style": {
                      "type": "string",
                      "enum": [
                        "title",
                        "label",
                        "note"
                      ]
                    },
                    "color": {
                      "type": "string",
                      "pattern": "^#[0-9a-f]{6}$"
                    },
                    "rot": {
                      "type": "integer",
                      "minimum": -180,
                      "maximum": 180
                    },
                    "bind": {
                      "type": "object",
                      "properties": {
                        "kind": {
                          "type": "string",
                          "enum": [
                            "wall",
                            "opening",
                            "room",
                            "patch"
                          ]
                        },
                        "id": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 2000
                        }
                      },
                      "required": [
                        "kind",
                        "id"
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "at",
                    "text"
                  ]
                }
              },
              "lines": {
                "default": [],
                "maxItems": 2000,
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 80
                    },
                    "a": {
                      "$ref": "#/$defs/Point"
                    },
                    "b": {
                      "$ref": "#/$defs/Point"
                    },
                    "dashed": {
                      "type": "boolean"
                    },
                    "weight": {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 4
                    },
                    "measure": {
                      "type": "boolean"
                    },
                    "via": {
                      "maxItems": 400,
                      "type": "array",
                      "items": {
                        "$ref": "#/$defs/Point"
                      }
                    },
                    "off": {
                      "type": "integer",
                      "minimum": -200000,
                      "maximum": 200000
                    },
                    "color": {
                      "type": "string",
                      "pattern": "^#[0-9a-f]{6}$"
                    },
                    "pattern": {
                      "type": "string",
                      "const": "dashdot"
                    }
                  },
                  "required": [
                    "id",
                    "a",
                    "b",
                    "dashed",
                    "weight"
                  ]
                }
              },
              "items": {
                "maxItems": 2000,
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 80
                    },
                    "element": {
                      "type": "string",
                      "pattern": "^look\\.[a-z]+\\.[a-z0-9-.]+$"
                    },
                    "type": {
                      "type": "string",
                      "minLength": 3,
                      "maxLength": 120
                    },
                    "at": {
                      "$ref": "#/$defs/Point"
                    },
                    "rot": {
                      "anyOf": [
                        {
                          "type": "number",
                          "const": 0
                        },
                        {
                          "type": "number",
                          "const": 90
                        },
                        {
                          "type": "number",
                          "const": 180
                        },
                        {
                          "type": "number",
                          "const": 270
                        }
                      ]
                    },
                    "mirror": {
                      "type": "boolean"
                    },
                    "w": {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 9007199254740991
                    },
                    "d": {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 9007199254740991
                    },
                    "group": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 80
                    },
                    "own": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 80
                        },
                        "color": {
                          "type": "string",
                          "pattern": "^#[0-9a-f]{6}$"
                        },
                        "h": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 100000
                        },
                        "model": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string",
                              "pattern": "^m[0-9a-f]{16}$"
                            },
                            "fmt": {
                              "type": "string",
                              "enum": [
                                "glb",
                                "obj"
                              ]
                            },
                            "w": {
                              "type": "integer",
                              "minimum": 10,
                              "maximum": 1000000
                            },
                            "d": {
                              "type": "integer",
                              "minimum": 10,
                              "maximum": 1000000
                            },
                            "h": {
                              "type": "integer",
                              "minimum": 10,
                              "maximum": 1000000
                            },
                            "tris": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 200000
                            }
                          },
                          "required": [
                            "id",
                            "fmt",
                            "w",
                            "d",
                            "h",
                            "tris"
                          ]
                        }
                      },
                      "required": [
                        "name",
                        "color"
                      ]
                    },
                    "light": {
                      "type": "object",
                      "properties": {
                        "on": {
                          "type": "boolean"
                        },
                        "dim": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 100
                        },
                        "k": {
                          "type": "integer",
                          "minimum": 1800,
                          "maximum": 6500
                        }
                      },
                      "required": [
                        "on",
                        "dim",
                        "k"
                      ]
                    },
                    "h": {
                      "type": "integer",
                      "minimum": 10,
                      "maximum": 40000
                    },
                    "run": {
                      "type": "object",
                      "properties": {
                        "upper": {
                          "type": "boolean"
                        },
                        "module": {
                          "type": "integer",
                          "minimum": 1500,
                          "maximum": 12000
                        },
                        "top": {
                          "type": "string",
                          "pattern": "^#[0-9a-f]{6}$"
                        },
                        "front": {
                          "type": "string",
                          "pattern": "^#[0-9a-f]{6}$"
                        },
                        "splash": {
                          "type": "object",
                          "properties": {
                            "h": {
                              "type": "integer",
                              "minimum": 100,
                              "maximum": 15000
                            },
                            "tile": {
                              "type": "object",
                              "properties": {
                                "w": {
                                  "type": "integer",
                                  "minimum": 100,
                                  "maximum": 12000
                                },
                                "h": {
                                  "type": "integer",
                                  "minimum": 100,
                                  "maximum": 12000
                                }
                              },
                              "required": [
                                "w",
                                "h"
                              ]
                            },
                            "color": {
                              "type": "string",
                              "pattern": "^#[0-9a-f]{6}$"
                            }
                          },
                          "required": [
                            "h"
                          ]
                        },
                        "trim": {
                          "type": "boolean"
                        }
                      }
                    },
                    "parts": {
                      "type": "object",
                      "properties": {
                        "frame": {
                          "type": "object",
                          "properties": {
                            "mat": {
                              "type": "string",
                              "enum": [
                                "oak",
                                "walnut",
                                "white",
                                "black",
                                "steel",
                                "brass",
                                "fabric",
                                "linen",
                                "velvet",
                                "leather",
                                "wool",
                                "rattan"
                              ]
                            },
                            "color": {
                              "type": "string",
                              "pattern": "^#[0-9a-f]{6}$"
                            }
                          }
                        },
                        "cover": {
                          "type": "object",
                          "properties": {
                            "mat": {
                              "type": "string",
                              "enum": [
                                "oak",
                                "walnut",
                                "white",
                                "black",
                                "steel",
                                "brass",
                                "fabric",
                                "linen",
                                "velvet",
                                "leather",
                                "wool",
                                "rattan"
                              ]
                            },
                            "color": {
                              "type": "string",
                              "pattern": "^#[0-9a-f]{6}$"
                            }
                          }
                        }
                      }
                    },
                    "buy": {
                      "type": "object",
                      "properties": {
                        "budget": {
                          "type": "object",
                          "properties": {
                            "price": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 1000000000
                            },
                            "url": {
                              "type": "string",
                              "maxLength": 500,
                              "pattern": "^https:\\/\\/[^\\s<>\"']+$"
                            },
                            "sku": {
                              "type": "string",
                              "maxLength": 80
                            },
                            "name": {
                              "type": "string",
                              "maxLength": 80
                            }
                          }
                        },
                        "roomy": {
                          "type": "object",
                          "properties": {
                            "price": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 1000000000
                            },
                            "url": {
                              "type": "string",
                              "maxLength": 500,
                              "pattern": "^https:\\/\\/[^\\s<>\"']+$"
                            },
                            "sku": {
                              "type": "string",
                              "maxLength": 80
                            },
                            "name": {
                              "type": "string",
                              "maxLength": 80
                            }
                          }
                        }
                      }
                    }
                  },
                  "required": [
                    "id",
                    "element",
                    "type",
                    "at",
                    "rot",
                    "mirror",
                    "w",
                    "d"
                  ]
                }
              },
              "stairs": {
                "maxItems": 100,
                "type": "array",
                "items": {
                  "$ref": "#/$defs/Stair"
                }
              },
              "outdoor": {
                "maxItems": 200,
                "type": "array",
                "items": {
                  "$ref": "#/$defs/Outdoor"
                }
              },
              "roof": {
                "type": "object",
                "properties": {
                  "shape": {
                    "type": "string",
                    "enum": [
                      "gable",
                      "hip",
                      "shed",
                      "flat",
                      "mansard"
                    ]
                  },
                  "pitch": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 80
                  },
                  "upper": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 80
                  },
                  "overhang": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 30000
                  },
                  "ridge": {
                    "type": "string",
                    "enum": [
                      "x",
                      "y"
                    ]
                  },
                  "flip": {
                    "type": "boolean"
                  },
                  "knee": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 50000
                  },
                  "covering": {
                    "type": "string",
                    "enum": [
                      "tiles",
                      "shingles",
                      "slate",
                      "metal",
                      "bitumen",
                      "green"
                    ]
                  },
                  "buildUp": {
                    "type": "string",
                    "enum": [
                      "battens",
                      "rafters",
                      "panels",
                      "deck"
                    ]
                  },
                  "thickness": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 10000
                  },
                  "showBuildUp": {
                    "type": "boolean"
                  },
                  "pitches": {
                    "type": "object",
                    "properties": {
                      "top": {
                        "type": "number",
                        "minimum": 1,
                        "maximum": 80
                      },
                      "right": {
                        "type": "number",
                        "minimum": 1,
                        "maximum": 80
                      },
                      "bottom": {
                        "type": "number",
                        "minimum": 1,
                        "maximum": 80
                      },
                      "left": {
                        "type": "number",
                        "minimum": 1,
                        "maximum": 80
                      }
                    }
                  },
                  "dormers": {
                    "maxItems": 20,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 80
                        },
                        "side": {
                          "type": "string",
                          "enum": [
                            "top",
                            "right",
                            "bottom",
                            "left"
                          ]
                        },
                        "at": {
                          "type": "object",
                          "properties": {
                            "x": {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            "y": {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            }
                          },
                          "required": [
                            "x",
                            "y"
                          ]
                        },
                        "width": {
                          "type": "integer",
                          "minimum": 3000,
                          "maximum": 150000
                        },
                        "height": {
                          "type": "integer",
                          "minimum": 10000,
                          "maximum": 60000
                        },
                        "roof": {
                          "type": "string",
                          "enum": [
                            "flat",
                            "gable"
                          ]
                        },
                        "pitch": {
                          "type": "number",
                          "minimum": 5,
                          "maximum": 60
                        }
                      },
                      "required": [
                        "id",
                        "side",
                        "at",
                        "width",
                        "height",
                        "roof"
                      ]
                    }
                  }
                },
                "required": [
                  "shape",
                  "pitch",
                  "overhang",
                  "ridge",
                  "covering",
                  "buildUp",
                  "thickness",
                  "showBuildUp"
                ]
              },
              "structures": {
                "maxItems": 200,
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 80
                    },
                    "kind": {
                      "type": "string",
                      "enum": [
                        "chimney",
                        "lift",
                        "column",
                        "beam",
                        "skylight"
                      ]
                    },
                    "a": {
                      "$ref": "#/$defs/Point"
                    },
                    "b": {
                      "$ref": "#/$defs/Point"
                    },
                    "width": {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 9007199254740991
                    },
                    "z": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 200000
                    },
                    "depth": {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 30000
                    }
                  },
                  "required": [
                    "id",
                    "kind",
                    "a",
                    "b",
                    "width"
                  ]
                }
              },
              "symbols": {
                "maxItems": 300,
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 80
                    },
                    "kind": {
                      "type": "string",
                      "enum": [
                        "exit",
                        "extinguisher",
                        "first_aid",
                        "assembly",
                        "alarm",
                        "route",
                        "socket",
                        "socket_double",
                        "switch",
                        "switch_double",
                        "light_ceiling",
                        "light_wall",
                        "data",
                        "thermostat",
                        "meter_box",
                        "smoke",
                        "tap",
                        "drain",
                        "radiator",
                        "water_heater",
                        "socket_cooker",
                        "switch_2way",
                        "dimmer",
                        "light_spot",
                        "water_meter",
                        "soil_stack",
                        "heat_source",
                        "manifold",
                        "vent_supply",
                        "vent_extract",
                        "mv_unit",
                        "ac_indoor",
                        "ac_outdoor",
                        "light_surface",
                        "light_track",
                        "light_linear",
                        "light_strip",
                        "socket_outdoor",
                        "camera",
                        "doorbell"
                      ]
                    },
                    "at": {
                      "$ref": "#/$defs/Point"
                    },
                    "rot": {
                      "anyOf": [
                        {
                          "type": "number",
                          "const": 0
                        },
                        {
                          "type": "number",
                          "const": 90
                        },
                        {
                          "type": "number",
                          "const": 180
                        },
                        {
                          "type": "number",
                          "const": 270
                        }
                      ]
                    },
                    "h": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 60000
                    },
                    "grp": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 80
                    },
                    "ctl": {
                      "maxItems": 24,
                      "type": "array",
                      "items": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 80
                      }
                    }
                  },
                  "required": [
                    "id",
                    "kind",
                    "at",
                    "rot"
                  ]
                }
              },
              "patches": {
                "maxItems": 100,
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 80
                    },
                    "name": {
                      "type": "string",
                      "maxLength": 80
                    },
                    "poly": {
                      "$ref": "#/$defs/Polygon"
                    },
                    "h": {
                      "type": "integer",
                      "minimum": -100000,
                      "maximum": 100000
                    },
                    "h2": {
                      "type": "integer",
                      "minimum": -100000,
                      "maximum": 100000
                    },
                    "side": {
                      "type": "string",
                      "enum": [
                        "top",
                        "right",
                        "bottom",
                        "left"
                      ]
                    },
                    "arcs": {
                      "maxItems": 100,
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "i": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 399
                          },
                          "bulge": {
                            "type": "integer",
                            "minimum": -200000,
                            "maximum": 200000
                          }
                        },
                        "required": [
                          "i",
                          "bulge"
                        ]
                      }
                    },
                    "opacity": {
                      "type": "integer",
                      "minimum": 10,
                      "maximum": 100
                    },
                    "roof": {
                      "type": "boolean"
                    },
                    "floor": {
                      "type": "object",
                      "properties": {
                        "mat": {
                          "type": "string",
                          "minLength": 3,
                          "maxLength": 120
                        },
                        "color": {
                          "type": "string",
                          "pattern": "^#[0-9a-f]{6}$"
                        },
                        "tex": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string",
                              "pattern": "^(t[0-9a-f]{16}|lib-[a-z0-9]+(-[a-z0-9]+)*)$"
                            },
                            "w": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 50000
                            },
                            "h": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 50000
                            },
                            "rot": {
                              "anyOf": [
                                {
                                  "type": "number",
                                  "const": 0
                                },
                                {
                                  "type": "number",
                                  "const": 90
                                }
                              ]
                            },
                            "name": {
                              "type": "string",
                              "maxLength": 80
                            }
                          },
                          "required": [
                            "id",
                            "w",
                            "h"
                          ]
                        },
                        "kind": {
                          "type": "string",
                          "enum": [
                            "planks",
                            "tiles",
                            "carpet",
                            "stone",
                            "vinyl",
                            "paving",
                            "decking",
                            "gravel",
                            "lawn",
                            "wallpaper",
                            "wall-tiles",
                            "paint"
                          ]
                        },
                        "unit": {
                          "type": "object",
                          "properties": {
                            "w": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 200000
                            },
                            "h": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 500000
                            }
                          },
                          "required": [
                            "w",
                            "h"
                          ]
                        },
                        "waste": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 50
                        },
                        "coats": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 4
                        },
                        "paper": {
                          "type": "object",
                          "properties": {
                            "roll": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 20000
                            },
                            "len": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 500000
                            },
                            "repeat": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 20000
                            },
                            "tex": {
                              "type": "string",
                              "pattern": "^(t[0-9a-f]{16}|lib-[a-z0-9]+(-[a-z0-9]+)*)$"
                            }
                          },
                          "required": [
                            "roll",
                            "len",
                            "repeat"
                          ]
                        },
                        "art": {
                          "maxItems": 12,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "tex": {
                                "type": "string",
                                "pattern": "^(t[0-9a-f]{16}|lib-[a-z0-9]+(-[a-z0-9]+)*)$"
                              },
                              "w": {
                                "type": "integer",
                                "minimum": 1,
                                "maximum": 100000
                              },
                              "h": {
                                "type": "integer",
                                "minimum": 1,
                                "maximum": 100000
                              },
                              "x": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 1000000
                              },
                              "z": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 100000
                              }
                            },
                            "required": [
                              "tex",
                              "w",
                              "h",
                              "x",
                              "z"
                            ]
                          }
                        },
                        "upTo": {
                          "type": "integer",
                          "minimum": 100,
                          "maximum": 100000
                        },
                        "bands": {
                          "maxItems": 4,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "to": {
                                "type": "integer",
                                "minimum": 100,
                                "maximum": 100000
                              },
                              "kind": {
                                "type": "string",
                                "enum": [
                                  "tiles",
                                  "paint"
                                ]
                              },
                              "tile": {
                                "type": "object",
                                "properties": {
                                  "w": {
                                    "type": "integer",
                                    "minimum": 100,
                                    "maximum": 12000
                                  },
                                  "h": {
                                    "type": "integer",
                                    "minimum": 100,
                                    "maximum": 12000
                                  }
                                },
                                "required": [
                                  "w",
                                  "h"
                                ]
                              },
                              "color": {
                                "type": "string",
                                "pattern": "^#[0-9a-f]{6}$"
                              },
                              "pattern": {
                                "type": "string",
                                "enum": [
                                  "grid",
                                  "brick",
                                  "herringbone",
                                  "diagonal"
                                ]
                              }
                            },
                            "required": [
                              "to",
                              "kind"
                            ]
                          }
                        },
                        "lay": {
                          "type": "object",
                          "properties": {
                            "pattern": {
                              "type": "string",
                              "enum": [
                                "grid",
                                "brick",
                                "herringbone",
                                "diagonal"
                              ]
                            },
                            "start": {
                              "type": "string",
                              "enum": [
                                "corner",
                                "center",
                                "point"
                              ]
                            },
                            "at": {
                              "type": "object",
                              "properties": {
                                "x": {
                                  "type": "integer",
                                  "minimum": -9007199254740991,
                                  "maximum": 9007199254740991
                                },
                                "y": {
                                  "type": "integer",
                                  "minimum": -9007199254740991,
                                  "maximum": 9007199254740991
                                }
                              },
                              "required": [
                                "x",
                                "y"
                              ]
                            },
                            "dir": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 179
                            }
                          },
                          "required": [
                            "pattern",
                            "start",
                            "dir"
                          ]
                        }
                      }
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "poly",
                    "h"
                  ]
                }
              },
              "variant": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80
                  },
                  "n": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 99
                  }
                },
                "required": [
                  "name",
                  "n"
                ]
              },
              "dividers": {
                "maxItems": 500,
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 80
                    },
                    "a": {
                      "type": "object",
                      "properties": {
                        "x": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "y": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        }
                      },
                      "required": [
                        "x",
                        "y"
                      ]
                    },
                    "b": {
                      "type": "object",
                      "properties": {
                        "x": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "y": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        }
                      },
                      "required": [
                        "x",
                        "y"
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "a",
                    "b"
                  ]
                }
              },
              "autoDims": {
                "type": "boolean",
                "const": false
              },
              "origin": {
                "type": "object",
                "properties": {
                  "x": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  "y": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  }
                },
                "required": [
                  "x",
                  "y"
                ]
              },
              "frames": {
                "type": "object",
                "properties": {
                  "door": {
                    "type": "string",
                    "pattern": "^#[0-9a-f]{6}$"
                  },
                  "window": {
                    "type": "string",
                    "pattern": "^#[0-9a-f]{6}$"
                  }
                }
              },
              "building": {
                "type": "string",
                "minLength": 1,
                "maxLength": 80
              },
              "photoPoints": {
                "maxItems": 100,
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 80
                    },
                    "at": {
                      "type": "object",
                      "properties": {
                        "x": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "y": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        }
                      },
                      "required": [
                        "x",
                        "y"
                      ]
                    },
                    "dir": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 359
                    },
                    "title": {
                      "type": "string",
                      "maxLength": 80
                    },
                    "note": {
                      "type": "string",
                      "maxLength": 1000
                    },
                    "photo": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "pattern": "^t[0-9a-f]{16}$"
                        },
                        "t": {
                          "type": "string",
                          "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}Z$"
                        }
                      },
                      "required": [
                        "id"
                      ]
                    },
                    "pano": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "pattern": "^t[0-9a-f]{16}$"
                        },
                        "t": {
                          "type": "string",
                          "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}Z$"
                        }
                      },
                      "required": [
                        "id"
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "at",
                    "dir"
                  ]
                }
              },
              "split": {
                "type": "boolean",
                "const": true
              },
              "runs": {
                "maxItems": 3000,
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 80
                    },
                    "kind": {
                      "type": "string",
                      "enum": [
                        "cable",
                        "cold",
                        "hot",
                        "drain",
                        "heat_flow",
                        "heat_return",
                        "duct_supply",
                        "duct_extract",
                        "refrigerant",
                        "condensate"
                      ]
                    },
                    "pts": {
                      "minItems": 2,
                      "maxItems": 200,
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "x": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          },
                          "y": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          }
                        },
                        "required": [
                          "x",
                          "y"
                        ]
                      }
                    },
                    "size": {
                      "type": "string",
                      "enum": [
                        "4",
                        "6",
                        "10",
                        "1.5",
                        "2.5",
                        "awg14",
                        "awg12",
                        "awg10",
                        "awg8",
                        "awg6"
                      ]
                    },
                    "dia": {
                      "type": "integer",
                      "minimum": 50,
                      "maximum": 5000
                    },
                    "grp": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 80
                    },
                    "auto": {
                      "type": "boolean",
                      "const": true
                    },
                    "up": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 300000
                    }
                  },
                  "required": [
                    "id",
                    "kind",
                    "pts"
                  ]
                }
              },
              "pins": {
                "maxItems": 200,
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 80
                    },
                    "at": {
                      "type": "object",
                      "properties": {
                        "x": {
                          "type": "integer",
                          "minimum": -100000000,
                          "maximum": 100000000
                        },
                        "y": {
                          "type": "integer",
                          "minimum": -100000000,
                          "maximum": 100000000
                        }
                      },
                      "required": [
                        "x",
                        "y"
                      ]
                    },
                    "text": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 500
                    },
                    "by": {
                      "type": "string",
                      "enum": [
                        "client",
                        "office"
                      ]
                    },
                    "name": {
                      "type": "string",
                      "maxLength": 80
                    },
                    "t": {
                      "type": "string",
                      "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}Z$"
                    },
                    "done": {
                      "type": "boolean"
                    },
                    "reply": {
                      "type": "string",
                      "maxLength": 500
                    }
                  },
                  "required": [
                    "id",
                    "at",
                    "text",
                    "by",
                    "t"
                  ]
                }
              },
              "scan": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80
                  },
                  "at": {
                    "type": "string",
                    "maxLength": 40
                  },
                  "rooms": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 200
                  },
                  "checks": {
                    "default": [],
                    "maxItems": 4,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "axis": {
                          "type": "string",
                          "enum": [
                            "x",
                            "y"
                          ]
                        },
                        "scanned": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 1000000
                        },
                        "measured": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 1000000
                        },
                        "applied": {
                          "type": "boolean"
                        },
                        "by": {
                          "type": "string",
                          "enum": [
                            "tape",
                            "laser"
                          ]
                        },
                        "kind": {
                          "type": "string",
                          "enum": [
                            "inside",
                            "outside"
                          ]
                        }
                      },
                      "required": [
                        "axis",
                        "scanned",
                        "measured",
                        "applied",
                        "by"
                      ]
                    }
                  },
                  "facade": {
                    "type": "string",
                    "enum": [
                      "measured",
                      "assumed"
                    ]
                  },
                  "confirmed": {
                    "type": "boolean"
                  },
                  "raw": {
                    "type": "string",
                    "maxLength": 80
                  },
                  "synthetic": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "id",
                  "at",
                  "rooms",
                  "facade"
                ]
              },
              "comments": {
                "maxItems": 300,
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 80
                    },
                    "at": {
                      "type": "object",
                      "properties": {
                        "x": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "y": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        }
                      },
                      "required": [
                        "x",
                        "y"
                      ]
                    },
                    "by": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 60
                        },
                        "color": {
                          "type": "string",
                          "pattern": "^#[0-9a-f]{6}$"
                        }
                      },
                      "required": [
                        "name",
                        "color"
                      ]
                    },
                    "text": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 1000
                    },
                    "t": {
                      "type": "string",
                      "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}(:\\d{2})?Z$"
                    },
                    "done": {
                      "type": "boolean"
                    },
                    "replies": {
                      "maxItems": 50,
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "by": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 60
                              },
                              "color": {
                                "type": "string",
                                "pattern": "^#[0-9a-f]{6}$"
                              }
                            },
                            "required": [
                              "name",
                              "color"
                            ]
                          },
                          "text": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 1000
                          },
                          "t": {
                            "type": "string",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}(:\\d{2})?Z$"
                          }
                        },
                        "required": [
                          "by",
                          "text",
                          "t"
                        ]
                      }
                    }
                  },
                  "required": [
                    "id",
                    "at",
                    "by",
                    "text",
                    "t"
                  ]
                }
              }
            },
            "required": [
              "id",
              "name",
              "level",
              "elevation",
              "defaultHeight",
              "walls",
              "rooms",
              "holes"
            ]
          }
        }
      },
      "required": [
        "id",
        "name",
        "level",
        "elevation",
        "defaultHeight",
        "walls",
        "rooms",
        "holes"
      ],
      "description": "One floor (level) with its walls, rooms keyed by room id, holes, openings, stairs and more. Rooms follow from the walls."
    },
    "Wall": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 80
        },
        "a": {
          "$ref": "#/$defs/Point"
        },
        "b": {
          "$ref": "#/$defs/Point"
        },
        "thickness": {
          "type": "integer",
          "minimum": 1,
          "maximum": 9007199254740991
        },
        "kind": {
          "type": "string",
          "enum": [
            "exterior",
            "party",
            "loadbearing",
            "nonbearing",
            "half",
            "railing"
          ]
        },
        "height": {
          "type": "integer",
          "minimum": 1,
          "maximum": 9007199254740991
        },
        "face": {
          "type": "string",
          "enum": [
            "inside",
            "center",
            "outside"
          ]
        },
        "layers": {
          "minItems": 1,
          "maxItems": 12,
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "material": {
                "type": "string",
                "enum": [
                  "brick",
                  "air",
                  "insulation",
                  "rigid",
                  "gypsum",
                  "studs",
                  "studs-empty",
                  "sheathing",
                  "siding",
                  "block",
                  "sand-lime",
                  "concrete",
                  "plaster"
                ]
              },
              "thickness": {
                "type": "integer",
                "minimum": 1,
                "maximum": 9007199254740991
              }
            },
            "required": [
              "material",
              "thickness"
            ]
          }
        },
        "bulge": {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991
        },
        "sides": {
          "type": "object",
          "properties": {
            "left": {
              "type": "object",
              "properties": {
                "mat": {
                  "type": "string",
                  "minLength": 3,
                  "maxLength": 120
                },
                "color": {
                  "type": "string",
                  "pattern": "^#[0-9a-f]{6}$"
                },
                "tex": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "pattern": "^(t[0-9a-f]{16}|lib-[a-z0-9]+(-[a-z0-9]+)*)$"
                    },
                    "w": {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 50000
                    },
                    "h": {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 50000
                    },
                    "rot": {
                      "anyOf": [
                        {
                          "type": "number",
                          "const": 0
                        },
                        {
                          "type": "number",
                          "const": 90
                        }
                      ]
                    },
                    "name": {
                      "type": "string",
                      "maxLength": 80
                    }
                  },
                  "required": [
                    "id",
                    "w",
                    "h"
                  ]
                },
                "kind": {
                  "type": "string",
                  "enum": [
                    "planks",
                    "tiles",
                    "carpet",
                    "stone",
                    "vinyl",
                    "paving",
                    "decking",
                    "gravel",
                    "lawn",
                    "wallpaper",
                    "wall-tiles",
                    "paint"
                  ]
                },
                "unit": {
                  "type": "object",
                  "properties": {
                    "w": {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 200000
                    },
                    "h": {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 500000
                    }
                  },
                  "required": [
                    "w",
                    "h"
                  ]
                },
                "waste": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 50
                },
                "coats": {
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 4
                },
                "paper": {
                  "type": "object",
                  "properties": {
                    "roll": {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 20000
                    },
                    "len": {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 500000
                    },
                    "repeat": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 20000
                    },
                    "tex": {
                      "type": "string",
                      "pattern": "^(t[0-9a-f]{16}|lib-[a-z0-9]+(-[a-z0-9]+)*)$"
                    }
                  },
                  "required": [
                    "roll",
                    "len",
                    "repeat"
                  ]
                },
                "art": {
                  "maxItems": 12,
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "tex": {
                        "type": "string",
                        "pattern": "^(t[0-9a-f]{16}|lib-[a-z0-9]+(-[a-z0-9]+)*)$"
                      },
                      "w": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 100000
                      },
                      "h": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 100000
                      },
                      "x": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 1000000
                      },
                      "z": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 100000
                      }
                    },
                    "required": [
                      "tex",
                      "w",
                      "h",
                      "x",
                      "z"
                    ]
                  }
                },
                "upTo": {
                  "type": "integer",
                  "minimum": 100,
                  "maximum": 100000
                },
                "bands": {
                  "maxItems": 4,
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "to": {
                        "type": "integer",
                        "minimum": 100,
                        "maximum": 100000
                      },
                      "kind": {
                        "type": "string",
                        "enum": [
                          "tiles",
                          "paint"
                        ]
                      },
                      "tile": {
                        "type": "object",
                        "properties": {
                          "w": {
                            "type": "integer",
                            "minimum": 100,
                            "maximum": 12000
                          },
                          "h": {
                            "type": "integer",
                            "minimum": 100,
                            "maximum": 12000
                          }
                        },
                        "required": [
                          "w",
                          "h"
                        ]
                      },
                      "color": {
                        "type": "string",
                        "pattern": "^#[0-9a-f]{6}$"
                      },
                      "pattern": {
                        "type": "string",
                        "enum": [
                          "grid",
                          "brick",
                          "herringbone",
                          "diagonal"
                        ]
                      }
                    },
                    "required": [
                      "to",
                      "kind"
                    ]
                  }
                },
                "lay": {
                  "type": "object",
                  "properties": {
                    "pattern": {
                      "type": "string",
                      "enum": [
                        "grid",
                        "brick",
                        "herringbone",
                        "diagonal"
                      ]
                    },
                    "start": {
                      "type": "string",
                      "enum": [
                        "corner",
                        "center",
                        "point"
                      ]
                    },
                    "at": {
                      "type": "object",
                      "properties": {
                        "x": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "y": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        }
                      },
                      "required": [
                        "x",
                        "y"
                      ]
                    },
                    "dir": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 179
                    }
                  },
                  "required": [
                    "pattern",
                    "start",
                    "dir"
                  ]
                }
              }
            },
            "right": {
              "type": "object",
              "properties": {
                "mat": {
                  "type": "string",
                  "minLength": 3,
                  "maxLength": 120
                },
                "color": {
                  "type": "string",
                  "pattern": "^#[0-9a-f]{6}$"
                },
                "tex": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "pattern": "^(t[0-9a-f]{16}|lib-[a-z0-9]+(-[a-z0-9]+)*)$"
                    },
                    "w": {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 50000
                    },
                    "h": {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 50000
                    },
                    "rot": {
                      "anyOf": [
                        {
                          "type": "number",
                          "const": 0
                        },
                        {
                          "type": "number",
                          "const": 90
                        }
                      ]
                    },
                    "name": {
                      "type": "string",
                      "maxLength": 80
                    }
                  },
                  "required": [
                    "id",
                    "w",
                    "h"
                  ]
                },
                "kind": {
                  "type": "string",
                  "enum": [
                    "planks",
                    "tiles",
                    "carpet",
                    "stone",
                    "vinyl",
                    "paving",
                    "decking",
                    "gravel",
                    "lawn",
                    "wallpaper",
                    "wall-tiles",
                    "paint"
                  ]
                },
                "unit": {
                  "type": "object",
                  "properties": {
                    "w": {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 200000
                    },
                    "h": {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 500000
                    }
                  },
                  "required": [
                    "w",
                    "h"
                  ]
                },
                "waste": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 50
                },
                "coats": {
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 4
                },
                "paper": {
                  "type": "object",
                  "properties": {
                    "roll": {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 20000
                    },
                    "len": {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 500000
                    },
                    "repeat": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 20000
                    },
                    "tex": {
                      "type": "string",
                      "pattern": "^(t[0-9a-f]{16}|lib-[a-z0-9]+(-[a-z0-9]+)*)$"
                    }
                  },
                  "required": [
                    "roll",
                    "len",
                    "repeat"
                  ]
                },
                "art": {
                  "maxItems": 12,
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "tex": {
                        "type": "string",
                        "pattern": "^(t[0-9a-f]{16}|lib-[a-z0-9]+(-[a-z0-9]+)*)$"
                      },
                      "w": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 100000
                      },
                      "h": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 100000
                      },
                      "x": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 1000000
                      },
                      "z": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 100000
                      }
                    },
                    "required": [
                      "tex",
                      "w",
                      "h",
                      "x",
                      "z"
                    ]
                  }
                },
                "upTo": {
                  "type": "integer",
                  "minimum": 100,
                  "maximum": 100000
                },
                "bands": {
                  "maxItems": 4,
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "to": {
                        "type": "integer",
                        "minimum": 100,
                        "maximum": 100000
                      },
                      "kind": {
                        "type": "string",
                        "enum": [
                          "tiles",
                          "paint"
                        ]
                      },
                      "tile": {
                        "type": "object",
                        "properties": {
                          "w": {
                            "type": "integer",
                            "minimum": 100,
                            "maximum": 12000
                          },
                          "h": {
                            "type": "integer",
                            "minimum": 100,
                            "maximum": 12000
                          }
                        },
                        "required": [
                          "w",
                          "h"
                        ]
                      },
                      "color": {
                        "type": "string",
                        "pattern": "^#[0-9a-f]{6}$"
                      },
                      "pattern": {
                        "type": "string",
                        "enum": [
                          "grid",
                          "brick",
                          "herringbone",
                          "diagonal"
                        ]
                      }
                    },
                    "required": [
                      "to",
                      "kind"
                    ]
                  }
                },
                "lay": {
                  "type": "object",
                  "properties": {
                    "pattern": {
                      "type": "string",
                      "enum": [
                        "grid",
                        "brick",
                        "herringbone",
                        "diagonal"
                      ]
                    },
                    "start": {
                      "type": "string",
                      "enum": [
                        "corner",
                        "center",
                        "point"
                      ]
                    },
                    "at": {
                      "type": "object",
                      "properties": {
                        "x": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "y": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        }
                      },
                      "required": [
                        "x",
                        "y"
                      ]
                    },
                    "dir": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 179
                    }
                  },
                  "required": [
                    "pattern",
                    "start",
                    "dir"
                  ]
                }
              }
            }
          }
        },
        "sure": {
          "type": "boolean"
        },
        "sizeLock": {
          "type": "boolean",
          "const": true
        },
        "raise": {
          "type": "integer",
          "minimum": -50000,
          "maximum": 50000
        },
        "rise": {
          "type": "integer",
          "minimum": -50000,
          "maximum": 50000
        },
        "top": {
          "type": "string",
          "const": "roof"
        },
        "prov": {
          "type": "object",
          "properties": {
            "src": {
              "type": "string",
              "enum": [
                "measured",
                "laser",
                "drawing",
                "scan",
                "assumed"
              ]
            },
            "tol": {
              "type": "integer",
              "minimum": 1,
              "maximum": 10000
            },
            "unsure": {
              "type": "boolean"
            },
            "auto": {
              "type": "boolean"
            },
            "conf": {
              "type": "string",
              "enum": [
                "low",
                "medium",
                "high"
              ]
            }
          },
          "required": [
            "src"
          ]
        },
        "phase": {
          "type": "string",
          "enum": [
            "new",
            "demolish"
          ]
        }
      },
      "required": [
        "id",
        "a",
        "b",
        "thickness",
        "kind"
      ],
      "description": "A wall from a to b on its centre line, with kind (exterior, party, loadbearing, nonbearing, half, railing) and thickness."
    },
    "Point": {
      "type": "object",
      "properties": {
        "x": {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991
        },
        "y": {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991
        }
      },
      "required": [
        "x",
        "y"
      ],
      "description": "A point in 0.1 mm as whole numbers. x to the right, y down in the drawing."
    },
    "Room": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "maxLength": 80
        },
        "fn": {
          "type": "string",
          "enum": [
            "living",
            "bedroom",
            "study",
            "kitchen",
            "bathroom",
            "toilet",
            "hall",
            "landing",
            "closet",
            "meter_cupboard",
            "stair_closet",
            "utility",
            "pantry",
            "laundry",
            "boiler",
            "attic",
            "storage_attic",
            "basement",
            "garage",
            "bike_storage",
            "storage",
            "other"
          ]
        },
        "highest": {
          "type": "integer",
          "minimum": 1,
          "maximum": 9007199254740991
        },
        "below150": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Polygon"
          }
        },
        "above200": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Polygon"
          }
        },
        "heatedOrInsulated": {
          "type": "boolean"
        },
        "accessible": {
          "type": "boolean"
        },
        "finished": {
          "type": "boolean"
        },
        "attic": {
          "type": "object",
          "properties": {
            "fixedStair": {
              "type": "boolean"
            },
            "glass": {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            }
          },
          "required": [
            "fixedStair",
            "glass"
          ]
        },
        "slope": {
          "type": "object",
          "properties": {
            "lowest": {
              "type": "integer",
              "minimum": 1,
              "maximum": 9007199254740991
            },
            "side": {
              "type": "string",
              "enum": [
                "top",
                "right",
                "bottom",
                "left"
              ]
            }
          },
          "required": [
            "lowest",
            "side"
          ]
        },
        "finish": {
          "type": "string",
          "enum": [
            "wood",
            "tile",
            "carpet",
            "concrete",
            "deck"
          ]
        },
        "sitsOn": {
          "type": "string",
          "enum": [
            "basement",
            "crawl_space",
            "slab_on_ground",
            "home_below",
            "unheated_below",
            "outside_air"
          ]
        },
        "floor": {
          "type": "object",
          "properties": {
            "mat": {
              "type": "string",
              "minLength": 3,
              "maxLength": 120
            },
            "color": {
              "type": "string",
              "pattern": "^#[0-9a-f]{6}$"
            },
            "tex": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "pattern": "^(t[0-9a-f]{16}|lib-[a-z0-9]+(-[a-z0-9]+)*)$"
                },
                "w": {
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 50000
                },
                "h": {
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 50000
                },
                "rot": {
                  "anyOf": [
                    {
                      "type": "number",
                      "const": 0
                    },
                    {
                      "type": "number",
                      "const": 90
                    }
                  ]
                },
                "name": {
                  "type": "string",
                  "maxLength": 80
                }
              },
              "required": [
                "id",
                "w",
                "h"
              ]
            },
            "kind": {
              "type": "string",
              "enum": [
                "planks",
                "tiles",
                "carpet",
                "stone",
                "vinyl",
                "paving",
                "decking",
                "gravel",
                "lawn",
                "wallpaper",
                "wall-tiles",
                "paint"
              ]
            },
            "unit": {
              "type": "object",
              "properties": {
                "w": {
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 200000
                },
                "h": {
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 500000
                }
              },
              "required": [
                "w",
                "h"
              ]
            },
            "waste": {
              "type": "integer",
              "minimum": 0,
              "maximum": 50
            },
            "coats": {
              "type": "integer",
              "minimum": 1,
              "maximum": 4
            },
            "paper": {
              "type": "object",
              "properties": {
                "roll": {
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 20000
                },
                "len": {
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 500000
                },
                "repeat": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 20000
                },
                "tex": {
                  "type": "string",
                  "pattern": "^(t[0-9a-f]{16}|lib-[a-z0-9]+(-[a-z0-9]+)*)$"
                }
              },
              "required": [
                "roll",
                "len",
                "repeat"
              ]
            },
            "art": {
              "maxItems": 12,
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "tex": {
                    "type": "string",
                    "pattern": "^(t[0-9a-f]{16}|lib-[a-z0-9]+(-[a-z0-9]+)*)$"
                  },
                  "w": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 100000
                  },
                  "h": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 100000
                  },
                  "x": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 1000000
                  },
                  "z": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 100000
                  }
                },
                "required": [
                  "tex",
                  "w",
                  "h",
                  "x",
                  "z"
                ]
              }
            },
            "upTo": {
              "type": "integer",
              "minimum": 100,
              "maximum": 100000
            },
            "bands": {
              "maxItems": 4,
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "to": {
                    "type": "integer",
                    "minimum": 100,
                    "maximum": 100000
                  },
                  "kind": {
                    "type": "string",
                    "enum": [
                      "tiles",
                      "paint"
                    ]
                  },
                  "tile": {
                    "type": "object",
                    "properties": {
                      "w": {
                        "type": "integer",
                        "minimum": 100,
                        "maximum": 12000
                      },
                      "h": {
                        "type": "integer",
                        "minimum": 100,
                        "maximum": 12000
                      }
                    },
                    "required": [
                      "w",
                      "h"
                    ]
                  },
                  "color": {
                    "type": "string",
                    "pattern": "^#[0-9a-f]{6}$"
                  },
                  "pattern": {
                    "type": "string",
                    "enum": [
                      "grid",
                      "brick",
                      "herringbone",
                      "diagonal"
                    ]
                  }
                },
                "required": [
                  "to",
                  "kind"
                ]
              }
            },
            "lay": {
              "type": "object",
              "properties": {
                "pattern": {
                  "type": "string",
                  "enum": [
                    "grid",
                    "brick",
                    "herringbone",
                    "diagonal"
                  ]
                },
                "start": {
                  "type": "string",
                  "enum": [
                    "corner",
                    "center",
                    "point"
                  ]
                },
                "at": {
                  "type": "object",
                  "properties": {
                    "x": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "y": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "x",
                    "y"
                  ]
                },
                "dir": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 179
                }
              },
              "required": [
                "pattern",
                "start",
                "dir"
              ]
            }
          }
        },
        "override": {
          "type": "object",
          "properties": {
            "category": {
              "type": "string",
              "enum": [
                "GOW",
                "GOOI",
                "GOGB",
                "OEBR",
                "EXCLUDED"
              ]
            },
            "reason": {
              "type": "string",
              "minLength": 3,
              "maxLength": 500
            }
          },
          "required": [
            "category",
            "reason"
          ]
        },
        "ceiling": {
          "type": "object",
          "properties": {
            "shape": {
              "type": "string",
              "enum": [
                "tray",
                "vault"
              ]
            },
            "drop": {
              "type": "integer",
              "minimum": 1,
              "maximum": 50000
            },
            "edge": {
              "type": "integer",
              "minimum": 1,
              "maximum": 50000
            },
            "axis": {
              "type": "string",
              "enum": [
                "x",
                "y"
              ]
            }
          },
          "required": [
            "shape",
            "drop"
          ]
        },
        "skylights": {
          "type": "object",
          "properties": {
            "n": {
              "type": "integer",
              "minimum": 1,
              "maximum": 20
            },
            "w": {
              "type": "integer",
              "minimum": 1,
              "maximum": 30000
            },
            "h": {
              "type": "integer",
              "minimum": 1,
              "maximum": 30000
            }
          },
          "required": [
            "n",
            "w",
            "h"
          ]
        },
        "overhang": {
          "type": "boolean"
        },
        "photos": {
          "maxItems": 12,
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "pattern": "^t[0-9a-f]{16}$"
              },
              "t": {
                "type": "string",
                "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}Z$"
              }
            },
            "required": [
              "id"
            ]
          }
        },
        "fieldNote": {
          "type": "string",
          "maxLength": 1000
        },
        "ufh": {
          "type": "integer",
          "minimum": 500,
          "maximum": 4000
        },
        "adu": {
          "type": "boolean"
        },
        "heightProv": {
          "type": "object",
          "properties": {
            "src": {
              "type": "string",
              "enum": [
                "measured",
                "laser",
                "drawing",
                "scan",
                "assumed"
              ]
            },
            "tol": {
              "type": "integer",
              "minimum": 1,
              "maximum": 10000
            },
            "unsure": {
              "type": "boolean"
            },
            "auto": {
              "type": "boolean"
            },
            "conf": {
              "type": "string",
              "enum": [
                "low",
                "medium",
                "high"
              ]
            }
          },
          "required": [
            "src"
          ]
        },
        "ez": {
          "type": "string",
          "enum": [
            "main",
            "cool",
            "out"
          ]
        },
        "floorLayers": {
          "minItems": 1,
          "maxItems": 8,
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "material": {
                "type": "string",
                "enum": [
                  "concrete",
                  "insulation",
                  "screed",
                  "anhydrite",
                  "boards",
                  "membrane"
                ]
              },
              "thickness": {
                "type": "integer",
                "minimum": 1,
                "maximum": 5000
              },
              "up": {
                "type": "integer",
                "minimum": 0,
                "maximum": 40000
              }
            },
            "required": [
              "material",
              "thickness"
            ]
          }
        },
        "dims": {
          "type": "boolean"
        },
        "sizeLock": {
          "type": "boolean",
          "const": true
        }
      },
      "required": [
        "name",
        "fn"
      ],
      "description": "What is known about a room: name, use (fn), highest ceiling, sloped ceiling, heated, finished, and the parts under 1.5 m or above 2.0 m."
    },
    "Polygon": {
      "type": "object",
      "properties": {
        "outer": {
          "minItems": 3,
          "type": "array",
          "items": {
            "$ref": "#/$defs/Point"
          }
        },
        "holes": {
          "type": "array",
          "items": {
            "minItems": 3,
            "type": "array",
            "items": {
              "$ref": "#/$defs/Point"
            }
          }
        }
      },
      "required": [
        "outer",
        "holes"
      ],
      "description": "An outer ring and holes; every point in 0.1 mm."
    },
    "Hole": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 80
        },
        "kind": {
          "type": "string",
          "enum": [
            "stairwell",
            "void",
            "shaft",
            "lift",
            "setback",
            "column",
            "niche"
          ]
        },
        "poly": {
          "$ref": "#/$defs/Polygon"
        },
        "roomId": {
          "type": "string",
          "minLength": 1,
          "maxLength": 80
        },
        "group": {
          "type": "string",
          "minLength": 1,
          "maxLength": 80
        },
        "stairId": {
          "type": "string",
          "minLength": 1,
          "maxLength": 80
        }
      },
      "required": [
        "id",
        "kind",
        "poly"
      ],
      "description": "A stairwell, void, shaft, lift, setback, column or niche: the measuring standard decides whether it is subtracted."
    },
    "Opening": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 80
        },
        "wallId": {
          "type": "string",
          "minLength": 1,
          "maxLength": 80
        },
        "kind": {
          "type": "string",
          "enum": [
            "door",
            "window",
            "opening"
          ]
        },
        "at": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "width": {
          "type": "integer",
          "minimum": 1,
          "maximum": 9007199254740991
        },
        "swing": {
          "type": "string",
          "enum": [
            "left-in",
            "left-out",
            "right-in",
            "right-out"
          ]
        },
        "sill": {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991
        },
        "height": {
          "type": "integer",
          "minimum": 1,
          "maximum": 9007199254740991
        },
        "style": {
          "type": "string",
          "enum": [
            "single",
            "double",
            "sliding",
            "pocket",
            "garage",
            "fixed",
            "casement"
          ]
        },
        "threshold": {
          "type": "boolean"
        },
        "front": {
          "type": "boolean"
        },
        "frame": {
          "type": "string",
          "pattern": "^#[0-9a-f]{6}$"
        },
        "transom": {
          "type": "integer",
          "minimum": 1000,
          "maximum": 15000
        },
        "phase": {
          "type": "string",
          "enum": [
            "new",
            "demolish"
          ]
        }
      },
      "required": [
        "id",
        "wallId",
        "kind",
        "at",
        "width"
      ],
      "description": "A door, window or opening in a wall; at is the distance from wall point a to the middle, along the centre line."
    },
    "Stair": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 80
        },
        "a": {
          "$ref": "#/$defs/Point"
        },
        "b": {
          "$ref": "#/$defs/Point"
        },
        "width": {
          "type": "integer",
          "minimum": 1,
          "maximum": 9007199254740991
        },
        "shape": {
          "type": "string",
          "enum": [
            "straight",
            "quarter",
            "u",
            "spiral"
          ]
        },
        "turn": {
          "type": "string",
          "enum": [
            "left",
            "right"
          ]
        },
        "run2": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "dir": {
          "type": "string",
          "enum": [
            "up",
            "down"
          ]
        },
        "rise": {
          "type": "integer",
          "minimum": 1,
          "maximum": 9007199254740991
        },
        "to": {
          "type": "string",
          "minLength": 1,
          "maxLength": 80
        }
      },
      "required": [
        "id",
        "a",
        "b",
        "width",
        "shape",
        "turn",
        "run2",
        "dir",
        "rise"
      ],
      "description": "A stair from a to b with width, shape and rise. It counts nowhere itself; its stairwell is a Hole."
    },
    "Outdoor": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 80
        },
        "name": {
          "type": "string",
          "maxLength": 80
        },
        "kind": {
          "type": "string",
          "enum": [
            "balcony",
            "roof_terrace",
            "veranda",
            "canopy",
            "carport",
            "terrace"
          ]
        },
        "poly": {
          "$ref": "#/$defs/Polygon"
        },
        "attached": {
          "type": "boolean"
        }
      },
      "required": [
        "id",
        "name",
        "kind",
        "poly",
        "attached"
      ],
      "description": "A balcony, roof terrace, veranda, canopy, carport or terrace."
    },
    "Outbuilding": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 80
        },
        "name": {
          "type": "string",
          "maxLength": 80
        },
        "poly": {
          "$ref": "#/$defs/Polygon"
        },
        "sharedWall": {
          "type": "boolean"
        },
        "reachableFromInside": {
          "type": "boolean"
        },
        "lockable": {
          "type": "boolean"
        },
        "separateBagBuilding": {
          "type": "boolean"
        }
      },
      "required": [
        "id",
        "name",
        "poly",
        "sharedWall",
        "reachableFromInside",
        "lockable",
        "separateBagBuilding"
      ],
      "description": "A shed or other building on the lot (older files; newer files keep buildings as floors with a building tag)."
    },
    "Derived": {
      "type": "object",
      "properties": {
        "ruleSet": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string",
              "enum": [
                "nl-meetinstructie-2019-07",
                "us-ansi-z765-2021",
                "de-woflv-2004",
                "none"
              ]
            },
            "version": {
              "type": "string",
              "pattern": "^\\d+\\.\\d+\\.\\d+$"
            },
            "hash": {
              "type": "string",
              "maxLength": 128
            }
          },
          "required": [
            "id",
            "version"
          ]
        },
        "engine": {
          "type": "string",
          "maxLength": 40
        },
        "computedAt": {
          "type": "string",
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
        },
        "main": {
          "type": "object",
          "properties": {
            "key": {
              "type": "string",
              "minLength": 2,
              "maxLength": 20
            },
            "area": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            }
          },
          "required": [
            "key",
            "area"
          ]
        },
        "totals": {
          "type": "object",
          "propertyNames": {
            "type": "string",
            "minLength": 2,
            "maxLength": 20
          },
          "additionalProperties": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          }
        }
      },
      "required": [
        "ruleSet",
        "computedAt",
        "main",
        "totals"
      ],
      "description": "Areas computed when the file was saved, always with the rule set and its version. Not the source: change the plan and measure again."
    }
  },
  "x-squaremetry": {
    "format": "squaremetry-plan",
    "fileVersion": 1,
    "schemaVersion": 1,
    "mediaType": "application/vnd.squaremetry+json",
    "extension": ".sqm",
    "spec": "https://squaremetry.com/format/",
    "license": "MIT",
    "changelog": [
      {
        "version": "1",
        "date": "2026-10-01",
        "text": "First public version: the wrapper (format, version, savedAt), the plan with schemaVersion 1 (floors, walls with kind and thickness, openings, rooms with use and heights, voids, stairs, outbuildings and the source of each size), and optional derived areas with the rule set and its version."
      }
    ]
  }
}