{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://www.calculatorx.com/schemas/math.vector.input.json",
  "title": "Vector — input",
  "type": "object",
  "properties": {
    "mode": {
      "type": "string",
      "maxLength": 80,
      "pattern": "^\\s*(?:[mM][aA][gG][nN][iI][tT][uU][dD][eE]|[mM][aA][gG]|[nN][oO][rR][mM]|[lL][eE][nN][gG][tT][hH]|[aA][bB][sS]|[mM][oO][dD][uU][lL][uU][sS]|[nN][oO][rR][mM][aA][lL][iI][zZ][eE]|[uU][nN][iI][tT]|[uU][nN][iI][tT][_\\s-]+[vV][eE][cC][tT][oO][rR]|[uU][nN][iI][tT][vV][eE][cC][tT][oO][rR]|[aA][dD][dD]|[pP][lL][uU][sS]|[sS][uU][mM]|[sS][uU][bB]|[sS][uU][bB][tT][rR][aA][cC][tT]|[mM][iI][nN][uU][sS]|[dD][iI][fF][fF][eE][rR][eE][nN][cC][eE]|[dD][oO][tT]|[iI][nN][nN][eE][rR]|[sS][cC][aA][lL][aA][rR][_\\s-]+[pP][rR][oO][dD][uU][cC][tT]|[dD][oO][tT][_\\s-]+[pP][rR][oO][dD][uU][cC][tT]|[cC][rR][oO][sS][sS]|[vV][eE][cC][tT][oO][rR][_\\s-]+[pP][rR][oO][dD][uU][cC][tT]|[cC][rR][oO][sS][sS][_\\s-]+[pP][rR][oO][dD][uU][cC][tT]|[oO][uU][tT][eE][rR]|[aA][nN][gG][lL][eE]|[aA][nN][gG][lL][eE][_\\s-]+[bB][eE][tT][wW][eE][eE][nN]|[iI][nN][cC][lL][uU][dD][eE][dD][_\\s-]+[aA][nN][gG][lL][eE]|[pP][rR][oO][jJ][eE][cC][tT][iI][oO][nN]|[pP][rR][oO][jJ]|[pP][rR][oO][jJ][eE][cC][tT]|[vV][eE][cC][tT][oO][rR][_\\s-]+[pP][rR][oO][jJ][eE][cC][tT][iI][oO][nN]|[tT][rR][iI][pP][lL][eE]|[sS][cC][aA][lL][aA][rR][_\\s-]+[tT][rR][iI][pP][lL][eE]|[bB][oO][xX]|[sS][cC][aA][lL][aA][rR][_\\s-]+[tT][rR][iI][pP][lL][eE][_\\s-]+[pP][rR][oO][dD][uU][cC][tT])\\s*$"
    },
    "ux": {
      "oneOf": [
        {
          "type": "number"
        },
        {
          "type": "string",
          "minLength": 1,
          "maxLength": 1024,
          "pattern": "^\\s*[+−-]?(?:[0-9]+(?:\\.[0-9]*)?|\\.[0-9]+)(?:[eE][+-]?[0-9]+)?\\s*$"
        }
      ],
      "description": "Finite decimal; zero or normal binary64. Decimal text preserves underflow detection."
    },
    "uy": {
      "oneOf": [
        {
          "type": "number"
        },
        {
          "type": "string",
          "minLength": 1,
          "maxLength": 1024,
          "pattern": "^\\s*[+−-]?(?:[0-9]+(?:\\.[0-9]*)?|\\.[0-9]+)(?:[eE][+-]?[0-9]+)?\\s*$"
        }
      ],
      "description": "Finite decimal; zero or normal binary64. Decimal text preserves underflow detection."
    },
    "uz": {
      "oneOf": [
        {
          "type": "number"
        },
        {
          "type": "string",
          "minLength": 1,
          "maxLength": 1024,
          "pattern": "^\\s*[+−-]?(?:[0-9]+(?:\\.[0-9]*)?|\\.[0-9]+)(?:[eE][+-]?[0-9]+)?\\s*$"
        }
      ],
      "description": "Finite decimal; zero or normal binary64. Decimal text preserves underflow detection."
    },
    "vx": {
      "oneOf": [
        {
          "type": "number"
        },
        {
          "type": "string",
          "minLength": 1,
          "maxLength": 1024,
          "pattern": "^\\s*[+−-]?(?:[0-9]+(?:\\.[0-9]*)?|\\.[0-9]+)(?:[eE][+-]?[0-9]+)?\\s*$"
        }
      ],
      "description": "Finite decimal; zero or normal binary64. Decimal text preserves underflow detection."
    },
    "vy": {
      "oneOf": [
        {
          "type": "number"
        },
        {
          "type": "string",
          "minLength": 1,
          "maxLength": 1024,
          "pattern": "^\\s*[+−-]?(?:[0-9]+(?:\\.[0-9]*)?|\\.[0-9]+)(?:[eE][+-]?[0-9]+)?\\s*$"
        }
      ],
      "description": "Finite decimal; zero or normal binary64. Decimal text preserves underflow detection."
    },
    "vz": {
      "oneOf": [
        {
          "type": "number"
        },
        {
          "type": "string",
          "minLength": 1,
          "maxLength": 1024,
          "pattern": "^\\s*[+−-]?(?:[0-9]+(?:\\.[0-9]*)?|\\.[0-9]+)(?:[eE][+-]?[0-9]+)?\\s*$"
        }
      ],
      "description": "Finite decimal; zero or normal binary64. Decimal text preserves underflow detection."
    },
    "wx": {
      "oneOf": [
        {
          "type": "number"
        },
        {
          "type": "string",
          "minLength": 1,
          "maxLength": 1024,
          "pattern": "^\\s*[+−-]?(?:[0-9]+(?:\\.[0-9]*)?|\\.[0-9]+)(?:[eE][+-]?[0-9]+)?\\s*$"
        }
      ],
      "description": "Finite decimal; zero or normal binary64. Decimal text preserves underflow detection."
    },
    "wy": {
      "oneOf": [
        {
          "type": "number"
        },
        {
          "type": "string",
          "minLength": 1,
          "maxLength": 1024,
          "pattern": "^\\s*[+−-]?(?:[0-9]+(?:\\.[0-9]*)?|\\.[0-9]+)(?:[eE][+-]?[0-9]+)?\\s*$"
        }
      ],
      "description": "Finite decimal; zero or normal binary64. Decimal text preserves underflow detection."
    },
    "wz": {
      "oneOf": [
        {
          "type": "number"
        },
        {
          "type": "string",
          "minLength": 1,
          "maxLength": 1024,
          "pattern": "^\\s*[+−-]?(?:[0-9]+(?:\\.[0-9]*)?|\\.[0-9]+)(?:[eE][+-]?[0-9]+)?\\s*$"
        }
      ],
      "description": "Finite decimal; zero or normal binary64. Decimal text preserves underflow detection."
    }
  },
  "required": [
    "ux",
    "uy"
  ],
  "additionalProperties": false,
  "allOf": [
    {
      "if": {
        "properties": {
          "mode": {
            "pattern": "^\\s*(?:[aA][dD][dD]|[pP][lL][uU][sS]|[sS][uU][mM]|[sS][uU][bB]|[sS][uU][bB][tT][rR][aA][cC][tT]|[mM][iI][nN][uU][sS]|[dD][iI][fF][fF][eE][rR][eE][nN][cC][eE]|[dD][oO][tT]|[iI][nN][nN][eE][rR]|[sS][cC][aA][lL][aA][rR][_\\s-]+[pP][rR][oO][dD][uU][cC][tT]|[dD][oO][tT][_\\s-]+[pP][rR][oO][dD][uU][cC][tT]|[cC][rR][oO][sS][sS]|[vV][eE][cC][tT][oO][rR][_\\s-]+[pP][rR][oO][dD][uU][cC][tT]|[cC][rR][oO][sS][sS][_\\s-]+[pP][rR][oO][dD][uU][cC][tT]|[oO][uU][tT][eE][rR]|[aA][nN][gG][lL][eE]|[aA][nN][gG][lL][eE][_\\s-]+[bB][eE][tT][wW][eE][eE][nN]|[iI][nN][cC][lL][uU][dD][eE][dD][_\\s-]+[aA][nN][gG][lL][eE]|[pP][rR][oO][jJ][eE][cC][tT][iI][oO][nN]|[pP][rR][oO][jJ]|[pP][rR][oO][jJ][eE][cC][tT]|[vV][eE][cC][tT][oO][rR][_\\s-]+[pP][rR][oO][jJ][eE][cC][tT][iI][oO][nN]|[tT][rR][iI][pP][lL][eE]|[sS][cC][aA][lL][aA][rR][_\\s-]+[tT][rR][iI][pP][lL][eE]|[bB][oO][xX]|[sS][cC][aA][lL][aA][rR][_\\s-]+[tT][rR][iI][pP][lL][eE][_\\s-]+[pP][rR][oO][dD][uU][cC][tT])\\s*$"
          }
        },
        "required": [
          "mode"
        ]
      },
      "then": {
        "required": [
          "vx",
          "vy"
        ]
      }
    },
    {
      "if": {
        "properties": {
          "mode": {
            "pattern": "^\\s*(?:[tT][rR][iI][pP][lL][eE]|[sS][cC][aA][lL][aA][rR][_\\s-]+[tT][rR][iI][pP][lL][eE]|[bB][oO][xX]|[sS][cC][aA][lL][aA][rR][_\\s-]+[tT][rR][iI][pP][lL][eE][_\\s-]+[pP][rR][oO][dD][uU][cC][tT])\\s*$"
          }
        },
        "required": [
          "mode"
        ]
      },
      "then": {
        "required": [
          "wx",
          "wy"
        ]
      }
    }
  ],
  "description": "R²/R³ vector magnitude, normalize, add/subtract, dot/cross product, included angle, projection and scalar triple product. Finite normal binary64 components or zero; nine locked discovery entries. (calculation_version 1.8.0)",
  "x-unit-contract": {
    "protocol": "calculatorx-field-unit-contract-v1",
    "capability_id": "math.vector",
    "registry_version": "0.3.0-preview.3",
    "declaration_scope": "Field/branch declarations only; inactive fields are not asserted to exist. No conversion-engine migration or new numerical certification.",
    "path_format": "Paths relative to inputs or result_detail.value; dot separates properties, * denotes array items, $ denotes a scalar result.",
    "inputs": {},
    "outputs": {
      "angle_deg": {
        "unit": "deg",
        "reference": {
          "unit_id": "cx:deg",
          "revision": "1.0.0",
          "content_digest": "ebb31e3abee53f3bf57339c87949e1018d141739fba8a07f54c42ebfd219262b",
          "dependency_digest": "eef386126ec6524884c84bab06f2a96996df913376c0ce5ccdaca0e7faf7b9c3",
          "quantity_kind": "plane_angle",
          "dimension": [
            0,
            0,
            0,
            0,
            0,
            0,
            0
          ],
          "registry_version": "0.3.0-preview.3",
          "digest_contract": "calculatorx-unit-definition-digests-v2",
          "registry_status": "preview",
          "definition_lifecycle": "candidate",
          "role": "scalar"
        }
      },
      "angle_rad": {
        "unit": "rad",
        "reference": {
          "unit_id": "cx:rad",
          "revision": "1.0.0",
          "content_digest": "842467a958d28ac79bf34e796043449f6af24819d77b2b67f540dbabdecc8e3e",
          "dependency_digest": "9c07023393c6212aab52719f503df1bdc9456559b5c4719ff1fec47d0623e0ad",
          "quantity_kind": "plane_angle",
          "dimension": [
            0,
            0,
            0,
            0,
            0,
            0,
            0
          ],
          "registry_version": "0.3.0-preview.3",
          "digest_contract": "calculatorx-unit-definition-digests-v2",
          "registry_status": "preview",
          "definition_lifecycle": "candidate",
          "role": "scalar"
        }
      },
      "cosine": {
        "unit": "1",
        "reference": {
          "unit_id": "cx:one",
          "revision": "1.0.0",
          "content_digest": "98cc3ffc58d8733c483b60c4d7e238fe8ad43a6aadcced9496b74f33a01ef599",
          "dependency_digest": "b1c9aa4d586949ee881925298442091ba11dda29f57de0867e43da1cd59e06e5",
          "quantity_kind": "ratio",
          "dimension": [
            0,
            0,
            0,
            0,
            0,
            0,
            0
          ],
          "registry_version": "0.3.0-preview.3",
          "digest_contract": "calculatorx-unit-definition-digests-v2",
          "registry_status": "preview",
          "definition_lifecycle": "candidate",
          "role": "scalar"
        }
      },
      "nx": {
        "unit": "1",
        "reference": {
          "unit_id": "cx:one",
          "revision": "1.0.0",
          "content_digest": "98cc3ffc58d8733c483b60c4d7e238fe8ad43a6aadcced9496b74f33a01ef599",
          "dependency_digest": "b1c9aa4d586949ee881925298442091ba11dda29f57de0867e43da1cd59e06e5",
          "quantity_kind": "ratio",
          "dimension": [
            0,
            0,
            0,
            0,
            0,
            0,
            0
          ],
          "registry_version": "0.3.0-preview.3",
          "digest_contract": "calculatorx-unit-definition-digests-v2",
          "registry_status": "preview",
          "definition_lifecycle": "candidate",
          "role": "scalar"
        }
      },
      "ny": {
        "unit": "1",
        "reference": {
          "unit_id": "cx:one",
          "revision": "1.0.0",
          "content_digest": "98cc3ffc58d8733c483b60c4d7e238fe8ad43a6aadcced9496b74f33a01ef599",
          "dependency_digest": "b1c9aa4d586949ee881925298442091ba11dda29f57de0867e43da1cd59e06e5",
          "quantity_kind": "ratio",
          "dimension": [
            0,
            0,
            0,
            0,
            0,
            0,
            0
          ],
          "registry_version": "0.3.0-preview.3",
          "digest_contract": "calculatorx-unit-definition-digests-v2",
          "registry_status": "preview",
          "definition_lifecycle": "candidate",
          "role": "scalar"
        }
      },
      "nz": {
        "unit": "1",
        "reference": {
          "unit_id": "cx:one",
          "revision": "1.0.0",
          "content_digest": "98cc3ffc58d8733c483b60c4d7e238fe8ad43a6aadcced9496b74f33a01ef599",
          "dependency_digest": "b1c9aa4d586949ee881925298442091ba11dda29f57de0867e43da1cd59e06e5",
          "quantity_kind": "ratio",
          "dimension": [
            0,
            0,
            0,
            0,
            0,
            0,
            0
          ],
          "registry_version": "0.3.0-preview.3",
          "digest_contract": "calculatorx-unit-definition-digests-v2",
          "registry_status": "preview",
          "definition_lifecycle": "candidate",
          "role": "scalar"
        }
      }
    },
    "quantity_policy": {
      "physical_unit_id": null,
      "input_policy": "Components within each vector use a consistent arbitrary operand unit.",
      "derived_policy": "Magnitude inherits its operand unit; dot/cross products combine operand units, triple products combine three. Normalized direction components and cosine are ratios."
    }
  }
}
