vda-5050-lib
Version:
Universal VDA 5050 library for Node.js and browsers
1,037 lines (1,032 loc) • 111 kB
JavaScript
// ----------------------------------------------------------------------------"
// This file was generated by a tool, do not modify it directly.
// ----------------------------------------------------------------------------
const validateConnection = (function() {
'use strict'
const hasOwn = Function.prototype.call.bind(Object.prototype.hasOwnProperty);
const format0 = (input) => {
if (input.length > 10 + 1 + 9 + 12 + 6) return false
const full = /^\d\d\d\d-(?:0[1-9]|1[0-2])-(?:[0-2]\d|3[01])[t\s](?:2[0-3]|[0-1]\d):[0-5]\d:(?:[0-5]\d|60)(?:\.\d+)?(?:z|[+-](?:2[0-3]|[0-1]\d)(?::?[0-5]\d)?)$/i
const feb = input[5] === '0' && input[6] === '2'
if ((feb && input[8] === '3') || !full.test(input)) return false
if (input[17] === '6') {
const p = input.slice(11).match(/([0-9.]+|[^0-9.])/g)
let hm = Number(p[0]) * 60 + Number(p[2])
if (p[5] === '+') hm += 24 * 60 - Number(p[6] || 0) * 60 - Number(p[8] || 0)
else if (p[5] === '-') hm += Number(p[6] || 0) * 60 + Number(p[8] || 0)
if (hm % (24 * 60) !== 23 * 60 + 59) return false
}
if (feb) {
if (/^\d\d\d\d-02-(?:[012][1-8]|[12]0|[01]9)/.test(input)) return true
const matches = input.match(/^(\d\d\d\d)-02-29/)
if (!matches) return false
const year = matches[1] | 0
return year % 16 === 0 || (year % 4 === 0 && year % 25 !== 0)
}
if (input[8] === '3' && input[9] === '1') return /^\d\d\d\d-(?:0[13578]|1[02])-31/.test(input)
return /^\d\d\d\d-(?:0[13-9]|1[012])-(?:[012][1-9]|[123]0)/.test(input)
};
const ref1 = function validate(data) {
validate.errors = null
if (!(typeof data === "object" && data && !Array.isArray(data))) {
validate.errors = [{ keywordLocation: "#/type", instanceLocation: "#" }]
return false
}
if (!("headerId" in data && hasOwn(data, "headerId"))) {
validate.errors = [{ keywordLocation: "#/required", instanceLocation: "#/headerId" }]
return false
}
if (!("timestamp" in data && hasOwn(data, "timestamp"))) {
validate.errors = [{ keywordLocation: "#/required", instanceLocation: "#/timestamp" }]
return false
}
if (!("version" in data && hasOwn(data, "version"))) {
validate.errors = [{ keywordLocation: "#/required", instanceLocation: "#/version" }]
return false
}
if (!("manufacturer" in data && hasOwn(data, "manufacturer"))) {
validate.errors = [{ keywordLocation: "#/required", instanceLocation: "#/manufacturer" }]
return false
}
if (!("serialNumber" in data && hasOwn(data, "serialNumber"))) {
validate.errors = [{ keywordLocation: "#/required", instanceLocation: "#/serialNumber" }]
return false
}
if (!Number.isInteger(data.headerId)) {
validate.errors = [{ keywordLocation: "#/properties/headerId/type", instanceLocation: "#/headerId" }]
return false
}
if (!(typeof data.timestamp === "string")) {
validate.errors = [{ keywordLocation: "#/properties/timestamp/type", instanceLocation: "#/timestamp" }]
return false
}
if (!format0(data.timestamp)) {
validate.errors = [{ keywordLocation: "#/properties/timestamp/format", instanceLocation: "#/timestamp" }]
return false
}
if (!(typeof data.version === "string")) {
validate.errors = [{ keywordLocation: "#/properties/version/type", instanceLocation: "#/version" }]
return false
}
if (!(typeof data.manufacturer === "string")) {
validate.errors = [{ keywordLocation: "#/properties/manufacturer/type", instanceLocation: "#/manufacturer" }]
return false
}
if (!(typeof data.serialNumber === "string")) {
validate.errors = [{ keywordLocation: "#/properties/serialNumber/type", instanceLocation: "#/serialNumber" }]
return false
}
return true
};
const errorMerge = ({ keywordLocation, instanceLocation }, schemaBase, dataBase) => ({
keywordLocation: `${schemaBase}${keywordLocation.slice(1)}`,
instanceLocation: `${dataBase}${instanceLocation.slice(1)}`,
});
const ref0 = function validate(data) {
validate.errors = null
if (!(typeof data === "object" && data && !Array.isArray(data))) {
validate.errors = [{ keywordLocation: "#/type", instanceLocation: "#" }]
return false
}
const err0 = validate.errors
const res0 = ref1(data)
const suberr0 = ref1.errors
validate.errors = err0
if (!res0) {
validate.errors = [errorMerge(suberr0[0], "#/allOf/0/$ref", "#")]
return false
}
if (!("connectionState" in data && hasOwn(data, "connectionState"))) {
validate.errors = [{ keywordLocation: "#/allOf/1/required", instanceLocation: "#/connectionState" }]
return false
}
if (!(typeof data.connectionState === "string")) {
validate.errors = [{ keywordLocation: "#/allOf/1/properties/connectionState/type", instanceLocation: "#/connectionState" }]
return false
}
if (!(data.connectionState === "ONLINE" || data.connectionState === "OFFLINE" || data.connectionState === "CONNECTIONBROKEN")) {
validate.errors = [{ keywordLocation: "#/allOf/1/properties/connectionState/enum", instanceLocation: "#/connectionState" }]
return false
}
return true
};
return ref0})();
const validateHeader = (function() {
'use strict'
const hasOwn = Function.prototype.call.bind(Object.prototype.hasOwnProperty);
const format0 = (input) => {
if (input.length > 10 + 1 + 9 + 12 + 6) return false
const full = /^\d\d\d\d-(?:0[1-9]|1[0-2])-(?:[0-2]\d|3[01])[t\s](?:2[0-3]|[0-1]\d):[0-5]\d:(?:[0-5]\d|60)(?:\.\d+)?(?:z|[+-](?:2[0-3]|[0-1]\d)(?::?[0-5]\d)?)$/i
const feb = input[5] === '0' && input[6] === '2'
if ((feb && input[8] === '3') || !full.test(input)) return false
if (input[17] === '6') {
const p = input.slice(11).match(/([0-9.]+|[^0-9.])/g)
let hm = Number(p[0]) * 60 + Number(p[2])
if (p[5] === '+') hm += 24 * 60 - Number(p[6] || 0) * 60 - Number(p[8] || 0)
else if (p[5] === '-') hm += Number(p[6] || 0) * 60 + Number(p[8] || 0)
if (hm % (24 * 60) !== 23 * 60 + 59) return false
}
if (feb) {
if (/^\d\d\d\d-02-(?:[012][1-8]|[12]0|[01]9)/.test(input)) return true
const matches = input.match(/^(\d\d\d\d)-02-29/)
if (!matches) return false
const year = matches[1] | 0
return year % 16 === 0 || (year % 4 === 0 && year % 25 !== 0)
}
if (input[8] === '3' && input[9] === '1') return /^\d\d\d\d-(?:0[13578]|1[02])-31/.test(input)
return /^\d\d\d\d-(?:0[13-9]|1[012])-(?:[012][1-9]|[123]0)/.test(input)
};
const ref1 = function validate(data) {
validate.errors = null
if (!(typeof data === "object" && data && !Array.isArray(data))) {
validate.errors = [{ keywordLocation: "#/type", instanceLocation: "#" }]
return false
}
if (!("headerId" in data && hasOwn(data, "headerId"))) {
validate.errors = [{ keywordLocation: "#/required", instanceLocation: "#/headerId" }]
return false
}
if (!("timestamp" in data && hasOwn(data, "timestamp"))) {
validate.errors = [{ keywordLocation: "#/required", instanceLocation: "#/timestamp" }]
return false
}
if (!("version" in data && hasOwn(data, "version"))) {
validate.errors = [{ keywordLocation: "#/required", instanceLocation: "#/version" }]
return false
}
if (!("manufacturer" in data && hasOwn(data, "manufacturer"))) {
validate.errors = [{ keywordLocation: "#/required", instanceLocation: "#/manufacturer" }]
return false
}
if (!("serialNumber" in data && hasOwn(data, "serialNumber"))) {
validate.errors = [{ keywordLocation: "#/required", instanceLocation: "#/serialNumber" }]
return false
}
if (!Number.isInteger(data.headerId)) {
validate.errors = [{ keywordLocation: "#/properties/headerId/type", instanceLocation: "#/headerId" }]
return false
}
if (!(typeof data.timestamp === "string")) {
validate.errors = [{ keywordLocation: "#/properties/timestamp/type", instanceLocation: "#/timestamp" }]
return false
}
if (!format0(data.timestamp)) {
validate.errors = [{ keywordLocation: "#/properties/timestamp/format", instanceLocation: "#/timestamp" }]
return false
}
if (!(typeof data.version === "string")) {
validate.errors = [{ keywordLocation: "#/properties/version/type", instanceLocation: "#/version" }]
return false
}
if (!(typeof data.manufacturer === "string")) {
validate.errors = [{ keywordLocation: "#/properties/manufacturer/type", instanceLocation: "#/manufacturer" }]
return false
}
if (!(typeof data.serialNumber === "string")) {
validate.errors = [{ keywordLocation: "#/properties/serialNumber/type", instanceLocation: "#/serialNumber" }]
return false
}
return true
};
const errorMerge = ({ keywordLocation, instanceLocation }, schemaBase, dataBase) => ({
keywordLocation: `${schemaBase}${keywordLocation.slice(1)}`,
instanceLocation: `${dataBase}${instanceLocation.slice(1)}`,
});
const ref0 = function validate(data) {
validate.errors = null
const err0 = validate.errors
const res0 = ref1(data)
const suberr0 = ref1.errors
validate.errors = err0
if (!res0) {
validate.errors = [errorMerge(suberr0[0], "#/$ref", "#")]
return false
}
return true
};
return ref0})();
const validateInstantActions = (function() {
'use strict'
const hasOwn = Function.prototype.call.bind(Object.prototype.hasOwnProperty);
const format0 = (input) => {
if (input.length > 10 + 1 + 9 + 12 + 6) return false
const full = /^\d\d\d\d-(?:0[1-9]|1[0-2])-(?:[0-2]\d|3[01])[t\s](?:2[0-3]|[0-1]\d):[0-5]\d:(?:[0-5]\d|60)(?:\.\d+)?(?:z|[+-](?:2[0-3]|[0-1]\d)(?::?[0-5]\d)?)$/i
const feb = input[5] === '0' && input[6] === '2'
if ((feb && input[8] === '3') || !full.test(input)) return false
if (input[17] === '6') {
const p = input.slice(11).match(/([0-9.]+|[^0-9.])/g)
let hm = Number(p[0]) * 60 + Number(p[2])
if (p[5] === '+') hm += 24 * 60 - Number(p[6] || 0) * 60 - Number(p[8] || 0)
else if (p[5] === '-') hm += Number(p[6] || 0) * 60 + Number(p[8] || 0)
if (hm % (24 * 60) !== 23 * 60 + 59) return false
}
if (feb) {
if (/^\d\d\d\d-02-(?:[012][1-8]|[12]0|[01]9)/.test(input)) return true
const matches = input.match(/^(\d\d\d\d)-02-29/)
if (!matches) return false
const year = matches[1] | 0
return year % 16 === 0 || (year % 4 === 0 && year % 25 !== 0)
}
if (input[8] === '3' && input[9] === '1') return /^\d\d\d\d-(?:0[13578]|1[02])-31/.test(input)
return /^\d\d\d\d-(?:0[13-9]|1[012])-(?:[012][1-9]|[123]0)/.test(input)
};
const ref1 = function validate(data) {
validate.errors = null
if (!(typeof data === "object" && data && !Array.isArray(data))) {
validate.errors = [{ keywordLocation: "#/type", instanceLocation: "#" }]
return false
}
if (!("headerId" in data && hasOwn(data, "headerId"))) {
validate.errors = [{ keywordLocation: "#/required", instanceLocation: "#/headerId" }]
return false
}
if (!("timestamp" in data && hasOwn(data, "timestamp"))) {
validate.errors = [{ keywordLocation: "#/required", instanceLocation: "#/timestamp" }]
return false
}
if (!("version" in data && hasOwn(data, "version"))) {
validate.errors = [{ keywordLocation: "#/required", instanceLocation: "#/version" }]
return false
}
if (!("manufacturer" in data && hasOwn(data, "manufacturer"))) {
validate.errors = [{ keywordLocation: "#/required", instanceLocation: "#/manufacturer" }]
return false
}
if (!("serialNumber" in data && hasOwn(data, "serialNumber"))) {
validate.errors = [{ keywordLocation: "#/required", instanceLocation: "#/serialNumber" }]
return false
}
if (!Number.isInteger(data.headerId)) {
validate.errors = [{ keywordLocation: "#/properties/headerId/type", instanceLocation: "#/headerId" }]
return false
}
if (!(typeof data.timestamp === "string")) {
validate.errors = [{ keywordLocation: "#/properties/timestamp/type", instanceLocation: "#/timestamp" }]
return false
}
if (!format0(data.timestamp)) {
validate.errors = [{ keywordLocation: "#/properties/timestamp/format", instanceLocation: "#/timestamp" }]
return false
}
if (!(typeof data.version === "string")) {
validate.errors = [{ keywordLocation: "#/properties/version/type", instanceLocation: "#/version" }]
return false
}
if (!(typeof data.manufacturer === "string")) {
validate.errors = [{ keywordLocation: "#/properties/manufacturer/type", instanceLocation: "#/manufacturer" }]
return false
}
if (!(typeof data.serialNumber === "string")) {
validate.errors = [{ keywordLocation: "#/properties/serialNumber/type", instanceLocation: "#/serialNumber" }]
return false
}
return true
};
const errorMerge = ({ keywordLocation, instanceLocation }, schemaBase, dataBase) => ({
keywordLocation: `${schemaBase}${keywordLocation.slice(1)}`,
instanceLocation: `${dataBase}${instanceLocation.slice(1)}`,
});
const ref2 = function validate(data) {
validate.errors = null
if (!(typeof data === "object" && data && !Array.isArray(data))) {
validate.errors = [{ keywordLocation: "#/type", instanceLocation: "#" }]
return false
}
if (!("actionId" in data && hasOwn(data, "actionId"))) {
validate.errors = [{ keywordLocation: "#/required", instanceLocation: "#/actionId" }]
return false
}
if (!("actionType" in data && hasOwn(data, "actionType"))) {
validate.errors = [{ keywordLocation: "#/required", instanceLocation: "#/actionType" }]
return false
}
if (!("blockingType" in data && hasOwn(data, "blockingType"))) {
validate.errors = [{ keywordLocation: "#/required", instanceLocation: "#/blockingType" }]
return false
}
if (!(typeof data.actionType === "string")) {
validate.errors = [{ keywordLocation: "#/properties/actionType/type", instanceLocation: "#/actionType" }]
return false
}
if (!(typeof data.actionId === "string")) {
validate.errors = [{ keywordLocation: "#/properties/actionId/type", instanceLocation: "#/actionId" }]
return false
}
if ("actionDescription" in data && hasOwn(data, "actionDescription")) {
if (!(typeof data.actionDescription === "string")) {
validate.errors = [{ keywordLocation: "#/properties/actionDescription/type", instanceLocation: "#/actionDescription" }]
return false
}
}
if (!(typeof data.blockingType === "string")) {
validate.errors = [{ keywordLocation: "#/properties/blockingType/type", instanceLocation: "#/blockingType" }]
return false
}
if (!(data.blockingType === "NONE" || data.blockingType === "SOFT" || data.blockingType === "HARD")) {
validate.errors = [{ keywordLocation: "#/properties/blockingType/enum", instanceLocation: "#/blockingType" }]
return false
}
if ("actionParameters" in data && hasOwn(data, "actionParameters")) {
if (!Array.isArray(data.actionParameters)) {
validate.errors = [{ keywordLocation: "#/properties/actionParameters/type", instanceLocation: "#/actionParameters" }]
return false
}
for (let j = 0; j < data.actionParameters.length; j++) {
if (j in data.actionParameters && hasOwn(data.actionParameters, j)) {
if (!(typeof data.actionParameters[j] === "object" && data.actionParameters[j] && !Array.isArray(data.actionParameters[j]))) {
validate.errors = [{ keywordLocation: "#/properties/actionParameters/items/type", instanceLocation: "#/actionParameters/"+j }]
return false
}
if (!("key" in data.actionParameters[j] && hasOwn(data.actionParameters[j], "key"))) {
validate.errors = [{ keywordLocation: "#/properties/actionParameters/items/required", instanceLocation: "#/actionParameters/"+j+"/key" }]
return false
}
if (!("value" in data.actionParameters[j] && hasOwn(data.actionParameters[j], "value"))) {
validate.errors = [{ keywordLocation: "#/properties/actionParameters/items/required", instanceLocation: "#/actionParameters/"+j+"/value" }]
return false
}
if (!(typeof data.actionParameters[j].key === "string")) {
validate.errors = [{ keywordLocation: "#/properties/actionParameters/items/properties/key/type", instanceLocation: "#/actionParameters/"+j+"/key" }]
return false
}
if (!(Array.isArray(data.actionParameters[j].value) || typeof data.actionParameters[j].value === "boolean" || typeof data.actionParameters[j].value === "number" || typeof data.actionParameters[j].value === "string")) {
validate.errors = [{ keywordLocation: "#/properties/actionParameters/items/properties/value/type", instanceLocation: "#/actionParameters/"+j+"/value" }]
return false
}
}
}
}
return true
};
const ref0 = function validate(data) {
validate.errors = null
if (!(typeof data === "object" && data && !Array.isArray(data))) {
validate.errors = [{ keywordLocation: "#/type", instanceLocation: "#" }]
return false
}
const err0 = validate.errors
const res0 = ref1(data)
const suberr0 = ref1.errors
validate.errors = err0
if (!res0) {
validate.errors = [errorMerge(suberr0[0], "#/allOf/0/$ref", "#")]
return false
}
if (!("instantActions" in data && hasOwn(data, "instantActions"))) {
validate.errors = [{ keywordLocation: "#/allOf/1/required", instanceLocation: "#/instantActions" }]
return false
}
if (!Array.isArray(data.instantActions)) {
validate.errors = [{ keywordLocation: "#/allOf/1/properties/instantActions/type", instanceLocation: "#/instantActions" }]
return false
}
for (let i = 0; i < data.instantActions.length; i++) {
if (i in data.instantActions && hasOwn(data.instantActions, i)) {
const err1 = validate.errors
const res1 = ref2(data.instantActions[i])
const suberr1 = ref2.errors
validate.errors = err1
if (!res1) {
validate.errors = [errorMerge(suberr1[0], "#/allOf/1/properties/instantActions/items/$ref", "#/instantActions/"+i)]
return false
}
}
}
return true
};
return ref0})();
const validateOrder = (function() {
'use strict'
const hasOwn = Function.prototype.call.bind(Object.prototype.hasOwnProperty);
const format0 = (input) => {
if (input.length > 10 + 1 + 9 + 12 + 6) return false
const full = /^\d\d\d\d-(?:0[1-9]|1[0-2])-(?:[0-2]\d|3[01])[t\s](?:2[0-3]|[0-1]\d):[0-5]\d:(?:[0-5]\d|60)(?:\.\d+)?(?:z|[+-](?:2[0-3]|[0-1]\d)(?::?[0-5]\d)?)$/i
const feb = input[5] === '0' && input[6] === '2'
if ((feb && input[8] === '3') || !full.test(input)) return false
if (input[17] === '6') {
const p = input.slice(11).match(/([0-9.]+|[^0-9.])/g)
let hm = Number(p[0]) * 60 + Number(p[2])
if (p[5] === '+') hm += 24 * 60 - Number(p[6] || 0) * 60 - Number(p[8] || 0)
else if (p[5] === '-') hm += Number(p[6] || 0) * 60 + Number(p[8] || 0)
if (hm % (24 * 60) !== 23 * 60 + 59) return false
}
if (feb) {
if (/^\d\d\d\d-02-(?:[012][1-8]|[12]0|[01]9)/.test(input)) return true
const matches = input.match(/^(\d\d\d\d)-02-29/)
if (!matches) return false
const year = matches[1] | 0
return year % 16 === 0 || (year % 4 === 0 && year % 25 !== 0)
}
if (input[8] === '3' && input[9] === '1') return /^\d\d\d\d-(?:0[13578]|1[02])-31/.test(input)
return /^\d\d\d\d-(?:0[13-9]|1[012])-(?:[012][1-9]|[123]0)/.test(input)
};
const ref1 = function validate(data) {
validate.errors = null
if (!(typeof data === "object" && data && !Array.isArray(data))) {
validate.errors = [{ keywordLocation: "#/type", instanceLocation: "#" }]
return false
}
if (!("headerId" in data && hasOwn(data, "headerId"))) {
validate.errors = [{ keywordLocation: "#/required", instanceLocation: "#/headerId" }]
return false
}
if (!("timestamp" in data && hasOwn(data, "timestamp"))) {
validate.errors = [{ keywordLocation: "#/required", instanceLocation: "#/timestamp" }]
return false
}
if (!("version" in data && hasOwn(data, "version"))) {
validate.errors = [{ keywordLocation: "#/required", instanceLocation: "#/version" }]
return false
}
if (!("manufacturer" in data && hasOwn(data, "manufacturer"))) {
validate.errors = [{ keywordLocation: "#/required", instanceLocation: "#/manufacturer" }]
return false
}
if (!("serialNumber" in data && hasOwn(data, "serialNumber"))) {
validate.errors = [{ keywordLocation: "#/required", instanceLocation: "#/serialNumber" }]
return false
}
if (!Number.isInteger(data.headerId)) {
validate.errors = [{ keywordLocation: "#/properties/headerId/type", instanceLocation: "#/headerId" }]
return false
}
if (!(typeof data.timestamp === "string")) {
validate.errors = [{ keywordLocation: "#/properties/timestamp/type", instanceLocation: "#/timestamp" }]
return false
}
if (!format0(data.timestamp)) {
validate.errors = [{ keywordLocation: "#/properties/timestamp/format", instanceLocation: "#/timestamp" }]
return false
}
if (!(typeof data.version === "string")) {
validate.errors = [{ keywordLocation: "#/properties/version/type", instanceLocation: "#/version" }]
return false
}
if (!(typeof data.manufacturer === "string")) {
validate.errors = [{ keywordLocation: "#/properties/manufacturer/type", instanceLocation: "#/manufacturer" }]
return false
}
if (!(typeof data.serialNumber === "string")) {
validate.errors = [{ keywordLocation: "#/properties/serialNumber/type", instanceLocation: "#/serialNumber" }]
return false
}
return true
};
const errorMerge = ({ keywordLocation, instanceLocation }, schemaBase, dataBase) => ({
keywordLocation: `${schemaBase}${keywordLocation.slice(1)}`,
instanceLocation: `${dataBase}${instanceLocation.slice(1)}`,
});
const ref2 = function validate(data) {
validate.errors = null
if (!(typeof data === "object" && data && !Array.isArray(data))) {
validate.errors = [{ keywordLocation: "#/type", instanceLocation: "#" }]
return false
}
if (!("x" in data && hasOwn(data, "x"))) {
validate.errors = [{ keywordLocation: "#/required", instanceLocation: "#/x" }]
return false
}
if (!("y" in data && hasOwn(data, "y"))) {
validate.errors = [{ keywordLocation: "#/required", instanceLocation: "#/y" }]
return false
}
if (!("mapId" in data && hasOwn(data, "mapId"))) {
validate.errors = [{ keywordLocation: "#/required", instanceLocation: "#/mapId" }]
return false
}
if (!(typeof data.x === "number")) {
validate.errors = [{ keywordLocation: "#/properties/x/type", instanceLocation: "#/x" }]
return false
}
if (!(typeof data.y === "number")) {
validate.errors = [{ keywordLocation: "#/properties/y/type", instanceLocation: "#/y" }]
return false
}
if ("theta" in data && hasOwn(data, "theta")) {
if (!(typeof data.theta === "number")) {
validate.errors = [{ keywordLocation: "#/properties/theta/type", instanceLocation: "#/theta" }]
return false
}
if (!(-3.14159265359 <= data.theta)) {
validate.errors = [{ keywordLocation: "#/properties/theta/minimum", instanceLocation: "#/theta" }]
return false
}
if (!(3.14159265359 >= data.theta)) {
validate.errors = [{ keywordLocation: "#/properties/theta/maximum", instanceLocation: "#/theta" }]
return false
}
}
if ("allowedDeviationXy" in data && hasOwn(data, "allowedDeviationXy")) {
if (!(typeof data.allowedDeviationXy === "number")) {
validate.errors = [{ keywordLocation: "#/properties/allowedDeviationXy/type", instanceLocation: "#/allowedDeviationXy" }]
return false
}
if (!(0 <= data.allowedDeviationXy)) {
validate.errors = [{ keywordLocation: "#/properties/allowedDeviationXy/minimum", instanceLocation: "#/allowedDeviationXy" }]
return false
}
}
if ("allowedDeviationTheta" in data && hasOwn(data, "allowedDeviationTheta")) {
if (!(typeof data.allowedDeviationTheta === "number")) {
validate.errors = [{ keywordLocation: "#/properties/allowedDeviationTheta/type", instanceLocation: "#/allowedDeviationTheta" }]
return false
}
if (!(0 <= data.allowedDeviationTheta)) {
validate.errors = [{ keywordLocation: "#/properties/allowedDeviationTheta/minimum", instanceLocation: "#/allowedDeviationTheta" }]
return false
}
if (!(3.141592654 >= data.allowedDeviationTheta)) {
validate.errors = [{ keywordLocation: "#/properties/allowedDeviationTheta/maximum", instanceLocation: "#/allowedDeviationTheta" }]
return false
}
}
if (!(typeof data.mapId === "string")) {
validate.errors = [{ keywordLocation: "#/properties/mapId/type", instanceLocation: "#/mapId" }]
return false
}
if ("mapDescription" in data && hasOwn(data, "mapDescription")) {
if (!(typeof data.mapDescription === "string")) {
validate.errors = [{ keywordLocation: "#/properties/mapDescription/type", instanceLocation: "#/mapDescription" }]
return false
}
}
return true
};
const ref3 = function validate(data) {
validate.errors = null
if (!(typeof data === "object" && data && !Array.isArray(data))) {
validate.errors = [{ keywordLocation: "#/type", instanceLocation: "#" }]
return false
}
if (!("actionId" in data && hasOwn(data, "actionId"))) {
validate.errors = [{ keywordLocation: "#/required", instanceLocation: "#/actionId" }]
return false
}
if (!("actionType" in data && hasOwn(data, "actionType"))) {
validate.errors = [{ keywordLocation: "#/required", instanceLocation: "#/actionType" }]
return false
}
if (!("blockingType" in data && hasOwn(data, "blockingType"))) {
validate.errors = [{ keywordLocation: "#/required", instanceLocation: "#/blockingType" }]
return false
}
if (!(typeof data.actionType === "string")) {
validate.errors = [{ keywordLocation: "#/properties/actionType/type", instanceLocation: "#/actionType" }]
return false
}
if (!(typeof data.actionId === "string")) {
validate.errors = [{ keywordLocation: "#/properties/actionId/type", instanceLocation: "#/actionId" }]
return false
}
if ("actionDescription" in data && hasOwn(data, "actionDescription")) {
if (!(typeof data.actionDescription === "string")) {
validate.errors = [{ keywordLocation: "#/properties/actionDescription/type", instanceLocation: "#/actionDescription" }]
return false
}
}
if (!(typeof data.blockingType === "string")) {
validate.errors = [{ keywordLocation: "#/properties/blockingType/type", instanceLocation: "#/blockingType" }]
return false
}
if (!(data.blockingType === "NONE" || data.blockingType === "SOFT" || data.blockingType === "HARD")) {
validate.errors = [{ keywordLocation: "#/properties/blockingType/enum", instanceLocation: "#/blockingType" }]
return false
}
if ("actionParameters" in data && hasOwn(data, "actionParameters")) {
if (!Array.isArray(data.actionParameters)) {
validate.errors = [{ keywordLocation: "#/properties/actionParameters/type", instanceLocation: "#/actionParameters" }]
return false
}
for (let k = 0; k < data.actionParameters.length; k++) {
if (k in data.actionParameters && hasOwn(data.actionParameters, k)) {
if (!(typeof data.actionParameters[k] === "object" && data.actionParameters[k] && !Array.isArray(data.actionParameters[k]))) {
validate.errors = [{ keywordLocation: "#/properties/actionParameters/items/type", instanceLocation: "#/actionParameters/"+k }]
return false
}
if (!("key" in data.actionParameters[k] && hasOwn(data.actionParameters[k], "key"))) {
validate.errors = [{ keywordLocation: "#/properties/actionParameters/items/required", instanceLocation: "#/actionParameters/"+k+"/key" }]
return false
}
if (!("value" in data.actionParameters[k] && hasOwn(data.actionParameters[k], "value"))) {
validate.errors = [{ keywordLocation: "#/properties/actionParameters/items/required", instanceLocation: "#/actionParameters/"+k+"/value" }]
return false
}
if (!(typeof data.actionParameters[k].key === "string")) {
validate.errors = [{ keywordLocation: "#/properties/actionParameters/items/properties/key/type", instanceLocation: "#/actionParameters/"+k+"/key" }]
return false
}
if (!(Array.isArray(data.actionParameters[k].value) || typeof data.actionParameters[k].value === "boolean" || typeof data.actionParameters[k].value === "number" || typeof data.actionParameters[k].value === "string")) {
validate.errors = [{ keywordLocation: "#/properties/actionParameters/items/properties/value/type", instanceLocation: "#/actionParameters/"+k+"/value" }]
return false
}
}
}
}
return true
};
const ref4 = function validate(data) {
validate.errors = null
if (!(typeof data === "object" && data && !Array.isArray(data))) {
validate.errors = [{ keywordLocation: "#/type", instanceLocation: "#" }]
return false
}
if (!("degree" in data && hasOwn(data, "degree"))) {
validate.errors = [{ keywordLocation: "#/required", instanceLocation: "#/degree" }]
return false
}
if (!("knotVector" in data && hasOwn(data, "knotVector"))) {
validate.errors = [{ keywordLocation: "#/required", instanceLocation: "#/knotVector" }]
return false
}
if (!("controlPoints" in data && hasOwn(data, "controlPoints"))) {
validate.errors = [{ keywordLocation: "#/required", instanceLocation: "#/controlPoints" }]
return false
}
if (!Number.isInteger(data.degree)) {
validate.errors = [{ keywordLocation: "#/properties/degree/type", instanceLocation: "#/degree" }]
return false
}
if (!Array.isArray(data.knotVector)) {
validate.errors = [{ keywordLocation: "#/properties/knotVector/type", instanceLocation: "#/knotVector" }]
return false
}
for (let m = 0; m < data.knotVector.length; m++) {
if (m in data.knotVector && hasOwn(data.knotVector, m)) {
if (!(typeof data.knotVector[m] === "number")) {
validate.errors = [{ keywordLocation: "#/properties/knotVector/items/type", instanceLocation: "#/knotVector/"+m }]
return false
}
if (!(0 <= data.knotVector[m])) {
validate.errors = [{ keywordLocation: "#/properties/knotVector/items/minimum", instanceLocation: "#/knotVector/"+m }]
return false
}
if (!(1 >= data.knotVector[m])) {
validate.errors = [{ keywordLocation: "#/properties/knotVector/items/maximum", instanceLocation: "#/knotVector/"+m }]
return false
}
}
}
if (!Array.isArray(data.controlPoints)) {
validate.errors = [{ keywordLocation: "#/properties/controlPoints/type", instanceLocation: "#/controlPoints" }]
return false
}
for (let n = 0; n < data.controlPoints.length; n++) {
if (n in data.controlPoints && hasOwn(data.controlPoints, n)) {
if (!(typeof data.controlPoints[n] === "object" && data.controlPoints[n] && !Array.isArray(data.controlPoints[n]))) {
validate.errors = [{ keywordLocation: "#/properties/controlPoints/items/type", instanceLocation: "#/controlPoints/"+n }]
return false
}
if (!("x" in data.controlPoints[n] && hasOwn(data.controlPoints[n], "x"))) {
validate.errors = [{ keywordLocation: "#/properties/controlPoints/items/required", instanceLocation: "#/controlPoints/"+n+"/x" }]
return false
}
if (!("y" in data.controlPoints[n] && hasOwn(data.controlPoints[n], "y"))) {
validate.errors = [{ keywordLocation: "#/properties/controlPoints/items/required", instanceLocation: "#/controlPoints/"+n+"/y" }]
return false
}
if (!("weight" in data.controlPoints[n] && hasOwn(data.controlPoints[n], "weight"))) {
validate.errors = [{ keywordLocation: "#/properties/controlPoints/items/required", instanceLocation: "#/controlPoints/"+n+"/weight" }]
return false
}
if (!(typeof data.controlPoints[n].x === "number")) {
validate.errors = [{ keywordLocation: "#/properties/controlPoints/items/properties/x/type", instanceLocation: "#/controlPoints/"+n+"/x" }]
return false
}
if (!(typeof data.controlPoints[n].y === "number")) {
validate.errors = [{ keywordLocation: "#/properties/controlPoints/items/properties/y/type", instanceLocation: "#/controlPoints/"+n+"/y" }]
return false
}
if (!(typeof data.controlPoints[n].weight === "number")) {
validate.errors = [{ keywordLocation: "#/properties/controlPoints/items/properties/weight/type", instanceLocation: "#/controlPoints/"+n+"/weight" }]
return false
}
if ("orientation" in data.controlPoints[n] && hasOwn(data.controlPoints[n], "orientation")) {
if (!(typeof data.controlPoints[n].orientation === "number")) {
validate.errors = [{ keywordLocation: "#/properties/controlPoints/items/properties/orientation/type", instanceLocation: "#/controlPoints/"+n+"/orientation" }]
return false
}
if (!(-3.14159265359 <= data.controlPoints[n].orientation)) {
validate.errors = [{ keywordLocation: "#/properties/controlPoints/items/properties/orientation/minimum", instanceLocation: "#/controlPoints/"+n+"/orientation" }]
return false
}
if (!(3.14159265359 >= data.controlPoints[n].orientation)) {
validate.errors = [{ keywordLocation: "#/properties/controlPoints/items/properties/orientation/maximum", instanceLocation: "#/controlPoints/"+n+"/orientation" }]
return false
}
}
}
}
return true
};
const ref0 = function validate(data) {
validate.errors = null
if (!(typeof data === "object" && data && !Array.isArray(data))) {
validate.errors = [{ keywordLocation: "#/type", instanceLocation: "#" }]
return false
}
const err0 = validate.errors
const res0 = ref1(data)
const suberr0 = ref1.errors
validate.errors = err0
if (!res0) {
validate.errors = [errorMerge(suberr0[0], "#/allOf/0/$ref", "#")]
return false
}
if (!("orderId" in data && hasOwn(data, "orderId"))) {
validate.errors = [{ keywordLocation: "#/allOf/1/required", instanceLocation: "#/orderId" }]
return false
}
if (!("orderUpdateId" in data && hasOwn(data, "orderUpdateId"))) {
validate.errors = [{ keywordLocation: "#/allOf/1/required", instanceLocation: "#/orderUpdateId" }]
return false
}
if (!("nodes" in data && hasOwn(data, "nodes"))) {
validate.errors = [{ keywordLocation: "#/allOf/1/required", instanceLocation: "#/nodes" }]
return false
}
if (!("edges" in data && hasOwn(data, "edges"))) {
validate.errors = [{ keywordLocation: "#/allOf/1/required", instanceLocation: "#/edges" }]
return false
}
if (!(typeof data.orderId === "string")) {
validate.errors = [{ keywordLocation: "#/allOf/1/properties/orderId/type", instanceLocation: "#/orderId" }]
return false
}
if (!Number.isInteger(data.orderUpdateId)) {
validate.errors = [{ keywordLocation: "#/allOf/1/properties/orderUpdateId/type", instanceLocation: "#/orderUpdateId" }]
return false
}
if (!(0 <= data.orderUpdateId)) {
validate.errors = [{ keywordLocation: "#/allOf/1/properties/orderUpdateId/minimum", instanceLocation: "#/orderUpdateId" }]
return false
}
if (!(4294967296 >= data.orderUpdateId)) {
validate.errors = [{ keywordLocation: "#/allOf/1/properties/orderUpdateId/maximum", instanceLocation: "#/orderUpdateId" }]
return false
}
if ("zoneSetId" in data && hasOwn(data, "zoneSetId")) {
if (!(typeof data.zoneSetId === "string")) {
validate.errors = [{ keywordLocation: "#/allOf/1/properties/zoneSetId/type", instanceLocation: "#/zoneSetId" }]
return false
}
}
if (!Array.isArray(data.nodes)) {
validate.errors = [{ keywordLocation: "#/allOf/1/properties/nodes/type", instanceLocation: "#/nodes" }]
return false
}
if (data.nodes.length < 1) {
validate.errors = [{ keywordLocation: "#/allOf/1/properties/nodes/minItems", instanceLocation: "#/nodes" }]
return false
}
for (let i = 0; i < data.nodes.length; i++) {
if (i in data.nodes && hasOwn(data.nodes, i)) {
if (!(typeof data.nodes[i] === "object" && data.nodes[i] && !Array.isArray(data.nodes[i]))) {
validate.errors = [{ keywordLocation: "#/allOf/1/properties/nodes/items/type", instanceLocation: "#/nodes/"+i }]
return false
}
if (!("nodeId" in data.nodes[i] && hasOwn(data.nodes[i], "nodeId"))) {
validate.errors = [{ keywordLocation: "#/allOf/1/properties/nodes/items/required", instanceLocation: "#/nodes/"+i+"/nodeId" }]
return false
}
if (!("sequenceId" in data.nodes[i] && hasOwn(data.nodes[i], "sequenceId"))) {
validate.errors = [{ keywordLocation: "#/allOf/1/properties/nodes/items/required", instanceLocation: "#/nodes/"+i+"/sequenceId" }]
return false
}
if (!("released" in data.nodes[i] && hasOwn(data.nodes[i], "released"))) {
validate.errors = [{ keywordLocation: "#/allOf/1/properties/nodes/items/required", instanceLocation: "#/nodes/"+i+"/released" }]
return false
}
if (!("actions" in data.nodes[i] && hasOwn(data.nodes[i], "actions"))) {
validate.errors = [{ keywordLocation: "#/allOf/1/properties/nodes/items/required", instanceLocation: "#/nodes/"+i+"/actions" }]
return false
}
if (!(typeof data.nodes[i].nodeId === "string")) {
validate.errors = [{ keywordLocation: "#/allOf/1/properties/nodes/items/properties/nodeId/type", instanceLocation: "#/nodes/"+i+"/nodeId" }]
return false
}
if (!(Number.isInteger(data.nodes[i].sequenceId))) {
validate.errors = [{ keywordLocation: "#/allOf/1/properties/nodes/items/properties/sequenceId/type", instanceLocation: "#/nodes/"+i+"/sequenceId" }]
return false
}
if (!(0 <= data.nodes[i].sequenceId)) {
validate.errors = [{ keywordLocation: "#/allOf/1/properties/nodes/items/properties/sequenceId/minimum", instanceLocation: "#/nodes/"+i+"/sequenceId" }]
return false
}
if (!(4294967296 >= data.nodes[i].sequenceId)) {
validate.errors = [{ keywordLocation: "#/allOf/1/properties/nodes/items/properties/sequenceId/maximum", instanceLocation: "#/nodes/"+i+"/sequenceId" }]
return false
}
if ("nodeDescription" in data.nodes[i] && hasOwn(data.nodes[i], "nodeDescription")) {
if (!(typeof data.nodes[i].nodeDescription === "string")) {
validate.errors = [{ keywordLocation: "#/allOf/1/properties/nodes/items/properties/nodeDescription/type", instanceLocation: "#/nodes/"+i+"/nodeDescription" }]
return false
}
}
if (!(typeof data.nodes[i].released === "boolean")) {
validate.errors = [{ keywordLocation: "#/allOf/1/properties/nodes/items/properties/released/type", instanceLocation: "#/nodes/"+i+"/released" }]
return false
}
if ("nodePosition" in data.nodes[i] && hasOwn(data.nodes[i], "nodePosition")) {
const err1 = validate.errors
const res1 = ref2(data.nodes[i].nodePosition)
const suberr1 = ref2.errors
validate.errors = err1
if (!res1) {
validate.errors = [errorMerge(suberr1[0], "#/allOf/1/properties/nodes/items/properties/nodePosition/$ref", "#/nodes/"+i+"/nodePosition")]
return false
}
}
if (!(Array.isArray(data.nodes[i].actions))) {
validate.errors = [{ keywordLocation: "#/allOf/1/properties/nodes/items/properties/actions/type", instanceLocation: "#/nodes/"+i+"/actions" }]
return false
}
for (let j = 0; j < data.nodes[i].actions.length; j++) {
if (j in data.nodes[i].actions && hasOwn(data.nodes[i].actions, j)) {
const err2 = validate.errors
const res2 = ref3(data.nodes[i].actions[j])
const suberr2 = ref3.errors
validate.errors = err2
if (!res2) {
validate.errors = [errorMerge(suberr2[0], "#/allOf/1/properties/nodes/items/properties/actions/items/$ref", "#/nodes/"+i+"actions/"+j)]
return false
}
}
}
}
}
if (!Array.isArray(data.edges)) {
validate.errors = [{ keywordLocation: "#/allOf/1/properties/edges/type", instanceLocation: "#/edges" }]
return false
}
for (let l = 0; l < data.edges.length; l++) {
if (l in data.edges && hasOwn(data.edges, l)) {
if (!(typeof data.edges[l] === "object" && data.edges[l] && !Array.isArray(data.edges[l]))) {
validate.errors = [{ keywordLocation: "#/allOf/1/properties/edges/items/type", instanceLocation: "#/edges/"+l }]
return false
}
if (!("edgeId" in data.edges[l] && hasOwn(data.edges[l], "edgeId"))) {
validate.errors = [{ keywordLocation: "#/allOf/1/properties/edges/items/required", instanceLocation: "#/edges/"+l+"/edgeId" }]
return false
}
if (!("sequenceId" in data.edges[l] && hasOwn(data.edges[l], "sequenceId"))) {
validate.errors = [{ keywordLocation: "#/allOf/1/properties/edges/items/required", instanceLocation: "#/edges/"+l+"/sequenceId" }]
return false
}
if (!("released" in data.edges[l] && hasOwn(data.edges[l], "released"))) {
validate.errors = [{ keywordLocation: "#/allOf/1/properties/edges/items/required", instanceLocation: "#/edges/"+l+"/released" }]
return false
}
if (!("startNodeId" in data.edges[l] && hasOwn(data.edges[l], "startNodeId"))) {
validate.errors = [{ keywordLocation: "#/allOf/1/properties/edges/items/required", instanceLocation: "#/edges/"+l+"/startNodeId" }]
return false
}
if (!("endNodeId" in data.edges[l] && hasOwn(data.edges[l], "endNodeId"))) {
validate.errors = [{ keywordLocation: "#/allOf/1/properties/edges/items/required", instanceLocation: "#/edges/"+l+"/endNodeId" }]
return false
}
if (!("actions" in data.edges[l] && hasOwn(data.edges[l], "actions"))) {
validate.errors = [{ keywordLocation: "#/allOf/1/properties/edges/items/required", instanceLocation: "#/edges/"+l+"/actions" }]
return false
}
if (!(typeof data.edges[l].edgeId === "string")) {
validate.errors = [{ keywordLocation: "#/allOf/1/properties/edges/items/properties/edgeId/type", instanceLocation: "#/edges/"+l+"/edgeId" }]
return false
}
if (!(Number.isInteger(data.edges[l].sequenceId))) {
validate.errors = [{ keywordLocation: "#/allOf/1/properties/edges/items/properties/sequenceId/type", instanceLocation: "#/edges/"+l+"/sequenceId" }]
return false
}
if (!(0 <= data.edges[l].sequenceId)) {
validate.errors = [{ keywordLocation: "#/allOf/1/properties/edges/items/properties/sequenceId/minimum", instanceLocation: "#/edges/"+l+"/sequenceId" }]
return false
}
if (!(4294967296 >= data.edges[l].sequenceId)) {
validate.errors = [{ keywordLocation: "#/allOf/1/properties/edges/items/properties/sequenceId/maximum", instanceLocation: "#/edges/"+l+"/sequenceId" }]
return false
}
if ("edgeDescription" in data.edges[l] && hasOwn(data.edges[l], "edgeDescription")) {
if (!(typeof data.edges[l].edgeDescription === "string")) {
validate.errors = [{ keywordLocation: "#/allOf/1/properties/edges/items/properties/edgeDescription/type", instanceLocation: "#/edges/"+l+"/edgeDescription" }]
return false
}
}
if (!(typeof data.edges[l].released === "boolean")) {
validate.errors = [{ keywordLocation: "#/allOf/1/properties/edges/items/properties/released/type", instanceLocation: "#/edges/"+l+"/released" }]
return false
}
if (!(typeof data.edges[l].startNodeId === "string")) {
validate.errors = [{ keywordLocation: "#/allOf/1/properties/edges/items/properties/startNodeId/type", instanceLocation: "#/edges/"+l+"/startNodeId" }]
return false
}
if (!(typeof data.edges[l].endNodeId === "string")) {
validate.errors = [{ keywordLocation: "#/allOf/1/properties/edges/items/properties/endNodeId/type", instanceLocation: "#/edges/"+l+"/endNodeId" }]
return false
}
if ("maxSpeed" in data.edges[l] && hasOwn(data.edges[l], "maxSpeed")) {
if (!(typeof data.edges[l].maxSpeed === "number")) {
validate.errors = [{ keywordLocation: "#/allOf/1/properties/edges/items/properties/maxSpeed/type", instanceLocation: "#/edges/"+l+"/maxSpeed" }]
return false
}
}
if ("maxHeight" in data.edges[l] && hasOwn(data.edges[l], "maxHeight")) {
if (!(typeof data.edges[l].maxHeight === "number")) {
validate.errors = [{ keywordLocation: "#/allOf/1/properties/edges/items/properties/maxHeight/type", instanceLocation: "#/edges/"+l+"/maxHeight" }]
return false
}
}
if ("minHeight" in data.edges[l] && hasOwn(data.edges[l], "minHeight")) {
if (!(typeof data.edges[l].minHeight === "number")) {
validate.errors = [{ keywordLocation: "#/allOf/1/properties/edges/items/properties/minHeight/type", instanceLocation: "#/edges/"+l+"/minHeight" }]
return false
}
}
if ("orientation" in data.edges[l] && hasOwn(data.edges[l], "orientation")) {
if (!(typeof data.edges[l].orientation === "number")) {
validate.errors = [{ keywordLocation: "#/allOf/1/properties/edges/items/properties/orientation/type", instanceLocation: "#/edges/"+l+"/orientation" }]
return false
}
if (!(-3.14159265359 <= data.edges[l].orientation)) {
validate.errors = [{ keywordLocation: "#/allOf/1/properties/edges/items/properties/orientation/minimum", instanceLocation: "#/edges/"+l+"/orientation" }]
return false
}
if (!(3.14159265359 >= data.edges[l].orientation)) {
validate.errors = [{ keywordLocation: "#/allOf/1/properties/edges/items/properties/orientation/maximum", instanceLocation: "#/edges/"+l+"/orientation" }]
return false
}
}
if ("direction" in data.edges[l] && hasOwn(data.edges[l], "direction")) {
if (!(typeof data.edges[l].direction === "string")) {
validate.errors = [{ keywordLocation: "#/allOf/1/properties/edges/items/properties/direction/type", instanceLocation: "#/edges/"+l+"/direction" }]
return false
}
}
if ("rotationAllowed" in data.edges[l] && hasOwn(data.edges[l], "rotationAllowed")) {
if (!(typeof data.edges[l].rotationAllowed === "boolean")) {
validate.errors = [{ keywordLocation: "#/allOf/1/properties/edges/items/properties/rotationAllowed/type", instanceLocation: "#/edges/"+l+"/rotationAllowed" }]
return false
}
}
if ("maxRotationSpeed" in data.edges[l] && hasOwn(data.edges[l], "maxRotationSpeed")) {
if (!(typeof data.edges[l].maxRotationSpeed === "number")) {
validate.errors = [{ keywordLocation: "#/allOf/1/properties/edges/items/properties/maxRotationSpeed/type", instanceLocation: "#/edges/"+l+"/maxRotationSpeed" }]
return false
}
}
if ("distance" in data.edges[l] && hasOwn(data.edges[l], "distance")) {
if (!(typeof data.edges[l].distance === "number")) {
validate.errors = [{ keywordLocation: "#/allOf/1/properties/edges/items/properties/distance/type", instanceLocation: "#/edges/"+l+"/distance" }]
return false
}
}
if ("trajectory" in data.edges[l] && hasOwn(data.edges[l], "trajectory")) {
const err3 = validate.errors
const res3 = ref4(data.edges[l].trajectory)
const suberr3 = ref4.errors
validate.errors = err3
if (!res3) {
validate.errors = [errorMerge(suberr3[0], "#/allOf/1/properties/edges/items/properties/trajectory/$ref", "#/edges/"+l+"/trajectory")]
return false
}
}
if (!(Array.isArray(data.edges[l].actions))) {
validate.errors = [{ keywordLocation: "#/allOf/1/properties/edges/items/properties/actions/type", instanceLocation: "#/edges/"+l+"/actions" }]
return false
}
for (let o = 0; o < data.edges[l].actions.length; o++) {
if (o in data.edges[l].actions && hasOwn(data.edges[l].actions, o)) {
const err4 = validate.errors
const res4 = ref3(data.edges[l].actions[o])
const suberr4 = ref3.errors
validate.errors = err4
if (!res4) {
validate.errors = [errorMerge(suberr4[0], "#/allOf/1/properties/edges/items/properties/actions/items/$ref", "#/edges/"+l+"actions/"+o)]
return false
}
}
}
}
}
return true
};
return ref0})();
const validateState = (function() {
'use strict'
const hasOwn = Function.prototype.call.bind(Object.prototype.hasOwnProperty);
const format0 = (input) => {
if (input.length > 10 + 1 + 9 + 12 + 6) return false
const full = /^\d\d\d\d-(?:0[1-9]|1[0-2])-(?:[0-2]\d|3[01])[t\s](?:2[0-3]|[0-1]\d):[0-5]\d:(?:[0-5]\d|60)(?:\.\d+)?(?:z|[+-](?:2[0-3]|[0-1]\d)(?::?[0-5]\d)?)$/i
const feb = input[5] === '0' && input[6] === '2'
if ((feb && input[8] === '3') || !full.test(input)) return false
if (input[17] === '6') {
const p = input.slice(11).match(/([0-9.]+|[^0-9.])/g)
let hm = Number(p[0]) * 60 + Number(p[2])
if (p[5] === '+') hm += 24 * 60 - Number(p[6] || 0) * 60 - Number(p[8] || 0)
else if (p[5] === '-') hm += Number(p[6] || 0) * 60 + Number(p[8] || 0)
if (hm % (24 * 60) !== 23 * 60 + 59) return false
}
if (feb) {
if (/^\d\d\d\d-02-(?:[012][1-8]|[12]0|[01]9)/.test(input)) return true
const matches = input.match(/^(\d\d\d\d)-02-29/)
if (!matches) return false
const year = matches[1] | 0
return year % 16 === 0 || (year % 4 === 0 && year % 25 !== 0