@kohost/api-client 4.0.8 → 4.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunk-36WNTEIW.js +1 -1
- package/dist/chunk-EBJTC6MA.js +1 -1
- package/dist/chunk-HKJ2B2AA.js +1 -1
- package/dist/chunk-IJQVACF3.js +1 -0
- package/dist/{chunk-3ZUKHDXQ.js.map → chunk-IJQVACF3.js.map} +1 -1
- package/dist/chunk-KNSZIQXT.js +1 -1
- package/dist/chunk-W2G36LNI.js +1 -1
- package/dist/chunk-XZITDYVM.js +1 -0
- package/dist/chunk-XZITDYVM.js.map +1 -0
- package/dist/client.cjs +1 -1
- package/dist/client.js +1 -1
- package/dist/commands.cjs +1 -1
- package/dist/commands.cjs.map +1 -1
- package/dist/commands.js +1 -1
- package/dist/defs.cjs +1 -1
- package/dist/defs.js +1 -1
- package/dist/errors.cjs +1 -1
- package/dist/errors.cjs.map +1 -1
- package/dist/errors.js +1 -1
- package/dist/events.cjs +1 -1
- package/dist/events.cjs.map +1 -1
- package/dist/events.js +1 -1
- package/dist/index.cjs +1185 -1060
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +138 -123
- package/dist/index.d.ts +138 -123
- package/dist/index.js +1185 -1060
- package/dist/index.js.map +1 -1
- package/dist/models.cjs +1 -1
- package/dist/models.cjs.map +1 -1
- package/dist/models.d.cts +3 -3
- package/dist/models.d.ts +3 -3
- package/dist/models.js +1 -1
- package/dist/socketIoClient.cjs +1 -1
- package/dist/socketIoClient.js +1 -1
- package/dist/useCases.cjs +1 -1
- package/dist/useCases.cjs.map +1 -1
- package/dist/useCases.js +1 -1
- package/dist/utils.cjs +1 -1
- package/dist/utils.cjs.map +1 -1
- package/dist/utils.d.cts +1 -1
- package/dist/utils.d.ts +1 -1
- package/dist/utils.js +1 -1
- package/dist/{windowCovering-dE1qeU57.d.cts → windowCovering-CXcSOjuy.d.cts} +137 -122
- package/dist/{windowCovering-dE1qeU57.d.ts → windowCovering-CXcSOjuy.d.ts} +137 -122
- package/package.json +1 -1
- package/dist/chunk-36O34ETI.js +0 -1
- package/dist/chunk-36O34ETI.js.map +0 -1
- package/dist/chunk-3ZUKHDXQ.js +0 -1
package/dist/models.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var e,t=Object.defineProperty,s=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,a=Object.prototype.hasOwnProperty,__commonJS=(e,t)=>function __require(){return t||(0,e[i(e)[0]])((t={exports:{}}).exports,t),t.exports},r=__commonJS({"node_modules/fast-deep-equal/index.js"(e,t){"use strict";t.exports=function equal(e,t){if(e===t)return!0;if(e&&t&&"object"==typeof e&&"object"==typeof t){if(e.constructor!==t.constructor)return!1;var s,i,a;if(Array.isArray(e)){if((s=e.length)!=t.length)return!1;for(i=s;0!=i--;)if(!equal(e[i],t[i]))return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();if((s=(a=Object.keys(e)).length)!==Object.keys(t).length)return!1;for(i=s;0!=i--;)if(!Object.prototype.hasOwnProperty.call(t,a[i]))return!1;for(i=s;0!=i--;){var r=a[i];if(!equal(e[r],t[r]))return!1}return!0}return e!=e&&t!=t}}}),n=__commonJS({"node_modules/ajv/dist/runtime/equal.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=r();t.code='require("ajv/dist/runtime/equal").default',e.default=t}}),o=__commonJS({"node_modules/ajv/dist/runtime/ucs2length.js"(e){"use strict";function ucs2length(e){const t=e.length;let s,i=0,a=0;for(;a<t;)i++,s=e.charCodeAt(a++),s>=55296&&s<=56319&&a<t&&(s=e.charCodeAt(a),56320==(64512&s)&&a++);return i}Object.defineProperty(e,"__esModule",{value:!0}),e.default=ucs2length,ucs2length.code='require("ajv/dist/runtime/ucs2length").default'}}),p=__commonJS({"node_modules/ajv-formats/dist/formats.js"(e){"use strict";function fmtDef(e,t){return{validate:e,compare:t}}Object.defineProperty(e,"__esModule",{value:!0}),e.formatNames=e.fastFormats=e.fullFormats=void 0,e.fullFormats={date:fmtDef(date,compareDate),time:fmtDef(getTime(!0),compareTime),"date-time":fmtDef(getDateTime(!0),compareDateTime),"iso-time":fmtDef(getTime(),compareIsoTime),"iso-date-time":fmtDef(getDateTime(),compareIsoDateTime),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:function uri(e){return r.test(e)&&n.test(e)},"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:function regex(e){if(p.test(e))return!1;try{return new RegExp(e),!0}catch(e){return!1}},uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:function byte(e){return o.lastIndex=0,o.test(e)},int32:{type:"number",validate:function validateInt32(e){return Number.isInteger(e)&&e<=2147483647&&e>=-2147483648}},int64:{type:"number",validate:function validateInt64(e){return Number.isInteger(e)}},float:{type:"number",validate:validateNumber},double:{type:"number",validate:validateNumber},password:!0,binary:!0},e.fastFormats={...e.fullFormats,date:fmtDef(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,compareDate),time:fmtDef(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,compareTime),"date-time":fmtDef(/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,compareDateTime),"iso-time":fmtDef(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,compareIsoTime),"iso-date-time":fmtDef(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,compareIsoDateTime),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i},e.formatNames=Object.keys(e.fullFormats);var t=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,s=[0,31,28,31,30,31,30,31,31,30,31,30,31];function date(e){const i=t.exec(e);if(!i)return!1;const a=+i[1],r=+i[2],n=+i[3];return r>=1&&r<=12&&n>=1&&n<=(2===r&&function isLeapYear(e){return e%4==0&&(e%100!=0||e%400==0)}(a)?29:s[r])}function compareDate(e,t){if(e&&t)return e>t?1:e<t?-1:0}var i=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function getTime(e){return function time(t){const s=i.exec(t);if(!s)return!1;const a=+s[1],r=+s[2],n=+s[3],o=s[4],p="-"===s[5]?-1:1,m=+(s[6]||0),d=+(s[7]||0);if(m>23||d>59||e&&!o)return!1;if(a<=23&&r<=59&&n<60)return!0;const u=r-d*p,l=a-m*p-(u<0?1:0);return(23===l||-1===l)&&(59===u||-1===u)&&n<61}}function compareTime(e,t){if(!e||!t)return;const s=new Date("2020-01-01T"+e).valueOf(),i=new Date("2020-01-01T"+t).valueOf();return s&&i?s-i:void 0}function compareIsoTime(e,t){if(!e||!t)return;const s=i.exec(e),a=i.exec(t);return s&&a?(e=s[1]+s[2]+s[3])>(t=a[1]+a[2]+a[3])?1:e<t?-1:0:void 0}var a=/t|\s/i;function getDateTime(e){const t=getTime(e);return function date_time(e){const s=e.split(a);return 2===s.length&&date(s[0])&&t(s[1])}}function compareDateTime(e,t){if(!e||!t)return;const s=new Date(e).valueOf(),i=new Date(t).valueOf();return s&&i?s-i:void 0}function compareIsoDateTime(e,t){if(!e||!t)return;const[s,i]=e.split(a),[r,n]=t.split(a),o=compareDate(s,r);return void 0!==o?o||compareTime(i,n):void 0}var r=/\/|:/,n=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;var o=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function validateNumber(){return!0}var p=/[^\\]\\Z/}}),m={};((e,s)=>{for(var i in s)t(e,i,{get:s[i],enumerable:!0})})(m,{Alarm:()=>Pt,Announcement:()=>bt,Camera:()=>vt,Category:()=>wt,Courtesy:()=>kt,Credential:()=>jt,DeviceRouter:()=>At,Dimmer:()=>qt,DiscoveredDevice:()=>Nt,EmailMessage:()=>It,EnergyReport:()=>Dt,EnergyReportShard:()=>$t,Entity:()=>l,Gateway:()=>Ct,Identification:()=>St,Issue:()=>Ot,Lock:()=>Ft,Log:()=>Tt,MediaFile:()=>xt,MediaSource:()=>Mt,MotionSensor:()=>zt,Order:()=>Rt,Organization:()=>Vt,Payment:()=>Bt,Policy:()=>Lt,Product:()=>Et,Property:()=>Ut,Reservation:()=>Kt,Room:()=>Ht,Scene:()=>_t,ShortLink:()=>Wt,SmsMessage:()=>Zt,Space:()=>Gt,Switch:()=>Yt,SystemUser:()=>Xt,Thermostat:()=>Qt,Ticket:()=>Jt,TimeSheet:()=>es,User:()=>ts,Vendor:()=>ss,WindowCovering:()=>is}),module.exports=(e=m,((e,r,n,o)=>{if(r&&"object"==typeof r||"function"==typeof r)for(let p of i(r))a.call(e,p)||p===n||t(e,p,{get:()=>r[p],enumerable:!(o=s(r,p))||o.enumerable});return e})(t({},"__esModule",{value:!0}),e));var d=class _AppError extends Error{constructor(e="Internal Server Error",t){super(e,t),this.type=this.constructor.name,this.statusCode=500,this.name="AppError",Object.setPrototypeOf(this,_AppError.prototype)}},u=class _ValidationError extends d{constructor(e="Validation Error",t={}){super(e,t),this.statusCode=400,this.name="ValidationError",Object.setPrototypeOf(this,_ValidationError.prototype)}},l=class{constructor(e){if(!this.schema)throw new Error("Schema is not defined");if(!this.validator)throw new Error("Validator is not defined");this.#e(e)}get schemaProperties(){return Object.keys(this.validator.schema.properties)}#e(e){if(!this.validator(e))throw new u(`Invalid ${this.constructor.name}`,{cause:this.validator.errors})}},c=validate10,y={$schema:"http://json-schema.org/draft-07/schema",$id:"alarm.json",title:"Alarm",description:"Any smart alarm system",type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},name:{type:"string",description:"Name of the alarm"},offline:{type:"boolean"},type:{type:"string",enum:["alarm"],default:"alarm"},systemId:{$ref:"definitions.json#/definitions/systemId"},supportedNotifications:{$ref:"definitions.json#/definitions/supportedNotifications"},notification:{$ref:"definitions.json#/definitions/notification"},driver:{$ref:"definitions.json#/definitions/driver"},areas:{type:"array",items:{type:"object",properties:{number:{type:"number"},name:{type:"string"},securityMode:{type:["string","null"],enum:["arming","disarming","armed","disarmed","alarm",null]}},additionalProperties:!1}},zones:{type:"array",items:{type:"object",properties:{number:{type:"number",minimum:0},name:{type:"string"},secure:{type:["boolean","null"]},bypassed:{type:["boolean","null"]}},additionalProperties:!1}},chime:{type:"boolean",description:"Reflects whether console chime is enabled"},watts:{$ref:"definitions.json#/definitions/watts"},icon:{type:"string"},modelNumber:{type:"string"},serialNumber:{type:"string"},firmwareVersion:{type:"string"},address:{$ref:"definitions.json#/definitions/address"}},required:["id","type","areas","zones","driver"]},h={type:"array",uniqueItems:!0,items:{enum:["button 1","button 2","button 3","button 4","button 5","idle","powerHasBeedApplied","acMainsDisconnected","acMainsReconnected","replaceBatterySoon","replaceBatteryNow","batteryOk","hardwareFailure","softwareFailure","hardwareFailureWithCode","softwareFailureWithCode","motionDetection","airFilterNeedsCleaned","airFilterNeedsReplaced","smokeDetected","outsideSafeTemperatureRange","outsideSafeHumidityRange","scheduleMaintenance","doorAjar","communicationFailure","communicationOk","burglarAlarm","fireAlarm"]}},f={type:"string",description:"Driver used to communicate with the object.",enum:["adlink","aws-kinesis","butler","crestron","dell","dmp","doorbird","dormakaba","dsc","ecobee","epson","geovision-rs","geovision-as-manager","honeywell-vista","igor","inncom","isapi","kohost-k7","kohost","lg","lg-webos","lapi","lirc","mews","mht","paxton","pelican-wireless","power-shades","rachio","rebrandly","rtsp","salto","salto-irn","samsung","se","sendgrid","sonifi","stay-n-touch","storable","twilio","unifi","valcom","vizio","wisenet","cloudflare-images","cloudflare-stream","insperia-privacy"]},g=n().default,P=o().default,b={type:["object","null"],properties:{name:{type:"string",$ref:"#/definitions/supportedNotifications/items"},timestamp:{type:"number",minimum:1655907956593},description:{type:"string"}}},v={enum:["button 1","button 2","button 3","button 4","button 5","idle","powerHasBeedApplied","acMainsDisconnected","acMainsReconnected","replaceBatterySoon","replaceBatteryNow","batteryOk","hardwareFailure","softwareFailure","hardwareFailureWithCode","softwareFailureWithCode","motionDetection","airFilterNeedsCleaned","airFilterNeedsReplaced","smokeDetected","outsideSafeTemperatureRange","outsideSafeHumidityRange","scheduleMaintenance","doorAjar","communicationFailure","communicationOk","burglarAlarm","fireAlarm"]};function validate12(e,{instancePath:t="",parentData:s,parentDataProperty:i,rootData:a=e}={}){let r=null,n=0;if((!e||"object"!=typeof e||Array.isArray(e))&&null!==e){const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:b.type},message:"must be object,null"};null===r?r=[e]:r.push(e),n++}if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0!==e.name){let s=e.name;if("string"!=typeof s){const e={instancePath:t+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("button 1"!==s&&"button 2"!==s&&"button 3"!==s&&"button 4"!==s&&"button 5"!==s&&"idle"!==s&&"powerHasBeedApplied"!==s&&"acMainsDisconnected"!==s&&"acMainsReconnected"!==s&&"replaceBatterySoon"!==s&&"replaceBatteryNow"!==s&&"batteryOk"!==s&&"hardwareFailure"!==s&&"softwareFailure"!==s&&"hardwareFailureWithCode"!==s&&"softwareFailureWithCode"!==s&&"motionDetection"!==s&&"airFilterNeedsCleaned"!==s&&"airFilterNeedsReplaced"!==s&&"smokeDetected"!==s&&"outsideSafeTemperatureRange"!==s&&"outsideSafeHumidityRange"!==s&&"scheduleMaintenance"!==s&&"doorAjar"!==s&&"communicationFailure"!==s&&"communicationOk"!==s&&"burglarAlarm"!==s&&"fireAlarm"!==s){const e={instancePath:t+"/name",schemaPath:"#/definitions/supportedNotifications/items/enum",keyword:"enum",params:{allowedValues:v.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.timestamp){let s=e.timestamp;if("number"==typeof s){if(s<1655907956593||isNaN(s)){const e={instancePath:t+"/timestamp",schemaPath:"#/properties/timestamp/minimum",keyword:"minimum",params:{comparison:">=",limit:1655907956593},message:"must be >= 1655907956593"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/timestamp",schemaPath:"#/properties/timestamp/type",keyword:"type",params:{type:"number"},message:"must be number"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.description&&"string"!=typeof e.description){const e={instancePath:t+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}return validate12.errors=r,0===n}function validate10(e,{instancePath:t="",parentData:s,parentDataProperty:i,rootData:a=e}={}){let r=null,n=0;if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.type&&(e.type="alarm"),void 0===e.id){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.type){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.areas){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"areas"},message:"must have required property 'areas'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.zones){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"zones"},message:"must have required property 'zones'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.driver){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"driver"},message:"must have required property 'driver'"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.id){let s=e.id;if("string"!=typeof s){const e={instancePath:t+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}const i=n,a=n;if("global"!==s&&"system"!==s){const e={};null===r?r=[e]:r.push(e),n++}if(a===n){const e={instancePath:t+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===r?r=[e]:r.push(e),n++}else n=i,null!==r&&(i?r.length=i:r=null)}if(void 0!==e.name&&"string"!=typeof e.name){const e={instancePath:t+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.offline&&"boolean"!=typeof e.offline){const e={instancePath:t+"/offline",schemaPath:"#/properties/offline/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===r?r=[e]:r.push(e),n++}let s=e.type;if("string"!=typeof s){const e={instancePath:t+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("alarm"!==s){const e={instancePath:t+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:y.properties.type.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.systemId&&"string"!=typeof e.systemId){const e={instancePath:t+"/systemId",schemaPath:"definitions.json#/definitions/systemId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.supportedNotifications){let s=e.supportedNotifications;if(Array.isArray(s)){const e=s.length;for(let i=0;i<e;i++){let e=s[i];if("button 1"!==e&&"button 2"!==e&&"button 3"!==e&&"button 4"!==e&&"button 5"!==e&&"idle"!==e&&"powerHasBeedApplied"!==e&&"acMainsDisconnected"!==e&&"acMainsReconnected"!==e&&"replaceBatterySoon"!==e&&"replaceBatteryNow"!==e&&"batteryOk"!==e&&"hardwareFailure"!==e&&"softwareFailure"!==e&&"hardwareFailureWithCode"!==e&&"softwareFailureWithCode"!==e&&"motionDetection"!==e&&"airFilterNeedsCleaned"!==e&&"airFilterNeedsReplaced"!==e&&"smokeDetected"!==e&&"outsideSafeTemperatureRange"!==e&&"outsideSafeHumidityRange"!==e&&"scheduleMaintenance"!==e&&"doorAjar"!==e&&"communicationFailure"!==e&&"communicationOk"!==e&&"burglarAlarm"!==e&&"fireAlarm"!==e){const e={instancePath:t+"/supportedNotifications/"+i,schemaPath:"definitions.json#/definitions/supportedNotifications/items/enum",keyword:"enum",params:{allowedValues:h.items.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}let i,a=s.length;if(a>1)e:for(;a--;)for(i=a;i--;)if(g(s[a],s[i])){const e={instancePath:t+"/supportedNotifications",schemaPath:"definitions.json#/definitions/supportedNotifications/uniqueItems",keyword:"uniqueItems",params:{i:a,j:i},message:"must NOT have duplicate items (items ## "+i+" and "+a+" are identical)"};null===r?r=[e]:r.push(e),n++;break e}}else{const e={instancePath:t+"/supportedNotifications",schemaPath:"definitions.json#/definitions/supportedNotifications/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.notification&&(validate12(e.notification,{instancePath:t+"/notification",parentData:e,parentDataProperty:"notification",rootData:a})||(r=null===r?validate12.errors:r.concat(validate12.errors),n=r.length)),void 0!==e.driver){let s=e.driver;if("string"!=typeof s){const e={instancePath:t+"/driver",schemaPath:"definitions.json#/definitions/driver/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("adlink"!==s&&"aws-kinesis"!==s&&"butler"!==s&&"crestron"!==s&&"dell"!==s&&"dmp"!==s&&"doorbird"!==s&&"dormakaba"!==s&&"dsc"!==s&&"ecobee"!==s&&"epson"!==s&&"geovision-rs"!==s&&"geovision-as-manager"!==s&&"honeywell-vista"!==s&&"igor"!==s&&"inncom"!==s&&"isapi"!==s&&"kohost-k7"!==s&&"kohost"!==s&&"lg"!==s&&"lg-webos"!==s&&"lapi"!==s&&"lirc"!==s&&"mews"!==s&&"mht"!==s&&"paxton"!==s&&"pelican-wireless"!==s&&"power-shades"!==s&&"rachio"!==s&&"rebrandly"!==s&&"rtsp"!==s&&"salto"!==s&&"salto-irn"!==s&&"samsung"!==s&&"se"!==s&&"sendgrid"!==s&&"sonifi"!==s&&"stay-n-touch"!==s&&"storable"!==s&&"twilio"!==s&&"unifi"!==s&&"valcom"!==s&&"vizio"!==s&&"wisenet"!==s&&"cloudflare-images"!==s&&"cloudflare-stream"!==s&&"insperia-privacy"!==s){const e={instancePath:t+"/driver",schemaPath:"definitions.json#/definitions/driver/enum",keyword:"enum",params:{allowedValues:f.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.areas){let s=e.areas;if(Array.isArray(s)){const e=s.length;for(let i=0;i<e;i++){let e=s[i];if(e&&"object"==typeof e&&!Array.isArray(e)){for(const s in e)if("number"!==s&&"name"!==s&&"securityMode"!==s){const e={instancePath:t+"/areas/"+i,schemaPath:"#/properties/areas/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:s},message:"must NOT have additional properties"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.number&&"number"!=typeof e.number){const e={instancePath:t+"/areas/"+i+"/number",schemaPath:"#/properties/areas/items/properties/number/type",keyword:"type",params:{type:"number"},message:"must be number"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.name&&"string"!=typeof e.name){const e={instancePath:t+"/areas/"+i+"/name",schemaPath:"#/properties/areas/items/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.securityMode){let s=e.securityMode;if("string"!=typeof s&&null!==s){const e={instancePath:t+"/areas/"+i+"/securityMode",schemaPath:"#/properties/areas/items/properties/securityMode/type",keyword:"type",params:{type:y.properties.areas.items.properties.securityMode.type},message:"must be string,null"};null===r?r=[e]:r.push(e),n++}if("arming"!==s&&"disarming"!==s&&"armed"!==s&&"disarmed"!==s&&"alarm"!==s&&null!==s){const e={instancePath:t+"/areas/"+i+"/securityMode",schemaPath:"#/properties/areas/items/properties/securityMode/enum",keyword:"enum",params:{allowedValues:y.properties.areas.items.properties.securityMode.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t+"/areas/"+i,schemaPath:"#/properties/areas/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t+"/areas",schemaPath:"#/properties/areas/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.zones){let s=e.zones;if(Array.isArray(s)){const e=s.length;for(let i=0;i<e;i++){let e=s[i];if(e&&"object"==typeof e&&!Array.isArray(e)){for(const s in e)if("number"!==s&&"name"!==s&&"secure"!==s&&"bypassed"!==s){const e={instancePath:t+"/zones/"+i,schemaPath:"#/properties/zones/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:s},message:"must NOT have additional properties"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.number){let s=e.number;if("number"==typeof s){if(s<0||isNaN(s)){const e={instancePath:t+"/zones/"+i+"/number",schemaPath:"#/properties/zones/items/properties/number/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/zones/"+i+"/number",schemaPath:"#/properties/zones/items/properties/number/type",keyword:"type",params:{type:"number"},message:"must be number"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.name&&"string"!=typeof e.name){const e={instancePath:t+"/zones/"+i+"/name",schemaPath:"#/properties/zones/items/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.secure){let s=e.secure;if("boolean"!=typeof s&&null!==s){const e={instancePath:t+"/zones/"+i+"/secure",schemaPath:"#/properties/zones/items/properties/secure/type",keyword:"type",params:{type:y.properties.zones.items.properties.secure.type},message:"must be boolean,null"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.bypassed){let s=e.bypassed;if("boolean"!=typeof s&&null!==s){const e={instancePath:t+"/zones/"+i+"/bypassed",schemaPath:"#/properties/zones/items/properties/bypassed/type",keyword:"type",params:{type:y.properties.zones.items.properties.bypassed.type},message:"must be boolean,null"};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t+"/zones/"+i,schemaPath:"#/properties/zones/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t+"/zones",schemaPath:"#/properties/zones/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.chime&&"boolean"!=typeof e.chime){const e={instancePath:t+"/chime",schemaPath:"#/properties/chime/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.watts){let s=e.watts;if("number"==typeof s){if(s<0||isNaN(s)){const e={instancePath:t+"/watts",schemaPath:"definitions.json#/definitions/watts/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/watts",schemaPath:"definitions.json#/definitions/watts/type",keyword:"type",params:{type:"number"},message:"must be number"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.icon&&"string"!=typeof e.icon){const e={instancePath:t+"/icon",schemaPath:"#/properties/icon/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.modelNumber&&"string"!=typeof e.modelNumber){const e={instancePath:t+"/modelNumber",schemaPath:"#/properties/modelNumber/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.serialNumber&&"string"!=typeof e.serialNumber){const e={instancePath:t+"/serialNumber",schemaPath:"#/properties/serialNumber/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.firmwareVersion&&"string"!=typeof e.firmwareVersion){const e={instancePath:t+"/firmwareVersion",schemaPath:"#/properties/firmwareVersion/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.address){let s=e.address;if(s&&"object"==typeof s&&!Array.isArray(s)){if(void 0!==s.id&&"string"!=typeof s.id){const e={instancePath:t+"/address/id",schemaPath:"definitions.json#/definitions/address/properties/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==s.line1&&"string"!=typeof s.line1){const e={instancePath:t+"/address/line1",schemaPath:"definitions.json#/definitions/address/properties/line1/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==s.line2&&"string"!=typeof s.line2){const e={instancePath:t+"/address/line2",schemaPath:"definitions.json#/definitions/address/properties/line2/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==s.line3&&"string"!=typeof s.line3){const e={instancePath:t+"/address/line3",schemaPath:"definitions.json#/definitions/address/properties/line3/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==s.city&&"string"!=typeof s.city){const e={instancePath:t+"/address/city",schemaPath:"definitions.json#/definitions/address/properties/city/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==s.state&&"string"!=typeof s.state){const e={instancePath:t+"/address/state",schemaPath:"definitions.json#/definitions/address/properties/state/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==s.postalCode&&"string"!=typeof s.postalCode){const e={instancePath:t+"/address/postalCode",schemaPath:"definitions.json#/definitions/address/properties/postalCode/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==s.countryCode){let e=s.countryCode;if("string"==typeof e){if(P(e)>2){const e={instancePath:t+"/address/countryCode",schemaPath:"definitions.json#/definitions/address/properties/countryCode/maxLength",keyword:"maxLength",params:{limit:2},message:"must NOT have more than 2 characters"};null===r?r=[e]:r.push(e),n++}if(P(e)<2){const e={instancePath:t+"/address/countryCode",schemaPath:"definitions.json#/definitions/address/properties/countryCode/minLength",keyword:"minLength",params:{limit:2},message:"must NOT have fewer than 2 characters"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/address/countryCode",schemaPath:"definitions.json#/definitions/address/properties/countryCode/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t+"/address",schemaPath:"definitions.json#/definitions/address/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}return validate10.errors=r,0===n}var w=function validate14(e,{instancePath:t="",parentData:s,parentDataProperty:i,rootData:a=e}={}){let r=null,n=0;if(e&&"object"==typeof e&&!Array.isArray(e)){void 0===e.type&&(e.type="announcement");for(const s in e)if(!A.call(k.properties,s)){const e={instancePath:t,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:s},message:"must NOT have additional properties"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.id){let s=e.id;if("string"!=typeof s){const e={instancePath:t+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}const i=n,a=n;if("global"!==s&&"system"!==s){const e={};null===r?r=[e]:r.push(e),n++}if(a===n){const e={instancePath:t+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===r?r=[e]:r.push(e),n++}else n=i,null!==r&&(i?r.length=i:r=null)}let s=e.type;if("string"!=typeof s){const e={instancePath:t+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("announcement"!==s){const e={instancePath:t+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:k.properties.type.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.users){let s=e.users;if(Array.isArray(s)){if(s.length<1){const e={instancePath:t+"/users",schemaPath:"#/properties/users/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};null===r?r=[e]:r.push(e),n++}const e=s.length;for(let i=0;i<e;i++)if("string"!=typeof s[i]){const e={instancePath:t+"/users/"+i,schemaPath:"#/properties/users/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/users",schemaPath:"#/properties/users/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.group&&"string"!=typeof e.group){const e={instancePath:t+"/group",schemaPath:"#/properties/group/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.body&&"string"!=typeof e.body){const e={instancePath:t+"/body",schemaPath:"#/properties/body/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.media&&(validate15(e.media,{instancePath:t+"/media",parentData:e,parentDataProperty:"media",rootData:a})||(r=null===r?validate15.errors:r.concat(validate15.errors),n=r.length)),void 0!==e.sentBy&&"string"!=typeof e.sentBy){const e={instancePath:t+"/sentBy",schemaPath:"#/properties/sentBy/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.tags){let s=e.tags;if(Array.isArray(s)){const e=s.length;for(let i=0;i<e;i++)if("string"!=typeof s[i]){const e={instancePath:t+"/tags/"+i,schemaPath:"#/properties/tags/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/tags",schemaPath:"#/properties/tags/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.createdAt){let s=e.createdAt;if("string"!=typeof s&&(!s||"object"!=typeof s||Array.isArray(s))){const e={instancePath:t+"/createdAt",schemaPath:"definitions.json#/definitions/date/type",keyword:"type",params:{type:j.type},message:"must be string,object"};null===r?r=[e]:r.push(e),n++}if("string"==typeof s&&!I.validate(s)){const e={instancePath:t+"/createdAt",schemaPath:"definitions.json#/definitions/date/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.updatedAt){let s=e.updatedAt;if("string"!=typeof s&&(!s||"object"!=typeof s||Array.isArray(s))){const e={instancePath:t+"/updatedAt",schemaPath:"definitions.json#/definitions/date/type",keyword:"type",params:{type:j.type},message:"must be string,object"};null===r?r=[e]:r.push(e),n++}if("string"==typeof s&&!I.validate(s)){const e={instancePath:t+"/updatedAt",schemaPath:"definitions.json#/definitions/date/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}return validate14.errors=r,0===n},k={$schema:"http://json-schema.org/draft-07/schema",$id:"announcement.json",title:"Announcement",description:"Announcement message sent to users",type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",enum:["announcement"],default:"announcement"},users:{type:"array",items:{type:"string"},minItems:1},group:{type:"string"},body:{type:"string"},media:{$ref:"mediaFile.json"},sentBy:{type:"string"},tags:{type:"array",items:{type:"string"}},createdAt:{$ref:"definitions.json#/definitions/date"},updatedAt:{$ref:"definitions.json#/definitions/date"}},additionalProperties:!1},j={type:["string","object"],format:"date-time"},A=Object.prototype.hasOwnProperty,q={$schema:"http://json-schema.org/draft-07/schema",$id:"mediaFile.json",title:"Media File",description:"Any media file",type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",default:"mediaFile",enum:["mediaFile"]},name:{type:"string"},fileHash:{type:"string"},category:{type:"string",description:"This is the category id"},mimeType:{type:"string",enum:["image/*","image/jpeg","image/png","image/gif","image/webp","image/avif","image/svg+xml","application/pdf"]},data:{type:"string"},url:{type:"string",format:"uri"},width:{type:"integer",minimum:0},height:{type:"integer",minimum:0},size:{type:"integer",minimum:0,description:"Size in bytes"},uploadUrl:{type:"string",format:"uri"},uploadUrlExpires:{$ref:"definitions.json#/definitions/date"},createdBy:{type:"string"},systemId:{$ref:"definitions.json#/definitions/systemId"}},additionalProperties:!1,required:["type"]},N=p().fullFormats.uri,I=p().fullFormats["date-time"];function validate15(e,{instancePath:t="",parentData:s,parentDataProperty:i,rootData:a=e}={}){let r=null,n=0;if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.type&&(e.type="mediaFile"),void 0===e.type){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===r?r=[e]:r.push(e),n++}for(const s in e)if(!A.call(q.properties,s)){const e={instancePath:t,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:s},message:"must NOT have additional properties"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.id){let s=e.id;if("string"!=typeof s){const e={instancePath:t+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}const i=n,a=n;if("global"!==s&&"system"!==s){const e={};null===r?r=[e]:r.push(e),n++}if(a===n){const e={instancePath:t+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===r?r=[e]:r.push(e),n++}else n=i,null!==r&&(i?r.length=i:r=null)}let s=e.type;if("string"!=typeof s){const e={instancePath:t+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("mediaFile"!==s){const e={instancePath:t+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:q.properties.type.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.name&&"string"!=typeof e.name){const e={instancePath:t+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.fileHash&&"string"!=typeof e.fileHash){const e={instancePath:t+"/fileHash",schemaPath:"#/properties/fileHash/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.category&&"string"!=typeof e.category){const e={instancePath:t+"/category",schemaPath:"#/properties/category/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.mimeType){let s=e.mimeType;if("string"!=typeof s){const e={instancePath:t+"/mimeType",schemaPath:"#/properties/mimeType/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("image/*"!==s&&"image/jpeg"!==s&&"image/png"!==s&&"image/gif"!==s&&"image/webp"!==s&&"image/avif"!==s&&"image/svg+xml"!==s&&"application/pdf"!==s){const e={instancePath:t+"/mimeType",schemaPath:"#/properties/mimeType/enum",keyword:"enum",params:{allowedValues:q.properties.mimeType.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.data&&"string"!=typeof e.data){const e={instancePath:t+"/data",schemaPath:"#/properties/data/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.url){let s=e.url;if("string"==typeof s){if(!N(s)){const e={instancePath:t+"/url",schemaPath:"#/properties/url/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/url",schemaPath:"#/properties/url/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.width){let s=e.width;if("number"!=typeof s||s%1||isNaN(s)){const e={instancePath:t+"/width",schemaPath:"#/properties/width/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===r?r=[e]:r.push(e),n++}if("number"==typeof s&&(s<0||isNaN(s))){const e={instancePath:t+"/width",schemaPath:"#/properties/width/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.height){let s=e.height;if("number"!=typeof s||s%1||isNaN(s)){const e={instancePath:t+"/height",schemaPath:"#/properties/height/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===r?r=[e]:r.push(e),n++}if("number"==typeof s&&(s<0||isNaN(s))){const e={instancePath:t+"/height",schemaPath:"#/properties/height/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.size){let s=e.size;if("number"!=typeof s||s%1||isNaN(s)){const e={instancePath:t+"/size",schemaPath:"#/properties/size/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===r?r=[e]:r.push(e),n++}if("number"==typeof s&&(s<0||isNaN(s))){const e={instancePath:t+"/size",schemaPath:"#/properties/size/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.uploadUrl){let s=e.uploadUrl;if("string"==typeof s){if(!N(s)){const e={instancePath:t+"/uploadUrl",schemaPath:"#/properties/uploadUrl/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/uploadUrl",schemaPath:"#/properties/uploadUrl/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.uploadUrlExpires){let s=e.uploadUrlExpires;if("string"!=typeof s&&(!s||"object"!=typeof s||Array.isArray(s))){const e={instancePath:t+"/uploadUrlExpires",schemaPath:"definitions.json#/definitions/date/type",keyword:"type",params:{type:j.type},message:"must be string,object"};null===r?r=[e]:r.push(e),n++}if("string"==typeof s&&!I.validate(s)){const e={instancePath:t+"/uploadUrlExpires",schemaPath:"definitions.json#/definitions/date/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.createdBy&&"string"!=typeof e.createdBy){const e={instancePath:t+"/createdBy",schemaPath:"#/properties/createdBy/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.systemId&&"string"!=typeof e.systemId){const e={instancePath:t+"/systemId",schemaPath:"definitions.json#/definitions/systemId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}return validate15.errors=r,0===n}var D=validate17,$={$schema:"http://json-schema.org/draft-07/schema",$id:"camera.json",title:"Camera",description:"Any smart camera",type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},name:{type:"string"},type:{$ref:"definitions.json#/definitions/type",default:"camera"},offline:{type:"boolean"},supportedNotifications:{$ref:"definitions.json#/definitions/supportedNotifications"},notification:{$ref:"definitions.json#/definitions/notification"},driver:{$ref:"definitions.json#/definitions/driver"},liveStreams:{type:"object",additionalProperties:!1,$comment:"This is now deprecated. Use liveStream instead. This will remain here for backwards compatibility.",properties:{iframe:{type:["string","null"]},hls:{type:["string","null"]},webRTC:{type:["string","null"]},rtsp:{type:["string","null"]}}},liveStream:{type:"object",additionalProperties:!1,properties:{id:{type:"string"},driver:{type:"string",enum:["cloudflare-stream","aws-kinesis","digital-watchdog"]},allowedOrigins:{type:"array",items:{type:"string"}},authRequired:{type:"boolean"},iframe:{type:["string","null"]},hls:{type:["string","null"]},webRTC:{type:["string","null"]},rtsp:{type:["string","null"],description:"Local RTSP stream URL",examples:["rtsp://192.168.1.4:544/channels/1","rtsp://10.145.6.129:8554/unicast"]},previewImage:{type:["string","null"],description:"Source to preview the camera stream",examples:["https://example.com/preview.jpg","data:image/jpegbase64,/9j/4AAQSkZJRgABAQEAYABgAAD/4QBYRXhpZgAATU0AKgAAAAgAA1EQAAEAAAABAQAAAFERAAQAAAABAAABAgABAA"]}}},systemId:{$ref:"definitions.json#/definitions/systemId"},watts:{$ref:"definitions.json#/definitions/watts"},icon:{type:"string"},modelNumber:{type:"string"},serialNumber:{type:"string"},firmwareVersion:{type:"string"}},additionalProperties:!1,required:["id","type","driver"]},C={type:"string",enum:["alarm","dimmer","switch","motionSensor","windowCovering","camera","mediaSource","thermostat","lock","courtesy","gateway","tv","dvr","appleTv","discPlayer","mediaPlayer","uncontrolledDevice"]};function validate18(e,{instancePath:t="",parentData:s,parentDataProperty:i,rootData:a=e}={}){let r=null,n=0;if((!e||"object"!=typeof e||Array.isArray(e))&&null!==e){const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:b.type},message:"must be object,null"};null===r?r=[e]:r.push(e),n++}if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0!==e.name){let s=e.name;if("string"!=typeof s){const e={instancePath:t+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("button 1"!==s&&"button 2"!==s&&"button 3"!==s&&"button 4"!==s&&"button 5"!==s&&"idle"!==s&&"powerHasBeedApplied"!==s&&"acMainsDisconnected"!==s&&"acMainsReconnected"!==s&&"replaceBatterySoon"!==s&&"replaceBatteryNow"!==s&&"batteryOk"!==s&&"hardwareFailure"!==s&&"softwareFailure"!==s&&"hardwareFailureWithCode"!==s&&"softwareFailureWithCode"!==s&&"motionDetection"!==s&&"airFilterNeedsCleaned"!==s&&"airFilterNeedsReplaced"!==s&&"smokeDetected"!==s&&"outsideSafeTemperatureRange"!==s&&"outsideSafeHumidityRange"!==s&&"scheduleMaintenance"!==s&&"doorAjar"!==s&&"communicationFailure"!==s&&"communicationOk"!==s&&"burglarAlarm"!==s&&"fireAlarm"!==s){const e={instancePath:t+"/name",schemaPath:"#/definitions/supportedNotifications/items/enum",keyword:"enum",params:{allowedValues:v.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.timestamp){let s=e.timestamp;if("number"==typeof s){if(s<1655907956593||isNaN(s)){const e={instancePath:t+"/timestamp",schemaPath:"#/properties/timestamp/minimum",keyword:"minimum",params:{comparison:">=",limit:1655907956593},message:"must be >= 1655907956593"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/timestamp",schemaPath:"#/properties/timestamp/type",keyword:"type",params:{type:"number"},message:"must be number"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.description&&"string"!=typeof e.description){const e={instancePath:t+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}return validate18.errors=r,0===n}function validate17(e,{instancePath:t="",parentData:s,parentDataProperty:i,rootData:a=e}={}){let r=null,n=0;if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.type&&(e.type="camera"),void 0===e.id){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.type){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.driver){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"driver"},message:"must have required property 'driver'"};null===r?r=[e]:r.push(e),n++}for(const s in e)if(!A.call($.properties,s)){const e={instancePath:t,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:s},message:"must NOT have additional properties"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.id){let s=e.id;if("string"!=typeof s){const e={instancePath:t+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}const i=n,a=n;if("global"!==s&&"system"!==s){const e={};null===r?r=[e]:r.push(e),n++}if(a===n){const e={instancePath:t+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===r?r=[e]:r.push(e),n++}else n=i,null!==r&&(i?r.length=i:r=null)}if(void 0!==e.name&&"string"!=typeof e.name){const e={instancePath:t+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}let s=e.type;if("string"!=typeof s){const e={instancePath:t+"/type",schemaPath:"definitions.json#/definitions/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("alarm"!==s&&"dimmer"!==s&&"switch"!==s&&"motionSensor"!==s&&"windowCovering"!==s&&"camera"!==s&&"mediaSource"!==s&&"thermostat"!==s&&"lock"!==s&&"courtesy"!==s&&"gateway"!==s&&"tv"!==s&&"dvr"!==s&&"appleTv"!==s&&"discPlayer"!==s&&"mediaPlayer"!==s&&"uncontrolledDevice"!==s){const e={instancePath:t+"/type",schemaPath:"definitions.json#/definitions/type/enum",keyword:"enum",params:{allowedValues:C.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.offline&&"boolean"!=typeof e.offline){const e={instancePath:t+"/offline",schemaPath:"#/properties/offline/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.supportedNotifications){let s=e.supportedNotifications;if(Array.isArray(s)){const e=s.length;for(let i=0;i<e;i++){let e=s[i];if("button 1"!==e&&"button 2"!==e&&"button 3"!==e&&"button 4"!==e&&"button 5"!==e&&"idle"!==e&&"powerHasBeedApplied"!==e&&"acMainsDisconnected"!==e&&"acMainsReconnected"!==e&&"replaceBatterySoon"!==e&&"replaceBatteryNow"!==e&&"batteryOk"!==e&&"hardwareFailure"!==e&&"softwareFailure"!==e&&"hardwareFailureWithCode"!==e&&"softwareFailureWithCode"!==e&&"motionDetection"!==e&&"airFilterNeedsCleaned"!==e&&"airFilterNeedsReplaced"!==e&&"smokeDetected"!==e&&"outsideSafeTemperatureRange"!==e&&"outsideSafeHumidityRange"!==e&&"scheduleMaintenance"!==e&&"doorAjar"!==e&&"communicationFailure"!==e&&"communicationOk"!==e&&"burglarAlarm"!==e&&"fireAlarm"!==e){const e={instancePath:t+"/supportedNotifications/"+i,schemaPath:"definitions.json#/definitions/supportedNotifications/items/enum",keyword:"enum",params:{allowedValues:h.items.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}let i,a=s.length;if(a>1)e:for(;a--;)for(i=a;i--;)if(g(s[a],s[i])){const e={instancePath:t+"/supportedNotifications",schemaPath:"definitions.json#/definitions/supportedNotifications/uniqueItems",keyword:"uniqueItems",params:{i:a,j:i},message:"must NOT have duplicate items (items ## "+i+" and "+a+" are identical)"};null===r?r=[e]:r.push(e),n++;break e}}else{const e={instancePath:t+"/supportedNotifications",schemaPath:"definitions.json#/definitions/supportedNotifications/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.notification&&(validate18(e.notification,{instancePath:t+"/notification",parentData:e,parentDataProperty:"notification",rootData:a})||(r=null===r?validate18.errors:r.concat(validate18.errors),n=r.length)),void 0!==e.driver){let s=e.driver;if("string"!=typeof s){const e={instancePath:t+"/driver",schemaPath:"definitions.json#/definitions/driver/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("adlink"!==s&&"aws-kinesis"!==s&&"butler"!==s&&"crestron"!==s&&"dell"!==s&&"dmp"!==s&&"doorbird"!==s&&"dormakaba"!==s&&"dsc"!==s&&"ecobee"!==s&&"epson"!==s&&"geovision-rs"!==s&&"geovision-as-manager"!==s&&"honeywell-vista"!==s&&"igor"!==s&&"inncom"!==s&&"isapi"!==s&&"kohost-k7"!==s&&"kohost"!==s&&"lg"!==s&&"lg-webos"!==s&&"lapi"!==s&&"lirc"!==s&&"mews"!==s&&"mht"!==s&&"paxton"!==s&&"pelican-wireless"!==s&&"power-shades"!==s&&"rachio"!==s&&"rebrandly"!==s&&"rtsp"!==s&&"salto"!==s&&"salto-irn"!==s&&"samsung"!==s&&"se"!==s&&"sendgrid"!==s&&"sonifi"!==s&&"stay-n-touch"!==s&&"storable"!==s&&"twilio"!==s&&"unifi"!==s&&"valcom"!==s&&"vizio"!==s&&"wisenet"!==s&&"cloudflare-images"!==s&&"cloudflare-stream"!==s&&"insperia-privacy"!==s){const e={instancePath:t+"/driver",schemaPath:"definitions.json#/definitions/driver/enum",keyword:"enum",params:{allowedValues:f.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.liveStreams){let s=e.liveStreams;if(s&&"object"==typeof s&&!Array.isArray(s)){for(const e in s)if("iframe"!==e&&"hls"!==e&&"webRTC"!==e&&"rtsp"!==e){const s={instancePath:t+"/liveStreams",schemaPath:"#/properties/liveStreams/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:e},message:"must NOT have additional properties"};null===r?r=[s]:r.push(s),n++}if(void 0!==s.iframe){let e=s.iframe;if("string"!=typeof e&&null!==e){const e={instancePath:t+"/liveStreams/iframe",schemaPath:"#/properties/liveStreams/properties/iframe/type",keyword:"type",params:{type:$.properties.liveStreams.properties.iframe.type},message:"must be string,null"};null===r?r=[e]:r.push(e),n++}}if(void 0!==s.hls){let e=s.hls;if("string"!=typeof e&&null!==e){const e={instancePath:t+"/liveStreams/hls",schemaPath:"#/properties/liveStreams/properties/hls/type",keyword:"type",params:{type:$.properties.liveStreams.properties.hls.type},message:"must be string,null"};null===r?r=[e]:r.push(e),n++}}if(void 0!==s.webRTC){let e=s.webRTC;if("string"!=typeof e&&null!==e){const e={instancePath:t+"/liveStreams/webRTC",schemaPath:"#/properties/liveStreams/properties/webRTC/type",keyword:"type",params:{type:$.properties.liveStreams.properties.webRTC.type},message:"must be string,null"};null===r?r=[e]:r.push(e),n++}}if(void 0!==s.rtsp){let e=s.rtsp;if("string"!=typeof e&&null!==e){const e={instancePath:t+"/liveStreams/rtsp",schemaPath:"#/properties/liveStreams/properties/rtsp/type",keyword:"type",params:{type:$.properties.liveStreams.properties.rtsp.type},message:"must be string,null"};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t+"/liveStreams",schemaPath:"#/properties/liveStreams/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.liveStream){let s=e.liveStream;if(s&&"object"==typeof s&&!Array.isArray(s)){for(const e in s)if(!A.call($.properties.liveStream.properties,e)){const s={instancePath:t+"/liveStream",schemaPath:"#/properties/liveStream/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:e},message:"must NOT have additional properties"};null===r?r=[s]:r.push(s),n++}if(void 0!==s.id&&"string"!=typeof s.id){const e={instancePath:t+"/liveStream/id",schemaPath:"#/properties/liveStream/properties/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==s.driver){let e=s.driver;if("string"!=typeof e){const e={instancePath:t+"/liveStream/driver",schemaPath:"#/properties/liveStream/properties/driver/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("cloudflare-stream"!==e&&"aws-kinesis"!==e&&"digital-watchdog"!==e){const e={instancePath:t+"/liveStream/driver",schemaPath:"#/properties/liveStream/properties/driver/enum",keyword:"enum",params:{allowedValues:$.properties.liveStream.properties.driver.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}if(void 0!==s.allowedOrigins){let e=s.allowedOrigins;if(Array.isArray(e)){const s=e.length;for(let i=0;i<s;i++)if("string"!=typeof e[i]){const e={instancePath:t+"/liveStream/allowedOrigins/"+i,schemaPath:"#/properties/liveStream/properties/allowedOrigins/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/liveStream/allowedOrigins",schemaPath:"#/properties/liveStream/properties/allowedOrigins/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}}if(void 0!==s.authRequired&&"boolean"!=typeof s.authRequired){const e={instancePath:t+"/liveStream/authRequired",schemaPath:"#/properties/liveStream/properties/authRequired/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===r?r=[e]:r.push(e),n++}if(void 0!==s.iframe){let e=s.iframe;if("string"!=typeof e&&null!==e){const e={instancePath:t+"/liveStream/iframe",schemaPath:"#/properties/liveStream/properties/iframe/type",keyword:"type",params:{type:$.properties.liveStream.properties.iframe.type},message:"must be string,null"};null===r?r=[e]:r.push(e),n++}}if(void 0!==s.hls){let e=s.hls;if("string"!=typeof e&&null!==e){const e={instancePath:t+"/liveStream/hls",schemaPath:"#/properties/liveStream/properties/hls/type",keyword:"type",params:{type:$.properties.liveStream.properties.hls.type},message:"must be string,null"};null===r?r=[e]:r.push(e),n++}}if(void 0!==s.webRTC){let e=s.webRTC;if("string"!=typeof e&&null!==e){const e={instancePath:t+"/liveStream/webRTC",schemaPath:"#/properties/liveStream/properties/webRTC/type",keyword:"type",params:{type:$.properties.liveStream.properties.webRTC.type},message:"must be string,null"};null===r?r=[e]:r.push(e),n++}}if(void 0!==s.rtsp){let e=s.rtsp;if("string"!=typeof e&&null!==e){const e={instancePath:t+"/liveStream/rtsp",schemaPath:"#/properties/liveStream/properties/rtsp/type",keyword:"type",params:{type:$.properties.liveStream.properties.rtsp.type},message:"must be string,null"};null===r?r=[e]:r.push(e),n++}}if(void 0!==s.previewImage){let e=s.previewImage;if("string"!=typeof e&&null!==e){const e={instancePath:t+"/liveStream/previewImage",schemaPath:"#/properties/liveStream/properties/previewImage/type",keyword:"type",params:{type:$.properties.liveStream.properties.previewImage.type},message:"must be string,null"};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t+"/liveStream",schemaPath:"#/properties/liveStream/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.systemId&&"string"!=typeof e.systemId){const e={instancePath:t+"/systemId",schemaPath:"definitions.json#/definitions/systemId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.watts){let s=e.watts;if("number"==typeof s){if(s<0||isNaN(s)){const e={instancePath:t+"/watts",schemaPath:"definitions.json#/definitions/watts/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/watts",schemaPath:"definitions.json#/definitions/watts/type",keyword:"type",params:{type:"number"},message:"must be number"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.icon&&"string"!=typeof e.icon){const e={instancePath:t+"/icon",schemaPath:"#/properties/icon/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.modelNumber&&"string"!=typeof e.modelNumber){const e={instancePath:t+"/modelNumber",schemaPath:"#/properties/modelNumber/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.serialNumber&&"string"!=typeof e.serialNumber){const e={instancePath:t+"/serialNumber",schemaPath:"#/properties/serialNumber/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.firmwareVersion&&"string"!=typeof e.firmwareVersion){const e={instancePath:t+"/firmwareVersion",schemaPath:"#/properties/firmwareVersion/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}return validate17.errors=r,0===n}var S=function validate20(e,{instancePath:t="",parentData:s,parentDataProperty:i,rootData:a=e}={}){let r=null,n=0;if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.type&&(e.type="category"),void 0===e.rating&&(e.rating=9),void 0===e.type){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.discriminator){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"discriminator"},message:"must have required property 'discriminator'"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.id){let s=e.id;if("string"!=typeof s){const e={instancePath:t+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}const i=n,a=n;if("global"!==s&&"system"!==s){const e={};null===r?r=[e]:r.push(e),n++}if(a===n){const e={instancePath:t+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===r?r=[e]:r.push(e),n++}else n=i,null!==r&&(i?r.length=i:r=null)}if("string"!=typeof e.type){const e={instancePath:t+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.name){let s=e.name;if("string"==typeof s){if(P(s)<1){const e={instancePath:t+"/name",schemaPath:"#/properties/name/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.driver){let s=e.driver;if("string"!=typeof s){const e={instancePath:t+"/driver",schemaPath:"definitions.json#/definitions/driver/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("adlink"!==s&&"aws-kinesis"!==s&&"butler"!==s&&"crestron"!==s&&"dell"!==s&&"dmp"!==s&&"doorbird"!==s&&"dormakaba"!==s&&"dsc"!==s&&"ecobee"!==s&&"epson"!==s&&"geovision-rs"!==s&&"geovision-as-manager"!==s&&"honeywell-vista"!==s&&"igor"!==s&&"inncom"!==s&&"isapi"!==s&&"kohost-k7"!==s&&"kohost"!==s&&"lg"!==s&&"lg-webos"!==s&&"lapi"!==s&&"lirc"!==s&&"mews"!==s&&"mht"!==s&&"paxton"!==s&&"pelican-wireless"!==s&&"power-shades"!==s&&"rachio"!==s&&"rebrandly"!==s&&"rtsp"!==s&&"salto"!==s&&"salto-irn"!==s&&"samsung"!==s&&"se"!==s&&"sendgrid"!==s&&"sonifi"!==s&&"stay-n-touch"!==s&&"storable"!==s&&"twilio"!==s&&"unifi"!==s&&"valcom"!==s&&"vizio"!==s&&"wisenet"!==s&&"cloudflare-images"!==s&&"cloudflare-stream"!==s&&"insperia-privacy"!==s){const e={instancePath:t+"/driver",schemaPath:"definitions.json#/definitions/driver/enum",keyword:"enum",params:{allowedValues:f.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.description&&"string"!=typeof e.description){const e={instancePath:t+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}void 0!==e.image&&(validate15(e.image,{instancePath:t+"/image",parentData:e,parentDataProperty:"image",rootData:a})||(r=null===r?validate15.errors:r.concat(validate15.errors),n=r.length));let s=e.rating;if("number"==typeof s){if(s>10||isNaN(s)){const e={instancePath:t+"/rating",schemaPath:"#/properties/rating/maximum",keyword:"maximum",params:{comparison:"<=",limit:10},message:"must be <= 10"};null===r?r=[e]:r.push(e),n++}if(s<0||isNaN(s)){const e={instancePath:t+"/rating",schemaPath:"#/properties/rating/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/rating",schemaPath:"#/properties/rating/type",keyword:"type",params:{type:"number"},message:"must be number"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.discriminator){let s=e.discriminator;if("string"!=typeof s){const e={instancePath:t+"/discriminator",schemaPath:"#/properties/discriminator/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("space"!==s&&"product"!==s&&"mediaFile"!==s){const e={instancePath:t+"/discriminator",schemaPath:"#/properties/discriminator/enum",keyword:"enum",params:{allowedValues:O.properties.discriminator.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.systemId&&"string"!=typeof e.systemId){const e={instancePath:t+"/systemId",schemaPath:"definitions.json#/definitions/systemId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}return validate20.errors=r,0===n},O={$schema:"http://json-schema.org/draft-07/schema",$id:"category.json",title:"Category",type:"object",required:["type","discriminator"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",default:"category"},name:{type:"string",minLength:1},driver:{$ref:"definitions.json#/definitions/driver"},description:{type:"string"},image:{$ref:"mediaFile.json"},rating:{type:"number",minimum:0,maximum:10,default:9},discriminator:{type:"string",enum:["space","product","mediaFile"]},systemId:{$ref:"definitions.json#/definitions/systemId"}}};var F=validate22,T={$schema:"http://json-schema.org/draft-07/schema",$id:"courtesy.json",title:"Courtesy",description:"Any smart courtesy system",type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},name:{type:"string"},type:{$ref:"definitions.json#/definitions/type"},supportedNotifications:{$ref:"definitions.json#/definitions/supportedNotifications"},notification:{$ref:"definitions.json#/definitions/notification"},driver:{$ref:"definitions.json#/definitions/driver"},offline:{type:"boolean"},supportedStates:{type:"array",uniqueItems:!0,items:{enum:["privacy","service","none"]}},state:{type:"string",$ref:"#/properties/supportedStates/items"},systemId:{$ref:"definitions.json#/definitions/systemId"},watts:{$ref:"definitions.json#/definitions/watts"},icon:{type:"string"},modelNumber:{type:"string"},serialNumber:{type:"string"},firmwareVersion:{type:"string"}},required:["id","type","driver","supportedStates","state"]},x={enum:["privacy","service","none"]};function validate23(e,{instancePath:t="",parentData:s,parentDataProperty:i,rootData:a=e}={}){let r=null,n=0;if((!e||"object"!=typeof e||Array.isArray(e))&&null!==e){const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:b.type},message:"must be object,null"};null===r?r=[e]:r.push(e),n++}if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0!==e.name){let s=e.name;if("string"!=typeof s){const e={instancePath:t+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("button 1"!==s&&"button 2"!==s&&"button 3"!==s&&"button 4"!==s&&"button 5"!==s&&"idle"!==s&&"powerHasBeedApplied"!==s&&"acMainsDisconnected"!==s&&"acMainsReconnected"!==s&&"replaceBatterySoon"!==s&&"replaceBatteryNow"!==s&&"batteryOk"!==s&&"hardwareFailure"!==s&&"softwareFailure"!==s&&"hardwareFailureWithCode"!==s&&"softwareFailureWithCode"!==s&&"motionDetection"!==s&&"airFilterNeedsCleaned"!==s&&"airFilterNeedsReplaced"!==s&&"smokeDetected"!==s&&"outsideSafeTemperatureRange"!==s&&"outsideSafeHumidityRange"!==s&&"scheduleMaintenance"!==s&&"doorAjar"!==s&&"communicationFailure"!==s&&"communicationOk"!==s&&"burglarAlarm"!==s&&"fireAlarm"!==s){const e={instancePath:t+"/name",schemaPath:"#/definitions/supportedNotifications/items/enum",keyword:"enum",params:{allowedValues:v.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.timestamp){let s=e.timestamp;if("number"==typeof s){if(s<1655907956593||isNaN(s)){const e={instancePath:t+"/timestamp",schemaPath:"#/properties/timestamp/minimum",keyword:"minimum",params:{comparison:">=",limit:1655907956593},message:"must be >= 1655907956593"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/timestamp",schemaPath:"#/properties/timestamp/type",keyword:"type",params:{type:"number"},message:"must be number"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.description&&"string"!=typeof e.description){const e={instancePath:t+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}return validate23.errors=r,0===n}function validate22(e,{instancePath:t="",parentData:s,parentDataProperty:i,rootData:a=e}={}){let r=null,n=0;if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.id){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.type){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.driver){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"driver"},message:"must have required property 'driver'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.supportedStates){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"supportedStates"},message:"must have required property 'supportedStates'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.state){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"state"},message:"must have required property 'state'"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.id){let s=e.id;if("string"!=typeof s){const e={instancePath:t+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}const i=n,a=n;if("global"!==s&&"system"!==s){const e={};null===r?r=[e]:r.push(e),n++}if(a===n){const e={instancePath:t+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===r?r=[e]:r.push(e),n++}else n=i,null!==r&&(i?r.length=i:r=null)}if(void 0!==e.name&&"string"!=typeof e.name){const e={instancePath:t+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.type){let s=e.type;if("string"!=typeof s){const e={instancePath:t+"/type",schemaPath:"definitions.json#/definitions/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("alarm"!==s&&"dimmer"!==s&&"switch"!==s&&"motionSensor"!==s&&"windowCovering"!==s&&"camera"!==s&&"mediaSource"!==s&&"thermostat"!==s&&"lock"!==s&&"courtesy"!==s&&"gateway"!==s&&"tv"!==s&&"dvr"!==s&&"appleTv"!==s&&"discPlayer"!==s&&"mediaPlayer"!==s&&"uncontrolledDevice"!==s){const e={instancePath:t+"/type",schemaPath:"definitions.json#/definitions/type/enum",keyword:"enum",params:{allowedValues:C.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.supportedNotifications){let s=e.supportedNotifications;if(Array.isArray(s)){const e=s.length;for(let i=0;i<e;i++){let e=s[i];if("button 1"!==e&&"button 2"!==e&&"button 3"!==e&&"button 4"!==e&&"button 5"!==e&&"idle"!==e&&"powerHasBeedApplied"!==e&&"acMainsDisconnected"!==e&&"acMainsReconnected"!==e&&"replaceBatterySoon"!==e&&"replaceBatteryNow"!==e&&"batteryOk"!==e&&"hardwareFailure"!==e&&"softwareFailure"!==e&&"hardwareFailureWithCode"!==e&&"softwareFailureWithCode"!==e&&"motionDetection"!==e&&"airFilterNeedsCleaned"!==e&&"airFilterNeedsReplaced"!==e&&"smokeDetected"!==e&&"outsideSafeTemperatureRange"!==e&&"outsideSafeHumidityRange"!==e&&"scheduleMaintenance"!==e&&"doorAjar"!==e&&"communicationFailure"!==e&&"communicationOk"!==e&&"burglarAlarm"!==e&&"fireAlarm"!==e){const e={instancePath:t+"/supportedNotifications/"+i,schemaPath:"definitions.json#/definitions/supportedNotifications/items/enum",keyword:"enum",params:{allowedValues:h.items.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}let i,a=s.length;if(a>1)e:for(;a--;)for(i=a;i--;)if(g(s[a],s[i])){const e={instancePath:t+"/supportedNotifications",schemaPath:"definitions.json#/definitions/supportedNotifications/uniqueItems",keyword:"uniqueItems",params:{i:a,j:i},message:"must NOT have duplicate items (items ## "+i+" and "+a+" are identical)"};null===r?r=[e]:r.push(e),n++;break e}}else{const e={instancePath:t+"/supportedNotifications",schemaPath:"definitions.json#/definitions/supportedNotifications/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.notification&&(validate23(e.notification,{instancePath:t+"/notification",parentData:e,parentDataProperty:"notification",rootData:a})||(r=null===r?validate23.errors:r.concat(validate23.errors),n=r.length)),void 0!==e.driver){let s=e.driver;if("string"!=typeof s){const e={instancePath:t+"/driver",schemaPath:"definitions.json#/definitions/driver/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("adlink"!==s&&"aws-kinesis"!==s&&"butler"!==s&&"crestron"!==s&&"dell"!==s&&"dmp"!==s&&"doorbird"!==s&&"dormakaba"!==s&&"dsc"!==s&&"ecobee"!==s&&"epson"!==s&&"geovision-rs"!==s&&"geovision-as-manager"!==s&&"honeywell-vista"!==s&&"igor"!==s&&"inncom"!==s&&"isapi"!==s&&"kohost-k7"!==s&&"kohost"!==s&&"lg"!==s&&"lg-webos"!==s&&"lapi"!==s&&"lirc"!==s&&"mews"!==s&&"mht"!==s&&"paxton"!==s&&"pelican-wireless"!==s&&"power-shades"!==s&&"rachio"!==s&&"rebrandly"!==s&&"rtsp"!==s&&"salto"!==s&&"salto-irn"!==s&&"samsung"!==s&&"se"!==s&&"sendgrid"!==s&&"sonifi"!==s&&"stay-n-touch"!==s&&"storable"!==s&&"twilio"!==s&&"unifi"!==s&&"valcom"!==s&&"vizio"!==s&&"wisenet"!==s&&"cloudflare-images"!==s&&"cloudflare-stream"!==s&&"insperia-privacy"!==s){const e={instancePath:t+"/driver",schemaPath:"definitions.json#/definitions/driver/enum",keyword:"enum",params:{allowedValues:f.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.offline&&"boolean"!=typeof e.offline){const e={instancePath:t+"/offline",schemaPath:"#/properties/offline/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.supportedStates){let s=e.supportedStates;if(Array.isArray(s)){const e=s.length;for(let i=0;i<e;i++){let e=s[i];if("privacy"!==e&&"service"!==e&&"none"!==e){const e={instancePath:t+"/supportedStates/"+i,schemaPath:"#/properties/supportedStates/items/enum",keyword:"enum",params:{allowedValues:T.properties.supportedStates.items.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}let i,a=s.length;if(a>1)e:for(;a--;)for(i=a;i--;)if(g(s[a],s[i])){const e={instancePath:t+"/supportedStates",schemaPath:"#/properties/supportedStates/uniqueItems",keyword:"uniqueItems",params:{i:a,j:i},message:"must NOT have duplicate items (items ## "+i+" and "+a+" are identical)"};null===r?r=[e]:r.push(e),n++;break e}}else{const e={instancePath:t+"/supportedStates",schemaPath:"#/properties/supportedStates/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.state){let s=e.state;if("string"!=typeof s){const e={instancePath:t+"/state",schemaPath:"#/properties/state/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("privacy"!==s&&"service"!==s&&"none"!==s){const e={instancePath:t+"/state",schemaPath:"#/properties/supportedStates/items/enum",keyword:"enum",params:{allowedValues:x.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.systemId&&"string"!=typeof e.systemId){const e={instancePath:t+"/systemId",schemaPath:"definitions.json#/definitions/systemId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.watts){let s=e.watts;if("number"==typeof s){if(s<0||isNaN(s)){const e={instancePath:t+"/watts",schemaPath:"definitions.json#/definitions/watts/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/watts",schemaPath:"definitions.json#/definitions/watts/type",keyword:"type",params:{type:"number"},message:"must be number"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.icon&&"string"!=typeof e.icon){const e={instancePath:t+"/icon",schemaPath:"#/properties/icon/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.modelNumber&&"string"!=typeof e.modelNumber){const e={instancePath:t+"/modelNumber",schemaPath:"#/properties/modelNumber/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.serialNumber&&"string"!=typeof e.serialNumber){const e={instancePath:t+"/serialNumber",schemaPath:"#/properties/serialNumber/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.firmwareVersion&&"string"!=typeof e.firmwareVersion){const e={instancePath:t+"/firmwareVersion",schemaPath:"#/properties/firmwareVersion/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}return validate22.errors=r,0===n}var M=function validate25(e,{instancePath:t="",parentData:s,parentDataProperty:i,rootData:a=e}={}){let r=null,n=0;if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.type&&(e.type="credential"),void 0===e.type){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.credential){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"credential"},message:"must have required property 'credential'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.expires){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"expires"},message:"must have required property 'expires'"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.id){let s=e.id;if("string"!=typeof s){const e={instancePath:t+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}const i=n,a=n;if("global"!==s&&"system"!==s){const e={};null===r?r=[e]:r.push(e),n++}if(a===n){const e={instancePath:t+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===r?r=[e]:r.push(e),n++}else n=i,null!==r&&(i?r.length=i:r=null)}if("string"!=typeof e.type){const e={instancePath:t+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.driver){let s=e.driver;if("string"!=typeof s){const e={instancePath:t+"/driver",schemaPath:"definitions.json#/definitions/driver/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("adlink"!==s&&"aws-kinesis"!==s&&"butler"!==s&&"crestron"!==s&&"dell"!==s&&"dmp"!==s&&"doorbird"!==s&&"dormakaba"!==s&&"dsc"!==s&&"ecobee"!==s&&"epson"!==s&&"geovision-rs"!==s&&"geovision-as-manager"!==s&&"honeywell-vista"!==s&&"igor"!==s&&"inncom"!==s&&"isapi"!==s&&"kohost-k7"!==s&&"kohost"!==s&&"lg"!==s&&"lg-webos"!==s&&"lapi"!==s&&"lirc"!==s&&"mews"!==s&&"mht"!==s&&"paxton"!==s&&"pelican-wireless"!==s&&"power-shades"!==s&&"rachio"!==s&&"rebrandly"!==s&&"rtsp"!==s&&"salto"!==s&&"salto-irn"!==s&&"samsung"!==s&&"se"!==s&&"sendgrid"!==s&&"sonifi"!==s&&"stay-n-touch"!==s&&"storable"!==s&&"twilio"!==s&&"unifi"!==s&&"valcom"!==s&&"vizio"!==s&&"wisenet"!==s&&"cloudflare-images"!==s&&"cloudflare-stream"!==s&&"insperia-privacy"!==s){const e={instancePath:t+"/driver",schemaPath:"definitions.json#/definitions/driver/enum",keyword:"enum",params:{allowedValues:f.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.discriminator){let s=e.discriminator;if("string"!=typeof s){const e={instancePath:t+"/discriminator",schemaPath:"#/properties/discriminator/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("verificationCode"!==s&&"token"!==s&&"mobileKey"!==s&&"pin"!==s&&"publicKey"!==s&&"passkeyChallenge"!==s){const e={instancePath:t+"/discriminator",schemaPath:"#/properties/discriminator/enum",keyword:"enum",params:{allowedValues:z.properties.discriminator.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.credential&&"string"!=typeof e.credential){const e={instancePath:t+"/credential",schemaPath:"#/properties/credential/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.userId&&"string"!=typeof e.userId){const e={instancePath:t+"/userId",schemaPath:"#/properties/userId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.organizationId&&"string"!=typeof e.organizationId){const e={instancePath:t+"/organizationId",schemaPath:"#/properties/organizationId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.propertyId&&"string"!=typeof e.propertyId){const e={instancePath:t+"/propertyId",schemaPath:"#/properties/propertyId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.deviceId&&"string"!=typeof e.deviceId){const e={instancePath:t+"/deviceId",schemaPath:"#/properties/deviceId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.userAgent&&"string"!=typeof e.userAgent){const e={instancePath:t+"/userAgent",schemaPath:"#/properties/userAgent/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.expires){let s=e.expires;if("string"!=typeof s&&(!s||"object"!=typeof s||Array.isArray(s))&&null!==s){const e={instancePath:t+"/expires",schemaPath:"#/properties/expires/type",keyword:"type",params:{type:z.properties.expires.type},message:"must be string,object,null"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.systemId&&"string"!=typeof e.systemId){const e={instancePath:t+"/systemId",schemaPath:"definitions.json#/definitions/systemId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}return validate25.errors=r,0===n},z={$schema:"http://json-schema.org/draft-07/schema",$id:"credential.json",title:"Credential",type:"object",required:["type","credential","expires"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",default:"credential"},driver:{$ref:"definitions.json#/definitions/driver"},discriminator:{type:"string",enum:["verificationCode","token","mobileKey","pin","publicKey","passkeyChallenge"]},credential:{type:"string"},userId:{type:"string"},organizationId:{type:"string"},propertyId:{type:"string"},deviceId:{type:"string"},userAgent:{type:"string"},expires:{type:["string","object","null"]},systemId:{$ref:"definitions.json#/definitions/systemId"}}};var R=function validate26(e,{instancePath:t="",parentData:s,parentDataProperty:i,rootData:a=e}={}){let r=null,n=0;if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.type&&(e.type="deviceRouter"),void 0===e.driver){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"driver"},message:"must have required property 'driver'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.organizationId){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"organizationId"},message:"must have required property 'organizationId'"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.id){let s=e.id;if("string"!=typeof s){const e={instancePath:t+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}const i=n,a=n;if("global"!==s&&"system"!==s){const e={};null===r?r=[e]:r.push(e),n++}if(a===n){const e={instancePath:t+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===r?r=[e]:r.push(e),n++}else n=i,null!==r&&(i?r.length=i:r=null)}let s=e.type;if("string"!=typeof s){const e={instancePath:t+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("deviceRouter"!==s){const e={instancePath:t+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:V.properties.type.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.driver&&"string"!=typeof e.driver){const e={instancePath:t+"/driver",schemaPath:"#/properties/driver/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.organizationId){let s=e.organizationId;if("string"!=typeof s&&null!==s){const e={instancePath:t+"/organizationId",schemaPath:"#/properties/organizationId/type",keyword:"type",params:{type:V.properties.organizationId.type},message:"must be string,null"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.devices){let s=e.devices;if(s&&"object"==typeof s&&!Array.isArray(s));else{const e={instancePath:t+"/devices",schemaPath:"#/properties/devices/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}return validate26.errors=r,0===n},V={$schema:"http://json-schema.org/draft-07/schema",$id:"deviceRouter.json",title:"Device Router",description:"A device router contains instructions on where to route devices based on their organization and driver.",type:"object",required:["driver","organizationId"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",default:"deviceRouter",enum:["deviceRouter"]},driver:{type:"string"},organizationId:{type:["string","null"],description:"Reference (id) to the organization that owns this router"},devices:{type:"object",additionalProperties:!0}}};var B=validate27,L={$schema:"http://json-schema.org/draft-07/schema",$id:"dimmer.json",title:"Dimmer",description:"Any smart dimmer",type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},name:{type:"string"},type:{$ref:"definitions.json#/definitions/type"},supportedNotifications:{$ref:"definitions.json#/definitions/supportedNotifications"},notification:{$ref:"definitions.json#/definitions/notification"},driver:{$ref:"definitions.json#/definitions/driver"},offline:{type:"boolean"},level:{type:["number","null"],minimum:0,maximum:100},systemId:{$ref:"definitions.json#/definitions/systemId"},watts:{$ref:"definitions.json#/definitions/watts"},icon:{type:"string"},modelNumber:{type:"string"},serialNumber:{type:"string"},firmwareVersion:{type:"string"}},required:["id","type","level","driver"]};function validate28(e,{instancePath:t="",parentData:s,parentDataProperty:i,rootData:a=e}={}){let r=null,n=0;if((!e||"object"!=typeof e||Array.isArray(e))&&null!==e){const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:b.type},message:"must be object,null"};null===r?r=[e]:r.push(e),n++}if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0!==e.name){let s=e.name;if("string"!=typeof s){const e={instancePath:t+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("button 1"!==s&&"button 2"!==s&&"button 3"!==s&&"button 4"!==s&&"button 5"!==s&&"idle"!==s&&"powerHasBeedApplied"!==s&&"acMainsDisconnected"!==s&&"acMainsReconnected"!==s&&"replaceBatterySoon"!==s&&"replaceBatteryNow"!==s&&"batteryOk"!==s&&"hardwareFailure"!==s&&"softwareFailure"!==s&&"hardwareFailureWithCode"!==s&&"softwareFailureWithCode"!==s&&"motionDetection"!==s&&"airFilterNeedsCleaned"!==s&&"airFilterNeedsReplaced"!==s&&"smokeDetected"!==s&&"outsideSafeTemperatureRange"!==s&&"outsideSafeHumidityRange"!==s&&"scheduleMaintenance"!==s&&"doorAjar"!==s&&"communicationFailure"!==s&&"communicationOk"!==s&&"burglarAlarm"!==s&&"fireAlarm"!==s){const e={instancePath:t+"/name",schemaPath:"#/definitions/supportedNotifications/items/enum",keyword:"enum",params:{allowedValues:v.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.timestamp){let s=e.timestamp;if("number"==typeof s){if(s<1655907956593||isNaN(s)){const e={instancePath:t+"/timestamp",schemaPath:"#/properties/timestamp/minimum",keyword:"minimum",params:{comparison:">=",limit:1655907956593},message:"must be >= 1655907956593"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/timestamp",schemaPath:"#/properties/timestamp/type",keyword:"type",params:{type:"number"},message:"must be number"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.description&&"string"!=typeof e.description){const e={instancePath:t+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}return validate28.errors=r,0===n}function validate27(e,{instancePath:t="",parentData:s,parentDataProperty:i,rootData:a=e}={}){let r=null,n=0;if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.id){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.type){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.level){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"level"},message:"must have required property 'level'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.driver){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"driver"},message:"must have required property 'driver'"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.id){let s=e.id;if("string"!=typeof s){const e={instancePath:t+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}const i=n,a=n;if("global"!==s&&"system"!==s){const e={};null===r?r=[e]:r.push(e),n++}if(a===n){const e={instancePath:t+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===r?r=[e]:r.push(e),n++}else n=i,null!==r&&(i?r.length=i:r=null)}if(void 0!==e.name&&"string"!=typeof e.name){const e={instancePath:t+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.type){let s=e.type;if("string"!=typeof s){const e={instancePath:t+"/type",schemaPath:"definitions.json#/definitions/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("alarm"!==s&&"dimmer"!==s&&"switch"!==s&&"motionSensor"!==s&&"windowCovering"!==s&&"camera"!==s&&"mediaSource"!==s&&"thermostat"!==s&&"lock"!==s&&"courtesy"!==s&&"gateway"!==s&&"tv"!==s&&"dvr"!==s&&"appleTv"!==s&&"discPlayer"!==s&&"mediaPlayer"!==s&&"uncontrolledDevice"!==s){const e={instancePath:t+"/type",schemaPath:"definitions.json#/definitions/type/enum",keyword:"enum",params:{allowedValues:C.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.supportedNotifications){let s=e.supportedNotifications;if(Array.isArray(s)){const e=s.length;for(let i=0;i<e;i++){let e=s[i];if("button 1"!==e&&"button 2"!==e&&"button 3"!==e&&"button 4"!==e&&"button 5"!==e&&"idle"!==e&&"powerHasBeedApplied"!==e&&"acMainsDisconnected"!==e&&"acMainsReconnected"!==e&&"replaceBatterySoon"!==e&&"replaceBatteryNow"!==e&&"batteryOk"!==e&&"hardwareFailure"!==e&&"softwareFailure"!==e&&"hardwareFailureWithCode"!==e&&"softwareFailureWithCode"!==e&&"motionDetection"!==e&&"airFilterNeedsCleaned"!==e&&"airFilterNeedsReplaced"!==e&&"smokeDetected"!==e&&"outsideSafeTemperatureRange"!==e&&"outsideSafeHumidityRange"!==e&&"scheduleMaintenance"!==e&&"doorAjar"!==e&&"communicationFailure"!==e&&"communicationOk"!==e&&"burglarAlarm"!==e&&"fireAlarm"!==e){const e={instancePath:t+"/supportedNotifications/"+i,schemaPath:"definitions.json#/definitions/supportedNotifications/items/enum",keyword:"enum",params:{allowedValues:h.items.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}let i,a=s.length;if(a>1)e:for(;a--;)for(i=a;i--;)if(g(s[a],s[i])){const e={instancePath:t+"/supportedNotifications",schemaPath:"definitions.json#/definitions/supportedNotifications/uniqueItems",keyword:"uniqueItems",params:{i:a,j:i},message:"must NOT have duplicate items (items ## "+i+" and "+a+" are identical)"};null===r?r=[e]:r.push(e),n++;break e}}else{const e={instancePath:t+"/supportedNotifications",schemaPath:"definitions.json#/definitions/supportedNotifications/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.notification&&(validate28(e.notification,{instancePath:t+"/notification",parentData:e,parentDataProperty:"notification",rootData:a})||(r=null===r?validate28.errors:r.concat(validate28.errors),n=r.length)),void 0!==e.driver){let s=e.driver;if("string"!=typeof s){const e={instancePath:t+"/driver",schemaPath:"definitions.json#/definitions/driver/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("adlink"!==s&&"aws-kinesis"!==s&&"butler"!==s&&"crestron"!==s&&"dell"!==s&&"dmp"!==s&&"doorbird"!==s&&"dormakaba"!==s&&"dsc"!==s&&"ecobee"!==s&&"epson"!==s&&"geovision-rs"!==s&&"geovision-as-manager"!==s&&"honeywell-vista"!==s&&"igor"!==s&&"inncom"!==s&&"isapi"!==s&&"kohost-k7"!==s&&"kohost"!==s&&"lg"!==s&&"lg-webos"!==s&&"lapi"!==s&&"lirc"!==s&&"mews"!==s&&"mht"!==s&&"paxton"!==s&&"pelican-wireless"!==s&&"power-shades"!==s&&"rachio"!==s&&"rebrandly"!==s&&"rtsp"!==s&&"salto"!==s&&"salto-irn"!==s&&"samsung"!==s&&"se"!==s&&"sendgrid"!==s&&"sonifi"!==s&&"stay-n-touch"!==s&&"storable"!==s&&"twilio"!==s&&"unifi"!==s&&"valcom"!==s&&"vizio"!==s&&"wisenet"!==s&&"cloudflare-images"!==s&&"cloudflare-stream"!==s&&"insperia-privacy"!==s){const e={instancePath:t+"/driver",schemaPath:"definitions.json#/definitions/driver/enum",keyword:"enum",params:{allowedValues:f.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.offline&&"boolean"!=typeof e.offline){const e={instancePath:t+"/offline",schemaPath:"#/properties/offline/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.level){let s=e.level;if("number"!=typeof s&&null!==s){const e={instancePath:t+"/level",schemaPath:"#/properties/level/type",keyword:"type",params:{type:L.properties.level.type},message:"must be number,null"};null===r?r=[e]:r.push(e),n++}if("number"==typeof s){if(s>100||isNaN(s)){const e={instancePath:t+"/level",schemaPath:"#/properties/level/maximum",keyword:"maximum",params:{comparison:"<=",limit:100},message:"must be <= 100"};null===r?r=[e]:r.push(e),n++}if(s<0||isNaN(s)){const e={instancePath:t+"/level",schemaPath:"#/properties/level/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===r?r=[e]:r.push(e),n++}}}if(void 0!==e.systemId&&"string"!=typeof e.systemId){const e={instancePath:t+"/systemId",schemaPath:"definitions.json#/definitions/systemId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.watts){let s=e.watts;if("number"==typeof s){if(s<0||isNaN(s)){const e={instancePath:t+"/watts",schemaPath:"definitions.json#/definitions/watts/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/watts",schemaPath:"definitions.json#/definitions/watts/type",keyword:"type",params:{type:"number"},message:"must be number"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.icon&&"string"!=typeof e.icon){const e={instancePath:t+"/icon",schemaPath:"#/properties/icon/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.modelNumber&&"string"!=typeof e.modelNumber){const e={instancePath:t+"/modelNumber",schemaPath:"#/properties/modelNumber/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.serialNumber&&"string"!=typeof e.serialNumber){const e={instancePath:t+"/serialNumber",schemaPath:"#/properties/serialNumber/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.firmwareVersion&&"string"!=typeof e.firmwareVersion){const e={instancePath:t+"/firmwareVersion",schemaPath:"#/properties/firmwareVersion/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}return validate27.errors=r,0===n}var E=function validate30(e,{instancePath:t="",parentData:s,parentDataProperty:i,rootData:a=e}={}){let r=null,n=0;if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.type&&(e.type="discoveredDevice"),void 0===e.name){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.deviceId){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"deviceId"},message:"must have required property 'deviceId'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.deviceData){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"deviceData"},message:"must have required property 'deviceData'"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.id){let s=e.id;if("string"!=typeof s){const e={instancePath:t+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}const i=n,a=n;if("global"!==s&&"system"!==s){const e={};null===r?r=[e]:r.push(e),n++}if(a===n){const e={instancePath:t+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===r?r=[e]:r.push(e),n++}else n=i,null!==r&&(i?r.length=i:r=null)}if(void 0!==e.name&&"string"!=typeof e.name){const e={instancePath:t+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.deviceId&&"string"!=typeof e.deviceId){const e={instancePath:t+"/deviceId",schemaPath:"#/properties/deviceId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}let s=e.type;if("string"!=typeof s){const e={instancePath:t+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("discoveredDevice"!==s){const e={instancePath:t+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:U.properties.type.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.discriminator){let s=e.discriminator;if("string"!=typeof s){const e={instancePath:t+"/discriminator",schemaPath:"definitions.json#/definitions/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("alarm"!==s&&"dimmer"!==s&&"switch"!==s&&"motionSensor"!==s&&"windowCovering"!==s&&"camera"!==s&&"mediaSource"!==s&&"thermostat"!==s&&"lock"!==s&&"courtesy"!==s&&"gateway"!==s&&"tv"!==s&&"dvr"!==s&&"appleTv"!==s&&"discPlayer"!==s&&"mediaPlayer"!==s&&"uncontrolledDevice"!==s){const e={instancePath:t+"/discriminator",schemaPath:"definitions.json#/definitions/type/enum",keyword:"enum",params:{allowedValues:C.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.driver&&"string"!=typeof e.driver){const e={instancePath:t+"/driver",schemaPath:"#/properties/driver/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.deviceData){let s=e.deviceData;if(!s||"object"!=typeof s||Array.isArray(s)){const e={instancePath:t+"/deviceData",schemaPath:"#/properties/deviceData/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.ignore&&"boolean"!=typeof e.ignore){const e={instancePath:t+"/ignore",schemaPath:"#/properties/ignore/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.organizationId){let s=e.organizationId;if("string"!=typeof s&&null!==s){const e={instancePath:t+"/organizationId",schemaPath:"#/properties/organizationId/type",keyword:"type",params:{type:U.properties.organizationId.type},message:"must be string,null"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.propertyId){let s=e.propertyId;if("string"!=typeof s&&null!==s){const e={instancePath:t+"/propertyId",schemaPath:"#/properties/propertyId/type",keyword:"type",params:{type:U.properties.propertyId.type},message:"must be string,null"};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}return validate30.errors=r,0===n},U={$schema:"http://json-schema.org/draft-07/schema",$id:"discoveredDevice.json",title:"Discovered Device",description:"A device that has been discovered by Kohost, but not yet added to the Kohost system.",type:"object",required:["name","deviceId","deviceData"],properties:{id:{$ref:"definitions.json#/definitions/id"},name:{type:"string"},deviceId:{type:"string"},type:{type:"string",enum:["discoveredDevice"],default:"discoveredDevice"},discriminator:{$ref:"definitions.json#/definitions/type"},driver:{type:"string"},deviceData:{type:"object"},ignore:{type:"boolean"},organizationId:{type:["string","null"],description:"Reference (id) to the organization that owns this device"},propertyId:{type:["string","null"],description:"Reference (id) to the property that this device belongs to"}}};var K=function validate31(e,{instancePath:t="",parentData:s,parentDataProperty:i,rootData:a=e}={}){let r=null,n=0;if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.type&&(e.type="emailMessage"),void 0===e.to){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"to"},message:"must have required property 'to'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.from){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"from"},message:"must have required property 'from'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.status){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"status"},message:"must have required property 'status'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.subject){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"subject"},message:"must have required property 'subject'"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.id){let s=e.id;if("string"!=typeof s){const e={instancePath:t+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}const i=n,a=n;if("global"!==s&&"system"!==s){const e={};null===r?r=[e]:r.push(e),n++}if(a===n){const e={instancePath:t+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===r?r=[e]:r.push(e),n++}else n=i,null!==r&&(i?r.length=i:r=null)}let s=e.type;if("string"!=typeof s){const e={instancePath:t+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("emailMessage"!==s){const e={instancePath:t+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:H.properties.type.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.to){let s=e.to;if("string"==typeof s){if(!_.test(s)){const e={instancePath:t+"/to",schemaPath:"#/properties/to/pattern",keyword:"pattern",params:{pattern:"^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\\.[a-zA-Z0-9-.]+$"},message:'must match pattern "^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\\.[a-zA-Z0-9-.]+$"'};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/to",schemaPath:"#/properties/to/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.from){let s=e.from;if("string"==typeof s){if(!W.test(s)){const e={instancePath:t+"/from",schemaPath:"#/properties/from/pattern",keyword:"pattern",params:{pattern:".*<[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\\.[a-zA-Z0-9-.]+>.*"},message:'must match pattern ".*<[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\\.[a-zA-Z0-9-.]+>.*"'};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/from",schemaPath:"#/properties/from/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.subject&&"string"!=typeof e.subject){const e={instancePath:t+"/subject",schemaPath:"#/properties/subject/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.status){let s=e.status;if("string"!=typeof s){const e={instancePath:t+"/status",schemaPath:"#/properties/status/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("queued"!==s&&"sending"!==s&&"sent"!==s&&"deferred"!==s&&"delivered"!==s&&"undelivered"!==s&&"bounced"!==s&&"blocked"!==s&&"receiving"!==s&&"received"!==s&&"opened"!==s&&"clicked"!==s&&"unsubscribed"!==s&&"spamReport"!==s){const e={instancePath:t+"/status",schemaPath:"#/properties/status/enum",keyword:"enum",params:{allowedValues:H.properties.status.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.statusMessage&&"string"!=typeof e.statusMessage){const e={instancePath:t+"/statusMessage",schemaPath:"#/properties/statusMessage/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.html&&"string"!=typeof e.html){const e={instancePath:t+"/html",schemaPath:"#/properties/html/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.text&&"string"!=typeof e.text){const e={instancePath:t+"/text",schemaPath:"#/properties/text/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.driver&&"string"!=typeof e.driver){const e={instancePath:t+"/driver",schemaPath:"#/properties/driver/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.appData){let s=e.appData;if(!s||"object"!=typeof s||Array.isArray(s)){const e={instancePath:t+"/appData",schemaPath:"#/properties/appData/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.createdAt){let s=e.createdAt;if("string"!=typeof s&&(!s||"object"!=typeof s||Array.isArray(s))){const e={instancePath:t+"/createdAt",schemaPath:"definitions.json#/definitions/date/type",keyword:"type",params:{type:j.type},message:"must be string,object"};null===r?r=[e]:r.push(e),n++}if("string"==typeof s&&!I.validate(s)){const e={instancePath:t+"/createdAt",schemaPath:"definitions.json#/definitions/date/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.updatedAt){let s=e.updatedAt;if("string"!=typeof s&&(!s||"object"!=typeof s||Array.isArray(s))){const e={instancePath:t+"/updatedAt",schemaPath:"definitions.json#/definitions/date/type",keyword:"type",params:{type:j.type},message:"must be string,object"};null===r?r=[e]:r.push(e),n++}if("string"==typeof s&&!I.validate(s)){const e={instancePath:t+"/updatedAt",schemaPath:"definitions.json#/definitions/date/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.systemId&&"string"!=typeof e.systemId){const e={instancePath:t+"/systemId",schemaPath:"definitions.json#/definitions/systemId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}return validate31.errors=r,0===n},H={$schema:"http://json-schema.org/draft-07/schema",$id:"emailMessage.json",title:"Email Message",type:"object",required:["to","from","status","subject"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",default:"emailMessage",enum:["emailMessage"]},to:{type:"string",pattern:"^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\\.[a-zA-Z0-9-.]+$"},from:{type:"string",pattern:".*<[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\\.[a-zA-Z0-9-.]+>.*",description:"Must be in the format of 'Sender <email@example.com>"},subject:{type:"string"},status:{type:"string",enum:["queued","sending","sent","deferred","delivered","undelivered","bounced","blocked","receiving","received","opened","clicked","unsubscribed","spamReport"]},statusMessage:{type:"string"},html:{type:"string"},text:{type:"string"},driver:{type:"string"},appData:{type:"object"},createdAt:{$ref:"definitions.json#/definitions/date"},updatedAt:{$ref:"definitions.json#/definitions/date"},systemId:{$ref:"definitions.json#/definitions/systemId"}}},_=new RegExp("^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\\.[a-zA-Z0-9-.]+$","u"),W=new RegExp(".*<[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\\.[a-zA-Z0-9-.]+>.*","u");var Z=function validate32(e,{instancePath:t="",parentData:s,parentDataProperty:i,rootData:a=e}={}){let r=null,n=0;if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.type&&(e.type="energyReport"),void 0===e.id){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.type){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.roomId){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"roomId"},message:"must have required property 'roomId'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.first){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"first"},message:"must have required property 'first'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.last){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"last"},message:"must have required property 'last'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.consumption){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"consumption"},message:"must have required property 'consumption'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.totals){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"totals"},message:"must have required property 'totals'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.costPerKw){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"costPerKw"},message:"must have required property 'costPerKw'"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.id){let s=e.id;if("string"!=typeof s){const e={instancePath:t+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}const i=n,a=n;if("global"!==s&&"system"!==s){const e={};null===r?r=[e]:r.push(e),n++}if(a===n){const e={instancePath:t+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===r?r=[e]:r.push(e),n++}else n=i,null!==r&&(i?r.length=i:r=null)}let s=e.type;if("string"!=typeof s){const e={instancePath:t+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("energyReport"!==s){const e={instancePath:t+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:G.properties.type.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.reportTime){let s=e.reportTime;if("hourly"!==s&&"daily"!==s&&"monthly"!==s){const e={instancePath:t+"/reportTime",schemaPath:"#/properties/reportTime/enum",keyword:"enum",params:{allowedValues:G.properties.reportTime.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.roomId){let s=e.roomId;if("string"!=typeof s){const e={instancePath:t+"/roomId",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}const i=n,a=n;if("global"!==s&&"system"!==s){const e={};null===r?r=[e]:r.push(e),n++}if(a===n){const e={instancePath:t+"/roomId",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===r?r=[e]:r.push(e),n++}else n=i,null!==r&&(i?r.length=i:r=null)}if(void 0!==e.first){let s=e.first;if("string"!=typeof s&&(!s||"object"!=typeof s||Array.isArray(s))){const e={instancePath:t+"/first",schemaPath:"#/properties/first/type",keyword:"type",params:{type:G.properties.first.type},message:"must be string,object"};null===r?r=[e]:r.push(e),n++}if("string"==typeof s&&!I.validate(s)){const e={instancePath:t+"/first",schemaPath:"#/properties/first/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.last){let s=e.last;if("string"!=typeof s&&(!s||"object"!=typeof s||Array.isArray(s))){const e={instancePath:t+"/last",schemaPath:"#/properties/last/type",keyword:"type",params:{type:G.properties.last.type},message:"must be string,object"};null===r?r=[e]:r.push(e),n++}if("string"==typeof s&&!I.validate(s)){const e={instancePath:t+"/last",schemaPath:"#/properties/last/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.consumption){let s=e.consumption;if(Array.isArray(s)){const e=s.length;for(let i=0;i<e;i++){let e=s[i];if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.id){const e={instancePath:t+"/consumption/"+i,schemaPath:"#/properties/consumption/items/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.type){const e={instancePath:t+"/consumption/"+i,schemaPath:"#/properties/consumption/items/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.kwh){const e={instancePath:t+"/consumption/"+i,schemaPath:"#/properties/consumption/items/required",keyword:"required",params:{missingProperty:"kwh"},message:"must have required property 'kwh'"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.id){let s=e.id;if("string"!=typeof s){const e={instancePath:t+"/consumption/"+i+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}const a=n,o=n;if("global"!==s&&"system"!==s){const e={};null===r?r=[e]:r.push(e),n++}if(o===n){const e={instancePath:t+"/consumption/"+i+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===r?r=[e]:r.push(e),n++}else n=a,null!==r&&(a?r.length=a:r=null)}if(void 0!==e.type){let s=e.type;if("string"!=typeof s){const e={instancePath:t+"/consumption/"+i+"/type",schemaPath:"definitions.json#/definitions/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("alarm"!==s&&"dimmer"!==s&&"switch"!==s&&"motionSensor"!==s&&"windowCovering"!==s&&"camera"!==s&&"mediaSource"!==s&&"thermostat"!==s&&"lock"!==s&&"courtesy"!==s&&"gateway"!==s&&"tv"!==s&&"dvr"!==s&&"appleTv"!==s&&"discPlayer"!==s&&"mediaPlayer"!==s&&"uncontrolledDevice"!==s){const e={instancePath:t+"/consumption/"+i+"/type",schemaPath:"definitions.json#/definitions/type/enum",keyword:"enum",params:{allowedValues:C.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.kwh){let s=e.kwh;if("number"==typeof s){if(s<0||isNaN(s)){const e={instancePath:t+"/consumption/"+i+"/kwh",schemaPath:"#/properties/consumption/items/properties/kwh/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/consumption/"+i+"/kwh",schemaPath:"#/properties/consumption/items/properties/kwh/type",keyword:"type",params:{type:"number"},message:"must be number"};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t+"/consumption/"+i,schemaPath:"#/properties/consumption/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t+"/consumption",schemaPath:"#/properties/consumption/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.totals){let s=e.totals;if(Array.isArray(s)){const e=s.length;for(let i=0;i<e;i++){let e=s[i];if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.lights){const e={instancePath:t+"/totals/"+i,schemaPath:"#/properties/totals/items/required",keyword:"required",params:{missingProperty:"lights"},message:"must have required property 'lights'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.climate){const e={instancePath:t+"/totals/"+i,schemaPath:"#/properties/totals/items/required",keyword:"required",params:{missingProperty:"climate"},message:"must have required property 'climate'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.media){const e={instancePath:t+"/totals/"+i,schemaPath:"#/properties/totals/items/required",keyword:"required",params:{missingProperty:"media"},message:"must have required property 'media'"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.lights){let s=e.lights;if("number"==typeof s){if(s<0||isNaN(s)){const e={instancePath:t+"/totals/"+i+"/lights",schemaPath:"#/properties/totals/items/properties/lights/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/totals/"+i+"/lights",schemaPath:"#/properties/totals/items/properties/lights/type",keyword:"type",params:{type:"number"},message:"must be number"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.climate){let s=e.climate;if("number"==typeof s){if(s<0||isNaN(s)){const e={instancePath:t+"/totals/"+i+"/climate",schemaPath:"#/properties/totals/items/properties/climate/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/totals/"+i+"/climate",schemaPath:"#/properties/totals/items/properties/climate/type",keyword:"type",params:{type:"number"},message:"must be number"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.media){let s=e.media;if("number"==typeof s){if(s<0||isNaN(s)){const e={instancePath:t+"/totals/"+i+"/media",schemaPath:"#/properties/totals/items/properties/media/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/totals/"+i+"/media",schemaPath:"#/properties/totals/items/properties/media/type",keyword:"type",params:{type:"number"},message:"must be number"};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t+"/totals/"+i,schemaPath:"#/properties/totals/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t+"/totals",schemaPath:"#/properties/totals/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.costPerKw){let s=e.costPerKw;if("number"==typeof s){if(s<0||isNaN(s)){const e={instancePath:t+"/costPerKw",schemaPath:"#/properties/costPerKw/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/costPerKw",schemaPath:"#/properties/costPerKw/type",keyword:"type",params:{type:"number"},message:"must be number"};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}return validate32.errors=r,0===n},G={$schema:"http://json-schema.org/draft-07/schema",$id:"energyReport.json",title:"Energy Report",description:"Hourly Report for Energy based on energy report shards",type:"object",required:["id","type","roomId","first","last","consumption","totals","costPerKw"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",enum:["energyReport"],default:"energyReport"},reportTime:{time:"string",enum:["hourly","daily","monthly"]},roomId:{$ref:"definitions.json#/definitions/id"},first:{type:["string","object"],format:"date-time"},last:{type:["string","object"],format:"date-time"},consumption:{type:"array",items:{type:"object",required:["id","type","kwh"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{$ref:"definitions.json#/definitions/type"},kwh:{type:"number",minimum:0}}}},totals:{type:"array",items:{type:"object",required:["lights","climate","media"],properties:{lights:{type:"number",minimum:0},climate:{type:"number",minimum:0},media:{type:"number",minimum:0}}}},costPerKw:{type:"number",minimum:0}}};var Y=function validate33(e,{instancePath:t="",parentData:s,parentDataProperty:i,rootData:a=e}={}){let r=null,n=0;if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.type&&(e.type="energyReportShard"),void 0===e.ndata&&(e.ndata=0),void 0===e.id){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.type){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.roomId){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"roomId"},message:"must have required property 'roomId'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.first){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"first"},message:"must have required property 'first'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.last){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"last"},message:"must have required property 'last'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.data){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"data"},message:"must have required property 'data'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.ndata){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"ndata"},message:"must have required property 'ndata'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.expires){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"expires"},message:"must have required property 'expires'"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.id){let s=e.id;if("string"!=typeof s){const e={instancePath:t+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}const i=n,a=n;if("global"!==s&&"system"!==s){const e={};null===r?r=[e]:r.push(e),n++}if(a===n){const e={instancePath:t+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===r?r=[e]:r.push(e),n++}else n=i,null!==r&&(i?r.length=i:r=null)}let s=e.type;if("string"!=typeof s){const e={instancePath:t+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("energyReportShard"!==s){const e={instancePath:t+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:X.properties.type.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.roomId){let s=e.roomId;if("string"!=typeof s){const e={instancePath:t+"/roomId",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}const i=n,a=n;if("global"!==s&&"system"!==s){const e={};null===r?r=[e]:r.push(e),n++}if(a===n){const e={instancePath:t+"/roomId",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===r?r=[e]:r.push(e),n++}else n=i,null!==r&&(i?r.length=i:r=null)}if(void 0!==e.first){let s=e.first;if("string"!=typeof s&&(!s||"object"!=typeof s||Array.isArray(s))){const e={instancePath:t+"/first",schemaPath:"#/properties/first/type",keyword:"type",params:{type:X.properties.first.type},message:"must be string,object"};null===r?r=[e]:r.push(e),n++}if("string"==typeof s&&!I.validate(s)){const e={instancePath:t+"/first",schemaPath:"#/properties/first/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.last){let s=e.last;if("string"!=typeof s&&(!s||"object"!=typeof s||Array.isArray(s))){const e={instancePath:t+"/last",schemaPath:"#/properties/last/type",keyword:"type",params:{type:X.properties.last.type},message:"must be string,object"};null===r?r=[e]:r.push(e),n++}if("string"==typeof s&&!I.validate(s)){const e={instancePath:t+"/last",schemaPath:"#/properties/last/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.data){let s=e.data;if(Array.isArray(s)){const e=s.length;for(let i=0;i<e;i++){let e=s[i];if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.time){const e={instancePath:t+"/data/"+i,schemaPath:"#/properties/data/items/required",keyword:"required",params:{missingProperty:"time"},message:"must have required property 'time'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.watts){const e={instancePath:t+"/data/"+i,schemaPath:"#/properties/data/items/required",keyword:"required",params:{missingProperty:"watts"},message:"must have required property 'watts'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.id){const e={instancePath:t+"/data/"+i,schemaPath:"#/properties/data/items/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.type){const e={instancePath:t+"/data/"+i,schemaPath:"#/properties/data/items/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.value){const e={instancePath:t+"/data/"+i,schemaPath:"#/properties/data/items/required",keyword:"required",params:{missingProperty:"value"},message:"must have required property 'value'"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.time){let s=e.time;if("string"!=typeof s&&(!s||"object"!=typeof s||Array.isArray(s))){const e={instancePath:t+"/data/"+i+"/time",schemaPath:"#/properties/data/items/properties/time/type",keyword:"type",params:{type:X.properties.data.items.properties.time.type},message:"must be string,object"};null===r?r=[e]:r.push(e),n++}if("string"==typeof s&&!I.validate(s)){const e={instancePath:t+"/data/"+i+"/time",schemaPath:"#/properties/data/items/properties/time/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.watts){let s=e.watts;if("number"==typeof s){if(s<0||isNaN(s)){const e={instancePath:t+"/data/"+i+"/watts",schemaPath:"definitions.json#/definitions/watts/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/data/"+i+"/watts",schemaPath:"definitions.json#/definitions/watts/type",keyword:"type",params:{type:"number"},message:"must be number"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.id){let s=e.id;if("string"!=typeof s){const e={instancePath:t+"/data/"+i+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}const a=n,o=n;if("global"!==s&&"system"!==s){const e={};null===r?r=[e]:r.push(e),n++}if(o===n){const e={instancePath:t+"/data/"+i+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===r?r=[e]:r.push(e),n++}else n=a,null!==r&&(a?r.length=a:r=null)}if(void 0!==e.type){let s=e.type;if("string"!=typeof s){const e={instancePath:t+"/data/"+i+"/type",schemaPath:"definitions.json#/definitions/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("alarm"!==s&&"dimmer"!==s&&"switch"!==s&&"motionSensor"!==s&&"windowCovering"!==s&&"camera"!==s&&"mediaSource"!==s&&"thermostat"!==s&&"lock"!==s&&"courtesy"!==s&&"gateway"!==s&&"tv"!==s&&"dvr"!==s&&"appleTv"!==s&&"discPlayer"!==s&&"mediaPlayer"!==s&&"uncontrolledDevice"!==s){const e={instancePath:t+"/data/"+i+"/type",schemaPath:"definitions.json#/definitions/type/enum",keyword:"enum",params:{allowedValues:C.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.value){let s=e.value;if("number"==typeof s){if(s>1||isNaN(s)){const e={instancePath:t+"/data/"+i+"/value",schemaPath:"#/properties/data/items/properties/value/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};null===r?r=[e]:r.push(e),n++}if(s<0||isNaN(s)){const e={instancePath:t+"/data/"+i+"/value",schemaPath:"#/properties/data/items/properties/value/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/data/"+i+"/value",schemaPath:"#/properties/data/items/properties/value/type",keyword:"type",params:{type:"number"},message:"must be number"};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t+"/data/"+i,schemaPath:"#/properties/data/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t+"/data",schemaPath:"#/properties/data/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}}let i=e.ndata;if("number"!=typeof i||i%1||isNaN(i)){const e={instancePath:t+"/ndata",schemaPath:"#/properties/ndata/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===r?r=[e]:r.push(e),n++}if("number"==typeof i){if(i>1e5||isNaN(i)){const e={instancePath:t+"/ndata",schemaPath:"#/properties/ndata/maximum",keyword:"maximum",params:{comparison:"<=",limit:1e5},message:"must be <= 100000"};null===r?r=[e]:r.push(e),n++}if(i<0||isNaN(i)){const e={instancePath:t+"/ndata",schemaPath:"#/properties/ndata/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.expires){let s=e.expires;if("string"!=typeof s&&(!s||"object"!=typeof s||Array.isArray(s))){const e={instancePath:t+"/expires",schemaPath:"#/properties/expires/type",keyword:"type",params:{type:X.properties.expires.type},message:"must be string,object"};null===r?r=[e]:r.push(e),n++}if("string"==typeof s&&!I.validate(s)){const e={instancePath:t+"/expires",schemaPath:"#/properties/expires/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}return validate33.errors=r,0===n},X={$schema:"http://json-schema.org/draft-07/schema",$id:"energyReportShard.json",title:"Energy Report Shard",description:"Shard used for Energy Reports",type:"object",required:["id","type","roomId","first","last","data","ndata","expires"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",enum:["energyReportShard"],default:"energyReportShard"},roomId:{$ref:"definitions.json#/definitions/id"},first:{type:["string","object"],format:"date-time"},last:{type:["string","object"],format:"date-time"},data:{type:"array",items:{type:"object",required:["time","watts","id","type","value"],properties:{time:{type:["string","object"],format:"date-time"},watts:{$ref:"definitions.json#/definitions/watts"},id:{$ref:"definitions.json#/definitions/id"},type:{$ref:"definitions.json#/definitions/type"},value:{type:"number",minimum:0,maximum:1}}}},ndata:{type:"integer",minimum:0,maximum:1e5,default:0},expires:{type:["string","object"],format:"date-time"}}};var Q=function validate34(e,{instancePath:t="",parentData:s,parentDataProperty:i,rootData:a=e}={}){let r=null,n=0;if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.id){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.type){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.status){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"status"},message:"must have required property 'status'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.driver){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"driver"},message:"must have required property 'driver'"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.id){let s=e.id;if("string"!=typeof s){const e={instancePath:t+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}const i=n,a=n;if("global"!==s&&"system"!==s){const e={};null===r?r=[e]:r.push(e),n++}if(a===n){const e={instancePath:t+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===r?r=[e]:r.push(e),n++}else n=i,null!==r&&(i?r.length=i:r=null)}if(void 0!==e.type){let s=e.type;if("string"!=typeof s){const e={instancePath:t+"/type",schemaPath:"definitions.json#/definitions/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("alarm"!==s&&"dimmer"!==s&&"switch"!==s&&"motionSensor"!==s&&"windowCovering"!==s&&"camera"!==s&&"mediaSource"!==s&&"thermostat"!==s&&"lock"!==s&&"courtesy"!==s&&"gateway"!==s&&"tv"!==s&&"dvr"!==s&&"appleTv"!==s&&"discPlayer"!==s&&"mediaPlayer"!==s&&"uncontrolledDevice"!==s){const e={instancePath:t+"/type",schemaPath:"definitions.json#/definitions/type/enum",keyword:"enum",params:{allowedValues:C.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.supportedNotifications){let s=e.supportedNotifications;if(Array.isArray(s)){const e=s.length;for(let i=0;i<e;i++){let e=s[i];if("button 1"!==e&&"button 2"!==e&&"button 3"!==e&&"button 4"!==e&&"button 5"!==e&&"idle"!==e&&"powerHasBeedApplied"!==e&&"acMainsDisconnected"!==e&&"acMainsReconnected"!==e&&"replaceBatterySoon"!==e&&"replaceBatteryNow"!==e&&"batteryOk"!==e&&"hardwareFailure"!==e&&"softwareFailure"!==e&&"hardwareFailureWithCode"!==e&&"softwareFailureWithCode"!==e&&"motionDetection"!==e&&"airFilterNeedsCleaned"!==e&&"airFilterNeedsReplaced"!==e&&"smokeDetected"!==e&&"outsideSafeTemperatureRange"!==e&&"outsideSafeHumidityRange"!==e&&"scheduleMaintenance"!==e&&"doorAjar"!==e&&"communicationFailure"!==e&&"communicationOk"!==e&&"burglarAlarm"!==e&&"fireAlarm"!==e){const e={instancePath:t+"/supportedNotifications/"+i,schemaPath:"definitions.json#/definitions/supportedNotifications/items/enum",keyword:"enum",params:{allowedValues:h.items.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}let i,a=s.length;if(a>1)e:for(;a--;)for(i=a;i--;)if(g(s[a],s[i])){const e={instancePath:t+"/supportedNotifications",schemaPath:"definitions.json#/definitions/supportedNotifications/uniqueItems",keyword:"uniqueItems",params:{i:a,j:i},message:"must NOT have duplicate items (items ## "+i+" and "+a+" are identical)"};null===r?r=[e]:r.push(e),n++;break e}}else{const e={instancePath:t+"/supportedNotifications",schemaPath:"definitions.json#/definitions/supportedNotifications/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.notification&&(validate35(e.notification,{instancePath:t+"/notification",parentData:e,parentDataProperty:"notification",rootData:a})||(r=null===r?validate35.errors:r.concat(validate35.errors),n=r.length)),void 0!==e.status&&"string"!=typeof e.status){const e={instancePath:t+"/status",schemaPath:"#/properties/status/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.systemId&&"string"!=typeof e.systemId){const e={instancePath:t+"/systemId",schemaPath:"definitions.json#/definitions/systemId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.driver){let s=e.driver;if("string"!=typeof s){const e={instancePath:t+"/driver",schemaPath:"definitions.json#/definitions/driver/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("adlink"!==s&&"aws-kinesis"!==s&&"butler"!==s&&"crestron"!==s&&"dell"!==s&&"dmp"!==s&&"doorbird"!==s&&"dormakaba"!==s&&"dsc"!==s&&"ecobee"!==s&&"epson"!==s&&"geovision-rs"!==s&&"geovision-as-manager"!==s&&"honeywell-vista"!==s&&"igor"!==s&&"inncom"!==s&&"isapi"!==s&&"kohost-k7"!==s&&"kohost"!==s&&"lg"!==s&&"lg-webos"!==s&&"lapi"!==s&&"lirc"!==s&&"mews"!==s&&"mht"!==s&&"paxton"!==s&&"pelican-wireless"!==s&&"power-shades"!==s&&"rachio"!==s&&"rebrandly"!==s&&"rtsp"!==s&&"salto"!==s&&"salto-irn"!==s&&"samsung"!==s&&"se"!==s&&"sendgrid"!==s&&"sonifi"!==s&&"stay-n-touch"!==s&&"storable"!==s&&"twilio"!==s&&"unifi"!==s&&"valcom"!==s&&"vizio"!==s&&"wisenet"!==s&&"cloudflare-images"!==s&&"cloudflare-stream"!==s&&"insperia-privacy"!==s){const e={instancePath:t+"/driver",schemaPath:"definitions.json#/definitions/driver/enum",keyword:"enum",params:{allowedValues:f.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.watts){let s=e.watts;if("number"==typeof s){if(s<0||isNaN(s)){const e={instancePath:t+"/watts",schemaPath:"definitions.json#/definitions/watts/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/watts",schemaPath:"definitions.json#/definitions/watts/type",keyword:"type",params:{type:"number"},message:"must be number"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.icon&&"string"!=typeof e.icon){const e={instancePath:t+"/icon",schemaPath:"#/properties/icon/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.modelNumber&&"string"!=typeof e.modelNumber){const e={instancePath:t+"/modelNumber",schemaPath:"#/properties/modelNumber/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.serialNumber&&"string"!=typeof e.serialNumber){const e={instancePath:t+"/serialNumber",schemaPath:"#/properties/serialNumber/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.firmwareVersion&&"string"!=typeof e.firmwareVersion){const e={instancePath:t+"/firmwareVersion",schemaPath:"#/properties/firmwareVersion/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}return validate34.errors=r,0===n};function validate35(e,{instancePath:t="",parentData:s,parentDataProperty:i,rootData:a=e}={}){let r=null,n=0;if((!e||"object"!=typeof e||Array.isArray(e))&&null!==e){const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:b.type},message:"must be object,null"};null===r?r=[e]:r.push(e),n++}if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0!==e.name){let s=e.name;if("string"!=typeof s){const e={instancePath:t+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("button 1"!==s&&"button 2"!==s&&"button 3"!==s&&"button 4"!==s&&"button 5"!==s&&"idle"!==s&&"powerHasBeedApplied"!==s&&"acMainsDisconnected"!==s&&"acMainsReconnected"!==s&&"replaceBatterySoon"!==s&&"replaceBatteryNow"!==s&&"batteryOk"!==s&&"hardwareFailure"!==s&&"softwareFailure"!==s&&"hardwareFailureWithCode"!==s&&"softwareFailureWithCode"!==s&&"motionDetection"!==s&&"airFilterNeedsCleaned"!==s&&"airFilterNeedsReplaced"!==s&&"smokeDetected"!==s&&"outsideSafeTemperatureRange"!==s&&"outsideSafeHumidityRange"!==s&&"scheduleMaintenance"!==s&&"doorAjar"!==s&&"communicationFailure"!==s&&"communicationOk"!==s&&"burglarAlarm"!==s&&"fireAlarm"!==s){const e={instancePath:t+"/name",schemaPath:"#/definitions/supportedNotifications/items/enum",keyword:"enum",params:{allowedValues:v.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.timestamp){let s=e.timestamp;if("number"==typeof s){if(s<1655907956593||isNaN(s)){const e={instancePath:t+"/timestamp",schemaPath:"#/properties/timestamp/minimum",keyword:"minimum",params:{comparison:">=",limit:1655907956593},message:"must be >= 1655907956593"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/timestamp",schemaPath:"#/properties/timestamp/type",keyword:"type",params:{type:"number"},message:"must be number"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.description&&"string"!=typeof e.description){const e={instancePath:t+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}return validate35.errors=r,0===n}var J=validate37,ee={$schema:"http://json-schema.org/draft-07/schema",$id:"identification.json",title:"Identification",type:"object",required:["type"],oneOf:[{required:["number"]},{required:["encryptedNumber"]}],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",enum:["driversLicense","passport","identityCard","visa"]},number:{string:"string"},maskedNumber:{string:"string"},encryptedNumber:{string:"string"},issued:{type:["string","object"],format:"date-time"},expires:{type:["string","object","null"],format:"date-time"},verified:{type:"boolean"},matched:{type:"boolean"},firstName:{type:"string"},lastName:{type:"string"},issuingCountry:{string:"string",minLength:2,maxLength:2},systemId:{$ref:"definitions.json#/definitions/systemId"}}};function validate37(e,{instancePath:t="",parentData:s,parentDataProperty:i,rootData:a=e}={}){let r=null,n=0;const o=n;let p=!1,m=null;const d=n;if(e&&"object"==typeof e&&!Array.isArray(e)&&void 0===e.number){const e={instancePath:t,schemaPath:"#/oneOf/0/required",keyword:"required",params:{missingProperty:"number"},message:"must have required property 'number'"};null===r?r=[e]:r.push(e),n++}(l=d===n)&&(p=!0,m=0);const u=n;if(e&&"object"==typeof e&&!Array.isArray(e)&&void 0===e.encryptedNumber){const e={instancePath:t,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"encryptedNumber"},message:"must have required property 'encryptedNumber'"};null===r?r=[e]:r.push(e),n++}var l;if((l=u===n)&&p?(p=!1,m=[m,1]):l&&(p=!0,m=1),p)n=o,null!==r&&(o?r.length=o:r=null);else{const e={instancePath:t,schemaPath:"#/oneOf",keyword:"oneOf",params:{passingSchemas:m},message:"must match exactly one schema in oneOf"};null===r?r=[e]:r.push(e),n++}if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.type){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.id){let s=e.id;if("string"!=typeof s){const e={instancePath:t+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}const i=n,a=n;if("global"!==s&&"system"!==s){const e={};null===r?r=[e]:r.push(e),n++}if(a===n){const e={instancePath:t+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===r?r=[e]:r.push(e),n++}else n=i,null!==r&&(i?r.length=i:r=null)}if(void 0!==e.type){let s=e.type;if("string"!=typeof s){const e={instancePath:t+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("driversLicense"!==s&&"passport"!==s&&"identityCard"!==s&&"visa"!==s){const e={instancePath:t+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:ee.properties.type.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.issued){let s=e.issued;if("string"!=typeof s&&(!s||"object"!=typeof s||Array.isArray(s))){const e={instancePath:t+"/issued",schemaPath:"#/properties/issued/type",keyword:"type",params:{type:ee.properties.issued.type},message:"must be string,object"};null===r?r=[e]:r.push(e),n++}if("string"==typeof s&&!I.validate(s)){const e={instancePath:t+"/issued",schemaPath:"#/properties/issued/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.expires){let s=e.expires;if("string"!=typeof s&&(!s||"object"!=typeof s||Array.isArray(s))&&null!==s){const e={instancePath:t+"/expires",schemaPath:"#/properties/expires/type",keyword:"type",params:{type:ee.properties.expires.type},message:"must be string,object,null"};null===r?r=[e]:r.push(e),n++}if("string"==typeof s&&!I.validate(s)){const e={instancePath:t+"/expires",schemaPath:"#/properties/expires/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.verified&&"boolean"!=typeof e.verified){const e={instancePath:t+"/verified",schemaPath:"#/properties/verified/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.matched&&"boolean"!=typeof e.matched){const e={instancePath:t+"/matched",schemaPath:"#/properties/matched/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.firstName&&"string"!=typeof e.firstName){const e={instancePath:t+"/firstName",schemaPath:"#/properties/firstName/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.lastName&&"string"!=typeof e.lastName){const e={instancePath:t+"/lastName",schemaPath:"#/properties/lastName/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.issuingCountry){let s=e.issuingCountry;if("string"==typeof s){if(P(s)>2){const e={instancePath:t+"/issuingCountry",schemaPath:"#/properties/issuingCountry/maxLength",keyword:"maxLength",params:{limit:2},message:"must NOT have more than 2 characters"};null===r?r=[e]:r.push(e),n++}if(P(s)<2){const e={instancePath:t+"/issuingCountry",schemaPath:"#/properties/issuingCountry/minLength",keyword:"minLength",params:{limit:2},message:"must NOT have fewer than 2 characters"};null===r?r=[e]:r.push(e),n++}}}if(void 0!==e.systemId&&"string"!=typeof e.systemId){const e={instancePath:t+"/systemId",schemaPath:"definitions.json#/definitions/systemId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}return validate37.errors=r,0===n}var te=function validate38(e,{instancePath:t="",parentData:s,parentDataProperty:i,rootData:a=e}={}){let r=null,n=0;if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.type&&(e.type="issue"),void 0===e.autoCreateTicket&&(e.autoCreateTicket=!0),void 0===e.excludedResources&&(e.excludedResources=[]),void 0===e.id){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.type){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.name){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.department){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"department"},message:"must have required property 'department'"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.id){let s=e.id;if("string"!=typeof s){const e={instancePath:t+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}const i=n,a=n;if("global"!==s&&"system"!==s){const e={};null===r?r=[e]:r.push(e),n++}if(a===n){const e={instancePath:t+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===r?r=[e]:r.push(e),n++}else n=i,null!==r&&(i?r.length=i:r=null)}let s=e.type;if("string"!=typeof s){const e={instancePath:t+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("issue"!==s){const e={instancePath:t+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:se.properties.type.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.name&&"string"!=typeof e.name){const e={instancePath:t+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.description&&"string"!=typeof e.description){const e={instancePath:t+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.department&&"string"!=typeof e.department){const e={instancePath:t+"/department",schemaPath:"#/properties/department/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.autoAssign){let s=e.autoAssign;if(s&&"object"==typeof s&&!Array.isArray(s)){if(void 0!==s.userId&&"string"!=typeof s.userId){const e={instancePath:t+"/autoAssign/userId",schemaPath:"#/properties/autoAssign/properties/userId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==s.vendorId&&"string"!=typeof s.vendorId){const e={instancePath:t+"/autoAssign/vendorId",schemaPath:"#/properties/autoAssign/properties/vendorId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==s.priority){let e=s.priority;if("string"!=typeof e){const e={instancePath:t+"/autoAssign/priority",schemaPath:"ticket.json#/properties/priority/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("low"!==e&&"normal"!==e&&"high"!==e){const e={instancePath:t+"/autoAssign/priority",schemaPath:"ticket.json#/properties/priority/enum",keyword:"enum",params:{allowedValues:ie.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}if(void 0!==s.tags){let e=s.tags;if(Array.isArray(e)){const s=e.length;for(let i=0;i<s;i++)if("string"!=typeof e[i]){const e={instancePath:t+"/autoAssign/tags/"+i,schemaPath:"#/properties/autoAssign/properties/tags/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/autoAssign/tags",schemaPath:"#/properties/autoAssign/properties/tags/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t+"/autoAssign",schemaPath:"#/properties/autoAssign/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.systemKey&&"string"!=typeof e.systemKey){const e={instancePath:t+"/systemKey",schemaPath:"#/properties/systemKey/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("boolean"!=typeof e.autoCreateTicket){const e={instancePath:t+"/autoCreateTicket",schemaPath:"#/properties/autoCreateTicket/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===r?r=[e]:r.push(e),n++}let i=e.excludedResources;if(Array.isArray(i)){const e=i.length;for(let s=0;s<e;s++)if("string"!=typeof i[s]){const e={instancePath:t+"/excludedResources/"+s,schemaPath:"#/properties/excludedResources/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/excludedResources",schemaPath:"#/properties/excludedResources/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}return validate38.errors=r,0===n},se={$schema:"http://json-schema.org/draft-07/schema",$id:"issue.json",title:"Issue",description:"An issue associated with ticketing and concierge.",type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",enum:["issue"],default:"issue"},name:{type:"string"},description:{type:"string"},department:{type:"string"},autoAssign:{type:"object",properties:{userId:{type:"string"},vendorId:{type:"string"},priority:{$ref:"ticket.json#/properties/priority"},tags:{type:"array",items:{type:"string"}}}},systemKey:{type:"string"},autoCreateTicket:{type:"boolean",default:!0},excludedResources:{type:"array",description:"A list of resources that should not trigger notifications of this issue",items:{type:"string"},default:[]}},required:["id","type","name","department"]},ie={type:"string",enum:["low","normal","high"],default:"normal"};var ae=validate45,re={$schema:"http://json-schema.org/draft-07/schema",$id:"lock.json",title:"Lock",description:"Any smart lock",type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},name:{type:"string"},type:{$ref:"definitions.json#/definitions/type"},offline:{type:"boolean"},supportedNotifications:{$ref:"definitions.json#/definitions/supportedNotifications"},notification:{$ref:"definitions.json#/definitions/notification"},driver:{$ref:"definitions.json#/definitions/driver"},state:{type:["string","null"],enum:["locked","unlocked",null]},mode:{type:["string","null"],enum:["normal","autoLock","emergencyOpen","emergencyClose","holdOpen","lockdown",null],description:"emergencyOpen and emergencyClose are deprecated and can be removed once Salto, Paxton and Geovision drivers are updated",default:null},supportedModes:{type:"array",uniqueItems:!0,items:{enum:["normal","autoLock","emergencyOpen","emergencyClose","holdOpen","lockdown",null]}},batteryLevel:{$ref:"definitions.json#/definitions/batteryLevel"},systemId:{$ref:"definitions.json#/definitions/systemId"},watts:{$ref:"definitions.json#/definitions/watts"},icon:{type:"string"},modelNumber:{type:"string"},serialNumber:{type:"string"},firmwareVersion:{type:"string"}},required:["id","type","state","driver"]};function validate46(e,{instancePath:t="",parentData:s,parentDataProperty:i,rootData:a=e}={}){let r=null,n=0;if((!e||"object"!=typeof e||Array.isArray(e))&&null!==e){const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:b.type},message:"must be object,null"};null===r?r=[e]:r.push(e),n++}if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0!==e.name){let s=e.name;if("string"!=typeof s){const e={instancePath:t+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("button 1"!==s&&"button 2"!==s&&"button 3"!==s&&"button 4"!==s&&"button 5"!==s&&"idle"!==s&&"powerHasBeedApplied"!==s&&"acMainsDisconnected"!==s&&"acMainsReconnected"!==s&&"replaceBatterySoon"!==s&&"replaceBatteryNow"!==s&&"batteryOk"!==s&&"hardwareFailure"!==s&&"softwareFailure"!==s&&"hardwareFailureWithCode"!==s&&"softwareFailureWithCode"!==s&&"motionDetection"!==s&&"airFilterNeedsCleaned"!==s&&"airFilterNeedsReplaced"!==s&&"smokeDetected"!==s&&"outsideSafeTemperatureRange"!==s&&"outsideSafeHumidityRange"!==s&&"scheduleMaintenance"!==s&&"doorAjar"!==s&&"communicationFailure"!==s&&"communicationOk"!==s&&"burglarAlarm"!==s&&"fireAlarm"!==s){const e={instancePath:t+"/name",schemaPath:"#/definitions/supportedNotifications/items/enum",keyword:"enum",params:{allowedValues:v.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.timestamp){let s=e.timestamp;if("number"==typeof s){if(s<1655907956593||isNaN(s)){const e={instancePath:t+"/timestamp",schemaPath:"#/properties/timestamp/minimum",keyword:"minimum",params:{comparison:">=",limit:1655907956593},message:"must be >= 1655907956593"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/timestamp",schemaPath:"#/properties/timestamp/type",keyword:"type",params:{type:"number"},message:"must be number"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.description&&"string"!=typeof e.description){const e={instancePath:t+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}return validate46.errors=r,0===n}function validate45(e,{instancePath:t="",parentData:s,parentDataProperty:i,rootData:a=e}={}){let r=null,n=0;if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.mode&&(e.mode=null),void 0===e.id){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.type){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.state){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"state"},message:"must have required property 'state'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.driver){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"driver"},message:"must have required property 'driver'"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.id){let s=e.id;if("string"!=typeof s){const e={instancePath:t+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}const i=n,a=n;if("global"!==s&&"system"!==s){const e={};null===r?r=[e]:r.push(e),n++}if(a===n){const e={instancePath:t+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===r?r=[e]:r.push(e),n++}else n=i,null!==r&&(i?r.length=i:r=null)}if(void 0!==e.name&&"string"!=typeof e.name){const e={instancePath:t+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.type){let s=e.type;if("string"!=typeof s){const e={instancePath:t+"/type",schemaPath:"definitions.json#/definitions/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("alarm"!==s&&"dimmer"!==s&&"switch"!==s&&"motionSensor"!==s&&"windowCovering"!==s&&"camera"!==s&&"mediaSource"!==s&&"thermostat"!==s&&"lock"!==s&&"courtesy"!==s&&"gateway"!==s&&"tv"!==s&&"dvr"!==s&&"appleTv"!==s&&"discPlayer"!==s&&"mediaPlayer"!==s&&"uncontrolledDevice"!==s){const e={instancePath:t+"/type",schemaPath:"definitions.json#/definitions/type/enum",keyword:"enum",params:{allowedValues:C.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.offline&&"boolean"!=typeof e.offline){const e={instancePath:t+"/offline",schemaPath:"#/properties/offline/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.supportedNotifications){let s=e.supportedNotifications;if(Array.isArray(s)){const e=s.length;for(let i=0;i<e;i++){let e=s[i];if("button 1"!==e&&"button 2"!==e&&"button 3"!==e&&"button 4"!==e&&"button 5"!==e&&"idle"!==e&&"powerHasBeedApplied"!==e&&"acMainsDisconnected"!==e&&"acMainsReconnected"!==e&&"replaceBatterySoon"!==e&&"replaceBatteryNow"!==e&&"batteryOk"!==e&&"hardwareFailure"!==e&&"softwareFailure"!==e&&"hardwareFailureWithCode"!==e&&"softwareFailureWithCode"!==e&&"motionDetection"!==e&&"airFilterNeedsCleaned"!==e&&"airFilterNeedsReplaced"!==e&&"smokeDetected"!==e&&"outsideSafeTemperatureRange"!==e&&"outsideSafeHumidityRange"!==e&&"scheduleMaintenance"!==e&&"doorAjar"!==e&&"communicationFailure"!==e&&"communicationOk"!==e&&"burglarAlarm"!==e&&"fireAlarm"!==e){const e={instancePath:t+"/supportedNotifications/"+i,schemaPath:"definitions.json#/definitions/supportedNotifications/items/enum",keyword:"enum",params:{allowedValues:h.items.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}let i,a=s.length;if(a>1)e:for(;a--;)for(i=a;i--;)if(g(s[a],s[i])){const e={instancePath:t+"/supportedNotifications",schemaPath:"definitions.json#/definitions/supportedNotifications/uniqueItems",keyword:"uniqueItems",params:{i:a,j:i},message:"must NOT have duplicate items (items ## "+i+" and "+a+" are identical)"};null===r?r=[e]:r.push(e),n++;break e}}else{const e={instancePath:t+"/supportedNotifications",schemaPath:"definitions.json#/definitions/supportedNotifications/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.notification&&(validate46(e.notification,{instancePath:t+"/notification",parentData:e,parentDataProperty:"notification",rootData:a})||(r=null===r?validate46.errors:r.concat(validate46.errors),n=r.length)),void 0!==e.driver){let s=e.driver;if("string"!=typeof s){const e={instancePath:t+"/driver",schemaPath:"definitions.json#/definitions/driver/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("adlink"!==s&&"aws-kinesis"!==s&&"butler"!==s&&"crestron"!==s&&"dell"!==s&&"dmp"!==s&&"doorbird"!==s&&"dormakaba"!==s&&"dsc"!==s&&"ecobee"!==s&&"epson"!==s&&"geovision-rs"!==s&&"geovision-as-manager"!==s&&"honeywell-vista"!==s&&"igor"!==s&&"inncom"!==s&&"isapi"!==s&&"kohost-k7"!==s&&"kohost"!==s&&"lg"!==s&&"lg-webos"!==s&&"lapi"!==s&&"lirc"!==s&&"mews"!==s&&"mht"!==s&&"paxton"!==s&&"pelican-wireless"!==s&&"power-shades"!==s&&"rachio"!==s&&"rebrandly"!==s&&"rtsp"!==s&&"salto"!==s&&"salto-irn"!==s&&"samsung"!==s&&"se"!==s&&"sendgrid"!==s&&"sonifi"!==s&&"stay-n-touch"!==s&&"storable"!==s&&"twilio"!==s&&"unifi"!==s&&"valcom"!==s&&"vizio"!==s&&"wisenet"!==s&&"cloudflare-images"!==s&&"cloudflare-stream"!==s&&"insperia-privacy"!==s){const e={instancePath:t+"/driver",schemaPath:"definitions.json#/definitions/driver/enum",keyword:"enum",params:{allowedValues:f.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.state){let s=e.state;if("string"!=typeof s&&null!==s){const e={instancePath:t+"/state",schemaPath:"#/properties/state/type",keyword:"type",params:{type:re.properties.state.type},message:"must be string,null"};null===r?r=[e]:r.push(e),n++}if("locked"!==s&&"unlocked"!==s&&null!==s){const e={instancePath:t+"/state",schemaPath:"#/properties/state/enum",keyword:"enum",params:{allowedValues:re.properties.state.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}let s=e.mode;if("string"!=typeof s&&null!==s){const e={instancePath:t+"/mode",schemaPath:"#/properties/mode/type",keyword:"type",params:{type:re.properties.mode.type},message:"must be string,null"};null===r?r=[e]:r.push(e),n++}if("normal"!==s&&"autoLock"!==s&&"emergencyOpen"!==s&&"emergencyClose"!==s&&"holdOpen"!==s&&"lockdown"!==s&&null!==s){const e={instancePath:t+"/mode",schemaPath:"#/properties/mode/enum",keyword:"enum",params:{allowedValues:re.properties.mode.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.supportedModes){let s=e.supportedModes;if(Array.isArray(s)){const e=s.length;for(let i=0;i<e;i++){let e=s[i];if("normal"!==e&&"autoLock"!==e&&"emergencyOpen"!==e&&"emergencyClose"!==e&&"holdOpen"!==e&&"lockdown"!==e&&null!==e){const e={instancePath:t+"/supportedModes/"+i,schemaPath:"#/properties/supportedModes/items/enum",keyword:"enum",params:{allowedValues:re.properties.supportedModes.items.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}let i,a=s.length;if(a>1)e:for(;a--;)for(i=a;i--;)if(g(s[a],s[i])){const e={instancePath:t+"/supportedModes",schemaPath:"#/properties/supportedModes/uniqueItems",keyword:"uniqueItems",params:{i:a,j:i},message:"must NOT have duplicate items (items ## "+i+" and "+a+" are identical)"};null===r?r=[e]:r.push(e),n++;break e}}else{const e={instancePath:t+"/supportedModes",schemaPath:"#/properties/supportedModes/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.batteryLevel){let s=e.batteryLevel;if("number"==typeof s){if(s>100||isNaN(s)){const e={instancePath:t+"/batteryLevel",schemaPath:"definitions.json#/definitions/batteryLevel/maximum",keyword:"maximum",params:{comparison:"<=",limit:100},message:"must be <= 100"};null===r?r=[e]:r.push(e),n++}if(s<0||isNaN(s)){const e={instancePath:t+"/batteryLevel",schemaPath:"definitions.json#/definitions/batteryLevel/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/batteryLevel",schemaPath:"definitions.json#/definitions/batteryLevel/type",keyword:"type",params:{type:"number"},message:"must be number"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.systemId&&"string"!=typeof e.systemId){const e={instancePath:t+"/systemId",schemaPath:"definitions.json#/definitions/systemId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.watts){let s=e.watts;if("number"==typeof s){if(s<0||isNaN(s)){const e={instancePath:t+"/watts",schemaPath:"definitions.json#/definitions/watts/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/watts",schemaPath:"definitions.json#/definitions/watts/type",keyword:"type",params:{type:"number"},message:"must be number"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.icon&&"string"!=typeof e.icon){const e={instancePath:t+"/icon",schemaPath:"#/properties/icon/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.modelNumber&&"string"!=typeof e.modelNumber){const e={instancePath:t+"/modelNumber",schemaPath:"#/properties/modelNumber/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.serialNumber&&"string"!=typeof e.serialNumber){const e={instancePath:t+"/serialNumber",schemaPath:"#/properties/serialNumber/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.firmwareVersion&&"string"!=typeof e.firmwareVersion){const e={instancePath:t+"/firmwareVersion",schemaPath:"#/properties/firmwareVersion/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}return validate45.errors=r,0===n}var ne=function validate48(e,{instancePath:t="",parentData:s,parentDataProperty:i,rootData:a=e}={}){let r=null,n=0;if(e&&"object"==typeof e&&!Array.isArray(e)){void 0===e.type&&(e.type="log");let s=e.type;if("string"!=typeof s){const e={instancePath:t+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("log"!==s){const e={instancePath:t+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:oe.properties.type.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.timestamp){let s=e.timestamp;if("number"==typeof s){if(s<1655907956593||isNaN(s)){const e={instancePath:t+"/timestamp",schemaPath:"#/properties/timestamp/minimum",keyword:"minimum",params:{comparison:">=",limit:1655907956593},message:"must be >= 1655907956593"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/timestamp",schemaPath:"#/properties/timestamp/type",keyword:"type",params:{type:"number"},message:"must be number"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.name&&"string"!=typeof e.name){const e={instancePath:t+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.field1){let s=e.field1;if(s&&"object"==typeof s&&!Array.isArray(s)){if(void 0===s.name){const e={instancePath:t+"/field1",schemaPath:"#/properties/field1/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};null===r?r=[e]:r.push(e),n++}if(void 0===s.value){const e={instancePath:t+"/field1",schemaPath:"#/properties/field1/required",keyword:"required",params:{missingProperty:"value"},message:"must have required property 'value'"};null===r?r=[e]:r.push(e),n++}if(void 0!==s.name&&"string"!=typeof s.name){const e={instancePath:t+"/field1/name",schemaPath:"#/properties/field1/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==s.value&&"string"!=typeof s.value){const e={instancePath:t+"/field1/value",schemaPath:"#/properties/field1/properties/value/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/field1",schemaPath:"#/properties/field1/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.field2){let s=e.field2;if(s&&"object"==typeof s&&!Array.isArray(s)){if(void 0===s.name){const e={instancePath:t+"/field2",schemaPath:"#/properties/field2/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};null===r?r=[e]:r.push(e),n++}if(void 0===s.value){const e={instancePath:t+"/field2",schemaPath:"#/properties/field2/required",keyword:"required",params:{missingProperty:"value"},message:"must have required property 'value'"};null===r?r=[e]:r.push(e),n++}if(void 0!==s.name&&"string"!=typeof s.name){const e={instancePath:t+"/field2/name",schemaPath:"#/properties/field2/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==s.value&&"string"!=typeof s.value){const e={instancePath:t+"/field2/value",schemaPath:"#/properties/field2/properties/value/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/field2",schemaPath:"#/properties/field2/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.field3){let s=e.field3;if(s&&"object"==typeof s&&!Array.isArray(s)){if(void 0===s.name){const e={instancePath:t+"/field3",schemaPath:"#/properties/field3/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};null===r?r=[e]:r.push(e),n++}if(void 0===s.value){const e={instancePath:t+"/field3",schemaPath:"#/properties/field3/required",keyword:"required",params:{missingProperty:"value"},message:"must have required property 'value'"};null===r?r=[e]:r.push(e),n++}if(void 0!==s.name&&"string"!=typeof s.name){const e={instancePath:t+"/field3/name",schemaPath:"#/properties/field3/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==s.value&&"string"!=typeof s.value){const e={instancePath:t+"/field3/value",schemaPath:"#/properties/field3/properties/value/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/field3",schemaPath:"#/properties/field3/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.field4){let s=e.field4;if(s&&"object"==typeof s&&!Array.isArray(s)){if(void 0===s.name){const e={instancePath:t+"/field4",schemaPath:"#/properties/field4/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};null===r?r=[e]:r.push(e),n++}if(void 0===s.value){const e={instancePath:t+"/field4",schemaPath:"#/properties/field4/required",keyword:"required",params:{missingProperty:"value"},message:"must have required property 'value'"};null===r?r=[e]:r.push(e),n++}if(void 0!==s.name&&"string"!=typeof s.name){const e={instancePath:t+"/field4/name",schemaPath:"#/properties/field4/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==s.value&&"string"!=typeof s.value){const e={instancePath:t+"/field4/value",schemaPath:"#/properties/field4/properties/value/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/field4",schemaPath:"#/properties/field4/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.field5){let s=e.field5;if(s&&"object"==typeof s&&!Array.isArray(s)){if(void 0===s.name){const e={instancePath:t+"/field5",schemaPath:"#/properties/field5/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};null===r?r=[e]:r.push(e),n++}if(void 0===s.value){const e={instancePath:t+"/field5",schemaPath:"#/properties/field5/required",keyword:"required",params:{missingProperty:"value"},message:"must have required property 'value'"};null===r?r=[e]:r.push(e),n++}if(void 0!==s.name&&"string"!=typeof s.name){const e={instancePath:t+"/field5/name",schemaPath:"#/properties/field5/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==s.value&&"string"!=typeof s.value){const e={instancePath:t+"/field5/value",schemaPath:"#/properties/field5/properties/value/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/field5",schemaPath:"#/properties/field5/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.field6){let s=e.field6;if(s&&"object"==typeof s&&!Array.isArray(s)){if(void 0===s.name){const e={instancePath:t+"/field6",schemaPath:"#/properties/field6/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};null===r?r=[e]:r.push(e),n++}if(void 0===s.value){const e={instancePath:t+"/field6",schemaPath:"#/properties/field6/required",keyword:"required",params:{missingProperty:"value"},message:"must have required property 'value'"};null===r?r=[e]:r.push(e),n++}if(void 0!==s.name&&"string"!=typeof s.name){const e={instancePath:t+"/field6/name",schemaPath:"#/properties/field6/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==s.value&&"string"!=typeof s.value){const e={instancePath:t+"/field6/value",schemaPath:"#/properties/field6/properties/value/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/field6",schemaPath:"#/properties/field6/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}return validate48.errors=r,0===n},oe={$schema:"http://json-schema.org/draft-07/schema",$id:"log.json",title:"Log",type:"object",properties:{type:{type:"string",default:"log",enum:["log"]},timestamp:{type:"number",minimum:1655907956593},name:{type:"string",description:"Event name"},field1:{type:"object",required:["name","value"],properties:{name:{type:"string"},value:{type:"string"}}},field2:{type:"object",required:["name","value"],properties:{name:{type:"string"},value:{type:"string"}}},field3:{type:"object",required:["name","value"],properties:{name:{type:"string"},value:{type:"string"}}},field4:{type:"object",required:["name","value"],properties:{name:{type:"string"},value:{type:"string"}}},field5:{type:"object",required:["name","value"],properties:{name:{type:"string"},value:{type:"string"}}},field6:{type:"object",required:["name","value"],properties:{name:{type:"string"},value:{type:"string"}}}}};var pe=validate15,me=validate49,de={$schema:"http://json-schema.org/draft-07/schema",$id:"mediaSource.json",title:"Media Source",description:"Any media source",type:"object",required:["id","type","discriminator","audio","video","driver"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",default:"mediaSource",enum:["mediaSource"]},discriminator:{type:"string",enum:["tv","dvr","appleTv","discPlayer","mediaPlayer","paSystem","uncontrolledDevice"]},playlists:{type:"array",items:{type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},name:{$ref:"definitions.json#/definitions/name"}}}},remote:{type:"string",enum:["MR22GA","XRT260","XRT270","HOF-16K 1.2","219863500","SONIFI","AKB76039803","BN59-01388A"]},name:{$ref:"definitions.json#/definitions/name"},driver:{$ref:"definitions.json#/definitions/driver"},offline:{type:"boolean"},audio:{type:"boolean"},video:{type:"boolean"},powerFeedback:{type:"boolean"},volumeFeedback:{type:"boolean"},muted:{type:"boolean"},volume:{type:"number",minimum:0,maximum:100},brightness:{type:"number",minimum:0,maximum:100},contrast:{type:"number",minimum:0,maximum:100},power:{type:"string",enum:["on","off"]},input:{type:"string"},supportedInputs:{type:"array",items:{type:"string"}},supportedOutputs:{type:"array",items:{type:"string"}},command:{type:["string","null"],enum:["mute","volumeUp","volumeDown","brightnessUp","brightnessDown","channelUp","channelDown","number0","number1","number2","number3","number4","number5","number6","number7","number8","number9","lastChannel","display","favoriteChannel","play","playing","stop","stopped","pause","paused","fastForward","fastForwarding","rewind","rewinding","instantReplay","record","ac3","pvrMenu","guide","menu","menuUp","menuDown","menuLeft","menuRight","pageUp","pageDown","select","exit","input","power","enterChannel","enterVolume","enterBrightness","enterContrast","number10","number11","number12","number13","number14","number15","number16","number10Plus","number20Plus","number100","dash","threeChan","threeD","sixChan","a","add","alarm","am","analog","angle","antenna","antennaEast","antennaWest","aspect","audio1","audio2","audio3","audioDumming","audioLevelDown","audioLevelUp","b","back","c","component1","component2","component3","d","home","list","liveTv","discreteInputCable","powerOff","powerOn","setupMenu","skipForward","skipReverse","video1","video2","video3","video4","video5","details","hdmi1","hdmi2","hdmi3","cecDeviceList","mtsSap","red","green","yellow","blue","alert","order"]},supportedNotifications:{$ref:"definitions.json#/definitions/supportedNotifications"},notification:{$ref:"definitions.json#/definitions/notification"},systemId:{$ref:"definitions.json#/definitions/systemId"},watts:{$ref:"definitions.json#/definitions/watts"},icon:{type:"string"},modelNumber:{type:"string"},serialNumber:{type:"string"},firmwareVersion:{type:"string"}},additionalProperties:!1};function validate50(e,{instancePath:t="",parentData:s,parentDataProperty:i,rootData:a=e}={}){let r=null,n=0;if((!e||"object"!=typeof e||Array.isArray(e))&&null!==e){const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:b.type},message:"must be object,null"};null===r?r=[e]:r.push(e),n++}if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0!==e.name){let s=e.name;if("string"!=typeof s){const e={instancePath:t+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("button 1"!==s&&"button 2"!==s&&"button 3"!==s&&"button 4"!==s&&"button 5"!==s&&"idle"!==s&&"powerHasBeedApplied"!==s&&"acMainsDisconnected"!==s&&"acMainsReconnected"!==s&&"replaceBatterySoon"!==s&&"replaceBatteryNow"!==s&&"batteryOk"!==s&&"hardwareFailure"!==s&&"softwareFailure"!==s&&"hardwareFailureWithCode"!==s&&"softwareFailureWithCode"!==s&&"motionDetection"!==s&&"airFilterNeedsCleaned"!==s&&"airFilterNeedsReplaced"!==s&&"smokeDetected"!==s&&"outsideSafeTemperatureRange"!==s&&"outsideSafeHumidityRange"!==s&&"scheduleMaintenance"!==s&&"doorAjar"!==s&&"communicationFailure"!==s&&"communicationOk"!==s&&"burglarAlarm"!==s&&"fireAlarm"!==s){const e={instancePath:t+"/name",schemaPath:"#/definitions/supportedNotifications/items/enum",keyword:"enum",params:{allowedValues:v.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.timestamp){let s=e.timestamp;if("number"==typeof s){if(s<1655907956593||isNaN(s)){const e={instancePath:t+"/timestamp",schemaPath:"#/properties/timestamp/minimum",keyword:"minimum",params:{comparison:">=",limit:1655907956593},message:"must be >= 1655907956593"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/timestamp",schemaPath:"#/properties/timestamp/type",keyword:"type",params:{type:"number"},message:"must be number"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.description&&"string"!=typeof e.description){const e={instancePath:t+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}return validate50.errors=r,0===n}function validate49(e,{instancePath:t="",parentData:s,parentDataProperty:i,rootData:a=e}={}){let r=null,n=0;if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.type&&(e.type="mediaSource"),void 0===e.id){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.type){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.discriminator){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"discriminator"},message:"must have required property 'discriminator'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.audio){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"audio"},message:"must have required property 'audio'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.video){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"video"},message:"must have required property 'video'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.driver){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"driver"},message:"must have required property 'driver'"};null===r?r=[e]:r.push(e),n++}for(const s in e)if(!A.call(de.properties,s)){const e={instancePath:t,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:s},message:"must NOT have additional properties"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.id){let s=e.id;if("string"!=typeof s){const e={instancePath:t+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}const i=n,a=n;if("global"!==s&&"system"!==s){const e={};null===r?r=[e]:r.push(e),n++}if(a===n){const e={instancePath:t+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===r?r=[e]:r.push(e),n++}else n=i,null!==r&&(i?r.length=i:r=null)}let s=e.type;if("string"!=typeof s){const e={instancePath:t+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("mediaSource"!==s){const e={instancePath:t+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:de.properties.type.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.discriminator){let s=e.discriminator;if("string"!=typeof s){const e={instancePath:t+"/discriminator",schemaPath:"#/properties/discriminator/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("tv"!==s&&"dvr"!==s&&"appleTv"!==s&&"discPlayer"!==s&&"mediaPlayer"!==s&&"paSystem"!==s&&"uncontrolledDevice"!==s){const e={instancePath:t+"/discriminator",schemaPath:"#/properties/discriminator/enum",keyword:"enum",params:{allowedValues:de.properties.discriminator.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.playlists){let s=e.playlists;if(Array.isArray(s)){const e=s.length;for(let i=0;i<e;i++){let e=s[i];if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0!==e.id){let s=e.id;if("string"!=typeof s){const e={instancePath:t+"/playlists/"+i+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}const a=n,o=n;if("global"!==s&&"system"!==s){const e={};null===r?r=[e]:r.push(e),n++}if(o===n){const e={instancePath:t+"/playlists/"+i+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===r?r=[e]:r.push(e),n++}else n=a,null!==r&&(a?r.length=a:r=null)}if(void 0!==e.name&&"string"!=typeof e.name){const e={instancePath:t+"/playlists/"+i+"/name",schemaPath:"definitions.json#/definitions/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/playlists/"+i,schemaPath:"#/properties/playlists/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t+"/playlists",schemaPath:"#/properties/playlists/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.remote){let s=e.remote;if("string"!=typeof s){const e={instancePath:t+"/remote",schemaPath:"#/properties/remote/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("MR22GA"!==s&&"XRT260"!==s&&"XRT270"!==s&&"HOF-16K 1.2"!==s&&"219863500"!==s&&"SONIFI"!==s&&"AKB76039803"!==s&&"BN59-01388A"!==s){const e={instancePath:t+"/remote",schemaPath:"#/properties/remote/enum",keyword:"enum",params:{allowedValues:de.properties.remote.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.name&&"string"!=typeof e.name){const e={instancePath:t+"/name",schemaPath:"definitions.json#/definitions/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.driver){let s=e.driver;if("string"!=typeof s){const e={instancePath:t+"/driver",schemaPath:"definitions.json#/definitions/driver/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("adlink"!==s&&"aws-kinesis"!==s&&"butler"!==s&&"crestron"!==s&&"dell"!==s&&"dmp"!==s&&"doorbird"!==s&&"dormakaba"!==s&&"dsc"!==s&&"ecobee"!==s&&"epson"!==s&&"geovision-rs"!==s&&"geovision-as-manager"!==s&&"honeywell-vista"!==s&&"igor"!==s&&"inncom"!==s&&"isapi"!==s&&"kohost-k7"!==s&&"kohost"!==s&&"lg"!==s&&"lg-webos"!==s&&"lapi"!==s&&"lirc"!==s&&"mews"!==s&&"mht"!==s&&"paxton"!==s&&"pelican-wireless"!==s&&"power-shades"!==s&&"rachio"!==s&&"rebrandly"!==s&&"rtsp"!==s&&"salto"!==s&&"salto-irn"!==s&&"samsung"!==s&&"se"!==s&&"sendgrid"!==s&&"sonifi"!==s&&"stay-n-touch"!==s&&"storable"!==s&&"twilio"!==s&&"unifi"!==s&&"valcom"!==s&&"vizio"!==s&&"wisenet"!==s&&"cloudflare-images"!==s&&"cloudflare-stream"!==s&&"insperia-privacy"!==s){const e={instancePath:t+"/driver",schemaPath:"definitions.json#/definitions/driver/enum",keyword:"enum",params:{allowedValues:f.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.offline&&"boolean"!=typeof e.offline){const e={instancePath:t+"/offline",schemaPath:"#/properties/offline/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.audio&&"boolean"!=typeof e.audio){const e={instancePath:t+"/audio",schemaPath:"#/properties/audio/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.video&&"boolean"!=typeof e.video){const e={instancePath:t+"/video",schemaPath:"#/properties/video/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.powerFeedback&&"boolean"!=typeof e.powerFeedback){const e={instancePath:t+"/powerFeedback",schemaPath:"#/properties/powerFeedback/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.volumeFeedback&&"boolean"!=typeof e.volumeFeedback){const e={instancePath:t+"/volumeFeedback",schemaPath:"#/properties/volumeFeedback/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.muted&&"boolean"!=typeof e.muted){const e={instancePath:t+"/muted",schemaPath:"#/properties/muted/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.volume){let s=e.volume;if("number"==typeof s){if(s>100||isNaN(s)){const e={instancePath:t+"/volume",schemaPath:"#/properties/volume/maximum",keyword:"maximum",params:{comparison:"<=",limit:100},message:"must be <= 100"};null===r?r=[e]:r.push(e),n++}if(s<0||isNaN(s)){const e={instancePath:t+"/volume",schemaPath:"#/properties/volume/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/volume",schemaPath:"#/properties/volume/type",keyword:"type",params:{type:"number"},message:"must be number"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.brightness){let s=e.brightness;if("number"==typeof s){if(s>100||isNaN(s)){const e={instancePath:t+"/brightness",schemaPath:"#/properties/brightness/maximum",keyword:"maximum",params:{comparison:"<=",limit:100},message:"must be <= 100"};null===r?r=[e]:r.push(e),n++}if(s<0||isNaN(s)){const e={instancePath:t+"/brightness",schemaPath:"#/properties/brightness/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/brightness",schemaPath:"#/properties/brightness/type",keyword:"type",params:{type:"number"},message:"must be number"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.contrast){let s=e.contrast;if("number"==typeof s){if(s>100||isNaN(s)){const e={instancePath:t+"/contrast",schemaPath:"#/properties/contrast/maximum",keyword:"maximum",params:{comparison:"<=",limit:100},message:"must be <= 100"};null===r?r=[e]:r.push(e),n++}if(s<0||isNaN(s)){const e={instancePath:t+"/contrast",schemaPath:"#/properties/contrast/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/contrast",schemaPath:"#/properties/contrast/type",keyword:"type",params:{type:"number"},message:"must be number"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.power){let s=e.power;if("string"!=typeof s){const e={instancePath:t+"/power",schemaPath:"#/properties/power/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("on"!==s&&"off"!==s){const e={instancePath:t+"/power",schemaPath:"#/properties/power/enum",keyword:"enum",params:{allowedValues:de.properties.power.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.input&&"string"!=typeof e.input){const e={instancePath:t+"/input",schemaPath:"#/properties/input/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.supportedInputs){let s=e.supportedInputs;if(Array.isArray(s)){const e=s.length;for(let i=0;i<e;i++)if("string"!=typeof s[i]){const e={instancePath:t+"/supportedInputs/"+i,schemaPath:"#/properties/supportedInputs/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/supportedInputs",schemaPath:"#/properties/supportedInputs/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.supportedOutputs){let s=e.supportedOutputs;if(Array.isArray(s)){const e=s.length;for(let i=0;i<e;i++)if("string"!=typeof s[i]){const e={instancePath:t+"/supportedOutputs/"+i,schemaPath:"#/properties/supportedOutputs/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/supportedOutputs",schemaPath:"#/properties/supportedOutputs/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.command){let s=e.command;if("string"!=typeof s&&null!==s){const e={instancePath:t+"/command",schemaPath:"#/properties/command/type",keyword:"type",params:{type:de.properties.command.type},message:"must be string,null"};null===r?r=[e]:r.push(e),n++}if("mute"!==s&&"volumeUp"!==s&&"volumeDown"!==s&&"brightnessUp"!==s&&"brightnessDown"!==s&&"channelUp"!==s&&"channelDown"!==s&&"number0"!==s&&"number1"!==s&&"number2"!==s&&"number3"!==s&&"number4"!==s&&"number5"!==s&&"number6"!==s&&"number7"!==s&&"number8"!==s&&"number9"!==s&&"lastChannel"!==s&&"display"!==s&&"favoriteChannel"!==s&&"play"!==s&&"playing"!==s&&"stop"!==s&&"stopped"!==s&&"pause"!==s&&"paused"!==s&&"fastForward"!==s&&"fastForwarding"!==s&&"rewind"!==s&&"rewinding"!==s&&"instantReplay"!==s&&"record"!==s&&"ac3"!==s&&"pvrMenu"!==s&&"guide"!==s&&"menu"!==s&&"menuUp"!==s&&"menuDown"!==s&&"menuLeft"!==s&&"menuRight"!==s&&"pageUp"!==s&&"pageDown"!==s&&"select"!==s&&"exit"!==s&&"input"!==s&&"power"!==s&&"enterChannel"!==s&&"enterVolume"!==s&&"enterBrightness"!==s&&"enterContrast"!==s&&"number10"!==s&&"number11"!==s&&"number12"!==s&&"number13"!==s&&"number14"!==s&&"number15"!==s&&"number16"!==s&&"number10Plus"!==s&&"number20Plus"!==s&&"number100"!==s&&"dash"!==s&&"threeChan"!==s&&"threeD"!==s&&"sixChan"!==s&&"a"!==s&&"add"!==s&&"alarm"!==s&&"am"!==s&&"analog"!==s&&"angle"!==s&&"antenna"!==s&&"antennaEast"!==s&&"antennaWest"!==s&&"aspect"!==s&&"audio1"!==s&&"audio2"!==s&&"audio3"!==s&&"audioDumming"!==s&&"audioLevelDown"!==s&&"audioLevelUp"!==s&&"b"!==s&&"back"!==s&&"c"!==s&&"component1"!==s&&"component2"!==s&&"component3"!==s&&"d"!==s&&"home"!==s&&"list"!==s&&"liveTv"!==s&&"discreteInputCable"!==s&&"powerOff"!==s&&"powerOn"!==s&&"setupMenu"!==s&&"skipForward"!==s&&"skipReverse"!==s&&"video1"!==s&&"video2"!==s&&"video3"!==s&&"video4"!==s&&"video5"!==s&&"details"!==s&&"hdmi1"!==s&&"hdmi2"!==s&&"hdmi3"!==s&&"cecDeviceList"!==s&&"mtsSap"!==s&&"red"!==s&&"green"!==s&&"yellow"!==s&&"blue"!==s&&"alert"!==s&&"order"!==s){const e={instancePath:t+"/command",schemaPath:"#/properties/command/enum",keyword:"enum",params:{allowedValues:de.properties.command.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.supportedNotifications){let s=e.supportedNotifications;if(Array.isArray(s)){const e=s.length;for(let i=0;i<e;i++){let e=s[i];if("button 1"!==e&&"button 2"!==e&&"button 3"!==e&&"button 4"!==e&&"button 5"!==e&&"idle"!==e&&"powerHasBeedApplied"!==e&&"acMainsDisconnected"!==e&&"acMainsReconnected"!==e&&"replaceBatterySoon"!==e&&"replaceBatteryNow"!==e&&"batteryOk"!==e&&"hardwareFailure"!==e&&"softwareFailure"!==e&&"hardwareFailureWithCode"!==e&&"softwareFailureWithCode"!==e&&"motionDetection"!==e&&"airFilterNeedsCleaned"!==e&&"airFilterNeedsReplaced"!==e&&"smokeDetected"!==e&&"outsideSafeTemperatureRange"!==e&&"outsideSafeHumidityRange"!==e&&"scheduleMaintenance"!==e&&"doorAjar"!==e&&"communicationFailure"!==e&&"communicationOk"!==e&&"burglarAlarm"!==e&&"fireAlarm"!==e){const e={instancePath:t+"/supportedNotifications/"+i,schemaPath:"definitions.json#/definitions/supportedNotifications/items/enum",keyword:"enum",params:{allowedValues:h.items.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}let i,a=s.length;if(a>1)e:for(;a--;)for(i=a;i--;)if(g(s[a],s[i])){const e={instancePath:t+"/supportedNotifications",schemaPath:"definitions.json#/definitions/supportedNotifications/uniqueItems",keyword:"uniqueItems",params:{i:a,j:i},message:"must NOT have duplicate items (items ## "+i+" and "+a+" are identical)"};null===r?r=[e]:r.push(e),n++;break e}}else{const e={instancePath:t+"/supportedNotifications",schemaPath:"definitions.json#/definitions/supportedNotifications/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.notification&&(validate50(e.notification,{instancePath:t+"/notification",parentData:e,parentDataProperty:"notification",rootData:a})||(r=null===r?validate50.errors:r.concat(validate50.errors),n=r.length)),void 0!==e.systemId&&"string"!=typeof e.systemId){const e={instancePath:t+"/systemId",schemaPath:"definitions.json#/definitions/systemId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.watts){let s=e.watts;if("number"==typeof s){if(s<0||isNaN(s)){const e={instancePath:t+"/watts",schemaPath:"definitions.json#/definitions/watts/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/watts",schemaPath:"definitions.json#/definitions/watts/type",keyword:"type",params:{type:"number"},message:"must be number"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.icon&&"string"!=typeof e.icon){const e={instancePath:t+"/icon",schemaPath:"#/properties/icon/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.modelNumber&&"string"!=typeof e.modelNumber){const e={instancePath:t+"/modelNumber",schemaPath:"#/properties/modelNumber/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.serialNumber&&"string"!=typeof e.serialNumber){const e={instancePath:t+"/serialNumber",schemaPath:"#/properties/serialNumber/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.firmwareVersion&&"string"!=typeof e.firmwareVersion){const e={instancePath:t+"/firmwareVersion",schemaPath:"#/properties/firmwareVersion/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}return validate49.errors=r,0===n}var ue=validate52,le={$schema:"http://json-schema.org/draft-07/schema",$id:"motionSensor.json",title:"Motion Sensor",description:"Any smart motion sensor",type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},type:{$ref:"definitions.json#/definitions/type"},driver:{$ref:"definitions.json#/definitions/driver"},systemId:{$ref:"definitions.json#/definitions/systemId"},supportedNotifications:{$ref:"definitions.json#/definitions/supportedNotifications"},notification:{$ref:"definitions.json#/definitions/notification"},watts:{$ref:"definitions.json#/definitions/watts"},icon:{type:"string"},modelNumber:{type:"string"},serialNumber:{type:"string"},firmwareVersion:{type:"string"}},additionalProperties:!1,required:["id","type","driver"]};function validate53(e,{instancePath:t="",parentData:s,parentDataProperty:i,rootData:a=e}={}){let r=null,n=0;if((!e||"object"!=typeof e||Array.isArray(e))&&null!==e){const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:b.type},message:"must be object,null"};null===r?r=[e]:r.push(e),n++}if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0!==e.name){let s=e.name;if("string"!=typeof s){const e={instancePath:t+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("button 1"!==s&&"button 2"!==s&&"button 3"!==s&&"button 4"!==s&&"button 5"!==s&&"idle"!==s&&"powerHasBeedApplied"!==s&&"acMainsDisconnected"!==s&&"acMainsReconnected"!==s&&"replaceBatterySoon"!==s&&"replaceBatteryNow"!==s&&"batteryOk"!==s&&"hardwareFailure"!==s&&"softwareFailure"!==s&&"hardwareFailureWithCode"!==s&&"softwareFailureWithCode"!==s&&"motionDetection"!==s&&"airFilterNeedsCleaned"!==s&&"airFilterNeedsReplaced"!==s&&"smokeDetected"!==s&&"outsideSafeTemperatureRange"!==s&&"outsideSafeHumidityRange"!==s&&"scheduleMaintenance"!==s&&"doorAjar"!==s&&"communicationFailure"!==s&&"communicationOk"!==s&&"burglarAlarm"!==s&&"fireAlarm"!==s){const e={instancePath:t+"/name",schemaPath:"#/definitions/supportedNotifications/items/enum",keyword:"enum",params:{allowedValues:v.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.timestamp){let s=e.timestamp;if("number"==typeof s){if(s<1655907956593||isNaN(s)){const e={instancePath:t+"/timestamp",schemaPath:"#/properties/timestamp/minimum",keyword:"minimum",params:{comparison:">=",limit:1655907956593},message:"must be >= 1655907956593"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/timestamp",schemaPath:"#/properties/timestamp/type",keyword:"type",params:{type:"number"},message:"must be number"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.description&&"string"!=typeof e.description){const e={instancePath:t+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}return validate53.errors=r,0===n}function validate52(e,{instancePath:t="",parentData:s,parentDataProperty:i,rootData:a=e}={}){let r=null,n=0;if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.id){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.type){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.driver){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"driver"},message:"must have required property 'driver'"};null===r?r=[e]:r.push(e),n++}for(const s in e)if(!A.call(le.properties,s)){const e={instancePath:t,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:s},message:"must NOT have additional properties"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.id){let s=e.id;if("string"!=typeof s){const e={instancePath:t+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}const i=n,a=n;if("global"!==s&&"system"!==s){const e={};null===r?r=[e]:r.push(e),n++}if(a===n){const e={instancePath:t+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===r?r=[e]:r.push(e),n++}else n=i,null!==r&&(i?r.length=i:r=null)}if(void 0!==e.type){let s=e.type;if("string"!=typeof s){const e={instancePath:t+"/type",schemaPath:"definitions.json#/definitions/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("alarm"!==s&&"dimmer"!==s&&"switch"!==s&&"motionSensor"!==s&&"windowCovering"!==s&&"camera"!==s&&"mediaSource"!==s&&"thermostat"!==s&&"lock"!==s&&"courtesy"!==s&&"gateway"!==s&&"tv"!==s&&"dvr"!==s&&"appleTv"!==s&&"discPlayer"!==s&&"mediaPlayer"!==s&&"uncontrolledDevice"!==s){const e={instancePath:t+"/type",schemaPath:"definitions.json#/definitions/type/enum",keyword:"enum",params:{allowedValues:C.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.driver){let s=e.driver;if("string"!=typeof s){const e={instancePath:t+"/driver",schemaPath:"definitions.json#/definitions/driver/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("adlink"!==s&&"aws-kinesis"!==s&&"butler"!==s&&"crestron"!==s&&"dell"!==s&&"dmp"!==s&&"doorbird"!==s&&"dormakaba"!==s&&"dsc"!==s&&"ecobee"!==s&&"epson"!==s&&"geovision-rs"!==s&&"geovision-as-manager"!==s&&"honeywell-vista"!==s&&"igor"!==s&&"inncom"!==s&&"isapi"!==s&&"kohost-k7"!==s&&"kohost"!==s&&"lg"!==s&&"lg-webos"!==s&&"lapi"!==s&&"lirc"!==s&&"mews"!==s&&"mht"!==s&&"paxton"!==s&&"pelican-wireless"!==s&&"power-shades"!==s&&"rachio"!==s&&"rebrandly"!==s&&"rtsp"!==s&&"salto"!==s&&"salto-irn"!==s&&"samsung"!==s&&"se"!==s&&"sendgrid"!==s&&"sonifi"!==s&&"stay-n-touch"!==s&&"storable"!==s&&"twilio"!==s&&"unifi"!==s&&"valcom"!==s&&"vizio"!==s&&"wisenet"!==s&&"cloudflare-images"!==s&&"cloudflare-stream"!==s&&"insperia-privacy"!==s){const e={instancePath:t+"/driver",schemaPath:"definitions.json#/definitions/driver/enum",keyword:"enum",params:{allowedValues:f.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.systemId&&"string"!=typeof e.systemId){const e={instancePath:t+"/systemId",schemaPath:"definitions.json#/definitions/systemId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.supportedNotifications){let s=e.supportedNotifications;if(Array.isArray(s)){const e=s.length;for(let i=0;i<e;i++){let e=s[i];if("button 1"!==e&&"button 2"!==e&&"button 3"!==e&&"button 4"!==e&&"button 5"!==e&&"idle"!==e&&"powerHasBeedApplied"!==e&&"acMainsDisconnected"!==e&&"acMainsReconnected"!==e&&"replaceBatterySoon"!==e&&"replaceBatteryNow"!==e&&"batteryOk"!==e&&"hardwareFailure"!==e&&"softwareFailure"!==e&&"hardwareFailureWithCode"!==e&&"softwareFailureWithCode"!==e&&"motionDetection"!==e&&"airFilterNeedsCleaned"!==e&&"airFilterNeedsReplaced"!==e&&"smokeDetected"!==e&&"outsideSafeTemperatureRange"!==e&&"outsideSafeHumidityRange"!==e&&"scheduleMaintenance"!==e&&"doorAjar"!==e&&"communicationFailure"!==e&&"communicationOk"!==e&&"burglarAlarm"!==e&&"fireAlarm"!==e){const e={instancePath:t+"/supportedNotifications/"+i,schemaPath:"definitions.json#/definitions/supportedNotifications/items/enum",keyword:"enum",params:{allowedValues:h.items.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}let i,a=s.length;if(a>1)e:for(;a--;)for(i=a;i--;)if(g(s[a],s[i])){const e={instancePath:t+"/supportedNotifications",schemaPath:"definitions.json#/definitions/supportedNotifications/uniqueItems",keyword:"uniqueItems",params:{i:a,j:i},message:"must NOT have duplicate items (items ## "+i+" and "+a+" are identical)"};null===r?r=[e]:r.push(e),n++;break e}}else{const e={instancePath:t+"/supportedNotifications",schemaPath:"definitions.json#/definitions/supportedNotifications/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.notification&&(validate53(e.notification,{instancePath:t+"/notification",parentData:e,parentDataProperty:"notification",rootData:a})||(r=null===r?validate53.errors:r.concat(validate53.errors),n=r.length)),void 0!==e.watts){let s=e.watts;if("number"==typeof s){if(s<0||isNaN(s)){const e={instancePath:t+"/watts",schemaPath:"definitions.json#/definitions/watts/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/watts",schemaPath:"definitions.json#/definitions/watts/type",keyword:"type",params:{type:"number"},message:"must be number"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.icon&&"string"!=typeof e.icon){const e={instancePath:t+"/icon",schemaPath:"#/properties/icon/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.modelNumber&&"string"!=typeof e.modelNumber){const e={instancePath:t+"/modelNumber",schemaPath:"#/properties/modelNumber/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.serialNumber&&"string"!=typeof e.serialNumber){const e={instancePath:t+"/serialNumber",schemaPath:"#/properties/serialNumber/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.firmwareVersion&&"string"!=typeof e.firmwareVersion){const e={instancePath:t+"/firmwareVersion",schemaPath:"#/properties/firmwareVersion/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}return validate52.errors=r,0===n}var ce=function validate55(e,{instancePath:t="",parentData:s,parentDataProperty:i,rootData:a=e}={}){let r=null,n=0;if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.type&&(e.type="order"),void 0===e.items&&(e.items=[]),void 0===e.taxes&&(e.taxes=[]),void 0===e.fees&&(e.fees=[]),void 0===e.delivery&&(e.delivery=[]),void 0===e.payments&&(e.payments=[]),void 0===e.type){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.status){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"status"},message:"must have required property 'status'"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.id){let s=e.id;if("string"!=typeof s){const e={instancePath:t+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}const i=n,a=n;if("global"!==s&&"system"!==s){const e={};null===r?r=[e]:r.push(e),n++}if(a===n){const e={instancePath:t+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===r?r=[e]:r.push(e),n++}else n=i,null!==r&&(i?r.length=i:r=null)}let s=e.type;if("string"!=typeof s){const e={instancePath:t+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("order"!==s){const e={instancePath:t+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:ye.properties.type.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.orderNumber&&"string"!=typeof e.orderNumber){const e={instancePath:t+"/orderNumber",schemaPath:"#/properties/orderNumber/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.status){let s=e.status;if("string"!=typeof s){const e={instancePath:t+"/status",schemaPath:"#/properties/status/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("draft"!==s&&"pendingPayment"!==s&&"processing"!==s&&"outForDelivery"!==s&&"completed"!==s&&"paymentFailed"!==s&&"cancelled"!==s&&"refunded"!==s){const e={instancePath:t+"/status",schemaPath:"#/properties/status/enum",keyword:"enum",params:{allowedValues:ye.properties.status.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.userId){let s=e.userId;if("string"!=typeof s){const e={instancePath:t+"/userId",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}const i=n,a=n;if("global"!==s&&"system"!==s){const e={};null===r?r=[e]:r.push(e),n++}if(a===n){const e={instancePath:t+"/userId",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===r?r=[e]:r.push(e),n++}else n=i,null!==r&&(i?r.length=i:r=null)}if(void 0!==e.reservationId){let s=e.reservationId;if("string"!=typeof s){const e={instancePath:t+"/reservationId",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}const i=n,a=n;if("global"!==s&&"system"!==s){const e={};null===r?r=[e]:r.push(e),n++}if(a===n){const e={instancePath:t+"/reservationId",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===r?r=[e]:r.push(e),n++}else n=i,null!==r&&(i?r.length=i:r=null)}if(void 0!==e.date){let s=e.date;if("string"!=typeof s&&(!s||"object"!=typeof s||Array.isArray(s))){const e={instancePath:t+"/date",schemaPath:"definitions.json#/definitions/date/type",keyword:"type",params:{type:j.type},message:"must be string,object"};null===r?r=[e]:r.push(e),n++}if("string"==typeof s&&!I.validate(s)){const e={instancePath:t+"/date",schemaPath:"definitions.json#/definitions/date/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===r?r=[e]:r.push(e),n++}}let i=e.items;if(Array.isArray(i)){const e=i.length;for(let s=0;s<e;s++){let e=i[s];if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.quantity&&(e.quantity=1),void 0===e.name){const e={instancePath:t+"/items/"+s,schemaPath:"#/properties/items/items/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.price){const e={instancePath:t+"/items/"+s,schemaPath:"#/properties/items/items/required",keyword:"required",params:{missingProperty:"price"},message:"must have required property 'price'"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.additionalProperties){const e={instancePath:t+"/items/"+s+"/additionalProperties",schemaPath:"#/properties/items/items/properties/additionalProperties/false schema",keyword:"false schema",params:{},message:"boolean schema is false"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.name&&"string"!=typeof e.name){const e={instancePath:t+"/items/"+s+"/name",schemaPath:"#/properties/items/items/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.sku&&"string"!=typeof e.sku){const e={instancePath:t+"/items/"+s+"/sku",schemaPath:"#/properties/items/items/properties/sku/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("number"!=typeof e.quantity){const e={instancePath:t+"/items/"+s+"/quantity",schemaPath:"#/properties/items/items/properties/quantity/type",keyword:"type",params:{type:"number"},message:"must be number"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.price&&"number"!=typeof e.price){const e={instancePath:t+"/items/"+s+"/price",schemaPath:"#/properties/items/items/properties/price/type",keyword:"type",params:{type:"number"},message:"must be number"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.taxClass&&"string"!=typeof e.taxClass){const e={instancePath:t+"/items/"+s+"/taxClass",schemaPath:"#/properties/items/items/properties/taxClass/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.deliveryClass&&"string"!=typeof e.deliveryClass){const e={instancePath:t+"/items/"+s+"/deliveryClass",schemaPath:"#/properties/items/items/properties/deliveryClass/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.productId&&"string"!=typeof e.productId){const e={instancePath:t+"/items/"+s+"/productId",schemaPath:"#/properties/items/items/properties/productId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/items/"+s,schemaPath:"#/properties/items/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t+"/items",schemaPath:"#/properties/items/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}let a=e.taxes;if(Array.isArray(a)){const e=a.length;for(let s=0;s<e;s++){let e=a[s];if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.rateType&&(e.rateType="percentage"),void 0===e.name){const e={instancePath:t+"/taxes/"+s,schemaPath:"#/properties/taxes/items/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.rate){const e={instancePath:t+"/taxes/"+s,schemaPath:"#/properties/taxes/items/required",keyword:"required",params:{missingProperty:"rate"},message:"must have required property 'rate'"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.additionalProperties){const e={instancePath:t+"/taxes/"+s+"/additionalProperties",schemaPath:"#/properties/taxes/items/properties/additionalProperties/false schema",keyword:"false schema",params:{},message:"boolean schema is false"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.name&&"string"!=typeof e.name){const e={instancePath:t+"/taxes/"+s+"/name",schemaPath:"#/properties/taxes/items/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.class&&"string"!=typeof e.class){const e={instancePath:t+"/taxes/"+s+"/class",schemaPath:"#/properties/taxes/items/properties/class/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}let i=e.rateType;if("string"!=typeof i){const e={instancePath:t+"/taxes/"+s+"/rateType",schemaPath:"#/properties/taxes/items/properties/rateType/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("percentage"!==i&&"flat"!==i){const e={instancePath:t+"/taxes/"+s+"/rateType",schemaPath:"#/properties/taxes/items/properties/rateType/enum",keyword:"enum",params:{allowedValues:ye.properties.taxes.items.properties.rateType.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.rate&&"number"!=typeof e.rate){const e={instancePath:t+"/taxes/"+s+"/rate",schemaPath:"#/properties/taxes/items/properties/rate/type",keyword:"type",params:{type:"number"},message:"must be number"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.total&&"number"!=typeof e.total){const e={instancePath:t+"/taxes/"+s+"/total",schemaPath:"#/properties/taxes/items/properties/total/type",keyword:"type",params:{type:"number"},message:"must be number"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/taxes/"+s,schemaPath:"#/properties/taxes/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t+"/taxes",schemaPath:"#/properties/taxes/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}let o=e.fees;if(Array.isArray(o)){const e=o.length;for(let s=0;s<e;s++){let e=o[s];if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.name){const e={instancePath:t+"/fees/"+s,schemaPath:"#/properties/fees/items/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.price){const e={instancePath:t+"/fees/"+s,schemaPath:"#/properties/fees/items/required",keyword:"required",params:{missingProperty:"price"},message:"must have required property 'price'"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.additionalProperties){const e={instancePath:t+"/fees/"+s+"/additionalProperties",schemaPath:"#/properties/fees/items/properties/additionalProperties/false schema",keyword:"false schema",params:{},message:"boolean schema is false"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.name&&"string"!=typeof e.name){const e={instancePath:t+"/fees/"+s+"/name",schemaPath:"#/properties/fees/items/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.price&&"number"!=typeof e.price){const e={instancePath:t+"/fees/"+s+"/price",schemaPath:"#/properties/fees/items/properties/price/type",keyword:"type",params:{type:"number"},message:"must be number"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/fees/"+s,schemaPath:"#/properties/fees/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t+"/fees",schemaPath:"#/properties/fees/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}let p=e.delivery;if(Array.isArray(p)){const e=p.length;for(let s=0;s<e;s++){let e=p[s];if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.rateType&&(e.rateType="percentage"),void 0===e.name){const e={instancePath:t+"/delivery/"+s,schemaPath:"#/properties/delivery/items/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.rate){const e={instancePath:t+"/delivery/"+s,schemaPath:"#/properties/delivery/items/required",keyword:"required",params:{missingProperty:"rate"},message:"must have required property 'rate'"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.additionalProperties){const e={instancePath:t+"/delivery/"+s+"/additionalProperties",schemaPath:"#/properties/delivery/items/properties/additionalProperties/false schema",keyword:"false schema",params:{},message:"boolean schema is false"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.name&&"string"!=typeof e.name){const e={instancePath:t+"/delivery/"+s+"/name",schemaPath:"#/properties/delivery/items/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.class&&"string"!=typeof e.class){const e={instancePath:t+"/delivery/"+s+"/class",schemaPath:"#/properties/delivery/items/properties/class/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}let i=e.rateType;if("string"!=typeof i){const e={instancePath:t+"/delivery/"+s+"/rateType",schemaPath:"#/properties/delivery/items/properties/rateType/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("percentage"!==i&&"flat"!==i){const e={instancePath:t+"/delivery/"+s+"/rateType",schemaPath:"#/properties/delivery/items/properties/rateType/enum",keyword:"enum",params:{allowedValues:ye.properties.delivery.items.properties.rateType.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.rate&&"number"!=typeof e.rate){const e={instancePath:t+"/delivery/"+s+"/rate",schemaPath:"#/properties/delivery/items/properties/rate/type",keyword:"type",params:{type:"number"},message:"must be number"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.total&&"number"!=typeof e.total){const e={instancePath:t+"/delivery/"+s+"/total",schemaPath:"#/properties/delivery/items/properties/total/type",keyword:"type",params:{type:"number"},message:"must be number"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/delivery/"+s,schemaPath:"#/properties/delivery/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t+"/delivery",schemaPath:"#/properties/delivery/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}let m=e.payments;if(Array.isArray(m)){const e=m.length;for(let s=0;s<e;s++){let e=m[s];if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0!==e.method){let i=e.method;if("string"!=typeof i){const e={instancePath:t+"/payments/"+s+"/method",schemaPath:"#/properties/payments/items/properties/method/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("folio"!==i&&"invoice"!==i&&"amex"!==i&&"visa"!==i&&"masterCard"!==i&&"maestro"!==i&&"discover"!==i&&"diners"!==i&&"jcb"!==i&&"applePay"!==i&&"alipay"!==i&&"chinaUnionPay"!==i&&"vpay"!==i){const e={instancePath:t+"/payments/"+s+"/method",schemaPath:"#/properties/payments/items/properties/method/enum",keyword:"enum",params:{allowedValues:ye.properties.payments.items.properties.method.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.name&&"string"!=typeof e.name){const e={instancePath:t+"/payments/"+s+"/name",schemaPath:"#/properties/payments/items/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.date){let i=e.date;if("string"!=typeof i&&(!i||"object"!=typeof i||Array.isArray(i))){const e={instancePath:t+"/payments/"+s+"/date",schemaPath:"definitions.json#/definitions/date/type",keyword:"type",params:{type:j.type},message:"must be string,object"};null===r?r=[e]:r.push(e),n++}if("string"==typeof i&&!I.validate(i)){const e={instancePath:t+"/payments/"+s+"/date",schemaPath:"definitions.json#/definitions/date/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.amount&&"number"!=typeof e.amount){const e={instancePath:t+"/payments/"+s+"/amount",schemaPath:"#/properties/payments/items/properties/amount/type",keyword:"type",params:{type:"number"},message:"must be number"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.transactionReference&&"string"!=typeof e.transactionReference){const e={instancePath:t+"/payments/"+s+"/transactionReference",schemaPath:"#/properties/payments/items/properties/transactionReference/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/payments/"+s,schemaPath:"#/properties/payments/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t+"/payments",schemaPath:"#/properties/payments/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}return validate55.errors=r,0===n},ye={$schema:"http://json-schema.org/draft-07/schema",$id:"order.json",title:"Order",description:"A purchase order for products or services.",type:"object",required:["type","status"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",default:"order",enum:["order"]},orderNumber:{type:"string"},status:{type:"string",enum:["draft","pendingPayment","processing","outForDelivery","completed","paymentFailed","cancelled","refunded"]},userId:{$ref:"definitions.json#/definitions/id",description:"User id of purchaser"},reservationId:{$ref:"definitions.json#/definitions/id",description:"Reservation id if the order is for a reservation"},date:{$ref:"definitions.json#/definitions/date"},items:{type:"array",default:[],items:{type:"object",required:["name","price"],properties:{additionalProperties:!1,name:{type:"string"},sku:{type:"string"},quantity:{type:"number",default:1},price:{type:"number"},taxClass:{type:"string"},deliveryClass:{type:"string"},productId:{type:"string"}}}},taxes:{type:"array",default:[],items:{type:"object",required:["name","rate"],properties:{additionalProperties:!1,name:{type:"string"},class:{type:"string"},rateType:{type:"string",enum:["percentage","flat"],default:"percentage"},rate:{type:"number"},total:{type:"number"}}}},fees:{type:"array",default:[],items:{type:"object",required:["name","price"],properties:{additionalProperties:!1,name:{type:"string"},price:{type:"number"}}}},delivery:{type:"array",default:[],items:{type:"object",required:["name","rate"],properties:{additionalProperties:!1,name:{type:"string"},class:{type:"string"},rateType:{type:"string",enum:["percentage","flat"],default:"percentage"},rate:{type:"number"},total:{type:"number"}}}},payments:{type:"array",default:[],items:{type:"object",properties:{method:{type:"string",enum:["folio","invoice","amex","visa","masterCard","maestro","discover","diners","jcb","applePay","alipay","chinaUnionPay","vpay"]},name:{type:"string"},date:{$ref:"definitions.json#/definitions/date"},amount:{type:"number"},transactionReference:{type:"string"}}}}}};var he=function validate56(e,{instancePath:t="",parentData:s,parentDataProperty:i,rootData:a=e}={}){let r=null,n=0;if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.type&&(e.type="organization"),void 0===e.appManifest&&(e.appManifest={name:"Kohost",short_name:"Kohost",start_url:"/",scope:"/",display:"fullscreen",orientation:"portrait",theme_color:"#1d1f22",background_color:"#1d1f22",icons:[{src:"https://images.kohost.io/cdn-cgi/imagedelivery/vcVX2aBwdFSYr66spcFKaA/9c85047f-ccba-4b1c-3070-5463fbe93b00/w=512",sizes:"512x512",type:"image/png"}],splash:{src:"https://images.kohost.io/cdn-cgi/imagedelivery/vcVX2aBwdFSYr66spcFKaA/034fb112-5326-4d37-373e-d1cc2a4d0400/w=1500",sizes:"1500x800",type:"image/jpg"},logo:{src:"https://images.kohost.io/cdn-cgi/imagedelivery/vcVX2aBwdFSYr66spcFKaA/1e54c54d-3bac-4745-f46f-c2f98036af00/h=75",sizes:"300x75",type:"image/png"}}),void 0===e.accountNumber){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"accountNumber"},message:"must have required property 'accountNumber'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.name){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.id){let s=e.id;if("string"!=typeof s){const e={instancePath:t+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}const i=n,a=n;if("global"!==s&&"system"!==s){const e={};null===r?r=[e]:r.push(e),n++}if(a===n){const e={instancePath:t+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===r?r=[e]:r.push(e),n++}else n=i,null!==r&&(i?r.length=i:r=null)}let s=e.type;if("string"!=typeof s){const e={instancePath:t+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("organization"!==s){const e={instancePath:t+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:fe.properties.type.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.accountNumber){let s=e.accountNumber;if("number"!=typeof s&&null!==s){const e={instancePath:t+"/accountNumber",schemaPath:"#/properties/accountNumber/type",keyword:"type",params:{type:fe.properties.accountNumber.type},message:"must be number,null"};null===r?r=[e]:r.push(e),n++}if("number"==typeof s&&(s<1e4||isNaN(s))){const e={instancePath:t+"/accountNumber",schemaPath:"#/properties/accountNumber/minimum",keyword:"minimum",params:{comparison:">=",limit:1e4},message:"must be >= 10000"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.name&&"string"!=typeof e.name){const e={instancePath:t+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.properties){let s=e.properties;if(Array.isArray(s)){const e=s.length;for(let i=0;i<e;i++)if("string"!=typeof s[i]){const e={instancePath:t+"/properties/"+i,schemaPath:"#/properties/properties/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/properties",schemaPath:"#/properties/properties/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.hostname){let s=e.hostname;if("string"!=typeof s&&null!==s){const e={instancePath:t+"/hostname",schemaPath:"#/properties/hostname/type",keyword:"type",params:{type:fe.properties.hostname.type},message:"must be string,null"};null===r?r=[e]:r.push(e),n++}}let i=e.appManifest;if(i&&"object"==typeof i&&!Array.isArray(i)){if(void 0===i.display&&(i.display="fullscreen"),void 0===i.orientation&&(i.orientation="portrait"),void 0!==i.name&&"string"!=typeof i.name){const e={instancePath:t+"/appManifest/name",schemaPath:"#/properties/appManifest/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==i.short_name&&"string"!=typeof i.short_name){const e={instancePath:t+"/appManifest/short_name",schemaPath:"#/properties/appManifest/properties/short_name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==i.scope&&"string"!=typeof i.scope){const e={instancePath:t+"/appManifest/scope",schemaPath:"#/properties/appManifest/properties/scope/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==i.start_url&&"string"!=typeof i.start_url){const e={instancePath:t+"/appManifest/start_url",schemaPath:"#/properties/appManifest/properties/start_url/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==i.themeColor&&"string"!=typeof i.themeColor){const e={instancePath:t+"/appManifest/themeColor",schemaPath:"#/properties/appManifest/properties/themeColor/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==i.backgroundColor&&"string"!=typeof i.backgroundColor){const e={instancePath:t+"/appManifest/backgroundColor",schemaPath:"#/properties/appManifest/properties/backgroundColor/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}let e=i.display;if("string"!=typeof e){const e={instancePath:t+"/appManifest/display",schemaPath:"#/properties/appManifest/properties/display/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("fullscreen"!==e&&"standalone"!==e&&"minimal-ui"!==e&&"browser"!==e){const e={instancePath:t+"/appManifest/display",schemaPath:"#/properties/appManifest/properties/display/enum",keyword:"enum",params:{allowedValues:fe.properties.appManifest.properties.display.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}let s=i.orientation;if("string"!=typeof s){const e={instancePath:t+"/appManifest/orientation",schemaPath:"#/properties/appManifest/properties/orientation/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("portrait"!==s&&"landscape"!==s){const e={instancePath:t+"/appManifest/orientation",schemaPath:"#/properties/appManifest/properties/orientation/enum",keyword:"enum",params:{allowedValues:fe.properties.appManifest.properties.orientation.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}if(void 0!==i.splash){let e=i.splash;if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0!==e.src&&"string"!=typeof e.src){const e={instancePath:t+"/appManifest/splash/src",schemaPath:"#/properties/appManifest/properties/splash/properties/src/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.type&&"string"!=typeof e.type){const e={instancePath:t+"/appManifest/splash/type",schemaPath:"#/properties/appManifest/properties/splash/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.sizes&&"string"!=typeof e.sizes){const e={instancePath:t+"/appManifest/splash/sizes",schemaPath:"#/properties/appManifest/properties/splash/properties/sizes/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/appManifest/splash",schemaPath:"#/properties/appManifest/properties/splash/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}}if(void 0!==i.icons){let e=i.icons;if(Array.isArray(e)){const s=e.length;for(let i=0;i<s;i++){let s=e[i];if(s&&"object"==typeof s&&!Array.isArray(s)){if(void 0!==s.src&&"string"!=typeof s.src){const e={instancePath:t+"/appManifest/icons/"+i+"/src",schemaPath:"#/properties/appManifest/properties/icons/items/properties/src/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==s.sizes&&"string"!=typeof s.sizes){const e={instancePath:t+"/appManifest/icons/"+i+"/sizes",schemaPath:"#/properties/appManifest/properties/icons/items/properties/sizes/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==s.type&&"string"!=typeof s.type){const e={instancePath:t+"/appManifest/icons/"+i+"/type",schemaPath:"#/properties/appManifest/properties/icons/items/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/appManifest/icons/"+i,schemaPath:"#/properties/appManifest/properties/icons/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t+"/appManifest/icons",schemaPath:"#/properties/appManifest/properties/icons/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}}if(void 0!==i.logo){let e=i.logo;if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0!==e.src&&"string"!=typeof e.src){const e={instancePath:t+"/appManifest/logo/src",schemaPath:"#/properties/appManifest/properties/logo/properties/src/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.type&&"string"!=typeof e.type){const e={instancePath:t+"/appManifest/logo/type",schemaPath:"#/properties/appManifest/properties/logo/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.sizes&&"string"!=typeof e.sizes){const e={instancePath:t+"/appManifest/logo/sizes",schemaPath:"#/properties/appManifest/properties/logo/properties/sizes/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/appManifest/logo",schemaPath:"#/properties/appManifest/properties/logo/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t+"/appManifest",schemaPath:"#/properties/appManifest/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.tickets){let s=e.tickets;if(s&&"object"==typeof s&&!Array.isArray(s)){void 0===s.nextTicketNumber&&(s.nextTicketNumber=1);let e=s.nextTicketNumber;if("string"!=typeof e&&("number"!=typeof e||e%1||isNaN(e))){const e={instancePath:t+"/tickets/nextTicketNumber",schemaPath:"#/properties/tickets/properties/nextTicketNumber/type",keyword:"type",params:{type:fe.properties.tickets.properties.nextTicketNumber.type},message:"must be string,integer"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/tickets",schemaPath:"#/properties/tickets/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.credentials){let s=e.credentials;if(s&&"object"==typeof s&&!Array.isArray(s));else{const e={instancePath:t+"/credentials",schemaPath:"#/properties/credentials/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.createdAt){let s=e.createdAt;if("string"!=typeof s&&(!s||"object"!=typeof s||Array.isArray(s))){const e={instancePath:t+"/createdAt",schemaPath:"definitions.json#/definitions/createdAt/type",keyword:"type",params:{type:ge.type},message:"must be string,object"};null===r?r=[e]:r.push(e),n++}if("string"==typeof s&&!I.validate(s)){const e={instancePath:t+"/createdAt",schemaPath:"definitions.json#/definitions/createdAt/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.updatedAt){let s=e.updatedAt;if("string"!=typeof s&&(!s||"object"!=typeof s||Array.isArray(s))){const e={instancePath:t+"/updatedAt",schemaPath:"definitions.json#/definitions/updatedAt/type",keyword:"type",params:{type:Pe.type},message:"must be string,object"};null===r?r=[e]:r.push(e),n++}if("string"==typeof s&&!I.validate(s)){const e={instancePath:t+"/updatedAt",schemaPath:"definitions.json#/definitions/updatedAt/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}return validate56.errors=r,0===n},fe={$schema:"http://json-schema.org/draft-07/schema",$id:"organization.json",title:"Organization",type:"object",description:"An organization is a group or entity that subscribes to Kohost software.",required:["accountNumber","name"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",default:"organization",enum:["organization"]},accountNumber:{type:["number","null"],minimum:1e4},name:{type:"string"},properties:{type:"array",items:{type:"string"}},hostname:{type:["string","null"]},appManifest:{type:"object",properties:{name:{type:"string"},short_name:{type:"string"},scope:{type:"string"},start_url:{type:"string"},themeColor:{type:"string"},backgroundColor:{type:"string"},display:{type:"string",enum:["fullscreen","standalone","minimal-ui","browser"],default:"fullscreen"},orientation:{type:"string",enum:["portrait","landscape"],default:"portrait"},splash:{type:"object",properties:{src:{type:"string"},type:{type:"string"},sizes:{type:"string"}}},icons:{type:"array",items:{type:"object",properties:{src:{type:"string"},sizes:{type:"string"},type:{type:"string"}}}},logo:{type:"object",properties:{src:{type:"string"},type:{type:"string"},sizes:{type:"string"}}}},default:{name:"Kohost",short_name:"Kohost",start_url:"/",scope:"/",display:"fullscreen",orientation:"portrait",theme_color:"#1d1f22",background_color:"#1d1f22",icons:[{src:"https://images.kohost.io/cdn-cgi/imagedelivery/vcVX2aBwdFSYr66spcFKaA/9c85047f-ccba-4b1c-3070-5463fbe93b00/w=512",sizes:"512x512",type:"image/png"}],splash:{src:"https://images.kohost.io/cdn-cgi/imagedelivery/vcVX2aBwdFSYr66spcFKaA/034fb112-5326-4d37-373e-d1cc2a4d0400/w=1500",sizes:"1500x800",type:"image/jpg"},logo:{src:"https://images.kohost.io/cdn-cgi/imagedelivery/vcVX2aBwdFSYr66spcFKaA/1e54c54d-3bac-4745-f46f-c2f98036af00/h=75",sizes:"300x75",type:"image/png"}}},tickets:{type:"object",properties:{nextTicketNumber:{type:["string","integer"],default:1}}},credentials:{type:"object",additionalProperties:!0},createdAt:{$ref:"definitions.json#/definitions/createdAt"},updatedAt:{$ref:"definitions.json#/definitions/updatedAt"}}},ge={type:["string","object"],format:"date-time"},Pe={type:["string","object"],format:"date-time"};var be=validate57,ve={$schema:"http://json-schema.org/draft-07/schema",$id:"payment.json",title:"Payment",type:"object",required:["type","maskedNumber","expires"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",enum:["amex","visa","masterCard","maestro","discover","diners","jcb","applePay","alipay","chinaUnionPay","vpay"]},enabled:{type:"boolean",default:!0},storageData:{type:["string","null"]},maskedNumber:{string:"string"},issued:{type:["string","null"]},expires:{string:"string"},systemId:{$ref:"definitions.json#/definitions/systemId"}}};function validate57(e,{instancePath:t="",parentData:s,parentDataProperty:i,rootData:a=e}={}){let r=null,n=0;if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.enabled&&(e.enabled=!0),void 0===e.type){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.maskedNumber){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"maskedNumber"},message:"must have required property 'maskedNumber'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.expires){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"expires"},message:"must have required property 'expires'"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.id){let s=e.id;if("string"!=typeof s){const e={instancePath:t+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}const i=n,a=n;if("global"!==s&&"system"!==s){const e={};null===r?r=[e]:r.push(e),n++}if(a===n){const e={instancePath:t+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===r?r=[e]:r.push(e),n++}else n=i,null!==r&&(i?r.length=i:r=null)}if(void 0!==e.type){let s=e.type;if("string"!=typeof s){const e={instancePath:t+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("amex"!==s&&"visa"!==s&&"masterCard"!==s&&"maestro"!==s&&"discover"!==s&&"diners"!==s&&"jcb"!==s&&"applePay"!==s&&"alipay"!==s&&"chinaUnionPay"!==s&&"vpay"!==s){const e={instancePath:t+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:ve.properties.type.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}if("boolean"!=typeof e.enabled){const e={instancePath:t+"/enabled",schemaPath:"#/properties/enabled/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.storageData){let s=e.storageData;if("string"!=typeof s&&null!==s){const e={instancePath:t+"/storageData",schemaPath:"#/properties/storageData/type",keyword:"type",params:{type:ve.properties.storageData.type},message:"must be string,null"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.issued){let s=e.issued;if("string"!=typeof s&&null!==s){const e={instancePath:t+"/issued",schemaPath:"#/properties/issued/type",keyword:"type",params:{type:ve.properties.issued.type},message:"must be string,null"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.systemId&&"string"!=typeof e.systemId){const e={instancePath:t+"/systemId",schemaPath:"definitions.json#/definitions/systemId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}return validate57.errors=r,0===n}var we=validate58,ke={$schema:"http://json-schema.org/draft-07/schema",$id:"policy.json",title:"Policy",description:"A policy is a set of permissions that can be applied to a user to limit their access to resources.",type:"object",required:["name","type","organizationId","propertyId","permissions","discriminator"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",default:"policy",enum:["policy"]},discriminator:{type:"string",enum:["user"]},name:{type:"string",minLength:1},description:{type:"string"},organizationId:{type:"string"},propertyId:{type:"string"},permissions:{type:"array",items:{type:"object",required:["entities","effect"],properties:{entities:{type:"array",items:{type:"string",pattern:"^[^:]+(:.+)+$"}},effect:{type:"string",enum:["Allow","Deny"]}}}}}},je=new RegExp("^[^:]+(:.+)+$","u");function validate58(e,{instancePath:t="",parentData:s,parentDataProperty:i,rootData:a=e}={}){let r=null,n=0;if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.type&&(e.type="policy"),void 0===e.name){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.type){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.organizationId){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"organizationId"},message:"must have required property 'organizationId'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.propertyId){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"propertyId"},message:"must have required property 'propertyId'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.permissions){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"permissions"},message:"must have required property 'permissions'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.discriminator){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"discriminator"},message:"must have required property 'discriminator'"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.id){let s=e.id;if("string"!=typeof s){const e={instancePath:t+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}const i=n,a=n;if("global"!==s&&"system"!==s){const e={};null===r?r=[e]:r.push(e),n++}if(a===n){const e={instancePath:t+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===r?r=[e]:r.push(e),n++}else n=i,null!==r&&(i?r.length=i:r=null)}let s=e.type;if("string"!=typeof s){const e={instancePath:t+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("policy"!==s){const e={instancePath:t+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:ke.properties.type.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.discriminator){let s=e.discriminator;if("string"!=typeof s){const e={instancePath:t+"/discriminator",schemaPath:"#/properties/discriminator/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("user"!==s){const e={instancePath:t+"/discriminator",schemaPath:"#/properties/discriminator/enum",keyword:"enum",params:{allowedValues:ke.properties.discriminator.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.name){let s=e.name;if("string"==typeof s){if(P(s)<1){const e={instancePath:t+"/name",schemaPath:"#/properties/name/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.description&&"string"!=typeof e.description){const e={instancePath:t+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.organizationId&&"string"!=typeof e.organizationId){const e={instancePath:t+"/organizationId",schemaPath:"#/properties/organizationId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.propertyId&&"string"!=typeof e.propertyId){const e={instancePath:t+"/propertyId",schemaPath:"#/properties/propertyId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.permissions){let s=e.permissions;if(Array.isArray(s)){const e=s.length;for(let i=0;i<e;i++){let e=s[i];if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.entities){const e={instancePath:t+"/permissions/"+i,schemaPath:"#/properties/permissions/items/required",keyword:"required",params:{missingProperty:"entities"},message:"must have required property 'entities'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.effect){const e={instancePath:t+"/permissions/"+i,schemaPath:"#/properties/permissions/items/required",keyword:"required",params:{missingProperty:"effect"},message:"must have required property 'effect'"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.entities){let s=e.entities;if(Array.isArray(s)){const e=s.length;for(let a=0;a<e;a++){let e=s[a];if("string"==typeof e){if(!je.test(e)){const e={instancePath:t+"/permissions/"+i+"/entities/"+a,schemaPath:"#/properties/permissions/items/properties/entities/items/pattern",keyword:"pattern",params:{pattern:"^[^:]+(:.+)+$"},message:'must match pattern "^[^:]+(:.+)+$"'};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/permissions/"+i+"/entities/"+a,schemaPath:"#/properties/permissions/items/properties/entities/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t+"/permissions/"+i+"/entities",schemaPath:"#/properties/permissions/items/properties/entities/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.effect){let s=e.effect;if("string"!=typeof s){const e={instancePath:t+"/permissions/"+i+"/effect",schemaPath:"#/properties/permissions/items/properties/effect/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("Allow"!==s&&"Deny"!==s){const e={instancePath:t+"/permissions/"+i+"/effect",schemaPath:"#/properties/permissions/items/properties/effect/enum",keyword:"enum",params:{allowedValues:ke.properties.permissions.items.properties.effect.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t+"/permissions/"+i,schemaPath:"#/properties/permissions/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t+"/permissions",schemaPath:"#/properties/permissions/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}return validate58.errors=r,0===n}var Ae=function validate59(e,{instancePath:t="",parentData:s,parentDataProperty:i,rootData:a=e}={}){let r=null,n=0;if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.type&&(e.type="product"),void 0===e.name){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.price){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"price"},message:"must have required property 'price'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.driver){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"driver"},message:"must have required property 'driver'"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.id){let s=e.id;if("string"!=typeof s){const e={instancePath:t+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}const i=n,a=n;if("global"!==s&&"system"!==s){const e={};null===r?r=[e]:r.push(e),n++}if(a===n){const e={instancePath:t+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===r?r=[e]:r.push(e),n++}else n=i,null!==r&&(i?r.length=i:r=null)}let s=e.type;if("string"!=typeof s){const e={instancePath:t+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("product"!==s){const e={instancePath:t+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:qe.properties.type.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.name&&"string"!=typeof e.name){const e={instancePath:t+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.driver){let s=e.driver;if("string"!=typeof s){const e={instancePath:t+"/driver",schemaPath:"definitions.json#/definitions/driver/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("adlink"!==s&&"aws-kinesis"!==s&&"butler"!==s&&"crestron"!==s&&"dell"!==s&&"dmp"!==s&&"doorbird"!==s&&"dormakaba"!==s&&"dsc"!==s&&"ecobee"!==s&&"epson"!==s&&"geovision-rs"!==s&&"geovision-as-manager"!==s&&"honeywell-vista"!==s&&"igor"!==s&&"inncom"!==s&&"isapi"!==s&&"kohost-k7"!==s&&"kohost"!==s&&"lg"!==s&&"lg-webos"!==s&&"lapi"!==s&&"lirc"!==s&&"mews"!==s&&"mht"!==s&&"paxton"!==s&&"pelican-wireless"!==s&&"power-shades"!==s&&"rachio"!==s&&"rebrandly"!==s&&"rtsp"!==s&&"salto"!==s&&"salto-irn"!==s&&"samsung"!==s&&"se"!==s&&"sendgrid"!==s&&"sonifi"!==s&&"stay-n-touch"!==s&&"storable"!==s&&"twilio"!==s&&"unifi"!==s&&"valcom"!==s&&"vizio"!==s&&"wisenet"!==s&&"cloudflare-images"!==s&&"cloudflare-stream"!==s&&"insperia-privacy"!==s){const e={instancePath:t+"/driver",schemaPath:"definitions.json#/definitions/driver/enum",keyword:"enum",params:{allowedValues:f.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.price&&"number"!=typeof e.price){const e={instancePath:t+"/price",schemaPath:"#/properties/price/type",keyword:"type",params:{type:"number"},message:"must be number"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.tax){let s=e.tax;if("number"!=typeof s&&null!==s){const e={instancePath:t+"/tax",schemaPath:"#/properties/tax/type",keyword:"type",params:{type:qe.properties.tax.type},message:"must be number,null"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.image&&(validate15(e.image,{instancePath:t+"/image",parentData:e,parentDataProperty:"image",rootData:a})||(r=null===r?validate15.errors:r.concat(validate15.errors),n=r.length)),void 0!==e.category&&"string"!=typeof e.category){const e={instancePath:t+"/category",schemaPath:"#/properties/category/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.imageUrl){let s=e.imageUrl;if("string"==typeof s){if(!Ne.test(s)){const e={instancePath:t+"/imageUrl",schemaPath:"#/properties/imageUrl/pattern",keyword:"pattern",params:{pattern:"^https?://"},message:'must match pattern "^https?://"'};null===r?r=[e]:r.push(e),n++}if(!N(s)){const e={instancePath:t+"/imageUrl",schemaPath:"#/properties/imageUrl/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};null===r?r=[e]:r.push(e),n++}}}if(void 0!==e.systemId&&"string"!=typeof e.systemId){const e={instancePath:t+"/systemId",schemaPath:"definitions.json#/definitions/systemId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}return validate59.errors=r,0===n},qe={$schema:"http://json-schema.org/draft-07/schema",$id:"product.json",title:"Product",type:"object",required:["name","price","driver"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",default:"product",enum:["product"]},name:{type:"string"},driver:{$ref:"definitions.json#/definitions/driver"},description:{string:"string"},price:{type:"number"},tax:{type:["number","null"]},image:{$ref:"mediaFile.json"},category:{type:"string"},imageUrl:{format:"uri",pattern:"^https?://"},systemId:{$ref:"definitions.json#/definitions/systemId"}}},Ne=new RegExp("^https?://","u");var Ie=function validate61(e,{instancePath:t="",parentData:s,parentDataProperty:i,rootData:a=e}={}){let r=null,n=0;if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.type&&(e.type="property"),void 0===e.appFeatures&&(e.appFeatures={RoomControl:{}}),void 0===e.notifications&&(e.notifications={email:{enabled:!1},sms:{enabled:!1},push:{enabled:!1}}),void 0===e.id){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.name){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.type){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.organization){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"organization"},message:"must have required property 'organization'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.timezone){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"timezone"},message:"must have required property 'timezone'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.discriminator){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"discriminator"},message:"must have required property 'discriminator'"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.id){let s=e.id;if("string"!=typeof s){const e={instancePath:t+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}const i=n,a=n;if("global"!==s&&"system"!==s){const e={};null===r?r=[e]:r.push(e),n++}if(a===n){const e={instancePath:t+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===r?r=[e]:r.push(e),n++}else n=i,null!==r&&(i?r.length=i:r=null)}if(void 0!==e.name&&"string"!=typeof e.name){const e={instancePath:t+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}let s=e.type;if("string"!=typeof s){const e={instancePath:t+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("property"!==s){const e={instancePath:t+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:De.properties.type.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.discriminator){let s=e.discriminator;if("string"!=typeof s){const e={instancePath:t+"/discriminator",schemaPath:"#/properties/discriminator/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("hospitality"!==s&&"education"!==s&&"commercial"!==s&&"storage"!==s){const e={instancePath:t+"/discriminator",schemaPath:"#/properties/discriminator/enum",keyword:"enum",params:{allowedValues:De.properties.discriminator.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.organization){let s=e.organization;if("string"!=typeof s&&null!==s){const e={instancePath:t+"/organization",schemaPath:"#/properties/organization/type",keyword:"type",params:{type:De.properties.organization.type},message:"must be string,null"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.departments){let s=e.departments;if(Array.isArray(s)){const e=s.length;for(let i=0;i<e;i++)if("string"!=typeof s[i]){const e={instancePath:t+"/departments/"+i,schemaPath:"#/properties/departments/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/departments",schemaPath:"#/properties/departments/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.testModeEnabled&&"boolean"!=typeof e.testModeEnabled){const e={instancePath:t+"/testModeEnabled",schemaPath:"#/properties/testModeEnabled/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.testMode){let s=e.testMode;if(s&&"object"==typeof s&&!Array.isArray(s)){if(void 0!==s.notificationEmails){let e=s.notificationEmails;if(Array.isArray(e)){const s=e.length;for(let i=0;i<s;i++)if("string"!=typeof e[i]){const e={instancePath:t+"/testMode/notificationEmails/"+i,schemaPath:"#/properties/testMode/properties/notificationEmails/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/testMode/notificationEmails",schemaPath:"#/properties/testMode/properties/notificationEmails/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}}if(void 0!==s.notificationEmailDomains){let e=s.notificationEmailDomains;if(Array.isArray(e)){const s=e.length;for(let i=0;i<s;i++)if("string"!=typeof e[i]){const e={instancePath:t+"/testMode/notificationEmailDomains/"+i,schemaPath:"#/properties/testMode/properties/notificationEmailDomains/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/testMode/notificationEmailDomains",schemaPath:"#/properties/testMode/properties/notificationEmailDomains/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t+"/testMode",schemaPath:"#/properties/testMode/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.timezone){let s=e.timezone;if("string"==typeof s){if(!$e.test(s)){const e={instancePath:t+"/timezone",schemaPath:"#/properties/timezone/pattern",keyword:"pattern",params:{pattern:"^([a-zA-Z]+/[a-zA-Z_]+)$"},message:'must match pattern "^([a-zA-Z]+/[a-zA-Z_]+)$"'};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/timezone",schemaPath:"#/properties/timezone/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.smsNumber&&"string"!=typeof e.smsNumber){const e={instancePath:t+"/smsNumber",schemaPath:"#/properties/smsNumber/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.checkInTime&&"string"!=typeof e.checkInTime){const e={instancePath:t+"/checkInTime",schemaPath:"#/properties/checkInTime/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.checkOutTime&&"string"!=typeof e.checkOutTime){const e={instancePath:t+"/checkOutTime",schemaPath:"#/properties/checkOutTime/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.address){let s=e.address;if(s&&"object"==typeof s&&!Array.isArray(s)){if(void 0!==s.id&&"string"!=typeof s.id){const e={instancePath:t+"/address/id",schemaPath:"definitions.json#/definitions/address/properties/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==s.line1&&"string"!=typeof s.line1){const e={instancePath:t+"/address/line1",schemaPath:"definitions.json#/definitions/address/properties/line1/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==s.line2&&"string"!=typeof s.line2){const e={instancePath:t+"/address/line2",schemaPath:"definitions.json#/definitions/address/properties/line2/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==s.line3&&"string"!=typeof s.line3){const e={instancePath:t+"/address/line3",schemaPath:"definitions.json#/definitions/address/properties/line3/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==s.city&&"string"!=typeof s.city){const e={instancePath:t+"/address/city",schemaPath:"definitions.json#/definitions/address/properties/city/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==s.state&&"string"!=typeof s.state){const e={instancePath:t+"/address/state",schemaPath:"definitions.json#/definitions/address/properties/state/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==s.postalCode&&"string"!=typeof s.postalCode){const e={instancePath:t+"/address/postalCode",schemaPath:"definitions.json#/definitions/address/properties/postalCode/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==s.countryCode){let e=s.countryCode;if("string"==typeof e){if(P(e)>2){const e={instancePath:t+"/address/countryCode",schemaPath:"definitions.json#/definitions/address/properties/countryCode/maxLength",keyword:"maxLength",params:{limit:2},message:"must NOT have more than 2 characters"};null===r?r=[e]:r.push(e),n++}if(P(e)<2){const e={instancePath:t+"/address/countryCode",schemaPath:"definitions.json#/definitions/address/properties/countryCode/minLength",keyword:"minLength",params:{limit:2},message:"must NOT have fewer than 2 characters"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/address/countryCode",schemaPath:"definitions.json#/definitions/address/properties/countryCode/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t+"/address",schemaPath:"definitions.json#/definitions/address/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.latitude&&"number"!=typeof e.latitude){const e={instancePath:t+"/latitude",schemaPath:"#/properties/latitude/type",keyword:"type",params:{type:"number"},message:"must be number"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.longitude&&"number"!=typeof e.longitude){const e={instancePath:t+"/longitude",schemaPath:"#/properties/longitude/type",keyword:"type",params:{type:"number"},message:"must be number"};null===r?r=[e]:r.push(e),n++}let i=e.appFeatures;if(i&&"object"==typeof i&&!Array.isArray(i)){for(const e in i)if(!A.call(De.properties.appFeatures.properties,e)){const s={instancePath:t+"/appFeatures",schemaPath:"#/properties/appFeatures/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:e},message:"must NOT have additional properties"};null===r?r=[s]:r.push(s),n++}if(void 0!==i.RoomControl){let e=i.RoomControl;if(e&&"object"==typeof e&&!Array.isArray(e)){for(const s in e)if("disabledSystems"!==s&&"commonAreas"!==s&&"alarmConfig"!==s){const e={instancePath:t+"/appFeatures/RoomControl",schemaPath:"#/properties/appFeatures/properties/RoomControl/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:s},message:"must NOT have additional properties"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.disabledSystems){let s=e.disabledSystems;if(Array.isArray(s)){const e=s.length;for(let i=0;i<e;i++){let e=s[i];if("string"!=typeof e){const e={instancePath:t+"/appFeatures/RoomControl/disabledSystems/"+i,schemaPath:"#/properties/appFeatures/properties/RoomControl/properties/disabledSystems/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("climate"!==e&&"lights"!==e&&"shades"!==e&&"tv"!==e&&"doors"!==e){const e={instancePath:t+"/appFeatures/RoomControl/disabledSystems/"+i,schemaPath:"#/properties/appFeatures/properties/RoomControl/properties/disabledSystems/items/enum",keyword:"enum",params:{allowedValues:De.properties.appFeatures.properties.RoomControl.properties.disabledSystems.items.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t+"/appFeatures/RoomControl/disabledSystems",schemaPath:"#/properties/appFeatures/properties/RoomControl/properties/disabledSystems/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.commonAreas){let s=e.commonAreas;if(s&&"object"==typeof s&&!Array.isArray(s)){if(void 0!==s.spaces){let e=s.spaces;if(Array.isArray(e)){const s=e.length;for(let i=0;i<s;i++)if("string"!=typeof e[i]){const e={instancePath:t+"/appFeatures/RoomControl/commonAreas/spaces/"+i,schemaPath:"#/properties/appFeatures/properties/RoomControl/properties/commonAreas/properties/spaces/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/appFeatures/RoomControl/commonAreas/spaces",schemaPath:"#/properties/appFeatures/properties/RoomControl/properties/commonAreas/properties/spaces/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t+"/appFeatures/RoomControl/commonAreas",schemaPath:"#/properties/appFeatures/properties/RoomControl/properties/commonAreas/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.alarmConfig){let s=e.alarmConfig;if(s&&"object"==typeof s&&!Array.isArray(s)){for(const e in s)if(Ce.test(e)){let i=s[e];if(i&&"object"==typeof i&&!Array.isArray(i)){if(void 0!==i.zoneLockMap){let s=i.zoneLockMap;if(s&&"object"==typeof s&&!Array.isArray(s)){for(const i in s)if("string"!=typeof s[i]){const s={instancePath:t+"/appFeatures/RoomControl/alarmConfig/"+e.replace(/~/g,"~0").replace(/\//g,"~1")+"/zoneLockMap/"+i.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/appFeatures/properties/RoomControl/properties/alarmConfig/patternProperties/%5E%5Ba-zA-Z0-9%5D%2B%24/properties/zoneLockMap/additionalProperties/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[s]:r.push(s),n++}}else{const s={instancePath:t+"/appFeatures/RoomControl/alarmConfig/"+e.replace(/~/g,"~0").replace(/\//g,"~1")+"/zoneLockMap",schemaPath:"#/properties/appFeatures/properties/RoomControl/properties/alarmConfig/patternProperties/%5E%5Ba-zA-Z0-9%5D%2B%24/properties/zoneLockMap/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[s]:r.push(s),n++}}}else{const s={instancePath:t+"/appFeatures/RoomControl/alarmConfig/"+e.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/appFeatures/properties/RoomControl/properties/alarmConfig/patternProperties/%5E%5Ba-zA-Z0-9%5D%2B%24/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[s]:r.push(s),n++}}}else{const e={instancePath:t+"/appFeatures/RoomControl/alarmConfig",schemaPath:"#/properties/appFeatures/properties/RoomControl/properties/alarmConfig/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t+"/appFeatures/RoomControl",schemaPath:"#/properties/appFeatures/properties/RoomControl/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}}if(void 0!==i.CheckIn){let e=i.CheckIn;if(e&&"object"==typeof e&&!Array.isArray(e)&&void 0!==e.earlyCheckIn){let s=e.earlyCheckIn;if(s&&"object"==typeof s&&!Array.isArray(s)){if(void 0===s.dynamic&&(s.dynamic=!1),void 0===s.minimumPrice&&(s.minimumPrice=10),void 0===s.maximumPrice&&(s.maximumPrice=50),void 0===s.priceRatioPerHour&&(s.priceRatioPerHour=.1),void 0===s.dynamic){const e={instancePath:t+"/appFeatures/CheckIn/earlyCheckIn",schemaPath:"#/properties/appFeatures/properties/CheckIn/properties/earlyCheckIn/required",keyword:"required",params:{missingProperty:"dynamic"},message:"must have required property 'dynamic'"};null===r?r=[e]:r.push(e),n++}if("boolean"!=typeof s.dynamic){const e={instancePath:t+"/appFeatures/CheckIn/earlyCheckIn/dynamic",schemaPath:"#/properties/appFeatures/properties/CheckIn/properties/earlyCheckIn/properties/dynamic/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===r?r=[e]:r.push(e),n++}if("number"!=typeof s.minimumPrice){const e={instancePath:t+"/appFeatures/CheckIn/earlyCheckIn/minimumPrice",schemaPath:"#/properties/appFeatures/properties/CheckIn/properties/earlyCheckIn/properties/minimumPrice/type",keyword:"type",params:{type:"number"},message:"must be number"};null===r?r=[e]:r.push(e),n++}if("number"!=typeof s.maximumPrice){const e={instancePath:t+"/appFeatures/CheckIn/earlyCheckIn/maximumPrice",schemaPath:"#/properties/appFeatures/properties/CheckIn/properties/earlyCheckIn/properties/maximumPrice/type",keyword:"type",params:{type:"number"},message:"must be number"};null===r?r=[e]:r.push(e),n++}if("number"!=typeof s.priceRatioPerHour){const e={instancePath:t+"/appFeatures/CheckIn/earlyCheckIn/priceRatioPerHour",schemaPath:"#/properties/appFeatures/properties/CheckIn/properties/earlyCheckIn/properties/priceRatioPerHour/type",keyword:"type",params:{type:"number"},message:"must be number"};null===r?r=[e]:r.push(e),n++}if(void 0!==s.minimumTime&&"string"!=typeof s.minimumTime){const e={instancePath:t+"/appFeatures/CheckIn/earlyCheckIn/minimumTime",schemaPath:"#/properties/appFeatures/properties/CheckIn/properties/earlyCheckIn/properties/minimumTime/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/appFeatures/CheckIn/earlyCheckIn",schemaPath:"#/properties/appFeatures/properties/CheckIn/properties/earlyCheckIn/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}}}if(void 0!==i.CheckOut){let e=i.CheckOut;if(e&&"object"==typeof e&&!Array.isArray(e)&&void 0!==e.lateCheckOut){let s=e.lateCheckOut;if(s&&"object"==typeof s&&!Array.isArray(s)){if(void 0===s.dynamic&&(s.dynamic=!1),void 0===s.minimumPrice&&(s.minimumPrice=10),void 0===s.maximumPrice&&(s.maximumPrice=50),void 0===s.priceRatioPerHour&&(s.priceRatioPerHour=.1),void 0===s.dynamic){const e={instancePath:t+"/appFeatures/CheckOut/lateCheckOut",schemaPath:"#/properties/appFeatures/properties/CheckOut/properties/lateCheckOut/required",keyword:"required",params:{missingProperty:"dynamic"},message:"must have required property 'dynamic'"};null===r?r=[e]:r.push(e),n++}if("boolean"!=typeof s.dynamic){const e={instancePath:t+"/appFeatures/CheckOut/lateCheckOut/dynamic",schemaPath:"#/properties/appFeatures/properties/CheckOut/properties/lateCheckOut/properties/dynamic/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===r?r=[e]:r.push(e),n++}if("number"!=typeof s.minimumPrice){const e={instancePath:t+"/appFeatures/CheckOut/lateCheckOut/minimumPrice",schemaPath:"#/properties/appFeatures/properties/CheckOut/properties/lateCheckOut/properties/minimumPrice/type",keyword:"type",params:{type:"number"},message:"must be number"};null===r?r=[e]:r.push(e),n++}if("number"!=typeof s.maximumPrice){const e={instancePath:t+"/appFeatures/CheckOut/lateCheckOut/maximumPrice",schemaPath:"#/properties/appFeatures/properties/CheckOut/properties/lateCheckOut/properties/maximumPrice/type",keyword:"type",params:{type:"number"},message:"must be number"};null===r?r=[e]:r.push(e),n++}if("number"!=typeof s.priceRatioPerHour){const e={instancePath:t+"/appFeatures/CheckOut/lateCheckOut/priceRatioPerHour",schemaPath:"#/properties/appFeatures/properties/CheckOut/properties/lateCheckOut/properties/priceRatioPerHour/type",keyword:"type",params:{type:"number"},message:"must be number"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/appFeatures/CheckOut/lateCheckOut",schemaPath:"#/properties/appFeatures/properties/CheckOut/properties/lateCheckOut/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}}}if(void 0!==i.Concierge){let e=i.Concierge;if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.timeTracking&&(e.timeTracking=!1),void 0===e.tipping&&(e.tipping=!1),void 0===e.ratings&&(e.ratings=!0),void 0===e.newTicketCCs&&(e.newTicketCCs=[]),void 0===e.newMessageChannel&&(e.newMessageChannel="sms"),"boolean"!=typeof e.timeTracking){const e={instancePath:t+"/appFeatures/Concierge/timeTracking",schemaPath:"#/properties/appFeatures/properties/Concierge/properties/timeTracking/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===r?r=[e]:r.push(e),n++}if("boolean"!=typeof e.tipping){const e={instancePath:t+"/appFeatures/Concierge/tipping",schemaPath:"#/properties/appFeatures/properties/Concierge/properties/tipping/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===r?r=[e]:r.push(e),n++}if("boolean"!=typeof e.ratings){const e={instancePath:t+"/appFeatures/Concierge/ratings",schemaPath:"#/properties/appFeatures/properties/Concierge/properties/ratings/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===r?r=[e]:r.push(e),n++}let s=e.newTicketCCs;if(Array.isArray(s)){const e=s.length;for(let i=0;i<e;i++)if("string"!=typeof s[i]){const e={instancePath:t+"/appFeatures/Concierge/newTicketCCs/"+i,schemaPath:"#/properties/appFeatures/properties/Concierge/properties/newTicketCCs/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/appFeatures/Concierge/newTicketCCs",schemaPath:"#/properties/appFeatures/properties/Concierge/properties/newTicketCCs/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}let i=e.newMessageChannel;if("string"!=typeof i&&null!==i){const e={instancePath:t+"/appFeatures/Concierge/newMessageChannel",schemaPath:"#/properties/appFeatures/properties/Concierge/properties/newMessageChannel/type",keyword:"type",params:{type:De.properties.appFeatures.properties.Concierge.properties.newMessageChannel.type},message:"must be string,null"};null===r?r=[e]:r.push(e),n++}if("sms"!==i&&"email"!==i){const e={instancePath:t+"/appFeatures/Concierge/newMessageChannel",schemaPath:"#/properties/appFeatures/properties/Concierge/properties/newMessageChannel/enum",keyword:"enum",params:{allowedValues:De.properties.appFeatures.properties.Concierge.properties.newMessageChannel.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.quickServices){let s=e.quickServices;if(Array.isArray(s)){const e=s.length;for(let i=0;i<e;i++){let e=s[i];if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.name){const e={instancePath:t+"/appFeatures/Concierge/quickServices/"+i,schemaPath:"#/properties/appFeatures/properties/Concierge/properties/quickServices/items/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.description){const e={instancePath:t+"/appFeatures/Concierge/quickServices/"+i,schemaPath:"#/properties/appFeatures/properties/Concierge/properties/quickServices/items/required",keyword:"required",params:{missingProperty:"description"},message:"must have required property 'description'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.image){const e={instancePath:t+"/appFeatures/Concierge/quickServices/"+i,schemaPath:"#/properties/appFeatures/properties/Concierge/properties/quickServices/items/required",keyword:"required",params:{missingProperty:"image"},message:"must have required property 'image'"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.name&&"string"!=typeof e.name){const e={instancePath:t+"/appFeatures/Concierge/quickServices/"+i+"/name",schemaPath:"#/properties/appFeatures/properties/Concierge/properties/quickServices/items/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.description&&"string"!=typeof e.description){const e={instancePath:t+"/appFeatures/Concierge/quickServices/"+i+"/description",schemaPath:"#/properties/appFeatures/properties/Concierge/properties/quickServices/items/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.department&&"string"!=typeof e.department){const e={instancePath:t+"/appFeatures/Concierge/quickServices/"+i+"/department",schemaPath:"#/properties/appFeatures/properties/Concierge/properties/quickServices/items/properties/department/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}void 0!==e.image&&(validate15(e.image,{instancePath:t+"/appFeatures/Concierge/quickServices/"+i+"/image",parentData:e,parentDataProperty:"image",rootData:a})||(r=null===r?validate15.errors:r.concat(validate15.errors),n=r.length))}else{const e={instancePath:t+"/appFeatures/Concierge/quickServices/"+i,schemaPath:"#/properties/appFeatures/properties/Concierge/properties/quickServices/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t+"/appFeatures/Concierge/quickServices",schemaPath:"#/properties/appFeatures/properties/Concierge/properties/quickServices/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.issues){let s=e.issues;if(s&&"object"==typeof s&&!Array.isArray(s)){if(void 0!==s.syncWithPropertyId&&"string"!=typeof s.syncWithPropertyId){const e={instancePath:t+"/appFeatures/Concierge/issues/syncWithPropertyId",schemaPath:"#/properties/appFeatures/properties/Concierge/properties/issues/properties/syncWithPropertyId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/appFeatures/Concierge/issues",schemaPath:"#/properties/appFeatures/properties/Concierge/properties/issues/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t+"/appFeatures/Concierge",schemaPath:"#/properties/appFeatures/properties/Concierge/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}}if(void 0!==i.DigitalKey){let e=i.DigitalKey;if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.systemOnline&&(e.systemOnline=!1),void 0===e.systemConfig&&(e.systemConfig={}),void 0!==e.system){let s=e.system;if("string"!=typeof s){const e={instancePath:t+"/appFeatures/DigitalKey/system",schemaPath:"#/properties/appFeatures/properties/DigitalKey/properties/system/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("salto"!==s&&"dormakaba"!==s){const e={instancePath:t+"/appFeatures/DigitalKey/system",schemaPath:"#/properties/appFeatures/properties/DigitalKey/properties/system/enum",keyword:"enum",params:{allowedValues:De.properties.appFeatures.properties.DigitalKey.properties.system.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}if("boolean"!=typeof e.systemOnline){const e={instancePath:t+"/appFeatures/DigitalKey/systemOnline",schemaPath:"#/properties/appFeatures/properties/DigitalKey/properties/systemOnline/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===r?r=[e]:r.push(e),n++}let s=e.systemConfig;if(s&&"object"==typeof s&&!Array.isArray(s)){for(const e in s)if("legicUrl"!==e&&"legicWalletName"!==e&&"legicAppId"!==e&&"legicTechUsername"!==e&&"legicTechPassword"!==e){const s={instancePath:t+"/appFeatures/DigitalKey/systemConfig",schemaPath:"#/properties/appFeatures/properties/DigitalKey/properties/systemConfig/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:e},message:"must NOT have additional properties"};null===r?r=[s]:r.push(s),n++}if(void 0!==s.legicUrl){let e=s.legicUrl;if("string"==typeof e){if(!N(e)){const e={instancePath:t+"/appFeatures/DigitalKey/systemConfig/legicUrl",schemaPath:"#/properties/appFeatures/properties/DigitalKey/properties/systemConfig/properties/legicUrl/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/appFeatures/DigitalKey/systemConfig/legicUrl",schemaPath:"#/properties/appFeatures/properties/DigitalKey/properties/systemConfig/properties/legicUrl/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}if(void 0!==s.legicWalletName&&"string"!=typeof s.legicWalletName){const e={instancePath:t+"/appFeatures/DigitalKey/systemConfig/legicWalletName",schemaPath:"#/properties/appFeatures/properties/DigitalKey/properties/systemConfig/properties/legicWalletName/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==s.legicAppId&&"number"!=typeof s.legicAppId){const e={instancePath:t+"/appFeatures/DigitalKey/systemConfig/legicAppId",schemaPath:"#/properties/appFeatures/properties/DigitalKey/properties/systemConfig/properties/legicAppId/type",keyword:"type",params:{type:"number"},message:"must be number"};null===r?r=[e]:r.push(e),n++}if(void 0!==s.legicTechUsername&&"string"!=typeof s.legicTechUsername){const e={instancePath:t+"/appFeatures/DigitalKey/systemConfig/legicTechUsername",schemaPath:"#/properties/appFeatures/properties/DigitalKey/properties/systemConfig/properties/legicTechUsername/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==s.legicTechPassword&&"string"!=typeof s.legicTechPassword){const e={instancePath:t+"/appFeatures/DigitalKey/systemConfig/legicTechPassword",schemaPath:"#/properties/appFeatures/properties/DigitalKey/properties/systemConfig/properties/legicTechPassword/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/appFeatures/DigitalKey/systemConfig",schemaPath:"#/properties/appFeatures/properties/DigitalKey/properties/systemConfig/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.enableApp&&"boolean"!=typeof e.enableApp){const e={instancePath:t+"/appFeatures/DigitalKey/enableApp",schemaPath:"#/properties/appFeatures/properties/DigitalKey/properties/enableApp/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.branding){let s=e.branding;if(s&&"object"==typeof s&&!Array.isArray(s)){if(void 0!==s.logo){let e=s.logo;if("string"==typeof e){if(!N(e)){const e={instancePath:t+"/appFeatures/DigitalKey/branding/logo",schemaPath:"#/properties/appFeatures/properties/DigitalKey/properties/branding/properties/logo/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/appFeatures/DigitalKey/branding/logo",schemaPath:"#/properties/appFeatures/properties/DigitalKey/properties/branding/properties/logo/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}if(void 0!==s.gradient){let e=s.gradient;if(Array.isArray(e)){if(e.length>2){const e={instancePath:t+"/appFeatures/DigitalKey/branding/gradient",schemaPath:"#/properties/appFeatures/properties/DigitalKey/properties/branding/properties/gradient/maxItems",keyword:"maxItems",params:{limit:2},message:"must NOT have more than 2 items"};null===r?r=[e]:r.push(e),n++}if(e.length<2){const e={instancePath:t+"/appFeatures/DigitalKey/branding/gradient",schemaPath:"#/properties/appFeatures/properties/DigitalKey/properties/branding/properties/gradient/minItems",keyword:"minItems",params:{limit:2},message:"must NOT have fewer than 2 items"};null===r?r=[e]:r.push(e),n++}const s=e.length;for(let i=0;i<s;i++){let s=e[i];if("string"==typeof s){if(!Se.test(s)){const e={instancePath:t+"/appFeatures/DigitalKey/branding/gradient/"+i,schemaPath:"#/properties/appFeatures/properties/DigitalKey/properties/branding/properties/gradient/items/pattern",keyword:"pattern",params:{pattern:"^(?!#ffffff)(#[0-9a-fA-F]{6})$"},message:'must match pattern "^(?!#ffffff)(#[0-9a-fA-F]{6})$"'};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/appFeatures/DigitalKey/branding/gradient/"+i,schemaPath:"#/properties/appFeatures/properties/DigitalKey/properties/branding/properties/gradient/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t+"/appFeatures/DigitalKey/branding/gradient",schemaPath:"#/properties/appFeatures/properties/DigitalKey/properties/branding/properties/gradient/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}}if(void 0!==s.highlightedGradient){let e=s.highlightedGradient;if(Array.isArray(e)){if(e.length>3){const e={instancePath:t+"/appFeatures/DigitalKey/branding/highlightedGradient",schemaPath:"#/properties/appFeatures/properties/DigitalKey/properties/branding/properties/highlightedGradient/maxItems",keyword:"maxItems",params:{limit:3},message:"must NOT have more than 3 items"};null===r?r=[e]:r.push(e),n++}if(e.length<2){const e={instancePath:t+"/appFeatures/DigitalKey/branding/highlightedGradient",schemaPath:"#/properties/appFeatures/properties/DigitalKey/properties/branding/properties/highlightedGradient/minItems",keyword:"minItems",params:{limit:2},message:"must NOT have fewer than 2 items"};null===r?r=[e]:r.push(e),n++}const s=e.length;for(let i=0;i<s;i++){let s=e[i];if("string"==typeof s){if(!Se.test(s)){const e={instancePath:t+"/appFeatures/DigitalKey/branding/highlightedGradient/"+i,schemaPath:"#/properties/appFeatures/properties/DigitalKey/properties/branding/properties/highlightedGradient/items/pattern",keyword:"pattern",params:{pattern:"^(?!#ffffff)(#[0-9a-fA-F]{6})$"},message:'must match pattern "^(?!#ffffff)(#[0-9a-fA-F]{6})$"'};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/appFeatures/DigitalKey/branding/highlightedGradient/"+i,schemaPath:"#/properties/appFeatures/properties/DigitalKey/properties/branding/properties/highlightedGradient/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t+"/appFeatures/DigitalKey/branding/highlightedGradient",schemaPath:"#/properties/appFeatures/properties/DigitalKey/properties/branding/properties/highlightedGradient/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t+"/appFeatures/DigitalKey/branding",schemaPath:"#/properties/appFeatures/properties/DigitalKey/properties/branding/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t+"/appFeatures/DigitalKey",schemaPath:"#/properties/appFeatures/properties/DigitalKey/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}}if(void 0!==i.SOS){let e=i.SOS;if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0!==e.active&&"boolean"!=typeof e.active){const e={instancePath:t+"/appFeatures/SOS/active",schemaPath:"#/properties/appFeatures/properties/SOS/properties/active/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.activeEmergencies){let s=e.activeEmergencies;if(Array.isArray(s)){const e=s.length;for(let i=0;i<e;i++){let e=s[i];if("string"!=typeof e){const e={instancePath:t+"/appFeatures/SOS/activeEmergencies/"+i,schemaPath:"#/properties/appFeatures/properties/SOS/properties/activeEmergencies/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("medical"!==e&&"fire"!==e&&"suspiciousPerson"!==e&&"other"!==e&&"conflict"!==e&&"shooter"!==e){const e={instancePath:t+"/appFeatures/SOS/activeEmergencies/"+i,schemaPath:"#/properties/appFeatures/properties/SOS/properties/activeEmergencies/items/enum",keyword:"enum",params:{allowedValues:De.properties.appFeatures.properties.SOS.properties.activeEmergencies.items.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t+"/appFeatures/SOS/activeEmergencies",schemaPath:"#/properties/appFeatures/properties/SOS/properties/activeEmergencies/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t+"/appFeatures/SOS",schemaPath:"#/properties/appFeatures/properties/SOS/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}}if(void 0!==i.Dining){let e=i.Dining;if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0!==e.system){let s=e.system;if("string"!=typeof s){const e={instancePath:t+"/appFeatures/Dining/system",schemaPath:"#/properties/appFeatures/properties/Dining/properties/system/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("gotab"!==s){const e={instancePath:t+"/appFeatures/Dining/system",schemaPath:"#/properties/appFeatures/properties/Dining/properties/system/enum",keyword:"enum",params:{allowedValues:De.properties.appFeatures.properties.Dining.properties.system.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.systemConfig){let s=e.systemConfig;if(s&&"object"==typeof s&&!Array.isArray(s)){for(const e in s)if("landingUrl"!==e&&"includeUserDetails"!==e){const s={instancePath:t+"/appFeatures/Dining/systemConfig",schemaPath:"#/properties/appFeatures/properties/Dining/properties/systemConfig/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:e},message:"must NOT have additional properties"};null===r?r=[s]:r.push(s),n++}if(void 0!==s.landingUrl){let e=s.landingUrl;if("string"==typeof e){if(!N(e)){const e={instancePath:t+"/appFeatures/Dining/systemConfig/landingUrl",schemaPath:"#/properties/appFeatures/properties/Dining/properties/systemConfig/properties/landingUrl/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/appFeatures/Dining/systemConfig/landingUrl",schemaPath:"#/properties/appFeatures/properties/Dining/properties/systemConfig/properties/landingUrl/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}if(void 0!==s.includeUserDetails&&"boolean"!=typeof s.includeUserDetails){const e={instancePath:t+"/appFeatures/Dining/systemConfig/includeUserDetails",schemaPath:"#/properties/appFeatures/properties/Dining/properties/systemConfig/properties/includeUserDetails/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/appFeatures/Dining/systemConfig",schemaPath:"#/properties/appFeatures/properties/Dining/properties/systemConfig/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t+"/appFeatures/Dining",schemaPath:"#/properties/appFeatures/properties/Dining/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t+"/appFeatures",schemaPath:"#/properties/appFeatures/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}let o=e.notifications;if(o&&"object"==typeof o&&!Array.isArray(o)){for(const e in o)if("email"!==e&&"sms"!==e&&"push"!==e){const s={instancePath:t+"/notifications",schemaPath:"#/properties/notifications/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:e},message:"must NOT have additional properties"};null===r?r=[s]:r.push(s),n++}if(void 0!==o.email){let e=o.email;if(e&&"object"==typeof e&&!Array.isArray(e)){for(const s in e)if("enabled"!==s){const e={instancePath:t+"/notifications/email",schemaPath:"#/properties/notifications/properties/email/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:s},message:"must NOT have additional properties"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.enabled&&"boolean"!=typeof e.enabled){const e={instancePath:t+"/notifications/email/enabled",schemaPath:"#/properties/notifications/properties/email/properties/enabled/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/notifications/email",schemaPath:"#/properties/notifications/properties/email/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}}if(void 0!==o.sms){let e=o.sms;if(e&&"object"==typeof e&&!Array.isArray(e)){for(const s in e)if("enabled"!==s){const e={instancePath:t+"/notifications/sms",schemaPath:"#/properties/notifications/properties/sms/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:s},message:"must NOT have additional properties"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.enabled&&"boolean"!=typeof e.enabled){const e={instancePath:t+"/notifications/sms/enabled",schemaPath:"#/properties/notifications/properties/sms/properties/enabled/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/notifications/sms",schemaPath:"#/properties/notifications/properties/sms/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}}if(void 0!==o.push){let e=o.push;if(e&&"object"==typeof e&&!Array.isArray(e)){for(const s in e)if("enabled"!==s){const e={instancePath:t+"/notifications/push",schemaPath:"#/properties/notifications/properties/push/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:s},message:"must NOT have additional properties"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.enabled&&"boolean"!=typeof e.enabled){const e={instancePath:t+"/notifications/push/enabled",schemaPath:"#/properties/notifications/properties/push/properties/enabled/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/notifications/push",schemaPath:"#/properties/notifications/properties/push/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t+"/notifications",schemaPath:"#/properties/notifications/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.credentials){let s=e.credentials;if(s&&"object"==typeof s&&!Array.isArray(s));else{const e={instancePath:t+"/credentials",schemaPath:"#/properties/credentials/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}return validate61.errors=r,0===n},De={$schema:"http://json-schema.org/draft-07/schema",$id:"property.json",title:"Property",type:"object",description:"A property is a physical asset or building",required:["id","name","type","organization","timezone","discriminator"],properties:{id:{$ref:"definitions.json#/definitions/id"},name:{type:"string"},type:{type:"string",default:"property",enum:["property"]},discriminator:{type:"string",enum:["hospitality","education","commercial","storage"]},organization:{type:["string","null"],description:"Reference (id) to the organization that owns this property"},departments:{type:"array",items:{type:"string"}},testModeEnabled:{type:"boolean"},testMode:{type:"object",properties:{notificationEmails:{type:"array",items:{type:"string"},description:"Only users with these email addresses will receive notifications in test mode, including sms, email, or push."},notificationEmailDomains:{type:"array",items:{type:"string"},description:"Only users with email addreses ending in these domains will receive notifications in test mode, including sms, email, or push."}}},timezone:{type:"string",description:"IANA timezone string",pattern:"^([a-zA-Z]+/[a-zA-Z_]+)$",examples:["America/New_York","America/Los_Angeles"]},smsNumber:{type:"string"},checkInTime:{type:"string"},checkOutTime:{type:"string"},address:{$ref:"definitions.json#/definitions/address"},latitude:{type:"number"},longitude:{type:"number"},appFeatures:{type:"object",properties:{RoomControl:{type:"object",properties:{disabledSystems:{type:"array",items:{type:"string",enum:["climate","lights","shades","tv","doors"]}},commonAreas:{type:"object",properties:{spaces:{type:"array",items:{type:"string"}}}},alarmConfig:{type:"object",patternProperties:{"^[a-zA-Z0-9]+$":{type:"object",properties:{zoneLockMap:{type:"object",description:"Maps zone numbers to lock ids",additionalProperties:{type:"string"}}}}},examples:[{wZz7hucY:{zoneLockMap:{1:"wc87hucc",2:"bc86hzxc",3:"zv5ah5jv"}}}]}},additionalProperties:!1},CheckIn:{properties:{payment:{},identification:{},earlyCheckIn:{type:"object",required:["dynamic"],properties:{dynamic:{type:"boolean",default:!1},minimumPrice:{type:"number",default:10},maximumPrice:{type:"number",default:50},priceRatioPerHour:{type:"number",default:.1},minimumTime:{type:"string"}}},roomUpgrades:{},pet:{},promos:{}}},CheckOut:{properties:{lateCheckOut:{type:"object",required:["dynamic"],properties:{dynamic:{type:"boolean",default:!1},minimumPrice:{type:"number",default:10},maximumPrice:{type:"number",default:50},priceRatioPerHour:{type:"number",default:.1}}}}},Concierge:{type:"object",properties:{timeTracking:{type:"boolean",default:!1},tipping:{type:"boolean",default:!1},ratings:{type:"boolean",default:!0},newTicketCCs:{type:"array",items:{type:"string"},default:[]},newMessageChannel:{type:["string","null"],enum:["sms","email"],default:"sms",description:"Determines how users should be notified of new messages in the concierge system"},quickServices:{type:"array",items:{type:"object",properties:{name:{type:"string"},description:{type:"string"},department:{type:"string"},image:{$ref:"mediaFile.json"}},required:["name","description","image"]}},issues:{type:"object",properties:{syncWithPropertyId:{type:"string"}}}}},DigitalKey:{type:"object",properties:{system:{type:"string",enum:["salto","dormakaba"]},systemOnline:{type:"boolean",default:!1},systemConfig:{type:"object",properties:{legicUrl:{type:"string",format:"uri"},legicWalletName:{type:"string"},legicAppId:{type:"number"},legicTechUsername:{type:"string"},legicTechPassword:{type:"string"}},additionalProperties:!1,default:{}},enableApp:{type:"boolean"},branding:{type:"object",properties:{logo:{type:"string",format:"uri"},gradient:{type:"array",items:{type:"string",pattern:"^(?!#ffffff)(#[0-9a-fA-F]{6})$"},minItems:2,maxItems:2},highlightedGradient:{type:"array",items:{type:"string",pattern:"^(?!#ffffff)(#[0-9a-fA-F]{6})$"},minItems:2,maxItems:3}}}}},SOS:{type:"object",properties:{active:{type:"boolean"},activeEmergencies:{type:"array",items:{type:"string",enum:["medical","fire","suspiciousPerson","other","conflict","shooter"]}}}},Elevator:{},Experiences:{},Dining:{type:"object",properties:{system:{type:"string",enum:["gotab"]},systemConfig:{type:"object",properties:{landingUrl:{type:"string",format:"uri"},includeUserDetails:{type:"boolean"}},additionalProperties:!1}}},Rentals:{},Shop:{},Spa:{},Valet:{}},additionalProperties:!1,default:{RoomControl:{}}},notifications:{type:"object",properties:{email:{type:"object",properties:{enabled:{type:"boolean"}},additionalProperties:!1},sms:{type:"object",properties:{enabled:{type:"boolean"}},additionalProperties:!1},push:{type:"object",properties:{enabled:{type:"boolean"}},additionalProperties:!1}},additionalProperties:!1,default:{email:{enabled:!1},sms:{enabled:!1},push:{enabled:!1}}},credentials:{type:"object",additionalProperties:!0}}},$e=new RegExp("^([a-zA-Z]+/[a-zA-Z_]+)$","u"),Ce=new RegExp("^[a-zA-Z0-9]+$","u"),Se=new RegExp("^(?!#ffffff)(#[0-9a-fA-F]{6})$","u");var Oe=validate63,Fe={$schema:"http://json-schema.org/draft-07/schema",$id:"reservation.json",title:"Reservation",type:"object",required:["type","status","checkInDateTime","checkOutDateTime"],properties:{id:{$ref:"definitions.json#/definitions/id"},driver:{$ref:"definitions.json#/definitions/driver"},primaryGuest:{type:"string"},type:{type:"string",default:"reservation",enum:["reservation"]},sharedGuests:{type:"array",items:{type:"string"}},spaceCategory:{type:"string"},space:{type:["string","null"]},previousSpace:{type:["string","null"],default:null,description:"Used when there was a space assigned and it changes"},status:{type:"string",enum:["reserved","checkedIn","checkedOut","cancelled","noShow","enquired","requested","optional"],description:" reserved - confirmed by both parties, before check-in\n checkedIn - checked in\n checkedOut - checked out\n cancelled - Cancelled\n noShow - No show\n enquired - Confirmed neither by the customer nor enterprise\n requested - Confirmed by the customer but not the enterprise (waitlist)\n optional - Confirmed by the enterprise but not the customer (holding)"},mobileCheckInSpaceCategoryChanged:{type:"boolean",description:"spaceCategory has changed from original."},mobileCheckInSpaceChanged:{type:"boolean"},mobileCheckInStatus:{type:"string",enum:["ready","blocked","preArrivalStepsRequired","spaceNotAssigned","spaceNotReady","checkInTimeNotStarted"]},mobileCheckInStatusMessage:{type:"string"},confirmationNumber:{type:"string"},expectedCheckInDateTime:{type:["string","object"],format:"date-time",description:"Expected arrival time of guest."},checkInDateTime:{type:["string","object"],format:"date-time"},checkOutDateTime:{type:["string","object"],format:"date-time"},adultCount:{type:"number",default:1,minimum:1},childCount:{type:"number",default:0},spaceCategoryAvailabilites:{type:"array",items:{type:"object",properties:{id:{type:"string"},price:{type:"number"},unit:{type:"string",enum:["night","stay","hour"]},isUpgrade:{type:"boolean"}}}},revenue:{$ref:"definitions.json#/definitions/revenue"},rateSuppressed:{type:"boolean"},payment:{type:"string"},company:{type:"string"},travelAgent:{type:"string"},systemId:{$ref:"definitions.json#/definitions/systemId"},metadata:{ref:"definitions.json#/definitions/metadata"},updatedAt:{$ref:"definitions.json#/definitions/updatedAt"}}},Te={type:"array",items:{type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},name:{type:"string"},date:{type:"string",format:"date-time"},price:{type:"number"},tax:{type:["number","null"]}}}};function validate64(e,{instancePath:t="",parentData:s,parentDataProperty:i,rootData:a=e}={}){let r=null,n=0;if(Array.isArray(e)){const s=e.length;for(let i=0;i<s;i++){let s=e[i];if(s&&"object"==typeof s&&!Array.isArray(s)){if(void 0!==s.id){let e=s.id;if("string"!=typeof e){const e={instancePath:t+"/"+i+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}const a=n,o=n;if("global"!==e&&"system"!==e){const e={};null===r?r=[e]:r.push(e),n++}if(o===n){const e={instancePath:t+"/"+i+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===r?r=[e]:r.push(e),n++}else n=a,null!==r&&(a?r.length=a:r=null)}if(void 0!==s.name&&"string"!=typeof s.name){const e={instancePath:t+"/"+i+"/name",schemaPath:"#/items/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==s.date){let e=s.date;if("string"==typeof e){if(!I.validate(e)){const e={instancePath:t+"/"+i+"/date",schemaPath:"#/items/properties/date/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/"+i+"/date",schemaPath:"#/items/properties/date/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}if(void 0!==s.price&&"number"!=typeof s.price){const e={instancePath:t+"/"+i+"/price",schemaPath:"#/items/properties/price/type",keyword:"type",params:{type:"number"},message:"must be number"};null===r?r=[e]:r.push(e),n++}if(void 0!==s.tax){let e=s.tax;if("number"!=typeof e&&null!==e){const e={instancePath:t+"/"+i+"/tax",schemaPath:"#/items/properties/tax/type",keyword:"type",params:{type:Te.items.properties.tax.type},message:"must be number,null"};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t+"/"+i,schemaPath:"#/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}return validate64.errors=r,0===n}function validate63(e,{instancePath:t="",parentData:s,parentDataProperty:i,rootData:a=e}={}){let r=null,n=0;if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.type&&(e.type="reservation"),void 0===e.previousSpace&&(e.previousSpace=null),void 0===e.adultCount&&(e.adultCount=1),void 0===e.childCount&&(e.childCount=0),void 0===e.type){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.status){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"status"},message:"must have required property 'status'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.checkInDateTime){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"checkInDateTime"},message:"must have required property 'checkInDateTime'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.checkOutDateTime){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"checkOutDateTime"},message:"must have required property 'checkOutDateTime'"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.id){let s=e.id;if("string"!=typeof s){const e={instancePath:t+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}const i=n,a=n;if("global"!==s&&"system"!==s){const e={};null===r?r=[e]:r.push(e),n++}if(a===n){const e={instancePath:t+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===r?r=[e]:r.push(e),n++}else n=i,null!==r&&(i?r.length=i:r=null)}if(void 0!==e.driver){let s=e.driver;if("string"!=typeof s){const e={instancePath:t+"/driver",schemaPath:"definitions.json#/definitions/driver/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("adlink"!==s&&"aws-kinesis"!==s&&"butler"!==s&&"crestron"!==s&&"dell"!==s&&"dmp"!==s&&"doorbird"!==s&&"dormakaba"!==s&&"dsc"!==s&&"ecobee"!==s&&"epson"!==s&&"geovision-rs"!==s&&"geovision-as-manager"!==s&&"honeywell-vista"!==s&&"igor"!==s&&"inncom"!==s&&"isapi"!==s&&"kohost-k7"!==s&&"kohost"!==s&&"lg"!==s&&"lg-webos"!==s&&"lapi"!==s&&"lirc"!==s&&"mews"!==s&&"mht"!==s&&"paxton"!==s&&"pelican-wireless"!==s&&"power-shades"!==s&&"rachio"!==s&&"rebrandly"!==s&&"rtsp"!==s&&"salto"!==s&&"salto-irn"!==s&&"samsung"!==s&&"se"!==s&&"sendgrid"!==s&&"sonifi"!==s&&"stay-n-touch"!==s&&"storable"!==s&&"twilio"!==s&&"unifi"!==s&&"valcom"!==s&&"vizio"!==s&&"wisenet"!==s&&"cloudflare-images"!==s&&"cloudflare-stream"!==s&&"insperia-privacy"!==s){const e={instancePath:t+"/driver",schemaPath:"definitions.json#/definitions/driver/enum",keyword:"enum",params:{allowedValues:f.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.primaryGuest&&"string"!=typeof e.primaryGuest){const e={instancePath:t+"/primaryGuest",schemaPath:"#/properties/primaryGuest/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}let s=e.type;if("string"!=typeof s){const e={instancePath:t+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("reservation"!==s){const e={instancePath:t+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:Fe.properties.type.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.sharedGuests){let s=e.sharedGuests;if(Array.isArray(s)){const e=s.length;for(let i=0;i<e;i++)if("string"!=typeof s[i]){const e={instancePath:t+"/sharedGuests/"+i,schemaPath:"#/properties/sharedGuests/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/sharedGuests",schemaPath:"#/properties/sharedGuests/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.spaceCategory&&"string"!=typeof e.spaceCategory){const e={instancePath:t+"/spaceCategory",schemaPath:"#/properties/spaceCategory/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.space){let s=e.space;if("string"!=typeof s&&null!==s){const e={instancePath:t+"/space",schemaPath:"#/properties/space/type",keyword:"type",params:{type:Fe.properties.space.type},message:"must be string,null"};null===r?r=[e]:r.push(e),n++}}let i=e.previousSpace;if("string"!=typeof i&&null!==i){const e={instancePath:t+"/previousSpace",schemaPath:"#/properties/previousSpace/type",keyword:"type",params:{type:Fe.properties.previousSpace.type},message:"must be string,null"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.status){let s=e.status;if("string"!=typeof s){const e={instancePath:t+"/status",schemaPath:"#/properties/status/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("reserved"!==s&&"checkedIn"!==s&&"checkedOut"!==s&&"cancelled"!==s&&"noShow"!==s&&"enquired"!==s&&"requested"!==s&&"optional"!==s){const e={instancePath:t+"/status",schemaPath:"#/properties/status/enum",keyword:"enum",params:{allowedValues:Fe.properties.status.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.mobileCheckInSpaceCategoryChanged&&"boolean"!=typeof e.mobileCheckInSpaceCategoryChanged){const e={instancePath:t+"/mobileCheckInSpaceCategoryChanged",schemaPath:"#/properties/mobileCheckInSpaceCategoryChanged/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.mobileCheckInSpaceChanged&&"boolean"!=typeof e.mobileCheckInSpaceChanged){const e={instancePath:t+"/mobileCheckInSpaceChanged",schemaPath:"#/properties/mobileCheckInSpaceChanged/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.mobileCheckInStatus){let s=e.mobileCheckInStatus;if("string"!=typeof s){const e={instancePath:t+"/mobileCheckInStatus",schemaPath:"#/properties/mobileCheckInStatus/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("ready"!==s&&"blocked"!==s&&"preArrivalStepsRequired"!==s&&"spaceNotAssigned"!==s&&"spaceNotReady"!==s&&"checkInTimeNotStarted"!==s){const e={instancePath:t+"/mobileCheckInStatus",schemaPath:"#/properties/mobileCheckInStatus/enum",keyword:"enum",params:{allowedValues:Fe.properties.mobileCheckInStatus.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.mobileCheckInStatusMessage&&"string"!=typeof e.mobileCheckInStatusMessage){const e={instancePath:t+"/mobileCheckInStatusMessage",schemaPath:"#/properties/mobileCheckInStatusMessage/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.confirmationNumber&&"string"!=typeof e.confirmationNumber){const e={instancePath:t+"/confirmationNumber",schemaPath:"#/properties/confirmationNumber/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.expectedCheckInDateTime){let s=e.expectedCheckInDateTime;if("string"!=typeof s&&(!s||"object"!=typeof s||Array.isArray(s))){const e={instancePath:t+"/expectedCheckInDateTime",schemaPath:"#/properties/expectedCheckInDateTime/type",keyword:"type",params:{type:Fe.properties.expectedCheckInDateTime.type},message:"must be string,object"};null===r?r=[e]:r.push(e),n++}if("string"==typeof s&&!I.validate(s)){const e={instancePath:t+"/expectedCheckInDateTime",schemaPath:"#/properties/expectedCheckInDateTime/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.checkInDateTime){let s=e.checkInDateTime;if("string"!=typeof s&&(!s||"object"!=typeof s||Array.isArray(s))){const e={instancePath:t+"/checkInDateTime",schemaPath:"#/properties/checkInDateTime/type",keyword:"type",params:{type:Fe.properties.checkInDateTime.type},message:"must be string,object"};null===r?r=[e]:r.push(e),n++}if("string"==typeof s&&!I.validate(s)){const e={instancePath:t+"/checkInDateTime",schemaPath:"#/properties/checkInDateTime/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.checkOutDateTime){let s=e.checkOutDateTime;if("string"!=typeof s&&(!s||"object"!=typeof s||Array.isArray(s))){const e={instancePath:t+"/checkOutDateTime",schemaPath:"#/properties/checkOutDateTime/type",keyword:"type",params:{type:Fe.properties.checkOutDateTime.type},message:"must be string,object"};null===r?r=[e]:r.push(e),n++}if("string"==typeof s&&!I.validate(s)){const e={instancePath:t+"/checkOutDateTime",schemaPath:"#/properties/checkOutDateTime/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===r?r=[e]:r.push(e),n++}}let o=e.adultCount;if("number"==typeof o){if(o<1||isNaN(o)){const e={instancePath:t+"/adultCount",schemaPath:"#/properties/adultCount/minimum",keyword:"minimum",params:{comparison:">=",limit:1},message:"must be >= 1"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/adultCount",schemaPath:"#/properties/adultCount/type",keyword:"type",params:{type:"number"},message:"must be number"};null===r?r=[e]:r.push(e),n++}if("number"!=typeof e.childCount){const e={instancePath:t+"/childCount",schemaPath:"#/properties/childCount/type",keyword:"type",params:{type:"number"},message:"must be number"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.spaceCategoryAvailabilites){let s=e.spaceCategoryAvailabilites;if(Array.isArray(s)){const e=s.length;for(let i=0;i<e;i++){let e=s[i];if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0!==e.id&&"string"!=typeof e.id){const e={instancePath:t+"/spaceCategoryAvailabilites/"+i+"/id",schemaPath:"#/properties/spaceCategoryAvailabilites/items/properties/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.price&&"number"!=typeof e.price){const e={instancePath:t+"/spaceCategoryAvailabilites/"+i+"/price",schemaPath:"#/properties/spaceCategoryAvailabilites/items/properties/price/type",keyword:"type",params:{type:"number"},message:"must be number"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.unit){let s=e.unit;if("string"!=typeof s){const e={instancePath:t+"/spaceCategoryAvailabilites/"+i+"/unit",schemaPath:"#/properties/spaceCategoryAvailabilites/items/properties/unit/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("night"!==s&&"stay"!==s&&"hour"!==s){const e={instancePath:t+"/spaceCategoryAvailabilites/"+i+"/unit",schemaPath:"#/properties/spaceCategoryAvailabilites/items/properties/unit/enum",keyword:"enum",params:{allowedValues:Fe.properties.spaceCategoryAvailabilites.items.properties.unit.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.isUpgrade&&"boolean"!=typeof e.isUpgrade){const e={instancePath:t+"/spaceCategoryAvailabilites/"+i+"/isUpgrade",schemaPath:"#/properties/spaceCategoryAvailabilites/items/properties/isUpgrade/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/spaceCategoryAvailabilites/"+i,schemaPath:"#/properties/spaceCategoryAvailabilites/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t+"/spaceCategoryAvailabilites",schemaPath:"#/properties/spaceCategoryAvailabilites/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.revenue&&(validate64(e.revenue,{instancePath:t+"/revenue",parentData:e,parentDataProperty:"revenue",rootData:a})||(r=null===r?validate64.errors:r.concat(validate64.errors),n=r.length)),void 0!==e.rateSuppressed&&"boolean"!=typeof e.rateSuppressed){const e={instancePath:t+"/rateSuppressed",schemaPath:"#/properties/rateSuppressed/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.payment&&"string"!=typeof e.payment){const e={instancePath:t+"/payment",schemaPath:"#/properties/payment/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.company&&"string"!=typeof e.company){const e={instancePath:t+"/company",schemaPath:"#/properties/company/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.travelAgent&&"string"!=typeof e.travelAgent){const e={instancePath:t+"/travelAgent",schemaPath:"#/properties/travelAgent/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.systemId&&"string"!=typeof e.systemId){const e={instancePath:t+"/systemId",schemaPath:"definitions.json#/definitions/systemId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.updatedAt){let s=e.updatedAt;if("string"!=typeof s&&(!s||"object"!=typeof s||Array.isArray(s))){const e={instancePath:t+"/updatedAt",schemaPath:"definitions.json#/definitions/updatedAt/type",keyword:"type",params:{type:Pe.type},message:"must be string,object"};null===r?r=[e]:r.push(e),n++}if("string"==typeof s&&!I.validate(s)){const e={instancePath:t+"/updatedAt",schemaPath:"definitions.json#/definitions/updatedAt/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}return validate63.errors=r,0===n}var xe=function validate66(e,{instancePath:t="",parentData:s,parentDataProperty:i,rootData:a=e}={}){let r=null,n=0;if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.type&&(e.type="room"),void 0===e.dimmers&&(e.dimmers=[]),void 0===e.switches&&(e.switches=[]),void 0===e.thermostats&&(e.thermostats=[]),void 0===e.locks&&(e.locks=[]),void 0===e.windowCoverings&&(e.windowCoverings=[]),void 0===e.courtesy&&(e.courtesy=[]),void 0===e.cameras&&(e.cameras=[]),void 0===e.mediaSources&&(e.mediaSources=[]),void 0===e.motionSensors&&(e.motionSensors=[]),void 0===e.alarms&&(e.alarms=[]),void 0===e.id){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.name){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};null===r?r=[e]:r.push(e),n++}for(const s in e)if(!A.call(Me.properties,s)){const e={instancePath:t,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:s},message:"must NOT have additional properties"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.id){let s=e.id;if("string"!=typeof s){const e={instancePath:t+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}const i=n,a=n;if("global"!==s&&"system"!==s){const e={};null===r?r=[e]:r.push(e),n++}if(a===n){const e={instancePath:t+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===r?r=[e]:r.push(e),n++}else n=i,null!==r&&(i?r.length=i:r=null)}let s=e.type;if("string"!=typeof s){const e={instancePath:t+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("room"!==s){const e={instancePath:t+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:Me.properties.type.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.name&&"string"!=typeof e.name){const e={instancePath:t+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.floor&&"string"!=typeof e.floor){const e={instancePath:t+"/floor",schemaPath:"#/properties/floor/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}let i=e.dimmers;if(Array.isArray(i)){const e=i.length;for(let s=0;s<e;s++)validate27(i[s],{instancePath:t+"/dimmers/"+s,parentData:i,parentDataProperty:s,rootData:a})||(r=null===r?validate27.errors:r.concat(validate27.errors),n=r.length)}else{const e={instancePath:t+"/dimmers",schemaPath:"#/properties/dimmers/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}let o=e.switches;if(Array.isArray(o)){const e=o.length;for(let s=0;s<e;s++)validate68(o[s],{instancePath:t+"/switches/"+s,parentData:o,parentDataProperty:s,rootData:a})||(r=null===r?validate68.errors:r.concat(validate68.errors),n=r.length)}else{const e={instancePath:t+"/switches",schemaPath:"#/properties/switches/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}let p=e.thermostats;if(Array.isArray(p)){const e=p.length;for(let s=0;s<e;s++)validate72(p[s],{instancePath:t+"/thermostats/"+s,parentData:p,parentDataProperty:s,rootData:a})||(r=null===r?validate72.errors:r.concat(validate72.errors),n=r.length)}else{const e={instancePath:t+"/thermostats",schemaPath:"#/properties/thermostats/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}let m=e.locks;if(Array.isArray(m)){const e=m.length;for(let s=0;s<e;s++)validate45(m[s],{instancePath:t+"/locks/"+s,parentData:m,parentDataProperty:s,rootData:a})||(r=null===r?validate45.errors:r.concat(validate45.errors),n=r.length)}else{const e={instancePath:t+"/locks",schemaPath:"#/properties/locks/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}let d=e.windowCoverings;if(Array.isArray(d)){const e=d.length;for(let s=0;s<e;s++)validate81(d[s],{instancePath:t+"/windowCoverings/"+s,parentData:d,parentDataProperty:s,rootData:a})||(r=null===r?validate81.errors:r.concat(validate81.errors),n=r.length)}else{const e={instancePath:t+"/windowCoverings",schemaPath:"#/properties/windowCoverings/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}let u=e.courtesy;if(Array.isArray(u)){const e=u.length;for(let s=0;s<e;s++)validate22(u[s],{instancePath:t+"/courtesy/"+s,parentData:u,parentDataProperty:s,rootData:a})||(r=null===r?validate22.errors:r.concat(validate22.errors),n=r.length)}else{const e={instancePath:t+"/courtesy",schemaPath:"#/properties/courtesy/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}let l=e.cameras;if(Array.isArray(l)){const e=l.length;for(let s=0;s<e;s++)validate17(l[s],{instancePath:t+"/cameras/"+s,parentData:l,parentDataProperty:s,rootData:a})||(r=null===r?validate17.errors:r.concat(validate17.errors),n=r.length)}else{const e={instancePath:t+"/cameras",schemaPath:"#/properties/cameras/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}let c=e.mediaSources;if(Array.isArray(c)){const e=c.length;for(let s=0;s<e;s++)validate49(c[s],{instancePath:t+"/mediaSources/"+s,parentData:c,parentDataProperty:s,rootData:a})||(r=null===r?validate49.errors:r.concat(validate49.errors),n=r.length)}else{const e={instancePath:t+"/mediaSources",schemaPath:"#/properties/mediaSources/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}let y=e.motionSensors;if(Array.isArray(y)){const e=y.length;for(let s=0;s<e;s++)validate52(y[s],{instancePath:t+"/motionSensors/"+s,parentData:y,parentDataProperty:s,rootData:a})||(r=null===r?validate52.errors:r.concat(validate52.errors),n=r.length)}else{const e={instancePath:t+"/motionSensors",schemaPath:"#/properties/motionSensors/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}let h=e.alarms;if(Array.isArray(h)){const e=h.length;for(let s=0;s<e;s++)validate10(h[s],{instancePath:t+"/alarms/"+s,parentData:h,parentDataProperty:s,rootData:a})||(r=null===r?validate10.errors:r.concat(validate10.errors),n=r.length)}else{const e={instancePath:t+"/alarms",schemaPath:"#/properties/alarms/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.occupiedAt){let s=e.occupiedAt;if("string"!=typeof s&&(!s||"object"!=typeof s||Array.isArray(s))){const e={instancePath:t+"/occupiedAt",schemaPath:"definitions.json#/definitions/createdAt/type",keyword:"type",params:{type:ge.type},message:"must be string,object"};null===r?r=[e]:r.push(e),n++}if("string"==typeof s&&!I.validate(s)){const e={instancePath:t+"/occupiedAt",schemaPath:"definitions.json#/definitions/createdAt/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.createdAt){let s=e.createdAt;if("string"!=typeof s&&(!s||"object"!=typeof s||Array.isArray(s))){const e={instancePath:t+"/createdAt",schemaPath:"definitions.json#/definitions/createdAt/type",keyword:"type",params:{type:ge.type},message:"must be string,object"};null===r?r=[e]:r.push(e),n++}if("string"==typeof s&&!I.validate(s)){const e={instancePath:t+"/createdAt",schemaPath:"definitions.json#/definitions/createdAt/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.updatedAt){let s=e.updatedAt;if("string"!=typeof s&&(!s||"object"!=typeof s||Array.isArray(s))){const e={instancePath:t+"/updatedAt",schemaPath:"definitions.json#/definitions/updatedAt/type",keyword:"type",params:{type:Pe.type},message:"must be string,object"};null===r?r=[e]:r.push(e),n++}if("string"==typeof s&&!I.validate(s)){const e={instancePath:t+"/updatedAt",schemaPath:"definitions.json#/definitions/updatedAt/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}return validate66.errors=r,0===n},Me={$schema:"http://json-schema.org/draft-07/schema",$id:"room.json",title:"Room",description:"A room represents a physical space of controllable IoT devices",type:"object",required:["id","name"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",enum:["room"],default:"room"},name:{type:"string"},floor:{type:"string"},dimmers:{type:"array",default:[],items:{$ref:"dimmer.json"}},switches:{type:"array",default:[],items:{$ref:"switch.json"}},thermostats:{type:"array",default:[],items:{$ref:"thermostat.json"}},locks:{type:"array",default:[],items:{$ref:"lock.json"}},windowCoverings:{type:"array",default:[],items:{$ref:"windowCovering.json"}},courtesy:{type:"array",default:[],items:{$ref:"courtesy.json"}},cameras:{type:"array",default:[],items:{$ref:"camera.json"}},mediaSources:{type:"array",default:[],items:{$ref:"mediaSource.json"}},motionSensors:{type:"array",default:[],items:{$ref:"motionSensor.json"}},alarms:{type:"array",default:[],items:{$ref:"alarm.json"}},occupiedAt:{$ref:"definitions.json#/definitions/createdAt"},createdAt:{$ref:"definitions.json#/definitions/createdAt"},updatedAt:{$ref:"definitions.json#/definitions/updatedAt"}},additionalProperties:!1},ze={$schema:"http://json-schema.org/draft-07/schema",$id:"switch.json",title:"Switch",description:"Any smart switch",type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},name:{type:"string"},type:{$ref:"definitions.json#/definitions/type"},discriminator:{type:"string",enum:["light","fan","irrigation"]},supportedNotifications:{$ref:"definitions.json#/definitions/supportedNotifications"},notification:{$ref:"definitions.json#/definitions/notification"},driver:{$ref:"definitions.json#/definitions/driver"},offline:{type:"boolean"},state:{type:"string",enum:["on","off"]},systemId:{$ref:"definitions.json#/definitions/systemId"},watts:{$ref:"definitions.json#/definitions/watts"},icon:{type:"string"},modelNumber:{type:"string"},serialNumber:{type:"string"},firmwareVersion:{type:"string"}},required:["id","type","state","driver"]};function validate69(e,{instancePath:t="",parentData:s,parentDataProperty:i,rootData:a=e}={}){let r=null,n=0;if((!e||"object"!=typeof e||Array.isArray(e))&&null!==e){const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:b.type},message:"must be object,null"};null===r?r=[e]:r.push(e),n++}if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0!==e.name){let s=e.name;if("string"!=typeof s){const e={instancePath:t+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("button 1"!==s&&"button 2"!==s&&"button 3"!==s&&"button 4"!==s&&"button 5"!==s&&"idle"!==s&&"powerHasBeedApplied"!==s&&"acMainsDisconnected"!==s&&"acMainsReconnected"!==s&&"replaceBatterySoon"!==s&&"replaceBatteryNow"!==s&&"batteryOk"!==s&&"hardwareFailure"!==s&&"softwareFailure"!==s&&"hardwareFailureWithCode"!==s&&"softwareFailureWithCode"!==s&&"motionDetection"!==s&&"airFilterNeedsCleaned"!==s&&"airFilterNeedsReplaced"!==s&&"smokeDetected"!==s&&"outsideSafeTemperatureRange"!==s&&"outsideSafeHumidityRange"!==s&&"scheduleMaintenance"!==s&&"doorAjar"!==s&&"communicationFailure"!==s&&"communicationOk"!==s&&"burglarAlarm"!==s&&"fireAlarm"!==s){const e={instancePath:t+"/name",schemaPath:"#/definitions/supportedNotifications/items/enum",keyword:"enum",params:{allowedValues:v.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.timestamp){let s=e.timestamp;if("number"==typeof s){if(s<1655907956593||isNaN(s)){const e={instancePath:t+"/timestamp",schemaPath:"#/properties/timestamp/minimum",keyword:"minimum",params:{comparison:">=",limit:1655907956593},message:"must be >= 1655907956593"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/timestamp",schemaPath:"#/properties/timestamp/type",keyword:"type",params:{type:"number"},message:"must be number"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.description&&"string"!=typeof e.description){const e={instancePath:t+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}return validate69.errors=r,0===n}function validate68(e,{instancePath:t="",parentData:s,parentDataProperty:i,rootData:a=e}={}){let r=null,n=0;if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.id){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.type){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.state){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"state"},message:"must have required property 'state'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.driver){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"driver"},message:"must have required property 'driver'"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.id){let s=e.id;if("string"!=typeof s){const e={instancePath:t+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}const i=n,a=n;if("global"!==s&&"system"!==s){const e={};null===r?r=[e]:r.push(e),n++}if(a===n){const e={instancePath:t+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===r?r=[e]:r.push(e),n++}else n=i,null!==r&&(i?r.length=i:r=null)}if(void 0!==e.name&&"string"!=typeof e.name){const e={instancePath:t+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.type){let s=e.type;if("string"!=typeof s){const e={instancePath:t+"/type",schemaPath:"definitions.json#/definitions/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("alarm"!==s&&"dimmer"!==s&&"switch"!==s&&"motionSensor"!==s&&"windowCovering"!==s&&"camera"!==s&&"mediaSource"!==s&&"thermostat"!==s&&"lock"!==s&&"courtesy"!==s&&"gateway"!==s&&"tv"!==s&&"dvr"!==s&&"appleTv"!==s&&"discPlayer"!==s&&"mediaPlayer"!==s&&"uncontrolledDevice"!==s){const e={instancePath:t+"/type",schemaPath:"definitions.json#/definitions/type/enum",keyword:"enum",params:{allowedValues:C.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.discriminator){let s=e.discriminator;if("string"!=typeof s){const e={instancePath:t+"/discriminator",schemaPath:"#/properties/discriminator/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("light"!==s&&"fan"!==s&&"irrigation"!==s){const e={instancePath:t+"/discriminator",schemaPath:"#/properties/discriminator/enum",keyword:"enum",params:{allowedValues:ze.properties.discriminator.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.supportedNotifications){let s=e.supportedNotifications;if(Array.isArray(s)){const e=s.length;for(let i=0;i<e;i++){let e=s[i];if("button 1"!==e&&"button 2"!==e&&"button 3"!==e&&"button 4"!==e&&"button 5"!==e&&"idle"!==e&&"powerHasBeedApplied"!==e&&"acMainsDisconnected"!==e&&"acMainsReconnected"!==e&&"replaceBatterySoon"!==e&&"replaceBatteryNow"!==e&&"batteryOk"!==e&&"hardwareFailure"!==e&&"softwareFailure"!==e&&"hardwareFailureWithCode"!==e&&"softwareFailureWithCode"!==e&&"motionDetection"!==e&&"airFilterNeedsCleaned"!==e&&"airFilterNeedsReplaced"!==e&&"smokeDetected"!==e&&"outsideSafeTemperatureRange"!==e&&"outsideSafeHumidityRange"!==e&&"scheduleMaintenance"!==e&&"doorAjar"!==e&&"communicationFailure"!==e&&"communicationOk"!==e&&"burglarAlarm"!==e&&"fireAlarm"!==e){const e={instancePath:t+"/supportedNotifications/"+i,schemaPath:"definitions.json#/definitions/supportedNotifications/items/enum",keyword:"enum",params:{allowedValues:h.items.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}let i,a=s.length;if(a>1)e:for(;a--;)for(i=a;i--;)if(g(s[a],s[i])){const e={instancePath:t+"/supportedNotifications",schemaPath:"definitions.json#/definitions/supportedNotifications/uniqueItems",keyword:"uniqueItems",params:{i:a,j:i},message:"must NOT have duplicate items (items ## "+i+" and "+a+" are identical)"};null===r?r=[e]:r.push(e),n++;break e}}else{const e={instancePath:t+"/supportedNotifications",schemaPath:"definitions.json#/definitions/supportedNotifications/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.notification&&(validate69(e.notification,{instancePath:t+"/notification",parentData:e,parentDataProperty:"notification",rootData:a})||(r=null===r?validate69.errors:r.concat(validate69.errors),n=r.length)),void 0!==e.driver){let s=e.driver;if("string"!=typeof s){const e={instancePath:t+"/driver",schemaPath:"definitions.json#/definitions/driver/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("adlink"!==s&&"aws-kinesis"!==s&&"butler"!==s&&"crestron"!==s&&"dell"!==s&&"dmp"!==s&&"doorbird"!==s&&"dormakaba"!==s&&"dsc"!==s&&"ecobee"!==s&&"epson"!==s&&"geovision-rs"!==s&&"geovision-as-manager"!==s&&"honeywell-vista"!==s&&"igor"!==s&&"inncom"!==s&&"isapi"!==s&&"kohost-k7"!==s&&"kohost"!==s&&"lg"!==s&&"lg-webos"!==s&&"lapi"!==s&&"lirc"!==s&&"mews"!==s&&"mht"!==s&&"paxton"!==s&&"pelican-wireless"!==s&&"power-shades"!==s&&"rachio"!==s&&"rebrandly"!==s&&"rtsp"!==s&&"salto"!==s&&"salto-irn"!==s&&"samsung"!==s&&"se"!==s&&"sendgrid"!==s&&"sonifi"!==s&&"stay-n-touch"!==s&&"storable"!==s&&"twilio"!==s&&"unifi"!==s&&"valcom"!==s&&"vizio"!==s&&"wisenet"!==s&&"cloudflare-images"!==s&&"cloudflare-stream"!==s&&"insperia-privacy"!==s){const e={instancePath:t+"/driver",schemaPath:"definitions.json#/definitions/driver/enum",keyword:"enum",params:{allowedValues:f.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.offline&&"boolean"!=typeof e.offline){const e={instancePath:t+"/offline",schemaPath:"#/properties/offline/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.state){let s=e.state;if("string"!=typeof s){const e={instancePath:t+"/state",schemaPath:"#/properties/state/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("on"!==s&&"off"!==s){const e={instancePath:t+"/state",schemaPath:"#/properties/state/enum",keyword:"enum",params:{allowedValues:ze.properties.state.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.systemId&&"string"!=typeof e.systemId){const e={instancePath:t+"/systemId",schemaPath:"definitions.json#/definitions/systemId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.watts){let s=e.watts;if("number"==typeof s){if(s<0||isNaN(s)){const e={instancePath:t+"/watts",schemaPath:"definitions.json#/definitions/watts/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/watts",schemaPath:"definitions.json#/definitions/watts/type",keyword:"type",params:{type:"number"},message:"must be number"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.icon&&"string"!=typeof e.icon){const e={instancePath:t+"/icon",schemaPath:"#/properties/icon/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.modelNumber&&"string"!=typeof e.modelNumber){const e={instancePath:t+"/modelNumber",schemaPath:"#/properties/modelNumber/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.serialNumber&&"string"!=typeof e.serialNumber){const e={instancePath:t+"/serialNumber",schemaPath:"#/properties/serialNumber/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.firmwareVersion&&"string"!=typeof e.firmwareVersion){const e={instancePath:t+"/firmwareVersion",schemaPath:"#/properties/firmwareVersion/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}return validate68.errors=r,0===n}var Re={$schema:"http://json-schema.org/draft-07/schema",$id:"thermostat.json",title:"Thermostat",description:"Any smart thermostat",type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},name:{$ref:"definitions.json#/definitions/name"},type:{$ref:"definitions.json#/definitions/type",default:"thermostat"},driver:{$ref:"definitions.json#/definitions/driver"},offline:{type:"boolean"},supportedNotifications:{$ref:"definitions.json#/definitions/supportedNotifications"},notification:{$ref:"definitions.json#/definitions/notification"},currentTemperature:{type:"number"},currentHumidity:{type:"number",minimum:0},hvacMode:{type:"string",$ref:"#/properties/supportedHvacModes/items"},hvacState:{type:["string","null"],enum:["cooling","heating","off",null]},fanMode:{type:"string",$ref:"#/properties/supportedFanModes/items"},fanState:{type:["string","null"],enum:["off","low","medium","high","on",null]},temperatureScale:{type:"string",enum:["celsius","fahrenheit"],default:"fahrenheit"},humidityScale:{type:["string","null"],enum:["absolute","relative",null]},supportedHvacModes:{type:"array",uniqueItems:!0,minItems:2,items:{enum:["cool","heat","auto","off"]}},supportedFanModes:{type:"array",uniqueItems:!0,items:{enum:["auto","low","medium","high","off","on"]}},setpoints:{type:"object",additionalProperties:!1,properties:{cool:{$ref:"#/$defs/setpoint"},heat:{$ref:"#/$defs/setpoint"},auto:{$ref:"#/$defs/setpoint"}}},minAutoDelta:{type:"number",default:3},cycleRate:{type:"number"},batteryLevel:{$ref:"definitions.json#/definitions/batteryLevel"},systemId:{$ref:"definitions.json#/definitions/systemId"},watts:{$ref:"definitions.json#/definitions/watts"},icon:{type:"string"},modelNumber:{type:"string"},serialNumber:{type:"string"},firmwareVersion:{type:"string"}},$defs:{setpoint:{type:"object",additionalProperties:!1,properties:{value:{$ref:"#/$defs/setpointValue"},min:{$ref:"#/$defs/setpointMinMax"},max:{$ref:"#/$defs/setpointMinMax"}}},setpointValue:{type:"number",minimum:0,maximum:99},setpointMinMax:{type:["number","null"],minimum:0,maximum:99}},required:["id","type","hvacMode","fanMode","hvacState","fanState","setpoints","temperatureScale","supportedHvacModes","supportedFanModes","driver"]},Ve={enum:["cool","heat","auto","off"]},Be={enum:["auto","low","medium","high","off","on"]};function validate73(e,{instancePath:t="",parentData:s,parentDataProperty:i,rootData:a=e}={}){let r=null,n=0;if((!e||"object"!=typeof e||Array.isArray(e))&&null!==e){const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:b.type},message:"must be object,null"};null===r?r=[e]:r.push(e),n++}if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0!==e.name){let s=e.name;if("string"!=typeof s){const e={instancePath:t+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("button 1"!==s&&"button 2"!==s&&"button 3"!==s&&"button 4"!==s&&"button 5"!==s&&"idle"!==s&&"powerHasBeedApplied"!==s&&"acMainsDisconnected"!==s&&"acMainsReconnected"!==s&&"replaceBatterySoon"!==s&&"replaceBatteryNow"!==s&&"batteryOk"!==s&&"hardwareFailure"!==s&&"softwareFailure"!==s&&"hardwareFailureWithCode"!==s&&"softwareFailureWithCode"!==s&&"motionDetection"!==s&&"airFilterNeedsCleaned"!==s&&"airFilterNeedsReplaced"!==s&&"smokeDetected"!==s&&"outsideSafeTemperatureRange"!==s&&"outsideSafeHumidityRange"!==s&&"scheduleMaintenance"!==s&&"doorAjar"!==s&&"communicationFailure"!==s&&"communicationOk"!==s&&"burglarAlarm"!==s&&"fireAlarm"!==s){const e={instancePath:t+"/name",schemaPath:"#/definitions/supportedNotifications/items/enum",keyword:"enum",params:{allowedValues:v.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.timestamp){let s=e.timestamp;if("number"==typeof s){if(s<1655907956593||isNaN(s)){const e={instancePath:t+"/timestamp",schemaPath:"#/properties/timestamp/minimum",keyword:"minimum",params:{comparison:">=",limit:1655907956593},message:"must be >= 1655907956593"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/timestamp",schemaPath:"#/properties/timestamp/type",keyword:"type",params:{type:"number"},message:"must be number"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.description&&"string"!=typeof e.description){const e={instancePath:t+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}return validate73.errors=r,0===n}var Le={type:["number","null"],minimum:0,maximum:99};function validate75(e,{instancePath:t="",parentData:s,parentDataProperty:i,rootData:a=e}={}){let r=null,n=0;if(e&&"object"==typeof e&&!Array.isArray(e)){for(const s in e)if("value"!==s&&"min"!==s&&"max"!==s){const e={instancePath:t,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:s},message:"must NOT have additional properties"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.value){let s=e.value;if("number"==typeof s){if(s>99||isNaN(s)){const e={instancePath:t+"/value",schemaPath:"#/$defs/setpointValue/maximum",keyword:"maximum",params:{comparison:"<=",limit:99},message:"must be <= 99"};null===r?r=[e]:r.push(e),n++}if(s<0||isNaN(s)){const e={instancePath:t+"/value",schemaPath:"#/$defs/setpointValue/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/value",schemaPath:"#/$defs/setpointValue/type",keyword:"type",params:{type:"number"},message:"must be number"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.min){let s=e.min;if("number"!=typeof s&&null!==s){const e={instancePath:t+"/min",schemaPath:"#/$defs/setpointMinMax/type",keyword:"type",params:{type:Le.type},message:"must be number,null"};null===r?r=[e]:r.push(e),n++}if("number"==typeof s){if(s>99||isNaN(s)){const e={instancePath:t+"/min",schemaPath:"#/$defs/setpointMinMax/maximum",keyword:"maximum",params:{comparison:"<=",limit:99},message:"must be <= 99"};null===r?r=[e]:r.push(e),n++}if(s<0||isNaN(s)){const e={instancePath:t+"/min",schemaPath:"#/$defs/setpointMinMax/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===r?r=[e]:r.push(e),n++}}}if(void 0!==e.max){let s=e.max;if("number"!=typeof s&&null!==s){const e={instancePath:t+"/max",schemaPath:"#/$defs/setpointMinMax/type",keyword:"type",params:{type:Le.type},message:"must be number,null"};null===r?r=[e]:r.push(e),n++}if("number"==typeof s){if(s>99||isNaN(s)){const e={instancePath:t+"/max",schemaPath:"#/$defs/setpointMinMax/maximum",keyword:"maximum",params:{comparison:"<=",limit:99},message:"must be <= 99"};null===r?r=[e]:r.push(e),n++}if(s<0||isNaN(s)){const e={instancePath:t+"/max",schemaPath:"#/$defs/setpointMinMax/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===r?r=[e]:r.push(e),n++}}}}else{const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}return validate75.errors=r,0===n}function validate72(e,{instancePath:t="",parentData:s,parentDataProperty:i,rootData:a=e}={}){let r=null,n=0;if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.type&&(e.type="thermostat"),void 0===e.temperatureScale&&(e.temperatureScale="fahrenheit"),void 0===e.minAutoDelta&&(e.minAutoDelta=3),void 0===e.id){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.type){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.hvacMode){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"hvacMode"},message:"must have required property 'hvacMode'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.fanMode){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"fanMode"},message:"must have required property 'fanMode'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.hvacState){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"hvacState"},message:"must have required property 'hvacState'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.fanState){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"fanState"},message:"must have required property 'fanState'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.setpoints){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"setpoints"},message:"must have required property 'setpoints'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.temperatureScale){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"temperatureScale"},message:"must have required property 'temperatureScale'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.supportedHvacModes){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"supportedHvacModes"},message:"must have required property 'supportedHvacModes'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.supportedFanModes){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"supportedFanModes"},message:"must have required property 'supportedFanModes'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.driver){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"driver"},message:"must have required property 'driver'"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.id){let s=e.id;if("string"!=typeof s){const e={instancePath:t+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}const i=n,a=n;if("global"!==s&&"system"!==s){const e={};null===r?r=[e]:r.push(e),n++}if(a===n){const e={instancePath:t+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===r?r=[e]:r.push(e),n++}else n=i,null!==r&&(i?r.length=i:r=null)}if(void 0!==e.name&&"string"!=typeof e.name){const e={instancePath:t+"/name",schemaPath:"definitions.json#/definitions/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}let s=e.type;if("string"!=typeof s){const e={instancePath:t+"/type",schemaPath:"definitions.json#/definitions/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("alarm"!==s&&"dimmer"!==s&&"switch"!==s&&"motionSensor"!==s&&"windowCovering"!==s&&"camera"!==s&&"mediaSource"!==s&&"thermostat"!==s&&"lock"!==s&&"courtesy"!==s&&"gateway"!==s&&"tv"!==s&&"dvr"!==s&&"appleTv"!==s&&"discPlayer"!==s&&"mediaPlayer"!==s&&"uncontrolledDevice"!==s){const e={instancePath:t+"/type",schemaPath:"definitions.json#/definitions/type/enum",keyword:"enum",params:{allowedValues:C.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.driver){let s=e.driver;if("string"!=typeof s){const e={instancePath:t+"/driver",schemaPath:"definitions.json#/definitions/driver/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("adlink"!==s&&"aws-kinesis"!==s&&"butler"!==s&&"crestron"!==s&&"dell"!==s&&"dmp"!==s&&"doorbird"!==s&&"dormakaba"!==s&&"dsc"!==s&&"ecobee"!==s&&"epson"!==s&&"geovision-rs"!==s&&"geovision-as-manager"!==s&&"honeywell-vista"!==s&&"igor"!==s&&"inncom"!==s&&"isapi"!==s&&"kohost-k7"!==s&&"kohost"!==s&&"lg"!==s&&"lg-webos"!==s&&"lapi"!==s&&"lirc"!==s&&"mews"!==s&&"mht"!==s&&"paxton"!==s&&"pelican-wireless"!==s&&"power-shades"!==s&&"rachio"!==s&&"rebrandly"!==s&&"rtsp"!==s&&"salto"!==s&&"salto-irn"!==s&&"samsung"!==s&&"se"!==s&&"sendgrid"!==s&&"sonifi"!==s&&"stay-n-touch"!==s&&"storable"!==s&&"twilio"!==s&&"unifi"!==s&&"valcom"!==s&&"vizio"!==s&&"wisenet"!==s&&"cloudflare-images"!==s&&"cloudflare-stream"!==s&&"insperia-privacy"!==s){const e={instancePath:t+"/driver",schemaPath:"definitions.json#/definitions/driver/enum",keyword:"enum",params:{allowedValues:f.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.offline&&"boolean"!=typeof e.offline){const e={instancePath:t+"/offline",schemaPath:"#/properties/offline/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.supportedNotifications){let s=e.supportedNotifications;if(Array.isArray(s)){const e=s.length;for(let i=0;i<e;i++){let e=s[i];if("button 1"!==e&&"button 2"!==e&&"button 3"!==e&&"button 4"!==e&&"button 5"!==e&&"idle"!==e&&"powerHasBeedApplied"!==e&&"acMainsDisconnected"!==e&&"acMainsReconnected"!==e&&"replaceBatterySoon"!==e&&"replaceBatteryNow"!==e&&"batteryOk"!==e&&"hardwareFailure"!==e&&"softwareFailure"!==e&&"hardwareFailureWithCode"!==e&&"softwareFailureWithCode"!==e&&"motionDetection"!==e&&"airFilterNeedsCleaned"!==e&&"airFilterNeedsReplaced"!==e&&"smokeDetected"!==e&&"outsideSafeTemperatureRange"!==e&&"outsideSafeHumidityRange"!==e&&"scheduleMaintenance"!==e&&"doorAjar"!==e&&"communicationFailure"!==e&&"communicationOk"!==e&&"burglarAlarm"!==e&&"fireAlarm"!==e){const e={instancePath:t+"/supportedNotifications/"+i,schemaPath:"definitions.json#/definitions/supportedNotifications/items/enum",keyword:"enum",params:{allowedValues:h.items.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}let i,a=s.length;if(a>1)e:for(;a--;)for(i=a;i--;)if(g(s[a],s[i])){const e={instancePath:t+"/supportedNotifications",schemaPath:"definitions.json#/definitions/supportedNotifications/uniqueItems",keyword:"uniqueItems",params:{i:a,j:i},message:"must NOT have duplicate items (items ## "+i+" and "+a+" are identical)"};null===r?r=[e]:r.push(e),n++;break e}}else{const e={instancePath:t+"/supportedNotifications",schemaPath:"definitions.json#/definitions/supportedNotifications/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.notification&&(validate73(e.notification,{instancePath:t+"/notification",parentData:e,parentDataProperty:"notification",rootData:a})||(r=null===r?validate73.errors:r.concat(validate73.errors),n=r.length)),void 0!==e.currentTemperature&&"number"!=typeof e.currentTemperature){const e={instancePath:t+"/currentTemperature",schemaPath:"#/properties/currentTemperature/type",keyword:"type",params:{type:"number"},message:"must be number"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.currentHumidity){let s=e.currentHumidity;if("number"==typeof s){if(s<0||isNaN(s)){const e={instancePath:t+"/currentHumidity",schemaPath:"#/properties/currentHumidity/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/currentHumidity",schemaPath:"#/properties/currentHumidity/type",keyword:"type",params:{type:"number"},message:"must be number"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.hvacMode){let s=e.hvacMode;if("string"!=typeof s){const e={instancePath:t+"/hvacMode",schemaPath:"#/properties/hvacMode/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("cool"!==s&&"heat"!==s&&"auto"!==s&&"off"!==s){const e={instancePath:t+"/hvacMode",schemaPath:"#/properties/supportedHvacModes/items/enum",keyword:"enum",params:{allowedValues:Ve.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.hvacState){let s=e.hvacState;if("string"!=typeof s&&null!==s){const e={instancePath:t+"/hvacState",schemaPath:"#/properties/hvacState/type",keyword:"type",params:{type:Re.properties.hvacState.type},message:"must be string,null"};null===r?r=[e]:r.push(e),n++}if("cooling"!==s&&"heating"!==s&&"off"!==s&&null!==s){const e={instancePath:t+"/hvacState",schemaPath:"#/properties/hvacState/enum",keyword:"enum",params:{allowedValues:Re.properties.hvacState.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.fanMode){let s=e.fanMode;if("string"!=typeof s){const e={instancePath:t+"/fanMode",schemaPath:"#/properties/fanMode/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("auto"!==s&&"low"!==s&&"medium"!==s&&"high"!==s&&"off"!==s&&"on"!==s){const e={instancePath:t+"/fanMode",schemaPath:"#/properties/supportedFanModes/items/enum",keyword:"enum",params:{allowedValues:Be.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.fanState){let s=e.fanState;if("string"!=typeof s&&null!==s){const e={instancePath:t+"/fanState",schemaPath:"#/properties/fanState/type",keyword:"type",params:{type:Re.properties.fanState.type},message:"must be string,null"};null===r?r=[e]:r.push(e),n++}if("off"!==s&&"low"!==s&&"medium"!==s&&"high"!==s&&"on"!==s&&null!==s){const e={instancePath:t+"/fanState",schemaPath:"#/properties/fanState/enum",keyword:"enum",params:{allowedValues:Re.properties.fanState.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}let i=e.temperatureScale;if("string"!=typeof i){const e={instancePath:t+"/temperatureScale",schemaPath:"#/properties/temperatureScale/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("celsius"!==i&&"fahrenheit"!==i){const e={instancePath:t+"/temperatureScale",schemaPath:"#/properties/temperatureScale/enum",keyword:"enum",params:{allowedValues:Re.properties.temperatureScale.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.humidityScale){let s=e.humidityScale;if("string"!=typeof s&&null!==s){const e={instancePath:t+"/humidityScale",schemaPath:"#/properties/humidityScale/type",keyword:"type",params:{type:Re.properties.humidityScale.type},message:"must be string,null"};null===r?r=[e]:r.push(e),n++}if("absolute"!==s&&"relative"!==s&&null!==s){const e={instancePath:t+"/humidityScale",schemaPath:"#/properties/humidityScale/enum",keyword:"enum",params:{allowedValues:Re.properties.humidityScale.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.supportedHvacModes){let s=e.supportedHvacModes;if(Array.isArray(s)){if(s.length<2){const e={instancePath:t+"/supportedHvacModes",schemaPath:"#/properties/supportedHvacModes/minItems",keyword:"minItems",params:{limit:2},message:"must NOT have fewer than 2 items"};null===r?r=[e]:r.push(e),n++}const e=s.length;for(let i=0;i<e;i++){let e=s[i];if("cool"!==e&&"heat"!==e&&"auto"!==e&&"off"!==e){const e={instancePath:t+"/supportedHvacModes/"+i,schemaPath:"#/properties/supportedHvacModes/items/enum",keyword:"enum",params:{allowedValues:Re.properties.supportedHvacModes.items.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}let i,a=s.length;if(a>1)e:for(;a--;)for(i=a;i--;)if(g(s[a],s[i])){const e={instancePath:t+"/supportedHvacModes",schemaPath:"#/properties/supportedHvacModes/uniqueItems",keyword:"uniqueItems",params:{i:a,j:i},message:"must NOT have duplicate items (items ## "+i+" and "+a+" are identical)"};null===r?r=[e]:r.push(e),n++;break e}}else{const e={instancePath:t+"/supportedHvacModes",schemaPath:"#/properties/supportedHvacModes/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.supportedFanModes){let s=e.supportedFanModes;if(Array.isArray(s)){const e=s.length;for(let i=0;i<e;i++){let e=s[i];if("auto"!==e&&"low"!==e&&"medium"!==e&&"high"!==e&&"off"!==e&&"on"!==e){const e={instancePath:t+"/supportedFanModes/"+i,schemaPath:"#/properties/supportedFanModes/items/enum",keyword:"enum",params:{allowedValues:Re.properties.supportedFanModes.items.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}let i,a=s.length;if(a>1)e:for(;a--;)for(i=a;i--;)if(g(s[a],s[i])){const e={instancePath:t+"/supportedFanModes",schemaPath:"#/properties/supportedFanModes/uniqueItems",keyword:"uniqueItems",params:{i:a,j:i},message:"must NOT have duplicate items (items ## "+i+" and "+a+" are identical)"};null===r?r=[e]:r.push(e),n++;break e}}else{const e={instancePath:t+"/supportedFanModes",schemaPath:"#/properties/supportedFanModes/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.setpoints){let s=e.setpoints;if(s&&"object"==typeof s&&!Array.isArray(s)){for(const e in s)if("cool"!==e&&"heat"!==e&&"auto"!==e){const s={instancePath:t+"/setpoints",schemaPath:"#/properties/setpoints/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:e},message:"must NOT have additional properties"};null===r?r=[s]:r.push(s),n++}void 0!==s.cool&&(validate75(s.cool,{instancePath:t+"/setpoints/cool",parentData:s,parentDataProperty:"cool",rootData:a})||(r=null===r?validate75.errors:r.concat(validate75.errors),n=r.length)),void 0!==s.heat&&(validate75(s.heat,{instancePath:t+"/setpoints/heat",parentData:s,parentDataProperty:"heat",rootData:a})||(r=null===r?validate75.errors:r.concat(validate75.errors),n=r.length)),void 0!==s.auto&&(validate75(s.auto,{instancePath:t+"/setpoints/auto",parentData:s,parentDataProperty:"auto",rootData:a})||(r=null===r?validate75.errors:r.concat(validate75.errors),n=r.length))}else{const e={instancePath:t+"/setpoints",schemaPath:"#/properties/setpoints/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}}if("number"!=typeof e.minAutoDelta){const e={instancePath:t+"/minAutoDelta",schemaPath:"#/properties/minAutoDelta/type",keyword:"type",params:{type:"number"},message:"must be number"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.cycleRate&&"number"!=typeof e.cycleRate){const e={instancePath:t+"/cycleRate",schemaPath:"#/properties/cycleRate/type",keyword:"type",params:{type:"number"},message:"must be number"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.batteryLevel){let s=e.batteryLevel;if("number"==typeof s){if(s>100||isNaN(s)){const e={instancePath:t+"/batteryLevel",schemaPath:"definitions.json#/definitions/batteryLevel/maximum",keyword:"maximum",params:{comparison:"<=",limit:100},message:"must be <= 100"};null===r?r=[e]:r.push(e),n++}if(s<0||isNaN(s)){const e={instancePath:t+"/batteryLevel",schemaPath:"definitions.json#/definitions/batteryLevel/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/batteryLevel",schemaPath:"definitions.json#/definitions/batteryLevel/type",keyword:"type",params:{type:"number"},message:"must be number"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.systemId&&"string"!=typeof e.systemId){const e={instancePath:t+"/systemId",schemaPath:"definitions.json#/definitions/systemId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.watts){let s=e.watts;if("number"==typeof s){if(s<0||isNaN(s)){const e={instancePath:t+"/watts",schemaPath:"definitions.json#/definitions/watts/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/watts",schemaPath:"definitions.json#/definitions/watts/type",keyword:"type",params:{type:"number"},message:"must be number"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.icon&&"string"!=typeof e.icon){const e={instancePath:t+"/icon",schemaPath:"#/properties/icon/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.modelNumber&&"string"!=typeof e.modelNumber){const e={instancePath:t+"/modelNumber",schemaPath:"#/properties/modelNumber/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.serialNumber&&"string"!=typeof e.serialNumber){const e={instancePath:t+"/serialNumber",schemaPath:"#/properties/serialNumber/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.firmwareVersion&&"string"!=typeof e.firmwareVersion){const e={instancePath:t+"/firmwareVersion",schemaPath:"#/properties/firmwareVersion/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}return validate72.errors=r,0===n}var Ee={$schema:"http://json-schema.org/draft-07/schema",$id:"windowCovering.json",title:"Window Covering",description:"Any smart window covering",type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},name:{type:"string"},type:{$ref:"definitions.json#/definitions/type",default:"windowCovering"},discriminator:{type:"string",enum:["basic","variable"],default:"variable"},supportedNotifications:{$ref:"definitions.json#/definitions/supportedNotifications"},notification:{$ref:"definitions.json#/definitions/notification"},driver:{$ref:"definitions.json#/definitions/driver"},offline:{type:"boolean"},position:{type:["number","null"],minimum:0,maximum:100},systemId:{$ref:"definitions.json#/definitions/systemId"},watts:{$ref:"definitions.json#/definitions/watts"},icon:{type:"string"},modelNumber:{type:"string"},serialNumber:{type:"string"},firmwareVersion:{type:"string"}},required:["id","type","position","driver"]};function validate82(e,{instancePath:t="",parentData:s,parentDataProperty:i,rootData:a=e}={}){let r=null,n=0;if((!e||"object"!=typeof e||Array.isArray(e))&&null!==e){const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:b.type},message:"must be object,null"};null===r?r=[e]:r.push(e),n++}if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0!==e.name){let s=e.name;if("string"!=typeof s){const e={instancePath:t+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("button 1"!==s&&"button 2"!==s&&"button 3"!==s&&"button 4"!==s&&"button 5"!==s&&"idle"!==s&&"powerHasBeedApplied"!==s&&"acMainsDisconnected"!==s&&"acMainsReconnected"!==s&&"replaceBatterySoon"!==s&&"replaceBatteryNow"!==s&&"batteryOk"!==s&&"hardwareFailure"!==s&&"softwareFailure"!==s&&"hardwareFailureWithCode"!==s&&"softwareFailureWithCode"!==s&&"motionDetection"!==s&&"airFilterNeedsCleaned"!==s&&"airFilterNeedsReplaced"!==s&&"smokeDetected"!==s&&"outsideSafeTemperatureRange"!==s&&"outsideSafeHumidityRange"!==s&&"scheduleMaintenance"!==s&&"doorAjar"!==s&&"communicationFailure"!==s&&"communicationOk"!==s&&"burglarAlarm"!==s&&"fireAlarm"!==s){const e={instancePath:t+"/name",schemaPath:"#/definitions/supportedNotifications/items/enum",keyword:"enum",params:{allowedValues:v.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.timestamp){let s=e.timestamp;if("number"==typeof s){if(s<1655907956593||isNaN(s)){const e={instancePath:t+"/timestamp",schemaPath:"#/properties/timestamp/minimum",keyword:"minimum",params:{comparison:">=",limit:1655907956593},message:"must be >= 1655907956593"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/timestamp",schemaPath:"#/properties/timestamp/type",keyword:"type",params:{type:"number"},message:"must be number"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.description&&"string"!=typeof e.description){const e={instancePath:t+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}return validate82.errors=r,0===n}function validate81(e,{instancePath:t="",parentData:s,parentDataProperty:i,rootData:a=e}={}){let r=null,n=0;if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.type&&(e.type="windowCovering"),void 0===e.discriminator&&(e.discriminator="variable"),void 0===e.id){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.type){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.position){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"position"},message:"must have required property 'position'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.driver){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"driver"},message:"must have required property 'driver'"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.id){let s=e.id;if("string"!=typeof s){const e={instancePath:t+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}const i=n,a=n;if("global"!==s&&"system"!==s){const e={};null===r?r=[e]:r.push(e),n++}if(a===n){const e={instancePath:t+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===r?r=[e]:r.push(e),n++}else n=i,null!==r&&(i?r.length=i:r=null)}if(void 0!==e.name&&"string"!=typeof e.name){const e={instancePath:t+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}let s=e.type;if("string"!=typeof s){const e={instancePath:t+"/type",schemaPath:"definitions.json#/definitions/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("alarm"!==s&&"dimmer"!==s&&"switch"!==s&&"motionSensor"!==s&&"windowCovering"!==s&&"camera"!==s&&"mediaSource"!==s&&"thermostat"!==s&&"lock"!==s&&"courtesy"!==s&&"gateway"!==s&&"tv"!==s&&"dvr"!==s&&"appleTv"!==s&&"discPlayer"!==s&&"mediaPlayer"!==s&&"uncontrolledDevice"!==s){const e={instancePath:t+"/type",schemaPath:"definitions.json#/definitions/type/enum",keyword:"enum",params:{allowedValues:C.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}let i=e.discriminator;if("string"!=typeof i){const e={instancePath:t+"/discriminator",schemaPath:"#/properties/discriminator/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("basic"!==i&&"variable"!==i){const e={instancePath:t+"/discriminator",schemaPath:"#/properties/discriminator/enum",keyword:"enum",params:{allowedValues:Ee.properties.discriminator.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.supportedNotifications){let s=e.supportedNotifications;if(Array.isArray(s)){const e=s.length;for(let i=0;i<e;i++){let e=s[i];if("button 1"!==e&&"button 2"!==e&&"button 3"!==e&&"button 4"!==e&&"button 5"!==e&&"idle"!==e&&"powerHasBeedApplied"!==e&&"acMainsDisconnected"!==e&&"acMainsReconnected"!==e&&"replaceBatterySoon"!==e&&"replaceBatteryNow"!==e&&"batteryOk"!==e&&"hardwareFailure"!==e&&"softwareFailure"!==e&&"hardwareFailureWithCode"!==e&&"softwareFailureWithCode"!==e&&"motionDetection"!==e&&"airFilterNeedsCleaned"!==e&&"airFilterNeedsReplaced"!==e&&"smokeDetected"!==e&&"outsideSafeTemperatureRange"!==e&&"outsideSafeHumidityRange"!==e&&"scheduleMaintenance"!==e&&"doorAjar"!==e&&"communicationFailure"!==e&&"communicationOk"!==e&&"burglarAlarm"!==e&&"fireAlarm"!==e){const e={instancePath:t+"/supportedNotifications/"+i,schemaPath:"definitions.json#/definitions/supportedNotifications/items/enum",keyword:"enum",params:{allowedValues:h.items.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}let i,a=s.length;if(a>1)e:for(;a--;)for(i=a;i--;)if(g(s[a],s[i])){const e={instancePath:t+"/supportedNotifications",schemaPath:"definitions.json#/definitions/supportedNotifications/uniqueItems",keyword:"uniqueItems",params:{i:a,j:i},message:"must NOT have duplicate items (items ## "+i+" and "+a+" are identical)"};null===r?r=[e]:r.push(e),n++;break e}}else{const e={instancePath:t+"/supportedNotifications",schemaPath:"definitions.json#/definitions/supportedNotifications/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.notification&&(validate82(e.notification,{instancePath:t+"/notification",parentData:e,parentDataProperty:"notification",rootData:a})||(r=null===r?validate82.errors:r.concat(validate82.errors),n=r.length)),void 0!==e.driver){let s=e.driver;if("string"!=typeof s){const e={instancePath:t+"/driver",schemaPath:"definitions.json#/definitions/driver/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("adlink"!==s&&"aws-kinesis"!==s&&"butler"!==s&&"crestron"!==s&&"dell"!==s&&"dmp"!==s&&"doorbird"!==s&&"dormakaba"!==s&&"dsc"!==s&&"ecobee"!==s&&"epson"!==s&&"geovision-rs"!==s&&"geovision-as-manager"!==s&&"honeywell-vista"!==s&&"igor"!==s&&"inncom"!==s&&"isapi"!==s&&"kohost-k7"!==s&&"kohost"!==s&&"lg"!==s&&"lg-webos"!==s&&"lapi"!==s&&"lirc"!==s&&"mews"!==s&&"mht"!==s&&"paxton"!==s&&"pelican-wireless"!==s&&"power-shades"!==s&&"rachio"!==s&&"rebrandly"!==s&&"rtsp"!==s&&"salto"!==s&&"salto-irn"!==s&&"samsung"!==s&&"se"!==s&&"sendgrid"!==s&&"sonifi"!==s&&"stay-n-touch"!==s&&"storable"!==s&&"twilio"!==s&&"unifi"!==s&&"valcom"!==s&&"vizio"!==s&&"wisenet"!==s&&"cloudflare-images"!==s&&"cloudflare-stream"!==s&&"insperia-privacy"!==s){const e={instancePath:t+"/driver",schemaPath:"definitions.json#/definitions/driver/enum",keyword:"enum",params:{allowedValues:f.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.offline&&"boolean"!=typeof e.offline){const e={instancePath:t+"/offline",schemaPath:"#/properties/offline/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.position){let s=e.position;if("number"!=typeof s&&null!==s){const e={instancePath:t+"/position",schemaPath:"#/properties/position/type",keyword:"type",params:{type:Ee.properties.position.type},message:"must be number,null"};null===r?r=[e]:r.push(e),n++}if("number"==typeof s){if(s>100||isNaN(s)){const e={instancePath:t+"/position",schemaPath:"#/properties/position/maximum",keyword:"maximum",params:{comparison:"<=",limit:100},message:"must be <= 100"};null===r?r=[e]:r.push(e),n++}if(s<0||isNaN(s)){const e={instancePath:t+"/position",schemaPath:"#/properties/position/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===r?r=[e]:r.push(e),n++}}}if(void 0!==e.systemId&&"string"!=typeof e.systemId){const e={instancePath:t+"/systemId",schemaPath:"definitions.json#/definitions/systemId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.watts){let s=e.watts;if("number"==typeof s){if(s<0||isNaN(s)){const e={instancePath:t+"/watts",schemaPath:"definitions.json#/definitions/watts/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/watts",schemaPath:"definitions.json#/definitions/watts/type",keyword:"type",params:{type:"number"},message:"must be number"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.icon&&"string"!=typeof e.icon){const e={instancePath:t+"/icon",schemaPath:"#/properties/icon/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.modelNumber&&"string"!=typeof e.modelNumber){const e={instancePath:t+"/modelNumber",schemaPath:"#/properties/modelNumber/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.serialNumber&&"string"!=typeof e.serialNumber){const e={instancePath:t+"/serialNumber",schemaPath:"#/properties/serialNumber/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.firmwareVersion&&"string"!=typeof e.firmwareVersion){const e={instancePath:t+"/firmwareVersion",schemaPath:"#/properties/firmwareVersion/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}return validate81.errors=r,0===n}var Ue=function validate90(e,{instancePath:t="",parentData:s,parentDataProperty:i,rootData:a=e}={}){let r=null,n=0;if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.type&&(e.type="scene"),void 0===e.isDefault&&(e.isDefault=!1),void 0===e.showOnUi&&(e.showOnUi=!0),void 0===e.id){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.name){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.type){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===r?r=[e]:r.push(e),n++}for(const s in e)if("id"!==s&&"name"!==s&&"description"!==s&&"type"!==s&&"devices"!==s&&"isDefault"!==s&&"showOnUi"!==s){const e={instancePath:t,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:s},message:"must NOT have additional properties"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.id){let s=e.id;if("string"!=typeof s){const e={instancePath:t+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}const i=n,a=n;if("global"!==s&&"system"!==s){const e={};null===r?r=[e]:r.push(e),n++}if(a===n){const e={instancePath:t+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===r?r=[e]:r.push(e),n++}else n=i,null!==r&&(i?r.length=i:r=null)}if(void 0!==e.name&&"string"!=typeof e.name){const e={instancePath:t+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.description&&"string"!=typeof e.description){const e={instancePath:t+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}let s=e.type;if("string"!=typeof s){const e={instancePath:t+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("scene"!==s){const e={instancePath:t+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:Ke.properties.type.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.devices){let s=e.devices;if(s&&"object"==typeof s&&!Array.isArray(s)){void 0===s.dimmers&&(s.dimmers=[]),void 0===s.windowCoverings&&(s.windowCoverings=[]),void 0===s.thermostats&&(s.thermostats=[]);for(const e in s)if("switches"!==e&&"dimmers"!==e&&"windowCoverings"!==e&&"thermostats"!==e&&"mediaSources"!==e&&"locks"!==e){const s={instancePath:t+"/devices",schemaPath:"#/properties/devices/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:e},message:"must NOT have additional properties"};null===r?r=[s]:r.push(s),n++}if(void 0!==s.switches){let e=s.switches;if(Array.isArray(e)){const s=e.length;for(let i=0;i<s;i++){let s=e[i];if(s&&"object"==typeof s&&!Array.isArray(s)){if(void 0!==s.id){let e=s.id;if("string"!=typeof e){const e={instancePath:t+"/devices/switches/"+i+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}const a=n,o=n;if("global"!==e&&"system"!==e){const e={};null===r?r=[e]:r.push(e),n++}if(o===n){const e={instancePath:t+"/devices/switches/"+i+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===r?r=[e]:r.push(e),n++}else n=a,null!==r&&(a?r.length=a:r=null)}if(void 0!==s.state){let e=s.state;if("string"!=typeof e){const e={instancePath:t+"/devices/switches/"+i+"/state",schemaPath:"switch.json#/properties/state/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("on"!==e&&"off"!==e){const e={instancePath:t+"/devices/switches/"+i+"/state",schemaPath:"switch.json#/properties/state/enum",keyword:"enum",params:{allowedValues:He.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t+"/devices/switches/"+i,schemaPath:"#/properties/devices/properties/switches/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t+"/devices/switches",schemaPath:"#/properties/devices/properties/switches/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}}let e=s.dimmers;if(Array.isArray(e)){const s=e.length;for(let i=0;i<s;i++){let s=e[i];if(s&&"object"==typeof s&&!Array.isArray(s)){if(void 0!==s.id){let e=s.id;if("string"!=typeof e){const e={instancePath:t+"/devices/dimmers/"+i+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}const a=n,o=n;if("global"!==e&&"system"!==e){const e={};null===r?r=[e]:r.push(e),n++}if(o===n){const e={instancePath:t+"/devices/dimmers/"+i+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===r?r=[e]:r.push(e),n++}else n=a,null!==r&&(a?r.length=a:r=null)}if(void 0!==s.level){let e=s.level;if("number"!=typeof e&&null!==e){const e={instancePath:t+"/devices/dimmers/"+i+"/level",schemaPath:"dimmer.json#/properties/level/type",keyword:"type",params:{type:_e.type},message:"must be number,null"};null===r?r=[e]:r.push(e),n++}if("number"==typeof e){if(e>100||isNaN(e)){const e={instancePath:t+"/devices/dimmers/"+i+"/level",schemaPath:"dimmer.json#/properties/level/maximum",keyword:"maximum",params:{comparison:"<=",limit:100},message:"must be <= 100"};null===r?r=[e]:r.push(e),n++}if(e<0||isNaN(e)){const e={instancePath:t+"/devices/dimmers/"+i+"/level",schemaPath:"dimmer.json#/properties/level/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===r?r=[e]:r.push(e),n++}}}}else{const e={instancePath:t+"/devices/dimmers/"+i,schemaPath:"#/properties/devices/properties/dimmers/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t+"/devices/dimmers",schemaPath:"#/properties/devices/properties/dimmers/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}let i=s.windowCoverings;if(Array.isArray(i)){const e=i.length;for(let s=0;s<e;s++){let e=i[s];if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0!==e.id){let i=e.id;if("string"!=typeof i){const e={instancePath:t+"/devices/windowCoverings/"+s+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}const a=n,o=n;if("global"!==i&&"system"!==i){const e={};null===r?r=[e]:r.push(e),n++}if(o===n){const e={instancePath:t+"/devices/windowCoverings/"+s+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===r?r=[e]:r.push(e),n++}else n=a,null!==r&&(a?r.length=a:r=null)}if(void 0!==e.position){let i=e.position;if("number"!=typeof i&&null!==i){const e={instancePath:t+"/devices/windowCoverings/"+s+"/position",schemaPath:"windowCovering.json#/properties/position/type",keyword:"type",params:{type:We.type},message:"must be number,null"};null===r?r=[e]:r.push(e),n++}if("number"==typeof i){if(i>100||isNaN(i)){const e={instancePath:t+"/devices/windowCoverings/"+s+"/position",schemaPath:"windowCovering.json#/properties/position/maximum",keyword:"maximum",params:{comparison:"<=",limit:100},message:"must be <= 100"};null===r?r=[e]:r.push(e),n++}if(i<0||isNaN(i)){const e={instancePath:t+"/devices/windowCoverings/"+s+"/position",schemaPath:"windowCovering.json#/properties/position/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===r?r=[e]:r.push(e),n++}}}}else{const e={instancePath:t+"/devices/windowCoverings/"+s,schemaPath:"#/properties/devices/properties/windowCoverings/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t+"/devices/windowCoverings",schemaPath:"#/properties/devices/properties/windowCoverings/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}let o=s.thermostats;if(Array.isArray(o)){const e=o.length;for(let s=0;s<e;s++){let e=o[s];if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0!==e.id){let i=e.id;if("string"!=typeof i){const e={instancePath:t+"/devices/thermostats/"+s+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}const a=n,o=n;if("global"!==i&&"system"!==i){const e={};null===r?r=[e]:r.push(e),n++}if(o===n){const e={instancePath:t+"/devices/thermostats/"+s+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===r?r=[e]:r.push(e),n++}else n=a,null!==r&&(a?r.length=a:r=null)}if(void 0!==e.hvacMode&&(validate91(e.hvacMode,{instancePath:t+"/devices/thermostats/"+s+"/hvacMode",parentData:e,parentDataProperty:"hvacMode",rootData:a})||(r=null===r?validate91.errors:r.concat(validate91.errors),n=r.length)),void 0!==e.setpoints&&(validate93(e.setpoints,{instancePath:t+"/devices/thermostats/"+s+"/setpoints",parentData:e,parentDataProperty:"setpoints",rootData:a})||(r=null===r?validate93.errors:r.concat(validate93.errors),n=r.length)),void 0!==e.fanMode&&(validate98(e.fanMode,{instancePath:t+"/devices/thermostats/"+s+"/fanMode",parentData:e,parentDataProperty:"fanMode",rootData:a})||(r=null===r?validate98.errors:r.concat(validate98.errors),n=r.length)),void 0!==e.setpointDelta&&"number"!=typeof e.setpointDelta){const e={instancePath:t+"/devices/thermostats/"+s+"/setpointDelta",schemaPath:"#/properties/devices/properties/thermostats/items/properties/setpointDelta/type",keyword:"type",params:{type:"number"},message:"must be number"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/devices/thermostats/"+s,schemaPath:"#/properties/devices/properties/thermostats/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t+"/devices/thermostats",schemaPath:"#/properties/devices/properties/thermostats/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}if(void 0!==s.mediaSources){let e=s.mediaSources;if(Array.isArray(e)){const s=e.length;for(let i=0;i<s;i++){let s=e[i];if(s&&"object"==typeof s&&!Array.isArray(s)){if(void 0!==s.id){let e=s.id;if("string"!=typeof e){const e={instancePath:t+"/devices/mediaSources/"+i+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}const a=n,o=n;if("global"!==e&&"system"!==e){const e={};null===r?r=[e]:r.push(e),n++}if(o===n){const e={instancePath:t+"/devices/mediaSources/"+i+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===r?r=[e]:r.push(e),n++}else n=a,null!==r&&(a?r.length=a:r=null)}if(void 0!==s.volume){let e=s.volume;if("number"==typeof e){if(e>100||isNaN(e)){const e={instancePath:t+"/devices/mediaSources/"+i+"/volume",schemaPath:"#/properties/devices/properties/mediaSources/items/properties/volume/maximum",keyword:"maximum",params:{comparison:"<=",limit:100},message:"must be <= 100"};null===r?r=[e]:r.push(e),n++}if(e<0||isNaN(e)){const e={instancePath:t+"/devices/mediaSources/"+i+"/volume",schemaPath:"#/properties/devices/properties/mediaSources/items/properties/volume/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/devices/mediaSources/"+i+"/volume",schemaPath:"#/properties/devices/properties/mediaSources/items/properties/volume/type",keyword:"type",params:{type:"number"},message:"must be number"};null===r?r=[e]:r.push(e),n++}}if(void 0!==s.commands){let e=s.commands;if(Array.isArray(e)){const s=e.length;for(let a=0;a<s;a++)if("string"!=typeof e[a]){const e={instancePath:t+"/devices/mediaSources/"+i+"/commands/"+a,schemaPath:"#/properties/devices/properties/mediaSources/items/properties/commands/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/devices/mediaSources/"+i+"/commands",schemaPath:"#/properties/devices/properties/mediaSources/items/properties/commands/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t+"/devices/mediaSources/"+i,schemaPath:"#/properties/devices/properties/mediaSources/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t+"/devices/mediaSources",schemaPath:"#/properties/devices/properties/mediaSources/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}}if(void 0!==s.locks){let e=s.locks;if(Array.isArray(e)){const s=e.length;for(let i=0;i<s;i++){let s=e[i];if(s&&"object"==typeof s&&!Array.isArray(s)){if(void 0!==s.id){let e=s.id;if("string"!=typeof e){const e={instancePath:t+"/devices/locks/"+i+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}const a=n,o=n;if("global"!==e&&"system"!==e){const e={};null===r?r=[e]:r.push(e),n++}if(o===n){const e={instancePath:t+"/devices/locks/"+i+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===r?r=[e]:r.push(e),n++}else n=a,null!==r&&(a?r.length=a:r=null)}if(void 0!==s.state){let e=s.state;if("string"!=typeof e&&null!==e){const e={instancePath:t+"/devices/locks/"+i+"/state",schemaPath:"lock.json#/properties/state/type",keyword:"type",params:{type:Ze.type},message:"must be string,null"};null===r?r=[e]:r.push(e),n++}if("locked"!==e&&"unlocked"!==e&&null!==e){const e={instancePath:t+"/devices/locks/"+i+"/state",schemaPath:"lock.json#/properties/state/enum",keyword:"enum",params:{allowedValues:Ze.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}if(void 0!==s.mode){let e=s.mode;if("string"!=typeof e&&null!==e){const e={instancePath:t+"/devices/locks/"+i+"/mode",schemaPath:"lock.json#/properties/mode/type",keyword:"type",params:{type:Ge.type},message:"must be string,null"};null===r?r=[e]:r.push(e),n++}if("normal"!==e&&"autoLock"!==e&&"emergencyOpen"!==e&&"emergencyClose"!==e&&"holdOpen"!==e&&"lockdown"!==e&&null!==e){const e={instancePath:t+"/devices/locks/"+i+"/mode",schemaPath:"lock.json#/properties/mode/enum",keyword:"enum",params:{allowedValues:Ge.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t+"/devices/locks/"+i,schemaPath:"#/properties/devices/properties/locks/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t+"/devices/locks",schemaPath:"#/properties/devices/properties/locks/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t+"/devices",schemaPath:"#/properties/devices/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}}if("boolean"!=typeof e.isDefault){const e={instancePath:t+"/isDefault",schemaPath:"#/properties/isDefault/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===r?r=[e]:r.push(e),n++}if("boolean"!=typeof e.showOnUi){const e={instancePath:t+"/showOnUi",schemaPath:"#/properties/showOnUi/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}return validate90.errors=r,0===n},Ke={$schema:"http://json-schema.org/draft-07/schema",$id:"scene.json",title:"Scene",description:"A room represents a physical space of controllable IoT devices",type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},name:{type:"string"},description:{type:"string"},type:{type:"string",enum:["scene"],default:"scene"},devices:{type:"object",properties:{switches:{type:"array",items:{type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},state:{$ref:"switch.json#/properties/state"}},default:[]}},dimmers:{type:"array",items:{type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},level:{$ref:"dimmer.json#/properties/level"}}},default:[]},windowCoverings:{type:"array",items:{type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},position:{$ref:"windowCovering.json#/properties/position"}}},default:[]},thermostats:{type:"array",items:{type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},hvacMode:{$ref:"thermostat.json#/properties/hvacMode"},setpoints:{$ref:"thermostat.json#/properties/setpoints"},fanMode:{$ref:"thermostat.json#/properties/fanMode"},setpointDelta:{type:"number"}}},default:[]},mediaSources:{type:"array",items:{type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},volume:{type:"number",minimum:0,maximum:100},commands:{type:"array",items:{type:"string"}}}}},locks:{type:"array",items:{type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},state:{$ref:"lock.json#/properties/state"},mode:{$ref:"lock.json#/properties/mode"}}}}},additionalProperties:!1},isDefault:{type:"boolean",default:!1},showOnUi:{type:"boolean",default:!0}},required:["id","name","type"],additionalProperties:!1},He={type:"string",enum:["on","off"]},_e={type:["number","null"],minimum:0,maximum:100},We={type:["number","null"],minimum:0,maximum:100},Ze={type:["string","null"],enum:["locked","unlocked",null]},Ge={type:["string","null"],enum:["normal","autoLock","emergencyOpen","emergencyClose","holdOpen","lockdown",null],description:"emergencyOpen and emergencyClose are deprecated and can be removed once Salto, Paxton and Geovision drivers are updated",default:null};function validate91(e,{instancePath:t="",parentData:s,parentDataProperty:i,rootData:a=e}={}){let r=null,n=0;if("string"!=typeof e){const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("cool"!==e&&"heat"!==e&&"auto"!==e&&"off"!==e){const e={instancePath:t,schemaPath:"#/properties/supportedHvacModes/items/enum",keyword:"enum",params:{allowedValues:Ve.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}return validate91.errors=r,0===n}function validate93(e,{instancePath:t="",parentData:s,parentDataProperty:i,rootData:a=e}={}){let r=null,n=0;if(e&&"object"==typeof e&&!Array.isArray(e)){for(const s in e)if("cool"!==s&&"heat"!==s&&"auto"!==s){const e={instancePath:t,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:s},message:"must NOT have additional properties"};null===r?r=[e]:r.push(e),n++}void 0!==e.cool&&(validate75(e.cool,{instancePath:t+"/cool",parentData:e,parentDataProperty:"cool",rootData:a})||(r=null===r?validate75.errors:r.concat(validate75.errors),n=r.length)),void 0!==e.heat&&(validate75(e.heat,{instancePath:t+"/heat",parentData:e,parentDataProperty:"heat",rootData:a})||(r=null===r?validate75.errors:r.concat(validate75.errors),n=r.length)),void 0!==e.auto&&(validate75(e.auto,{instancePath:t+"/auto",parentData:e,parentDataProperty:"auto",rootData:a})||(r=null===r?validate75.errors:r.concat(validate75.errors),n=r.length))}else{const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}return validate93.errors=r,0===n}function validate98(e,{instancePath:t="",parentData:s,parentDataProperty:i,rootData:a=e}={}){let r=null,n=0;if("string"!=typeof e){const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("auto"!==e&&"low"!==e&&"medium"!==e&&"high"!==e&&"off"!==e&&"on"!==e){const e={instancePath:t,schemaPath:"#/properties/supportedFanModes/items/enum",keyword:"enum",params:{allowedValues:Be.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}return validate98.errors=r,0===n}var Ye=function validate100(e,{instancePath:t="",parentData:s,parentDataProperty:i,rootData:a=e}={}){let r=null,n=0;if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.type&&(e.type="shortLink"),void 0===e.destination){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"destination"},message:"must have required property 'destination'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.url){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"url"},message:"must have required property 'url'"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.id){let s=e.id;if("string"!=typeof s){const e={instancePath:t+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}const i=n,a=n;if("global"!==s&&"system"!==s){const e={};null===r?r=[e]:r.push(e),n++}if(a===n){const e={instancePath:t+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===r?r=[e]:r.push(e),n++}else n=i,null!==r&&(i?r.length=i:r=null)}let s=e.type;if("string"!=typeof s){const e={instancePath:t+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("shortLink"!==s){const e={instancePath:t+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:Xe.properties.type.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.title&&"string"!=typeof e.title){const e={instancePath:t+"/title",schemaPath:"#/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.destination){let s=e.destination;if("string"==typeof s&&!N(s)){const e={instancePath:t+"/destination",schemaPath:"#/properties/destination/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.url){let s=e.url;if("string"==typeof s&&!N(s)){const e={instancePath:t+"/url",schemaPath:"#/properties/url/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.systemId&&"string"!=typeof e.systemId){const e={instancePath:t+"/systemId",schemaPath:"definitions.json#/definitions/systemId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}return validate100.errors=r,0===n},Xe={$schema:"http://json-schema.org/draft-07/schema",$id:"shortLink.json",title:"Short Link",type:"object",required:["destination","url"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",default:"shortLink",enum:["shortLink"]},title:{type:"string"},destination:{string:"string",format:"uri"},url:{string:"string",format:"uri"},systemId:{$ref:"definitions.json#/definitions/systemId"}}};var Qe=function validate101(e,{instancePath:t="",parentData:s,parentDataProperty:i,rootData:a=e}={}){let r=null,n=0;if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.type&&(e.type="smsMessage"),void 0===e.to){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"to"},message:"must have required property 'to'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.from){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"from"},message:"must have required property 'from'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.status){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"status"},message:"must have required property 'status'"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.id){let s=e.id;if("string"!=typeof s){const e={instancePath:t+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}const i=n,a=n;if("global"!==s&&"system"!==s){const e={};null===r?r=[e]:r.push(e),n++}if(a===n){const e={instancePath:t+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===r?r=[e]:r.push(e),n++}else n=i,null!==r&&(i?r.length=i:r=null)}let s=e.type;if("string"!=typeof s){const e={instancePath:t+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("smsMessage"!==s){const e={instancePath:t+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:Je.properties.type.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.to){let s=e.to;if("string"==typeof s){if(!et.test(s)){const e={instancePath:t+"/to",schemaPath:"#/properties/to/pattern",keyword:"pattern",params:{pattern:"^\\+[0-9]{1,14}$"},message:'must match pattern "^\\+[0-9]{1,14}$"'};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/to",schemaPath:"#/properties/to/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.from){let s=e.from;if("string"==typeof s){if(!et.test(s)){const e={instancePath:t+"/from",schemaPath:"#/properties/from/pattern",keyword:"pattern",params:{pattern:"^\\+[0-9]{1,14}$"},message:'must match pattern "^\\+[0-9]{1,14}$"'};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/from",schemaPath:"#/properties/from/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.media){let s=e.media;if("string"==typeof s){if(!N(s)){const e={instancePath:t+"/media",schemaPath:"#/properties/media/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/media",schemaPath:"#/properties/media/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.status){let s=e.status;if("string"!=typeof s){const e={instancePath:t+"/status",schemaPath:"#/properties/status/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("queued"!==s&&"accepted"!==s&&"sending"!==s&&"sent"!==s&&"failed"!==s&&"delivered"!==s&&"undelivered"!==s&&"receiving"!==s&&"received"!==s&&"read"!==s){const e={instancePath:t+"/status",schemaPath:"#/properties/status/enum",keyword:"enum",params:{allowedValues:Je.properties.status.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.body&&"string"!=typeof e.body){const e={instancePath:t+"/body",schemaPath:"#/properties/body/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.driver&&"string"!=typeof e.driver){const e={instancePath:t+"/driver",schemaPath:"#/properties/driver/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.appData){let s=e.appData;if(!s||"object"!=typeof s||Array.isArray(s)){const e={instancePath:t+"/appData",schemaPath:"#/properties/appData/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.createdAt){let s=e.createdAt;if("string"!=typeof s&&(!s||"object"!=typeof s||Array.isArray(s))){const e={instancePath:t+"/createdAt",schemaPath:"definitions.json#/definitions/date/type",keyword:"type",params:{type:j.type},message:"must be string,object"};null===r?r=[e]:r.push(e),n++}if("string"==typeof s&&!I.validate(s)){const e={instancePath:t+"/createdAt",schemaPath:"definitions.json#/definitions/date/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.updatedAt){let s=e.updatedAt;if("string"!=typeof s&&(!s||"object"!=typeof s||Array.isArray(s))){const e={instancePath:t+"/updatedAt",schemaPath:"definitions.json#/definitions/date/type",keyword:"type",params:{type:j.type},message:"must be string,object"};null===r?r=[e]:r.push(e),n++}if("string"==typeof s&&!I.validate(s)){const e={instancePath:t+"/updatedAt",schemaPath:"definitions.json#/definitions/date/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.systemId&&"string"!=typeof e.systemId){const e={instancePath:t+"/systemId",schemaPath:"definitions.json#/definitions/systemId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}return validate101.errors=r,0===n},Je={$schema:"http://json-schema.org/draft-07/schema",$id:"smsMessage.json",title:"Sms Message",type:"object",required:["to","from","status"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",default:"smsMessage",enum:["smsMessage"]},to:{type:"string",pattern:"^\\+[0-9]{1,14}$"},from:{type:"string",pattern:"^\\+[0-9]{1,14}$"},media:{type:"string",format:"uri"},status:{type:"string",enum:["queued","accepted","sending","sent","failed","delivered","undelivered","receiving","received","read"]},body:{type:"string"},driver:{type:"string"},appData:{type:"object"},createdAt:{$ref:"definitions.json#/definitions/date"},updatedAt:{$ref:"definitions.json#/definitions/date"},systemId:{$ref:"definitions.json#/definitions/systemId"}}},et=new RegExp("^\\+[0-9]{1,14}$","u");var tt=function validate102(e,{instancePath:t="",parentData:s,parentDataProperty:i,rootData:a=e}={}){let r=null,n=0;const o=n;let p=!0;const m=n;if(e&&"object"==typeof e&&!Array.isArray(e)&&void 0!==e.type&&"hotelRoom"!==e.type){const e={};null===r?r=[e]:r.push(e),n++}var d=m===n;n=o,null!==r&&(o?r.length=o:r=null);let u;if(d){const s=n;if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.features&&(e.features=[]),void 0===e.maximumOccupancy&&(e.maximumOccupancy=2),void 0===e.housekeepingStatus&&(e.housekeepingStatus="dirty"),void 0===e.serviceStatus&&(e.serviceStatus="inService"),void 0===e.name){const e={instancePath:t,schemaPath:"#/then/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.type){const e={instancePath:t,schemaPath:"#/then/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.features){const e={instancePath:t,schemaPath:"#/then/required",keyword:"required",params:{missingProperty:"features"},message:"must have required property 'features'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.maximumOccupancy){const e={instancePath:t,schemaPath:"#/then/required",keyword:"required",params:{missingProperty:"maximumOccupancy"},message:"must have required property 'maximumOccupancy'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.housekeepingStatus){const e={instancePath:t,schemaPath:"#/then/required",keyword:"required",params:{missingProperty:"housekeepingStatus"},message:"must have required property 'housekeepingStatus'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.serviceStatus){const e={instancePath:t,schemaPath:"#/then/required",keyword:"required",params:{missingProperty:"serviceStatus"},message:"must have required property 'serviceStatus'"};null===r?r=[e]:r.push(e),n++}}p=d=s===n,u="then"}else{const s=n;if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.name){const e={instancePath:t,schemaPath:"#/else/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.type){const e={instancePath:t,schemaPath:"#/else/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===r?r=[e]:r.push(e),n++}}p=d=s===n,u="else"}if(!p){const e={instancePath:t,schemaPath:"#/if",keyword:"if",params:{failingKeyword:u},message:'must match "'+u+'" schema'};null===r?r=[e]:r.push(e),n++}if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.type&&(e.type="space"),void 0===e.eco&&(e.eco={active:!1,allowed:!1,previousState:null}),void 0!==e.id){let s=e.id;if("string"!=typeof s){const e={instancePath:t+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}const i=n,a=n;if("global"!==s&&"system"!==s){const e={};null===r?r=[e]:r.push(e),n++}if(a===n){const e={instancePath:t+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===r?r=[e]:r.push(e),n++}else n=i,null!==r&&(i?r.length=i:r=null)}if(void 0!==e.name){let s=e.name;if("string"==typeof s){if(P(s)<1){const e={instancePath:t+"/name",schemaPath:"#/properties/name/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}let s=e.type;if("string"!=typeof s){const e={instancePath:t+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("space"!==s){const e={instancePath:t+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:st.properties.type.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.discriminator){let s=e.discriminator;if("string"!=typeof s){const e={instancePath:t+"/discriminator",schemaPath:"#/properties/discriminator/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("classRoom"!==s&&"hotelRoom"!==s&&"office"!==s&&"building"!==s&&"commonArea"!==s&&"conferenceRoom"!==s&&"lobby"!==s&&"gym"!==s&&"pool"!==s&&"restaurant"!==s&&"unit"!==s){const e={instancePath:t+"/discriminator",schemaPath:"#/properties/discriminator/enum",keyword:"enum",params:{allowedValues:st.properties.discriminator.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.driver){let s=e.driver;if("string"!=typeof s){const e={instancePath:t+"/driver",schemaPath:"definitions.json#/definitions/driver/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("adlink"!==s&&"aws-kinesis"!==s&&"butler"!==s&&"crestron"!==s&&"dell"!==s&&"dmp"!==s&&"doorbird"!==s&&"dormakaba"!==s&&"dsc"!==s&&"ecobee"!==s&&"epson"!==s&&"geovision-rs"!==s&&"geovision-as-manager"!==s&&"honeywell-vista"!==s&&"igor"!==s&&"inncom"!==s&&"isapi"!==s&&"kohost-k7"!==s&&"kohost"!==s&&"lg"!==s&&"lg-webos"!==s&&"lapi"!==s&&"lirc"!==s&&"mews"!==s&&"mht"!==s&&"paxton"!==s&&"pelican-wireless"!==s&&"power-shades"!==s&&"rachio"!==s&&"rebrandly"!==s&&"rtsp"!==s&&"salto"!==s&&"salto-irn"!==s&&"samsung"!==s&&"se"!==s&&"sendgrid"!==s&&"sonifi"!==s&&"stay-n-touch"!==s&&"storable"!==s&&"twilio"!==s&&"unifi"!==s&&"valcom"!==s&&"vizio"!==s&&"wisenet"!==s&&"cloudflare-images"!==s&&"cloudflare-stream"!==s&&"insperia-privacy"!==s){const e={instancePath:t+"/driver",schemaPath:"definitions.json#/definitions/driver/enum",keyword:"enum",params:{allowedValues:f.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.category&&"string"!=typeof e.category){const e={instancePath:t+"/category",schemaPath:"#/properties/category/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.rooms){let s=e.rooms;if(Array.isArray(s)){const e=s.length;for(let i=0;i<e;i++)if("string"!=typeof s[i]){const e={instancePath:t+"/rooms/"+i,schemaPath:"#/properties/rooms/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/rooms",schemaPath:"#/properties/rooms/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.subGroups){let s=e.subGroups;if(Array.isArray(s)){const e=s.length;for(let i=0;i<e;i++)if("string"!=typeof s[i]){const e={instancePath:t+"/subGroups/"+i,schemaPath:"#/properties/subGroups/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/subGroups",schemaPath:"#/properties/subGroups/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.occupied&&"boolean"!=typeof e.occupied){const e={instancePath:t+"/occupied",schemaPath:"#/properties/occupied/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.inUse&&"boolean"!=typeof e.inUse){const e={instancePath:t+"/inUse",schemaPath:"#/properties/inUse/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===r?r=[e]:r.push(e),n++}let i=e.eco;if(i&&"object"==typeof i&&!Array.isArray(i)){void 0===i.active&&(i.active=!1),void 0===i.allowed&&(i.allowed=!1);for(const e in i)if("active"!==e&&"activatedAt"!==e&&"allowed"!==e&&"previousState"!==e){const s={instancePath:t+"/eco",schemaPath:"#/properties/eco/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:e},message:"must NOT have additional properties"};null===r?r=[s]:r.push(s),n++}if("boolean"!=typeof i.active){const e={instancePath:t+"/eco/active",schemaPath:"#/properties/eco/properties/active/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===r?r=[e]:r.push(e),n++}if(void 0!==i.activatedAt){let e=i.activatedAt;if("string"!=typeof e&&(!e||"object"!=typeof e||Array.isArray(e))){const e={instancePath:t+"/eco/activatedAt",schemaPath:"#/properties/eco/properties/activatedAt/type",keyword:"type",params:{type:st.properties.eco.properties.activatedAt.type},message:"must be string,object"};null===r?r=[e]:r.push(e),n++}if("string"==typeof e&&!I.validate(e)){const e={instancePath:t+"/eco/activatedAt",schemaPath:"#/properties/eco/properties/activatedAt/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===r?r=[e]:r.push(e),n++}}if("boolean"!=typeof i.allowed){const e={instancePath:t+"/eco/allowed",schemaPath:"#/properties/eco/properties/allowed/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===r?r=[e]:r.push(e),n++}if(void 0!==i.previousState){let e=i.previousState;if((!e||"object"!=typeof e||Array.isArray(e))&&null!==e){const e={instancePath:t+"/eco/previousState",schemaPath:"#/properties/eco/properties/previousState/type",keyword:"type",params:{type:st.properties.eco.properties.previousState.type},message:"must be object,null"};null===r?r=[e]:r.push(e),n++}if(e&&"object"==typeof e&&!Array.isArray(e)){for(const s in e)if("thermostats"!==s){const e={instancePath:t+"/eco/previousState",schemaPath:"#/properties/eco/properties/previousState/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:s},message:"must NOT have additional properties"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.thermostats){let s=e.thermostats;if(s&&"object"==typeof s&&!Array.isArray(s)){for(const e in s)if(it.test(e)){let i=s[e];if(i&&"object"==typeof i&&!Array.isArray(i))void 0!==i.setpoints&&(validate103(i.setpoints,{instancePath:t+"/eco/previousState/thermostats/"+e.replace(/~/g,"~0").replace(/\//g,"~1")+"/setpoints",parentData:i,parentDataProperty:"setpoints",rootData:a})||(r=null===r?validate103.errors:r.concat(validate103.errors),n=r.length));else{const s={instancePath:t+"/eco/previousState/thermostats/"+e.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/eco/properties/previousState/properties/thermostats/patternProperties/.*/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[s]:r.push(s),n++}}}else{const e={instancePath:t+"/eco/previousState/thermostats",schemaPath:"#/properties/eco/properties/previousState/properties/thermostats/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}}}}}else{const e={instancePath:t+"/eco",schemaPath:"#/properties/eco/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.features){let s=e.features;if(Array.isArray(s)){const e=s.length;for(let i=0;i<e;i++){let e=s[i];if("string"!=typeof e){const e={instancePath:t+"/features/"+i,schemaPath:"#/properties/features/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("pet"!==e){const e={instancePath:t+"/features/"+i,schemaPath:"#/properties/features/items/enum",keyword:"enum",params:{allowedValues:st.properties.features.items.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t+"/features",schemaPath:"#/properties/features/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.maximumOccupancy){let s=e.maximumOccupancy;if("number"==typeof s){if(s<1||isNaN(s)){const e={instancePath:t+"/maximumOccupancy",schemaPath:"#/properties/maximumOccupancy/minimum",keyword:"minimum",params:{comparison:">=",limit:1},message:"must be >= 1"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/maximumOccupancy",schemaPath:"#/properties/maximumOccupancy/type",keyword:"type",params:{type:"number"},message:"must be number"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.housekeepingStatus){let s=e.housekeepingStatus;if("string"!=typeof s){const e={instancePath:t+"/housekeepingStatus",schemaPath:"#/properties/housekeepingStatus/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("clean"!==s&&"dirty"!==s&&"inspected"!==s&&"pickup"!==s){const e={instancePath:t+"/housekeepingStatus",schemaPath:"#/properties/housekeepingStatus/enum",keyword:"enum",params:{allowedValues:st.properties.housekeepingStatus.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.serviceStatus){let s=e.serviceStatus;if("string"!=typeof s){const e={instancePath:t+"/serviceStatus",schemaPath:"#/properties/serviceStatus/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("inService"!==s&&"outOfOrder"!==s&&"outOfService"!==s){const e={instancePath:t+"/serviceStatus",schemaPath:"#/properties/serviceStatus/enum",keyword:"enum",params:{allowedValues:st.properties.serviceStatus.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.systemId&&"string"!=typeof e.systemId){const e={instancePath:t+"/systemId",schemaPath:"definitions.json#/definitions/systemId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}return validate102.errors=r,0===n},st={$schema:"http://json-schema.org/draft-07/schema",$id:"space.json",title:"Space",type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},name:{type:"string",minLength:1},type:{type:"string",default:"space",enum:["space"]},discriminator:{type:"string",enum:["classRoom","hotelRoom","office","building","commonArea","conferenceRoom","lobby","gym","pool","restaurant","unit"]},driver:{$ref:"definitions.json#/definitions/driver"},category:{type:"string",description:"This is the category id"},rooms:{type:"array",items:{type:"string"}},subGroups:{type:"array",items:{type:"string"}},occupied:{type:"boolean"},inUse:{type:"boolean"},eco:{type:"object",additionalProperties:!1,default:{active:!1,allowed:!1,previousState:null},properties:{active:{type:"boolean",default:!1},activatedAt:{type:["string","object"],format:"date-time"},allowed:{type:"boolean",default:!1},previousState:{type:["object","null"],properties:{thermostats:{type:"object",patternProperties:{".*":{type:"object",properties:{setpoints:{$ref:"thermostat.json#/properties/setpoints"}}}}}},additionalProperties:!1}}},features:{type:"array",items:{type:"string",enum:["pet"]}},maximumOccupancy:{type:"number",minimum:1},housekeepingStatus:{type:"string",enum:["clean","dirty","inspected","pickup"]},serviceStatus:{type:"string",enum:["inService","outOfOrder","outOfService"]},systemId:{$ref:"definitions.json#/definitions/systemId"}},if:{properties:{type:{const:"hotelRoom"}}},then:{required:["name","type","features","maximumOccupancy","housekeepingStatus","serviceStatus"],properties:{features:{default:[]},maximumOccupancy:{default:2},housekeepingStatus:{default:"dirty"},serviceStatus:{default:"inService"}}},else:{required:["name","type"]}},it=new RegExp(".*","u");function validate103(e,{instancePath:t="",parentData:s,parentDataProperty:i,rootData:a=e}={}){let r=null,n=0;if(e&&"object"==typeof e&&!Array.isArray(e)){for(const s in e)if("cool"!==s&&"heat"!==s&&"auto"!==s){const e={instancePath:t,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:s},message:"must NOT have additional properties"};null===r?r=[e]:r.push(e),n++}void 0!==e.cool&&(validate75(e.cool,{instancePath:t+"/cool",parentData:e,parentDataProperty:"cool",rootData:a})||(r=null===r?validate75.errors:r.concat(validate75.errors),n=r.length)),void 0!==e.heat&&(validate75(e.heat,{instancePath:t+"/heat",parentData:e,parentDataProperty:"heat",rootData:a})||(r=null===r?validate75.errors:r.concat(validate75.errors),n=r.length)),void 0!==e.auto&&(validate75(e.auto,{instancePath:t+"/auto",parentData:e,parentDataProperty:"auto",rootData:a})||(r=null===r?validate75.errors:r.concat(validate75.errors),n=r.length))}else{const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}return validate103.errors=r,0===n}var at=validate68,rt=function validate108(e,{instancePath:t="",parentData:s,parentDataProperty:i,rootData:a=e}={}){let r=null,n=0;if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.type&&(e.type="systemUser"),void 0===e.firstName){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"firstName"},message:"must have required property 'firstName'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.lastName){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"lastName"},message:"must have required property 'lastName'"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.id){let s=e.id;if("string"!=typeof s){const e={instancePath:t+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}const i=n,a=n;if("global"!==s&&"system"!==s){const e={};null===r?r=[e]:r.push(e),n++}if(a===n){const e={instancePath:t+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===r?r=[e]:r.push(e),n++}else n=i,null!==r&&(i?r.length=i:r=null)}let s=e.type;if("string"!=typeof s){const e={instancePath:t+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("systemUser"!==s){const e={instancePath:t+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:nt.properties.type.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.driver){let s=e.driver;if("string"!=typeof s){const e={instancePath:t+"/driver",schemaPath:"definitions.json#/definitions/driver/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("adlink"!==s&&"aws-kinesis"!==s&&"butler"!==s&&"crestron"!==s&&"dell"!==s&&"dmp"!==s&&"doorbird"!==s&&"dormakaba"!==s&&"dsc"!==s&&"ecobee"!==s&&"epson"!==s&&"geovision-rs"!==s&&"geovision-as-manager"!==s&&"honeywell-vista"!==s&&"igor"!==s&&"inncom"!==s&&"isapi"!==s&&"kohost-k7"!==s&&"kohost"!==s&&"lg"!==s&&"lg-webos"!==s&&"lapi"!==s&&"lirc"!==s&&"mews"!==s&&"mht"!==s&&"paxton"!==s&&"pelican-wireless"!==s&&"power-shades"!==s&&"rachio"!==s&&"rebrandly"!==s&&"rtsp"!==s&&"salto"!==s&&"salto-irn"!==s&&"samsung"!==s&&"se"!==s&&"sendgrid"!==s&&"sonifi"!==s&&"stay-n-touch"!==s&&"storable"!==s&&"twilio"!==s&&"unifi"!==s&&"valcom"!==s&&"vizio"!==s&&"wisenet"!==s&&"cloudflare-images"!==s&&"cloudflare-stream"!==s&&"insperia-privacy"!==s){const e={instancePath:t+"/driver",schemaPath:"definitions.json#/definitions/driver/enum",keyword:"enum",params:{allowedValues:f.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.firstName&&"string"!=typeof e.firstName){const e={instancePath:t+"/firstName",schemaPath:"#/properties/firstName/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.lastName&&"string"!=typeof e.lastName){const e={instancePath:t+"/lastName",schemaPath:"#/properties/lastName/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.phone){let s=e.phone;if("string"!=typeof s&&null!==s){const e={instancePath:t+"/phone",schemaPath:"#/properties/phone/type",keyword:"type",params:{type:nt.properties.phone.type},message:"must be string,null"};null===r?r=[e]:r.push(e),n++}if("string"==typeof s&&!et.test(s)){const e={instancePath:t+"/phone",schemaPath:"#/properties/phone/pattern",keyword:"pattern",params:{pattern:"^\\+[0-9]{1,14}$"},message:'must match pattern "^\\+[0-9]{1,14}$"'};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.email){let s=e.email;if("string"!=typeof s&&null!==s){const e={instancePath:t+"/email",schemaPath:"#/properties/email/type",keyword:"type",params:{type:nt.properties.email.type},message:"must be string,null"};null===r?r=[e]:r.push(e),n++}if("string"==typeof s&&!ot.test(s)){const e={instancePath:t+"/email",schemaPath:"#/properties/email/format",keyword:"format",params:{format:"email"},message:'must match format "email"'};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.address){let s=e.address;if(s&&"object"==typeof s&&!Array.isArray(s)){if(void 0!==s.id&&"string"!=typeof s.id){const e={instancePath:t+"/address/id",schemaPath:"definitions.json#/definitions/address/properties/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==s.line1&&"string"!=typeof s.line1){const e={instancePath:t+"/address/line1",schemaPath:"definitions.json#/definitions/address/properties/line1/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==s.line2&&"string"!=typeof s.line2){const e={instancePath:t+"/address/line2",schemaPath:"definitions.json#/definitions/address/properties/line2/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==s.line3&&"string"!=typeof s.line3){const e={instancePath:t+"/address/line3",schemaPath:"definitions.json#/definitions/address/properties/line3/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==s.city&&"string"!=typeof s.city){const e={instancePath:t+"/address/city",schemaPath:"definitions.json#/definitions/address/properties/city/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==s.state&&"string"!=typeof s.state){const e={instancePath:t+"/address/state",schemaPath:"definitions.json#/definitions/address/properties/state/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==s.postalCode&&"string"!=typeof s.postalCode){const e={instancePath:t+"/address/postalCode",schemaPath:"definitions.json#/definitions/address/properties/postalCode/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==s.countryCode){let e=s.countryCode;if("string"==typeof e){if(P(e)>2){const e={instancePath:t+"/address/countryCode",schemaPath:"definitions.json#/definitions/address/properties/countryCode/maxLength",keyword:"maxLength",params:{limit:2},message:"must NOT have more than 2 characters"};null===r?r=[e]:r.push(e),n++}if(P(e)<2){const e={instancePath:t+"/address/countryCode",schemaPath:"definitions.json#/definitions/address/properties/countryCode/minLength",keyword:"minLength",params:{limit:2},message:"must NOT have fewer than 2 characters"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/address/countryCode",schemaPath:"definitions.json#/definitions/address/properties/countryCode/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t+"/address",schemaPath:"definitions.json#/definitions/address/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.photo&&"string"!=typeof e.photo){const e={instancePath:t+"/photo",schemaPath:"#/properties/photo/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.jobTitle&&"string"!=typeof e.jobTitle){const e={instancePath:t+"/jobTitle",schemaPath:"#/properties/jobTitle/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.dob&&"string"!=typeof e.dob){const e={instancePath:t+"/dob",schemaPath:"#/properties/dob/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.gender){let s=e.gender;if("string"!=typeof s){const e={instancePath:t+"/gender",schemaPath:"#/properties/gender/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("male"!==s&&"female"!==s){const e={instancePath:t+"/gender",schemaPath:"#/properties/gender/enum",keyword:"enum",params:{allowedValues:nt.properties.gender.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.roles){let s=e.roles;if(Array.isArray(s)){const e=s.length;for(let i=0;i<e;i++){let e=s[i];if("string"!=typeof e){const e={instancePath:t+"/roles/"+i,schemaPath:"#/properties/roles/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("Guest"!==e&&"User"!==e&&"Manager"!==e&&"Maintenance"!==e&&"Administrator"!==e&&"SuperAdmin"!==e){const e={instancePath:t+"/roles/"+i,schemaPath:"#/properties/roles/items/enum",keyword:"enum",params:{allowedValues:nt.properties.roles.items.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t+"/roles",schemaPath:"#/properties/roles/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.nationality){let s=e.nationality;if("string"==typeof s){if(P(s)>2){const e={instancePath:t+"/nationality",schemaPath:"#/properties/nationality/maxLength",keyword:"maxLength",params:{limit:2},message:"must NOT have more than 2 characters"};null===r?r=[e]:r.push(e),n++}if(P(s)<2){const e={instancePath:t+"/nationality",schemaPath:"#/properties/nationality/minLength",keyword:"minLength",params:{limit:2},message:"must NOT have fewer than 2 characters"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/nationality",schemaPath:"#/properties/nationality/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.notes){let s=e.notes;if(Array.isArray(s)){const e=s.length;for(let i=0;i<e;i++)if("string"!=typeof s[i]){const e={instancePath:t+"/notes/"+i,schemaPath:"#/properties/notes/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/notes",schemaPath:"#/properties/notes/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.files){let s=e.files;if(Array.isArray(s)){const e=s.length;for(let i=0;i<e;i++)validate15(s[i],{instancePath:t+"/files/"+i,parentData:s,parentDataProperty:i,rootData:a})||(r=null===r?validate15.errors:r.concat(validate15.errors),n=r.length)}else{const e={instancePath:t+"/files",schemaPath:"#/properties/files/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.identifications){let s=e.identifications;if(Array.isArray(s)){const e=s.length;for(let i=0;i<e;i++)validate37(s[i],{instancePath:t+"/identifications/"+i,parentData:s,parentDataProperty:i,rootData:a})||(r=null===r?validate37.errors:r.concat(validate37.errors),n=r.length)}else{const e={instancePath:t+"/identifications",schemaPath:"#/properties/identifications/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.payments){let s=e.payments;if(Array.isArray(s)){const e=s.length;for(let i=0;i<e;i++)validate57(s[i],{instancePath:t+"/payments/"+i,parentData:s,parentDataProperty:i,rootData:a})||(r=null===r?validate57.errors:r.concat(validate57.errors),n=r.length)}else{const e={instancePath:t+"/payments",schemaPath:"#/properties/payments/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.revenue&&(validate112(e.revenue,{instancePath:t+"/revenue",parentData:e,parentDataProperty:"revenue",rootData:a})||(r=null===r?validate112.errors:r.concat(validate112.errors),n=r.length)),void 0!==e.createdAt){let s=e.createdAt;if("string"!=typeof s&&(!s||"object"!=typeof s||Array.isArray(s))){const e={instancePath:t+"/createdAt",schemaPath:"definitions.json#/definitions/createdAt/type",keyword:"type",params:{type:ge.type},message:"must be string,object"};null===r?r=[e]:r.push(e),n++}if("string"==typeof s&&!I.validate(s)){const e={instancePath:t+"/createdAt",schemaPath:"definitions.json#/definitions/createdAt/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.updatedAt){let s=e.updatedAt;if("string"!=typeof s&&(!s||"object"!=typeof s||Array.isArray(s))){const e={instancePath:t+"/updatedAt",schemaPath:"definitions.json#/definitions/updatedAt/type",keyword:"type",params:{type:Pe.type},message:"must be string,object"};null===r?r=[e]:r.push(e),n++}if("string"==typeof s&&!I.validate(s)){const e={instancePath:t+"/updatedAt",schemaPath:"definitions.json#/definitions/updatedAt/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.systemId&&"string"!=typeof e.systemId){const e={instancePath:t+"/systemId",schemaPath:"definitions.json#/definitions/systemId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}return validate108.errors=r,0===n},nt={$schema:"http://json-schema.org/draft-07/schema",$id:"systemUser.json",title:"System User",description:"A system user is a user that originated from an external 3rd party system.",type:"object",required:["firstName","lastName"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",default:"systemUser",enum:["systemUser"]},driver:{$ref:"definitions.json#/definitions/driver"},firstName:{type:"string"},lastName:{type:"string"},phone:{type:["string","null"],pattern:"^\\+[0-9]{1,14}$"},email:{type:["string","null"],format:"email"},address:{$ref:"definitions.json#/definitions/address"},photo:{type:"string"},jobTitle:{type:"string"},dob:{type:"string"},gender:{type:"string",enum:["male","female"]},roles:{type:"array",items:{type:"string",enum:["Guest","User","Manager","Maintenance","Administrator","SuperAdmin"]}},nationality:{type:"string",minLength:2,maxLength:2},notes:{type:"array",items:{type:"string"}},files:{type:"array",items:{$ref:"mediaFile.json#"}},identifications:{type:"array",items:{$ref:"identification.json#"}},payments:{type:"array",items:{$ref:"payment.json#"}},revenue:{$ref:"definitions.json#/definitions/revenue"},createdAt:{$ref:"definitions.json#/definitions/createdAt"},updatedAt:{$ref:"definitions.json#/definitions/updatedAt"},systemId:{$ref:"definitions.json#/definitions/systemId"}}},ot=/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i;function validate112(e,{instancePath:t="",parentData:s,parentDataProperty:i,rootData:a=e}={}){let r=null,n=0;if(Array.isArray(e)){const s=e.length;for(let i=0;i<s;i++){let s=e[i];if(s&&"object"==typeof s&&!Array.isArray(s)){if(void 0!==s.id){let e=s.id;if("string"!=typeof e){const e={instancePath:t+"/"+i+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}const a=n,o=n;if("global"!==e&&"system"!==e){const e={};null===r?r=[e]:r.push(e),n++}if(o===n){const e={instancePath:t+"/"+i+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===r?r=[e]:r.push(e),n++}else n=a,null!==r&&(a?r.length=a:r=null)}if(void 0!==s.name&&"string"!=typeof s.name){const e={instancePath:t+"/"+i+"/name",schemaPath:"#/items/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==s.date){let e=s.date;if("string"==typeof e){if(!I.validate(e)){const e={instancePath:t+"/"+i+"/date",schemaPath:"#/items/properties/date/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/"+i+"/date",schemaPath:"#/items/properties/date/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}if(void 0!==s.price&&"number"!=typeof s.price){const e={instancePath:t+"/"+i+"/price",schemaPath:"#/items/properties/price/type",keyword:"type",params:{type:"number"},message:"must be number"};null===r?r=[e]:r.push(e),n++}if(void 0!==s.tax){let e=s.tax;if("number"!=typeof e&&null!==e){const e={instancePath:t+"/"+i+"/tax",schemaPath:"#/items/properties/tax/type",keyword:"type",params:{type:Te.items.properties.tax.type},message:"must be number,null"};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t+"/"+i,schemaPath:"#/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}return validate112.errors=r,0===n}var pt=validate72,mt=function validate39(e,{instancePath:t="",parentData:s,parentDataProperty:i,rootData:a=e}={}){let r=null,n=0;if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.type&&(e.type="ticket"),void 0===e.conversation&&(e.conversation=[]),void 0===e.status&&(e.status="open"),void 0===e.priority&&(e.priority="normal"),void 0===e.tags&&(e.tags=[]),void 0===e.id){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.conversation){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"conversation"},message:"must have required property 'conversation'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.requester){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"requester"},message:"must have required property 'requester'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.status){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"status"},message:"must have required property 'status'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.tags){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"tags"},message:"must have required property 'tags'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.createdAt){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"createdAt"},message:"must have required property 'createdAt'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.updatedAt){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"updatedAt"},message:"must have required property 'updatedAt'"};null===r?r=[e]:r.push(e),n++}for(const s in e)if(!A.call(dt.properties,s)){const e={instancePath:t,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:s},message:"must NOT have additional properties"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.id){let s=e.id;if("string"!=typeof s){const e={instancePath:t+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}const i=n,a=n;if("global"!==s&&"system"!==s){const e={};null===r?r=[e]:r.push(e),n++}if(a===n){const e={instancePath:t+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===r?r=[e]:r.push(e),n++}else n=i,null!==r&&(i?r.length=i:r=null)}let s=e.type;if("string"!=typeof s){const e={instancePath:t+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("ticket"!==s){const e={instancePath:t+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:dt.properties.type.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.number&&"string"!=typeof e.number){const e={instancePath:t+"/number",schemaPath:"#/properties/number/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.issueId&&"string"!=typeof e.issueId){const e={instancePath:t+"/issueId",schemaPath:"#/properties/issueId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}let i=e.conversation;if(Array.isArray(i)){const e=i.length;for(let s=0;s<e;s++){let e=i[s];const m=n;let d=!1;const u=n;if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.id){const e={instancePath:t+"/conversation/"+s,schemaPath:"#/properties/conversation/items/anyOf/0/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.userId){const e={instancePath:t+"/conversation/"+s,schemaPath:"#/properties/conversation/items/anyOf/0/required",keyword:"required",params:{missingProperty:"userId"},message:"must have required property 'userId'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.timestamp){const e={instancePath:t+"/conversation/"+s,schemaPath:"#/properties/conversation/items/anyOf/0/required",keyword:"required",params:{missingProperty:"timestamp"},message:"must have required property 'timestamp'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.body){const e={instancePath:t+"/conversation/"+s,schemaPath:"#/properties/conversation/items/anyOf/0/required",keyword:"required",params:{missingProperty:"body"},message:"must have required property 'body'"};null===r?r=[e]:r.push(e),n++}}var o=u===n;if(d=d||o,!d){const i=n;if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.id){const e={instancePath:t+"/conversation/"+s,schemaPath:"#/properties/conversation/items/anyOf/1/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.systemId){const e={instancePath:t+"/conversation/"+s,schemaPath:"#/properties/conversation/items/anyOf/1/required",keyword:"required",params:{missingProperty:"systemId"},message:"must have required property 'systemId'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.timestamp){const e={instancePath:t+"/conversation/"+s,schemaPath:"#/properties/conversation/items/anyOf/1/required",keyword:"required",params:{missingProperty:"timestamp"},message:"must have required property 'timestamp'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.body){const e={instancePath:t+"/conversation/"+s,schemaPath:"#/properties/conversation/items/anyOf/1/required",keyword:"required",params:{missingProperty:"body"},message:"must have required property 'body'"};null===r?r=[e]:r.push(e),n++}}o=i===n;if(d=d||o,!d){const i=n;if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.id){const e={instancePath:t+"/conversation/"+s,schemaPath:"#/properties/conversation/items/anyOf/2/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.vendorId){const e={instancePath:t+"/conversation/"+s,schemaPath:"#/properties/conversation/items/anyOf/2/required",keyword:"required",params:{missingProperty:"vendorId"},message:"must have required property 'vendorId'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.timestamp){const e={instancePath:t+"/conversation/"+s,schemaPath:"#/properties/conversation/items/anyOf/2/required",keyword:"required",params:{missingProperty:"timestamp"},message:"must have required property 'timestamp'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.body){const e={instancePath:t+"/conversation/"+s,schemaPath:"#/properties/conversation/items/anyOf/2/required",keyword:"required",params:{missingProperty:"body"},message:"must have required property 'body'"};null===r?r=[e]:r.push(e),n++}}o=i===n;d=d||o}}if(d)n=m,null!==r&&(m?r.length=m:r=null);else{const e={instancePath:t+"/conversation/"+s,schemaPath:"#/properties/conversation/items/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};null===r?r=[e]:r.push(e),n++}if(e&&"object"==typeof e&&!Array.isArray(e)){void 0===e.readBy&&(e.readBy=[]);for(const i in e)if(!A.call(dt.properties.conversation.items.properties,i)){const e={instancePath:t+"/conversation/"+s,schemaPath:"#/properties/conversation/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.id&&"string"!=typeof e.id){const e={instancePath:t+"/conversation/"+s+"/id",schemaPath:"#/properties/conversation/items/properties/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.userId&&"string"!=typeof e.userId){const e={instancePath:t+"/conversation/"+s+"/userId",schemaPath:"#/properties/conversation/items/properties/userId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.userName&&"string"!=typeof e.userName){const e={instancePath:t+"/conversation/"+s+"/userName",schemaPath:"#/properties/conversation/items/properties/userName/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.vendorId&&"string"!=typeof e.vendorId){const e={instancePath:t+"/conversation/"+s+"/vendorId",schemaPath:"#/properties/conversation/items/properties/vendorId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.vendorName&&"string"!=typeof e.vendorName){const e={instancePath:t+"/conversation/"+s+"/vendorName",schemaPath:"#/properties/conversation/items/properties/vendorName/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.systemId&&"string"!=typeof e.systemId){const e={instancePath:t+"/conversation/"+s+"/systemId",schemaPath:"#/properties/conversation/items/properties/systemId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.systemName&&"string"!=typeof e.systemName){const e={instancePath:t+"/conversation/"+s+"/systemName",schemaPath:"#/properties/conversation/items/properties/systemName/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.timestamp){let i=e.timestamp;if("string"!=typeof i&&(!i||"object"!=typeof i||Array.isArray(i))){const e={instancePath:t+"/conversation/"+s+"/timestamp",schemaPath:"definitions.json#/definitions/createdAt/type",keyword:"type",params:{type:ge.type},message:"must be string,object"};null===r?r=[e]:r.push(e),n++}if("string"==typeof i&&!I.validate(i)){const e={instancePath:t+"/conversation/"+s+"/timestamp",schemaPath:"definitions.json#/definitions/createdAt/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.body&&"string"!=typeof e.body){const e={instancePath:t+"/conversation/"+s+"/body",schemaPath:"#/properties/conversation/items/properties/body/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}let i=e.readBy;if(Array.isArray(i)){const e=i.length;for(let a=0;a<e;a++)if("string"!=typeof i[a]){const e={instancePath:t+"/conversation/"+s+"/readBy/"+a,schemaPath:"#/properties/conversation/items/properties/readBy/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/conversation/"+s+"/readBy",schemaPath:"#/properties/conversation/items/properties/readBy/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.media){let i=e.media;const o=n;let m=!1;const d=n;validate15(i,{instancePath:t+"/conversation/"+s+"/media",parentData:e,parentDataProperty:"media",rootData:a})||(r=null===r?validate15.errors:r.concat(validate15.errors),n=r.length);var p=d===n;if(m=m||p,!m){const e=n;if(null!==i){const e={instancePath:t+"/conversation/"+s+"/media",schemaPath:"#/properties/conversation/items/properties/media/anyOf/1/type",keyword:"type",params:{type:"null"},message:"must be null"};null===r?r=[e]:r.push(e),n++}p=e===n;m=m||p}if(m)n=o,null!==r&&(o?r.length=o:r=null);else{const e={instancePath:t+"/conversation/"+s+"/media",schemaPath:"#/properties/conversation/items/properties/media/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t+"/conversation/"+s,schemaPath:"#/properties/conversation/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t+"/conversation",schemaPath:"#/properties/conversation/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.openedBy){let s=e.openedBy;if(s&&"object"==typeof s&&!Array.isArray(s)){if(void 0!==s.userId&&"string"!=typeof s.userId){const e={instancePath:t+"/openedBy/userId",schemaPath:"#/properties/openedBy/properties/userId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==s.systemId&&"string"!=typeof s.systemId){const e={instancePath:t+"/openedBy/systemId",schemaPath:"#/properties/openedBy/properties/systemId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/openedBy",schemaPath:"#/properties/openedBy/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.requester){let s=e.requester;if(s&&"object"==typeof s&&!Array.isArray(s)){if(void 0!==s.systemId&&"string"!=typeof s.systemId){const e={instancePath:t+"/requester/systemId",schemaPath:"#/properties/requester/properties/systemId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==s.systemName&&"string"!=typeof s.systemName){const e={instancePath:t+"/requester/systemName",schemaPath:"#/properties/requester/properties/systemName/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==s.systemPhoto){let e=s.systemPhoto;const i=n;let o=!1;const p=n;validate15(e,{instancePath:t+"/requester/systemPhoto",parentData:s,parentDataProperty:"systemPhoto",rootData:a})||(r=null===r?validate15.errors:r.concat(validate15.errors),n=r.length);var m=p===n;if(o=o||m,!o){const s=n;if(null!==e){const e={instancePath:t+"/requester/systemPhoto",schemaPath:"#/properties/requester/properties/systemPhoto/anyOf/1/type",keyword:"type",params:{type:"null"},message:"must be null"};null===r?r=[e]:r.push(e),n++}m=s===n;if(o=o||m,!o){const s=n;if("string"!=typeof e){const e={instancePath:t+"/requester/systemPhoto",schemaPath:"#/properties/requester/properties/systemPhoto/anyOf/2/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}m=s===n;o=o||m}}if(o)n=i,null!==r&&(i?r.length=i:r=null);else{const e={instancePath:t+"/requester/systemPhoto",schemaPath:"#/properties/requester/properties/systemPhoto/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};null===r?r=[e]:r.push(e),n++}}if(void 0!==s.userId&&"string"!=typeof s.userId){const e={instancePath:t+"/requester/userId",schemaPath:"#/properties/requester/properties/userId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==s.userName&&"string"!=typeof s.userName){const e={instancePath:t+"/requester/userName",schemaPath:"#/properties/requester/properties/userName/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==s.userPhoto){let e=s.userPhoto;const i=n;let o=!1;const p=n;validate15(e,{instancePath:t+"/requester/userPhoto",parentData:s,parentDataProperty:"userPhoto",rootData:a})||(r=null===r?validate15.errors:r.concat(validate15.errors),n=r.length);var d=p===n;if(o=o||d,!o){const s=n;if(null!==e){const e={instancePath:t+"/requester/userPhoto",schemaPath:"#/properties/requester/properties/userPhoto/anyOf/1/type",keyword:"type",params:{type:"null"},message:"must be null"};null===r?r=[e]:r.push(e),n++}d=s===n;if(o=o||d,!o){const s=n;if("string"!=typeof e){const e={instancePath:t+"/requester/userPhoto",schemaPath:"#/properties/requester/properties/userPhoto/anyOf/2/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}d=s===n;o=o||d}}if(o)n=i,null!==r&&(i?r.length=i:r=null);else{const e={instancePath:t+"/requester/userPhoto",schemaPath:"#/properties/requester/properties/userPhoto/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};null===r?r=[e]:r.push(e),n++}}if(void 0!==s.deviceId&&"string"!=typeof s.deviceId){const e={instancePath:t+"/requester/deviceId",schemaPath:"#/properties/requester/properties/deviceId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==s.roomId&&"string"!=typeof s.roomId){const e={instancePath:t+"/requester/roomId",schemaPath:"#/properties/requester/properties/roomId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==s.reservationId&&"string"!=typeof s.reservationId){const e={instancePath:t+"/requester/reservationId",schemaPath:"#/properties/requester/properties/reservationId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==s.spaceId&&"string"!=typeof s.spaceId){const e={instancePath:t+"/requester/spaceId",schemaPath:"#/properties/requester/properties/spaceId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==s.spaceName&&"string"!=typeof s.spaceName){const e={instancePath:t+"/requester/spaceName",schemaPath:"#/properties/requester/properties/spaceName/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/requester",schemaPath:"#/properties/requester/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.assignedTo){let s=e.assignedTo;if(s&&"object"==typeof s&&!Array.isArray(s)){if(void 0!==s.userId&&"string"!=typeof s.userId){const e={instancePath:t+"/assignedTo/userId",schemaPath:"#/properties/assignedTo/properties/userId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==s.userName&&"string"!=typeof s.userName){const e={instancePath:t+"/assignedTo/userName",schemaPath:"#/properties/assignedTo/properties/userName/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==s.userPhoto){let e=s.userPhoto;const i=n;let o=!1;const p=n;validate15(e,{instancePath:t+"/assignedTo/userPhoto",parentData:s,parentDataProperty:"userPhoto",rootData:a})||(r=null===r?validate15.errors:r.concat(validate15.errors),n=r.length);var u=p===n;if(o=o||u,!o){const s=n;if(null!==e){const e={instancePath:t+"/assignedTo/userPhoto",schemaPath:"#/properties/assignedTo/properties/userPhoto/anyOf/1/type",keyword:"type",params:{type:"null"},message:"must be null"};null===r?r=[e]:r.push(e),n++}u=s===n;if(o=o||u,!o){const s=n;if("string"!=typeof e){const e={instancePath:t+"/assignedTo/userPhoto",schemaPath:"#/properties/assignedTo/properties/userPhoto/anyOf/2/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}u=s===n;o=o||u}}if(o)n=i,null!==r&&(i?r.length=i:r=null);else{const e={instancePath:t+"/assignedTo/userPhoto",schemaPath:"#/properties/assignedTo/properties/userPhoto/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};null===r?r=[e]:r.push(e),n++}}if(void 0!==s.vendorId&&"string"!=typeof s.vendorId){const e={instancePath:t+"/assignedTo/vendorId",schemaPath:"#/properties/assignedTo/properties/vendorId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==s.vendorName&&"string"!=typeof s.vendorName){const e={instancePath:t+"/assignedTo/vendorName",schemaPath:"#/properties/assignedTo/properties/vendorName/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==s.vendorPhoto){let e=s.vendorPhoto;const i=n;let o=!1;const p=n;validate15(e,{instancePath:t+"/assignedTo/vendorPhoto",parentData:s,parentDataProperty:"vendorPhoto",rootData:a})||(r=null===r?validate15.errors:r.concat(validate15.errors),n=r.length);var l=p===n;if(o=o||l,!o){const s=n;if(null!==e){const e={instancePath:t+"/assignedTo/vendorPhoto",schemaPath:"#/properties/assignedTo/properties/vendorPhoto/anyOf/1/type",keyword:"type",params:{type:"null"},message:"must be null"};null===r?r=[e]:r.push(e),n++}l=s===n;if(o=o||l,!o){const s=n;if("string"!=typeof e){const e={instancePath:t+"/assignedTo/vendorPhoto",schemaPath:"#/properties/assignedTo/properties/vendorPhoto/anyOf/2/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}l=s===n;o=o||l}}if(o)n=i,null!==r&&(i?r.length=i:r=null);else{const e={instancePath:t+"/assignedTo/vendorPhoto",schemaPath:"#/properties/assignedTo/properties/vendorPhoto/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t+"/assignedTo",schemaPath:"#/properties/assignedTo/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}}let c=e.status;if("string"!=typeof c){const e={instancePath:t+"/status",schemaPath:"#/properties/status/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("open"!==c&&"pending"!==c&&"solved"!==c&&"closed"!==c){const e={instancePath:t+"/status",schemaPath:"#/properties/status/enum",keyword:"enum",params:{allowedValues:dt.properties.status.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}let y=e.priority;if("string"!=typeof y){const e={instancePath:t+"/priority",schemaPath:"#/properties/priority/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("low"!==y&&"normal"!==y&&"high"!==y){const e={instancePath:t+"/priority",schemaPath:"#/properties/priority/enum",keyword:"enum",params:{allowedValues:dt.properties.priority.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}let h=e.tags;if(Array.isArray(h)){const e=h.length;for(let s=0;s<e;s++)if("string"!=typeof h[s]){const e={instancePath:t+"/tags/"+s,schemaPath:"#/properties/tags/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/tags",schemaPath:"#/properties/tags/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.department&&"string"!=typeof e.department){const e={instancePath:t+"/department",schemaPath:"#/properties/department/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.rating){let s=e.rating;if("number"==typeof s){if(s>5||isNaN(s)){const e={instancePath:t+"/rating",schemaPath:"#/properties/rating/maximum",keyword:"maximum",params:{comparison:"<=",limit:5},message:"must be <= 5"};null===r?r=[e]:r.push(e),n++}if(s<0||isNaN(s)){const e={instancePath:t+"/rating",schemaPath:"#/properties/rating/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/rating",schemaPath:"#/properties/rating/type",keyword:"type",params:{type:"number"},message:"must be number"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.ratingComment&&"string"!=typeof e.ratingComment){const e={instancePath:t+"/ratingComment",schemaPath:"#/properties/ratingComment/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.tipAmount&&"string"!=typeof e.tipAmount){const e={instancePath:t+"/tipAmount",schemaPath:"#/properties/tipAmount/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.autoCloseAt){let s=e.autoCloseAt;if("string"!=typeof s&&(!s||"object"!=typeof s||Array.isArray(s))){const e={instancePath:t+"/autoCloseAt",schemaPath:"definitions.json#/definitions/date/type",keyword:"type",params:{type:j.type},message:"must be string,object"};null===r?r=[e]:r.push(e),n++}if("string"==typeof s&&!I.validate(s)){const e={instancePath:t+"/autoCloseAt",schemaPath:"definitions.json#/definitions/date/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.scheduleDate){let s=e.scheduleDate;if("string"!=typeof s&&(!s||"object"!=typeof s||Array.isArray(s))){const e={instancePath:t+"/scheduleDate",schemaPath:"definitions.json#/definitions/date/type",keyword:"type",params:{type:j.type},message:"must be string,object"};null===r?r=[e]:r.push(e),n++}if("string"==typeof s&&!I.validate(s)){const e={instancePath:t+"/scheduleDate",schemaPath:"definitions.json#/definitions/date/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.createdAt){let s=e.createdAt;if("string"!=typeof s&&(!s||"object"!=typeof s||Array.isArray(s))){const e={instancePath:t+"/createdAt",schemaPath:"definitions.json#/definitions/date/type",keyword:"type",params:{type:j.type},message:"must be string,object"};null===r?r=[e]:r.push(e),n++}if("string"==typeof s&&!I.validate(s)){const e={instancePath:t+"/createdAt",schemaPath:"definitions.json#/definitions/date/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.updatedAt){let s=e.updatedAt;if("string"!=typeof s&&(!s||"object"!=typeof s||Array.isArray(s))){const e={instancePath:t+"/updatedAt",schemaPath:"definitions.json#/definitions/date/type",keyword:"type",params:{type:j.type},message:"must be string,object"};null===r?r=[e]:r.push(e),n++}if("string"==typeof s&&!I.validate(s)){const e={instancePath:t+"/updatedAt",schemaPath:"definitions.json#/definitions/date/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.solvedAt){let s=e.solvedAt;if("string"!=typeof s&&(!s||"object"!=typeof s||Array.isArray(s))){const e={instancePath:t+"/solvedAt",schemaPath:"definitions.json#/definitions/date/type",keyword:"type",params:{type:j.type},message:"must be string,object"};null===r?r=[e]:r.push(e),n++}if("string"==typeof s&&!I.validate(s)){const e={instancePath:t+"/solvedAt",schemaPath:"definitions.json#/definitions/date/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.closedAt){let s=e.closedAt;if("string"!=typeof s&&(!s||"object"!=typeof s||Array.isArray(s))){const e={instancePath:t+"/closedAt",schemaPath:"definitions.json#/definitions/date/type",keyword:"type",params:{type:j.type},message:"must be string,object"};null===r?r=[e]:r.push(e),n++}if("string"==typeof s&&!I.validate(s)){const e={instancePath:t+"/closedAt",schemaPath:"definitions.json#/definitions/date/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}return validate39.errors=r,0===n},dt={$schema:"http://json-schema.org/draft-07/schema",$id:"ticket.json",title:"Ticket",description:"A ticket is a request from a user.",type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",enum:["ticket"],default:"ticket"},number:{type:"string"},issueId:{type:"string"},conversation:{type:"array",default:[],items:{type:"object",additionalProperties:!1,properties:{id:{type:"string"},userId:{type:"string"},userName:{type:"string"},vendorId:{type:"string"},vendorName:{type:"string"},systemId:{type:"string"},systemName:{type:"string"},timestamp:{$ref:"definitions.json#/definitions/createdAt"},body:{type:"string"},readBy:{type:"array",default:[],items:{type:"string"}},media:{anyOf:[{$ref:"mediaFile.json"},{type:"null"}]}},anyOf:[{required:["id","userId","timestamp","body"]},{required:["id","systemId","timestamp","body"]},{required:["id","vendorId","timestamp","body"]}]}},openedBy:{type:"object",properties:{userId:{type:"string"},systemId:{type:"string"}}},requester:{type:"object",properties:{systemId:{type:"string"},systemName:{type:"string"},systemPhoto:{anyOf:[{$ref:"mediaFile.json"},{type:"null"},{type:"string"}]},userId:{type:"string"},userName:{type:"string"},userPhoto:{anyOf:[{$ref:"mediaFile.json"},{type:"null"},{type:"string"}]},deviceId:{type:"string"},roomId:{type:"string"},reservationId:{type:"string"},spaceId:{type:"string"},spaceName:{type:"string"}}},assignedTo:{type:"object",properties:{userId:{type:"string"},userName:{type:"string"},userPhoto:{anyOf:[{$ref:"mediaFile.json"},{type:"null"},{type:"string"}]},vendorId:{type:"string"},vendorName:{type:"string"},vendorPhoto:{anyOf:[{$ref:"mediaFile.json"},{type:"null"},{type:"string"}]}}},status:{type:"string",enum:["open","pending","solved","closed"],default:"open"},priority:{type:"string",enum:["low","normal","high"],default:"normal"},tags:{type:"array",default:[],items:{type:"string"}},department:{type:"string"},rating:{type:"number",minimum:0,maximum:5},ratingComment:{type:"string"},tipAmount:{type:"string"},autoCloseAt:{$ref:"definitions.json#/definitions/date"},scheduleDate:{$ref:"definitions.json#/definitions/date"},createdAt:{$ref:"definitions.json#/definitions/date"},updatedAt:{$ref:"definitions.json#/definitions/date"},solvedAt:{$ref:"definitions.json#/definitions/date"},closedAt:{$ref:"definitions.json#/definitions/date"}},required:["id","conversation","requester","status","tags","createdAt","updatedAt"],additionalProperties:!1};var ut=function validate114(e,{instancePath:t="",parentData:s,parentDataProperty:i,rootData:a=e}={}){let r=null,n=0;if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.type&&(e.type="timeSheet"),void 0===e.locked&&(e.locked=!1),void 0===e.timeEntries&&(e.timeEntries=[]),void 0===e.userId){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"userId"},message:"must have required property 'userId'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.day){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"day"},message:"must have required property 'day'"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.id){let s=e.id;if("string"!=typeof s){const e={instancePath:t+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}const i=n,a=n;if("global"!==s&&"system"!==s){const e={};null===r?r=[e]:r.push(e),n++}if(a===n){const e={instancePath:t+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===r?r=[e]:r.push(e),n++}else n=i,null!==r&&(i?r.length=i:r=null)}let s=e.type;if("string"!=typeof s){const e={instancePath:t+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("timeSheet"!==s){const e={instancePath:t+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:lt.properties.type.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.userId){let s=e.userId;if("string"!=typeof s){const e={instancePath:t+"/userId",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}const i=n,a=n;if("global"!==s&&"system"!==s){const e={};null===r?r=[e]:r.push(e),n++}if(a===n){const e={instancePath:t+"/userId",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===r?r=[e]:r.push(e),n++}else n=i,null!==r&&(i?r.length=i:r=null)}if(void 0!==e.day){let s=e.day;if("string"!=typeof s&&(!s||"object"!=typeof s||Array.isArray(s))){const e={instancePath:t+"/day",schemaPath:"#/properties/day/type",keyword:"type",params:{type:lt.properties.day.type},message:"must be string,object"};null===r?r=[e]:r.push(e),n++}if("string"==typeof s&&!I.validate(s)){const e={instancePath:t+"/day",schemaPath:"#/properties/day/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===r?r=[e]:r.push(e),n++}}if("boolean"!=typeof e.locked){const e={instancePath:t+"/locked",schemaPath:"#/properties/locked/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===r?r=[e]:r.push(e),n++}let i=e.timeEntries;if(Array.isArray(i)){const e=i.length;for(let s=0;s<e;s++){let e=i[s];if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.start){const e={instancePath:t+"/timeEntries/"+s,schemaPath:"#/properties/timeEntries/items/required",keyword:"required",params:{missingProperty:"start"},message:"must have required property 'start'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.discriminator){const e={instancePath:t+"/timeEntries/"+s,schemaPath:"#/properties/timeEntries/items/required",keyword:"required",params:{missingProperty:"discriminator"},message:"must have required property 'discriminator'"};null===r?r=[e]:r.push(e),n++}for(const i in e)if("id"!==i&&"discriminator"!==i&&"start"!==i&&"end"!==i&&"comment"!==i&&"ticketId"!==i){const e={instancePath:t+"/timeEntries/"+s,schemaPath:"#/properties/timeEntries/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.id){let i=e.id;if("string"!=typeof i){const e={instancePath:t+"/timeEntries/"+s+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}const a=n,o=n;if("global"!==i&&"system"!==i){const e={};null===r?r=[e]:r.push(e),n++}if(o===n){const e={instancePath:t+"/timeEntries/"+s+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===r?r=[e]:r.push(e),n++}else n=a,null!==r&&(a?r.length=a:r=null)}if(void 0!==e.discriminator){let i=e.discriminator;if("string"!=typeof i){const e={instancePath:t+"/timeEntries/"+s+"/discriminator",schemaPath:"#/properties/timeEntries/items/properties/discriminator/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("working"!==i&&"driving"!==i&&"meeting"!==i&&"break"!==i){const e={instancePath:t+"/timeEntries/"+s+"/discriminator",schemaPath:"#/properties/timeEntries/items/properties/discriminator/enum",keyword:"enum",params:{allowedValues:lt.properties.timeEntries.items.properties.discriminator.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.start){let i=e.start;if("string"!=typeof i&&(!i||"object"!=typeof i||Array.isArray(i))){const e={instancePath:t+"/timeEntries/"+s+"/start",schemaPath:"#/properties/timeEntries/items/properties/start/type",keyword:"type",params:{type:lt.properties.timeEntries.items.properties.start.type},message:"must be string,object"};null===r?r=[e]:r.push(e),n++}if("string"==typeof i&&!I.validate(i)){const e={instancePath:t+"/timeEntries/"+s+"/start",schemaPath:"#/properties/timeEntries/items/properties/start/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.end){let i=e.end;if("string"!=typeof i&&(!i||"object"!=typeof i||Array.isArray(i))){const e={instancePath:t+"/timeEntries/"+s+"/end",schemaPath:"#/properties/timeEntries/items/properties/end/type",keyword:"type",params:{type:lt.properties.timeEntries.items.properties.end.type},message:"must be string,object"};null===r?r=[e]:r.push(e),n++}if("string"==typeof i&&!I.validate(i)){const e={instancePath:t+"/timeEntries/"+s+"/end",schemaPath:"#/properties/timeEntries/items/properties/end/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.comment&&"string"!=typeof e.comment){const e={instancePath:t+"/timeEntries/"+s+"/comment",schemaPath:"#/properties/timeEntries/items/properties/comment/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.ticketId&&"string"!=typeof e.ticketId){const e={instancePath:t+"/timeEntries/"+s+"/ticketId",schemaPath:"#/properties/timeEntries/items/properties/ticketId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/timeEntries/"+s,schemaPath:"#/properties/timeEntries/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t+"/timeEntries",schemaPath:"#/properties/timeEntries/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}return validate114.errors=r,0===n},lt={$schema:"http://json-schema.org/draft-07/schema",$id:"timeSheet.json",title:"Time Sheet",type:"object",required:["userId","day"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",default:"timeSheet",enum:["timeSheet"]},userId:{$ref:"definitions.json#/definitions/id"},day:{type:["string","object"],format:"date-time"},locked:{type:"boolean",default:!1,description:"If true, the time sheet is locked and cannot be modified"},timeEntries:{type:"array",default:[],items:{type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},discriminator:{type:"string",enum:["working","driving","meeting","break"]},start:{type:["string","object"],format:"date-time"},end:{type:["string","object"],format:"date-time"},comment:{type:"string"},ticketId:{type:"string"}},required:["start","discriminator"],additionalProperties:!1}}}};var ct=function validate115(e,{instancePath:t="",parentData:s,parentDataProperty:i,rootData:a=e}={}){let r=null,n=0;if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.type&&(e.type="user"),void 0===e.permissions&&(e.permissions=[]),void 0===e.systems&&(e.systems=[]),void 0===e.firstName){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"firstName"},message:"must have required property 'firstName'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.lastName){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"lastName"},message:"must have required property 'lastName'"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.id){let s=e.id;if("string"!=typeof s){const e={instancePath:t+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}const i=n,a=n;if("global"!==s&&"system"!==s){const e={};null===r?r=[e]:r.push(e),n++}if(a===n){const e={instancePath:t+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===r?r=[e]:r.push(e),n++}else n=i,null!==r&&(i?r.length=i:r=null)}if("string"!=typeof e.type){const e={instancePath:t+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.firstName&&"string"!=typeof e.firstName){const e={instancePath:t+"/firstName",schemaPath:"#/properties/firstName/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.lastName&&"string"!=typeof e.lastName){const e={instancePath:t+"/lastName",schemaPath:"#/properties/lastName/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.phone){let s=e.phone;if("string"!=typeof s&&null!==s){const e={instancePath:t+"/phone",schemaPath:"#/properties/phone/type",keyword:"type",params:{type:yt.properties.phone.type},message:"must be string,null"};null===r?r=[e]:r.push(e),n++}if("string"==typeof s&&!et.test(s)){const e={instancePath:t+"/phone",schemaPath:"#/properties/phone/pattern",keyword:"pattern",params:{pattern:"^\\+[0-9]{1,14}$"},message:'must match pattern "^\\+[0-9]{1,14}$"'};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.phoneVerified&&"boolean"!=typeof e.phoneVerified){const e={instancePath:t+"/phoneVerified",schemaPath:"#/properties/phoneVerified/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.email){let s=e.email;if("string"!=typeof s&&null!==s){const e={instancePath:t+"/email",schemaPath:"#/properties/email/type",keyword:"type",params:{type:yt.properties.email.type},message:"must be string,null"};null===r?r=[e]:r.push(e),n++}if("string"==typeof s&&!ot.test(s)){const e={instancePath:t+"/email",schemaPath:"#/properties/email/format",keyword:"format",params:{format:"email"},message:'must match format "email"'};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.emailVerified&&"boolean"!=typeof e.emailVerified){const e={instancePath:t+"/emailVerified",schemaPath:"#/properties/emailVerified/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.address){let s=e.address;if(s&&"object"==typeof s&&!Array.isArray(s)){if(void 0!==s.id&&"string"!=typeof s.id){const e={instancePath:t+"/address/id",schemaPath:"definitions.json#/definitions/address/properties/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==s.line1&&"string"!=typeof s.line1){const e={instancePath:t+"/address/line1",schemaPath:"definitions.json#/definitions/address/properties/line1/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==s.line2&&"string"!=typeof s.line2){const e={instancePath:t+"/address/line2",schemaPath:"definitions.json#/definitions/address/properties/line2/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==s.line3&&"string"!=typeof s.line3){const e={instancePath:t+"/address/line3",schemaPath:"definitions.json#/definitions/address/properties/line3/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==s.city&&"string"!=typeof s.city){const e={instancePath:t+"/address/city",schemaPath:"definitions.json#/definitions/address/properties/city/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==s.state&&"string"!=typeof s.state){const e={instancePath:t+"/address/state",schemaPath:"definitions.json#/definitions/address/properties/state/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==s.postalCode&&"string"!=typeof s.postalCode){const e={instancePath:t+"/address/postalCode",schemaPath:"definitions.json#/definitions/address/properties/postalCode/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==s.countryCode){let e=s.countryCode;if("string"==typeof e){if(P(e)>2){const e={instancePath:t+"/address/countryCode",schemaPath:"definitions.json#/definitions/address/properties/countryCode/maxLength",keyword:"maxLength",params:{limit:2},message:"must NOT have more than 2 characters"};null===r?r=[e]:r.push(e),n++}if(P(e)<2){const e={instancePath:t+"/address/countryCode",schemaPath:"definitions.json#/definitions/address/properties/countryCode/minLength",keyword:"minLength",params:{limit:2},message:"must NOT have fewer than 2 characters"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/address/countryCode",schemaPath:"definitions.json#/definitions/address/properties/countryCode/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t+"/address",schemaPath:"definitions.json#/definitions/address/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.secretKey&&"string"!=typeof e.secretKey){const e={instancePath:t+"/secretKey",schemaPath:"#/properties/secretKey/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.photo&&(validate15(e.photo,{instancePath:t+"/photo",parentData:e,parentDataProperty:"photo",rootData:a})||(r=null===r?validate15.errors:r.concat(validate15.errors),n=r.length)),void 0!==e.jobTitle&&"string"!=typeof e.jobTitle){const e={instancePath:t+"/jobTitle",schemaPath:"#/properties/jobTitle/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.dob&&"string"!=typeof e.dob){const e={instancePath:t+"/dob",schemaPath:"#/properties/dob/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.gender){let s=e.gender;if("string"!=typeof s){const e={instancePath:t+"/gender",schemaPath:"#/properties/gender/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("male"!==s&&"female"!==s){const e={instancePath:t+"/gender",schemaPath:"#/properties/gender/enum",keyword:"enum",params:{allowedValues:yt.properties.gender.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.nationality){let s=e.nationality;if("string"==typeof s){if(P(s)>2){const e={instancePath:t+"/nationality",schemaPath:"#/properties/nationality/maxLength",keyword:"maxLength",params:{limit:2},message:"must NOT have more than 2 characters"};null===r?r=[e]:r.push(e),n++}if(P(s)<2){const e={instancePath:t+"/nationality",schemaPath:"#/properties/nationality/minLength",keyword:"minLength",params:{limit:2},message:"must NOT have fewer than 2 characters"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/nationality",schemaPath:"#/properties/nationality/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}let s=e.permissions;if(Array.isArray(s)){const e=s.length;for(let i=0;i<e;i++){let e=s[i];if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.organizationId){const e={instancePath:t+"/permissions/"+i,schemaPath:"#/properties/permissions/items/required",keyword:"required",params:{missingProperty:"organizationId"},message:"must have required property 'organizationId'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.propertyId){const e={instancePath:t+"/permissions/"+i,schemaPath:"#/properties/permissions/items/required",keyword:"required",params:{missingProperty:"propertyId"},message:"must have required property 'propertyId'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.role){const e={instancePath:t+"/permissions/"+i,schemaPath:"#/properties/permissions/items/required",keyword:"required",params:{missingProperty:"role"},message:"must have required property 'role'"};null===r?r=[e]:r.push(e),n++}for(const s in e)if("organizationId"!==s&&"propertyId"!==s&&"role"!==s&&"department"!==s&&"policyIds"!==s&&"policies"!==s){const e={instancePath:t+"/permissions/"+i,schemaPath:"#/properties/permissions/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:s},message:"must NOT have additional properties"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.organizationId&&"string"!=typeof e.organizationId){const e={instancePath:t+"/permissions/"+i+"/organizationId",schemaPath:"#/properties/permissions/items/properties/organizationId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.propertyId&&"string"!=typeof e.propertyId){const e={instancePath:t+"/permissions/"+i+"/propertyId",schemaPath:"#/properties/permissions/items/properties/propertyId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.role){let s=e.role;if("string"!=typeof s){const e={instancePath:t+"/permissions/"+i+"/role",schemaPath:"#/properties/permissions/items/properties/role/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("Guest"!==s&&"User"!==s&&"Manager"!==s&&"Maintenance"!==s&&"Administrator"!==s&&"SuperAdmin"!==s){const e={instancePath:t+"/permissions/"+i+"/role",schemaPath:"#/properties/permissions/items/properties/role/enum",keyword:"enum",params:{allowedValues:yt.properties.permissions.items.properties.role.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.department&&"string"!=typeof e.department){const e={instancePath:t+"/permissions/"+i+"/department",schemaPath:"#/properties/permissions/items/properties/department/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.policyIds){let s=e.policyIds;if(Array.isArray(s)){const e=s.length;for(let a=0;a<e;a++)if("string"!=typeof s[a]){const e={instancePath:t+"/permissions/"+i+"/policyIds/"+a,schemaPath:"#/properties/permissions/items/properties/policyIds/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/permissions/"+i+"/policyIds",schemaPath:"#/properties/permissions/items/properties/policyIds/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.policies){let s=e.policies;if(Array.isArray(s)){const e=s.length;for(let o=0;o<e;o++)validate58(s[o],{instancePath:t+"/permissions/"+i+"/policies/"+o,parentData:s,parentDataProperty:o,rootData:a})||(r=null===r?validate58.errors:r.concat(validate58.errors),n=r.length)}else{const e={instancePath:t+"/permissions/"+i+"/policies",schemaPath:"#/properties/permissions/items/properties/policies/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t+"/permissions/"+i,schemaPath:"#/properties/permissions/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t+"/permissions",schemaPath:"#/properties/permissions/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.notes){let s=e.notes;if(Array.isArray(s)){const e=s.length;for(let i=0;i<e;i++)if("string"!=typeof s[i]){const e={instancePath:t+"/notes/"+i,schemaPath:"#/properties/notes/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/notes",schemaPath:"#/properties/notes/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.files){let s=e.files;if(Array.isArray(s)){const e=s.length;for(let i=0;i<e;i++)validate15(s[i],{instancePath:t+"/files/"+i,parentData:s,parentDataProperty:i,rootData:a})||(r=null===r?validate15.errors:r.concat(validate15.errors),n=r.length)}else{const e={instancePath:t+"/files",schemaPath:"#/properties/files/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.identifications){let s=e.identifications;if(Array.isArray(s)){const e=s.length;for(let i=0;i<e;i++)validate37(s[i],{instancePath:t+"/identifications/"+i,parentData:s,parentDataProperty:i,rootData:a})||(r=null===r?validate37.errors:r.concat(validate37.errors),n=r.length)}else{const e={instancePath:t+"/identifications",schemaPath:"#/properties/identifications/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.payments){let s=e.payments;if(Array.isArray(s)){const e=s.length;for(let i=0;i<e;i++)validate57(s[i],{instancePath:t+"/payments/"+i,parentData:s,parentDataProperty:i,rootData:a})||(r=null===r?validate57.errors:r.concat(validate57.errors),n=r.length)}else{const e={instancePath:t+"/payments",schemaPath:"#/properties/payments/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.location){let s=e.location;if(s&&"object"==typeof s&&!Array.isArray(s)){if(void 0===s.accuracy){const e={instancePath:t+"/location",schemaPath:"#/properties/location/required",keyword:"required",params:{missingProperty:"accuracy"},message:"must have required property 'accuracy'"};null===r?r=[e]:r.push(e),n++}if(void 0===s.latitude){const e={instancePath:t+"/location",schemaPath:"#/properties/location/required",keyword:"required",params:{missingProperty:"latitude"},message:"must have required property 'latitude'"};null===r?r=[e]:r.push(e),n++}if(void 0===s.longitude){const e={instancePath:t+"/location",schemaPath:"#/properties/location/required",keyword:"required",params:{missingProperty:"longitude"},message:"must have required property 'longitude'"};null===r?r=[e]:r.push(e),n++}if(void 0===s.timestamp){const e={instancePath:t+"/location",schemaPath:"#/properties/location/required",keyword:"required",params:{missingProperty:"timestamp"},message:"must have required property 'timestamp'"};null===r?r=[e]:r.push(e),n++}for(const e in s)if("accuracy"!==e&&"latitude"!==e&&"longitude"!==e&&"timestamp"!==e){const s={instancePath:t+"/location",schemaPath:"#/properties/location/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:e},message:"must NOT have additional properties"};null===r?r=[s]:r.push(s),n++}if(void 0!==s.accuracy){let e=s.accuracy;if("number"!=typeof e&&null!==e){const e={instancePath:t+"/location/accuracy",schemaPath:"#/properties/location/properties/accuracy/type",keyword:"type",params:{type:yt.properties.location.properties.accuracy.type},message:"must be number,null"};null===r?r=[e]:r.push(e),n++}}if(void 0!==s.latitude){let e=s.latitude;if("number"!=typeof e&&null!==e){const e={instancePath:t+"/location/latitude",schemaPath:"#/properties/location/properties/latitude/type",keyword:"type",params:{type:yt.properties.location.properties.latitude.type},message:"must be number,null"};null===r?r=[e]:r.push(e),n++}}if(void 0!==s.longitude){let e=s.longitude;if("number"!=typeof e&&null!==e){const e={instancePath:t+"/location/longitude",schemaPath:"#/properties/location/properties/longitude/type",keyword:"type",params:{type:yt.properties.location.properties.longitude.type},message:"must be number,null"};null===r?r=[e]:r.push(e),n++}}if(void 0!==s.timestamp){let e=s.timestamp;if("number"!=typeof e&&null!==e){const e={instancePath:t+"/location/timestamp",schemaPath:"#/properties/location/properties/timestamp/type",keyword:"type",params:{type:yt.properties.location.properties.timestamp.type},message:"must be number,null"};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t+"/location",schemaPath:"#/properties/location/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.reservations){let s=e.reservations;if(Array.isArray(s)){const e=s.length;for(let i=0;i<e;i++)validate63(s[i],{instancePath:t+"/reservations/"+i,parentData:s,parentDataProperty:i,rootData:a})||(r=null===r?validate63.errors:r.concat(validate63.errors),n=r.length)}else{const e={instancePath:t+"/reservations",schemaPath:"#/properties/reservations/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.spaceName&&"string"!=typeof e.spaceName){const e={instancePath:t+"/spaceName",schemaPath:"#/properties/spaceName/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.revenue&&(validate122(e.revenue,{instancePath:t+"/revenue",parentData:e,parentDataProperty:"revenue",rootData:a})||(r=null===r?validate122.errors:r.concat(validate122.errors),n=r.length)),void 0!==e.createdAt){let s=e.createdAt;if("string"!=typeof s&&(!s||"object"!=typeof s||Array.isArray(s))){const e={instancePath:t+"/createdAt",schemaPath:"definitions.json#/definitions/createdAt/type",keyword:"type",params:{type:ge.type},message:"must be string,object"};null===r?r=[e]:r.push(e),n++}if("string"==typeof s&&!I.validate(s)){const e={instancePath:t+"/createdAt",schemaPath:"definitions.json#/definitions/createdAt/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.updatedAt){let s=e.updatedAt;if("string"!=typeof s&&(!s||"object"!=typeof s||Array.isArray(s))){const e={instancePath:t+"/updatedAt",schemaPath:"definitions.json#/definitions/updatedAt/type",keyword:"type",params:{type:Pe.type},message:"must be string,object"};null===r?r=[e]:r.push(e),n++}if("string"==typeof s&&!I.validate(s)){const e={instancePath:t+"/updatedAt",schemaPath:"definitions.json#/definitions/updatedAt/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===r?r=[e]:r.push(e),n++}}let i=e.systems;if(Array.isArray(i)){const e=i.length;for(let s=0;s<e;s++){let e=i[s];if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.systemId){const e={instancePath:t+"/systems/"+s,schemaPath:"#/properties/systems/items/required",keyword:"required",params:{missingProperty:"systemId"},message:"must have required property 'systemId'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.propertyId){const e={instancePath:t+"/systems/"+s,schemaPath:"#/properties/systems/items/required",keyword:"required",params:{missingProperty:"propertyId"},message:"must have required property 'propertyId'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.driver){const e={instancePath:t+"/systems/"+s,schemaPath:"#/properties/systems/items/required",keyword:"required",params:{missingProperty:"driver"},message:"must have required property 'driver'"};null===r?r=[e]:r.push(e),n++}for(const i in e)if("systemId"!==i&&"propertyId"!==i&&"driver"!==i){const e={instancePath:t+"/systems/"+s,schemaPath:"#/properties/systems/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.systemId&&"string"!=typeof e.systemId){const e={instancePath:t+"/systems/"+s+"/systemId",schemaPath:"#/properties/systems/items/properties/systemId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.propertyId&&"string"!=typeof e.propertyId){const e={instancePath:t+"/systems/"+s+"/propertyId",schemaPath:"#/properties/systems/items/properties/propertyId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.driver&&"string"!=typeof e.driver){const e={instancePath:t+"/systems/"+s+"/driver",schemaPath:"#/properties/systems/items/properties/driver/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/systems/"+s,schemaPath:"#/properties/systems/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t+"/systems",schemaPath:"#/properties/systems/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}return validate115.errors=r,0===n},yt={$schema:"http://json-schema.org/draft-07/schema",$id:"user.json",title:"User",type:"object",required:["firstName","lastName"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",default:"user"},firstName:{type:"string"},lastName:{type:"string"},phone:{type:["string","null"],pattern:"^\\+[0-9]{1,14}$"},phoneVerified:{type:"boolean"},email:{type:["string","null"],format:"email"},emailVerified:{type:"boolean"},address:{$ref:"definitions.json#/definitions/address"},secretKey:{type:"string"},photo:{$ref:"mediaFile.json#"},jobTitle:{type:"string"},dob:{type:"string"},gender:{type:"string",enum:["male","female"]},nationality:{type:"string",minLength:2,maxLength:2},permissions:{type:"array",default:[],items:{type:"object",required:["organizationId","propertyId","role"],properties:{organizationId:{type:"string",description:"The ID of the organization the permission is applies to."},propertyId:{type:"string",description:"The ID of the property the permission is applies to."},role:{type:"string",enum:["Guest","User","Manager","Maintenance","Administrator","SuperAdmin"]},department:{type:"string",description:"The department the user belongs to."},policyIds:{type:"array",items:{type:"string",description:"ID of a policy that is applied to this role."}},policies:{type:"array",items:{description:"A policy object populated from the policyIds array.",$ref:"policy.json"}}},additionalProperties:!1}},notes:{type:"array",items:{type:"string"}},files:{type:"array",items:{$ref:"mediaFile.json#"}},identifications:{type:"array",items:{$ref:"identification.json#"}},payments:{type:"array",items:{$ref:"payment.json#"}},location:{type:"object",required:["accuracy","latitude","longitude","timestamp"],additionalProperties:!1,properties:{accuracy:{type:["number","null"]},latitude:{type:["number","null"]},longitude:{type:["number","null"]},timestamp:{type:["number","null"]}}},reservations:{type:"array",items:{$ref:"reservation.json"}},spaceName:{type:"string"},revenue:{$ref:"definitions.json#/definitions/revenue"},createdAt:{$ref:"definitions.json#/definitions/createdAt"},updatedAt:{$ref:"definitions.json#/definitions/updatedAt"},systems:{type:"array",default:[],items:{type:"object",properties:{systemId:{type:"string"},propertyId:{type:"string"},driver:{type:"string"}},required:["systemId","propertyId","driver"],additionalProperties:!1}}}};function validate122(e,{instancePath:t="",parentData:s,parentDataProperty:i,rootData:a=e}={}){let r=null,n=0;if(Array.isArray(e)){const s=e.length;for(let i=0;i<s;i++){let s=e[i];if(s&&"object"==typeof s&&!Array.isArray(s)){if(void 0!==s.id){let e=s.id;if("string"!=typeof e){const e={instancePath:t+"/"+i+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}const a=n,o=n;if("global"!==e&&"system"!==e){const e={};null===r?r=[e]:r.push(e),n++}if(o===n){const e={instancePath:t+"/"+i+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===r?r=[e]:r.push(e),n++}else n=a,null!==r&&(a?r.length=a:r=null)}if(void 0!==s.name&&"string"!=typeof s.name){const e={instancePath:t+"/"+i+"/name",schemaPath:"#/items/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==s.date){let e=s.date;if("string"==typeof e){if(!I.validate(e)){const e={instancePath:t+"/"+i+"/date",schemaPath:"#/items/properties/date/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/"+i+"/date",schemaPath:"#/items/properties/date/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}if(void 0!==s.price&&"number"!=typeof s.price){const e={instancePath:t+"/"+i+"/price",schemaPath:"#/items/properties/price/type",keyword:"type",params:{type:"number"},message:"must be number"};null===r?r=[e]:r.push(e),n++}if(void 0!==s.tax){let e=s.tax;if("number"!=typeof e&&null!==e){const e={instancePath:t+"/"+i+"/tax",schemaPath:"#/items/properties/tax/type",keyword:"type",params:{type:Te.items.properties.tax.type},message:"must be number,null"};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t+"/"+i,schemaPath:"#/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"array"},message:"must be array"};null===r?r=[e]:r.push(e),n++}return validate122.errors=r,0===n}var ht=function validate124(e,{instancePath:t="",parentData:s,parentDataProperty:i,rootData:a=e}={}){let r=null,n=0;if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.type&&(e.type="vendor"),void 0===e.name){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};null===r?r=[e]:r.push(e),n++}if(void 0===e.email){const e={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"email"},message:"must have required property 'email'"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.id){let s=e.id;if("string"!=typeof s){const e={instancePath:t+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}const i=n,a=n;if("global"!==s&&"system"!==s){const e={};null===r?r=[e]:r.push(e),n++}if(a===n){const e={instancePath:t+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===r?r=[e]:r.push(e),n++}else n=i,null!==r&&(i?r.length=i:r=null)}let s=e.type;if("string"!=typeof s){const e={instancePath:t+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if("vendor"!==s){const e={instancePath:t+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:ft.properties.type.enum},message:"must be equal to one of the allowed values"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.name&&"string"!=typeof e.name){const e={instancePath:t+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==e.phone){let s=e.phone;if("string"!=typeof s&&null!==s){const e={instancePath:t+"/phone",schemaPath:"#/properties/phone/type",keyword:"type",params:{type:ft.properties.phone.type},message:"must be string,null"};null===r?r=[e]:r.push(e),n++}if("string"==typeof s&&!et.test(s)){const e={instancePath:t+"/phone",schemaPath:"#/properties/phone/pattern",keyword:"pattern",params:{pattern:"^\\+[0-9]{1,14}$"},message:'must match pattern "^\\+[0-9]{1,14}$"'};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.email){let s=e.email;if("string"!=typeof s&&null!==s){const e={instancePath:t+"/email",schemaPath:"#/properties/email/type",keyword:"type",params:{type:ft.properties.email.type},message:"must be string,null"};null===r?r=[e]:r.push(e),n++}if("string"==typeof s&&!ot.test(s)){const e={instancePath:t+"/email",schemaPath:"#/properties/email/format",keyword:"format",params:{format:"email"},message:'must match format "email"'};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.address){let s=e.address;if(s&&"object"==typeof s&&!Array.isArray(s)){if(void 0!==s.id&&"string"!=typeof s.id){const e={instancePath:t+"/address/id",schemaPath:"definitions.json#/definitions/address/properties/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==s.line1&&"string"!=typeof s.line1){const e={instancePath:t+"/address/line1",schemaPath:"definitions.json#/definitions/address/properties/line1/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==s.line2&&"string"!=typeof s.line2){const e={instancePath:t+"/address/line2",schemaPath:"definitions.json#/definitions/address/properties/line2/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==s.line3&&"string"!=typeof s.line3){const e={instancePath:t+"/address/line3",schemaPath:"definitions.json#/definitions/address/properties/line3/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==s.city&&"string"!=typeof s.city){const e={instancePath:t+"/address/city",schemaPath:"definitions.json#/definitions/address/properties/city/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==s.state&&"string"!=typeof s.state){const e={instancePath:t+"/address/state",schemaPath:"definitions.json#/definitions/address/properties/state/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==s.postalCode&&"string"!=typeof s.postalCode){const e={instancePath:t+"/address/postalCode",schemaPath:"definitions.json#/definitions/address/properties/postalCode/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}if(void 0!==s.countryCode){let e=s.countryCode;if("string"==typeof e){if(P(e)>2){const e={instancePath:t+"/address/countryCode",schemaPath:"definitions.json#/definitions/address/properties/countryCode/maxLength",keyword:"maxLength",params:{limit:2},message:"must NOT have more than 2 characters"};null===r?r=[e]:r.push(e),n++}if(P(e)<2){const e={instancePath:t+"/address/countryCode",schemaPath:"definitions.json#/definitions/address/properties/countryCode/minLength",keyword:"minLength",params:{limit:2},message:"must NOT have fewer than 2 characters"};null===r?r=[e]:r.push(e),n++}}else{const e={instancePath:t+"/address/countryCode",schemaPath:"definitions.json#/definitions/address/properties/countryCode/type",keyword:"type",params:{type:"string"},message:"must be string"};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t+"/address",schemaPath:"definitions.json#/definitions/address/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.photo&&(validate15(e.photo,{instancePath:t+"/photo",parentData:e,parentDataProperty:"photo",rootData:a})||(r=null===r?validate15.errors:r.concat(validate15.errors),n=r.length)),void 0!==e.createdAt){let s=e.createdAt;if("string"!=typeof s&&(!s||"object"!=typeof s||Array.isArray(s))){const e={instancePath:t+"/createdAt",schemaPath:"definitions.json#/definitions/createdAt/type",keyword:"type",params:{type:ge.type},message:"must be string,object"};null===r?r=[e]:r.push(e),n++}if("string"==typeof s&&!I.validate(s)){const e={instancePath:t+"/createdAt",schemaPath:"definitions.json#/definitions/createdAt/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===r?r=[e]:r.push(e),n++}}if(void 0!==e.updatedAt){let s=e.updatedAt;if("string"!=typeof s&&(!s||"object"!=typeof s||Array.isArray(s))){const e={instancePath:t+"/updatedAt",schemaPath:"definitions.json#/definitions/updatedAt/type",keyword:"type",params:{type:Pe.type},message:"must be string,object"};null===r?r=[e]:r.push(e),n++}if("string"==typeof s&&!I.validate(s)){const e={instancePath:t+"/updatedAt",schemaPath:"definitions.json#/definitions/updatedAt/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===r?r=[e]:r.push(e),n++}}}else{const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===r?r=[e]:r.push(e),n++}return validate124.errors=r,0===n},ft={$schema:"http://json-schema.org/draft-07/schema",$id:"vendor.json",title:"Vendor",type:"object",required:["name","email"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",default:"vendor",enum:["vendor"]},name:{type:"string"},phone:{type:["string","null"],pattern:"^\\+[0-9]{1,14}$"},email:{type:["string","null"],format:"email"},address:{$ref:"definitions.json#/definitions/address"},photo:{$ref:"mediaFile.json#"},createdAt:{$ref:"definitions.json#/definitions/createdAt"},updatedAt:{$ref:"definitions.json#/definitions/updatedAt"}}};var gt=validate81,Pt=class extends l{constructor(e){super(e),this.id=e.id,this.name=e.name,this.offline=e.offline,this.type=e.type,this.systemId=e.systemId,this.supportedNotifications=e.supportedNotifications,this.notification=e.notification,this.driver=e.driver,this.areas=e.areas,this.zones=e.zones,this.chime=e.chime,this.watts=e.watts,this.icon=e.icon,this.modelNumber=e.modelNumber,this.serialNumber=e.serialNumber,this.firmwareVersion=e.firmwareVersion,this.address=e.address}};Object.defineProperty(Pt.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"alarm.json",title:"Alarm",description:"Any smart alarm system",type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},name:{type:"string",description:"Name of the alarm"},offline:{type:"boolean"},type:{type:"string",enum:["alarm"],default:"alarm"},systemId:{$ref:"definitions.json#/definitions/systemId"},supportedNotifications:{$ref:"definitions.json#/definitions/supportedNotifications"},notification:{$ref:"definitions.json#/definitions/notification"},driver:{$ref:"definitions.json#/definitions/driver"},areas:{type:"array",items:{type:"object",properties:{number:{type:"number"},name:{type:"string"},securityMode:{type:["string","null"],enum:["arming","disarming","armed","disarmed","alarm",null]}},additionalProperties:!1}},zones:{type:"array",items:{type:"object",properties:{number:{type:"number",minimum:0},name:{type:"string"},secure:{type:["boolean","null"]},bypassed:{type:["boolean","null"]}},additionalProperties:!1}},chime:{type:"boolean",description:"Reflects whether console chime is enabled"},watts:{$ref:"definitions.json#/definitions/watts"},icon:{type:"string"},modelNumber:{type:"string"},serialNumber:{type:"string"},firmwareVersion:{type:"string"},address:{$ref:"definitions.json#/definitions/address"}},required:["id","type","areas","zones","driver"]}}),Object.defineProperty(Pt.prototype,"validator",{get:function(){return c}});var bt=class extends l{constructor(e){super(e),this.id=e.id,this.type=e.type,this.users=e.users,this.group=e.group,this.body=e.body,this.media=e.media,this.sentBy=e.sentBy,this.tags=e.tags,this.createdAt=e.createdAt,this.updatedAt=e.updatedAt}};Object.defineProperty(bt.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"announcement.json",title:"Announcement",description:"Announcement message sent to users",type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",enum:["announcement"],default:"announcement"},users:{type:"array",items:{type:"string"},minItems:1},group:{type:"string"},body:{type:"string"},media:{$ref:"mediaFile.json"},sentBy:{type:"string"},tags:{type:"array",items:{type:"string"}},createdAt:{$ref:"definitions.json#/definitions/date"},updatedAt:{$ref:"definitions.json#/definitions/date"}},additionalProperties:!1}}),Object.defineProperty(bt.prototype,"validator",{get:function(){return w}});var vt=class extends l{constructor(e){super(e),this.id=e.id,this.name=e.name,this.type=e.type,this.offline=e.offline,this.supportedNotifications=e.supportedNotifications,this.notification=e.notification,this.driver=e.driver,this.liveStreams=e.liveStreams,this.liveStream=e.liveStream,this.systemId=e.systemId,this.watts=e.watts,this.icon=e.icon,this.modelNumber=e.modelNumber,this.serialNumber=e.serialNumber,this.firmwareVersion=e.firmwareVersion}};Object.defineProperty(vt.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"camera.json",title:"Camera",description:"Any smart camera",type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},name:{type:"string"},type:{$ref:"definitions.json#/definitions/type",default:"camera"},offline:{type:"boolean"},supportedNotifications:{$ref:"definitions.json#/definitions/supportedNotifications"},notification:{$ref:"definitions.json#/definitions/notification"},driver:{$ref:"definitions.json#/definitions/driver"},liveStreams:{type:"object",additionalProperties:!1,$comment:"This is now deprecated. Use liveStream instead. This will remain here for backwards compatibility.",properties:{iframe:{type:["string","null"]},hls:{type:["string","null"]},webRTC:{type:["string","null"]},rtsp:{type:["string","null"]}}},liveStream:{type:"object",additionalProperties:!1,properties:{id:{type:"string"},driver:{type:"string",enum:["cloudflare-stream","aws-kinesis","digital-watchdog"]},allowedOrigins:{type:"array",items:{type:"string"}},authRequired:{type:"boolean"},iframe:{type:["string","null"]},hls:{type:["string","null"]},webRTC:{type:["string","null"]},rtsp:{type:["string","null"],description:"Local RTSP stream URL",examples:["rtsp://192.168.1.4:544/channels/1","rtsp://10.145.6.129:8554/unicast"]},previewImage:{type:["string","null"],description:"Source to preview the camera stream",examples:["https://example.com/preview.jpg","data:image/jpegbase64,/9j/4AAQSkZJRgABAQEAYABgAAD/4QBYRXhpZgAATU0AKgAAAAgAA1EQAAEAAAABAQAAAFERAAQAAAABAAABAgABAA"]}}},systemId:{$ref:"definitions.json#/definitions/systemId"},watts:{$ref:"definitions.json#/definitions/watts"},icon:{type:"string"},modelNumber:{type:"string"},serialNumber:{type:"string"},firmwareVersion:{type:"string"}},additionalProperties:!1,required:["id","type","driver"]}}),Object.defineProperty(vt.prototype,"validator",{get:function(){return D}});var wt=class extends l{constructor(e){super(e),this.id=e.id,this.type=e.type,this.name=e.name,this.driver=e.driver,this.description=e.description,this.image=e.image,this.rating=e.rating,this.discriminator=e.discriminator,this.systemId=e.systemId}};Object.defineProperty(wt.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"category.json",title:"Category",type:"object",required:["type","discriminator"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",default:"category"},name:{type:"string",minLength:1},driver:{$ref:"definitions.json#/definitions/driver"},description:{type:"string"},image:{$ref:"mediaFile.json"},rating:{type:"number",minimum:0,maximum:10,default:9},discriminator:{type:"string",enum:["space","product","mediaFile"]},systemId:{$ref:"definitions.json#/definitions/systemId"}}}}),Object.defineProperty(wt.prototype,"validator",{get:function(){return S}});var kt=class extends l{constructor(e){super(e),this.id=e.id,this.name=e.name,this.type=e.type,this.supportedNotifications=e.supportedNotifications,this.notification=e.notification,this.driver=e.driver,this.offline=e.offline,this.supportedStates=e.supportedStates,this.state=e.state,this.systemId=e.systemId,this.watts=e.watts,this.icon=e.icon,this.modelNumber=e.modelNumber,this.serialNumber=e.serialNumber,this.firmwareVersion=e.firmwareVersion}};Object.defineProperty(kt.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"courtesy.json",title:"Courtesy",description:"Any smart courtesy system",type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},name:{type:"string"},type:{$ref:"definitions.json#/definitions/type"},supportedNotifications:{$ref:"definitions.json#/definitions/supportedNotifications"},notification:{$ref:"definitions.json#/definitions/notification"},driver:{$ref:"definitions.json#/definitions/driver"},offline:{type:"boolean"},supportedStates:{type:"array",uniqueItems:!0,items:{enum:["privacy","service","none"]}},state:{type:"string",$ref:"#/properties/supportedStates/items"},systemId:{$ref:"definitions.json#/definitions/systemId"},watts:{$ref:"definitions.json#/definitions/watts"},icon:{type:"string"},modelNumber:{type:"string"},serialNumber:{type:"string"},firmwareVersion:{type:"string"}},required:["id","type","driver","supportedStates","state"]}}),Object.defineProperty(kt.prototype,"validator",{get:function(){return F}});var jt=class extends l{constructor(e){super(e),this.id=e.id,this.type=e.type,this.driver=e.driver,this.discriminator=e.discriminator,this.credential=e.credential,this.userId=e.userId,this.organizationId=e.organizationId,this.propertyId=e.propertyId,this.deviceId=e.deviceId,this.userAgent=e.userAgent,this.expires=e.expires,this.systemId=e.systemId}};Object.defineProperty(jt.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"credential.json",title:"Credential",type:"object",required:["type","credential","expires"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",default:"credential"},driver:{$ref:"definitions.json#/definitions/driver"},discriminator:{type:"string",enum:["verificationCode","token","mobileKey","pin","publicKey","passkeyChallenge"]},credential:{type:"string"},userId:{type:"string"},organizationId:{type:"string"},propertyId:{type:"string"},deviceId:{type:"string"},userAgent:{type:"string"},expires:{type:["string","object","null"]},systemId:{$ref:"definitions.json#/definitions/systemId"}}}}),Object.defineProperty(jt.prototype,"validator",{get:function(){return M}});var At=class extends l{constructor(e){super(e),this.id=e.id,this.type=e.type,this.driver=e.driver,this.organizationId=e.organizationId,this.devices=e.devices}};Object.defineProperty(At.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"deviceRouter.json",title:"Device Router",description:"A device router contains instructions on where to route devices based on their organization and driver.",type:"object",required:["driver","organizationId"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",default:"deviceRouter",enum:["deviceRouter"]},driver:{type:"string"},organizationId:{type:["string","null"],description:"Reference (id) to the organization that owns this router"},devices:{type:"object",additionalProperties:!0}}}}),Object.defineProperty(At.prototype,"validator",{get:function(){return R}});var qt=class extends l{constructor(e){super(e),this.id=e.id,this.name=e.name,this.type=e.type,this.supportedNotifications=e.supportedNotifications,this.notification=e.notification,this.driver=e.driver,this.offline=e.offline,this.level=e.level,this.systemId=e.systemId,this.watts=e.watts,this.icon=e.icon,this.modelNumber=e.modelNumber,this.serialNumber=e.serialNumber,this.firmwareVersion=e.firmwareVersion}};Object.defineProperty(qt.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"dimmer.json",title:"Dimmer",description:"Any smart dimmer",type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},name:{type:"string"},type:{$ref:"definitions.json#/definitions/type"},supportedNotifications:{$ref:"definitions.json#/definitions/supportedNotifications"},notification:{$ref:"definitions.json#/definitions/notification"},driver:{$ref:"definitions.json#/definitions/driver"},offline:{type:"boolean"},level:{type:["number","null"],minimum:0,maximum:100},systemId:{$ref:"definitions.json#/definitions/systemId"},watts:{$ref:"definitions.json#/definitions/watts"},icon:{type:"string"},modelNumber:{type:"string"},serialNumber:{type:"string"},firmwareVersion:{type:"string"}},required:["id","type","level","driver"]}}),Object.defineProperty(qt.prototype,"validator",{get:function(){return B}});var Nt=class extends l{constructor(e){super(e),this.id=e.id,this.name=e.name,this.deviceId=e.deviceId,this.type=e.type,this.discriminator=e.discriminator,this.driver=e.driver,this.deviceData=e.deviceData,this.ignore=e.ignore,this.organizationId=e.organizationId,this.propertyId=e.propertyId}};Object.defineProperty(Nt.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"discoveredDevice.json",title:"Discovered Device",description:"A device that has been discovered by Kohost, but not yet added to the Kohost system.",type:"object",required:["name","deviceId","deviceData"],properties:{id:{$ref:"definitions.json#/definitions/id"},name:{type:"string"},deviceId:{type:"string"},type:{type:"string",enum:["discoveredDevice"],default:"discoveredDevice"},discriminator:{$ref:"definitions.json#/definitions/type"},driver:{type:"string"},deviceData:{type:"object"},ignore:{type:"boolean"},organizationId:{type:["string","null"],description:"Reference (id) to the organization that owns this device"},propertyId:{type:["string","null"],description:"Reference (id) to the property that this device belongs to"}}}}),Object.defineProperty(Nt.prototype,"validator",{get:function(){return E}});var It=class extends l{constructor(e){super(e),this.id=e.id,this.type=e.type,this.to=e.to,this.from=e.from,this.subject=e.subject,this.status=e.status,this.statusMessage=e.statusMessage,this.html=e.html,this.text=e.text,this.driver=e.driver,this.appData=e.appData,this.createdAt=e.createdAt,this.updatedAt=e.updatedAt,this.systemId=e.systemId}};Object.defineProperty(It.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"emailMessage.json",title:"Email Message",type:"object",required:["to","from","status","subject"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",default:"emailMessage",enum:["emailMessage"]},to:{type:"string",pattern:"^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\\.[a-zA-Z0-9-.]+$"},from:{type:"string",pattern:".*<[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\\.[a-zA-Z0-9-.]+>.*",description:"Must be in the format of 'Sender <email@example.com>"},subject:{type:"string"},status:{type:"string",enum:["queued","sending","sent","deferred","delivered","undelivered","bounced","blocked","receiving","received","opened","clicked","unsubscribed","spamReport"]},statusMessage:{type:"string"},html:{type:"string"},text:{type:"string"},driver:{type:"string"},appData:{type:"object"},createdAt:{$ref:"definitions.json#/definitions/date"},updatedAt:{$ref:"definitions.json#/definitions/date"},systemId:{$ref:"definitions.json#/definitions/systemId"}}}}),Object.defineProperty(It.prototype,"validator",{get:function(){return K}});var Dt=class extends l{constructor(e){super(e),this.id=e.id,this.type=e.type,this.reportTime=e.reportTime,this.roomId=e.roomId,this.first=e.first,this.last=e.last,this.consumption=e.consumption,this.totals=e.totals,this.costPerKw=e.costPerKw}};Object.defineProperty(Dt.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"energyReport.json",title:"Energy Report",description:"Hourly Report for Energy based on energy report shards",type:"object",required:["id","type","roomId","first","last","consumption","totals","costPerKw"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",enum:["energyReport"],default:"energyReport"},reportTime:{time:"string",enum:["hourly","daily","monthly"]},roomId:{$ref:"definitions.json#/definitions/id"},first:{type:["string","object"],format:"date-time"},last:{type:["string","object"],format:"date-time"},consumption:{type:"array",items:{type:"object",required:["id","type","kwh"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{$ref:"definitions.json#/definitions/type"},kwh:{type:"number",minimum:0}}}},totals:{type:"array",items:{type:"object",required:["lights","climate","media"],properties:{lights:{type:"number",minimum:0},climate:{type:"number",minimum:0},media:{type:"number",minimum:0}}}},costPerKw:{type:"number",minimum:0}}}}),Object.defineProperty(Dt.prototype,"validator",{get:function(){return Z}});var $t=class extends l{constructor(e){super(e),this.id=e.id,this.type=e.type,this.roomId=e.roomId,this.first=e.first,this.last=e.last,this.data=e.data,this.ndata=e.ndata,this.expires=e.expires}};Object.defineProperty($t.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"energyReportShard.json",title:"Energy Report Shard",description:"Shard used for Energy Reports",type:"object",required:["id","type","roomId","first","last","data","ndata","expires"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",enum:["energyReportShard"],default:"energyReportShard"},roomId:{$ref:"definitions.json#/definitions/id"},first:{type:["string","object"],format:"date-time"},last:{type:["string","object"],format:"date-time"},data:{type:"array",items:{type:"object",required:["time","watts","id","type","value"],properties:{time:{type:["string","object"],format:"date-time"},watts:{$ref:"definitions.json#/definitions/watts"},id:{$ref:"definitions.json#/definitions/id"},type:{$ref:"definitions.json#/definitions/type"},value:{type:"number",minimum:0,maximum:1}}}},ndata:{type:"integer",minimum:0,maximum:1e5,default:0},expires:{type:["string","object"],format:"date-time"}}}}),Object.defineProperty($t.prototype,"validator",{get:function(){return Y}});var Ct=class extends l{constructor(e){super(e),this.id=e.id,this.type=e.type,this.supportedNotifications=e.supportedNotifications,this.notification=e.notification,this.status=e.status,this.systemId=e.systemId,this.driver=e.driver,this.watts=e.watts,this.icon=e.icon,this.modelNumber=e.modelNumber,this.serialNumber=e.serialNumber,this.firmwareVersion=e.firmwareVersion}};Object.defineProperty(Ct.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"iotGateway.json",title:"Gateway",description:"Any smart gateway that is an entrypoint for controlling devices",type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},type:{$ref:"definitions.json#/definitions/type"},supportedNotifications:{$ref:"definitions.json#/definitions/supportedNotifications"},notification:{$ref:"definitions.json#/definitions/notification"},status:{type:"string"},systemId:{$ref:"definitions.json#/definitions/systemId"},driver:{$ref:"definitions.json#/definitions/driver"},watts:{$ref:"definitions.json#/definitions/watts"},icon:{type:"string"},modelNumber:{type:"string"},serialNumber:{type:"string"},firmwareVersion:{type:"string"}},required:["id","type","status","driver"]}}),Object.defineProperty(Ct.prototype,"validator",{get:function(){return Q}});var St=class extends l{constructor(e){super(e),this.id=e.id,this.type=e.type,this.number=e.number,this.maskedNumber=e.maskedNumber,this.encryptedNumber=e.encryptedNumber,this.issued=e.issued,this.expires=e.expires,this.verified=e.verified,this.matched=e.matched,this.firstName=e.firstName,this.lastName=e.lastName,this.issuingCountry=e.issuingCountry,this.systemId=e.systemId}};Object.defineProperty(St.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"identification.json",title:"Identification",type:"object",required:["type"],oneOf:[{required:["number"]},{required:["encryptedNumber"]}],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",enum:["driversLicense","passport","identityCard","visa"]},number:{string:"string"},maskedNumber:{string:"string"},encryptedNumber:{string:"string"},issued:{type:["string","object"],format:"date-time"},expires:{type:["string","object","null"],format:"date-time"},verified:{type:"boolean"},matched:{type:"boolean"},firstName:{type:"string"},lastName:{type:"string"},issuingCountry:{string:"string",minLength:2,maxLength:2},systemId:{$ref:"definitions.json#/definitions/systemId"}}}}),Object.defineProperty(St.prototype,"validator",{get:function(){return J}});var Ot=class extends l{constructor(e){super(e),this.id=e.id,this.type=e.type,this.name=e.name,this.description=e.description,this.department=e.department,this.autoAssign=e.autoAssign,this.systemKey=e.systemKey,this.autoCreateTicket=e.autoCreateTicket,this.excludedResources=e.excludedResources}};Object.defineProperty(Ot.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"issue.json",title:"Issue",description:"An issue associated with ticketing and concierge.",type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",enum:["issue"],default:"issue"},name:{type:"string"},description:{type:"string"},department:{type:"string"},autoAssign:{type:"object",properties:{userId:{type:"string"},vendorId:{type:"string"},priority:{$ref:"ticket.json#/properties/priority"},tags:{type:"array",items:{type:"string"}}}},systemKey:{type:"string"},autoCreateTicket:{type:"boolean",default:!0},excludedResources:{type:"array",description:"A list of resources that should not trigger notifications of this issue",items:{type:"string"},default:[]}},required:["id","type","name","department"]}}),Object.defineProperty(Ot.prototype,"validator",{get:function(){return te}});var Ft=class extends l{constructor(e){super(e),this.id=e.id,this.name=e.name,this.type=e.type,this.offline=e.offline,this.supportedNotifications=e.supportedNotifications,this.notification=e.notification,this.driver=e.driver,this.state=e.state,this.mode=e.mode,this.supportedModes=e.supportedModes,this.batteryLevel=e.batteryLevel,this.systemId=e.systemId,this.watts=e.watts,this.icon=e.icon,this.modelNumber=e.modelNumber,this.serialNumber=e.serialNumber,this.firmwareVersion=e.firmwareVersion}};Object.defineProperty(Ft.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"lock.json",title:"Lock",description:"Any smart lock",type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},name:{type:"string"},type:{$ref:"definitions.json#/definitions/type"},offline:{type:"boolean"},supportedNotifications:{$ref:"definitions.json#/definitions/supportedNotifications"},notification:{$ref:"definitions.json#/definitions/notification"},driver:{$ref:"definitions.json#/definitions/driver"},state:{type:["string","null"],enum:["locked","unlocked",null]},mode:{type:["string","null"],enum:["normal","autoLock","emergencyOpen","emergencyClose","holdOpen","lockdown",null],description:"emergencyOpen and emergencyClose are deprecated and can be removed once Salto, Paxton and Geovision drivers are updated",default:null},supportedModes:{type:"array",uniqueItems:!0,items:{enum:["normal","autoLock","emergencyOpen","emergencyClose","holdOpen","lockdown",null]}},batteryLevel:{$ref:"definitions.json#/definitions/batteryLevel"},systemId:{$ref:"definitions.json#/definitions/systemId"},watts:{$ref:"definitions.json#/definitions/watts"},icon:{type:"string"},modelNumber:{type:"string"},serialNumber:{type:"string"},firmwareVersion:{type:"string"}},required:["id","type","state","driver"]}}),Object.defineProperty(Ft.prototype,"validator",{get:function(){return ae}});var Tt=class extends l{constructor(e){super(e),this.type=e.type,this.timestamp=e.timestamp,this.name=e.name,this.field1=e.field1,this.field2=e.field2,this.field3=e.field3,this.field4=e.field4,this.field5=e.field5,this.field6=e.field6}};Object.defineProperty(Tt.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"log.json",title:"Log",type:"object",properties:{type:{type:"string",default:"log",enum:["log"]},timestamp:{type:"number",minimum:1655907956593},name:{type:"string",description:"Event name"},field1:{type:"object",required:["name","value"],properties:{name:{type:"string"},value:{type:"string"}}},field2:{type:"object",required:["name","value"],properties:{name:{type:"string"},value:{type:"string"}}},field3:{type:"object",required:["name","value"],properties:{name:{type:"string"},value:{type:"string"}}},field4:{type:"object",required:["name","value"],properties:{name:{type:"string"},value:{type:"string"}}},field5:{type:"object",required:["name","value"],properties:{name:{type:"string"},value:{type:"string"}}},field6:{type:"object",required:["name","value"],properties:{name:{type:"string"},value:{type:"string"}}}}}}),Object.defineProperty(Tt.prototype,"validator",{get:function(){return ne}});var xt=class extends l{constructor(e){super(e),this.id=e.id,this.type=e.type,this.name=e.name,this.fileHash=e.fileHash,this.category=e.category,this.mimeType=e.mimeType,this.data=e.data,this.url=e.url,this.width=e.width,this.height=e.height,this.size=e.size,this.uploadUrl=e.uploadUrl,this.uploadUrlExpires=e.uploadUrlExpires,this.createdBy=e.createdBy,this.systemId=e.systemId}createImageVariant(e){if("image/*"!=this.mimeType)throw new Error("Only dynamic images can have variants");if(!this.url)throw new Error("MediaFile has no url");const t=Object.keys(e).map((t=>`${t}=${e[t]}`)).join(",");return this.url.replace(/\/public$/,`/${t}`)}};Object.defineProperty(xt.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"mediaFile.json",title:"Media File",description:"Any media file",type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",default:"mediaFile",enum:["mediaFile"]},name:{type:"string"},fileHash:{type:"string"},category:{type:"string",description:"This is the category id"},mimeType:{type:"string",enum:["image/*","image/jpeg","image/png","image/gif","image/webp","image/avif","image/svg+xml","application/pdf"]},data:{type:"string"},url:{type:"string",format:"uri"},width:{type:"integer",minimum:0},height:{type:"integer",minimum:0},size:{type:"integer",minimum:0,description:"Size in bytes"},uploadUrl:{type:"string",format:"uri"},uploadUrlExpires:{$ref:"definitions.json#/definitions/date"},createdBy:{type:"string"},systemId:{$ref:"definitions.json#/definitions/systemId"}},additionalProperties:!1,required:["type"]}}),Object.defineProperty(xt.prototype,"validator",{get:function(){return pe}});var Mt=class extends l{constructor(e){super(e),this.id=e.id,this.type=e.type,this.discriminator=e.discriminator,this.playlists=e.playlists,this.remote=e.remote,this.name=e.name,this.driver=e.driver,this.offline=e.offline,this.audio=e.audio,this.video=e.video,this.powerFeedback=e.powerFeedback,this.volumeFeedback=e.volumeFeedback,this.muted=e.muted,this.volume=e.volume,this.brightness=e.brightness,this.contrast=e.contrast,this.power=e.power,this.input=e.input,this.supportedInputs=e.supportedInputs,this.supportedOutputs=e.supportedOutputs,this.command=e.command,this.supportedNotifications=e.supportedNotifications,this.notification=e.notification,this.systemId=e.systemId,this.watts=e.watts,this.icon=e.icon,this.modelNumber=e.modelNumber,this.serialNumber=e.serialNumber,this.firmwareVersion=e.firmwareVersion}};Object.defineProperty(Mt.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"mediaSource.json",title:"Media Source",description:"Any media source",type:"object",required:["id","type","discriminator","audio","video","driver"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",default:"mediaSource",enum:["mediaSource"]},discriminator:{type:"string",enum:["tv","dvr","appleTv","discPlayer","mediaPlayer","paSystem","uncontrolledDevice"]},playlists:{type:"array",items:{type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},name:{$ref:"definitions.json#/definitions/name"}}}},remote:{type:"string",enum:["MR22GA","XRT260","XRT270","HOF-16K 1.2","219863500","SONIFI","AKB76039803","BN59-01388A"]},name:{$ref:"definitions.json#/definitions/name"},driver:{$ref:"definitions.json#/definitions/driver"},offline:{type:"boolean"},audio:{type:"boolean"},video:{type:"boolean"},powerFeedback:{type:"boolean"},volumeFeedback:{type:"boolean"},muted:{type:"boolean"},volume:{type:"number",minimum:0,maximum:100},brightness:{type:"number",minimum:0,maximum:100},contrast:{type:"number",minimum:0,maximum:100},power:{type:"string",enum:["on","off"]},input:{type:"string"},supportedInputs:{type:"array",items:{type:"string"}},supportedOutputs:{type:"array",items:{type:"string"}},command:{type:["string","null"],enum:["mute","volumeUp","volumeDown","brightnessUp","brightnessDown","channelUp","channelDown","number0","number1","number2","number3","number4","number5","number6","number7","number8","number9","lastChannel","display","favoriteChannel","play","playing","stop","stopped","pause","paused","fastForward","fastForwarding","rewind","rewinding","instantReplay","record","ac3","pvrMenu","guide","menu","menuUp","menuDown","menuLeft","menuRight","pageUp","pageDown","select","exit","input","power","enterChannel","enterVolume","enterBrightness","enterContrast","number10","number11","number12","number13","number14","number15","number16","number10Plus","number20Plus","number100","dash","threeChan","threeD","sixChan","a","add","alarm","am","analog","angle","antenna","antennaEast","antennaWest","aspect","audio1","audio2","audio3","audioDumming","audioLevelDown","audioLevelUp","b","back","c","component1","component2","component3","d","home","list","liveTv","discreteInputCable","powerOff","powerOn","setupMenu","skipForward","skipReverse","video1","video2","video3","video4","video5","details","hdmi1","hdmi2","hdmi3","cecDeviceList","mtsSap","red","green","yellow","blue","alert","order"]},supportedNotifications:{$ref:"definitions.json#/definitions/supportedNotifications"},notification:{$ref:"definitions.json#/definitions/notification"},systemId:{$ref:"definitions.json#/definitions/systemId"},watts:{$ref:"definitions.json#/definitions/watts"},icon:{type:"string"},modelNumber:{type:"string"},serialNumber:{type:"string"},firmwareVersion:{type:"string"}},additionalProperties:!1}}),Object.defineProperty(Mt.prototype,"validator",{get:function(){return me}});var zt=class extends l{constructor(e){super(e),this.id=e.id,this.type=e.type,this.driver=e.driver,this.systemId=e.systemId,this.supportedNotifications=e.supportedNotifications,this.notification=e.notification,this.watts=e.watts,this.icon=e.icon,this.modelNumber=e.modelNumber,this.serialNumber=e.serialNumber,this.firmwareVersion=e.firmwareVersion}};Object.defineProperty(zt.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"motionSensor.json",title:"Motion Sensor",description:"Any smart motion sensor",type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},type:{$ref:"definitions.json#/definitions/type"},driver:{$ref:"definitions.json#/definitions/driver"},systemId:{$ref:"definitions.json#/definitions/systemId"},supportedNotifications:{$ref:"definitions.json#/definitions/supportedNotifications"},notification:{$ref:"definitions.json#/definitions/notification"},watts:{$ref:"definitions.json#/definitions/watts"},icon:{type:"string"},modelNumber:{type:"string"},serialNumber:{type:"string"},firmwareVersion:{type:"string"}},additionalProperties:!1,required:["id","type","driver"]}}),Object.defineProperty(zt.prototype,"validator",{get:function(){return ue}});var Rt=class extends l{constructor(e){super(e),this.id=e.id,this.type=e.type,this.orderNumber=e.orderNumber,this.status=e.status,this.userId=e.userId,this.reservationId=e.reservationId,this.date=e.date,this.items=e.items,this.taxes=e.taxes,this.fees=e.fees,this.delivery=e.delivery,this.payments=e.payments}getSubTotal(){return this.items.reduce(((e,t)=>{const s=t.quantity||1;return e+t.price*s}),0)}getTaxTotal(){const e=this.taxes;return e?this.items.reduce(((t,s)=>{if(!s.taxClass)return t;const i=e.find((e=>e.class===s.taxClass));if(!i)return t;const{rateType:a,rate:r}=i;return"percentage"===a?t+s.price*r:t+r}),0):0}getDeliveryTotal(){const e=this.delivery;return e?this.items.reduce(((t,s)=>{if(!s.deliveryClass)return t;const i=e.find((e=>e.class===s.deliveryClass));if(!i)return t;const{rateType:a,rate:r}=i;return"percentage"===a?t+s.price*r:t+r}),0):0}getFeesTotal(){return this.fees.reduce(((e,t)=>e+t.price),0)}getTotal(){return this.getSubTotal()+this.getTaxTotal()+this.getDeliveryTotal()+this.getFeesTotal()}getPaymentsTotal(){return this.payments.reduce(((e,t)=>e+t.amount),0)}getBalance(){return this.getTotal()-this.getPaymentsTotal()}};Object.defineProperty(Rt.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"order.json",title:"Order",description:"A purchase order for products or services.",type:"object",required:["type","status"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",default:"order",enum:["order"]},orderNumber:{type:"string"},status:{type:"string",enum:["draft","pendingPayment","processing","outForDelivery","completed","paymentFailed","cancelled","refunded"]},userId:{$ref:"definitions.json#/definitions/id",description:"User id of purchaser"},reservationId:{$ref:"definitions.json#/definitions/id",description:"Reservation id if the order is for a reservation"},date:{$ref:"definitions.json#/definitions/date"},items:{type:"array",default:[],items:{type:"object",required:["name","price"],properties:{additionalProperties:!1,name:{type:"string"},sku:{type:"string"},quantity:{type:"number",default:1},price:{type:"number"},taxClass:{type:"string"},deliveryClass:{type:"string"},productId:{type:"string"}}}},taxes:{type:"array",default:[],items:{type:"object",required:["name","rate"],properties:{additionalProperties:!1,name:{type:"string"},class:{type:"string"},rateType:{type:"string",enum:["percentage","flat"],default:"percentage"},rate:{type:"number"},total:{type:"number"}}}},fees:{type:"array",default:[],items:{type:"object",required:["name","price"],properties:{additionalProperties:!1,name:{type:"string"},price:{type:"number"}}}},delivery:{type:"array",default:[],items:{type:"object",required:["name","rate"],properties:{additionalProperties:!1,name:{type:"string"},class:{type:"string"},rateType:{type:"string",enum:["percentage","flat"],default:"percentage"},rate:{type:"number"},total:{type:"number"}}}},payments:{type:"array",default:[],items:{type:"object",properties:{method:{type:"string",enum:["folio","invoice","amex","visa","masterCard","maestro","discover","diners","jcb","applePay","alipay","chinaUnionPay","vpay"]},name:{type:"string"},date:{$ref:"definitions.json#/definitions/date"},amount:{type:"number"},transactionReference:{type:"string"}}}}}}}),Object.defineProperty(Rt.prototype,"validator",{get:function(){return ce}});var Vt=class extends l{constructor(e){super(e),this.id=e.id,this.type=e.type,this.accountNumber=e.accountNumber,this.name=e.name,this.properties=e.properties,this.hostname=e.hostname,this.appManifest=e.appManifest,this.tickets=e.tickets,this.credentials=e.credentials,this.createdAt=e.createdAt,this.updatedAt=e.updatedAt}};Object.defineProperty(Vt.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"organization.json",title:"Organization",type:"object",description:"An organization is a group or entity that subscribes to Kohost software.",required:["accountNumber","name"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",default:"organization",enum:["organization"]},accountNumber:{type:["number","null"],minimum:1e4},name:{type:"string"},properties:{type:"array",items:{type:"string"}},hostname:{type:["string","null"]},appManifest:{type:"object",properties:{name:{type:"string"},short_name:{type:"string"},scope:{type:"string"},start_url:{type:"string"},themeColor:{type:"string"},backgroundColor:{type:"string"},display:{type:"string",enum:["fullscreen","standalone","minimal-ui","browser"],default:"fullscreen"},orientation:{type:"string",enum:["portrait","landscape"],default:"portrait"},splash:{type:"object",properties:{src:{type:"string"},type:{type:"string"},sizes:{type:"string"}}},icons:{type:"array",items:{type:"object",properties:{src:{type:"string"},sizes:{type:"string"},type:{type:"string"}}}},logo:{type:"object",properties:{src:{type:"string"},type:{type:"string"},sizes:{type:"string"}}}},default:{name:"Kohost",short_name:"Kohost",start_url:"/",scope:"/",display:"fullscreen",orientation:"portrait",theme_color:"#1d1f22",background_color:"#1d1f22",icons:[{src:"https://images.kohost.io/cdn-cgi/imagedelivery/vcVX2aBwdFSYr66spcFKaA/9c85047f-ccba-4b1c-3070-5463fbe93b00/w=512",sizes:"512x512",type:"image/png"}],splash:{src:"https://images.kohost.io/cdn-cgi/imagedelivery/vcVX2aBwdFSYr66spcFKaA/034fb112-5326-4d37-373e-d1cc2a4d0400/w=1500",sizes:"1500x800",type:"image/jpg"},logo:{src:"https://images.kohost.io/cdn-cgi/imagedelivery/vcVX2aBwdFSYr66spcFKaA/1e54c54d-3bac-4745-f46f-c2f98036af00/h=75",sizes:"300x75",type:"image/png"}}},tickets:{type:"object",properties:{nextTicketNumber:{type:["string","integer"],default:1}}},credentials:{type:"object",additionalProperties:!0},createdAt:{$ref:"definitions.json#/definitions/createdAt"},updatedAt:{$ref:"definitions.json#/definitions/updatedAt"}}}}),Object.defineProperty(Vt.prototype,"validator",{get:function(){return he}});var Bt=class extends l{constructor(e){super(e),this.id=e.id,this.type=e.type,this.enabled=e.enabled,this.storageData=e.storageData,this.maskedNumber=e.maskedNumber,this.issued=e.issued,this.expires=e.expires,this.systemId=e.systemId}};Object.defineProperty(Bt.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"payment.json",title:"Payment",type:"object",required:["type","maskedNumber","expires"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",enum:["amex","visa","masterCard","maestro","discover","diners","jcb","applePay","alipay","chinaUnionPay","vpay"]},enabled:{type:"boolean",default:!0},storageData:{type:["string","null"]},maskedNumber:{string:"string"},issued:{type:["string","null"]},expires:{string:"string"},systemId:{$ref:"definitions.json#/definitions/systemId"}}}}),Object.defineProperty(Bt.prototype,"validator",{get:function(){return be}});var Lt=class extends l{constructor(e){super(e),this.id=e.id,this.type=e.type,this.discriminator=e.discriminator,this.name=e.name,this.description=e.description,this.organizationId=e.organizationId,this.propertyId=e.propertyId,this.permissions=e.permissions}};Object.defineProperty(Lt.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"policy.json",title:"Policy",description:"A policy is a set of permissions that can be applied to a user to limit their access to resources.",type:"object",required:["name","type","organizationId","propertyId","permissions","discriminator"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",default:"policy",enum:["policy"]},discriminator:{type:"string",enum:["user"]},name:{type:"string",minLength:1},description:{type:"string"},organizationId:{type:"string"},propertyId:{type:"string"},permissions:{type:"array",items:{type:"object",required:["entities","effect"],properties:{entities:{type:"array",items:{type:"string",pattern:"^[^:]+(:.+)+$"}},effect:{type:"string",enum:["Allow","Deny"]}}}}}}}),Object.defineProperty(Lt.prototype,"validator",{get:function(){return we}});var Et=class extends l{constructor(e){super(e),this.id=e.id,this.type=e.type,this.name=e.name,this.driver=e.driver,this.description=e.description,this.price=e.price,this.tax=e.tax,this.image=e.image,this.category=e.category,this.imageUrl=e.imageUrl,this.systemId=e.systemId}};Object.defineProperty(Et.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"product.json",title:"Product",type:"object",required:["name","price","driver"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",default:"product",enum:["product"]},name:{type:"string"},driver:{$ref:"definitions.json#/definitions/driver"},description:{string:"string"},price:{type:"number"},tax:{type:["number","null"]},image:{$ref:"mediaFile.json"},category:{type:"string"},imageUrl:{format:"uri",pattern:"^https?://"},systemId:{$ref:"definitions.json#/definitions/systemId"}}}}),Object.defineProperty(Et.prototype,"validator",{get:function(){return Ae}});var Ut=class extends l{constructor(e){super(e),this.id=e.id,this.name=e.name,this.type=e.type,this.discriminator=e.discriminator,this.organization=e.organization,this.departments=e.departments,this.testModeEnabled=e.testModeEnabled,this.testMode=e.testMode,this.timezone=e.timezone,this.smsNumber=e.smsNumber,this.checkInTime=e.checkInTime,this.checkOutTime=e.checkOutTime,this.address=e.address,this.latitude=e.latitude,this.longitude=e.longitude,this.appFeatures=e.appFeatures,this.notifications=e.notifications,this.credentials=e.credentials}};Object.defineProperty(Ut.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"property.json",title:"Property",type:"object",description:"A property is a physical asset or building",required:["id","name","type","organization","timezone","discriminator"],properties:{id:{$ref:"definitions.json#/definitions/id"},name:{type:"string"},type:{type:"string",default:"property",enum:["property"]},discriminator:{type:"string",enum:["hospitality","education","commercial","storage"]},organization:{type:["string","null"],description:"Reference (id) to the organization that owns this property"},departments:{type:"array",items:{type:"string"}},testModeEnabled:{type:"boolean"},testMode:{type:"object",properties:{notificationEmails:{type:"array",items:{type:"string"},description:"Only users with these email addresses will receive notifications in test mode, including sms, email, or push."},notificationEmailDomains:{type:"array",items:{type:"string"},description:"Only users with email addreses ending in these domains will receive notifications in test mode, including sms, email, or push."}}},timezone:{type:"string",description:"IANA timezone string",pattern:"^([a-zA-Z]+/[a-zA-Z_]+)$",examples:["America/New_York","America/Los_Angeles"]},smsNumber:{type:"string"},checkInTime:{type:"string"},checkOutTime:{type:"string"},address:{$ref:"definitions.json#/definitions/address"},latitude:{type:"number"},longitude:{type:"number"},appFeatures:{type:"object",properties:{RoomControl:{type:"object",properties:{disabledSystems:{type:"array",items:{type:"string",enum:["climate","lights","shades","tv","doors"]}},commonAreas:{type:"object",properties:{spaces:{type:"array",items:{type:"string"}}}},alarmConfig:{type:"object",patternProperties:{"^[a-zA-Z0-9]+$":{type:"object",properties:{zoneLockMap:{type:"object",description:"Maps zone numbers to lock ids",additionalProperties:{type:"string"}}}}},examples:[{wZz7hucY:{zoneLockMap:{1:"wc87hucc",2:"bc86hzxc",3:"zv5ah5jv"}}}]}},additionalProperties:!1},CheckIn:{properties:{payment:{},identification:{},earlyCheckIn:{type:"object",required:["dynamic"],properties:{dynamic:{type:"boolean",default:!1},minimumPrice:{type:"number",default:10},maximumPrice:{type:"number",default:50},priceRatioPerHour:{type:"number",default:.1},minimumTime:{type:"string"}}},roomUpgrades:{},pet:{},promos:{}}},CheckOut:{properties:{lateCheckOut:{type:"object",required:["dynamic"],properties:{dynamic:{type:"boolean",default:!1},minimumPrice:{type:"number",default:10},maximumPrice:{type:"number",default:50},priceRatioPerHour:{type:"number",default:.1}}}}},Concierge:{type:"object",properties:{timeTracking:{type:"boolean",default:!1},tipping:{type:"boolean",default:!1},ratings:{type:"boolean",default:!0},newTicketCCs:{type:"array",items:{type:"string"},default:[]},newMessageChannel:{type:["string","null"],enum:["sms","email"],default:"sms",description:"Determines how users should be notified of new messages in the concierge system"},quickServices:{type:"array",items:{type:"object",properties:{name:{type:"string"},description:{type:"string"},department:{type:"string"},image:{$ref:"mediaFile.json"}},required:["name","description","image"]}},issues:{type:"object",properties:{syncWithPropertyId:{type:"string"}}}}},DigitalKey:{type:"object",properties:{system:{type:"string",enum:["salto","dormakaba"]},systemOnline:{type:"boolean",default:!1},systemConfig:{type:"object",properties:{legicUrl:{type:"string",format:"uri"},legicWalletName:{type:"string"},legicAppId:{type:"number"},legicTechUsername:{type:"string"},legicTechPassword:{type:"string"}},additionalProperties:!1,default:{}},enableApp:{type:"boolean"},branding:{type:"object",properties:{logo:{type:"string",format:"uri"},gradient:{type:"array",items:{type:"string",pattern:"^(?!#ffffff)(#[0-9a-fA-F]{6})$"},minItems:2,maxItems:2},highlightedGradient:{type:"array",items:{type:"string",pattern:"^(?!#ffffff)(#[0-9a-fA-F]{6})$"},minItems:2,maxItems:3}}}}},SOS:{type:"object",properties:{active:{type:"boolean"},activeEmergencies:{type:"array",items:{type:"string",enum:["medical","fire","suspiciousPerson","other","conflict","shooter"]}}}},Elevator:{},Experiences:{},Dining:{type:"object",properties:{system:{type:"string",enum:["gotab"]},systemConfig:{type:"object",properties:{landingUrl:{type:"string",format:"uri"},includeUserDetails:{type:"boolean"}},additionalProperties:!1}}},Rentals:{},Shop:{},Spa:{},Valet:{}},additionalProperties:!1,default:{RoomControl:{}}},notifications:{type:"object",properties:{email:{type:"object",properties:{enabled:{type:"boolean"}},additionalProperties:!1},sms:{type:"object",properties:{enabled:{type:"boolean"}},additionalProperties:!1},push:{type:"object",properties:{enabled:{type:"boolean"}},additionalProperties:!1}},additionalProperties:!1,default:{email:{enabled:!1},sms:{enabled:!1},push:{enabled:!1}}},credentials:{type:"object",additionalProperties:!0}}}}),Object.defineProperty(Ut.prototype,"validator",{get:function(){return Ie}});var Kt=class extends l{constructor(e){super(e),this.id=e.id,this.driver=e.driver,this.primaryGuest=e.primaryGuest,this.type=e.type,this.sharedGuests=e.sharedGuests,this.spaceCategory=e.spaceCategory,this.space=e.space,this.previousSpace=e.previousSpace,this.status=e.status,this.mobileCheckInSpaceCategoryChanged=e.mobileCheckInSpaceCategoryChanged,this.mobileCheckInSpaceChanged=e.mobileCheckInSpaceChanged,this.mobileCheckInStatus=e.mobileCheckInStatus,this.mobileCheckInStatusMessage=e.mobileCheckInStatusMessage,this.confirmationNumber=e.confirmationNumber,this.expectedCheckInDateTime=e.expectedCheckInDateTime,this.checkInDateTime=e.checkInDateTime,this.checkOutDateTime=e.checkOutDateTime,this.adultCount=e.adultCount,this.childCount=e.childCount,this.spaceCategoryAvailabilites=e.spaceCategoryAvailabilites,this.revenue=e.revenue,this.rateSuppressed=e.rateSuppressed,this.payment=e.payment,this.company=e.company,this.travelAgent=e.travelAgent,this.systemId=e.systemId,this.metadata=e.metadata,this.updatedAt=e.updatedAt}checkInTime(e){return new Date(this.checkInDateTime).toLocaleString("default",{hour:"numeric",minute:"numeric",timeZone:e})}checkOutTime(e){return new Date(this.checkOutDateTime).toLocaleString("default",{hour:"numeric",minute:"numeric",timeZone:e})}getNights(){const e=new Date(this.checkInDateTime),t=new Date(this.checkOutDateTime);let s=Math.round((t-e)/864e5);return s<=0&&(s=1),s}};Object.defineProperty(Kt.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"reservation.json",title:"Reservation",type:"object",required:["type","status","checkInDateTime","checkOutDateTime"],properties:{id:{$ref:"definitions.json#/definitions/id"},driver:{$ref:"definitions.json#/definitions/driver"},primaryGuest:{type:"string"},type:{type:"string",default:"reservation",enum:["reservation"]},sharedGuests:{type:"array",items:{type:"string"}},spaceCategory:{type:"string"},space:{type:["string","null"]},previousSpace:{type:["string","null"],default:null,description:"Used when there was a space assigned and it changes"},status:{type:"string",enum:["reserved","checkedIn","checkedOut","cancelled","noShow","enquired","requested","optional"],description:" reserved - confirmed by both parties, before check-in\n checkedIn - checked in\n checkedOut - checked out\n cancelled - Cancelled\n noShow - No show\n enquired - Confirmed neither by the customer nor enterprise\n requested - Confirmed by the customer but not the enterprise (waitlist)\n optional - Confirmed by the enterprise but not the customer (holding)"},mobileCheckInSpaceCategoryChanged:{type:"boolean",description:"spaceCategory has changed from original."},mobileCheckInSpaceChanged:{type:"boolean"},mobileCheckInStatus:{type:"string",enum:["ready","blocked","preArrivalStepsRequired","spaceNotAssigned","spaceNotReady","checkInTimeNotStarted"]},mobileCheckInStatusMessage:{type:"string"},confirmationNumber:{type:"string"},expectedCheckInDateTime:{type:["string","object"],format:"date-time",description:"Expected arrival time of guest."},checkInDateTime:{type:["string","object"],format:"date-time"},checkOutDateTime:{type:["string","object"],format:"date-time"},adultCount:{type:"number",default:1,minimum:1},childCount:{type:"number",default:0},spaceCategoryAvailabilites:{type:"array",items:{type:"object",properties:{id:{type:"string"},price:{type:"number"},unit:{type:"string",enum:["night","stay","hour"]},isUpgrade:{type:"boolean"}}}},revenue:{$ref:"definitions.json#/definitions/revenue"},rateSuppressed:{type:"boolean"},payment:{type:"string"},company:{type:"string"},travelAgent:{type:"string"},systemId:{$ref:"definitions.json#/definitions/systemId"},metadata:{ref:"definitions.json#/definitions/metadata"},updatedAt:{$ref:"definitions.json#/definitions/updatedAt"}}}}),Object.defineProperty(Kt.prototype,"validator",{get:function(){return Oe}});var Ht=class extends l{constructor(e){super(e),this.id=e.id,this.type=e.type,this.name=e.name,this.floor=e.floor,this.dimmers=e.dimmers,this.switches=e.switches,this.thermostats=e.thermostats,this.locks=e.locks,this.windowCoverings=e.windowCoverings,this.courtesy=e.courtesy,this.cameras=e.cameras,this.mediaSources=e.mediaSources,this.motionSensors=e.motionSensors,this.alarms=e.alarms,this.occupiedAt=e.occupiedAt,this.createdAt=e.createdAt,this.updatedAt=e.updatedAt}static getDevicePath(e){switch(e){case"tv":case"dvr":case"appleTv":case"discPlayer":case"mediaPlayer":case"uncontrolledDevice":case"mediaSource":return"mediaSources";case"courtesy":return"courtesy";case"switch":return"switches";case"dimmer":return"dimmers";case"thermostat":return"thermostats";case"lock":return"locks";case"windowCovering":return"windowCoverings";case"camera":return"cameras";case"motionSensor":return"motionSensors";case"alarm":return"alarms";default:throw new Error("Invalid device type:"+e)}}static getDeviceTypeFromPath(e){if(!["dimmers","switches","thermostats","locks","windowCoverings","courtesy","cameras","mediaSources","motionSensors","alarms"].includes(e))throw new Error("Invalid device path:"+e);switch(e){case"courtesy":return e;case"switches":return"switch";default:return e.slice(0,-1)}}get hasDimmer(){return this.dimmers?.length>0}get hasSwitch(){return this.switches?.length>0}get hasWindowCovering(){return this.windowCoverings?.length>0}get hasShade(){return this.hasWindowCovering}get hasThermostat(){return this.thermostats?.length>0}get hasClimate(){return this.hasThermostat}get hasLock(){return this.locks?.length>0}get hasCourtesy(){return this.courtesy?.length>0}get hasCamera(){return this.cameras?.length>0}get hasMedia(){return this.mediaSources?.length>0}get hasLight(){const e=this.switches?.some((e=>"light"===e.discriminator||"fan"===e.discriminator));return this.hasDimmer||e}get hasAlarm(){return this.alarms?.length>0}get occupied(){const e=new Date,t=new Date(this.occupiedAt);return e.getTime()-t.getTime()<36e5}};Object.defineProperty(Ht.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"room.json",title:"Room",description:"A room represents a physical space of controllable IoT devices",type:"object",required:["id","name"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",enum:["room"],default:"room"},name:{type:"string"},floor:{type:"string"},dimmers:{type:"array",default:[],items:{$ref:"dimmer.json"}},switches:{type:"array",default:[],items:{$ref:"switch.json"}},thermostats:{type:"array",default:[],items:{$ref:"thermostat.json"}},locks:{type:"array",default:[],items:{$ref:"lock.json"}},windowCoverings:{type:"array",default:[],items:{$ref:"windowCovering.json"}},courtesy:{type:"array",default:[],items:{$ref:"courtesy.json"}},cameras:{type:"array",default:[],items:{$ref:"camera.json"}},mediaSources:{type:"array",default:[],items:{$ref:"mediaSource.json"}},motionSensors:{type:"array",default:[],items:{$ref:"motionSensor.json"}},alarms:{type:"array",default:[],items:{$ref:"alarm.json"}},occupiedAt:{$ref:"definitions.json#/definitions/createdAt"},createdAt:{$ref:"definitions.json#/definitions/createdAt"},updatedAt:{$ref:"definitions.json#/definitions/updatedAt"}},additionalProperties:!1}}),Object.defineProperty(Ht.prototype,"validator",{get:function(){return xe}});var _t=class extends l{constructor(e){super(e),this.id=e.id,this.name=e.name,this.description=e.description,this.type=e.type,this.devices=e.devices,this.isDefault=e.isDefault,this.showOnUi=e.showOnUi}};Object.defineProperty(_t.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"scene.json",title:"Scene",description:"A room represents a physical space of controllable IoT devices",type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},name:{type:"string"},description:{type:"string"},type:{type:"string",enum:["scene"],default:"scene"},devices:{type:"object",properties:{switches:{type:"array",items:{type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},state:{$ref:"switch.json#/properties/state"}},default:[]}},dimmers:{type:"array",items:{type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},level:{$ref:"dimmer.json#/properties/level"}}},default:[]},windowCoverings:{type:"array",items:{type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},position:{$ref:"windowCovering.json#/properties/position"}}},default:[]},thermostats:{type:"array",items:{type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},hvacMode:{$ref:"thermostat.json#/properties/hvacMode"},setpoints:{$ref:"thermostat.json#/properties/setpoints"},fanMode:{$ref:"thermostat.json#/properties/fanMode"},setpointDelta:{type:"number"}}},default:[]},mediaSources:{type:"array",items:{type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},volume:{type:"number",minimum:0,maximum:100},commands:{type:"array",items:{type:"string"}}}}},locks:{type:"array",items:{type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},state:{$ref:"lock.json#/properties/state"},mode:{$ref:"lock.json#/properties/mode"}}}}},additionalProperties:!1},isDefault:{type:"boolean",default:!1},showOnUi:{type:"boolean",default:!0}},required:["id","name","type"],additionalProperties:!1}}),Object.defineProperty(_t.prototype,"validator",{get:function(){return Ue}});var Wt=class extends l{constructor(e){super(e),this.id=e.id,this.type=e.type,this.title=e.title,this.destination=e.destination,this.url=e.url,this.systemId=e.systemId}};Object.defineProperty(Wt.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"shortLink.json",title:"Short Link",type:"object",required:["destination","url"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",default:"shortLink",enum:["shortLink"]},title:{type:"string"},destination:{string:"string",format:"uri"},url:{string:"string",format:"uri"},systemId:{$ref:"definitions.json#/definitions/systemId"}}}}),Object.defineProperty(Wt.prototype,"validator",{get:function(){return Ye}});var Zt=class extends l{constructor(e){super(e),this.id=e.id,this.type=e.type,this.to=e.to,this.from=e.from,this.media=e.media,this.status=e.status,this.body=e.body,this.driver=e.driver,this.appData=e.appData,this.createdAt=e.createdAt,this.updatedAt=e.updatedAt,this.systemId=e.systemId}};Object.defineProperty(Zt.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"smsMessage.json",title:"Sms Message",type:"object",required:["to","from","status"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",default:"smsMessage",enum:["smsMessage"]},to:{type:"string",pattern:"^\\+[0-9]{1,14}$"},from:{type:"string",pattern:"^\\+[0-9]{1,14}$"},media:{type:"string",format:"uri"},status:{type:"string",enum:["queued","accepted","sending","sent","failed","delivered","undelivered","receiving","received","read"]},body:{type:"string"},driver:{type:"string"},appData:{type:"object"},createdAt:{$ref:"definitions.json#/definitions/date"},updatedAt:{$ref:"definitions.json#/definitions/date"},systemId:{$ref:"definitions.json#/definitions/systemId"}}}}),Object.defineProperty(Zt.prototype,"validator",{get:function(){return Qe}});var Gt=class extends l{constructor(e){super(e),this.id=e.id,this.name=e.name,this.type=e.type,this.discriminator=e.discriminator,this.driver=e.driver,this.category=e.category,this.rooms=e.rooms,this.subGroups=e.subGroups,this.occupied=e.occupied,this.inUse=e.inUse,this.eco=e.eco,this.features=e.features,this.maximumOccupancy=e.maximumOccupancy,this.housekeepingStatus=e.housekeepingStatus,this.serviceStatus=e.serviceStatus,this.systemId=e.systemId}get floor(){const e=new Set;return this.rooms.forEach((t=>{t.floor&&e.add(t.floor)})),1==e.size?[...e][0]:void 0}get hasDimmer(){return this.rooms.some((e=>e.hasDimmer))}get hasSwitch(){return this.rooms.some((e=>e.hasSwitch))}get hasWindowCovering(){return this.rooms.some((e=>e.hasWindowCovering))}get hasThermostat(){return this.rooms.some((e=>e.hasThermostat))}get hasLock(){return this.rooms.some((e=>e.hasLock))}get hasCourtesy(){return this.rooms.some((e=>e.hasCourtesy))}get hasCamera(){return this.rooms.some((e=>e.hasCamera))}get hasAlarm(){return this.rooms.some((e=>e.hasAlarm))}get hasMedia(){return this.rooms.some((e=>e.hasMedia))}};Object.defineProperty(Gt.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"space.json",title:"Space",type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},name:{type:"string",minLength:1},type:{type:"string",default:"space",enum:["space"]},discriminator:{type:"string",enum:["classRoom","hotelRoom","office","building","commonArea","conferenceRoom","lobby","gym","pool","restaurant","unit"]},driver:{$ref:"definitions.json#/definitions/driver"},category:{type:"string",description:"This is the category id"},rooms:{type:"array",items:{type:"string"}},subGroups:{type:"array",items:{type:"string"}},occupied:{type:"boolean"},inUse:{type:"boolean"},eco:{type:"object",additionalProperties:!1,default:{active:!1,allowed:!1,previousState:null},properties:{active:{type:"boolean",default:!1},activatedAt:{type:["string","object"],format:"date-time"},allowed:{type:"boolean",default:!1},previousState:{type:["object","null"],properties:{thermostats:{type:"object",patternProperties:{".*":{type:"object",properties:{setpoints:{$ref:"thermostat.json#/properties/setpoints"}}}}}},additionalProperties:!1}}},features:{type:"array",items:{type:"string",enum:["pet"]}},maximumOccupancy:{type:"number",minimum:1},housekeepingStatus:{type:"string",enum:["clean","dirty","inspected","pickup"]},serviceStatus:{type:"string",enum:["inService","outOfOrder","outOfService"]},systemId:{$ref:"definitions.json#/definitions/systemId"}},if:{properties:{type:{const:"hotelRoom"}}},then:{required:["name","type","features","maximumOccupancy","housekeepingStatus","serviceStatus"],properties:{features:{default:[]},maximumOccupancy:{default:2},housekeepingStatus:{default:"dirty"},serviceStatus:{default:"inService"}}},else:{required:["name","type"]}}}),Object.defineProperty(Gt.prototype,"validator",{get:function(){return tt}});var Yt=class extends l{constructor(e){super(e),this.id=e.id,this.name=e.name,this.type=e.type,this.discriminator=e.discriminator,this.supportedNotifications=e.supportedNotifications,this.notification=e.notification,this.driver=e.driver,this.offline=e.offline,this.state=e.state,this.systemId=e.systemId,this.watts=e.watts,this.icon=e.icon,this.modelNumber=e.modelNumber,this.serialNumber=e.serialNumber,this.firmwareVersion=e.firmwareVersion}};Object.defineProperty(Yt.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"switch.json",title:"Switch",description:"Any smart switch",type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},name:{type:"string"},type:{$ref:"definitions.json#/definitions/type"},discriminator:{type:"string",enum:["light","fan","irrigation"]},supportedNotifications:{$ref:"definitions.json#/definitions/supportedNotifications"},notification:{$ref:"definitions.json#/definitions/notification"},driver:{$ref:"definitions.json#/definitions/driver"},offline:{type:"boolean"},state:{type:"string",enum:["on","off"]},systemId:{$ref:"definitions.json#/definitions/systemId"},watts:{$ref:"definitions.json#/definitions/watts"},icon:{type:"string"},modelNumber:{type:"string"},serialNumber:{type:"string"},firmwareVersion:{type:"string"}},required:["id","type","state","driver"]}}),Object.defineProperty(Yt.prototype,"validator",{get:function(){return at}});var Xt=class extends l{constructor(e){super(e),this.id=e.id,this.type=e.type,this.driver=e.driver,this.firstName=e.firstName,this.lastName=e.lastName,this.phone=e.phone,this.email=e.email,this.address=e.address,this.photo=e.photo,this.jobTitle=e.jobTitle,this.dob=e.dob,this.gender=e.gender,this.roles=e.roles,this.nationality=e.nationality,this.notes=e.notes,this.files=e.files,this.identifications=e.identifications,this.payments=e.payments,this.revenue=e.revenue,this.createdAt=e.createdAt,this.updatedAt=e.updatedAt,this.systemId=e.systemId}};Object.defineProperty(Xt.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"systemUser.json",title:"System User",description:"A system user is a user that originated from an external 3rd party system.",type:"object",required:["firstName","lastName"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",default:"systemUser",enum:["systemUser"]},driver:{$ref:"definitions.json#/definitions/driver"},firstName:{type:"string"},lastName:{type:"string"},phone:{type:["string","null"],pattern:"^\\+[0-9]{1,14}$"},email:{type:["string","null"],format:"email"},address:{$ref:"definitions.json#/definitions/address"},photo:{type:"string"},jobTitle:{type:"string"},dob:{type:"string"},gender:{type:"string",enum:["male","female"]},roles:{type:"array",items:{type:"string",enum:["Guest","User","Manager","Maintenance","Administrator","SuperAdmin"]}},nationality:{type:"string",minLength:2,maxLength:2},notes:{type:"array",items:{type:"string"}},files:{type:"array",items:{$ref:"mediaFile.json#"}},identifications:{type:"array",items:{$ref:"identification.json#"}},payments:{type:"array",items:{$ref:"payment.json#"}},revenue:{$ref:"definitions.json#/definitions/revenue"},createdAt:{$ref:"definitions.json#/definitions/createdAt"},updatedAt:{$ref:"definitions.json#/definitions/updatedAt"},systemId:{$ref:"definitions.json#/definitions/systemId"}}}}),Object.defineProperty(Xt.prototype,"validator",{get:function(){return rt}});var Qt=class extends l{constructor(e){super(e),this.id=e.id,this.name=e.name,this.type=e.type,this.driver=e.driver,this.offline=e.offline,this.supportedNotifications=e.supportedNotifications,this.notification=e.notification,this.currentTemperature=e.currentTemperature,this.currentHumidity=e.currentHumidity,this.hvacMode=e.hvacMode,this.hvacState=e.hvacState,this.fanMode=e.fanMode,this.fanState=e.fanState,this.temperatureScale=e.temperatureScale,this.humidityScale=e.humidityScale,this.supportedHvacModes=e.supportedHvacModes,this.supportedFanModes=e.supportedFanModes,this.setpoints=e.setpoints,this.minAutoDelta=e.minAutoDelta,this.cycleRate=e.cycleRate,this.batteryLevel=e.batteryLevel,this.systemId=e.systemId,this.watts=e.watts,this.icon=e.icon,this.modelNumber=e.modelNumber,this.serialNumber=e.serialNumber,this.firmwareVersion=e.firmwareVersion}};Object.defineProperty(Qt.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"thermostat.json",title:"Thermostat",description:"Any smart thermostat",type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},name:{$ref:"definitions.json#/definitions/name"},type:{$ref:"definitions.json#/definitions/type",default:"thermostat"},driver:{$ref:"definitions.json#/definitions/driver"},offline:{type:"boolean"},supportedNotifications:{$ref:"definitions.json#/definitions/supportedNotifications"},notification:{$ref:"definitions.json#/definitions/notification"},currentTemperature:{type:"number"},currentHumidity:{type:"number",minimum:0},hvacMode:{type:"string",$ref:"#/properties/supportedHvacModes/items"},hvacState:{type:["string","null"],enum:["cooling","heating","off",null]},fanMode:{type:"string",$ref:"#/properties/supportedFanModes/items"},fanState:{type:["string","null"],enum:["off","low","medium","high","on",null]},temperatureScale:{type:"string",enum:["celsius","fahrenheit"],default:"fahrenheit"},humidityScale:{type:["string","null"],enum:["absolute","relative",null]},supportedHvacModes:{type:"array",uniqueItems:!0,minItems:2,items:{enum:["cool","heat","auto","off"]}},supportedFanModes:{type:"array",uniqueItems:!0,items:{enum:["auto","low","medium","high","off","on"]}},setpoints:{type:"object",additionalProperties:!1,properties:{cool:{$ref:"#/$defs/setpoint"},heat:{$ref:"#/$defs/setpoint"},auto:{$ref:"#/$defs/setpoint"}}},minAutoDelta:{type:"number",default:3},cycleRate:{type:"number"},batteryLevel:{$ref:"definitions.json#/definitions/batteryLevel"},systemId:{$ref:"definitions.json#/definitions/systemId"},watts:{$ref:"definitions.json#/definitions/watts"},icon:{type:"string"},modelNumber:{type:"string"},serialNumber:{type:"string"},firmwareVersion:{type:"string"}},$defs:{setpoint:{type:"object",additionalProperties:!1,properties:{value:{$ref:"#/$defs/setpointValue"},min:{$ref:"#/$defs/setpointMinMax"},max:{$ref:"#/$defs/setpointMinMax"}}},setpointValue:{type:"number",minimum:0,maximum:99},setpointMinMax:{type:["number","null"],minimum:0,maximum:99}},required:["id","type","hvacMode","fanMode","hvacState","fanState","setpoints","temperatureScale","supportedHvacModes","supportedFanModes","driver"]}}),Object.defineProperty(Qt.prototype,"validator",{get:function(){return pt}});var Jt=class extends l{constructor(e){super(e),this.id=e.id,this.type=e.type,this.number=e.number,this.issueId=e.issueId,this.conversation=e.conversation,this.openedBy=e.openedBy,this.requester=e.requester,this.assignedTo=e.assignedTo,this.status=e.status,this.priority=e.priority,this.tags=e.tags,this.department=e.department,this.rating=e.rating,this.ratingComment=e.ratingComment,this.tipAmount=e.tipAmount,this.autoCloseAt=e.autoCloseAt,this.scheduleDate=e.scheduleDate,this.createdAt=e.createdAt,this.updatedAt=e.updatedAt,this.solvedAt=e.solvedAt,this.closedAt=e.closedAt}};Object.defineProperty(Jt.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"ticket.json",title:"Ticket",description:"A ticket is a request from a user.",type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",enum:["ticket"],default:"ticket"},number:{type:"string"},issueId:{type:"string"},conversation:{type:"array",default:[],items:{type:"object",additionalProperties:!1,properties:{id:{type:"string"},userId:{type:"string"},userName:{type:"string"},vendorId:{type:"string"},vendorName:{type:"string"},systemId:{type:"string"},systemName:{type:"string"},timestamp:{$ref:"definitions.json#/definitions/createdAt"},body:{type:"string"},readBy:{type:"array",default:[],items:{type:"string"}},media:{anyOf:[{$ref:"mediaFile.json"},{type:"null"}]}},anyOf:[{required:["id","userId","timestamp","body"]},{required:["id","systemId","timestamp","body"]},{required:["id","vendorId","timestamp","body"]}]}},openedBy:{type:"object",properties:{userId:{type:"string"},systemId:{type:"string"}}},requester:{type:"object",properties:{systemId:{type:"string"},systemName:{type:"string"},systemPhoto:{anyOf:[{$ref:"mediaFile.json"},{type:"null"},{type:"string"}]},userId:{type:"string"},userName:{type:"string"},userPhoto:{anyOf:[{$ref:"mediaFile.json"},{type:"null"},{type:"string"}]},deviceId:{type:"string"},roomId:{type:"string"},reservationId:{type:"string"},spaceId:{type:"string"},spaceName:{type:"string"}}},assignedTo:{type:"object",properties:{userId:{type:"string"},userName:{type:"string"},userPhoto:{anyOf:[{$ref:"mediaFile.json"},{type:"null"},{type:"string"}]},vendorId:{type:"string"},vendorName:{type:"string"},vendorPhoto:{anyOf:[{$ref:"mediaFile.json"},{type:"null"},{type:"string"}]}}},status:{type:"string",enum:["open","pending","solved","closed"],default:"open"},priority:{type:"string",enum:["low","normal","high"],default:"normal"},tags:{type:"array",default:[],items:{type:"string"}},department:{type:"string"},rating:{type:"number",minimum:0,maximum:5},ratingComment:{type:"string"},tipAmount:{type:"string"},autoCloseAt:{$ref:"definitions.json#/definitions/date"},scheduleDate:{$ref:"definitions.json#/definitions/date"},createdAt:{$ref:"definitions.json#/definitions/date"},updatedAt:{$ref:"definitions.json#/definitions/date"},solvedAt:{$ref:"definitions.json#/definitions/date"},closedAt:{$ref:"definitions.json#/definitions/date"}},required:["id","conversation","requester","status","tags","createdAt","updatedAt"],additionalProperties:!1}}),Object.defineProperty(Jt.prototype,"validator",{get:function(){return mt}});var es=class extends l{constructor(e){super(e),this.id=e.id,this.type=e.type,this.userId=e.userId,this.day=e.day,this.locked=e.locked,this.timeEntries=e.timeEntries}};Object.defineProperty(es.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"timeSheet.json",title:"Time Sheet",type:"object",required:["userId","day"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",default:"timeSheet",enum:["timeSheet"]},userId:{$ref:"definitions.json#/definitions/id"},day:{type:["string","object"],format:"date-time"},locked:{type:"boolean",default:!1,description:"If true, the time sheet is locked and cannot be modified"},timeEntries:{type:"array",default:[],items:{type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},discriminator:{type:"string",enum:["working","driving","meeting","break"]},start:{type:["string","object"],format:"date-time"},end:{type:["string","object"],format:"date-time"},comment:{type:"string"},ticketId:{type:"string"}},required:["start","discriminator"],additionalProperties:!1}}}}}),Object.defineProperty(es.prototype,"validator",{get:function(){return ut}});var ts=class extends l{constructor(e){super(e),this.id=e.id,this.type=e.type,this.firstName=e.firstName,this.lastName=e.lastName,this.phone=e.phone,this.phoneVerified=e.phoneVerified,this.email=e.email,this.emailVerified=e.emailVerified,this.address=e.address,this.secretKey=e.secretKey,this.photo=e.photo,this.jobTitle=e.jobTitle,this.dob=e.dob,this.gender=e.gender,this.nationality=e.nationality,this.permissions=e.permissions,this.notes=e.notes,this.files=e.files,this.identifications=e.identifications,this.payments=e.payments,this.location=e.location,this.reservations=e.reservations,this.spaceName=e.spaceName,this.revenue=e.revenue,this.createdAt=e.createdAt,this.updatedAt=e.updatedAt,this.systems=e.systems}get fullName(){return`${this.firstName} ${this.lastName}`}get roles(){const e=new Set;if(this.permissions)for(const t of this.permissions)e.add(t.role);return Array.from(e)}get isSuperAdmin(){return this.roles.includes("SuperAdmin")}get isAdmin(){return this.roles.includes("Admin")||this.roles.includes("Administrator")}get isManager(){return this.roles.includes("Manager")}get isUser(){return this.roles.includes("User")}};Object.defineProperty(ts.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"user.json",title:"User",type:"object",required:["firstName","lastName"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",default:"user"},firstName:{type:"string"},lastName:{type:"string"},phone:{type:["string","null"],pattern:"^\\+[0-9]{1,14}$"},phoneVerified:{type:"boolean"},email:{type:["string","null"],format:"email"},emailVerified:{type:"boolean"},address:{$ref:"definitions.json#/definitions/address"},secretKey:{type:"string"},photo:{$ref:"mediaFile.json#"},jobTitle:{type:"string"},dob:{type:"string"},gender:{type:"string",enum:["male","female"]},nationality:{type:"string",minLength:2,maxLength:2},permissions:{type:"array",default:[],items:{type:"object",required:["organizationId","propertyId","role"],properties:{organizationId:{type:"string",description:"The ID of the organization the permission is applies to."},propertyId:{type:"string",description:"The ID of the property the permission is applies to."},role:{type:"string",enum:["Guest","User","Manager","Maintenance","Administrator","SuperAdmin"]},department:{type:"string",description:"The department the user belongs to."},policyIds:{type:"array",items:{type:"string",description:"ID of a policy that is applied to this role."}},policies:{type:"array",items:{description:"A policy object populated from the policyIds array.",$ref:"policy.json"}}},additionalProperties:!1}},notes:{type:"array",items:{type:"string"}},files:{type:"array",items:{$ref:"mediaFile.json#"}},identifications:{type:"array",items:{$ref:"identification.json#"}},payments:{type:"array",items:{$ref:"payment.json#"}},location:{type:"object",required:["accuracy","latitude","longitude","timestamp"],additionalProperties:!1,properties:{accuracy:{type:["number","null"]},latitude:{type:["number","null"]},longitude:{type:["number","null"]},timestamp:{type:["number","null"]}}},reservations:{type:"array",items:{$ref:"reservation.json"}},spaceName:{type:"string"},revenue:{$ref:"definitions.json#/definitions/revenue"},createdAt:{$ref:"definitions.json#/definitions/createdAt"},updatedAt:{$ref:"definitions.json#/definitions/updatedAt"},systems:{type:"array",default:[],items:{type:"object",properties:{systemId:{type:"string"},propertyId:{type:"string"},driver:{type:"string"}},required:["systemId","propertyId","driver"],additionalProperties:!1}}}}}),Object.defineProperty(ts.prototype,"validator",{get:function(){return ct}});var ss=class extends l{constructor(e){super(e),this.id=e.id,this.type=e.type,this.name=e.name,this.phone=e.phone,this.email=e.email,this.address=e.address,this.photo=e.photo,this.createdAt=e.createdAt,this.updatedAt=e.updatedAt}};Object.defineProperty(ss.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"vendor.json",title:"Vendor",type:"object",required:["name","email"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",default:"vendor",enum:["vendor"]},name:{type:"string"},phone:{type:["string","null"],pattern:"^\\+[0-9]{1,14}$"},email:{type:["string","null"],format:"email"},address:{$ref:"definitions.json#/definitions/address"},photo:{$ref:"mediaFile.json#"},createdAt:{$ref:"definitions.json#/definitions/createdAt"},updatedAt:{$ref:"definitions.json#/definitions/updatedAt"}}}}),Object.defineProperty(ss.prototype,"validator",{get:function(){return ht}});var is=class extends l{constructor(e){super(e),this.id=e.id,this.name=e.name,this.type=e.type,this.discriminator=e.discriminator,this.supportedNotifications=e.supportedNotifications,this.notification=e.notification,this.driver=e.driver,this.offline=e.offline,this.position=e.position,this.systemId=e.systemId,this.watts=e.watts,this.icon=e.icon,this.modelNumber=e.modelNumber,this.serialNumber=e.serialNumber,this.firmwareVersion=e.firmwareVersion}};Object.defineProperty(is.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"windowCovering.json",title:"Window Covering",description:"Any smart window covering",type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},name:{type:"string"},type:{$ref:"definitions.json#/definitions/type",default:"windowCovering"},discriminator:{type:"string",enum:["basic","variable"],default:"variable"},supportedNotifications:{$ref:"definitions.json#/definitions/supportedNotifications"},notification:{$ref:"definitions.json#/definitions/notification"},driver:{$ref:"definitions.json#/definitions/driver"},offline:{type:"boolean"},position:{type:["number","null"],minimum:0,maximum:100},systemId:{$ref:"definitions.json#/definitions/systemId"},watts:{$ref:"definitions.json#/definitions/watts"},icon:{type:"string"},modelNumber:{type:"string"},serialNumber:{type:"string"},firmwareVersion:{type:"string"}},required:["id","type","position","driver"]}}),Object.defineProperty(is.prototype,"validator",{get:function(){return gt}});//# sourceMappingURL=models.cjs.map
|
|
1
|
+
var mod,__defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__hasOwnProp=Object.prototype.hasOwnProperty,__commonJS=(cb,mod)=>function __require(){return mod||(0,cb[__getOwnPropNames(cb)[0]])((mod={exports:{}}).exports,mod),mod.exports},require_fast_deep_equal=__commonJS({"node_modules/fast-deep-equal/index.js"(exports,module2){"use strict";module2.exports=function equal(a,b){if(a===b)return!0;if(a&&b&&"object"==typeof a&&"object"==typeof b){if(a.constructor!==b.constructor)return!1;var length,i,keys;if(Array.isArray(a)){if((length=a.length)!=b.length)return!1;for(i=length;0!=i--;)if(!equal(a[i],b[i]))return!1;return!0}if(a.constructor===RegExp)return a.source===b.source&&a.flags===b.flags;if(a.valueOf!==Object.prototype.valueOf)return a.valueOf()===b.valueOf();if(a.toString!==Object.prototype.toString)return a.toString()===b.toString();if((length=(keys=Object.keys(a)).length)!==Object.keys(b).length)return!1;for(i=length;0!=i--;)if(!Object.prototype.hasOwnProperty.call(b,keys[i]))return!1;for(i=length;0!=i--;){var key=keys[i];if(!equal(a[key],b[key]))return!1}return!0}return a!=a&&b!=b}}}),require_equal=__commonJS({"node_modules/ajv/dist/runtime/equal.js"(exports){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var equal=require_fast_deep_equal();equal.code='require("ajv/dist/runtime/equal").default',exports.default=equal}}),require_ucs2length=__commonJS({"node_modules/ajv/dist/runtime/ucs2length.js"(exports){"use strict";function ucs2length(str){const len=str.length;let value,length=0,pos=0;for(;pos<len;)length++,value=str.charCodeAt(pos++),value>=55296&&value<=56319&&pos<len&&(value=str.charCodeAt(pos),56320==(64512&value)&&pos++);return length}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=ucs2length,ucs2length.code='require("ajv/dist/runtime/ucs2length").default'}}),require_formats=__commonJS({"node_modules/ajv-formats/dist/formats.js"(exports){"use strict";function fmtDef(validate,compare){return{validate:validate,compare:compare}}Object.defineProperty(exports,"__esModule",{value:!0}),exports.formatNames=exports.fastFormats=exports.fullFormats=void 0,exports.fullFormats={date:fmtDef(date,compareDate),time:fmtDef(getTime(!0),compareTime),"date-time":fmtDef(getDateTime(!0),compareDateTime),"iso-time":fmtDef(getTime(),compareIsoTime),"iso-date-time":fmtDef(getDateTime(),compareIsoDateTime),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:function uri(str){return NOT_URI_FRAGMENT.test(str)&&URI.test(str)},"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:function regex(str){if(Z_ANCHOR.test(str))return!1;try{return new RegExp(str),!0}catch(e){return!1}},uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:function byte(str){return BYTE.lastIndex=0,BYTE.test(str)},int32:{type:"number",validate:function validateInt32(value){return Number.isInteger(value)&&value<=2147483647&&value>=-2147483648}},int64:{type:"number",validate:function validateInt64(value){return Number.isInteger(value)}},float:{type:"number",validate:validateNumber},double:{type:"number",validate:validateNumber},password:!0,binary:!0},exports.fastFormats={...exports.fullFormats,date:fmtDef(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,compareDate),time:fmtDef(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,compareTime),"date-time":fmtDef(/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,compareDateTime),"iso-time":fmtDef(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,compareIsoTime),"iso-date-time":fmtDef(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,compareIsoDateTime),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i},exports.formatNames=Object.keys(exports.fullFormats);var DATE=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,DAYS=[0,31,28,31,30,31,30,31,31,30,31,30,31];function date(str){const matches=DATE.exec(str);if(!matches)return!1;const year=+matches[1],month=+matches[2],day=+matches[3];return month>=1&&month<=12&&day>=1&&day<=(2===month&&function isLeapYear(year){return year%4==0&&(year%100!=0||year%400==0)}(year)?29:DAYS[month])}function compareDate(d1,d2){if(d1&&d2)return d1>d2?1:d1<d2?-1:0}var TIME=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function getTime(strictTimeZone){return function time(str){const matches=TIME.exec(str);if(!matches)return!1;const hr=+matches[1],min=+matches[2],sec=+matches[3],tz=matches[4],tzSign="-"===matches[5]?-1:1,tzH=+(matches[6]||0),tzM=+(matches[7]||0);if(tzH>23||tzM>59||strictTimeZone&&!tz)return!1;if(hr<=23&&min<=59&&sec<60)return!0;const utcMin=min-tzM*tzSign,utcHr=hr-tzH*tzSign-(utcMin<0?1:0);return(23===utcHr||-1===utcHr)&&(59===utcMin||-1===utcMin)&&sec<61}}function compareTime(s1,s2){if(!s1||!s2)return;const t1=new Date("2020-01-01T"+s1).valueOf(),t2=new Date("2020-01-01T"+s2).valueOf();return t1&&t2?t1-t2:void 0}function compareIsoTime(t1,t2){if(!t1||!t2)return;const a1=TIME.exec(t1),a2=TIME.exec(t2);return a1&&a2?(t1=a1[1]+a1[2]+a1[3])>(t2=a2[1]+a2[2]+a2[3])?1:t1<t2?-1:0:void 0}var DATE_TIME_SEPARATOR=/t|\s/i;function getDateTime(strictTimeZone){const time=getTime(strictTimeZone);return function date_time(str){const dateTime=str.split(DATE_TIME_SEPARATOR);return 2===dateTime.length&&date(dateTime[0])&&time(dateTime[1])}}function compareDateTime(dt1,dt2){if(!dt1||!dt2)return;const d1=new Date(dt1).valueOf(),d2=new Date(dt2).valueOf();return d1&&d2?d1-d2:void 0}function compareIsoDateTime(dt1,dt2){if(!dt1||!dt2)return;const[d1,t1]=dt1.split(DATE_TIME_SEPARATOR),[d2,t2]=dt2.split(DATE_TIME_SEPARATOR),res=compareDate(d1,d2);return void 0!==res?res||compareTime(t1,t2):void 0}var NOT_URI_FRAGMENT=/\/|:/,URI=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;var BYTE=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function validateNumber(){return!0}var Z_ANCHOR=/[^\\]\\Z/}}),models_exports={};((target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:!0})})(models_exports,{Alarm:()=>Alarm,Announcement:()=>Announcement,Camera:()=>Camera,Category:()=>Category,Courtesy:()=>Courtesy,Credential:()=>Credential,DeviceRouter:()=>DeviceRouter,Dimmer:()=>Dimmer,DiscoveredDevice:()=>DiscoveredDevice,EmailMessage:()=>EmailMessage,EnergyReport:()=>EnergyReport,EnergyReportShard:()=>EnergyReportShard,Entity:()=>Entity,Gateway:()=>Gateway,Identification:()=>Identification,Issue:()=>Issue,Lock:()=>Lock,Log:()=>Log,MediaFile:()=>MediaFile,MediaSource:()=>MediaSource,MotionSensor:()=>MotionSensor,Order:()=>Order,Organization:()=>Organization,Payment:()=>Payment,Policy:()=>Policy,Product:()=>Product,Property:()=>Property,Reservation:()=>Reservation,Room:()=>Room,Scene:()=>Scene,ShortLink:()=>ShortLink,SmsMessage:()=>SmsMessage,Space:()=>Space,Switch:()=>Switch,SystemUser:()=>SystemUser,Thermostat:()=>Thermostat,Ticket:()=>Ticket,TimeSheet:()=>TimeSheet,User:()=>User,Vendor:()=>Vendor,WindowCovering:()=>WindowCovering}),module.exports=(mod=models_exports,((to,from,except,desc)=>{if(from&&"object"==typeof from||"function"==typeof from)for(let key of __getOwnPropNames(from))__hasOwnProp.call(to,key)||key===except||__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to})(__defProp({},"__esModule",{value:!0}),mod));var AppError=class _AppError extends Error{constructor(message="Internal Server Error",options){super(message,options),this.type=this.constructor.name,this.statusCode=500,this.name="AppError",Object.setPrototypeOf(this,_AppError.prototype)}},ValidationError=class _ValidationError extends AppError{constructor(message="Validation Error",options={}){super(message,options),this.statusCode=400,this.name="ValidationError",Object.setPrototypeOf(this,_ValidationError.prototype)}},Entity=class{constructor(data){if(!this.schema)throw new Error("Schema is not defined");if(!this.validator)throw new Error("Validator is not defined");this.#validate(data)}get schemaProperties(){return Object.keys(this.validator.schema.properties)}#validate(data){if(!this.validator(data))throw new ValidationError(`Invalid ${this.constructor.name}`,{cause:this.validator.errors})}},validateAlarm=validate10,schema11={$schema:"http://json-schema.org/draft-07/schema",$id:"alarm.json",title:"Alarm",description:"Any smart alarm system",type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},name:{type:"string",description:"Name of the alarm"},offline:{type:"boolean"},type:{type:"string",enum:["alarm"],default:"alarm"},systemId:{$ref:"definitions.json#/definitions/systemId"},supportedNotifications:{$ref:"definitions.json#/definitions/supportedNotifications"},notification:{$ref:"definitions.json#/definitions/notification"},driver:{$ref:"definitions.json#/definitions/driver"},areas:{type:"array",items:{type:"object",properties:{number:{type:"number"},name:{type:"string"},securityMode:{type:["string","null"],enum:["arming","disarming","armed","disarmed","alarm",null]}},additionalProperties:!1}},zones:{type:"array",items:{type:"object",properties:{number:{type:"number",minimum:0},name:{type:"string"},secure:{type:["boolean","null"]},bypassed:{type:["boolean","null"]}},additionalProperties:!1}},chime:{type:"boolean",description:"Reflects whether console chime is enabled"},watts:{$ref:"definitions.json#/definitions/watts"},icon:{type:"string"},modelNumber:{type:"string"},serialNumber:{type:"string"},firmwareVersion:{type:"string"},address:{$ref:"definitions.json#/definitions/address"}},required:["id","type","areas","zones","driver"]},schema15={type:"array",uniqueItems:!0,items:{enum:["button 1","button 2","button 3","button 4","button 5","idle","powerHasBeedApplied","acMainsDisconnected","acMainsReconnected","replaceBatterySoon","replaceBatteryNow","batteryOk","hardwareFailure","softwareFailure","hardwareFailureWithCode","softwareFailureWithCode","motionDetection","airFilterNeedsCleaned","airFilterNeedsReplaced","smokeDetected","outsideSafeTemperatureRange","outsideSafeHumidityRange","scheduleMaintenance","doorAjar","communicationFailure","communicationOk","burglarAlarm","fireAlarm"]}},schema18={type:"string",description:"Driver used to communicate with the object.",enum:["adlink","aws-kinesis","butler","crestron","dell","dmp","doorbird","dormakaba","dsc","ecobee","epson","geovision-rs","geovision-as-manager","honeywell-vista","igor","inncom","isapi","kohost-k7","kohost","lg","lg-webos","lapi","lirc","mews","mht","paxton","pelican-wireless","power-shades","rachio","rebrandly","rtsp","salto","salto-irn","samsung","se","sendgrid","sonifi","stay-n-touch","storable","twilio","unifi","valcom","vizio","wisenet","cloudflare-images","cloudflare-stream","insperia-privacy"]},func0=require_equal().default,func3=require_ucs2length().default,schema16={type:["object","null"],properties:{name:{type:"string",$ref:"#/definitions/supportedNotifications/items"},timestamp:{type:"number",minimum:1655907956593},description:{type:"string"}}},schema17={enum:["button 1","button 2","button 3","button 4","button 5","idle","powerHasBeedApplied","acMainsDisconnected","acMainsReconnected","replaceBatterySoon","replaceBatteryNow","batteryOk","hardwareFailure","softwareFailure","hardwareFailureWithCode","softwareFailureWithCode","motionDetection","airFilterNeedsCleaned","airFilterNeedsReplaced","smokeDetected","outsideSafeTemperatureRange","outsideSafeHumidityRange","scheduleMaintenance","doorAjar","communicationFailure","communicationOk","burglarAlarm","fireAlarm"]};function validate12(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if((!data||"object"!=typeof data||Array.isArray(data))&&null!==data){const err0={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:schema16.type},message:"must be object,null"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0!==data.name){let data0=data.name;if("string"!=typeof data0){const err1={instancePath:instancePath+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if("button 1"!==data0&&"button 2"!==data0&&"button 3"!==data0&&"button 4"!==data0&&"button 5"!==data0&&"idle"!==data0&&"powerHasBeedApplied"!==data0&&"acMainsDisconnected"!==data0&&"acMainsReconnected"!==data0&&"replaceBatterySoon"!==data0&&"replaceBatteryNow"!==data0&&"batteryOk"!==data0&&"hardwareFailure"!==data0&&"softwareFailure"!==data0&&"hardwareFailureWithCode"!==data0&&"softwareFailureWithCode"!==data0&&"motionDetection"!==data0&&"airFilterNeedsCleaned"!==data0&&"airFilterNeedsReplaced"!==data0&&"smokeDetected"!==data0&&"outsideSafeTemperatureRange"!==data0&&"outsideSafeHumidityRange"!==data0&&"scheduleMaintenance"!==data0&&"doorAjar"!==data0&&"communicationFailure"!==data0&&"communicationOk"!==data0&&"burglarAlarm"!==data0&&"fireAlarm"!==data0){const err2={instancePath:instancePath+"/name",schemaPath:"#/definitions/supportedNotifications/items/enum",keyword:"enum",params:{allowedValues:schema17.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}}if(void 0!==data.timestamp){let data1=data.timestamp;if("number"==typeof data1){if(data1<1655907956593||isNaN(data1)){const err3={instancePath:instancePath+"/timestamp",schemaPath:"#/properties/timestamp/minimum",keyword:"minimum",params:{comparison:">=",limit:1655907956593},message:"must be >= 1655907956593"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}}else{const err4={instancePath:instancePath+"/timestamp",schemaPath:"#/properties/timestamp/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}}if(void 0!==data.description&&"string"!=typeof data.description){const err5={instancePath:instancePath+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}}return validate12.errors=vErrors,0===errors}function validate10(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0===data.type&&(data.type="alarm"),void 0===data.id){const err0={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(void 0===data.type){const err1={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if(void 0===data.areas){const err2={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"areas"},message:"must have required property 'areas'"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}if(void 0===data.zones){const err3={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"zones"},message:"must have required property 'zones'"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}if(void 0===data.driver){const err4={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"driver"},message:"must have required property 'driver'"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}if(void 0!==data.id){let data0=data.id;if("string"!=typeof data0){const err5={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}const _errs4=errors,_errs5=errors;if("global"!==data0&&"system"!==data0){const err6={};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}if(_errs5===errors){const err7={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}else errors=_errs4,null!==vErrors&&(_errs4?vErrors.length=_errs4:vErrors=null)}if(void 0!==data.name&&"string"!=typeof data.name){const err8={instancePath:instancePath+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}if(void 0!==data.offline&&"boolean"!=typeof data.offline){const err9={instancePath:instancePath+"/offline",schemaPath:"#/properties/offline/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}let data3=data.type;if("string"!=typeof data3){const err10={instancePath:instancePath+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err10]:vErrors.push(err10),errors++}if("alarm"!==data3){const err11={instancePath:instancePath+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:schema11.properties.type.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err11]:vErrors.push(err11),errors++}if(void 0!==data.systemId&&"string"!=typeof data.systemId){const err12={instancePath:instancePath+"/systemId",schemaPath:"definitions.json#/definitions/systemId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err12]:vErrors.push(err12),errors++}if(void 0!==data.supportedNotifications){let data5=data.supportedNotifications;if(Array.isArray(data5)){const len0=data5.length;for(let i0=0;i0<len0;i0++){let data6=data5[i0];if("button 1"!==data6&&"button 2"!==data6&&"button 3"!==data6&&"button 4"!==data6&&"button 5"!==data6&&"idle"!==data6&&"powerHasBeedApplied"!==data6&&"acMainsDisconnected"!==data6&&"acMainsReconnected"!==data6&&"replaceBatterySoon"!==data6&&"replaceBatteryNow"!==data6&&"batteryOk"!==data6&&"hardwareFailure"!==data6&&"softwareFailure"!==data6&&"hardwareFailureWithCode"!==data6&&"softwareFailureWithCode"!==data6&&"motionDetection"!==data6&&"airFilterNeedsCleaned"!==data6&&"airFilterNeedsReplaced"!==data6&&"smokeDetected"!==data6&&"outsideSafeTemperatureRange"!==data6&&"outsideSafeHumidityRange"!==data6&&"scheduleMaintenance"!==data6&&"doorAjar"!==data6&&"communicationFailure"!==data6&&"communicationOk"!==data6&&"burglarAlarm"!==data6&&"fireAlarm"!==data6){const err13={instancePath:instancePath+"/supportedNotifications/"+i0,schemaPath:"definitions.json#/definitions/supportedNotifications/items/enum",keyword:"enum",params:{allowedValues:schema15.items.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err13]:vErrors.push(err13),errors++}}let j0,i1=data5.length;if(i1>1)outer0:for(;i1--;)for(j0=i1;j0--;)if(func0(data5[i1],data5[j0])){const err14={instancePath:instancePath+"/supportedNotifications",schemaPath:"definitions.json#/definitions/supportedNotifications/uniqueItems",keyword:"uniqueItems",params:{i:i1,j:j0},message:"must NOT have duplicate items (items ## "+j0+" and "+i1+" are identical)"};null===vErrors?vErrors=[err14]:vErrors.push(err14),errors++;break outer0}}else{const err15={instancePath:instancePath+"/supportedNotifications",schemaPath:"definitions.json#/definitions/supportedNotifications/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err15]:vErrors.push(err15),errors++}}if(void 0!==data.notification&&(validate12(data.notification,{instancePath:instancePath+"/notification",parentData:data,parentDataProperty:"notification",rootData:rootData})||(vErrors=null===vErrors?validate12.errors:vErrors.concat(validate12.errors),errors=vErrors.length)),void 0!==data.driver){let data8=data.driver;if("string"!=typeof data8){const err16={instancePath:instancePath+"/driver",schemaPath:"definitions.json#/definitions/driver/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err16]:vErrors.push(err16),errors++}if("adlink"!==data8&&"aws-kinesis"!==data8&&"butler"!==data8&&"crestron"!==data8&&"dell"!==data8&&"dmp"!==data8&&"doorbird"!==data8&&"dormakaba"!==data8&&"dsc"!==data8&&"ecobee"!==data8&&"epson"!==data8&&"geovision-rs"!==data8&&"geovision-as-manager"!==data8&&"honeywell-vista"!==data8&&"igor"!==data8&&"inncom"!==data8&&"isapi"!==data8&&"kohost-k7"!==data8&&"kohost"!==data8&&"lg"!==data8&&"lg-webos"!==data8&&"lapi"!==data8&&"lirc"!==data8&&"mews"!==data8&&"mht"!==data8&&"paxton"!==data8&&"pelican-wireless"!==data8&&"power-shades"!==data8&&"rachio"!==data8&&"rebrandly"!==data8&&"rtsp"!==data8&&"salto"!==data8&&"salto-irn"!==data8&&"samsung"!==data8&&"se"!==data8&&"sendgrid"!==data8&&"sonifi"!==data8&&"stay-n-touch"!==data8&&"storable"!==data8&&"twilio"!==data8&&"unifi"!==data8&&"valcom"!==data8&&"vizio"!==data8&&"wisenet"!==data8&&"cloudflare-images"!==data8&&"cloudflare-stream"!==data8&&"insperia-privacy"!==data8){const err17={instancePath:instancePath+"/driver",schemaPath:"definitions.json#/definitions/driver/enum",keyword:"enum",params:{allowedValues:schema18.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err17]:vErrors.push(err17),errors++}}if(void 0!==data.areas){let data9=data.areas;if(Array.isArray(data9)){const len1=data9.length;for(let i2=0;i2<len1;i2++){let data10=data9[i2];if(data10&&"object"==typeof data10&&!Array.isArray(data10)){for(const key0 in data10)if("number"!==key0&&"name"!==key0&&"securityMode"!==key0){const err18={instancePath:instancePath+"/areas/"+i2,schemaPath:"#/properties/areas/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key0},message:"must NOT have additional properties"};null===vErrors?vErrors=[err18]:vErrors.push(err18),errors++}if(void 0!==data10.number&&"number"!=typeof data10.number){const err19={instancePath:instancePath+"/areas/"+i2+"/number",schemaPath:"#/properties/areas/items/properties/number/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err19]:vErrors.push(err19),errors++}if(void 0!==data10.name&&"string"!=typeof data10.name){const err20={instancePath:instancePath+"/areas/"+i2+"/name",schemaPath:"#/properties/areas/items/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err20]:vErrors.push(err20),errors++}if(void 0!==data10.securityMode){let data13=data10.securityMode;if("string"!=typeof data13&&null!==data13){const err21={instancePath:instancePath+"/areas/"+i2+"/securityMode",schemaPath:"#/properties/areas/items/properties/securityMode/type",keyword:"type",params:{type:schema11.properties.areas.items.properties.securityMode.type},message:"must be string,null"};null===vErrors?vErrors=[err21]:vErrors.push(err21),errors++}if("arming"!==data13&&"disarming"!==data13&&"armed"!==data13&&"disarmed"!==data13&&"alarm"!==data13&&null!==data13){const err22={instancePath:instancePath+"/areas/"+i2+"/securityMode",schemaPath:"#/properties/areas/items/properties/securityMode/enum",keyword:"enum",params:{allowedValues:schema11.properties.areas.items.properties.securityMode.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err22]:vErrors.push(err22),errors++}}}else{const err23={instancePath:instancePath+"/areas/"+i2,schemaPath:"#/properties/areas/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err23]:vErrors.push(err23),errors++}}}else{const err24={instancePath:instancePath+"/areas",schemaPath:"#/properties/areas/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err24]:vErrors.push(err24),errors++}}if(void 0!==data.zones){let data14=data.zones;if(Array.isArray(data14)){const len2=data14.length;for(let i3=0;i3<len2;i3++){let data15=data14[i3];if(data15&&"object"==typeof data15&&!Array.isArray(data15)){for(const key1 in data15)if("number"!==key1&&"name"!==key1&&"secure"!==key1&&"bypassed"!==key1){const err25={instancePath:instancePath+"/zones/"+i3,schemaPath:"#/properties/zones/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key1},message:"must NOT have additional properties"};null===vErrors?vErrors=[err25]:vErrors.push(err25),errors++}if(void 0!==data15.number){let data16=data15.number;if("number"==typeof data16){if(data16<0||isNaN(data16)){const err26={instancePath:instancePath+"/zones/"+i3+"/number",schemaPath:"#/properties/zones/items/properties/number/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===vErrors?vErrors=[err26]:vErrors.push(err26),errors++}}else{const err27={instancePath:instancePath+"/zones/"+i3+"/number",schemaPath:"#/properties/zones/items/properties/number/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err27]:vErrors.push(err27),errors++}}if(void 0!==data15.name&&"string"!=typeof data15.name){const err28={instancePath:instancePath+"/zones/"+i3+"/name",schemaPath:"#/properties/zones/items/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err28]:vErrors.push(err28),errors++}if(void 0!==data15.secure){let data18=data15.secure;if("boolean"!=typeof data18&&null!==data18){const err29={instancePath:instancePath+"/zones/"+i3+"/secure",schemaPath:"#/properties/zones/items/properties/secure/type",keyword:"type",params:{type:schema11.properties.zones.items.properties.secure.type},message:"must be boolean,null"};null===vErrors?vErrors=[err29]:vErrors.push(err29),errors++}}if(void 0!==data15.bypassed){let data19=data15.bypassed;if("boolean"!=typeof data19&&null!==data19){const err30={instancePath:instancePath+"/zones/"+i3+"/bypassed",schemaPath:"#/properties/zones/items/properties/bypassed/type",keyword:"type",params:{type:schema11.properties.zones.items.properties.bypassed.type},message:"must be boolean,null"};null===vErrors?vErrors=[err30]:vErrors.push(err30),errors++}}}else{const err31={instancePath:instancePath+"/zones/"+i3,schemaPath:"#/properties/zones/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err31]:vErrors.push(err31),errors++}}}else{const err32={instancePath:instancePath+"/zones",schemaPath:"#/properties/zones/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err32]:vErrors.push(err32),errors++}}if(void 0!==data.chime&&"boolean"!=typeof data.chime){const err33={instancePath:instancePath+"/chime",schemaPath:"#/properties/chime/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err33]:vErrors.push(err33),errors++}if(void 0!==data.watts){let data21=data.watts;if("number"==typeof data21){if(data21<0||isNaN(data21)){const err34={instancePath:instancePath+"/watts",schemaPath:"definitions.json#/definitions/watts/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===vErrors?vErrors=[err34]:vErrors.push(err34),errors++}}else{const err35={instancePath:instancePath+"/watts",schemaPath:"definitions.json#/definitions/watts/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err35]:vErrors.push(err35),errors++}}if(void 0!==data.icon&&"string"!=typeof data.icon){const err36={instancePath:instancePath+"/icon",schemaPath:"#/properties/icon/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err36]:vErrors.push(err36),errors++}if(void 0!==data.modelNumber&&"string"!=typeof data.modelNumber){const err37={instancePath:instancePath+"/modelNumber",schemaPath:"#/properties/modelNumber/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err37]:vErrors.push(err37),errors++}if(void 0!==data.serialNumber&&"string"!=typeof data.serialNumber){const err38={instancePath:instancePath+"/serialNumber",schemaPath:"#/properties/serialNumber/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err38]:vErrors.push(err38),errors++}if(void 0!==data.firmwareVersion&&"string"!=typeof data.firmwareVersion){const err39={instancePath:instancePath+"/firmwareVersion",schemaPath:"#/properties/firmwareVersion/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err39]:vErrors.push(err39),errors++}if(void 0!==data.address){let data26=data.address;if(data26&&"object"==typeof data26&&!Array.isArray(data26)){if(void 0!==data26.id&&"string"!=typeof data26.id){const err40={instancePath:instancePath+"/address/id",schemaPath:"definitions.json#/definitions/address/properties/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err40]:vErrors.push(err40),errors++}if(void 0!==data26.line1&&"string"!=typeof data26.line1){const err41={instancePath:instancePath+"/address/line1",schemaPath:"definitions.json#/definitions/address/properties/line1/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err41]:vErrors.push(err41),errors++}if(void 0!==data26.line2&&"string"!=typeof data26.line2){const err42={instancePath:instancePath+"/address/line2",schemaPath:"definitions.json#/definitions/address/properties/line2/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err42]:vErrors.push(err42),errors++}if(void 0!==data26.line3&&"string"!=typeof data26.line3){const err43={instancePath:instancePath+"/address/line3",schemaPath:"definitions.json#/definitions/address/properties/line3/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err43]:vErrors.push(err43),errors++}if(void 0!==data26.city&&"string"!=typeof data26.city){const err44={instancePath:instancePath+"/address/city",schemaPath:"definitions.json#/definitions/address/properties/city/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err44]:vErrors.push(err44),errors++}if(void 0!==data26.state&&"string"!=typeof data26.state){const err45={instancePath:instancePath+"/address/state",schemaPath:"definitions.json#/definitions/address/properties/state/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err45]:vErrors.push(err45),errors++}if(void 0!==data26.postalCode&&"string"!=typeof data26.postalCode){const err46={instancePath:instancePath+"/address/postalCode",schemaPath:"definitions.json#/definitions/address/properties/postalCode/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err46]:vErrors.push(err46),errors++}if(void 0!==data26.countryCode){let data34=data26.countryCode;if("string"==typeof data34){if(func3(data34)>2){const err47={instancePath:instancePath+"/address/countryCode",schemaPath:"definitions.json#/definitions/address/properties/countryCode/maxLength",keyword:"maxLength",params:{limit:2},message:"must NOT have more than 2 characters"};null===vErrors?vErrors=[err47]:vErrors.push(err47),errors++}if(func3(data34)<2){const err48={instancePath:instancePath+"/address/countryCode",schemaPath:"definitions.json#/definitions/address/properties/countryCode/minLength",keyword:"minLength",params:{limit:2},message:"must NOT have fewer than 2 characters"};null===vErrors?vErrors=[err48]:vErrors.push(err48),errors++}}else{const err49={instancePath:instancePath+"/address/countryCode",schemaPath:"definitions.json#/definitions/address/properties/countryCode/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err49]:vErrors.push(err49),errors++}}}else{const err50={instancePath:instancePath+"/address",schemaPath:"definitions.json#/definitions/address/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err50]:vErrors.push(err50),errors++}}}else{const err51={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err51]:vErrors.push(err51),errors++}return validate10.errors=vErrors,0===errors}var validateAnnouncement=function validate14(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){void 0===data.type&&(data.type="announcement");for(const key0 in data)if(!func5.call(schema21.properties,key0)){const err0={instancePath:instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key0},message:"must NOT have additional properties"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(void 0!==data.id){let data0=data.id;if("string"!=typeof data0){const err1={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}const _errs5=errors,_errs6=errors;if("global"!==data0&&"system"!==data0){const err2={};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}if(_errs6===errors){const err3={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}else errors=_errs5,null!==vErrors&&(_errs5?vErrors.length=_errs5:vErrors=null)}let data1=data.type;if("string"!=typeof data1){const err4={instancePath:instancePath+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}if("announcement"!==data1){const err5={instancePath:instancePath+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:schema21.properties.type.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}if(void 0!==data.users){let data2=data.users;if(Array.isArray(data2)){if(data2.length<1){const err6={instancePath:instancePath+"/users",schemaPath:"#/properties/users/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}const len0=data2.length;for(let i0=0;i0<len0;i0++)if("string"!=typeof data2[i0]){const err7={instancePath:instancePath+"/users/"+i0,schemaPath:"#/properties/users/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}}else{const err8={instancePath:instancePath+"/users",schemaPath:"#/properties/users/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}}if(void 0!==data.group&&"string"!=typeof data.group){const err9={instancePath:instancePath+"/group",schemaPath:"#/properties/group/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}if(void 0!==data.body&&"string"!=typeof data.body){const err10={instancePath:instancePath+"/body",schemaPath:"#/properties/body/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err10]:vErrors.push(err10),errors++}if(void 0!==data.media&&(validate15(data.media,{instancePath:instancePath+"/media",parentData:data,parentDataProperty:"media",rootData:rootData})||(vErrors=null===vErrors?validate15.errors:vErrors.concat(validate15.errors),errors=vErrors.length)),void 0!==data.sentBy&&"string"!=typeof data.sentBy){const err11={instancePath:instancePath+"/sentBy",schemaPath:"#/properties/sentBy/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err11]:vErrors.push(err11),errors++}if(void 0!==data.tags){let data8=data.tags;if(Array.isArray(data8)){const len1=data8.length;for(let i1=0;i1<len1;i1++)if("string"!=typeof data8[i1]){const err12={instancePath:instancePath+"/tags/"+i1,schemaPath:"#/properties/tags/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err12]:vErrors.push(err12),errors++}}else{const err13={instancePath:instancePath+"/tags",schemaPath:"#/properties/tags/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err13]:vErrors.push(err13),errors++}}if(void 0!==data.createdAt){let data10=data.createdAt;if("string"!=typeof data10&&(!data10||"object"!=typeof data10||Array.isArray(data10))){const err14={instancePath:instancePath+"/createdAt",schemaPath:"definitions.json#/definitions/date/type",keyword:"type",params:{type:schema25.type},message:"must be string,object"};null===vErrors?vErrors=[err14]:vErrors.push(err14),errors++}if("string"==typeof data10&&!formats4.validate(data10)){const err15={instancePath:instancePath+"/createdAt",schemaPath:"definitions.json#/definitions/date/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err15]:vErrors.push(err15),errors++}}if(void 0!==data.updatedAt){let data11=data.updatedAt;if("string"!=typeof data11&&(!data11||"object"!=typeof data11||Array.isArray(data11))){const err16={instancePath:instancePath+"/updatedAt",schemaPath:"definitions.json#/definitions/date/type",keyword:"type",params:{type:schema25.type},message:"must be string,object"};null===vErrors?vErrors=[err16]:vErrors.push(err16),errors++}if("string"==typeof data11&&!formats4.validate(data11)){const err17={instancePath:instancePath+"/updatedAt",schemaPath:"definitions.json#/definitions/date/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err17]:vErrors.push(err17),errors++}}}else{const err18={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err18]:vErrors.push(err18),errors++}return validate14.errors=vErrors,0===errors},schema21={$schema:"http://json-schema.org/draft-07/schema",$id:"announcement.json",title:"Announcement",description:"Announcement message sent to users",type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",enum:["announcement"],default:"announcement"},users:{type:"array",items:{type:"string"},minItems:1},group:{type:"string"},body:{type:"string"},media:{$ref:"mediaFile.json"},sentBy:{type:"string"},tags:{type:"array",items:{type:"string"}},createdAt:{$ref:"definitions.json#/definitions/date"},updatedAt:{$ref:"definitions.json#/definitions/date"}},additionalProperties:!1},schema25={type:["string","object"],format:"date-time"},func5=Object.prototype.hasOwnProperty,schema23={$schema:"http://json-schema.org/draft-07/schema",$id:"mediaFile.json",title:"Media File",description:"Any media file",type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",default:"mediaFile",enum:["mediaFile"]},name:{type:"string"},fileHash:{type:"string"},category:{type:"string",description:"This is the category id"},mimeType:{type:"string",enum:["image/*","image/jpeg","image/png","image/gif","image/webp","image/avif","image/svg+xml","application/pdf"]},data:{type:"string"},url:{type:"string",format:"uri"},width:{type:"integer",minimum:0},height:{type:"integer",minimum:0},size:{type:"integer",minimum:0,description:"Size in bytes"},uploadUrl:{type:"string",format:"uri"},uploadUrlExpires:{$ref:"definitions.json#/definitions/date"},createdBy:{type:"string"},systemId:{$ref:"definitions.json#/definitions/systemId"}},additionalProperties:!1,required:["type"]},formats0=require_formats().fullFormats.uri,formats4=require_formats().fullFormats["date-time"];function validate15(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0===data.type&&(data.type="mediaFile"),void 0===data.type){const err0={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}for(const key0 in data)if(!func5.call(schema23.properties,key0)){const err1={instancePath:instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key0},message:"must NOT have additional properties"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if(void 0!==data.id){let data0=data.id;if("string"!=typeof data0){const err2={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}const _errs5=errors,_errs6=errors;if("global"!==data0&&"system"!==data0){const err3={};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}if(_errs6===errors){const err4={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}else errors=_errs5,null!==vErrors&&(_errs5?vErrors.length=_errs5:vErrors=null)}let data1=data.type;if("string"!=typeof data1){const err5={instancePath:instancePath+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}if("mediaFile"!==data1){const err6={instancePath:instancePath+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:schema23.properties.type.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}if(void 0!==data.name&&"string"!=typeof data.name){const err7={instancePath:instancePath+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}if(void 0!==data.fileHash&&"string"!=typeof data.fileHash){const err8={instancePath:instancePath+"/fileHash",schemaPath:"#/properties/fileHash/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}if(void 0!==data.category&&"string"!=typeof data.category){const err9={instancePath:instancePath+"/category",schemaPath:"#/properties/category/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}if(void 0!==data.mimeType){let data5=data.mimeType;if("string"!=typeof data5){const err10={instancePath:instancePath+"/mimeType",schemaPath:"#/properties/mimeType/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err10]:vErrors.push(err10),errors++}if("image/*"!==data5&&"image/jpeg"!==data5&&"image/png"!==data5&&"image/gif"!==data5&&"image/webp"!==data5&&"image/avif"!==data5&&"image/svg+xml"!==data5&&"application/pdf"!==data5){const err11={instancePath:instancePath+"/mimeType",schemaPath:"#/properties/mimeType/enum",keyword:"enum",params:{allowedValues:schema23.properties.mimeType.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err11]:vErrors.push(err11),errors++}}if(void 0!==data.data&&"string"!=typeof data.data){const err12={instancePath:instancePath+"/data",schemaPath:"#/properties/data/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err12]:vErrors.push(err12),errors++}if(void 0!==data.url){let data7=data.url;if("string"==typeof data7){if(!formats0(data7)){const err13={instancePath:instancePath+"/url",schemaPath:"#/properties/url/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};null===vErrors?vErrors=[err13]:vErrors.push(err13),errors++}}else{const err14={instancePath:instancePath+"/url",schemaPath:"#/properties/url/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err14]:vErrors.push(err14),errors++}}if(void 0!==data.width){let data8=data.width;if("number"!=typeof data8||data8%1||isNaN(data8)){const err15={instancePath:instancePath+"/width",schemaPath:"#/properties/width/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===vErrors?vErrors=[err15]:vErrors.push(err15),errors++}if("number"==typeof data8&&(data8<0||isNaN(data8))){const err16={instancePath:instancePath+"/width",schemaPath:"#/properties/width/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===vErrors?vErrors=[err16]:vErrors.push(err16),errors++}}if(void 0!==data.height){let data9=data.height;if("number"!=typeof data9||data9%1||isNaN(data9)){const err17={instancePath:instancePath+"/height",schemaPath:"#/properties/height/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===vErrors?vErrors=[err17]:vErrors.push(err17),errors++}if("number"==typeof data9&&(data9<0||isNaN(data9))){const err18={instancePath:instancePath+"/height",schemaPath:"#/properties/height/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===vErrors?vErrors=[err18]:vErrors.push(err18),errors++}}if(void 0!==data.size){let data10=data.size;if("number"!=typeof data10||data10%1||isNaN(data10)){const err19={instancePath:instancePath+"/size",schemaPath:"#/properties/size/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===vErrors?vErrors=[err19]:vErrors.push(err19),errors++}if("number"==typeof data10&&(data10<0||isNaN(data10))){const err20={instancePath:instancePath+"/size",schemaPath:"#/properties/size/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===vErrors?vErrors=[err20]:vErrors.push(err20),errors++}}if(void 0!==data.uploadUrl){let data11=data.uploadUrl;if("string"==typeof data11){if(!formats0(data11)){const err21={instancePath:instancePath+"/uploadUrl",schemaPath:"#/properties/uploadUrl/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};null===vErrors?vErrors=[err21]:vErrors.push(err21),errors++}}else{const err22={instancePath:instancePath+"/uploadUrl",schemaPath:"#/properties/uploadUrl/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err22]:vErrors.push(err22),errors++}}if(void 0!==data.uploadUrlExpires){let data12=data.uploadUrlExpires;if("string"!=typeof data12&&(!data12||"object"!=typeof data12||Array.isArray(data12))){const err23={instancePath:instancePath+"/uploadUrlExpires",schemaPath:"definitions.json#/definitions/date/type",keyword:"type",params:{type:schema25.type},message:"must be string,object"};null===vErrors?vErrors=[err23]:vErrors.push(err23),errors++}if("string"==typeof data12&&!formats4.validate(data12)){const err24={instancePath:instancePath+"/uploadUrlExpires",schemaPath:"definitions.json#/definitions/date/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err24]:vErrors.push(err24),errors++}}if(void 0!==data.createdBy&&"string"!=typeof data.createdBy){const err25={instancePath:instancePath+"/createdBy",schemaPath:"#/properties/createdBy/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err25]:vErrors.push(err25),errors++}if(void 0!==data.systemId&&"string"!=typeof data.systemId){const err26={instancePath:instancePath+"/systemId",schemaPath:"definitions.json#/definitions/systemId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err26]:vErrors.push(err26),errors++}}else{const err27={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err27]:vErrors.push(err27),errors++}return validate15.errors=vErrors,0===errors}var validateCamera=validate17,schema29={$schema:"http://json-schema.org/draft-07/schema",$id:"camera.json",title:"Camera",description:"Any smart camera",type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},name:{type:"string"},type:{$ref:"definitions.json#/definitions/type",default:"camera"},offline:{type:"boolean"},supportedNotifications:{$ref:"definitions.json#/definitions/supportedNotifications"},notification:{$ref:"definitions.json#/definitions/notification"},driver:{$ref:"definitions.json#/definitions/driver"},liveStreams:{type:"object",additionalProperties:!1,$comment:"This is now deprecated. Use liveStream instead. This will remain here for backwards compatibility.",properties:{iframe:{type:["string","null"]},hls:{type:["string","null"]},webRTC:{type:["string","null"]},rtsp:{type:["string","null"]}}},liveStream:{type:"object",additionalProperties:!1,properties:{id:{type:"string"},driver:{type:"string",enum:["cloudflare-stream","aws-kinesis","digital-watchdog"]},allowedOrigins:{type:"array",items:{type:"string"}},authRequired:{type:"boolean"},iframe:{type:["string","null"]},hls:{type:["string","null"]},webRTC:{type:["string","null"]},rtsp:{type:["string","null"],description:"Local RTSP stream URL",examples:["rtsp://192.168.1.4:544/channels/1","rtsp://10.145.6.129:8554/unicast"]},previewImage:{type:["string","null"],description:"Source to preview the camera stream",examples:["https://example.com/preview.jpg","data:image/jpegbase64,/9j/4AAQSkZJRgABAQEAYABgAAD/4QBYRXhpZgAATU0AKgAAAAgAA1EQAAEAAAABAQAAAFERAAQAAAABAAABAgABAA"]}}},systemId:{$ref:"definitions.json#/definitions/systemId"},watts:{$ref:"definitions.json#/definitions/watts"},icon:{type:"string"},modelNumber:{type:"string"},serialNumber:{type:"string"},firmwareVersion:{type:"string"}},additionalProperties:!1,required:["id","type","driver"]},schema31={type:"string",enum:["alarm","dimmer","switch","motionSensor","windowCovering","camera","mediaSource","thermostat","lock","courtesy","gateway","tv","dvr","appleTv","discPlayer","mediaPlayer","uncontrolledDevice"]};function validate18(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if((!data||"object"!=typeof data||Array.isArray(data))&&null!==data){const err0={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:schema16.type},message:"must be object,null"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0!==data.name){let data0=data.name;if("string"!=typeof data0){const err1={instancePath:instancePath+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if("button 1"!==data0&&"button 2"!==data0&&"button 3"!==data0&&"button 4"!==data0&&"button 5"!==data0&&"idle"!==data0&&"powerHasBeedApplied"!==data0&&"acMainsDisconnected"!==data0&&"acMainsReconnected"!==data0&&"replaceBatterySoon"!==data0&&"replaceBatteryNow"!==data0&&"batteryOk"!==data0&&"hardwareFailure"!==data0&&"softwareFailure"!==data0&&"hardwareFailureWithCode"!==data0&&"softwareFailureWithCode"!==data0&&"motionDetection"!==data0&&"airFilterNeedsCleaned"!==data0&&"airFilterNeedsReplaced"!==data0&&"smokeDetected"!==data0&&"outsideSafeTemperatureRange"!==data0&&"outsideSafeHumidityRange"!==data0&&"scheduleMaintenance"!==data0&&"doorAjar"!==data0&&"communicationFailure"!==data0&&"communicationOk"!==data0&&"burglarAlarm"!==data0&&"fireAlarm"!==data0){const err2={instancePath:instancePath+"/name",schemaPath:"#/definitions/supportedNotifications/items/enum",keyword:"enum",params:{allowedValues:schema17.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}}if(void 0!==data.timestamp){let data1=data.timestamp;if("number"==typeof data1){if(data1<1655907956593||isNaN(data1)){const err3={instancePath:instancePath+"/timestamp",schemaPath:"#/properties/timestamp/minimum",keyword:"minimum",params:{comparison:">=",limit:1655907956593},message:"must be >= 1655907956593"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}}else{const err4={instancePath:instancePath+"/timestamp",schemaPath:"#/properties/timestamp/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}}if(void 0!==data.description&&"string"!=typeof data.description){const err5={instancePath:instancePath+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}}return validate18.errors=vErrors,0===errors}function validate17(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0===data.type&&(data.type="camera"),void 0===data.id){const err0={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(void 0===data.type){const err1={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if(void 0===data.driver){const err2={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"driver"},message:"must have required property 'driver'"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}for(const key0 in data)if(!func5.call(schema29.properties,key0)){const err3={instancePath:instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key0},message:"must NOT have additional properties"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}if(void 0!==data.id){let data0=data.id;if("string"!=typeof data0){const err4={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}const _errs5=errors,_errs6=errors;if("global"!==data0&&"system"!==data0){const err5={};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}if(_errs6===errors){const err6={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}else errors=_errs5,null!==vErrors&&(_errs5?vErrors.length=_errs5:vErrors=null)}if(void 0!==data.name&&"string"!=typeof data.name){const err7={instancePath:instancePath+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}let data2=data.type;if("string"!=typeof data2){const err8={instancePath:instancePath+"/type",schemaPath:"definitions.json#/definitions/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}if("alarm"!==data2&&"dimmer"!==data2&&"switch"!==data2&&"motionSensor"!==data2&&"windowCovering"!==data2&&"camera"!==data2&&"mediaSource"!==data2&&"thermostat"!==data2&&"lock"!==data2&&"courtesy"!==data2&&"gateway"!==data2&&"tv"!==data2&&"dvr"!==data2&&"appleTv"!==data2&&"discPlayer"!==data2&&"mediaPlayer"!==data2&&"uncontrolledDevice"!==data2){const err9={instancePath:instancePath+"/type",schemaPath:"definitions.json#/definitions/type/enum",keyword:"enum",params:{allowedValues:schema31.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}if(void 0!==data.offline&&"boolean"!=typeof data.offline){const err10={instancePath:instancePath+"/offline",schemaPath:"#/properties/offline/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err10]:vErrors.push(err10),errors++}if(void 0!==data.supportedNotifications){let data4=data.supportedNotifications;if(Array.isArray(data4)){const len0=data4.length;for(let i0=0;i0<len0;i0++){let data5=data4[i0];if("button 1"!==data5&&"button 2"!==data5&&"button 3"!==data5&&"button 4"!==data5&&"button 5"!==data5&&"idle"!==data5&&"powerHasBeedApplied"!==data5&&"acMainsDisconnected"!==data5&&"acMainsReconnected"!==data5&&"replaceBatterySoon"!==data5&&"replaceBatteryNow"!==data5&&"batteryOk"!==data5&&"hardwareFailure"!==data5&&"softwareFailure"!==data5&&"hardwareFailureWithCode"!==data5&&"softwareFailureWithCode"!==data5&&"motionDetection"!==data5&&"airFilterNeedsCleaned"!==data5&&"airFilterNeedsReplaced"!==data5&&"smokeDetected"!==data5&&"outsideSafeTemperatureRange"!==data5&&"outsideSafeHumidityRange"!==data5&&"scheduleMaintenance"!==data5&&"doorAjar"!==data5&&"communicationFailure"!==data5&&"communicationOk"!==data5&&"burglarAlarm"!==data5&&"fireAlarm"!==data5){const err11={instancePath:instancePath+"/supportedNotifications/"+i0,schemaPath:"definitions.json#/definitions/supportedNotifications/items/enum",keyword:"enum",params:{allowedValues:schema15.items.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err11]:vErrors.push(err11),errors++}}let j0,i1=data4.length;if(i1>1)outer0:for(;i1--;)for(j0=i1;j0--;)if(func0(data4[i1],data4[j0])){const err12={instancePath:instancePath+"/supportedNotifications",schemaPath:"definitions.json#/definitions/supportedNotifications/uniqueItems",keyword:"uniqueItems",params:{i:i1,j:j0},message:"must NOT have duplicate items (items ## "+j0+" and "+i1+" are identical)"};null===vErrors?vErrors=[err12]:vErrors.push(err12),errors++;break outer0}}else{const err13={instancePath:instancePath+"/supportedNotifications",schemaPath:"definitions.json#/definitions/supportedNotifications/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err13]:vErrors.push(err13),errors++}}if(void 0!==data.notification&&(validate18(data.notification,{instancePath:instancePath+"/notification",parentData:data,parentDataProperty:"notification",rootData:rootData})||(vErrors=null===vErrors?validate18.errors:vErrors.concat(validate18.errors),errors=vErrors.length)),void 0!==data.driver){let data7=data.driver;if("string"!=typeof data7){const err14={instancePath:instancePath+"/driver",schemaPath:"definitions.json#/definitions/driver/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err14]:vErrors.push(err14),errors++}if("adlink"!==data7&&"aws-kinesis"!==data7&&"butler"!==data7&&"crestron"!==data7&&"dell"!==data7&&"dmp"!==data7&&"doorbird"!==data7&&"dormakaba"!==data7&&"dsc"!==data7&&"ecobee"!==data7&&"epson"!==data7&&"geovision-rs"!==data7&&"geovision-as-manager"!==data7&&"honeywell-vista"!==data7&&"igor"!==data7&&"inncom"!==data7&&"isapi"!==data7&&"kohost-k7"!==data7&&"kohost"!==data7&&"lg"!==data7&&"lg-webos"!==data7&&"lapi"!==data7&&"lirc"!==data7&&"mews"!==data7&&"mht"!==data7&&"paxton"!==data7&&"pelican-wireless"!==data7&&"power-shades"!==data7&&"rachio"!==data7&&"rebrandly"!==data7&&"rtsp"!==data7&&"salto"!==data7&&"salto-irn"!==data7&&"samsung"!==data7&&"se"!==data7&&"sendgrid"!==data7&&"sonifi"!==data7&&"stay-n-touch"!==data7&&"storable"!==data7&&"twilio"!==data7&&"unifi"!==data7&&"valcom"!==data7&&"vizio"!==data7&&"wisenet"!==data7&&"cloudflare-images"!==data7&&"cloudflare-stream"!==data7&&"insperia-privacy"!==data7){const err15={instancePath:instancePath+"/driver",schemaPath:"definitions.json#/definitions/driver/enum",keyword:"enum",params:{allowedValues:schema18.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err15]:vErrors.push(err15),errors++}}if(void 0!==data.liveStreams){let data8=data.liveStreams;if(data8&&"object"==typeof data8&&!Array.isArray(data8)){for(const key1 in data8)if("iframe"!==key1&&"hls"!==key1&&"webRTC"!==key1&&"rtsp"!==key1){const err16={instancePath:instancePath+"/liveStreams",schemaPath:"#/properties/liveStreams/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key1},message:"must NOT have additional properties"};null===vErrors?vErrors=[err16]:vErrors.push(err16),errors++}if(void 0!==data8.iframe){let data9=data8.iframe;if("string"!=typeof data9&&null!==data9){const err17={instancePath:instancePath+"/liveStreams/iframe",schemaPath:"#/properties/liveStreams/properties/iframe/type",keyword:"type",params:{type:schema29.properties.liveStreams.properties.iframe.type},message:"must be string,null"};null===vErrors?vErrors=[err17]:vErrors.push(err17),errors++}}if(void 0!==data8.hls){let data10=data8.hls;if("string"!=typeof data10&&null!==data10){const err18={instancePath:instancePath+"/liveStreams/hls",schemaPath:"#/properties/liveStreams/properties/hls/type",keyword:"type",params:{type:schema29.properties.liveStreams.properties.hls.type},message:"must be string,null"};null===vErrors?vErrors=[err18]:vErrors.push(err18),errors++}}if(void 0!==data8.webRTC){let data11=data8.webRTC;if("string"!=typeof data11&&null!==data11){const err19={instancePath:instancePath+"/liveStreams/webRTC",schemaPath:"#/properties/liveStreams/properties/webRTC/type",keyword:"type",params:{type:schema29.properties.liveStreams.properties.webRTC.type},message:"must be string,null"};null===vErrors?vErrors=[err19]:vErrors.push(err19),errors++}}if(void 0!==data8.rtsp){let data12=data8.rtsp;if("string"!=typeof data12&&null!==data12){const err20={instancePath:instancePath+"/liveStreams/rtsp",schemaPath:"#/properties/liveStreams/properties/rtsp/type",keyword:"type",params:{type:schema29.properties.liveStreams.properties.rtsp.type},message:"must be string,null"};null===vErrors?vErrors=[err20]:vErrors.push(err20),errors++}}}else{const err21={instancePath:instancePath+"/liveStreams",schemaPath:"#/properties/liveStreams/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err21]:vErrors.push(err21),errors++}}if(void 0!==data.liveStream){let data13=data.liveStream;if(data13&&"object"==typeof data13&&!Array.isArray(data13)){for(const key2 in data13)if(!func5.call(schema29.properties.liveStream.properties,key2)){const err22={instancePath:instancePath+"/liveStream",schemaPath:"#/properties/liveStream/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key2},message:"must NOT have additional properties"};null===vErrors?vErrors=[err22]:vErrors.push(err22),errors++}if(void 0!==data13.id&&"string"!=typeof data13.id){const err23={instancePath:instancePath+"/liveStream/id",schemaPath:"#/properties/liveStream/properties/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err23]:vErrors.push(err23),errors++}if(void 0!==data13.driver){let data15=data13.driver;if("string"!=typeof data15){const err24={instancePath:instancePath+"/liveStream/driver",schemaPath:"#/properties/liveStream/properties/driver/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err24]:vErrors.push(err24),errors++}if("cloudflare-stream"!==data15&&"aws-kinesis"!==data15&&"digital-watchdog"!==data15){const err25={instancePath:instancePath+"/liveStream/driver",schemaPath:"#/properties/liveStream/properties/driver/enum",keyword:"enum",params:{allowedValues:schema29.properties.liveStream.properties.driver.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err25]:vErrors.push(err25),errors++}}if(void 0!==data13.allowedOrigins){let data16=data13.allowedOrigins;if(Array.isArray(data16)){const len1=data16.length;for(let i2=0;i2<len1;i2++)if("string"!=typeof data16[i2]){const err26={instancePath:instancePath+"/liveStream/allowedOrigins/"+i2,schemaPath:"#/properties/liveStream/properties/allowedOrigins/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err26]:vErrors.push(err26),errors++}}else{const err27={instancePath:instancePath+"/liveStream/allowedOrigins",schemaPath:"#/properties/liveStream/properties/allowedOrigins/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err27]:vErrors.push(err27),errors++}}if(void 0!==data13.authRequired&&"boolean"!=typeof data13.authRequired){const err28={instancePath:instancePath+"/liveStream/authRequired",schemaPath:"#/properties/liveStream/properties/authRequired/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err28]:vErrors.push(err28),errors++}if(void 0!==data13.iframe){let data19=data13.iframe;if("string"!=typeof data19&&null!==data19){const err29={instancePath:instancePath+"/liveStream/iframe",schemaPath:"#/properties/liveStream/properties/iframe/type",keyword:"type",params:{type:schema29.properties.liveStream.properties.iframe.type},message:"must be string,null"};null===vErrors?vErrors=[err29]:vErrors.push(err29),errors++}}if(void 0!==data13.hls){let data20=data13.hls;if("string"!=typeof data20&&null!==data20){const err30={instancePath:instancePath+"/liveStream/hls",schemaPath:"#/properties/liveStream/properties/hls/type",keyword:"type",params:{type:schema29.properties.liveStream.properties.hls.type},message:"must be string,null"};null===vErrors?vErrors=[err30]:vErrors.push(err30),errors++}}if(void 0!==data13.webRTC){let data21=data13.webRTC;if("string"!=typeof data21&&null!==data21){const err31={instancePath:instancePath+"/liveStream/webRTC",schemaPath:"#/properties/liveStream/properties/webRTC/type",keyword:"type",params:{type:schema29.properties.liveStream.properties.webRTC.type},message:"must be string,null"};null===vErrors?vErrors=[err31]:vErrors.push(err31),errors++}}if(void 0!==data13.rtsp){let data22=data13.rtsp;if("string"!=typeof data22&&null!==data22){const err32={instancePath:instancePath+"/liveStream/rtsp",schemaPath:"#/properties/liveStream/properties/rtsp/type",keyword:"type",params:{type:schema29.properties.liveStream.properties.rtsp.type},message:"must be string,null"};null===vErrors?vErrors=[err32]:vErrors.push(err32),errors++}}if(void 0!==data13.previewImage){let data23=data13.previewImage;if("string"!=typeof data23&&null!==data23){const err33={instancePath:instancePath+"/liveStream/previewImage",schemaPath:"#/properties/liveStream/properties/previewImage/type",keyword:"type",params:{type:schema29.properties.liveStream.properties.previewImage.type},message:"must be string,null"};null===vErrors?vErrors=[err33]:vErrors.push(err33),errors++}}}else{const err34={instancePath:instancePath+"/liveStream",schemaPath:"#/properties/liveStream/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err34]:vErrors.push(err34),errors++}}if(void 0!==data.systemId&&"string"!=typeof data.systemId){const err35={instancePath:instancePath+"/systemId",schemaPath:"definitions.json#/definitions/systemId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err35]:vErrors.push(err35),errors++}if(void 0!==data.watts){let data25=data.watts;if("number"==typeof data25){if(data25<0||isNaN(data25)){const err36={instancePath:instancePath+"/watts",schemaPath:"definitions.json#/definitions/watts/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===vErrors?vErrors=[err36]:vErrors.push(err36),errors++}}else{const err37={instancePath:instancePath+"/watts",schemaPath:"definitions.json#/definitions/watts/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err37]:vErrors.push(err37),errors++}}if(void 0!==data.icon&&"string"!=typeof data.icon){const err38={instancePath:instancePath+"/icon",schemaPath:"#/properties/icon/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err38]:vErrors.push(err38),errors++}if(void 0!==data.modelNumber&&"string"!=typeof data.modelNumber){const err39={instancePath:instancePath+"/modelNumber",schemaPath:"#/properties/modelNumber/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err39]:vErrors.push(err39),errors++}if(void 0!==data.serialNumber&&"string"!=typeof data.serialNumber){const err40={instancePath:instancePath+"/serialNumber",schemaPath:"#/properties/serialNumber/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err40]:vErrors.push(err40),errors++}if(void 0!==data.firmwareVersion&&"string"!=typeof data.firmwareVersion){const err41={instancePath:instancePath+"/firmwareVersion",schemaPath:"#/properties/firmwareVersion/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err41]:vErrors.push(err41),errors++}}else{const err42={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err42]:vErrors.push(err42),errors++}return validate17.errors=vErrors,0===errors}var validateCategory=function validate20(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0===data.type&&(data.type="category"),void 0===data.rating&&(data.rating=9),void 0===data.type){const err0={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(void 0===data.discriminator){const err1={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"discriminator"},message:"must have required property 'discriminator'"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if(void 0!==data.id){let data0=data.id;if("string"!=typeof data0){const err2={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}const _errs4=errors,_errs5=errors;if("global"!==data0&&"system"!==data0){const err3={};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}if(_errs5===errors){const err4={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}else errors=_errs4,null!==vErrors&&(_errs4?vErrors.length=_errs4:vErrors=null)}if("string"!=typeof data.type){const err5={instancePath:instancePath+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}if(void 0!==data.name){let data2=data.name;if("string"==typeof data2){if(func3(data2)<1){const err6={instancePath:instancePath+"/name",schemaPath:"#/properties/name/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}}else{const err7={instancePath:instancePath+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}}if(void 0!==data.driver){let data3=data.driver;if("string"!=typeof data3){const err8={instancePath:instancePath+"/driver",schemaPath:"definitions.json#/definitions/driver/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}if("adlink"!==data3&&"aws-kinesis"!==data3&&"butler"!==data3&&"crestron"!==data3&&"dell"!==data3&&"dmp"!==data3&&"doorbird"!==data3&&"dormakaba"!==data3&&"dsc"!==data3&&"ecobee"!==data3&&"epson"!==data3&&"geovision-rs"!==data3&&"geovision-as-manager"!==data3&&"honeywell-vista"!==data3&&"igor"!==data3&&"inncom"!==data3&&"isapi"!==data3&&"kohost-k7"!==data3&&"kohost"!==data3&&"lg"!==data3&&"lg-webos"!==data3&&"lapi"!==data3&&"lirc"!==data3&&"mews"!==data3&&"mht"!==data3&&"paxton"!==data3&&"pelican-wireless"!==data3&&"power-shades"!==data3&&"rachio"!==data3&&"rebrandly"!==data3&&"rtsp"!==data3&&"salto"!==data3&&"salto-irn"!==data3&&"samsung"!==data3&&"se"!==data3&&"sendgrid"!==data3&&"sonifi"!==data3&&"stay-n-touch"!==data3&&"storable"!==data3&&"twilio"!==data3&&"unifi"!==data3&&"valcom"!==data3&&"vizio"!==data3&&"wisenet"!==data3&&"cloudflare-images"!==data3&&"cloudflare-stream"!==data3&&"insperia-privacy"!==data3){const err9={instancePath:instancePath+"/driver",schemaPath:"definitions.json#/definitions/driver/enum",keyword:"enum",params:{allowedValues:schema18.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}}if(void 0!==data.description&&"string"!=typeof data.description){const err10={instancePath:instancePath+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err10]:vErrors.push(err10),errors++}void 0!==data.image&&(validate15(data.image,{instancePath:instancePath+"/image",parentData:data,parentDataProperty:"image",rootData:rootData})||(vErrors=null===vErrors?validate15.errors:vErrors.concat(validate15.errors),errors=vErrors.length));let data6=data.rating;if("number"==typeof data6){if(data6>10||isNaN(data6)){const err11={instancePath:instancePath+"/rating",schemaPath:"#/properties/rating/maximum",keyword:"maximum",params:{comparison:"<=",limit:10},message:"must be <= 10"};null===vErrors?vErrors=[err11]:vErrors.push(err11),errors++}if(data6<0||isNaN(data6)){const err12={instancePath:instancePath+"/rating",schemaPath:"#/properties/rating/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===vErrors?vErrors=[err12]:vErrors.push(err12),errors++}}else{const err13={instancePath:instancePath+"/rating",schemaPath:"#/properties/rating/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err13]:vErrors.push(err13),errors++}if(void 0!==data.discriminator){let data7=data.discriminator;if("string"!=typeof data7){const err14={instancePath:instancePath+"/discriminator",schemaPath:"#/properties/discriminator/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err14]:vErrors.push(err14),errors++}if("space"!==data7&&"product"!==data7&&"mediaFile"!==data7){const err15={instancePath:instancePath+"/discriminator",schemaPath:"#/properties/discriminator/enum",keyword:"enum",params:{allowedValues:schema38.properties.discriminator.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err15]:vErrors.push(err15),errors++}}if(void 0!==data.systemId&&"string"!=typeof data.systemId){const err16={instancePath:instancePath+"/systemId",schemaPath:"definitions.json#/definitions/systemId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err16]:vErrors.push(err16),errors++}}else{const err17={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err17]:vErrors.push(err17),errors++}return validate20.errors=vErrors,0===errors},schema38={$schema:"http://json-schema.org/draft-07/schema",$id:"category.json",title:"Category",type:"object",required:["type","discriminator"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",default:"category"},name:{type:"string",minLength:1},driver:{$ref:"definitions.json#/definitions/driver"},description:{type:"string"},image:{$ref:"mediaFile.json"},rating:{type:"number",minimum:0,maximum:10,default:9},discriminator:{type:"string",enum:["space","product","mediaFile"]},systemId:{$ref:"definitions.json#/definitions/systemId"}}};var validateCourtesy=validate22,schema42={$schema:"http://json-schema.org/draft-07/schema",$id:"courtesy.json",title:"Courtesy",description:"Any smart courtesy system",type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},name:{type:"string"},type:{$ref:"definitions.json#/definitions/type"},supportedNotifications:{$ref:"definitions.json#/definitions/supportedNotifications"},notification:{$ref:"definitions.json#/definitions/notification"},driver:{$ref:"definitions.json#/definitions/driver"},offline:{type:"boolean"},supportedStates:{type:"array",uniqueItems:!0,items:{enum:["privacy","service","none"]}},state:{type:"string",$ref:"#/properties/supportedStates/items"},systemId:{$ref:"definitions.json#/definitions/systemId"},watts:{$ref:"definitions.json#/definitions/watts"},icon:{type:"string"},modelNumber:{type:"string"},serialNumber:{type:"string"},firmwareVersion:{type:"string"}},required:["id","type","driver","supportedStates","state"]},schema49={enum:["privacy","service","none"]};function validate23(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if((!data||"object"!=typeof data||Array.isArray(data))&&null!==data){const err0={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:schema16.type},message:"must be object,null"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0!==data.name){let data0=data.name;if("string"!=typeof data0){const err1={instancePath:instancePath+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if("button 1"!==data0&&"button 2"!==data0&&"button 3"!==data0&&"button 4"!==data0&&"button 5"!==data0&&"idle"!==data0&&"powerHasBeedApplied"!==data0&&"acMainsDisconnected"!==data0&&"acMainsReconnected"!==data0&&"replaceBatterySoon"!==data0&&"replaceBatteryNow"!==data0&&"batteryOk"!==data0&&"hardwareFailure"!==data0&&"softwareFailure"!==data0&&"hardwareFailureWithCode"!==data0&&"softwareFailureWithCode"!==data0&&"motionDetection"!==data0&&"airFilterNeedsCleaned"!==data0&&"airFilterNeedsReplaced"!==data0&&"smokeDetected"!==data0&&"outsideSafeTemperatureRange"!==data0&&"outsideSafeHumidityRange"!==data0&&"scheduleMaintenance"!==data0&&"doorAjar"!==data0&&"communicationFailure"!==data0&&"communicationOk"!==data0&&"burglarAlarm"!==data0&&"fireAlarm"!==data0){const err2={instancePath:instancePath+"/name",schemaPath:"#/definitions/supportedNotifications/items/enum",keyword:"enum",params:{allowedValues:schema17.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}}if(void 0!==data.timestamp){let data1=data.timestamp;if("number"==typeof data1){if(data1<1655907956593||isNaN(data1)){const err3={instancePath:instancePath+"/timestamp",schemaPath:"#/properties/timestamp/minimum",keyword:"minimum",params:{comparison:">=",limit:1655907956593},message:"must be >= 1655907956593"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}}else{const err4={instancePath:instancePath+"/timestamp",schemaPath:"#/properties/timestamp/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}}if(void 0!==data.description&&"string"!=typeof data.description){const err5={instancePath:instancePath+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}}return validate23.errors=vErrors,0===errors}function validate22(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0===data.id){const err0={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(void 0===data.type){const err1={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if(void 0===data.driver){const err2={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"driver"},message:"must have required property 'driver'"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}if(void 0===data.supportedStates){const err3={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"supportedStates"},message:"must have required property 'supportedStates'"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}if(void 0===data.state){const err4={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"state"},message:"must have required property 'state'"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}if(void 0!==data.id){let data0=data.id;if("string"!=typeof data0){const err5={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}const _errs4=errors,_errs5=errors;if("global"!==data0&&"system"!==data0){const err6={};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}if(_errs5===errors){const err7={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}else errors=_errs4,null!==vErrors&&(_errs4?vErrors.length=_errs4:vErrors=null)}if(void 0!==data.name&&"string"!=typeof data.name){const err8={instancePath:instancePath+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}if(void 0!==data.type){let data2=data.type;if("string"!=typeof data2){const err9={instancePath:instancePath+"/type",schemaPath:"definitions.json#/definitions/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}if("alarm"!==data2&&"dimmer"!==data2&&"switch"!==data2&&"motionSensor"!==data2&&"windowCovering"!==data2&&"camera"!==data2&&"mediaSource"!==data2&&"thermostat"!==data2&&"lock"!==data2&&"courtesy"!==data2&&"gateway"!==data2&&"tv"!==data2&&"dvr"!==data2&&"appleTv"!==data2&&"discPlayer"!==data2&&"mediaPlayer"!==data2&&"uncontrolledDevice"!==data2){const err10={instancePath:instancePath+"/type",schemaPath:"definitions.json#/definitions/type/enum",keyword:"enum",params:{allowedValues:schema31.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err10]:vErrors.push(err10),errors++}}if(void 0!==data.supportedNotifications){let data3=data.supportedNotifications;if(Array.isArray(data3)){const len0=data3.length;for(let i0=0;i0<len0;i0++){let data4=data3[i0];if("button 1"!==data4&&"button 2"!==data4&&"button 3"!==data4&&"button 4"!==data4&&"button 5"!==data4&&"idle"!==data4&&"powerHasBeedApplied"!==data4&&"acMainsDisconnected"!==data4&&"acMainsReconnected"!==data4&&"replaceBatterySoon"!==data4&&"replaceBatteryNow"!==data4&&"batteryOk"!==data4&&"hardwareFailure"!==data4&&"softwareFailure"!==data4&&"hardwareFailureWithCode"!==data4&&"softwareFailureWithCode"!==data4&&"motionDetection"!==data4&&"airFilterNeedsCleaned"!==data4&&"airFilterNeedsReplaced"!==data4&&"smokeDetected"!==data4&&"outsideSafeTemperatureRange"!==data4&&"outsideSafeHumidityRange"!==data4&&"scheduleMaintenance"!==data4&&"doorAjar"!==data4&&"communicationFailure"!==data4&&"communicationOk"!==data4&&"burglarAlarm"!==data4&&"fireAlarm"!==data4){const err11={instancePath:instancePath+"/supportedNotifications/"+i0,schemaPath:"definitions.json#/definitions/supportedNotifications/items/enum",keyword:"enum",params:{allowedValues:schema15.items.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err11]:vErrors.push(err11),errors++}}let j0,i1=data3.length;if(i1>1)outer0:for(;i1--;)for(j0=i1;j0--;)if(func0(data3[i1],data3[j0])){const err12={instancePath:instancePath+"/supportedNotifications",schemaPath:"definitions.json#/definitions/supportedNotifications/uniqueItems",keyword:"uniqueItems",params:{i:i1,j:j0},message:"must NOT have duplicate items (items ## "+j0+" and "+i1+" are identical)"};null===vErrors?vErrors=[err12]:vErrors.push(err12),errors++;break outer0}}else{const err13={instancePath:instancePath+"/supportedNotifications",schemaPath:"definitions.json#/definitions/supportedNotifications/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err13]:vErrors.push(err13),errors++}}if(void 0!==data.notification&&(validate23(data.notification,{instancePath:instancePath+"/notification",parentData:data,parentDataProperty:"notification",rootData:rootData})||(vErrors=null===vErrors?validate23.errors:vErrors.concat(validate23.errors),errors=vErrors.length)),void 0!==data.driver){let data6=data.driver;if("string"!=typeof data6){const err14={instancePath:instancePath+"/driver",schemaPath:"definitions.json#/definitions/driver/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err14]:vErrors.push(err14),errors++}if("adlink"!==data6&&"aws-kinesis"!==data6&&"butler"!==data6&&"crestron"!==data6&&"dell"!==data6&&"dmp"!==data6&&"doorbird"!==data6&&"dormakaba"!==data6&&"dsc"!==data6&&"ecobee"!==data6&&"epson"!==data6&&"geovision-rs"!==data6&&"geovision-as-manager"!==data6&&"honeywell-vista"!==data6&&"igor"!==data6&&"inncom"!==data6&&"isapi"!==data6&&"kohost-k7"!==data6&&"kohost"!==data6&&"lg"!==data6&&"lg-webos"!==data6&&"lapi"!==data6&&"lirc"!==data6&&"mews"!==data6&&"mht"!==data6&&"paxton"!==data6&&"pelican-wireless"!==data6&&"power-shades"!==data6&&"rachio"!==data6&&"rebrandly"!==data6&&"rtsp"!==data6&&"salto"!==data6&&"salto-irn"!==data6&&"samsung"!==data6&&"se"!==data6&&"sendgrid"!==data6&&"sonifi"!==data6&&"stay-n-touch"!==data6&&"storable"!==data6&&"twilio"!==data6&&"unifi"!==data6&&"valcom"!==data6&&"vizio"!==data6&&"wisenet"!==data6&&"cloudflare-images"!==data6&&"cloudflare-stream"!==data6&&"insperia-privacy"!==data6){const err15={instancePath:instancePath+"/driver",schemaPath:"definitions.json#/definitions/driver/enum",keyword:"enum",params:{allowedValues:schema18.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err15]:vErrors.push(err15),errors++}}if(void 0!==data.offline&&"boolean"!=typeof data.offline){const err16={instancePath:instancePath+"/offline",schemaPath:"#/properties/offline/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err16]:vErrors.push(err16),errors++}if(void 0!==data.supportedStates){let data8=data.supportedStates;if(Array.isArray(data8)){const len1=data8.length;for(let i2=0;i2<len1;i2++){let data9=data8[i2];if("privacy"!==data9&&"service"!==data9&&"none"!==data9){const err17={instancePath:instancePath+"/supportedStates/"+i2,schemaPath:"#/properties/supportedStates/items/enum",keyword:"enum",params:{allowedValues:schema42.properties.supportedStates.items.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err17]:vErrors.push(err17),errors++}}let j1,i3=data8.length;if(i3>1)outer1:for(;i3--;)for(j1=i3;j1--;)if(func0(data8[i3],data8[j1])){const err18={instancePath:instancePath+"/supportedStates",schemaPath:"#/properties/supportedStates/uniqueItems",keyword:"uniqueItems",params:{i:i3,j:j1},message:"must NOT have duplicate items (items ## "+j1+" and "+i3+" are identical)"};null===vErrors?vErrors=[err18]:vErrors.push(err18),errors++;break outer1}}else{const err19={instancePath:instancePath+"/supportedStates",schemaPath:"#/properties/supportedStates/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err19]:vErrors.push(err19),errors++}}if(void 0!==data.state){let data10=data.state;if("string"!=typeof data10){const err20={instancePath:instancePath+"/state",schemaPath:"#/properties/state/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err20]:vErrors.push(err20),errors++}if("privacy"!==data10&&"service"!==data10&&"none"!==data10){const err21={instancePath:instancePath+"/state",schemaPath:"#/properties/supportedStates/items/enum",keyword:"enum",params:{allowedValues:schema49.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err21]:vErrors.push(err21),errors++}}if(void 0!==data.systemId&&"string"!=typeof data.systemId){const err22={instancePath:instancePath+"/systemId",schemaPath:"definitions.json#/definitions/systemId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err22]:vErrors.push(err22),errors++}if(void 0!==data.watts){let data12=data.watts;if("number"==typeof data12){if(data12<0||isNaN(data12)){const err23={instancePath:instancePath+"/watts",schemaPath:"definitions.json#/definitions/watts/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===vErrors?vErrors=[err23]:vErrors.push(err23),errors++}}else{const err24={instancePath:instancePath+"/watts",schemaPath:"definitions.json#/definitions/watts/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err24]:vErrors.push(err24),errors++}}if(void 0!==data.icon&&"string"!=typeof data.icon){const err25={instancePath:instancePath+"/icon",schemaPath:"#/properties/icon/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err25]:vErrors.push(err25),errors++}if(void 0!==data.modelNumber&&"string"!=typeof data.modelNumber){const err26={instancePath:instancePath+"/modelNumber",schemaPath:"#/properties/modelNumber/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err26]:vErrors.push(err26),errors++}if(void 0!==data.serialNumber&&"string"!=typeof data.serialNumber){const err27={instancePath:instancePath+"/serialNumber",schemaPath:"#/properties/serialNumber/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err27]:vErrors.push(err27),errors++}if(void 0!==data.firmwareVersion&&"string"!=typeof data.firmwareVersion){const err28={instancePath:instancePath+"/firmwareVersion",schemaPath:"#/properties/firmwareVersion/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err28]:vErrors.push(err28),errors++}}else{const err29={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err29]:vErrors.push(err29),errors++}return validate22.errors=vErrors,0===errors}var validateCredential=function validate25(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0===data.type&&(data.type="credential"),void 0===data.type){const err0={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(void 0===data.credential){const err1={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"credential"},message:"must have required property 'credential'"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if(void 0===data.expires){const err2={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"expires"},message:"must have required property 'expires'"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}if(void 0!==data.id){let data0=data.id;if("string"!=typeof data0){const err3={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}const _errs4=errors,_errs5=errors;if("global"!==data0&&"system"!==data0){const err4={};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}if(_errs5===errors){const err5={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}else errors=_errs4,null!==vErrors&&(_errs4?vErrors.length=_errs4:vErrors=null)}if("string"!=typeof data.type){const err6={instancePath:instancePath+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}if(void 0!==data.driver){let data2=data.driver;if("string"!=typeof data2){const err7={instancePath:instancePath+"/driver",schemaPath:"definitions.json#/definitions/driver/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}if("adlink"!==data2&&"aws-kinesis"!==data2&&"butler"!==data2&&"crestron"!==data2&&"dell"!==data2&&"dmp"!==data2&&"doorbird"!==data2&&"dormakaba"!==data2&&"dsc"!==data2&&"ecobee"!==data2&&"epson"!==data2&&"geovision-rs"!==data2&&"geovision-as-manager"!==data2&&"honeywell-vista"!==data2&&"igor"!==data2&&"inncom"!==data2&&"isapi"!==data2&&"kohost-k7"!==data2&&"kohost"!==data2&&"lg"!==data2&&"lg-webos"!==data2&&"lapi"!==data2&&"lirc"!==data2&&"mews"!==data2&&"mht"!==data2&&"paxton"!==data2&&"pelican-wireless"!==data2&&"power-shades"!==data2&&"rachio"!==data2&&"rebrandly"!==data2&&"rtsp"!==data2&&"salto"!==data2&&"salto-irn"!==data2&&"samsung"!==data2&&"se"!==data2&&"sendgrid"!==data2&&"sonifi"!==data2&&"stay-n-touch"!==data2&&"storable"!==data2&&"twilio"!==data2&&"unifi"!==data2&&"valcom"!==data2&&"vizio"!==data2&&"wisenet"!==data2&&"cloudflare-images"!==data2&&"cloudflare-stream"!==data2&&"insperia-privacy"!==data2){const err8={instancePath:instancePath+"/driver",schemaPath:"definitions.json#/definitions/driver/enum",keyword:"enum",params:{allowedValues:schema18.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}}if(void 0!==data.discriminator){let data3=data.discriminator;if("string"!=typeof data3){const err9={instancePath:instancePath+"/discriminator",schemaPath:"#/properties/discriminator/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}if("verificationCode"!==data3&&"token"!==data3&&"mobileKey"!==data3&&"pin"!==data3&&"publicKey"!==data3&&"passkeyChallenge"!==data3){const err10={instancePath:instancePath+"/discriminator",schemaPath:"#/properties/discriminator/enum",keyword:"enum",params:{allowedValues:schema52.properties.discriminator.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err10]:vErrors.push(err10),errors++}}if(void 0!==data.credential&&"string"!=typeof data.credential){const err11={instancePath:instancePath+"/credential",schemaPath:"#/properties/credential/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err11]:vErrors.push(err11),errors++}if(void 0!==data.userId&&"string"!=typeof data.userId){const err12={instancePath:instancePath+"/userId",schemaPath:"#/properties/userId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err12]:vErrors.push(err12),errors++}if(void 0!==data.organizationId&&"string"!=typeof data.organizationId){const err13={instancePath:instancePath+"/organizationId",schemaPath:"#/properties/organizationId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err13]:vErrors.push(err13),errors++}if(void 0!==data.propertyId&&"string"!=typeof data.propertyId){const err14={instancePath:instancePath+"/propertyId",schemaPath:"#/properties/propertyId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err14]:vErrors.push(err14),errors++}if(void 0!==data.deviceId&&"string"!=typeof data.deviceId){const err15={instancePath:instancePath+"/deviceId",schemaPath:"#/properties/deviceId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err15]:vErrors.push(err15),errors++}if(void 0!==data.userAgent&&"string"!=typeof data.userAgent){const err16={instancePath:instancePath+"/userAgent",schemaPath:"#/properties/userAgent/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err16]:vErrors.push(err16),errors++}if(void 0!==data.expires){let data10=data.expires;if("string"!=typeof data10&&(!data10||"object"!=typeof data10||Array.isArray(data10))&&null!==data10){const err17={instancePath:instancePath+"/expires",schemaPath:"#/properties/expires/type",keyword:"type",params:{type:schema52.properties.expires.type},message:"must be string,object,null"};null===vErrors?vErrors=[err17]:vErrors.push(err17),errors++}}if(void 0!==data.systemId&&"string"!=typeof data.systemId){const err18={instancePath:instancePath+"/systemId",schemaPath:"definitions.json#/definitions/systemId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err18]:vErrors.push(err18),errors++}}else{const err19={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err19]:vErrors.push(err19),errors++}return validate25.errors=vErrors,0===errors},schema52={$schema:"http://json-schema.org/draft-07/schema",$id:"credential.json",title:"Credential",type:"object",required:["type","credential","expires"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",default:"credential"},driver:{$ref:"definitions.json#/definitions/driver"},discriminator:{type:"string",enum:["verificationCode","token","mobileKey","pin","publicKey","passkeyChallenge"]},credential:{type:"string"},userId:{type:"string"},organizationId:{type:"string"},propertyId:{type:"string"},deviceId:{type:"string"},userAgent:{type:"string"},expires:{type:["string","object","null"]},systemId:{$ref:"definitions.json#/definitions/systemId"}}};var validateDeviceRouter=function validate26(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0===data.type&&(data.type="deviceRouter"),void 0===data.driver){const err0={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"driver"},message:"must have required property 'driver'"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(void 0===data.organizationId){const err1={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"organizationId"},message:"must have required property 'organizationId'"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if(void 0!==data.id){let data0=data.id;if("string"!=typeof data0){const err2={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}const _errs4=errors,_errs5=errors;if("global"!==data0&&"system"!==data0){const err3={};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}if(_errs5===errors){const err4={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}else errors=_errs4,null!==vErrors&&(_errs4?vErrors.length=_errs4:vErrors=null)}let data1=data.type;if("string"!=typeof data1){const err5={instancePath:instancePath+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}if("deviceRouter"!==data1){const err6={instancePath:instancePath+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:schema56.properties.type.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}if(void 0!==data.driver&&"string"!=typeof data.driver){const err7={instancePath:instancePath+"/driver",schemaPath:"#/properties/driver/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}if(void 0!==data.organizationId){let data3=data.organizationId;if("string"!=typeof data3&&null!==data3){const err8={instancePath:instancePath+"/organizationId",schemaPath:"#/properties/organizationId/type",keyword:"type",params:{type:schema56.properties.organizationId.type},message:"must be string,null"};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}}if(void 0!==data.devices){let data4=data.devices;if(!data4||"object"!=typeof data4||Array.isArray(data4)){const err9={instancePath:instancePath+"/devices",schemaPath:"#/properties/devices/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}}}else{const err10={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err10]:vErrors.push(err10),errors++}return validate26.errors=vErrors,0===errors},schema56={$schema:"http://json-schema.org/draft-07/schema",$id:"deviceRouter.json",title:"Device Router",description:"A device router contains instructions on where to route devices based on their organization and driver.",type:"object",required:["driver","organizationId"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",default:"deviceRouter",enum:["deviceRouter"]},driver:{type:"string"},organizationId:{type:["string","null"],description:"Reference (id) to the organization that owns this router"},devices:{type:"object",additionalProperties:!0}}};var validateDimmer=validate27,schema58={$schema:"http://json-schema.org/draft-07/schema",$id:"dimmer.json",title:"Dimmer",description:"Any smart dimmer",type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},name:{type:"string"},type:{$ref:"definitions.json#/definitions/type"},supportedNotifications:{$ref:"definitions.json#/definitions/supportedNotifications"},notification:{$ref:"definitions.json#/definitions/notification"},driver:{$ref:"definitions.json#/definitions/driver"},offline:{type:"boolean"},level:{type:["number","null"],minimum:0,maximum:100},systemId:{$ref:"definitions.json#/definitions/systemId"},watts:{$ref:"definitions.json#/definitions/watts"},icon:{type:"string"},modelNumber:{type:"string"},serialNumber:{type:"string"},firmwareVersion:{type:"string"}},required:["id","type","level","driver"]};function validate28(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if((!data||"object"!=typeof data||Array.isArray(data))&&null!==data){const err0={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:schema16.type},message:"must be object,null"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0!==data.name){let data0=data.name;if("string"!=typeof data0){const err1={instancePath:instancePath+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if("button 1"!==data0&&"button 2"!==data0&&"button 3"!==data0&&"button 4"!==data0&&"button 5"!==data0&&"idle"!==data0&&"powerHasBeedApplied"!==data0&&"acMainsDisconnected"!==data0&&"acMainsReconnected"!==data0&&"replaceBatterySoon"!==data0&&"replaceBatteryNow"!==data0&&"batteryOk"!==data0&&"hardwareFailure"!==data0&&"softwareFailure"!==data0&&"hardwareFailureWithCode"!==data0&&"softwareFailureWithCode"!==data0&&"motionDetection"!==data0&&"airFilterNeedsCleaned"!==data0&&"airFilterNeedsReplaced"!==data0&&"smokeDetected"!==data0&&"outsideSafeTemperatureRange"!==data0&&"outsideSafeHumidityRange"!==data0&&"scheduleMaintenance"!==data0&&"doorAjar"!==data0&&"communicationFailure"!==data0&&"communicationOk"!==data0&&"burglarAlarm"!==data0&&"fireAlarm"!==data0){const err2={instancePath:instancePath+"/name",schemaPath:"#/definitions/supportedNotifications/items/enum",keyword:"enum",params:{allowedValues:schema17.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}}if(void 0!==data.timestamp){let data1=data.timestamp;if("number"==typeof data1){if(data1<1655907956593||isNaN(data1)){const err3={instancePath:instancePath+"/timestamp",schemaPath:"#/properties/timestamp/minimum",keyword:"minimum",params:{comparison:">=",limit:1655907956593},message:"must be >= 1655907956593"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}}else{const err4={instancePath:instancePath+"/timestamp",schemaPath:"#/properties/timestamp/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}}if(void 0!==data.description&&"string"!=typeof data.description){const err5={instancePath:instancePath+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}}return validate28.errors=vErrors,0===errors}function validate27(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0===data.id){const err0={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(void 0===data.type){const err1={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if(void 0===data.level){const err2={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"level"},message:"must have required property 'level'"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}if(void 0===data.driver){const err3={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"driver"},message:"must have required property 'driver'"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}if(void 0!==data.id){let data0=data.id;if("string"!=typeof data0){const err4={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}const _errs4=errors,_errs5=errors;if("global"!==data0&&"system"!==data0){const err5={};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}if(_errs5===errors){const err6={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}else errors=_errs4,null!==vErrors&&(_errs4?vErrors.length=_errs4:vErrors=null)}if(void 0!==data.name&&"string"!=typeof data.name){const err7={instancePath:instancePath+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}if(void 0!==data.type){let data2=data.type;if("string"!=typeof data2){const err8={instancePath:instancePath+"/type",schemaPath:"definitions.json#/definitions/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}if("alarm"!==data2&&"dimmer"!==data2&&"switch"!==data2&&"motionSensor"!==data2&&"windowCovering"!==data2&&"camera"!==data2&&"mediaSource"!==data2&&"thermostat"!==data2&&"lock"!==data2&&"courtesy"!==data2&&"gateway"!==data2&&"tv"!==data2&&"dvr"!==data2&&"appleTv"!==data2&&"discPlayer"!==data2&&"mediaPlayer"!==data2&&"uncontrolledDevice"!==data2){const err9={instancePath:instancePath+"/type",schemaPath:"definitions.json#/definitions/type/enum",keyword:"enum",params:{allowedValues:schema31.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}}if(void 0!==data.supportedNotifications){let data3=data.supportedNotifications;if(Array.isArray(data3)){const len0=data3.length;for(let i0=0;i0<len0;i0++){let data4=data3[i0];if("button 1"!==data4&&"button 2"!==data4&&"button 3"!==data4&&"button 4"!==data4&&"button 5"!==data4&&"idle"!==data4&&"powerHasBeedApplied"!==data4&&"acMainsDisconnected"!==data4&&"acMainsReconnected"!==data4&&"replaceBatterySoon"!==data4&&"replaceBatteryNow"!==data4&&"batteryOk"!==data4&&"hardwareFailure"!==data4&&"softwareFailure"!==data4&&"hardwareFailureWithCode"!==data4&&"softwareFailureWithCode"!==data4&&"motionDetection"!==data4&&"airFilterNeedsCleaned"!==data4&&"airFilterNeedsReplaced"!==data4&&"smokeDetected"!==data4&&"outsideSafeTemperatureRange"!==data4&&"outsideSafeHumidityRange"!==data4&&"scheduleMaintenance"!==data4&&"doorAjar"!==data4&&"communicationFailure"!==data4&&"communicationOk"!==data4&&"burglarAlarm"!==data4&&"fireAlarm"!==data4){const err10={instancePath:instancePath+"/supportedNotifications/"+i0,schemaPath:"definitions.json#/definitions/supportedNotifications/items/enum",keyword:"enum",params:{allowedValues:schema15.items.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err10]:vErrors.push(err10),errors++}}let j0,i1=data3.length;if(i1>1)outer0:for(;i1--;)for(j0=i1;j0--;)if(func0(data3[i1],data3[j0])){const err11={instancePath:instancePath+"/supportedNotifications",schemaPath:"definitions.json#/definitions/supportedNotifications/uniqueItems",keyword:"uniqueItems",params:{i:i1,j:j0},message:"must NOT have duplicate items (items ## "+j0+" and "+i1+" are identical)"};null===vErrors?vErrors=[err11]:vErrors.push(err11),errors++;break outer0}}else{const err12={instancePath:instancePath+"/supportedNotifications",schemaPath:"definitions.json#/definitions/supportedNotifications/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err12]:vErrors.push(err12),errors++}}if(void 0!==data.notification&&(validate28(data.notification,{instancePath:instancePath+"/notification",parentData:data,parentDataProperty:"notification",rootData:rootData})||(vErrors=null===vErrors?validate28.errors:vErrors.concat(validate28.errors),errors=vErrors.length)),void 0!==data.driver){let data6=data.driver;if("string"!=typeof data6){const err13={instancePath:instancePath+"/driver",schemaPath:"definitions.json#/definitions/driver/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err13]:vErrors.push(err13),errors++}if("adlink"!==data6&&"aws-kinesis"!==data6&&"butler"!==data6&&"crestron"!==data6&&"dell"!==data6&&"dmp"!==data6&&"doorbird"!==data6&&"dormakaba"!==data6&&"dsc"!==data6&&"ecobee"!==data6&&"epson"!==data6&&"geovision-rs"!==data6&&"geovision-as-manager"!==data6&&"honeywell-vista"!==data6&&"igor"!==data6&&"inncom"!==data6&&"isapi"!==data6&&"kohost-k7"!==data6&&"kohost"!==data6&&"lg"!==data6&&"lg-webos"!==data6&&"lapi"!==data6&&"lirc"!==data6&&"mews"!==data6&&"mht"!==data6&&"paxton"!==data6&&"pelican-wireless"!==data6&&"power-shades"!==data6&&"rachio"!==data6&&"rebrandly"!==data6&&"rtsp"!==data6&&"salto"!==data6&&"salto-irn"!==data6&&"samsung"!==data6&&"se"!==data6&&"sendgrid"!==data6&&"sonifi"!==data6&&"stay-n-touch"!==data6&&"storable"!==data6&&"twilio"!==data6&&"unifi"!==data6&&"valcom"!==data6&&"vizio"!==data6&&"wisenet"!==data6&&"cloudflare-images"!==data6&&"cloudflare-stream"!==data6&&"insperia-privacy"!==data6){const err14={instancePath:instancePath+"/driver",schemaPath:"definitions.json#/definitions/driver/enum",keyword:"enum",params:{allowedValues:schema18.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err14]:vErrors.push(err14),errors++}}if(void 0!==data.offline&&"boolean"!=typeof data.offline){const err15={instancePath:instancePath+"/offline",schemaPath:"#/properties/offline/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err15]:vErrors.push(err15),errors++}if(void 0!==data.level){let data8=data.level;if("number"!=typeof data8&&null!==data8){const err16={instancePath:instancePath+"/level",schemaPath:"#/properties/level/type",keyword:"type",params:{type:schema58.properties.level.type},message:"must be number,null"};null===vErrors?vErrors=[err16]:vErrors.push(err16),errors++}if("number"==typeof data8){if(data8>100||isNaN(data8)){const err17={instancePath:instancePath+"/level",schemaPath:"#/properties/level/maximum",keyword:"maximum",params:{comparison:"<=",limit:100},message:"must be <= 100"};null===vErrors?vErrors=[err17]:vErrors.push(err17),errors++}if(data8<0||isNaN(data8)){const err18={instancePath:instancePath+"/level",schemaPath:"#/properties/level/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===vErrors?vErrors=[err18]:vErrors.push(err18),errors++}}}if(void 0!==data.systemId&&"string"!=typeof data.systemId){const err19={instancePath:instancePath+"/systemId",schemaPath:"definitions.json#/definitions/systemId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err19]:vErrors.push(err19),errors++}if(void 0!==data.watts){let data10=data.watts;if("number"==typeof data10){if(data10<0||isNaN(data10)){const err20={instancePath:instancePath+"/watts",schemaPath:"definitions.json#/definitions/watts/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===vErrors?vErrors=[err20]:vErrors.push(err20),errors++}}else{const err21={instancePath:instancePath+"/watts",schemaPath:"definitions.json#/definitions/watts/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err21]:vErrors.push(err21),errors++}}if(void 0!==data.icon&&"string"!=typeof data.icon){const err22={instancePath:instancePath+"/icon",schemaPath:"#/properties/icon/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err22]:vErrors.push(err22),errors++}if(void 0!==data.modelNumber&&"string"!=typeof data.modelNumber){const err23={instancePath:instancePath+"/modelNumber",schemaPath:"#/properties/modelNumber/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err23]:vErrors.push(err23),errors++}if(void 0!==data.serialNumber&&"string"!=typeof data.serialNumber){const err24={instancePath:instancePath+"/serialNumber",schemaPath:"#/properties/serialNumber/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err24]:vErrors.push(err24),errors++}if(void 0!==data.firmwareVersion&&"string"!=typeof data.firmwareVersion){const err25={instancePath:instancePath+"/firmwareVersion",schemaPath:"#/properties/firmwareVersion/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err25]:vErrors.push(err25),errors++}}else{const err26={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err26]:vErrors.push(err26),errors++}return validate27.errors=vErrors,0===errors}var validateDiscoveredDevice=function validate30(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0===data.type&&(data.type="discoveredDevice"),void 0===data.name){const err0={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(void 0===data.deviceId){const err1={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"deviceId"},message:"must have required property 'deviceId'"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if(void 0===data.deviceData){const err2={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"deviceData"},message:"must have required property 'deviceData'"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}if(void 0!==data.id){let data0=data.id;if("string"!=typeof data0){const err3={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}const _errs4=errors,_errs5=errors;if("global"!==data0&&"system"!==data0){const err4={};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}if(_errs5===errors){const err5={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}else errors=_errs4,null!==vErrors&&(_errs4?vErrors.length=_errs4:vErrors=null)}if(void 0!==data.name&&"string"!=typeof data.name){const err6={instancePath:instancePath+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}if(void 0!==data.deviceId&&"string"!=typeof data.deviceId){const err7={instancePath:instancePath+"/deviceId",schemaPath:"#/properties/deviceId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}let data3=data.type;if("string"!=typeof data3){const err8={instancePath:instancePath+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}if("discoveredDevice"!==data3){const err9={instancePath:instancePath+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:schema67.properties.type.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}if(void 0!==data.discriminator){let data4=data.discriminator;if("string"!=typeof data4){const err10={instancePath:instancePath+"/discriminator",schemaPath:"definitions.json#/definitions/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err10]:vErrors.push(err10),errors++}if("alarm"!==data4&&"dimmer"!==data4&&"switch"!==data4&&"motionSensor"!==data4&&"windowCovering"!==data4&&"camera"!==data4&&"mediaSource"!==data4&&"thermostat"!==data4&&"lock"!==data4&&"courtesy"!==data4&&"gateway"!==data4&&"tv"!==data4&&"dvr"!==data4&&"appleTv"!==data4&&"discPlayer"!==data4&&"mediaPlayer"!==data4&&"uncontrolledDevice"!==data4){const err11={instancePath:instancePath+"/discriminator",schemaPath:"definitions.json#/definitions/type/enum",keyword:"enum",params:{allowedValues:schema31.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err11]:vErrors.push(err11),errors++}}if(void 0!==data.driver&&"string"!=typeof data.driver){const err12={instancePath:instancePath+"/driver",schemaPath:"#/properties/driver/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err12]:vErrors.push(err12),errors++}if(void 0!==data.deviceData){let data6=data.deviceData;if(!data6||"object"!=typeof data6||Array.isArray(data6)){const err13={instancePath:instancePath+"/deviceData",schemaPath:"#/properties/deviceData/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err13]:vErrors.push(err13),errors++}}if(void 0!==data.ignore&&"boolean"!=typeof data.ignore){const err14={instancePath:instancePath+"/ignore",schemaPath:"#/properties/ignore/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err14]:vErrors.push(err14),errors++}if(void 0!==data.organizationId){let data8=data.organizationId;if("string"!=typeof data8&&null!==data8){const err15={instancePath:instancePath+"/organizationId",schemaPath:"#/properties/organizationId/type",keyword:"type",params:{type:schema67.properties.organizationId.type},message:"must be string,null"};null===vErrors?vErrors=[err15]:vErrors.push(err15),errors++}}if(void 0!==data.propertyId){let data9=data.propertyId;if("string"!=typeof data9&&null!==data9){const err16={instancePath:instancePath+"/propertyId",schemaPath:"#/properties/propertyId/type",keyword:"type",params:{type:schema67.properties.propertyId.type},message:"must be string,null"};null===vErrors?vErrors=[err16]:vErrors.push(err16),errors++}}}else{const err17={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err17]:vErrors.push(err17),errors++}return validate30.errors=vErrors,0===errors},schema67={$schema:"http://json-schema.org/draft-07/schema",$id:"discoveredDevice.json",title:"Discovered Device",description:"A device that has been discovered by Kohost, but not yet added to the Kohost system.",type:"object",required:["name","deviceId","deviceData"],properties:{id:{$ref:"definitions.json#/definitions/id"},name:{type:"string"},deviceId:{type:"string"},type:{type:"string",enum:["discoveredDevice"],default:"discoveredDevice"},discriminator:{$ref:"definitions.json#/definitions/type"},driver:{type:"string"},deviceData:{type:"object"},ignore:{type:"boolean"},organizationId:{type:["string","null"],description:"Reference (id) to the organization that owns this device"},propertyId:{type:["string","null"],description:"Reference (id) to the property that this device belongs to"}}};var validateEmailMessage=function validate31(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0===data.type&&(data.type="emailMessage"),void 0===data.to){const err0={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"to"},message:"must have required property 'to'"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(void 0===data.from){const err1={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"from"},message:"must have required property 'from'"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if(void 0===data.status){const err2={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"status"},message:"must have required property 'status'"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}if(void 0===data.subject){const err3={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"subject"},message:"must have required property 'subject'"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}if(void 0!==data.id){let data0=data.id;if("string"!=typeof data0){const err4={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}const _errs4=errors,_errs5=errors;if("global"!==data0&&"system"!==data0){const err5={};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}if(_errs5===errors){const err6={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}else errors=_errs4,null!==vErrors&&(_errs4?vErrors.length=_errs4:vErrors=null)}let data1=data.type;if("string"!=typeof data1){const err7={instancePath:instancePath+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}if("emailMessage"!==data1){const err8={instancePath:instancePath+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:schema70.properties.type.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}if(void 0!==data.to){let data2=data.to;if("string"==typeof data2){if(!pattern0.test(data2)){const err9={instancePath:instancePath+"/to",schemaPath:"#/properties/to/pattern",keyword:"pattern",params:{pattern:"^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\\.[a-zA-Z0-9-.]+$"},message:'must match pattern "^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\\.[a-zA-Z0-9-.]+$"'};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}}else{const err10={instancePath:instancePath+"/to",schemaPath:"#/properties/to/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err10]:vErrors.push(err10),errors++}}if(void 0!==data.from){let data3=data.from;if("string"==typeof data3){if(!pattern1.test(data3)){const err11={instancePath:instancePath+"/from",schemaPath:"#/properties/from/pattern",keyword:"pattern",params:{pattern:".*<[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\\.[a-zA-Z0-9-.]+>.*"},message:'must match pattern ".*<[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\\.[a-zA-Z0-9-.]+>.*"'};null===vErrors?vErrors=[err11]:vErrors.push(err11),errors++}}else{const err12={instancePath:instancePath+"/from",schemaPath:"#/properties/from/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err12]:vErrors.push(err12),errors++}}if(void 0!==data.subject&&"string"!=typeof data.subject){const err13={instancePath:instancePath+"/subject",schemaPath:"#/properties/subject/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err13]:vErrors.push(err13),errors++}if(void 0!==data.status){let data5=data.status;if("string"!=typeof data5){const err14={instancePath:instancePath+"/status",schemaPath:"#/properties/status/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err14]:vErrors.push(err14),errors++}if("queued"!==data5&&"sending"!==data5&&"sent"!==data5&&"deferred"!==data5&&"delivered"!==data5&&"undelivered"!==data5&&"bounced"!==data5&&"blocked"!==data5&&"receiving"!==data5&&"received"!==data5&&"opened"!==data5&&"clicked"!==data5&&"unsubscribed"!==data5&&"spamReport"!==data5){const err15={instancePath:instancePath+"/status",schemaPath:"#/properties/status/enum",keyword:"enum",params:{allowedValues:schema70.properties.status.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err15]:vErrors.push(err15),errors++}}if(void 0!==data.statusMessage&&"string"!=typeof data.statusMessage){const err16={instancePath:instancePath+"/statusMessage",schemaPath:"#/properties/statusMessage/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err16]:vErrors.push(err16),errors++}if(void 0!==data.html&&"string"!=typeof data.html){const err17={instancePath:instancePath+"/html",schemaPath:"#/properties/html/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err17]:vErrors.push(err17),errors++}if(void 0!==data.text&&"string"!=typeof data.text){const err18={instancePath:instancePath+"/text",schemaPath:"#/properties/text/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err18]:vErrors.push(err18),errors++}if(void 0!==data.driver&&"string"!=typeof data.driver){const err19={instancePath:instancePath+"/driver",schemaPath:"#/properties/driver/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err19]:vErrors.push(err19),errors++}if(void 0!==data.appData){let data10=data.appData;if(!data10||"object"!=typeof data10||Array.isArray(data10)){const err20={instancePath:instancePath+"/appData",schemaPath:"#/properties/appData/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err20]:vErrors.push(err20),errors++}}if(void 0!==data.createdAt){let data11=data.createdAt;if("string"!=typeof data11&&(!data11||"object"!=typeof data11||Array.isArray(data11))){const err21={instancePath:instancePath+"/createdAt",schemaPath:"definitions.json#/definitions/date/type",keyword:"type",params:{type:schema25.type},message:"must be string,object"};null===vErrors?vErrors=[err21]:vErrors.push(err21),errors++}if("string"==typeof data11&&!formats4.validate(data11)){const err22={instancePath:instancePath+"/createdAt",schemaPath:"definitions.json#/definitions/date/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err22]:vErrors.push(err22),errors++}}if(void 0!==data.updatedAt){let data12=data.updatedAt;if("string"!=typeof data12&&(!data12||"object"!=typeof data12||Array.isArray(data12))){const err23={instancePath:instancePath+"/updatedAt",schemaPath:"definitions.json#/definitions/date/type",keyword:"type",params:{type:schema25.type},message:"must be string,object"};null===vErrors?vErrors=[err23]:vErrors.push(err23),errors++}if("string"==typeof data12&&!formats4.validate(data12)){const err24={instancePath:instancePath+"/updatedAt",schemaPath:"definitions.json#/definitions/date/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err24]:vErrors.push(err24),errors++}}if(void 0!==data.systemId&&"string"!=typeof data.systemId){const err25={instancePath:instancePath+"/systemId",schemaPath:"definitions.json#/definitions/systemId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err25]:vErrors.push(err25),errors++}}else{const err26={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err26]:vErrors.push(err26),errors++}return validate31.errors=vErrors,0===errors},schema70={$schema:"http://json-schema.org/draft-07/schema",$id:"emailMessage.json",title:"Email Message",type:"object",required:["to","from","status","subject"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",default:"emailMessage",enum:["emailMessage"]},to:{type:"string",pattern:"^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\\.[a-zA-Z0-9-.]+$"},from:{type:"string",pattern:".*<[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\\.[a-zA-Z0-9-.]+>.*",description:"Must be in the format of 'Sender <email@example.com>"},subject:{type:"string"},status:{type:"string",enum:["queued","sending","sent","deferred","delivered","undelivered","bounced","blocked","receiving","received","opened","clicked","unsubscribed","spamReport"]},statusMessage:{type:"string"},html:{type:"string"},text:{type:"string"},driver:{type:"string"},appData:{type:"object"},createdAt:{$ref:"definitions.json#/definitions/date"},updatedAt:{$ref:"definitions.json#/definitions/date"},systemId:{$ref:"definitions.json#/definitions/systemId"}}},pattern0=new RegExp("^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\\.[a-zA-Z0-9-.]+$","u"),pattern1=new RegExp(".*<[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\\.[a-zA-Z0-9-.]+>.*","u");var validateEnergyReport=function validate32(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0===data.type&&(data.type="energyReport"),void 0===data.id){const err0={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(void 0===data.type){const err1={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if(void 0===data.roomId){const err2={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"roomId"},message:"must have required property 'roomId'"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}if(void 0===data.first){const err3={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"first"},message:"must have required property 'first'"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}if(void 0===data.last){const err4={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"last"},message:"must have required property 'last'"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}if(void 0===data.consumption){const err5={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"consumption"},message:"must have required property 'consumption'"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}if(void 0===data.totals){const err6={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"totals"},message:"must have required property 'totals'"};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}if(void 0===data.costPerKw){const err7={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"costPerKw"},message:"must have required property 'costPerKw'"};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}if(void 0!==data.id){let data0=data.id;if("string"!=typeof data0){const err8={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}const _errs4=errors,_errs5=errors;if("global"!==data0&&"system"!==data0){const err9={};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}if(_errs5===errors){const err10={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err10]:vErrors.push(err10),errors++}else errors=_errs4,null!==vErrors&&(_errs4?vErrors.length=_errs4:vErrors=null)}let data1=data.type;if("string"!=typeof data1){const err11={instancePath:instancePath+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err11]:vErrors.push(err11),errors++}if("energyReport"!==data1){const err12={instancePath:instancePath+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:schema75.properties.type.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err12]:vErrors.push(err12),errors++}if(void 0!==data.reportTime){let data2=data.reportTime;if("hourly"!==data2&&"daily"!==data2&&"monthly"!==data2){const err13={instancePath:instancePath+"/reportTime",schemaPath:"#/properties/reportTime/enum",keyword:"enum",params:{allowedValues:schema75.properties.reportTime.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err13]:vErrors.push(err13),errors++}}if(void 0!==data.roomId){let data3=data.roomId;if("string"!=typeof data3){const err14={instancePath:instancePath+"/roomId",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err14]:vErrors.push(err14),errors++}const _errs12=errors,_errs13=errors;if("global"!==data3&&"system"!==data3){const err15={};null===vErrors?vErrors=[err15]:vErrors.push(err15),errors++}if(_errs13===errors){const err16={instancePath:instancePath+"/roomId",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err16]:vErrors.push(err16),errors++}else errors=_errs12,null!==vErrors&&(_errs12?vErrors.length=_errs12:vErrors=null)}if(void 0!==data.first){let data4=data.first;if("string"!=typeof data4&&(!data4||"object"!=typeof data4||Array.isArray(data4))){const err17={instancePath:instancePath+"/first",schemaPath:"#/properties/first/type",keyword:"type",params:{type:schema75.properties.first.type},message:"must be string,object"};null===vErrors?vErrors=[err17]:vErrors.push(err17),errors++}if("string"==typeof data4&&!formats4.validate(data4)){const err18={instancePath:instancePath+"/first",schemaPath:"#/properties/first/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err18]:vErrors.push(err18),errors++}}if(void 0!==data.last){let data5=data.last;if("string"!=typeof data5&&(!data5||"object"!=typeof data5||Array.isArray(data5))){const err19={instancePath:instancePath+"/last",schemaPath:"#/properties/last/type",keyword:"type",params:{type:schema75.properties.last.type},message:"must be string,object"};null===vErrors?vErrors=[err19]:vErrors.push(err19),errors++}if("string"==typeof data5&&!formats4.validate(data5)){const err20={instancePath:instancePath+"/last",schemaPath:"#/properties/last/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err20]:vErrors.push(err20),errors++}}if(void 0!==data.consumption){let data6=data.consumption;if(Array.isArray(data6)){const len0=data6.length;for(let i0=0;i0<len0;i0++){let data7=data6[i0];if(data7&&"object"==typeof data7&&!Array.isArray(data7)){if(void 0===data7.id){const err21={instancePath:instancePath+"/consumption/"+i0,schemaPath:"#/properties/consumption/items/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};null===vErrors?vErrors=[err21]:vErrors.push(err21),errors++}if(void 0===data7.type){const err22={instancePath:instancePath+"/consumption/"+i0,schemaPath:"#/properties/consumption/items/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===vErrors?vErrors=[err22]:vErrors.push(err22),errors++}if(void 0===data7.kwh){const err23={instancePath:instancePath+"/consumption/"+i0,schemaPath:"#/properties/consumption/items/required",keyword:"required",params:{missingProperty:"kwh"},message:"must have required property 'kwh'"};null===vErrors?vErrors=[err23]:vErrors.push(err23),errors++}if(void 0!==data7.id){let data8=data7.id;if("string"!=typeof data8){const err24={instancePath:instancePath+"/consumption/"+i0+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err24]:vErrors.push(err24),errors++}const _errs25=errors,_errs26=errors;if("global"!==data8&&"system"!==data8){const err25={};null===vErrors?vErrors=[err25]:vErrors.push(err25),errors++}if(_errs26===errors){const err26={instancePath:instancePath+"/consumption/"+i0+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err26]:vErrors.push(err26),errors++}else errors=_errs25,null!==vErrors&&(_errs25?vErrors.length=_errs25:vErrors=null)}if(void 0!==data7.type){let data9=data7.type;if("string"!=typeof data9){const err27={instancePath:instancePath+"/consumption/"+i0+"/type",schemaPath:"definitions.json#/definitions/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err27]:vErrors.push(err27),errors++}if("alarm"!==data9&&"dimmer"!==data9&&"switch"!==data9&&"motionSensor"!==data9&&"windowCovering"!==data9&&"camera"!==data9&&"mediaSource"!==data9&&"thermostat"!==data9&&"lock"!==data9&&"courtesy"!==data9&&"gateway"!==data9&&"tv"!==data9&&"dvr"!==data9&&"appleTv"!==data9&&"discPlayer"!==data9&&"mediaPlayer"!==data9&&"uncontrolledDevice"!==data9){const err28={instancePath:instancePath+"/consumption/"+i0+"/type",schemaPath:"definitions.json#/definitions/type/enum",keyword:"enum",params:{allowedValues:schema31.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err28]:vErrors.push(err28),errors++}}if(void 0!==data7.kwh){let data10=data7.kwh;if("number"==typeof data10){if(data10<0||isNaN(data10)){const err29={instancePath:instancePath+"/consumption/"+i0+"/kwh",schemaPath:"#/properties/consumption/items/properties/kwh/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===vErrors?vErrors=[err29]:vErrors.push(err29),errors++}}else{const err30={instancePath:instancePath+"/consumption/"+i0+"/kwh",schemaPath:"#/properties/consumption/items/properties/kwh/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err30]:vErrors.push(err30),errors++}}}else{const err31={instancePath:instancePath+"/consumption/"+i0,schemaPath:"#/properties/consumption/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err31]:vErrors.push(err31),errors++}}}else{const err32={instancePath:instancePath+"/consumption",schemaPath:"#/properties/consumption/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err32]:vErrors.push(err32),errors++}}if(void 0!==data.totals){let data11=data.totals;if(Array.isArray(data11)){const len1=data11.length;for(let i1=0;i1<len1;i1++){let data12=data11[i1];if(data12&&"object"==typeof data12&&!Array.isArray(data12)){if(void 0===data12.lights){const err33={instancePath:instancePath+"/totals/"+i1,schemaPath:"#/properties/totals/items/required",keyword:"required",params:{missingProperty:"lights"},message:"must have required property 'lights'"};null===vErrors?vErrors=[err33]:vErrors.push(err33),errors++}if(void 0===data12.climate){const err34={instancePath:instancePath+"/totals/"+i1,schemaPath:"#/properties/totals/items/required",keyword:"required",params:{missingProperty:"climate"},message:"must have required property 'climate'"};null===vErrors?vErrors=[err34]:vErrors.push(err34),errors++}if(void 0===data12.media){const err35={instancePath:instancePath+"/totals/"+i1,schemaPath:"#/properties/totals/items/required",keyword:"required",params:{missingProperty:"media"},message:"must have required property 'media'"};null===vErrors?vErrors=[err35]:vErrors.push(err35),errors++}if(void 0!==data12.lights){let data13=data12.lights;if("number"==typeof data13){if(data13<0||isNaN(data13)){const err36={instancePath:instancePath+"/totals/"+i1+"/lights",schemaPath:"#/properties/totals/items/properties/lights/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===vErrors?vErrors=[err36]:vErrors.push(err36),errors++}}else{const err37={instancePath:instancePath+"/totals/"+i1+"/lights",schemaPath:"#/properties/totals/items/properties/lights/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err37]:vErrors.push(err37),errors++}}if(void 0!==data12.climate){let data14=data12.climate;if("number"==typeof data14){if(data14<0||isNaN(data14)){const err38={instancePath:instancePath+"/totals/"+i1+"/climate",schemaPath:"#/properties/totals/items/properties/climate/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===vErrors?vErrors=[err38]:vErrors.push(err38),errors++}}else{const err39={instancePath:instancePath+"/totals/"+i1+"/climate",schemaPath:"#/properties/totals/items/properties/climate/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err39]:vErrors.push(err39),errors++}}if(void 0!==data12.media){let data15=data12.media;if("number"==typeof data15){if(data15<0||isNaN(data15)){const err40={instancePath:instancePath+"/totals/"+i1+"/media",schemaPath:"#/properties/totals/items/properties/media/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===vErrors?vErrors=[err40]:vErrors.push(err40),errors++}}else{const err41={instancePath:instancePath+"/totals/"+i1+"/media",schemaPath:"#/properties/totals/items/properties/media/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err41]:vErrors.push(err41),errors++}}}else{const err42={instancePath:instancePath+"/totals/"+i1,schemaPath:"#/properties/totals/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err42]:vErrors.push(err42),errors++}}}else{const err43={instancePath:instancePath+"/totals",schemaPath:"#/properties/totals/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err43]:vErrors.push(err43),errors++}}if(void 0!==data.costPerKw){let data16=data.costPerKw;if("number"==typeof data16){if(data16<0||isNaN(data16)){const err44={instancePath:instancePath+"/costPerKw",schemaPath:"#/properties/costPerKw/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===vErrors?vErrors=[err44]:vErrors.push(err44),errors++}}else{const err45={instancePath:instancePath+"/costPerKw",schemaPath:"#/properties/costPerKw/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err45]:vErrors.push(err45),errors++}}}else{const err46={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err46]:vErrors.push(err46),errors++}return validate32.errors=vErrors,0===errors},schema75={$schema:"http://json-schema.org/draft-07/schema",$id:"energyReport.json",title:"Energy Report",description:"Hourly Report for Energy based on energy report shards",type:"object",required:["id","type","roomId","first","last","consumption","totals","costPerKw"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",enum:["energyReport"],default:"energyReport"},reportTime:{time:"string",enum:["hourly","daily","monthly"]},roomId:{$ref:"definitions.json#/definitions/id"},first:{type:["string","object"],format:"date-time"},last:{type:["string","object"],format:"date-time"},consumption:{type:"array",items:{type:"object",required:["id","type","kwh"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{$ref:"definitions.json#/definitions/type"},kwh:{type:"number",minimum:0}}}},totals:{type:"array",items:{type:"object",required:["lights","climate","media"],properties:{lights:{type:"number",minimum:0},climate:{type:"number",minimum:0},media:{type:"number",minimum:0}}}},costPerKw:{type:"number",minimum:0}}};var validateEnergyReportShard=function validate33(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0===data.type&&(data.type="energyReportShard"),void 0===data.ndata&&(data.ndata=0),void 0===data.id){const err0={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(void 0===data.type){const err1={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if(void 0===data.roomId){const err2={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"roomId"},message:"must have required property 'roomId'"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}if(void 0===data.first){const err3={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"first"},message:"must have required property 'first'"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}if(void 0===data.last){const err4={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"last"},message:"must have required property 'last'"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}if(void 0===data.data){const err5={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"data"},message:"must have required property 'data'"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}if(void 0===data.ndata){const err6={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"ndata"},message:"must have required property 'ndata'"};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}if(void 0===data.expires){const err7={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"expires"},message:"must have required property 'expires'"};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}if(void 0!==data.id){let data0=data.id;if("string"!=typeof data0){const err8={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}const _errs4=errors,_errs5=errors;if("global"!==data0&&"system"!==data0){const err9={};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}if(_errs5===errors){const err10={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err10]:vErrors.push(err10),errors++}else errors=_errs4,null!==vErrors&&(_errs4?vErrors.length=_errs4:vErrors=null)}let data1=data.type;if("string"!=typeof data1){const err11={instancePath:instancePath+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err11]:vErrors.push(err11),errors++}if("energyReportShard"!==data1){const err12={instancePath:instancePath+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:schema80.properties.type.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err12]:vErrors.push(err12),errors++}if(void 0!==data.roomId){let data2=data.roomId;if("string"!=typeof data2){const err13={instancePath:instancePath+"/roomId",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err13]:vErrors.push(err13),errors++}const _errs11=errors,_errs12=errors;if("global"!==data2&&"system"!==data2){const err14={};null===vErrors?vErrors=[err14]:vErrors.push(err14),errors++}if(_errs12===errors){const err15={instancePath:instancePath+"/roomId",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err15]:vErrors.push(err15),errors++}else errors=_errs11,null!==vErrors&&(_errs11?vErrors.length=_errs11:vErrors=null)}if(void 0!==data.first){let data3=data.first;if("string"!=typeof data3&&(!data3||"object"!=typeof data3||Array.isArray(data3))){const err16={instancePath:instancePath+"/first",schemaPath:"#/properties/first/type",keyword:"type",params:{type:schema80.properties.first.type},message:"must be string,object"};null===vErrors?vErrors=[err16]:vErrors.push(err16),errors++}if("string"==typeof data3&&!formats4.validate(data3)){const err17={instancePath:instancePath+"/first",schemaPath:"#/properties/first/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err17]:vErrors.push(err17),errors++}}if(void 0!==data.last){let data4=data.last;if("string"!=typeof data4&&(!data4||"object"!=typeof data4||Array.isArray(data4))){const err18={instancePath:instancePath+"/last",schemaPath:"#/properties/last/type",keyword:"type",params:{type:schema80.properties.last.type},message:"must be string,object"};null===vErrors?vErrors=[err18]:vErrors.push(err18),errors++}if("string"==typeof data4&&!formats4.validate(data4)){const err19={instancePath:instancePath+"/last",schemaPath:"#/properties/last/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err19]:vErrors.push(err19),errors++}}if(void 0!==data.data){let data5=data.data;if(Array.isArray(data5)){const len0=data5.length;for(let i0=0;i0<len0;i0++){let data6=data5[i0];if(data6&&"object"==typeof data6&&!Array.isArray(data6)){if(void 0===data6.time){const err20={instancePath:instancePath+"/data/"+i0,schemaPath:"#/properties/data/items/required",keyword:"required",params:{missingProperty:"time"},message:"must have required property 'time'"};null===vErrors?vErrors=[err20]:vErrors.push(err20),errors++}if(void 0===data6.watts){const err21={instancePath:instancePath+"/data/"+i0,schemaPath:"#/properties/data/items/required",keyword:"required",params:{missingProperty:"watts"},message:"must have required property 'watts'"};null===vErrors?vErrors=[err21]:vErrors.push(err21),errors++}if(void 0===data6.id){const err22={instancePath:instancePath+"/data/"+i0,schemaPath:"#/properties/data/items/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};null===vErrors?vErrors=[err22]:vErrors.push(err22),errors++}if(void 0===data6.type){const err23={instancePath:instancePath+"/data/"+i0,schemaPath:"#/properties/data/items/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===vErrors?vErrors=[err23]:vErrors.push(err23),errors++}if(void 0===data6.value){const err24={instancePath:instancePath+"/data/"+i0,schemaPath:"#/properties/data/items/required",keyword:"required",params:{missingProperty:"value"},message:"must have required property 'value'"};null===vErrors?vErrors=[err24]:vErrors.push(err24),errors++}if(void 0!==data6.time){let data7=data6.time;if("string"!=typeof data7&&(!data7||"object"!=typeof data7||Array.isArray(data7))){const err25={instancePath:instancePath+"/data/"+i0+"/time",schemaPath:"#/properties/data/items/properties/time/type",keyword:"type",params:{type:schema80.properties.data.items.properties.time.type},message:"must be string,object"};null===vErrors?vErrors=[err25]:vErrors.push(err25),errors++}if("string"==typeof data7&&!formats4.validate(data7)){const err26={instancePath:instancePath+"/data/"+i0+"/time",schemaPath:"#/properties/data/items/properties/time/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err26]:vErrors.push(err26),errors++}}if(void 0!==data6.watts){let data8=data6.watts;if("number"==typeof data8){if(data8<0||isNaN(data8)){const err27={instancePath:instancePath+"/data/"+i0+"/watts",schemaPath:"definitions.json#/definitions/watts/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===vErrors?vErrors=[err27]:vErrors.push(err27),errors++}}else{const err28={instancePath:instancePath+"/data/"+i0+"/watts",schemaPath:"definitions.json#/definitions/watts/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err28]:vErrors.push(err28),errors++}}if(void 0!==data6.id){let data9=data6.id;if("string"!=typeof data9){const err29={instancePath:instancePath+"/data/"+i0+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err29]:vErrors.push(err29),errors++}const _errs29=errors,_errs30=errors;if("global"!==data9&&"system"!==data9){const err30={};null===vErrors?vErrors=[err30]:vErrors.push(err30),errors++}if(_errs30===errors){const err31={instancePath:instancePath+"/data/"+i0+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err31]:vErrors.push(err31),errors++}else errors=_errs29,null!==vErrors&&(_errs29?vErrors.length=_errs29:vErrors=null)}if(void 0!==data6.type){let data10=data6.type;if("string"!=typeof data10){const err32={instancePath:instancePath+"/data/"+i0+"/type",schemaPath:"definitions.json#/definitions/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err32]:vErrors.push(err32),errors++}if("alarm"!==data10&&"dimmer"!==data10&&"switch"!==data10&&"motionSensor"!==data10&&"windowCovering"!==data10&&"camera"!==data10&&"mediaSource"!==data10&&"thermostat"!==data10&&"lock"!==data10&&"courtesy"!==data10&&"gateway"!==data10&&"tv"!==data10&&"dvr"!==data10&&"appleTv"!==data10&&"discPlayer"!==data10&&"mediaPlayer"!==data10&&"uncontrolledDevice"!==data10){const err33={instancePath:instancePath+"/data/"+i0+"/type",schemaPath:"definitions.json#/definitions/type/enum",keyword:"enum",params:{allowedValues:schema31.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err33]:vErrors.push(err33),errors++}}if(void 0!==data6.value){let data11=data6.value;if("number"==typeof data11){if(data11>1||isNaN(data11)){const err34={instancePath:instancePath+"/data/"+i0+"/value",schemaPath:"#/properties/data/items/properties/value/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};null===vErrors?vErrors=[err34]:vErrors.push(err34),errors++}if(data11<0||isNaN(data11)){const err35={instancePath:instancePath+"/data/"+i0+"/value",schemaPath:"#/properties/data/items/properties/value/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===vErrors?vErrors=[err35]:vErrors.push(err35),errors++}}else{const err36={instancePath:instancePath+"/data/"+i0+"/value",schemaPath:"#/properties/data/items/properties/value/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err36]:vErrors.push(err36),errors++}}}else{const err37={instancePath:instancePath+"/data/"+i0,schemaPath:"#/properties/data/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err37]:vErrors.push(err37),errors++}}}else{const err38={instancePath:instancePath+"/data",schemaPath:"#/properties/data/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err38]:vErrors.push(err38),errors++}}let data12=data.ndata;if("number"!=typeof data12||data12%1||isNaN(data12)){const err39={instancePath:instancePath+"/ndata",schemaPath:"#/properties/ndata/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===vErrors?vErrors=[err39]:vErrors.push(err39),errors++}if("number"==typeof data12){if(data12>1e5||isNaN(data12)){const err40={instancePath:instancePath+"/ndata",schemaPath:"#/properties/ndata/maximum",keyword:"maximum",params:{comparison:"<=",limit:1e5},message:"must be <= 100000"};null===vErrors?vErrors=[err40]:vErrors.push(err40),errors++}if(data12<0||isNaN(data12)){const err41={instancePath:instancePath+"/ndata",schemaPath:"#/properties/ndata/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===vErrors?vErrors=[err41]:vErrors.push(err41),errors++}}if(void 0!==data.expires){let data13=data.expires;if("string"!=typeof data13&&(!data13||"object"!=typeof data13||Array.isArray(data13))){const err42={instancePath:instancePath+"/expires",schemaPath:"#/properties/expires/type",keyword:"type",params:{type:schema80.properties.expires.type},message:"must be string,object"};null===vErrors?vErrors=[err42]:vErrors.push(err42),errors++}if("string"==typeof data13&&!formats4.validate(data13)){const err43={instancePath:instancePath+"/expires",schemaPath:"#/properties/expires/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err43]:vErrors.push(err43),errors++}}}else{const err44={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err44]:vErrors.push(err44),errors++}return validate33.errors=vErrors,0===errors},schema80={$schema:"http://json-schema.org/draft-07/schema",$id:"energyReportShard.json",title:"Energy Report Shard",description:"Shard used for Energy Reports",type:"object",required:["id","type","roomId","first","last","data","ndata","expires"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",enum:["energyReportShard"],default:"energyReportShard"},roomId:{$ref:"definitions.json#/definitions/id"},first:{type:["string","object"],format:"date-time"},last:{type:["string","object"],format:"date-time"},data:{type:"array",items:{type:"object",required:["time","watts","id","type","value"],properties:{time:{type:["string","object"],format:"date-time"},watts:{$ref:"definitions.json#/definitions/watts"},id:{$ref:"definitions.json#/definitions/id"},type:{$ref:"definitions.json#/definitions/type"},value:{type:"number",minimum:0,maximum:1}}}},ndata:{type:"integer",minimum:0,maximum:1e5,default:0},expires:{type:["string","object"],format:"date-time"}}};var validateGateway=function validate34(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0===data.id){const err0={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(void 0===data.type){const err1={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if(void 0===data.status){const err2={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"status"},message:"must have required property 'status'"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}if(void 0===data.driver){const err3={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"driver"},message:"must have required property 'driver'"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}if(void 0!==data.id){let data0=data.id;if("string"!=typeof data0){const err4={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}const _errs4=errors,_errs5=errors;if("global"!==data0&&"system"!==data0){const err5={};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}if(_errs5===errors){const err6={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}else errors=_errs4,null!==vErrors&&(_errs4?vErrors.length=_errs4:vErrors=null)}if(void 0!==data.type){let data1=data.type;if("string"!=typeof data1){const err7={instancePath:instancePath+"/type",schemaPath:"definitions.json#/definitions/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}if("alarm"!==data1&&"dimmer"!==data1&&"switch"!==data1&&"motionSensor"!==data1&&"windowCovering"!==data1&&"camera"!==data1&&"mediaSource"!==data1&&"thermostat"!==data1&&"lock"!==data1&&"courtesy"!==data1&&"gateway"!==data1&&"tv"!==data1&&"dvr"!==data1&&"appleTv"!==data1&&"discPlayer"!==data1&&"mediaPlayer"!==data1&&"uncontrolledDevice"!==data1){const err8={instancePath:instancePath+"/type",schemaPath:"definitions.json#/definitions/type/enum",keyword:"enum",params:{allowedValues:schema31.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}}if(void 0!==data.supportedNotifications){let data2=data.supportedNotifications;if(Array.isArray(data2)){const len0=data2.length;for(let i0=0;i0<len0;i0++){let data3=data2[i0];if("button 1"!==data3&&"button 2"!==data3&&"button 3"!==data3&&"button 4"!==data3&&"button 5"!==data3&&"idle"!==data3&&"powerHasBeedApplied"!==data3&&"acMainsDisconnected"!==data3&&"acMainsReconnected"!==data3&&"replaceBatterySoon"!==data3&&"replaceBatteryNow"!==data3&&"batteryOk"!==data3&&"hardwareFailure"!==data3&&"softwareFailure"!==data3&&"hardwareFailureWithCode"!==data3&&"softwareFailureWithCode"!==data3&&"motionDetection"!==data3&&"airFilterNeedsCleaned"!==data3&&"airFilterNeedsReplaced"!==data3&&"smokeDetected"!==data3&&"outsideSafeTemperatureRange"!==data3&&"outsideSafeHumidityRange"!==data3&&"scheduleMaintenance"!==data3&&"doorAjar"!==data3&&"communicationFailure"!==data3&&"communicationOk"!==data3&&"burglarAlarm"!==data3&&"fireAlarm"!==data3){const err9={instancePath:instancePath+"/supportedNotifications/"+i0,schemaPath:"definitions.json#/definitions/supportedNotifications/items/enum",keyword:"enum",params:{allowedValues:schema15.items.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}}let j0,i1=data2.length;if(i1>1)outer0:for(;i1--;)for(j0=i1;j0--;)if(func0(data2[i1],data2[j0])){const err10={instancePath:instancePath+"/supportedNotifications",schemaPath:"definitions.json#/definitions/supportedNotifications/uniqueItems",keyword:"uniqueItems",params:{i:i1,j:j0},message:"must NOT have duplicate items (items ## "+j0+" and "+i1+" are identical)"};null===vErrors?vErrors=[err10]:vErrors.push(err10),errors++;break outer0}}else{const err11={instancePath:instancePath+"/supportedNotifications",schemaPath:"definitions.json#/definitions/supportedNotifications/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err11]:vErrors.push(err11),errors++}}if(void 0!==data.notification&&(validate35(data.notification,{instancePath:instancePath+"/notification",parentData:data,parentDataProperty:"notification",rootData:rootData})||(vErrors=null===vErrors?validate35.errors:vErrors.concat(validate35.errors),errors=vErrors.length)),void 0!==data.status&&"string"!=typeof data.status){const err12={instancePath:instancePath+"/status",schemaPath:"#/properties/status/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err12]:vErrors.push(err12),errors++}if(void 0!==data.systemId&&"string"!=typeof data.systemId){const err13={instancePath:instancePath+"/systemId",schemaPath:"definitions.json#/definitions/systemId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err13]:vErrors.push(err13),errors++}if(void 0!==data.driver){let data7=data.driver;if("string"!=typeof data7){const err14={instancePath:instancePath+"/driver",schemaPath:"definitions.json#/definitions/driver/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err14]:vErrors.push(err14),errors++}if("adlink"!==data7&&"aws-kinesis"!==data7&&"butler"!==data7&&"crestron"!==data7&&"dell"!==data7&&"dmp"!==data7&&"doorbird"!==data7&&"dormakaba"!==data7&&"dsc"!==data7&&"ecobee"!==data7&&"epson"!==data7&&"geovision-rs"!==data7&&"geovision-as-manager"!==data7&&"honeywell-vista"!==data7&&"igor"!==data7&&"inncom"!==data7&&"isapi"!==data7&&"kohost-k7"!==data7&&"kohost"!==data7&&"lg"!==data7&&"lg-webos"!==data7&&"lapi"!==data7&&"lirc"!==data7&&"mews"!==data7&&"mht"!==data7&&"paxton"!==data7&&"pelican-wireless"!==data7&&"power-shades"!==data7&&"rachio"!==data7&&"rebrandly"!==data7&&"rtsp"!==data7&&"salto"!==data7&&"salto-irn"!==data7&&"samsung"!==data7&&"se"!==data7&&"sendgrid"!==data7&&"sonifi"!==data7&&"stay-n-touch"!==data7&&"storable"!==data7&&"twilio"!==data7&&"unifi"!==data7&&"valcom"!==data7&&"vizio"!==data7&&"wisenet"!==data7&&"cloudflare-images"!==data7&&"cloudflare-stream"!==data7&&"insperia-privacy"!==data7){const err15={instancePath:instancePath+"/driver",schemaPath:"definitions.json#/definitions/driver/enum",keyword:"enum",params:{allowedValues:schema18.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err15]:vErrors.push(err15),errors++}}if(void 0!==data.watts){let data8=data.watts;if("number"==typeof data8){if(data8<0||isNaN(data8)){const err16={instancePath:instancePath+"/watts",schemaPath:"definitions.json#/definitions/watts/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===vErrors?vErrors=[err16]:vErrors.push(err16),errors++}}else{const err17={instancePath:instancePath+"/watts",schemaPath:"definitions.json#/definitions/watts/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err17]:vErrors.push(err17),errors++}}if(void 0!==data.icon&&"string"!=typeof data.icon){const err18={instancePath:instancePath+"/icon",schemaPath:"#/properties/icon/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err18]:vErrors.push(err18),errors++}if(void 0!==data.modelNumber&&"string"!=typeof data.modelNumber){const err19={instancePath:instancePath+"/modelNumber",schemaPath:"#/properties/modelNumber/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err19]:vErrors.push(err19),errors++}if(void 0!==data.serialNumber&&"string"!=typeof data.serialNumber){const err20={instancePath:instancePath+"/serialNumber",schemaPath:"#/properties/serialNumber/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err20]:vErrors.push(err20),errors++}if(void 0!==data.firmwareVersion&&"string"!=typeof data.firmwareVersion){const err21={instancePath:instancePath+"/firmwareVersion",schemaPath:"#/properties/firmwareVersion/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err21]:vErrors.push(err21),errors++}}else{const err22={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err22]:vErrors.push(err22),errors++}return validate34.errors=vErrors,0===errors};function validate35(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if((!data||"object"!=typeof data||Array.isArray(data))&&null!==data){const err0={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:schema16.type},message:"must be object,null"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0!==data.name){let data0=data.name;if("string"!=typeof data0){const err1={instancePath:instancePath+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if("button 1"!==data0&&"button 2"!==data0&&"button 3"!==data0&&"button 4"!==data0&&"button 5"!==data0&&"idle"!==data0&&"powerHasBeedApplied"!==data0&&"acMainsDisconnected"!==data0&&"acMainsReconnected"!==data0&&"replaceBatterySoon"!==data0&&"replaceBatteryNow"!==data0&&"batteryOk"!==data0&&"hardwareFailure"!==data0&&"softwareFailure"!==data0&&"hardwareFailureWithCode"!==data0&&"softwareFailureWithCode"!==data0&&"motionDetection"!==data0&&"airFilterNeedsCleaned"!==data0&&"airFilterNeedsReplaced"!==data0&&"smokeDetected"!==data0&&"outsideSafeTemperatureRange"!==data0&&"outsideSafeHumidityRange"!==data0&&"scheduleMaintenance"!==data0&&"doorAjar"!==data0&&"communicationFailure"!==data0&&"communicationOk"!==data0&&"burglarAlarm"!==data0&&"fireAlarm"!==data0){const err2={instancePath:instancePath+"/name",schemaPath:"#/definitions/supportedNotifications/items/enum",keyword:"enum",params:{allowedValues:schema17.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}}if(void 0!==data.timestamp){let data1=data.timestamp;if("number"==typeof data1){if(data1<1655907956593||isNaN(data1)){const err3={instancePath:instancePath+"/timestamp",schemaPath:"#/properties/timestamp/minimum",keyword:"minimum",params:{comparison:">=",limit:1655907956593},message:"must be >= 1655907956593"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}}else{const err4={instancePath:instancePath+"/timestamp",schemaPath:"#/properties/timestamp/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}}if(void 0!==data.description&&"string"!=typeof data.description){const err5={instancePath:instancePath+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}}return validate35.errors=vErrors,0===errors}var validateIdentification=validate37,schema95={$schema:"http://json-schema.org/draft-07/schema",$id:"identification.json",title:"Identification",type:"object",required:["type"],oneOf:[{required:["number"]},{required:["encryptedNumber"]}],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",enum:["driversLicense","passport","identityCard","visa"]},number:{string:"string"},maskedNumber:{string:"string"},encryptedNumber:{string:"string"},issued:{type:["string","object"],format:"date-time"},expires:{type:["string","object","null"],format:"date-time"},verified:{type:"boolean"},matched:{type:"boolean"},firstName:{type:"string"},lastName:{type:"string"},issuingCountry:{string:"string",minLength:2,maxLength:2},systemId:{$ref:"definitions.json#/definitions/systemId"}}};function validate37(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;const _errs1=errors;let valid0=!1,passing0=null;const _errs2=errors;if(data&&"object"==typeof data&&!Array.isArray(data)&&void 0===data.number){const err0={instancePath:instancePath,schemaPath:"#/oneOf/0/required",keyword:"required",params:{missingProperty:"number"},message:"must have required property 'number'"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}(_valid0=_errs2===errors)&&(valid0=!0,passing0=0);const _errs3=errors;if(data&&"object"==typeof data&&!Array.isArray(data)&&void 0===data.encryptedNumber){const err1={instancePath:instancePath,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"encryptedNumber"},message:"must have required property 'encryptedNumber'"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}var _valid0;if((_valid0=_errs3===errors)&&valid0?(valid0=!1,passing0=[passing0,1]):_valid0&&(valid0=!0,passing0=1),valid0)errors=_errs1,null!==vErrors&&(_errs1?vErrors.length=_errs1:vErrors=null);else{const err2={instancePath:instancePath,schemaPath:"#/oneOf",keyword:"oneOf",params:{passingSchemas:passing0},message:"must match exactly one schema in oneOf"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0===data.type){const err3={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}if(void 0!==data.id){let data0=data.id;if("string"!=typeof data0){const err4={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}const _errs7=errors,_errs8=errors;if("global"!==data0&&"system"!==data0){const err5={};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}if(_errs8===errors){const err6={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}else errors=_errs7,null!==vErrors&&(_errs7?vErrors.length=_errs7:vErrors=null)}if(void 0!==data.type){let data1=data.type;if("string"!=typeof data1){const err7={instancePath:instancePath+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}if("driversLicense"!==data1&&"passport"!==data1&&"identityCard"!==data1&&"visa"!==data1){const err8={instancePath:instancePath+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:schema95.properties.type.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}}if(void 0!==data.issued){let data2=data.issued;if("string"!=typeof data2&&(!data2||"object"!=typeof data2||Array.isArray(data2))){const err9={instancePath:instancePath+"/issued",schemaPath:"#/properties/issued/type",keyword:"type",params:{type:schema95.properties.issued.type},message:"must be string,object"};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}if("string"==typeof data2&&!formats4.validate(data2)){const err10={instancePath:instancePath+"/issued",schemaPath:"#/properties/issued/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err10]:vErrors.push(err10),errors++}}if(void 0!==data.expires){let data3=data.expires;if("string"!=typeof data3&&(!data3||"object"!=typeof data3||Array.isArray(data3))&&null!==data3){const err11={instancePath:instancePath+"/expires",schemaPath:"#/properties/expires/type",keyword:"type",params:{type:schema95.properties.expires.type},message:"must be string,object,null"};null===vErrors?vErrors=[err11]:vErrors.push(err11),errors++}if("string"==typeof data3&&!formats4.validate(data3)){const err12={instancePath:instancePath+"/expires",schemaPath:"#/properties/expires/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err12]:vErrors.push(err12),errors++}}if(void 0!==data.verified&&"boolean"!=typeof data.verified){const err13={instancePath:instancePath+"/verified",schemaPath:"#/properties/verified/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err13]:vErrors.push(err13),errors++}if(void 0!==data.matched&&"boolean"!=typeof data.matched){const err14={instancePath:instancePath+"/matched",schemaPath:"#/properties/matched/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err14]:vErrors.push(err14),errors++}if(void 0!==data.firstName&&"string"!=typeof data.firstName){const err15={instancePath:instancePath+"/firstName",schemaPath:"#/properties/firstName/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err15]:vErrors.push(err15),errors++}if(void 0!==data.lastName&&"string"!=typeof data.lastName){const err16={instancePath:instancePath+"/lastName",schemaPath:"#/properties/lastName/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err16]:vErrors.push(err16),errors++}if(void 0!==data.issuingCountry){let data8=data.issuingCountry;if("string"==typeof data8){if(func3(data8)>2){const err17={instancePath:instancePath+"/issuingCountry",schemaPath:"#/properties/issuingCountry/maxLength",keyword:"maxLength",params:{limit:2},message:"must NOT have more than 2 characters"};null===vErrors?vErrors=[err17]:vErrors.push(err17),errors++}if(func3(data8)<2){const err18={instancePath:instancePath+"/issuingCountry",schemaPath:"#/properties/issuingCountry/minLength",keyword:"minLength",params:{limit:2},message:"must NOT have fewer than 2 characters"};null===vErrors?vErrors=[err18]:vErrors.push(err18),errors++}}}if(void 0!==data.systemId&&"string"!=typeof data.systemId){const err19={instancePath:instancePath+"/systemId",schemaPath:"definitions.json#/definitions/systemId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err19]:vErrors.push(err19),errors++}}else{const err20={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err20]:vErrors.push(err20),errors++}return validate37.errors=vErrors,0===errors}var validateIssue=function validate38(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0===data.type&&(data.type="issue"),void 0===data.autoCreateTicket&&(data.autoCreateTicket=!0),void 0===data.excludedResources&&(data.excludedResources=[]),void 0===data.id){const err0={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(void 0===data.type){const err1={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if(void 0===data.name){const err2={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}if(void 0===data.department){const err3={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"department"},message:"must have required property 'department'"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}if(void 0!==data.id){let data0=data.id;if("string"!=typeof data0){const err4={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}const _errs4=errors,_errs5=errors;if("global"!==data0&&"system"!==data0){const err5={};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}if(_errs5===errors){const err6={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}else errors=_errs4,null!==vErrors&&(_errs4?vErrors.length=_errs4:vErrors=null)}let data1=data.type;if("string"!=typeof data1){const err7={instancePath:instancePath+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}if("issue"!==data1){const err8={instancePath:instancePath+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:schema98.properties.type.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}if(void 0!==data.name&&"string"!=typeof data.name){const err9={instancePath:instancePath+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}if(void 0!==data.description&&"string"!=typeof data.description){const err10={instancePath:instancePath+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err10]:vErrors.push(err10),errors++}if(void 0!==data.department&&"string"!=typeof data.department){const err11={instancePath:instancePath+"/department",schemaPath:"#/properties/department/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err11]:vErrors.push(err11),errors++}if(void 0!==data.autoAssign){let data5=data.autoAssign;if(data5&&"object"==typeof data5&&!Array.isArray(data5)){if(void 0!==data5.userId&&"string"!=typeof data5.userId){const err12={instancePath:instancePath+"/autoAssign/userId",schemaPath:"#/properties/autoAssign/properties/userId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err12]:vErrors.push(err12),errors++}if(void 0!==data5.vendorId&&"string"!=typeof data5.vendorId){const err13={instancePath:instancePath+"/autoAssign/vendorId",schemaPath:"#/properties/autoAssign/properties/vendorId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err13]:vErrors.push(err13),errors++}if(void 0!==data5.priority){let data8=data5.priority;if("string"!=typeof data8){const err14={instancePath:instancePath+"/autoAssign/priority",schemaPath:"ticket.json#/properties/priority/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err14]:vErrors.push(err14),errors++}if("low"!==data8&&"normal"!==data8&&"high"!==data8){const err15={instancePath:instancePath+"/autoAssign/priority",schemaPath:"ticket.json#/properties/priority/enum",keyword:"enum",params:{allowedValues:schema109.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err15]:vErrors.push(err15),errors++}}if(void 0!==data5.tags){let data9=data5.tags;if(Array.isArray(data9)){const len0=data9.length;for(let i0=0;i0<len0;i0++)if("string"!=typeof data9[i0]){const err16={instancePath:instancePath+"/autoAssign/tags/"+i0,schemaPath:"#/properties/autoAssign/properties/tags/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err16]:vErrors.push(err16),errors++}}else{const err17={instancePath:instancePath+"/autoAssign/tags",schemaPath:"#/properties/autoAssign/properties/tags/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err17]:vErrors.push(err17),errors++}}}else{const err18={instancePath:instancePath+"/autoAssign",schemaPath:"#/properties/autoAssign/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err18]:vErrors.push(err18),errors++}}if(void 0!==data.systemKey&&"string"!=typeof data.systemKey){const err19={instancePath:instancePath+"/systemKey",schemaPath:"#/properties/systemKey/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err19]:vErrors.push(err19),errors++}if("boolean"!=typeof data.autoCreateTicket){const err20={instancePath:instancePath+"/autoCreateTicket",schemaPath:"#/properties/autoCreateTicket/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err20]:vErrors.push(err20),errors++}let data13=data.excludedResources;if(Array.isArray(data13)){const len1=data13.length;for(let i1=0;i1<len1;i1++)if("string"!=typeof data13[i1]){const err21={instancePath:instancePath+"/excludedResources/"+i1,schemaPath:"#/properties/excludedResources/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err21]:vErrors.push(err21),errors++}}else{const err22={instancePath:instancePath+"/excludedResources",schemaPath:"#/properties/excludedResources/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err22]:vErrors.push(err22),errors++}}else{const err23={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err23]:vErrors.push(err23),errors++}return validate38.errors=vErrors,0===errors},schema98={$schema:"http://json-schema.org/draft-07/schema",$id:"issue.json",title:"Issue",description:"An issue associated with ticketing and concierge.",type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",enum:["issue"],default:"issue"},name:{type:"string"},description:{type:"string"},department:{type:"string"},autoAssign:{type:"object",properties:{userId:{type:"string"},vendorId:{type:"string"},priority:{$ref:"ticket.json#/properties/priority"},tags:{type:"array",items:{type:"string"}}}},systemKey:{type:"string"},autoCreateTicket:{type:"boolean",default:!0},excludedResources:{type:"array",description:"A list of resources that should not trigger notifications of this issue",items:{type:"string"},default:[]}},required:["id","type","name","department"]},schema109={type:"string",enum:["low","normal","high"],default:"normal"};var validateLock=validate45,schema110={$schema:"http://json-schema.org/draft-07/schema",$id:"lock.json",title:"Lock",description:"Any smart lock",type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},name:{type:"string"},type:{$ref:"definitions.json#/definitions/type"},offline:{type:"boolean"},supportedNotifications:{$ref:"definitions.json#/definitions/supportedNotifications"},notification:{$ref:"definitions.json#/definitions/notification"},driver:{$ref:"definitions.json#/definitions/driver"},state:{type:["string","null"],enum:["locked","unlocked",null]},mode:{type:["string","null"],enum:["normal","autoLock","emergencyOpen","emergencyClose","holdOpen","lockdown",null],description:"emergencyOpen and emergencyClose are deprecated and can be removed once Salto, Paxton and Geovision drivers are updated",default:null},supportedModes:{type:"array",uniqueItems:!0,items:{enum:["normal","autoLock","emergencyOpen","emergencyClose","holdOpen","lockdown",null]}},batteryLevel:{$ref:"definitions.json#/definitions/batteryLevel"},systemId:{$ref:"definitions.json#/definitions/systemId"},watts:{$ref:"definitions.json#/definitions/watts"},icon:{type:"string"},modelNumber:{type:"string"},serialNumber:{type:"string"},firmwareVersion:{type:"string"}},required:["id","type","state","driver"]};function validate46(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if((!data||"object"!=typeof data||Array.isArray(data))&&null!==data){const err0={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:schema16.type},message:"must be object,null"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0!==data.name){let data0=data.name;if("string"!=typeof data0){const err1={instancePath:instancePath+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if("button 1"!==data0&&"button 2"!==data0&&"button 3"!==data0&&"button 4"!==data0&&"button 5"!==data0&&"idle"!==data0&&"powerHasBeedApplied"!==data0&&"acMainsDisconnected"!==data0&&"acMainsReconnected"!==data0&&"replaceBatterySoon"!==data0&&"replaceBatteryNow"!==data0&&"batteryOk"!==data0&&"hardwareFailure"!==data0&&"softwareFailure"!==data0&&"hardwareFailureWithCode"!==data0&&"softwareFailureWithCode"!==data0&&"motionDetection"!==data0&&"airFilterNeedsCleaned"!==data0&&"airFilterNeedsReplaced"!==data0&&"smokeDetected"!==data0&&"outsideSafeTemperatureRange"!==data0&&"outsideSafeHumidityRange"!==data0&&"scheduleMaintenance"!==data0&&"doorAjar"!==data0&&"communicationFailure"!==data0&&"communicationOk"!==data0&&"burglarAlarm"!==data0&&"fireAlarm"!==data0){const err2={instancePath:instancePath+"/name",schemaPath:"#/definitions/supportedNotifications/items/enum",keyword:"enum",params:{allowedValues:schema17.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}}if(void 0!==data.timestamp){let data1=data.timestamp;if("number"==typeof data1){if(data1<1655907956593||isNaN(data1)){const err3={instancePath:instancePath+"/timestamp",schemaPath:"#/properties/timestamp/minimum",keyword:"minimum",params:{comparison:">=",limit:1655907956593},message:"must be >= 1655907956593"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}}else{const err4={instancePath:instancePath+"/timestamp",schemaPath:"#/properties/timestamp/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}}if(void 0!==data.description&&"string"!=typeof data.description){const err5={instancePath:instancePath+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}}return validate46.errors=vErrors,0===errors}function validate45(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0===data.mode&&(data.mode=null),void 0===data.id){const err0={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(void 0===data.type){const err1={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if(void 0===data.state){const err2={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"state"},message:"must have required property 'state'"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}if(void 0===data.driver){const err3={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"driver"},message:"must have required property 'driver'"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}if(void 0!==data.id){let data0=data.id;if("string"!=typeof data0){const err4={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}const _errs4=errors,_errs5=errors;if("global"!==data0&&"system"!==data0){const err5={};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}if(_errs5===errors){const err6={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}else errors=_errs4,null!==vErrors&&(_errs4?vErrors.length=_errs4:vErrors=null)}if(void 0!==data.name&&"string"!=typeof data.name){const err7={instancePath:instancePath+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}if(void 0!==data.type){let data2=data.type;if("string"!=typeof data2){const err8={instancePath:instancePath+"/type",schemaPath:"definitions.json#/definitions/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}if("alarm"!==data2&&"dimmer"!==data2&&"switch"!==data2&&"motionSensor"!==data2&&"windowCovering"!==data2&&"camera"!==data2&&"mediaSource"!==data2&&"thermostat"!==data2&&"lock"!==data2&&"courtesy"!==data2&&"gateway"!==data2&&"tv"!==data2&&"dvr"!==data2&&"appleTv"!==data2&&"discPlayer"!==data2&&"mediaPlayer"!==data2&&"uncontrolledDevice"!==data2){const err9={instancePath:instancePath+"/type",schemaPath:"definitions.json#/definitions/type/enum",keyword:"enum",params:{allowedValues:schema31.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}}if(void 0!==data.offline&&"boolean"!=typeof data.offline){const err10={instancePath:instancePath+"/offline",schemaPath:"#/properties/offline/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err10]:vErrors.push(err10),errors++}if(void 0!==data.supportedNotifications){let data4=data.supportedNotifications;if(Array.isArray(data4)){const len0=data4.length;for(let i0=0;i0<len0;i0++){let data5=data4[i0];if("button 1"!==data5&&"button 2"!==data5&&"button 3"!==data5&&"button 4"!==data5&&"button 5"!==data5&&"idle"!==data5&&"powerHasBeedApplied"!==data5&&"acMainsDisconnected"!==data5&&"acMainsReconnected"!==data5&&"replaceBatterySoon"!==data5&&"replaceBatteryNow"!==data5&&"batteryOk"!==data5&&"hardwareFailure"!==data5&&"softwareFailure"!==data5&&"hardwareFailureWithCode"!==data5&&"softwareFailureWithCode"!==data5&&"motionDetection"!==data5&&"airFilterNeedsCleaned"!==data5&&"airFilterNeedsReplaced"!==data5&&"smokeDetected"!==data5&&"outsideSafeTemperatureRange"!==data5&&"outsideSafeHumidityRange"!==data5&&"scheduleMaintenance"!==data5&&"doorAjar"!==data5&&"communicationFailure"!==data5&&"communicationOk"!==data5&&"burglarAlarm"!==data5&&"fireAlarm"!==data5){const err11={instancePath:instancePath+"/supportedNotifications/"+i0,schemaPath:"definitions.json#/definitions/supportedNotifications/items/enum",keyword:"enum",params:{allowedValues:schema15.items.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err11]:vErrors.push(err11),errors++}}let j0,i1=data4.length;if(i1>1)outer0:for(;i1--;)for(j0=i1;j0--;)if(func0(data4[i1],data4[j0])){const err12={instancePath:instancePath+"/supportedNotifications",schemaPath:"definitions.json#/definitions/supportedNotifications/uniqueItems",keyword:"uniqueItems",params:{i:i1,j:j0},message:"must NOT have duplicate items (items ## "+j0+" and "+i1+" are identical)"};null===vErrors?vErrors=[err12]:vErrors.push(err12),errors++;break outer0}}else{const err13={instancePath:instancePath+"/supportedNotifications",schemaPath:"definitions.json#/definitions/supportedNotifications/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err13]:vErrors.push(err13),errors++}}if(void 0!==data.notification&&(validate46(data.notification,{instancePath:instancePath+"/notification",parentData:data,parentDataProperty:"notification",rootData:rootData})||(vErrors=null===vErrors?validate46.errors:vErrors.concat(validate46.errors),errors=vErrors.length)),void 0!==data.driver){let data7=data.driver;if("string"!=typeof data7){const err14={instancePath:instancePath+"/driver",schemaPath:"definitions.json#/definitions/driver/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err14]:vErrors.push(err14),errors++}if("adlink"!==data7&&"aws-kinesis"!==data7&&"butler"!==data7&&"crestron"!==data7&&"dell"!==data7&&"dmp"!==data7&&"doorbird"!==data7&&"dormakaba"!==data7&&"dsc"!==data7&&"ecobee"!==data7&&"epson"!==data7&&"geovision-rs"!==data7&&"geovision-as-manager"!==data7&&"honeywell-vista"!==data7&&"igor"!==data7&&"inncom"!==data7&&"isapi"!==data7&&"kohost-k7"!==data7&&"kohost"!==data7&&"lg"!==data7&&"lg-webos"!==data7&&"lapi"!==data7&&"lirc"!==data7&&"mews"!==data7&&"mht"!==data7&&"paxton"!==data7&&"pelican-wireless"!==data7&&"power-shades"!==data7&&"rachio"!==data7&&"rebrandly"!==data7&&"rtsp"!==data7&&"salto"!==data7&&"salto-irn"!==data7&&"samsung"!==data7&&"se"!==data7&&"sendgrid"!==data7&&"sonifi"!==data7&&"stay-n-touch"!==data7&&"storable"!==data7&&"twilio"!==data7&&"unifi"!==data7&&"valcom"!==data7&&"vizio"!==data7&&"wisenet"!==data7&&"cloudflare-images"!==data7&&"cloudflare-stream"!==data7&&"insperia-privacy"!==data7){const err15={instancePath:instancePath+"/driver",schemaPath:"definitions.json#/definitions/driver/enum",keyword:"enum",params:{allowedValues:schema18.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err15]:vErrors.push(err15),errors++}}if(void 0!==data.state){let data8=data.state;if("string"!=typeof data8&&null!==data8){const err16={instancePath:instancePath+"/state",schemaPath:"#/properties/state/type",keyword:"type",params:{type:schema110.properties.state.type},message:"must be string,null"};null===vErrors?vErrors=[err16]:vErrors.push(err16),errors++}if("locked"!==data8&&"unlocked"!==data8&&null!==data8){const err17={instancePath:instancePath+"/state",schemaPath:"#/properties/state/enum",keyword:"enum",params:{allowedValues:schema110.properties.state.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err17]:vErrors.push(err17),errors++}}let data9=data.mode;if("string"!=typeof data9&&null!==data9){const err18={instancePath:instancePath+"/mode",schemaPath:"#/properties/mode/type",keyword:"type",params:{type:schema110.properties.mode.type},message:"must be string,null"};null===vErrors?vErrors=[err18]:vErrors.push(err18),errors++}if("normal"!==data9&&"autoLock"!==data9&&"emergencyOpen"!==data9&&"emergencyClose"!==data9&&"holdOpen"!==data9&&"lockdown"!==data9&&null!==data9){const err19={instancePath:instancePath+"/mode",schemaPath:"#/properties/mode/enum",keyword:"enum",params:{allowedValues:schema110.properties.mode.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err19]:vErrors.push(err19),errors++}if(void 0!==data.supportedModes){let data10=data.supportedModes;if(Array.isArray(data10)){const len1=data10.length;for(let i2=0;i2<len1;i2++){let data11=data10[i2];if("normal"!==data11&&"autoLock"!==data11&&"emergencyOpen"!==data11&&"emergencyClose"!==data11&&"holdOpen"!==data11&&"lockdown"!==data11&&null!==data11){const err20={instancePath:instancePath+"/supportedModes/"+i2,schemaPath:"#/properties/supportedModes/items/enum",keyword:"enum",params:{allowedValues:schema110.properties.supportedModes.items.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err20]:vErrors.push(err20),errors++}}let j1,i3=data10.length;if(i3>1)outer1:for(;i3--;)for(j1=i3;j1--;)if(func0(data10[i3],data10[j1])){const err21={instancePath:instancePath+"/supportedModes",schemaPath:"#/properties/supportedModes/uniqueItems",keyword:"uniqueItems",params:{i:i3,j:j1},message:"must NOT have duplicate items (items ## "+j1+" and "+i3+" are identical)"};null===vErrors?vErrors=[err21]:vErrors.push(err21),errors++;break outer1}}else{const err22={instancePath:instancePath+"/supportedModes",schemaPath:"#/properties/supportedModes/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err22]:vErrors.push(err22),errors++}}if(void 0!==data.batteryLevel){let data12=data.batteryLevel;if("number"==typeof data12){if(data12>100||isNaN(data12)){const err23={instancePath:instancePath+"/batteryLevel",schemaPath:"definitions.json#/definitions/batteryLevel/maximum",keyword:"maximum",params:{comparison:"<=",limit:100},message:"must be <= 100"};null===vErrors?vErrors=[err23]:vErrors.push(err23),errors++}if(data12<0||isNaN(data12)){const err24={instancePath:instancePath+"/batteryLevel",schemaPath:"definitions.json#/definitions/batteryLevel/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===vErrors?vErrors=[err24]:vErrors.push(err24),errors++}}else{const err25={instancePath:instancePath+"/batteryLevel",schemaPath:"definitions.json#/definitions/batteryLevel/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err25]:vErrors.push(err25),errors++}}if(void 0!==data.systemId&&"string"!=typeof data.systemId){const err26={instancePath:instancePath+"/systemId",schemaPath:"definitions.json#/definitions/systemId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err26]:vErrors.push(err26),errors++}if(void 0!==data.watts){let data14=data.watts;if("number"==typeof data14){if(data14<0||isNaN(data14)){const err27={instancePath:instancePath+"/watts",schemaPath:"definitions.json#/definitions/watts/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===vErrors?vErrors=[err27]:vErrors.push(err27),errors++}}else{const err28={instancePath:instancePath+"/watts",schemaPath:"definitions.json#/definitions/watts/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err28]:vErrors.push(err28),errors++}}if(void 0!==data.icon&&"string"!=typeof data.icon){const err29={instancePath:instancePath+"/icon",schemaPath:"#/properties/icon/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err29]:vErrors.push(err29),errors++}if(void 0!==data.modelNumber&&"string"!=typeof data.modelNumber){const err30={instancePath:instancePath+"/modelNumber",schemaPath:"#/properties/modelNumber/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err30]:vErrors.push(err30),errors++}if(void 0!==data.serialNumber&&"string"!=typeof data.serialNumber){const err31={instancePath:instancePath+"/serialNumber",schemaPath:"#/properties/serialNumber/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err31]:vErrors.push(err31),errors++}if(void 0!==data.firmwareVersion&&"string"!=typeof data.firmwareVersion){const err32={instancePath:instancePath+"/firmwareVersion",schemaPath:"#/properties/firmwareVersion/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err32]:vErrors.push(err32),errors++}}else{const err33={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err33]:vErrors.push(err33),errors++}return validate45.errors=vErrors,0===errors}var validateLog=function validate48(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){void 0===data.type&&(data.type="log");let data0=data.type;if("string"!=typeof data0){const err0={instancePath:instancePath+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if("log"!==data0){const err1={instancePath:instancePath+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:schema120.properties.type.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if(void 0!==data.timestamp){let data1=data.timestamp;if("number"==typeof data1){if(data1<1655907956593||isNaN(data1)){const err2={instancePath:instancePath+"/timestamp",schemaPath:"#/properties/timestamp/minimum",keyword:"minimum",params:{comparison:">=",limit:1655907956593},message:"must be >= 1655907956593"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}}else{const err3={instancePath:instancePath+"/timestamp",schemaPath:"#/properties/timestamp/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}}if(void 0!==data.name&&"string"!=typeof data.name){const err4={instancePath:instancePath+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}if(void 0!==data.field1){let data3=data.field1;if(data3&&"object"==typeof data3&&!Array.isArray(data3)){if(void 0===data3.name){const err5={instancePath:instancePath+"/field1",schemaPath:"#/properties/field1/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}if(void 0===data3.value){const err6={instancePath:instancePath+"/field1",schemaPath:"#/properties/field1/required",keyword:"required",params:{missingProperty:"value"},message:"must have required property 'value'"};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}if(void 0!==data3.name&&"string"!=typeof data3.name){const err7={instancePath:instancePath+"/field1/name",schemaPath:"#/properties/field1/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}if(void 0!==data3.value&&"string"!=typeof data3.value){const err8={instancePath:instancePath+"/field1/value",schemaPath:"#/properties/field1/properties/value/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}}else{const err9={instancePath:instancePath+"/field1",schemaPath:"#/properties/field1/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}}if(void 0!==data.field2){let data6=data.field2;if(data6&&"object"==typeof data6&&!Array.isArray(data6)){if(void 0===data6.name){const err10={instancePath:instancePath+"/field2",schemaPath:"#/properties/field2/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};null===vErrors?vErrors=[err10]:vErrors.push(err10),errors++}if(void 0===data6.value){const err11={instancePath:instancePath+"/field2",schemaPath:"#/properties/field2/required",keyword:"required",params:{missingProperty:"value"},message:"must have required property 'value'"};null===vErrors?vErrors=[err11]:vErrors.push(err11),errors++}if(void 0!==data6.name&&"string"!=typeof data6.name){const err12={instancePath:instancePath+"/field2/name",schemaPath:"#/properties/field2/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err12]:vErrors.push(err12),errors++}if(void 0!==data6.value&&"string"!=typeof data6.value){const err13={instancePath:instancePath+"/field2/value",schemaPath:"#/properties/field2/properties/value/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err13]:vErrors.push(err13),errors++}}else{const err14={instancePath:instancePath+"/field2",schemaPath:"#/properties/field2/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err14]:vErrors.push(err14),errors++}}if(void 0!==data.field3){let data9=data.field3;if(data9&&"object"==typeof data9&&!Array.isArray(data9)){if(void 0===data9.name){const err15={instancePath:instancePath+"/field3",schemaPath:"#/properties/field3/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};null===vErrors?vErrors=[err15]:vErrors.push(err15),errors++}if(void 0===data9.value){const err16={instancePath:instancePath+"/field3",schemaPath:"#/properties/field3/required",keyword:"required",params:{missingProperty:"value"},message:"must have required property 'value'"};null===vErrors?vErrors=[err16]:vErrors.push(err16),errors++}if(void 0!==data9.name&&"string"!=typeof data9.name){const err17={instancePath:instancePath+"/field3/name",schemaPath:"#/properties/field3/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err17]:vErrors.push(err17),errors++}if(void 0!==data9.value&&"string"!=typeof data9.value){const err18={instancePath:instancePath+"/field3/value",schemaPath:"#/properties/field3/properties/value/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err18]:vErrors.push(err18),errors++}}else{const err19={instancePath:instancePath+"/field3",schemaPath:"#/properties/field3/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err19]:vErrors.push(err19),errors++}}if(void 0!==data.field4){let data12=data.field4;if(data12&&"object"==typeof data12&&!Array.isArray(data12)){if(void 0===data12.name){const err20={instancePath:instancePath+"/field4",schemaPath:"#/properties/field4/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};null===vErrors?vErrors=[err20]:vErrors.push(err20),errors++}if(void 0===data12.value){const err21={instancePath:instancePath+"/field4",schemaPath:"#/properties/field4/required",keyword:"required",params:{missingProperty:"value"},message:"must have required property 'value'"};null===vErrors?vErrors=[err21]:vErrors.push(err21),errors++}if(void 0!==data12.name&&"string"!=typeof data12.name){const err22={instancePath:instancePath+"/field4/name",schemaPath:"#/properties/field4/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err22]:vErrors.push(err22),errors++}if(void 0!==data12.value&&"string"!=typeof data12.value){const err23={instancePath:instancePath+"/field4/value",schemaPath:"#/properties/field4/properties/value/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err23]:vErrors.push(err23),errors++}}else{const err24={instancePath:instancePath+"/field4",schemaPath:"#/properties/field4/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err24]:vErrors.push(err24),errors++}}if(void 0!==data.field5){let data15=data.field5;if(data15&&"object"==typeof data15&&!Array.isArray(data15)){if(void 0===data15.name){const err25={instancePath:instancePath+"/field5",schemaPath:"#/properties/field5/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};null===vErrors?vErrors=[err25]:vErrors.push(err25),errors++}if(void 0===data15.value){const err26={instancePath:instancePath+"/field5",schemaPath:"#/properties/field5/required",keyword:"required",params:{missingProperty:"value"},message:"must have required property 'value'"};null===vErrors?vErrors=[err26]:vErrors.push(err26),errors++}if(void 0!==data15.name&&"string"!=typeof data15.name){const err27={instancePath:instancePath+"/field5/name",schemaPath:"#/properties/field5/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err27]:vErrors.push(err27),errors++}if(void 0!==data15.value&&"string"!=typeof data15.value){const err28={instancePath:instancePath+"/field5/value",schemaPath:"#/properties/field5/properties/value/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err28]:vErrors.push(err28),errors++}}else{const err29={instancePath:instancePath+"/field5",schemaPath:"#/properties/field5/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err29]:vErrors.push(err29),errors++}}if(void 0!==data.field6){let data18=data.field6;if(data18&&"object"==typeof data18&&!Array.isArray(data18)){if(void 0===data18.name){const err30={instancePath:instancePath+"/field6",schemaPath:"#/properties/field6/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};null===vErrors?vErrors=[err30]:vErrors.push(err30),errors++}if(void 0===data18.value){const err31={instancePath:instancePath+"/field6",schemaPath:"#/properties/field6/required",keyword:"required",params:{missingProperty:"value"},message:"must have required property 'value'"};null===vErrors?vErrors=[err31]:vErrors.push(err31),errors++}if(void 0!==data18.name&&"string"!=typeof data18.name){const err32={instancePath:instancePath+"/field6/name",schemaPath:"#/properties/field6/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err32]:vErrors.push(err32),errors++}if(void 0!==data18.value&&"string"!=typeof data18.value){const err33={instancePath:instancePath+"/field6/value",schemaPath:"#/properties/field6/properties/value/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err33]:vErrors.push(err33),errors++}}else{const err34={instancePath:instancePath+"/field6",schemaPath:"#/properties/field6/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err34]:vErrors.push(err34),errors++}}}else{const err35={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err35]:vErrors.push(err35),errors++}return validate48.errors=vErrors,0===errors},schema120={$schema:"http://json-schema.org/draft-07/schema",$id:"log.json",title:"Log",type:"object",properties:{type:{type:"string",default:"log",enum:["log"]},timestamp:{type:"number",minimum:1655907956593},name:{type:"string",description:"Event name"},field1:{type:"object",required:["name","value"],properties:{name:{type:"string"},value:{type:"string"}}},field2:{type:"object",required:["name","value"],properties:{name:{type:"string"},value:{type:"string"}}},field3:{type:"object",required:["name","value"],properties:{name:{type:"string"},value:{type:"string"}}},field4:{type:"object",required:["name","value"],properties:{name:{type:"string"},value:{type:"string"}}},field5:{type:"object",required:["name","value"],properties:{name:{type:"string"},value:{type:"string"}}},field6:{type:"object",required:["name","value"],properties:{name:{type:"string"},value:{type:"string"}}}}};var validateMediaFile=validate15,validateMediaSource=validate49,schema121={$schema:"http://json-schema.org/draft-07/schema",$id:"mediaSource.json",title:"Media Source",description:"Any media source",type:"object",required:["id","type","discriminator","audio","video","driver"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",default:"mediaSource",enum:["mediaSource"]},discriminator:{type:"string",enum:["tv","dvr","appleTv","discPlayer","mediaPlayer","paSystem","uncontrolledDevice"]},playlists:{type:"array",items:{type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},name:{$ref:"definitions.json#/definitions/name"}}}},remote:{type:"string",enum:["MR22GA","XRT260","XRT270","HOF-16K 1.2","219863500","SONIFI","AKB76039803","BN59-01388A"]},name:{$ref:"definitions.json#/definitions/name"},driver:{$ref:"definitions.json#/definitions/driver"},offline:{type:"boolean"},audio:{type:"boolean"},video:{type:"boolean"},powerFeedback:{type:"boolean"},volumeFeedback:{type:"boolean"},muted:{type:"boolean"},volume:{type:"number",minimum:0,maximum:100},brightness:{type:"number",minimum:0,maximum:100},contrast:{type:"number",minimum:0,maximum:100},power:{type:"string",enum:["on","off"]},input:{type:"string"},supportedInputs:{type:"array",items:{type:"string"}},supportedOutputs:{type:"array",items:{type:"string"}},command:{type:["string","null"],enum:["mute","volumeUp","volumeDown","brightnessUp","brightnessDown","channelUp","channelDown","number0","number1","number2","number3","number4","number5","number6","number7","number8","number9","lastChannel","display","favoriteChannel","play","playing","stop","stopped","pause","paused","fastForward","fastForwarding","rewind","rewinding","instantReplay","record","ac3","pvrMenu","guide","menu","menuUp","menuDown","menuLeft","menuRight","pageUp","pageDown","select","exit","input","power","enterChannel","enterVolume","enterBrightness","enterContrast","number10","number11","number12","number13","number14","number15","number16","number10Plus","number20Plus","number100","dash","threeChan","threeD","sixChan","a","add","alarm","am","analog","angle","antenna","antennaEast","antennaWest","aspect","audio1","audio2","audio3","audioDumming","audioLevelDown","audioLevelUp","b","back","c","component1","component2","component3","d","home","list","liveTv","discreteInputCable","powerOff","powerOn","setupMenu","skipForward","skipReverse","video1","video2","video3","video4","video5","details","hdmi1","hdmi2","hdmi3","cecDeviceList","mtsSap","red","green","yellow","blue","alert","order"]},supportedNotifications:{$ref:"definitions.json#/definitions/supportedNotifications"},notification:{$ref:"definitions.json#/definitions/notification"},systemId:{$ref:"definitions.json#/definitions/systemId"},watts:{$ref:"definitions.json#/definitions/watts"},icon:{type:"string"},modelNumber:{type:"string"},serialNumber:{type:"string"},firmwareVersion:{type:"string"}},additionalProperties:!1};function validate50(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if((!data||"object"!=typeof data||Array.isArray(data))&&null!==data){const err0={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:schema16.type},message:"must be object,null"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0!==data.name){let data0=data.name;if("string"!=typeof data0){const err1={instancePath:instancePath+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if("button 1"!==data0&&"button 2"!==data0&&"button 3"!==data0&&"button 4"!==data0&&"button 5"!==data0&&"idle"!==data0&&"powerHasBeedApplied"!==data0&&"acMainsDisconnected"!==data0&&"acMainsReconnected"!==data0&&"replaceBatterySoon"!==data0&&"replaceBatteryNow"!==data0&&"batteryOk"!==data0&&"hardwareFailure"!==data0&&"softwareFailure"!==data0&&"hardwareFailureWithCode"!==data0&&"softwareFailureWithCode"!==data0&&"motionDetection"!==data0&&"airFilterNeedsCleaned"!==data0&&"airFilterNeedsReplaced"!==data0&&"smokeDetected"!==data0&&"outsideSafeTemperatureRange"!==data0&&"outsideSafeHumidityRange"!==data0&&"scheduleMaintenance"!==data0&&"doorAjar"!==data0&&"communicationFailure"!==data0&&"communicationOk"!==data0&&"burglarAlarm"!==data0&&"fireAlarm"!==data0){const err2={instancePath:instancePath+"/name",schemaPath:"#/definitions/supportedNotifications/items/enum",keyword:"enum",params:{allowedValues:schema17.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}}if(void 0!==data.timestamp){let data1=data.timestamp;if("number"==typeof data1){if(data1<1655907956593||isNaN(data1)){const err3={instancePath:instancePath+"/timestamp",schemaPath:"#/properties/timestamp/minimum",keyword:"minimum",params:{comparison:">=",limit:1655907956593},message:"must be >= 1655907956593"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}}else{const err4={instancePath:instancePath+"/timestamp",schemaPath:"#/properties/timestamp/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}}if(void 0!==data.description&&"string"!=typeof data.description){const err5={instancePath:instancePath+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}}return validate50.errors=vErrors,0===errors}function validate49(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0===data.type&&(data.type="mediaSource"),void 0===data.id){const err0={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(void 0===data.type){const err1={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if(void 0===data.discriminator){const err2={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"discriminator"},message:"must have required property 'discriminator'"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}if(void 0===data.audio){const err3={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"audio"},message:"must have required property 'audio'"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}if(void 0===data.video){const err4={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"video"},message:"must have required property 'video'"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}if(void 0===data.driver){const err5={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"driver"},message:"must have required property 'driver'"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}for(const key0 in data)if(!func5.call(schema121.properties,key0)){const err6={instancePath:instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key0},message:"must NOT have additional properties"};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}if(void 0!==data.id){let data0=data.id;if("string"!=typeof data0){const err7={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}const _errs5=errors,_errs6=errors;if("global"!==data0&&"system"!==data0){const err8={};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}if(_errs6===errors){const err9={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}else errors=_errs5,null!==vErrors&&(_errs5?vErrors.length=_errs5:vErrors=null)}let data1=data.type;if("string"!=typeof data1){const err10={instancePath:instancePath+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err10]:vErrors.push(err10),errors++}if("mediaSource"!==data1){const err11={instancePath:instancePath+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:schema121.properties.type.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err11]:vErrors.push(err11),errors++}if(void 0!==data.discriminator){let data2=data.discriminator;if("string"!=typeof data2){const err12={instancePath:instancePath+"/discriminator",schemaPath:"#/properties/discriminator/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err12]:vErrors.push(err12),errors++}if("tv"!==data2&&"dvr"!==data2&&"appleTv"!==data2&&"discPlayer"!==data2&&"mediaPlayer"!==data2&&"paSystem"!==data2&&"uncontrolledDevice"!==data2){const err13={instancePath:instancePath+"/discriminator",schemaPath:"#/properties/discriminator/enum",keyword:"enum",params:{allowedValues:schema121.properties.discriminator.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err13]:vErrors.push(err13),errors++}}if(void 0!==data.playlists){let data3=data.playlists;if(Array.isArray(data3)){const len0=data3.length;for(let i0=0;i0<len0;i0++){let data4=data3[i0];if(data4&&"object"==typeof data4&&!Array.isArray(data4)){if(void 0!==data4.id){let data5=data4.id;if("string"!=typeof data5){const err14={instancePath:instancePath+"/playlists/"+i0+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err14]:vErrors.push(err14),errors++}const _errs18=errors,_errs19=errors;if("global"!==data5&&"system"!==data5){const err15={};null===vErrors?vErrors=[err15]:vErrors.push(err15),errors++}if(_errs19===errors){const err16={instancePath:instancePath+"/playlists/"+i0+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err16]:vErrors.push(err16),errors++}else errors=_errs18,null!==vErrors&&(_errs18?vErrors.length=_errs18:vErrors=null)}if(void 0!==data4.name&&"string"!=typeof data4.name){const err17={instancePath:instancePath+"/playlists/"+i0+"/name",schemaPath:"definitions.json#/definitions/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err17]:vErrors.push(err17),errors++}}else{const err18={instancePath:instancePath+"/playlists/"+i0,schemaPath:"#/properties/playlists/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err18]:vErrors.push(err18),errors++}}}else{const err19={instancePath:instancePath+"/playlists",schemaPath:"#/properties/playlists/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err19]:vErrors.push(err19),errors++}}if(void 0!==data.remote){let data7=data.remote;if("string"!=typeof data7){const err20={instancePath:instancePath+"/remote",schemaPath:"#/properties/remote/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err20]:vErrors.push(err20),errors++}if("MR22GA"!==data7&&"XRT260"!==data7&&"XRT270"!==data7&&"HOF-16K 1.2"!==data7&&"219863500"!==data7&&"SONIFI"!==data7&&"AKB76039803"!==data7&&"BN59-01388A"!==data7){const err21={instancePath:instancePath+"/remote",schemaPath:"#/properties/remote/enum",keyword:"enum",params:{allowedValues:schema121.properties.remote.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err21]:vErrors.push(err21),errors++}}if(void 0!==data.name&&"string"!=typeof data.name){const err22={instancePath:instancePath+"/name",schemaPath:"definitions.json#/definitions/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err22]:vErrors.push(err22),errors++}if(void 0!==data.driver){let data9=data.driver;if("string"!=typeof data9){const err23={instancePath:instancePath+"/driver",schemaPath:"definitions.json#/definitions/driver/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err23]:vErrors.push(err23),errors++}if("adlink"!==data9&&"aws-kinesis"!==data9&&"butler"!==data9&&"crestron"!==data9&&"dell"!==data9&&"dmp"!==data9&&"doorbird"!==data9&&"dormakaba"!==data9&&"dsc"!==data9&&"ecobee"!==data9&&"epson"!==data9&&"geovision-rs"!==data9&&"geovision-as-manager"!==data9&&"honeywell-vista"!==data9&&"igor"!==data9&&"inncom"!==data9&&"isapi"!==data9&&"kohost-k7"!==data9&&"kohost"!==data9&&"lg"!==data9&&"lg-webos"!==data9&&"lapi"!==data9&&"lirc"!==data9&&"mews"!==data9&&"mht"!==data9&&"paxton"!==data9&&"pelican-wireless"!==data9&&"power-shades"!==data9&&"rachio"!==data9&&"rebrandly"!==data9&&"rtsp"!==data9&&"salto"!==data9&&"salto-irn"!==data9&&"samsung"!==data9&&"se"!==data9&&"sendgrid"!==data9&&"sonifi"!==data9&&"stay-n-touch"!==data9&&"storable"!==data9&&"twilio"!==data9&&"unifi"!==data9&&"valcom"!==data9&&"vizio"!==data9&&"wisenet"!==data9&&"cloudflare-images"!==data9&&"cloudflare-stream"!==data9&&"insperia-privacy"!==data9){const err24={instancePath:instancePath+"/driver",schemaPath:"definitions.json#/definitions/driver/enum",keyword:"enum",params:{allowedValues:schema18.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err24]:vErrors.push(err24),errors++}}if(void 0!==data.offline&&"boolean"!=typeof data.offline){const err25={instancePath:instancePath+"/offline",schemaPath:"#/properties/offline/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err25]:vErrors.push(err25),errors++}if(void 0!==data.audio&&"boolean"!=typeof data.audio){const err26={instancePath:instancePath+"/audio",schemaPath:"#/properties/audio/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err26]:vErrors.push(err26),errors++}if(void 0!==data.video&&"boolean"!=typeof data.video){const err27={instancePath:instancePath+"/video",schemaPath:"#/properties/video/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err27]:vErrors.push(err27),errors++}if(void 0!==data.powerFeedback&&"boolean"!=typeof data.powerFeedback){const err28={instancePath:instancePath+"/powerFeedback",schemaPath:"#/properties/powerFeedback/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err28]:vErrors.push(err28),errors++}if(void 0!==data.volumeFeedback&&"boolean"!=typeof data.volumeFeedback){const err29={instancePath:instancePath+"/volumeFeedback",schemaPath:"#/properties/volumeFeedback/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err29]:vErrors.push(err29),errors++}if(void 0!==data.muted&&"boolean"!=typeof data.muted){const err30={instancePath:instancePath+"/muted",schemaPath:"#/properties/muted/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err30]:vErrors.push(err30),errors++}if(void 0!==data.volume){let data16=data.volume;if("number"==typeof data16){if(data16>100||isNaN(data16)){const err31={instancePath:instancePath+"/volume",schemaPath:"#/properties/volume/maximum",keyword:"maximum",params:{comparison:"<=",limit:100},message:"must be <= 100"};null===vErrors?vErrors=[err31]:vErrors.push(err31),errors++}if(data16<0||isNaN(data16)){const err32={instancePath:instancePath+"/volume",schemaPath:"#/properties/volume/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===vErrors?vErrors=[err32]:vErrors.push(err32),errors++}}else{const err33={instancePath:instancePath+"/volume",schemaPath:"#/properties/volume/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err33]:vErrors.push(err33),errors++}}if(void 0!==data.brightness){let data17=data.brightness;if("number"==typeof data17){if(data17>100||isNaN(data17)){const err34={instancePath:instancePath+"/brightness",schemaPath:"#/properties/brightness/maximum",keyword:"maximum",params:{comparison:"<=",limit:100},message:"must be <= 100"};null===vErrors?vErrors=[err34]:vErrors.push(err34),errors++}if(data17<0||isNaN(data17)){const err35={instancePath:instancePath+"/brightness",schemaPath:"#/properties/brightness/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===vErrors?vErrors=[err35]:vErrors.push(err35),errors++}}else{const err36={instancePath:instancePath+"/brightness",schemaPath:"#/properties/brightness/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err36]:vErrors.push(err36),errors++}}if(void 0!==data.contrast){let data18=data.contrast;if("number"==typeof data18){if(data18>100||isNaN(data18)){const err37={instancePath:instancePath+"/contrast",schemaPath:"#/properties/contrast/maximum",keyword:"maximum",params:{comparison:"<=",limit:100},message:"must be <= 100"};null===vErrors?vErrors=[err37]:vErrors.push(err37),errors++}if(data18<0||isNaN(data18)){const err38={instancePath:instancePath+"/contrast",schemaPath:"#/properties/contrast/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===vErrors?vErrors=[err38]:vErrors.push(err38),errors++}}else{const err39={instancePath:instancePath+"/contrast",schemaPath:"#/properties/contrast/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err39]:vErrors.push(err39),errors++}}if(void 0!==data.power){let data19=data.power;if("string"!=typeof data19){const err40={instancePath:instancePath+"/power",schemaPath:"#/properties/power/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err40]:vErrors.push(err40),errors++}if("on"!==data19&&"off"!==data19){const err41={instancePath:instancePath+"/power",schemaPath:"#/properties/power/enum",keyword:"enum",params:{allowedValues:schema121.properties.power.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err41]:vErrors.push(err41),errors++}}if(void 0!==data.input&&"string"!=typeof data.input){const err42={instancePath:instancePath+"/input",schemaPath:"#/properties/input/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err42]:vErrors.push(err42),errors++}if(void 0!==data.supportedInputs){let data21=data.supportedInputs;if(Array.isArray(data21)){const len1=data21.length;for(let i1=0;i1<len1;i1++)if("string"!=typeof data21[i1]){const err43={instancePath:instancePath+"/supportedInputs/"+i1,schemaPath:"#/properties/supportedInputs/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err43]:vErrors.push(err43),errors++}}else{const err44={instancePath:instancePath+"/supportedInputs",schemaPath:"#/properties/supportedInputs/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err44]:vErrors.push(err44),errors++}}if(void 0!==data.supportedOutputs){let data23=data.supportedOutputs;if(Array.isArray(data23)){const len2=data23.length;for(let i2=0;i2<len2;i2++)if("string"!=typeof data23[i2]){const err45={instancePath:instancePath+"/supportedOutputs/"+i2,schemaPath:"#/properties/supportedOutputs/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err45]:vErrors.push(err45),errors++}}else{const err46={instancePath:instancePath+"/supportedOutputs",schemaPath:"#/properties/supportedOutputs/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err46]:vErrors.push(err46),errors++}}if(void 0!==data.command){let data25=data.command;if("string"!=typeof data25&&null!==data25){const err47={instancePath:instancePath+"/command",schemaPath:"#/properties/command/type",keyword:"type",params:{type:schema121.properties.command.type},message:"must be string,null"};null===vErrors?vErrors=[err47]:vErrors.push(err47),errors++}if("mute"!==data25&&"volumeUp"!==data25&&"volumeDown"!==data25&&"brightnessUp"!==data25&&"brightnessDown"!==data25&&"channelUp"!==data25&&"channelDown"!==data25&&"number0"!==data25&&"number1"!==data25&&"number2"!==data25&&"number3"!==data25&&"number4"!==data25&&"number5"!==data25&&"number6"!==data25&&"number7"!==data25&&"number8"!==data25&&"number9"!==data25&&"lastChannel"!==data25&&"display"!==data25&&"favoriteChannel"!==data25&&"play"!==data25&&"playing"!==data25&&"stop"!==data25&&"stopped"!==data25&&"pause"!==data25&&"paused"!==data25&&"fastForward"!==data25&&"fastForwarding"!==data25&&"rewind"!==data25&&"rewinding"!==data25&&"instantReplay"!==data25&&"record"!==data25&&"ac3"!==data25&&"pvrMenu"!==data25&&"guide"!==data25&&"menu"!==data25&&"menuUp"!==data25&&"menuDown"!==data25&&"menuLeft"!==data25&&"menuRight"!==data25&&"pageUp"!==data25&&"pageDown"!==data25&&"select"!==data25&&"exit"!==data25&&"input"!==data25&&"power"!==data25&&"enterChannel"!==data25&&"enterVolume"!==data25&&"enterBrightness"!==data25&&"enterContrast"!==data25&&"number10"!==data25&&"number11"!==data25&&"number12"!==data25&&"number13"!==data25&&"number14"!==data25&&"number15"!==data25&&"number16"!==data25&&"number10Plus"!==data25&&"number20Plus"!==data25&&"number100"!==data25&&"dash"!==data25&&"threeChan"!==data25&&"threeD"!==data25&&"sixChan"!==data25&&"a"!==data25&&"add"!==data25&&"alarm"!==data25&&"am"!==data25&&"analog"!==data25&&"angle"!==data25&&"antenna"!==data25&&"antennaEast"!==data25&&"antennaWest"!==data25&&"aspect"!==data25&&"audio1"!==data25&&"audio2"!==data25&&"audio3"!==data25&&"audioDumming"!==data25&&"audioLevelDown"!==data25&&"audioLevelUp"!==data25&&"b"!==data25&&"back"!==data25&&"c"!==data25&&"component1"!==data25&&"component2"!==data25&&"component3"!==data25&&"d"!==data25&&"home"!==data25&&"list"!==data25&&"liveTv"!==data25&&"discreteInputCable"!==data25&&"powerOff"!==data25&&"powerOn"!==data25&&"setupMenu"!==data25&&"skipForward"!==data25&&"skipReverse"!==data25&&"video1"!==data25&&"video2"!==data25&&"video3"!==data25&&"video4"!==data25&&"video5"!==data25&&"details"!==data25&&"hdmi1"!==data25&&"hdmi2"!==data25&&"hdmi3"!==data25&&"cecDeviceList"!==data25&&"mtsSap"!==data25&&"red"!==data25&&"green"!==data25&&"yellow"!==data25&&"blue"!==data25&&"alert"!==data25&&"order"!==data25){const err48={instancePath:instancePath+"/command",schemaPath:"#/properties/command/enum",keyword:"enum",params:{allowedValues:schema121.properties.command.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err48]:vErrors.push(err48),errors++}}if(void 0!==data.supportedNotifications){let data26=data.supportedNotifications;if(Array.isArray(data26)){const len3=data26.length;for(let i3=0;i3<len3;i3++){let data27=data26[i3];if("button 1"!==data27&&"button 2"!==data27&&"button 3"!==data27&&"button 4"!==data27&&"button 5"!==data27&&"idle"!==data27&&"powerHasBeedApplied"!==data27&&"acMainsDisconnected"!==data27&&"acMainsReconnected"!==data27&&"replaceBatterySoon"!==data27&&"replaceBatteryNow"!==data27&&"batteryOk"!==data27&&"hardwareFailure"!==data27&&"softwareFailure"!==data27&&"hardwareFailureWithCode"!==data27&&"softwareFailureWithCode"!==data27&&"motionDetection"!==data27&&"airFilterNeedsCleaned"!==data27&&"airFilterNeedsReplaced"!==data27&&"smokeDetected"!==data27&&"outsideSafeTemperatureRange"!==data27&&"outsideSafeHumidityRange"!==data27&&"scheduleMaintenance"!==data27&&"doorAjar"!==data27&&"communicationFailure"!==data27&&"communicationOk"!==data27&&"burglarAlarm"!==data27&&"fireAlarm"!==data27){const err49={instancePath:instancePath+"/supportedNotifications/"+i3,schemaPath:"definitions.json#/definitions/supportedNotifications/items/enum",keyword:"enum",params:{allowedValues:schema15.items.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err49]:vErrors.push(err49),errors++}}let j0,i4=data26.length;if(i4>1)outer0:for(;i4--;)for(j0=i4;j0--;)if(func0(data26[i4],data26[j0])){const err50={instancePath:instancePath+"/supportedNotifications",schemaPath:"definitions.json#/definitions/supportedNotifications/uniqueItems",keyword:"uniqueItems",params:{i:i4,j:j0},message:"must NOT have duplicate items (items ## "+j0+" and "+i4+" are identical)"};null===vErrors?vErrors=[err50]:vErrors.push(err50),errors++;break outer0}}else{const err51={instancePath:instancePath+"/supportedNotifications",schemaPath:"definitions.json#/definitions/supportedNotifications/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err51]:vErrors.push(err51),errors++}}if(void 0!==data.notification&&(validate50(data.notification,{instancePath:instancePath+"/notification",parentData:data,parentDataProperty:"notification",rootData:rootData})||(vErrors=null===vErrors?validate50.errors:vErrors.concat(validate50.errors),errors=vErrors.length)),void 0!==data.systemId&&"string"!=typeof data.systemId){const err52={instancePath:instancePath+"/systemId",schemaPath:"definitions.json#/definitions/systemId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err52]:vErrors.push(err52),errors++}if(void 0!==data.watts){let data30=data.watts;if("number"==typeof data30){if(data30<0||isNaN(data30)){const err53={instancePath:instancePath+"/watts",schemaPath:"definitions.json#/definitions/watts/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===vErrors?vErrors=[err53]:vErrors.push(err53),errors++}}else{const err54={instancePath:instancePath+"/watts",schemaPath:"definitions.json#/definitions/watts/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err54]:vErrors.push(err54),errors++}}if(void 0!==data.icon&&"string"!=typeof data.icon){const err55={instancePath:instancePath+"/icon",schemaPath:"#/properties/icon/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err55]:vErrors.push(err55),errors++}if(void 0!==data.modelNumber&&"string"!=typeof data.modelNumber){const err56={instancePath:instancePath+"/modelNumber",schemaPath:"#/properties/modelNumber/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err56]:vErrors.push(err56),errors++}if(void 0!==data.serialNumber&&"string"!=typeof data.serialNumber){const err57={instancePath:instancePath+"/serialNumber",schemaPath:"#/properties/serialNumber/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err57]:vErrors.push(err57),errors++}if(void 0!==data.firmwareVersion&&"string"!=typeof data.firmwareVersion){const err58={instancePath:instancePath+"/firmwareVersion",schemaPath:"#/properties/firmwareVersion/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err58]:vErrors.push(err58),errors++}}else{const err59={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err59]:vErrors.push(err59),errors++}return validate49.errors=vErrors,0===errors}var validateMotionSensor=validate52,schema132={$schema:"http://json-schema.org/draft-07/schema",$id:"motionSensor.json",title:"Motion Sensor",description:"Any smart motion sensor",type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},type:{$ref:"definitions.json#/definitions/type"},driver:{$ref:"definitions.json#/definitions/driver"},systemId:{$ref:"definitions.json#/definitions/systemId"},supportedNotifications:{$ref:"definitions.json#/definitions/supportedNotifications"},notification:{$ref:"definitions.json#/definitions/notification"},watts:{$ref:"definitions.json#/definitions/watts"},icon:{type:"string"},modelNumber:{type:"string"},serialNumber:{type:"string"},firmwareVersion:{type:"string"}},additionalProperties:!1,required:["id","type","driver"]};function validate53(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if((!data||"object"!=typeof data||Array.isArray(data))&&null!==data){const err0={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:schema16.type},message:"must be object,null"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0!==data.name){let data0=data.name;if("string"!=typeof data0){const err1={instancePath:instancePath+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if("button 1"!==data0&&"button 2"!==data0&&"button 3"!==data0&&"button 4"!==data0&&"button 5"!==data0&&"idle"!==data0&&"powerHasBeedApplied"!==data0&&"acMainsDisconnected"!==data0&&"acMainsReconnected"!==data0&&"replaceBatterySoon"!==data0&&"replaceBatteryNow"!==data0&&"batteryOk"!==data0&&"hardwareFailure"!==data0&&"softwareFailure"!==data0&&"hardwareFailureWithCode"!==data0&&"softwareFailureWithCode"!==data0&&"motionDetection"!==data0&&"airFilterNeedsCleaned"!==data0&&"airFilterNeedsReplaced"!==data0&&"smokeDetected"!==data0&&"outsideSafeTemperatureRange"!==data0&&"outsideSafeHumidityRange"!==data0&&"scheduleMaintenance"!==data0&&"doorAjar"!==data0&&"communicationFailure"!==data0&&"communicationOk"!==data0&&"burglarAlarm"!==data0&&"fireAlarm"!==data0){const err2={instancePath:instancePath+"/name",schemaPath:"#/definitions/supportedNotifications/items/enum",keyword:"enum",params:{allowedValues:schema17.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}}if(void 0!==data.timestamp){let data1=data.timestamp;if("number"==typeof data1){if(data1<1655907956593||isNaN(data1)){const err3={instancePath:instancePath+"/timestamp",schemaPath:"#/properties/timestamp/minimum",keyword:"minimum",params:{comparison:">=",limit:1655907956593},message:"must be >= 1655907956593"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}}else{const err4={instancePath:instancePath+"/timestamp",schemaPath:"#/properties/timestamp/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}}if(void 0!==data.description&&"string"!=typeof data.description){const err5={instancePath:instancePath+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}}return validate53.errors=vErrors,0===errors}function validate52(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0===data.id){const err0={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(void 0===data.type){const err1={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if(void 0===data.driver){const err2={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"driver"},message:"must have required property 'driver'"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}for(const key0 in data)if(!func5.call(schema132.properties,key0)){const err3={instancePath:instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key0},message:"must NOT have additional properties"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}if(void 0!==data.id){let data0=data.id;if("string"!=typeof data0){const err4={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}const _errs5=errors,_errs6=errors;if("global"!==data0&&"system"!==data0){const err5={};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}if(_errs6===errors){const err6={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}else errors=_errs5,null!==vErrors&&(_errs5?vErrors.length=_errs5:vErrors=null)}if(void 0!==data.type){let data1=data.type;if("string"!=typeof data1){const err7={instancePath:instancePath+"/type",schemaPath:"definitions.json#/definitions/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}if("alarm"!==data1&&"dimmer"!==data1&&"switch"!==data1&&"motionSensor"!==data1&&"windowCovering"!==data1&&"camera"!==data1&&"mediaSource"!==data1&&"thermostat"!==data1&&"lock"!==data1&&"courtesy"!==data1&&"gateway"!==data1&&"tv"!==data1&&"dvr"!==data1&&"appleTv"!==data1&&"discPlayer"!==data1&&"mediaPlayer"!==data1&&"uncontrolledDevice"!==data1){const err8={instancePath:instancePath+"/type",schemaPath:"definitions.json#/definitions/type/enum",keyword:"enum",params:{allowedValues:schema31.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}}if(void 0!==data.driver){let data2=data.driver;if("string"!=typeof data2){const err9={instancePath:instancePath+"/driver",schemaPath:"definitions.json#/definitions/driver/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}if("adlink"!==data2&&"aws-kinesis"!==data2&&"butler"!==data2&&"crestron"!==data2&&"dell"!==data2&&"dmp"!==data2&&"doorbird"!==data2&&"dormakaba"!==data2&&"dsc"!==data2&&"ecobee"!==data2&&"epson"!==data2&&"geovision-rs"!==data2&&"geovision-as-manager"!==data2&&"honeywell-vista"!==data2&&"igor"!==data2&&"inncom"!==data2&&"isapi"!==data2&&"kohost-k7"!==data2&&"kohost"!==data2&&"lg"!==data2&&"lg-webos"!==data2&&"lapi"!==data2&&"lirc"!==data2&&"mews"!==data2&&"mht"!==data2&&"paxton"!==data2&&"pelican-wireless"!==data2&&"power-shades"!==data2&&"rachio"!==data2&&"rebrandly"!==data2&&"rtsp"!==data2&&"salto"!==data2&&"salto-irn"!==data2&&"samsung"!==data2&&"se"!==data2&&"sendgrid"!==data2&&"sonifi"!==data2&&"stay-n-touch"!==data2&&"storable"!==data2&&"twilio"!==data2&&"unifi"!==data2&&"valcom"!==data2&&"vizio"!==data2&&"wisenet"!==data2&&"cloudflare-images"!==data2&&"cloudflare-stream"!==data2&&"insperia-privacy"!==data2){const err10={instancePath:instancePath+"/driver",schemaPath:"definitions.json#/definitions/driver/enum",keyword:"enum",params:{allowedValues:schema18.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err10]:vErrors.push(err10),errors++}}if(void 0!==data.systemId&&"string"!=typeof data.systemId){const err11={instancePath:instancePath+"/systemId",schemaPath:"definitions.json#/definitions/systemId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err11]:vErrors.push(err11),errors++}if(void 0!==data.supportedNotifications){let data4=data.supportedNotifications;if(Array.isArray(data4)){const len0=data4.length;for(let i0=0;i0<len0;i0++){let data5=data4[i0];if("button 1"!==data5&&"button 2"!==data5&&"button 3"!==data5&&"button 4"!==data5&&"button 5"!==data5&&"idle"!==data5&&"powerHasBeedApplied"!==data5&&"acMainsDisconnected"!==data5&&"acMainsReconnected"!==data5&&"replaceBatterySoon"!==data5&&"replaceBatteryNow"!==data5&&"batteryOk"!==data5&&"hardwareFailure"!==data5&&"softwareFailure"!==data5&&"hardwareFailureWithCode"!==data5&&"softwareFailureWithCode"!==data5&&"motionDetection"!==data5&&"airFilterNeedsCleaned"!==data5&&"airFilterNeedsReplaced"!==data5&&"smokeDetected"!==data5&&"outsideSafeTemperatureRange"!==data5&&"outsideSafeHumidityRange"!==data5&&"scheduleMaintenance"!==data5&&"doorAjar"!==data5&&"communicationFailure"!==data5&&"communicationOk"!==data5&&"burglarAlarm"!==data5&&"fireAlarm"!==data5){const err12={instancePath:instancePath+"/supportedNotifications/"+i0,schemaPath:"definitions.json#/definitions/supportedNotifications/items/enum",keyword:"enum",params:{allowedValues:schema15.items.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err12]:vErrors.push(err12),errors++}}let j0,i1=data4.length;if(i1>1)outer0:for(;i1--;)for(j0=i1;j0--;)if(func0(data4[i1],data4[j0])){const err13={instancePath:instancePath+"/supportedNotifications",schemaPath:"definitions.json#/definitions/supportedNotifications/uniqueItems",keyword:"uniqueItems",params:{i:i1,j:j0},message:"must NOT have duplicate items (items ## "+j0+" and "+i1+" are identical)"};null===vErrors?vErrors=[err13]:vErrors.push(err13),errors++;break outer0}}else{const err14={instancePath:instancePath+"/supportedNotifications",schemaPath:"definitions.json#/definitions/supportedNotifications/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err14]:vErrors.push(err14),errors++}}if(void 0!==data.notification&&(validate53(data.notification,{instancePath:instancePath+"/notification",parentData:data,parentDataProperty:"notification",rootData:rootData})||(vErrors=null===vErrors?validate53.errors:vErrors.concat(validate53.errors),errors=vErrors.length)),void 0!==data.watts){let data7=data.watts;if("number"==typeof data7){if(data7<0||isNaN(data7)){const err15={instancePath:instancePath+"/watts",schemaPath:"definitions.json#/definitions/watts/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===vErrors?vErrors=[err15]:vErrors.push(err15),errors++}}else{const err16={instancePath:instancePath+"/watts",schemaPath:"definitions.json#/definitions/watts/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err16]:vErrors.push(err16),errors++}}if(void 0!==data.icon&&"string"!=typeof data.icon){const err17={instancePath:instancePath+"/icon",schemaPath:"#/properties/icon/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err17]:vErrors.push(err17),errors++}if(void 0!==data.modelNumber&&"string"!=typeof data.modelNumber){const err18={instancePath:instancePath+"/modelNumber",schemaPath:"#/properties/modelNumber/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err18]:vErrors.push(err18),errors++}if(void 0!==data.serialNumber&&"string"!=typeof data.serialNumber){const err19={instancePath:instancePath+"/serialNumber",schemaPath:"#/properties/serialNumber/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err19]:vErrors.push(err19),errors++}if(void 0!==data.firmwareVersion&&"string"!=typeof data.firmwareVersion){const err20={instancePath:instancePath+"/firmwareVersion",schemaPath:"#/properties/firmwareVersion/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err20]:vErrors.push(err20),errors++}}else{const err21={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err21]:vErrors.push(err21),errors++}return validate52.errors=vErrors,0===errors}var validateOrder=function validate55(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0===data.type&&(data.type="order"),void 0===data.items&&(data.items=[]),void 0===data.taxes&&(data.taxes=[]),void 0===data.fees&&(data.fees=[]),void 0===data.delivery&&(data.delivery=[]),void 0===data.payments&&(data.payments=[]),void 0===data.type){const err0={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(void 0===data.status){const err1={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"status"},message:"must have required property 'status'"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if(void 0!==data.id){let data0=data.id;if("string"!=typeof data0){const err2={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}const _errs4=errors,_errs5=errors;if("global"!==data0&&"system"!==data0){const err3={};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}if(_errs5===errors){const err4={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}else errors=_errs4,null!==vErrors&&(_errs4?vErrors.length=_errs4:vErrors=null)}let data1=data.type;if("string"!=typeof data1){const err5={instancePath:instancePath+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}if("order"!==data1){const err6={instancePath:instancePath+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:schema141.properties.type.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}if(void 0!==data.orderNumber&&"string"!=typeof data.orderNumber){const err7={instancePath:instancePath+"/orderNumber",schemaPath:"#/properties/orderNumber/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}if(void 0!==data.status){let data3=data.status;if("string"!=typeof data3){const err8={instancePath:instancePath+"/status",schemaPath:"#/properties/status/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}if("draft"!==data3&&"pendingPayment"!==data3&&"processing"!==data3&&"outForDelivery"!==data3&&"completed"!==data3&&"paymentFailed"!==data3&&"cancelled"!==data3&&"refunded"!==data3){const err9={instancePath:instancePath+"/status",schemaPath:"#/properties/status/enum",keyword:"enum",params:{allowedValues:schema141.properties.status.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}}if(void 0!==data.userId){let data4=data.userId;if("string"!=typeof data4){const err10={instancePath:instancePath+"/userId",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err10]:vErrors.push(err10),errors++}const _errs15=errors,_errs16=errors;if("global"!==data4&&"system"!==data4){const err11={};null===vErrors?vErrors=[err11]:vErrors.push(err11),errors++}if(_errs16===errors){const err12={instancePath:instancePath+"/userId",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err12]:vErrors.push(err12),errors++}else errors=_errs15,null!==vErrors&&(_errs15?vErrors.length=_errs15:vErrors=null)}if(void 0!==data.reservationId){let data5=data.reservationId;if("string"!=typeof data5){const err13={instancePath:instancePath+"/reservationId",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err13]:vErrors.push(err13),errors++}const _errs20=errors,_errs21=errors;if("global"!==data5&&"system"!==data5){const err14={};null===vErrors?vErrors=[err14]:vErrors.push(err14),errors++}if(_errs21===errors){const err15={instancePath:instancePath+"/reservationId",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err15]:vErrors.push(err15),errors++}else errors=_errs20,null!==vErrors&&(_errs20?vErrors.length=_errs20:vErrors=null)}if(void 0!==data.date){let data6=data.date;if("string"!=typeof data6&&(!data6||"object"!=typeof data6||Array.isArray(data6))){const err16={instancePath:instancePath+"/date",schemaPath:"definitions.json#/definitions/date/type",keyword:"type",params:{type:schema25.type},message:"must be string,object"};null===vErrors?vErrors=[err16]:vErrors.push(err16),errors++}if("string"==typeof data6&&!formats4.validate(data6)){const err17={instancePath:instancePath+"/date",schemaPath:"definitions.json#/definitions/date/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err17]:vErrors.push(err17),errors++}}let data7=data.items;if(Array.isArray(data7)){const len0=data7.length;for(let i0=0;i0<len0;i0++){let data8=data7[i0];if(data8&&"object"==typeof data8&&!Array.isArray(data8)){if(void 0===data8.quantity&&(data8.quantity=1),void 0===data8.name){const err18={instancePath:instancePath+"/items/"+i0,schemaPath:"#/properties/items/items/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};null===vErrors?vErrors=[err18]:vErrors.push(err18),errors++}if(void 0===data8.price){const err19={instancePath:instancePath+"/items/"+i0,schemaPath:"#/properties/items/items/required",keyword:"required",params:{missingProperty:"price"},message:"must have required property 'price'"};null===vErrors?vErrors=[err19]:vErrors.push(err19),errors++}if(void 0!==data8.additionalProperties){const err20={instancePath:instancePath+"/items/"+i0+"/additionalProperties",schemaPath:"#/properties/items/items/properties/additionalProperties/false schema",keyword:"false schema",params:{},message:"boolean schema is false"};null===vErrors?vErrors=[err20]:vErrors.push(err20),errors++}if(void 0!==data8.name&&"string"!=typeof data8.name){const err21={instancePath:instancePath+"/items/"+i0+"/name",schemaPath:"#/properties/items/items/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err21]:vErrors.push(err21),errors++}if(void 0!==data8.sku&&"string"!=typeof data8.sku){const err22={instancePath:instancePath+"/items/"+i0+"/sku",schemaPath:"#/properties/items/items/properties/sku/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err22]:vErrors.push(err22),errors++}if("number"!=typeof data8.quantity){const err23={instancePath:instancePath+"/items/"+i0+"/quantity",schemaPath:"#/properties/items/items/properties/quantity/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err23]:vErrors.push(err23),errors++}if(void 0!==data8.price&&"number"!=typeof data8.price){const err24={instancePath:instancePath+"/items/"+i0+"/price",schemaPath:"#/properties/items/items/properties/price/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err24]:vErrors.push(err24),errors++}if(void 0!==data8.taxClass&&"string"!=typeof data8.taxClass){const err25={instancePath:instancePath+"/items/"+i0+"/taxClass",schemaPath:"#/properties/items/items/properties/taxClass/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err25]:vErrors.push(err25),errors++}if(void 0!==data8.deliveryClass&&"string"!=typeof data8.deliveryClass){const err26={instancePath:instancePath+"/items/"+i0+"/deliveryClass",schemaPath:"#/properties/items/items/properties/deliveryClass/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err26]:vErrors.push(err26),errors++}if(void 0!==data8.productId&&"string"!=typeof data8.productId){const err27={instancePath:instancePath+"/items/"+i0+"/productId",schemaPath:"#/properties/items/items/properties/productId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err27]:vErrors.push(err27),errors++}}else{const err28={instancePath:instancePath+"/items/"+i0,schemaPath:"#/properties/items/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err28]:vErrors.push(err28),errors++}}}else{const err29={instancePath:instancePath+"/items",schemaPath:"#/properties/items/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err29]:vErrors.push(err29),errors++}let data17=data.taxes;if(Array.isArray(data17)){const len1=data17.length;for(let i1=0;i1<len1;i1++){let data18=data17[i1];if(data18&&"object"==typeof data18&&!Array.isArray(data18)){if(void 0===data18.rateType&&(data18.rateType="percentage"),void 0===data18.name){const err30={instancePath:instancePath+"/taxes/"+i1,schemaPath:"#/properties/taxes/items/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};null===vErrors?vErrors=[err30]:vErrors.push(err30),errors++}if(void 0===data18.rate){const err31={instancePath:instancePath+"/taxes/"+i1,schemaPath:"#/properties/taxes/items/required",keyword:"required",params:{missingProperty:"rate"},message:"must have required property 'rate'"};null===vErrors?vErrors=[err31]:vErrors.push(err31),errors++}if(void 0!==data18.additionalProperties){const err32={instancePath:instancePath+"/taxes/"+i1+"/additionalProperties",schemaPath:"#/properties/taxes/items/properties/additionalProperties/false schema",keyword:"false schema",params:{},message:"boolean schema is false"};null===vErrors?vErrors=[err32]:vErrors.push(err32),errors++}if(void 0!==data18.name&&"string"!=typeof data18.name){const err33={instancePath:instancePath+"/taxes/"+i1+"/name",schemaPath:"#/properties/taxes/items/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err33]:vErrors.push(err33),errors++}if(void 0!==data18.class&&"string"!=typeof data18.class){const err34={instancePath:instancePath+"/taxes/"+i1+"/class",schemaPath:"#/properties/taxes/items/properties/class/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err34]:vErrors.push(err34),errors++}let data22=data18.rateType;if("string"!=typeof data22){const err35={instancePath:instancePath+"/taxes/"+i1+"/rateType",schemaPath:"#/properties/taxes/items/properties/rateType/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err35]:vErrors.push(err35),errors++}if("percentage"!==data22&&"flat"!==data22){const err36={instancePath:instancePath+"/taxes/"+i1+"/rateType",schemaPath:"#/properties/taxes/items/properties/rateType/enum",keyword:"enum",params:{allowedValues:schema141.properties.taxes.items.properties.rateType.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err36]:vErrors.push(err36),errors++}if(void 0!==data18.rate&&"number"!=typeof data18.rate){const err37={instancePath:instancePath+"/taxes/"+i1+"/rate",schemaPath:"#/properties/taxes/items/properties/rate/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err37]:vErrors.push(err37),errors++}if(void 0!==data18.total&&"number"!=typeof data18.total){const err38={instancePath:instancePath+"/taxes/"+i1+"/total",schemaPath:"#/properties/taxes/items/properties/total/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err38]:vErrors.push(err38),errors++}}else{const err39={instancePath:instancePath+"/taxes/"+i1,schemaPath:"#/properties/taxes/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err39]:vErrors.push(err39),errors++}}}else{const err40={instancePath:instancePath+"/taxes",schemaPath:"#/properties/taxes/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err40]:vErrors.push(err40),errors++}let data25=data.fees;if(Array.isArray(data25)){const len2=data25.length;for(let i2=0;i2<len2;i2++){let data26=data25[i2];if(data26&&"object"==typeof data26&&!Array.isArray(data26)){if(void 0===data26.name){const err41={instancePath:instancePath+"/fees/"+i2,schemaPath:"#/properties/fees/items/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};null===vErrors?vErrors=[err41]:vErrors.push(err41),errors++}if(void 0===data26.price){const err42={instancePath:instancePath+"/fees/"+i2,schemaPath:"#/properties/fees/items/required",keyword:"required",params:{missingProperty:"price"},message:"must have required property 'price'"};null===vErrors?vErrors=[err42]:vErrors.push(err42),errors++}if(void 0!==data26.additionalProperties){const err43={instancePath:instancePath+"/fees/"+i2+"/additionalProperties",schemaPath:"#/properties/fees/items/properties/additionalProperties/false schema",keyword:"false schema",params:{},message:"boolean schema is false"};null===vErrors?vErrors=[err43]:vErrors.push(err43),errors++}if(void 0!==data26.name&&"string"!=typeof data26.name){const err44={instancePath:instancePath+"/fees/"+i2+"/name",schemaPath:"#/properties/fees/items/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err44]:vErrors.push(err44),errors++}if(void 0!==data26.price&&"number"!=typeof data26.price){const err45={instancePath:instancePath+"/fees/"+i2+"/price",schemaPath:"#/properties/fees/items/properties/price/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err45]:vErrors.push(err45),errors++}}else{const err46={instancePath:instancePath+"/fees/"+i2,schemaPath:"#/properties/fees/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err46]:vErrors.push(err46),errors++}}}else{const err47={instancePath:instancePath+"/fees",schemaPath:"#/properties/fees/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err47]:vErrors.push(err47),errors++}let data30=data.delivery;if(Array.isArray(data30)){const len3=data30.length;for(let i3=0;i3<len3;i3++){let data31=data30[i3];if(data31&&"object"==typeof data31&&!Array.isArray(data31)){if(void 0===data31.rateType&&(data31.rateType="percentage"),void 0===data31.name){const err48={instancePath:instancePath+"/delivery/"+i3,schemaPath:"#/properties/delivery/items/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};null===vErrors?vErrors=[err48]:vErrors.push(err48),errors++}if(void 0===data31.rate){const err49={instancePath:instancePath+"/delivery/"+i3,schemaPath:"#/properties/delivery/items/required",keyword:"required",params:{missingProperty:"rate"},message:"must have required property 'rate'"};null===vErrors?vErrors=[err49]:vErrors.push(err49),errors++}if(void 0!==data31.additionalProperties){const err50={instancePath:instancePath+"/delivery/"+i3+"/additionalProperties",schemaPath:"#/properties/delivery/items/properties/additionalProperties/false schema",keyword:"false schema",params:{},message:"boolean schema is false"};null===vErrors?vErrors=[err50]:vErrors.push(err50),errors++}if(void 0!==data31.name&&"string"!=typeof data31.name){const err51={instancePath:instancePath+"/delivery/"+i3+"/name",schemaPath:"#/properties/delivery/items/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err51]:vErrors.push(err51),errors++}if(void 0!==data31.class&&"string"!=typeof data31.class){const err52={instancePath:instancePath+"/delivery/"+i3+"/class",schemaPath:"#/properties/delivery/items/properties/class/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err52]:vErrors.push(err52),errors++}let data35=data31.rateType;if("string"!=typeof data35){const err53={instancePath:instancePath+"/delivery/"+i3+"/rateType",schemaPath:"#/properties/delivery/items/properties/rateType/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err53]:vErrors.push(err53),errors++}if("percentage"!==data35&&"flat"!==data35){const err54={instancePath:instancePath+"/delivery/"+i3+"/rateType",schemaPath:"#/properties/delivery/items/properties/rateType/enum",keyword:"enum",params:{allowedValues:schema141.properties.delivery.items.properties.rateType.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err54]:vErrors.push(err54),errors++}if(void 0!==data31.rate&&"number"!=typeof data31.rate){const err55={instancePath:instancePath+"/delivery/"+i3+"/rate",schemaPath:"#/properties/delivery/items/properties/rate/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err55]:vErrors.push(err55),errors++}if(void 0!==data31.total&&"number"!=typeof data31.total){const err56={instancePath:instancePath+"/delivery/"+i3+"/total",schemaPath:"#/properties/delivery/items/properties/total/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err56]:vErrors.push(err56),errors++}}else{const err57={instancePath:instancePath+"/delivery/"+i3,schemaPath:"#/properties/delivery/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err57]:vErrors.push(err57),errors++}}}else{const err58={instancePath:instancePath+"/delivery",schemaPath:"#/properties/delivery/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err58]:vErrors.push(err58),errors++}let data38=data.payments;if(Array.isArray(data38)){const len4=data38.length;for(let i4=0;i4<len4;i4++){let data39=data38[i4];if(data39&&"object"==typeof data39&&!Array.isArray(data39)){if(void 0!==data39.method){let data40=data39.method;if("string"!=typeof data40){const err59={instancePath:instancePath+"/payments/"+i4+"/method",schemaPath:"#/properties/payments/items/properties/method/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err59]:vErrors.push(err59),errors++}if("folio"!==data40&&"invoice"!==data40&&"amex"!==data40&&"visa"!==data40&&"masterCard"!==data40&&"maestro"!==data40&&"discover"!==data40&&"diners"!==data40&&"jcb"!==data40&&"applePay"!==data40&&"alipay"!==data40&&"chinaUnionPay"!==data40&&"vpay"!==data40){const err60={instancePath:instancePath+"/payments/"+i4+"/method",schemaPath:"#/properties/payments/items/properties/method/enum",keyword:"enum",params:{allowedValues:schema141.properties.payments.items.properties.method.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err60]:vErrors.push(err60),errors++}}if(void 0!==data39.name&&"string"!=typeof data39.name){const err61={instancePath:instancePath+"/payments/"+i4+"/name",schemaPath:"#/properties/payments/items/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err61]:vErrors.push(err61),errors++}if(void 0!==data39.date){let data42=data39.date;if("string"!=typeof data42&&(!data42||"object"!=typeof data42||Array.isArray(data42))){const err62={instancePath:instancePath+"/payments/"+i4+"/date",schemaPath:"definitions.json#/definitions/date/type",keyword:"type",params:{type:schema25.type},message:"must be string,object"};null===vErrors?vErrors=[err62]:vErrors.push(err62),errors++}if("string"==typeof data42&&!formats4.validate(data42)){const err63={instancePath:instancePath+"/payments/"+i4+"/date",schemaPath:"definitions.json#/definitions/date/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err63]:vErrors.push(err63),errors++}}if(void 0!==data39.amount&&"number"!=typeof data39.amount){const err64={instancePath:instancePath+"/payments/"+i4+"/amount",schemaPath:"#/properties/payments/items/properties/amount/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err64]:vErrors.push(err64),errors++}if(void 0!==data39.transactionReference&&"string"!=typeof data39.transactionReference){const err65={instancePath:instancePath+"/payments/"+i4+"/transactionReference",schemaPath:"#/properties/payments/items/properties/transactionReference/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err65]:vErrors.push(err65),errors++}}else{const err66={instancePath:instancePath+"/payments/"+i4,schemaPath:"#/properties/payments/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err66]:vErrors.push(err66),errors++}}}else{const err67={instancePath:instancePath+"/payments",schemaPath:"#/properties/payments/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err67]:vErrors.push(err67),errors++}}else{const err68={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err68]:vErrors.push(err68),errors++}return validate55.errors=vErrors,0===errors},schema141={$schema:"http://json-schema.org/draft-07/schema",$id:"order.json",title:"Order",description:"A purchase order for products or services.",type:"object",required:["type","status"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",default:"order",enum:["order"]},orderNumber:{type:"string"},status:{type:"string",enum:["draft","pendingPayment","processing","outForDelivery","completed","paymentFailed","cancelled","refunded"]},userId:{$ref:"definitions.json#/definitions/id",description:"User id of purchaser"},reservationId:{$ref:"definitions.json#/definitions/id",description:"Reservation id if the order is for a reservation"},date:{$ref:"definitions.json#/definitions/date"},items:{type:"array",default:[],items:{type:"object",required:["name","price"],properties:{additionalProperties:!1,name:{type:"string"},sku:{type:"string"},quantity:{type:"number",default:1},price:{type:"number"},taxClass:{type:"string"},deliveryClass:{type:"string"},productId:{type:"string"}}}},taxes:{type:"array",default:[],items:{type:"object",required:["name","rate"],properties:{additionalProperties:!1,name:{type:"string"},class:{type:"string"},rateType:{type:"string",enum:["percentage","flat"],default:"percentage"},rate:{type:"number"},total:{type:"number"}}}},fees:{type:"array",default:[],items:{type:"object",required:["name","price"],properties:{additionalProperties:!1,name:{type:"string"},price:{type:"number"}}}},delivery:{type:"array",default:[],items:{type:"object",required:["name","rate"],properties:{additionalProperties:!1,name:{type:"string"},class:{type:"string"},rateType:{type:"string",enum:["percentage","flat"],default:"percentage"},rate:{type:"number"},total:{type:"number"}}}},payments:{type:"array",default:[],items:{type:"object",properties:{method:{type:"string",enum:["folio","invoice","amex","visa","masterCard","maestro","discover","diners","jcb","applePay","alipay","chinaUnionPay","vpay"]},name:{type:"string"},date:{$ref:"definitions.json#/definitions/date"},amount:{type:"number"},transactionReference:{type:"string"}}}}}};var validateOrganization=function validate56(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0===data.type&&(data.type="organization"),void 0===data.appManifest&&(data.appManifest={name:"Kohost",short_name:"Kohost",start_url:"/",scope:"/",display:"fullscreen",orientation:"portrait",theme_color:"#1d1f22",background_color:"#1d1f22",icons:[{src:"https://images.kohost.io/cdn-cgi/imagedelivery/vcVX2aBwdFSYr66spcFKaA/9c85047f-ccba-4b1c-3070-5463fbe93b00/w=512",sizes:"512x512",type:"image/png"}],splash:{src:"https://images.kohost.io/cdn-cgi/imagedelivery/vcVX2aBwdFSYr66spcFKaA/034fb112-5326-4d37-373e-d1cc2a4d0400/w=1500",sizes:"1500x800",type:"image/jpg"},logo:{src:"https://images.kohost.io/cdn-cgi/imagedelivery/vcVX2aBwdFSYr66spcFKaA/1e54c54d-3bac-4745-f46f-c2f98036af00/h=75",sizes:"300x75",type:"image/png"}}),void 0===data.accountNumber){const err0={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"accountNumber"},message:"must have required property 'accountNumber'"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(void 0===data.name){const err1={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if(void 0!==data.id){let data0=data.id;if("string"!=typeof data0){const err2={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}const _errs4=errors,_errs5=errors;if("global"!==data0&&"system"!==data0){const err3={};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}if(_errs5===errors){const err4={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}else errors=_errs4,null!==vErrors&&(_errs4?vErrors.length=_errs4:vErrors=null)}let data1=data.type;if("string"!=typeof data1){const err5={instancePath:instancePath+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}if("organization"!==data1){const err6={instancePath:instancePath+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:schema147.properties.type.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}if(void 0!==data.accountNumber){let data2=data.accountNumber;if("number"!=typeof data2&&null!==data2){const err7={instancePath:instancePath+"/accountNumber",schemaPath:"#/properties/accountNumber/type",keyword:"type",params:{type:schema147.properties.accountNumber.type},message:"must be number,null"};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}if("number"==typeof data2&&(data2<1e4||isNaN(data2))){const err8={instancePath:instancePath+"/accountNumber",schemaPath:"#/properties/accountNumber/minimum",keyword:"minimum",params:{comparison:">=",limit:1e4},message:"must be >= 10000"};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}}if(void 0!==data.name&&"string"!=typeof data.name){const err9={instancePath:instancePath+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}if(void 0!==data.properties){let data4=data.properties;if(Array.isArray(data4)){const len0=data4.length;for(let i0=0;i0<len0;i0++)if("string"!=typeof data4[i0]){const err10={instancePath:instancePath+"/properties/"+i0,schemaPath:"#/properties/properties/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err10]:vErrors.push(err10),errors++}}else{const err11={instancePath:instancePath+"/properties",schemaPath:"#/properties/properties/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err11]:vErrors.push(err11),errors++}}if(void 0!==data.hostname){let data6=data.hostname;if("string"!=typeof data6&&null!==data6){const err12={instancePath:instancePath+"/hostname",schemaPath:"#/properties/hostname/type",keyword:"type",params:{type:schema147.properties.hostname.type},message:"must be string,null"};null===vErrors?vErrors=[err12]:vErrors.push(err12),errors++}}let data7=data.appManifest;if(data7&&"object"==typeof data7&&!Array.isArray(data7)){if(void 0===data7.display&&(data7.display="fullscreen"),void 0===data7.orientation&&(data7.orientation="portrait"),void 0!==data7.name&&"string"!=typeof data7.name){const err13={instancePath:instancePath+"/appManifest/name",schemaPath:"#/properties/appManifest/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err13]:vErrors.push(err13),errors++}if(void 0!==data7.short_name&&"string"!=typeof data7.short_name){const err14={instancePath:instancePath+"/appManifest/short_name",schemaPath:"#/properties/appManifest/properties/short_name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err14]:vErrors.push(err14),errors++}if(void 0!==data7.scope&&"string"!=typeof data7.scope){const err15={instancePath:instancePath+"/appManifest/scope",schemaPath:"#/properties/appManifest/properties/scope/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err15]:vErrors.push(err15),errors++}if(void 0!==data7.start_url&&"string"!=typeof data7.start_url){const err16={instancePath:instancePath+"/appManifest/start_url",schemaPath:"#/properties/appManifest/properties/start_url/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err16]:vErrors.push(err16),errors++}if(void 0!==data7.themeColor&&"string"!=typeof data7.themeColor){const err17={instancePath:instancePath+"/appManifest/themeColor",schemaPath:"#/properties/appManifest/properties/themeColor/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err17]:vErrors.push(err17),errors++}if(void 0!==data7.backgroundColor&&"string"!=typeof data7.backgroundColor){const err18={instancePath:instancePath+"/appManifest/backgroundColor",schemaPath:"#/properties/appManifest/properties/backgroundColor/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err18]:vErrors.push(err18),errors++}let data14=data7.display;if("string"!=typeof data14){const err19={instancePath:instancePath+"/appManifest/display",schemaPath:"#/properties/appManifest/properties/display/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err19]:vErrors.push(err19),errors++}if("fullscreen"!==data14&&"standalone"!==data14&&"minimal-ui"!==data14&&"browser"!==data14){const err20={instancePath:instancePath+"/appManifest/display",schemaPath:"#/properties/appManifest/properties/display/enum",keyword:"enum",params:{allowedValues:schema147.properties.appManifest.properties.display.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err20]:vErrors.push(err20),errors++}let data15=data7.orientation;if("string"!=typeof data15){const err21={instancePath:instancePath+"/appManifest/orientation",schemaPath:"#/properties/appManifest/properties/orientation/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err21]:vErrors.push(err21),errors++}if("portrait"!==data15&&"landscape"!==data15){const err22={instancePath:instancePath+"/appManifest/orientation",schemaPath:"#/properties/appManifest/properties/orientation/enum",keyword:"enum",params:{allowedValues:schema147.properties.appManifest.properties.orientation.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err22]:vErrors.push(err22),errors++}if(void 0!==data7.splash){let data16=data7.splash;if(data16&&"object"==typeof data16&&!Array.isArray(data16)){if(void 0!==data16.src&&"string"!=typeof data16.src){const err23={instancePath:instancePath+"/appManifest/splash/src",schemaPath:"#/properties/appManifest/properties/splash/properties/src/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err23]:vErrors.push(err23),errors++}if(void 0!==data16.type&&"string"!=typeof data16.type){const err24={instancePath:instancePath+"/appManifest/splash/type",schemaPath:"#/properties/appManifest/properties/splash/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err24]:vErrors.push(err24),errors++}if(void 0!==data16.sizes&&"string"!=typeof data16.sizes){const err25={instancePath:instancePath+"/appManifest/splash/sizes",schemaPath:"#/properties/appManifest/properties/splash/properties/sizes/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err25]:vErrors.push(err25),errors++}}else{const err26={instancePath:instancePath+"/appManifest/splash",schemaPath:"#/properties/appManifest/properties/splash/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err26]:vErrors.push(err26),errors++}}if(void 0!==data7.icons){let data20=data7.icons;if(Array.isArray(data20)){const len1=data20.length;for(let i1=0;i1<len1;i1++){let data21=data20[i1];if(data21&&"object"==typeof data21&&!Array.isArray(data21)){if(void 0!==data21.src&&"string"!=typeof data21.src){const err27={instancePath:instancePath+"/appManifest/icons/"+i1+"/src",schemaPath:"#/properties/appManifest/properties/icons/items/properties/src/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err27]:vErrors.push(err27),errors++}if(void 0!==data21.sizes&&"string"!=typeof data21.sizes){const err28={instancePath:instancePath+"/appManifest/icons/"+i1+"/sizes",schemaPath:"#/properties/appManifest/properties/icons/items/properties/sizes/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err28]:vErrors.push(err28),errors++}if(void 0!==data21.type&&"string"!=typeof data21.type){const err29={instancePath:instancePath+"/appManifest/icons/"+i1+"/type",schemaPath:"#/properties/appManifest/properties/icons/items/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err29]:vErrors.push(err29),errors++}}else{const err30={instancePath:instancePath+"/appManifest/icons/"+i1,schemaPath:"#/properties/appManifest/properties/icons/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err30]:vErrors.push(err30),errors++}}}else{const err31={instancePath:instancePath+"/appManifest/icons",schemaPath:"#/properties/appManifest/properties/icons/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err31]:vErrors.push(err31),errors++}}if(void 0!==data7.logo){let data25=data7.logo;if(data25&&"object"==typeof data25&&!Array.isArray(data25)){if(void 0!==data25.src&&"string"!=typeof data25.src){const err32={instancePath:instancePath+"/appManifest/logo/src",schemaPath:"#/properties/appManifest/properties/logo/properties/src/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err32]:vErrors.push(err32),errors++}if(void 0!==data25.type&&"string"!=typeof data25.type){const err33={instancePath:instancePath+"/appManifest/logo/type",schemaPath:"#/properties/appManifest/properties/logo/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err33]:vErrors.push(err33),errors++}if(void 0!==data25.sizes&&"string"!=typeof data25.sizes){const err34={instancePath:instancePath+"/appManifest/logo/sizes",schemaPath:"#/properties/appManifest/properties/logo/properties/sizes/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err34]:vErrors.push(err34),errors++}}else{const err35={instancePath:instancePath+"/appManifest/logo",schemaPath:"#/properties/appManifest/properties/logo/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err35]:vErrors.push(err35),errors++}}}else{const err36={instancePath:instancePath+"/appManifest",schemaPath:"#/properties/appManifest/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err36]:vErrors.push(err36),errors++}if(void 0!==data.tickets){let data29=data.tickets;if(data29&&"object"==typeof data29&&!Array.isArray(data29)){void 0===data29.nextTicketNumber&&(data29.nextTicketNumber=1);let data30=data29.nextTicketNumber;if("string"!=typeof data30&&("number"!=typeof data30||data30%1||isNaN(data30))){const err37={instancePath:instancePath+"/tickets/nextTicketNumber",schemaPath:"#/properties/tickets/properties/nextTicketNumber/type",keyword:"type",params:{type:schema147.properties.tickets.properties.nextTicketNumber.type},message:"must be string,integer"};null===vErrors?vErrors=[err37]:vErrors.push(err37),errors++}}else{const err38={instancePath:instancePath+"/tickets",schemaPath:"#/properties/tickets/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err38]:vErrors.push(err38),errors++}}if(void 0!==data.credentials){let data31=data.credentials;if(!data31||"object"!=typeof data31||Array.isArray(data31)){const err39={instancePath:instancePath+"/credentials",schemaPath:"#/properties/credentials/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err39]:vErrors.push(err39),errors++}}if(void 0!==data.createdAt){let data32=data.createdAt;if("string"!=typeof data32&&(!data32||"object"!=typeof data32||Array.isArray(data32))){const err40={instancePath:instancePath+"/createdAt",schemaPath:"definitions.json#/definitions/createdAt/type",keyword:"type",params:{type:schema102.type},message:"must be string,object"};null===vErrors?vErrors=[err40]:vErrors.push(err40),errors++}if("string"==typeof data32&&!formats4.validate(data32)){const err41={instancePath:instancePath+"/createdAt",schemaPath:"definitions.json#/definitions/createdAt/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err41]:vErrors.push(err41),errors++}}if(void 0!==data.updatedAt){let data33=data.updatedAt;if("string"!=typeof data33&&(!data33||"object"!=typeof data33||Array.isArray(data33))){const err42={instancePath:instancePath+"/updatedAt",schemaPath:"definitions.json#/definitions/updatedAt/type",keyword:"type",params:{type:schema150.type},message:"must be string,object"};null===vErrors?vErrors=[err42]:vErrors.push(err42),errors++}if("string"==typeof data33&&!formats4.validate(data33)){const err43={instancePath:instancePath+"/updatedAt",schemaPath:"definitions.json#/definitions/updatedAt/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err43]:vErrors.push(err43),errors++}}}else{const err44={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err44]:vErrors.push(err44),errors++}return validate56.errors=vErrors,0===errors},schema147={$schema:"http://json-schema.org/draft-07/schema",$id:"organization.json",title:"Organization",type:"object",description:"An organization is a group or entity that subscribes to Kohost software.",required:["accountNumber","name"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",default:"organization",enum:["organization"]},accountNumber:{type:["number","null"],minimum:1e4},name:{type:"string"},properties:{type:"array",items:{type:"string"}},hostname:{type:["string","null"]},appManifest:{type:"object",properties:{name:{type:"string"},short_name:{type:"string"},scope:{type:"string"},start_url:{type:"string"},themeColor:{type:"string"},backgroundColor:{type:"string"},display:{type:"string",enum:["fullscreen","standalone","minimal-ui","browser"],default:"fullscreen"},orientation:{type:"string",enum:["portrait","landscape"],default:"portrait"},splash:{type:"object",properties:{src:{type:"string"},type:{type:"string"},sizes:{type:"string"}}},icons:{type:"array",items:{type:"object",properties:{src:{type:"string"},sizes:{type:"string"},type:{type:"string"}}}},logo:{type:"object",properties:{src:{type:"string"},type:{type:"string"},sizes:{type:"string"}}}},default:{name:"Kohost",short_name:"Kohost",start_url:"/",scope:"/",display:"fullscreen",orientation:"portrait",theme_color:"#1d1f22",background_color:"#1d1f22",icons:[{src:"https://images.kohost.io/cdn-cgi/imagedelivery/vcVX2aBwdFSYr66spcFKaA/9c85047f-ccba-4b1c-3070-5463fbe93b00/w=512",sizes:"512x512",type:"image/png"}],splash:{src:"https://images.kohost.io/cdn-cgi/imagedelivery/vcVX2aBwdFSYr66spcFKaA/034fb112-5326-4d37-373e-d1cc2a4d0400/w=1500",sizes:"1500x800",type:"image/jpg"},logo:{src:"https://images.kohost.io/cdn-cgi/imagedelivery/vcVX2aBwdFSYr66spcFKaA/1e54c54d-3bac-4745-f46f-c2f98036af00/h=75",sizes:"300x75",type:"image/png"}}},tickets:{type:"object",properties:{nextTicketNumber:{type:["string","integer"],default:1}}},credentials:{type:"object",additionalProperties:!0},createdAt:{$ref:"definitions.json#/definitions/createdAt"},updatedAt:{$ref:"definitions.json#/definitions/updatedAt"}}},schema102={type:["string","object"],format:"date-time"},schema150={type:["string","object"],format:"date-time"};var validatePayment=validate57,schema151={$schema:"http://json-schema.org/draft-07/schema",$id:"payment.json",title:"Payment",type:"object",required:["type","maskedNumber","expires"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",enum:["amex","visa","masterCard","maestro","discover","diners","jcb","applePay","alipay","chinaUnionPay","vpay"]},enabled:{type:"boolean",default:!0},storageData:{type:["string","null"]},maskedNumber:{string:"string"},issued:{type:["string","null"]},expires:{string:"string"},systemId:{$ref:"definitions.json#/definitions/systemId"}}};function validate57(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0===data.enabled&&(data.enabled=!0),void 0===data.type){const err0={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(void 0===data.maskedNumber){const err1={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"maskedNumber"},message:"must have required property 'maskedNumber'"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if(void 0===data.expires){const err2={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"expires"},message:"must have required property 'expires'"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}if(void 0!==data.id){let data0=data.id;if("string"!=typeof data0){const err3={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}const _errs4=errors,_errs5=errors;if("global"!==data0&&"system"!==data0){const err4={};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}if(_errs5===errors){const err5={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}else errors=_errs4,null!==vErrors&&(_errs4?vErrors.length=_errs4:vErrors=null)}if(void 0!==data.type){let data1=data.type;if("string"!=typeof data1){const err6={instancePath:instancePath+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}if("amex"!==data1&&"visa"!==data1&&"masterCard"!==data1&&"maestro"!==data1&&"discover"!==data1&&"diners"!==data1&&"jcb"!==data1&&"applePay"!==data1&&"alipay"!==data1&&"chinaUnionPay"!==data1&&"vpay"!==data1){const err7={instancePath:instancePath+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:schema151.properties.type.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}}if("boolean"!=typeof data.enabled){const err8={instancePath:instancePath+"/enabled",schemaPath:"#/properties/enabled/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}if(void 0!==data.storageData){let data3=data.storageData;if("string"!=typeof data3&&null!==data3){const err9={instancePath:instancePath+"/storageData",schemaPath:"#/properties/storageData/type",keyword:"type",params:{type:schema151.properties.storageData.type},message:"must be string,null"};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}}if(void 0!==data.issued){let data4=data.issued;if("string"!=typeof data4&&null!==data4){const err10={instancePath:instancePath+"/issued",schemaPath:"#/properties/issued/type",keyword:"type",params:{type:schema151.properties.issued.type},message:"must be string,null"};null===vErrors?vErrors=[err10]:vErrors.push(err10),errors++}}if(void 0!==data.systemId&&"string"!=typeof data.systemId){const err11={instancePath:instancePath+"/systemId",schemaPath:"definitions.json#/definitions/systemId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err11]:vErrors.push(err11),errors++}}else{const err12={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err12]:vErrors.push(err12),errors++}return validate57.errors=vErrors,0===errors}var validatePolicy=validate58,schema154={$schema:"http://json-schema.org/draft-07/schema",$id:"policy.json",title:"Policy",description:"A policy is a set of permissions that can be applied to a user to limit their access to resources.",type:"object",required:["name","type","organizationId","propertyId","permissions","discriminator"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",default:"policy",enum:["policy"]},discriminator:{type:"string",enum:["user"]},name:{type:"string",minLength:1},description:{type:"string"},organizationId:{type:"string"},propertyId:{type:"string"},permissions:{type:"array",items:{type:"object",required:["entities","effect"],properties:{entities:{type:"array",items:{type:"string",pattern:"^[^:]+(:.+)+$"}},effect:{type:"string",enum:["Allow","Deny"]}}}}}},pattern2=new RegExp("^[^:]+(:.+)+$","u");function validate58(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0===data.type&&(data.type="policy"),void 0===data.name){const err0={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(void 0===data.type){const err1={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if(void 0===data.organizationId){const err2={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"organizationId"},message:"must have required property 'organizationId'"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}if(void 0===data.propertyId){const err3={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"propertyId"},message:"must have required property 'propertyId'"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}if(void 0===data.permissions){const err4={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"permissions"},message:"must have required property 'permissions'"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}if(void 0===data.discriminator){const err5={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"discriminator"},message:"must have required property 'discriminator'"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}if(void 0!==data.id){let data0=data.id;if("string"!=typeof data0){const err6={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}const _errs4=errors,_errs5=errors;if("global"!==data0&&"system"!==data0){const err7={};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}if(_errs5===errors){const err8={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}else errors=_errs4,null!==vErrors&&(_errs4?vErrors.length=_errs4:vErrors=null)}let data1=data.type;if("string"!=typeof data1){const err9={instancePath:instancePath+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}if("policy"!==data1){const err10={instancePath:instancePath+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:schema154.properties.type.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err10]:vErrors.push(err10),errors++}if(void 0!==data.discriminator){let data2=data.discriminator;if("string"!=typeof data2){const err11={instancePath:instancePath+"/discriminator",schemaPath:"#/properties/discriminator/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err11]:vErrors.push(err11),errors++}if("user"!==data2){const err12={instancePath:instancePath+"/discriminator",schemaPath:"#/properties/discriminator/enum",keyword:"enum",params:{allowedValues:schema154.properties.discriminator.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err12]:vErrors.push(err12),errors++}}if(void 0!==data.name){let data3=data.name;if("string"==typeof data3){if(func3(data3)<1){const err13={instancePath:instancePath+"/name",schemaPath:"#/properties/name/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};null===vErrors?vErrors=[err13]:vErrors.push(err13),errors++}}else{const err14={instancePath:instancePath+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err14]:vErrors.push(err14),errors++}}if(void 0!==data.description&&"string"!=typeof data.description){const err15={instancePath:instancePath+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err15]:vErrors.push(err15),errors++}if(void 0!==data.organizationId&&"string"!=typeof data.organizationId){const err16={instancePath:instancePath+"/organizationId",schemaPath:"#/properties/organizationId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err16]:vErrors.push(err16),errors++}if(void 0!==data.propertyId&&"string"!=typeof data.propertyId){const err17={instancePath:instancePath+"/propertyId",schemaPath:"#/properties/propertyId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err17]:vErrors.push(err17),errors++}if(void 0!==data.permissions){let data7=data.permissions;if(Array.isArray(data7)){const len0=data7.length;for(let i0=0;i0<len0;i0++){let data8=data7[i0];if(data8&&"object"==typeof data8&&!Array.isArray(data8)){if(void 0===data8.entities){const err18={instancePath:instancePath+"/permissions/"+i0,schemaPath:"#/properties/permissions/items/required",keyword:"required",params:{missingProperty:"entities"},message:"must have required property 'entities'"};null===vErrors?vErrors=[err18]:vErrors.push(err18),errors++}if(void 0===data8.effect){const err19={instancePath:instancePath+"/permissions/"+i0,schemaPath:"#/properties/permissions/items/required",keyword:"required",params:{missingProperty:"effect"},message:"must have required property 'effect'"};null===vErrors?vErrors=[err19]:vErrors.push(err19),errors++}if(void 0!==data8.entities){let data9=data8.entities;if(Array.isArray(data9)){const len1=data9.length;for(let i1=0;i1<len1;i1++){let data10=data9[i1];if("string"==typeof data10){if(!pattern2.test(data10)){const err20={instancePath:instancePath+"/permissions/"+i0+"/entities/"+i1,schemaPath:"#/properties/permissions/items/properties/entities/items/pattern",keyword:"pattern",params:{pattern:"^[^:]+(:.+)+$"},message:'must match pattern "^[^:]+(:.+)+$"'};null===vErrors?vErrors=[err20]:vErrors.push(err20),errors++}}else{const err21={instancePath:instancePath+"/permissions/"+i0+"/entities/"+i1,schemaPath:"#/properties/permissions/items/properties/entities/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err21]:vErrors.push(err21),errors++}}}else{const err22={instancePath:instancePath+"/permissions/"+i0+"/entities",schemaPath:"#/properties/permissions/items/properties/entities/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err22]:vErrors.push(err22),errors++}}if(void 0!==data8.effect){let data11=data8.effect;if("string"!=typeof data11){const err23={instancePath:instancePath+"/permissions/"+i0+"/effect",schemaPath:"#/properties/permissions/items/properties/effect/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err23]:vErrors.push(err23),errors++}if("Allow"!==data11&&"Deny"!==data11){const err24={instancePath:instancePath+"/permissions/"+i0+"/effect",schemaPath:"#/properties/permissions/items/properties/effect/enum",keyword:"enum",params:{allowedValues:schema154.properties.permissions.items.properties.effect.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err24]:vErrors.push(err24),errors++}}}else{const err25={instancePath:instancePath+"/permissions/"+i0,schemaPath:"#/properties/permissions/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err25]:vErrors.push(err25),errors++}}}else{const err26={instancePath:instancePath+"/permissions",schemaPath:"#/properties/permissions/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err26]:vErrors.push(err26),errors++}}}else{const err27={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err27]:vErrors.push(err27),errors++}return validate58.errors=vErrors,0===errors}var validateProduct=function validate59(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0===data.type&&(data.type="product"),void 0===data.name){const err0={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(void 0===data.price){const err1={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"price"},message:"must have required property 'price'"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if(void 0===data.driver){const err2={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"driver"},message:"must have required property 'driver'"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}if(void 0!==data.id){let data0=data.id;if("string"!=typeof data0){const err3={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}const _errs4=errors,_errs5=errors;if("global"!==data0&&"system"!==data0){const err4={};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}if(_errs5===errors){const err5={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}else errors=_errs4,null!==vErrors&&(_errs4?vErrors.length=_errs4:vErrors=null)}let data1=data.type;if("string"!=typeof data1){const err6={instancePath:instancePath+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}if("product"!==data1){const err7={instancePath:instancePath+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:schema156.properties.type.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}if(void 0!==data.name&&"string"!=typeof data.name){const err8={instancePath:instancePath+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}if(void 0!==data.driver){let data3=data.driver;if("string"!=typeof data3){const err9={instancePath:instancePath+"/driver",schemaPath:"definitions.json#/definitions/driver/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}if("adlink"!==data3&&"aws-kinesis"!==data3&&"butler"!==data3&&"crestron"!==data3&&"dell"!==data3&&"dmp"!==data3&&"doorbird"!==data3&&"dormakaba"!==data3&&"dsc"!==data3&&"ecobee"!==data3&&"epson"!==data3&&"geovision-rs"!==data3&&"geovision-as-manager"!==data3&&"honeywell-vista"!==data3&&"igor"!==data3&&"inncom"!==data3&&"isapi"!==data3&&"kohost-k7"!==data3&&"kohost"!==data3&&"lg"!==data3&&"lg-webos"!==data3&&"lapi"!==data3&&"lirc"!==data3&&"mews"!==data3&&"mht"!==data3&&"paxton"!==data3&&"pelican-wireless"!==data3&&"power-shades"!==data3&&"rachio"!==data3&&"rebrandly"!==data3&&"rtsp"!==data3&&"salto"!==data3&&"salto-irn"!==data3&&"samsung"!==data3&&"se"!==data3&&"sendgrid"!==data3&&"sonifi"!==data3&&"stay-n-touch"!==data3&&"storable"!==data3&&"twilio"!==data3&&"unifi"!==data3&&"valcom"!==data3&&"vizio"!==data3&&"wisenet"!==data3&&"cloudflare-images"!==data3&&"cloudflare-stream"!==data3&&"insperia-privacy"!==data3){const err10={instancePath:instancePath+"/driver",schemaPath:"definitions.json#/definitions/driver/enum",keyword:"enum",params:{allowedValues:schema18.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err10]:vErrors.push(err10),errors++}}if(void 0!==data.price&&"number"!=typeof data.price){const err11={instancePath:instancePath+"/price",schemaPath:"#/properties/price/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err11]:vErrors.push(err11),errors++}if(void 0!==data.tax){let data5=data.tax;if("number"!=typeof data5&&null!==data5){const err12={instancePath:instancePath+"/tax",schemaPath:"#/properties/tax/type",keyword:"type",params:{type:schema156.properties.tax.type},message:"must be number,null"};null===vErrors?vErrors=[err12]:vErrors.push(err12),errors++}}if(void 0!==data.image&&(validate15(data.image,{instancePath:instancePath+"/image",parentData:data,parentDataProperty:"image",rootData:rootData})||(vErrors=null===vErrors?validate15.errors:vErrors.concat(validate15.errors),errors=vErrors.length)),void 0!==data.category&&"string"!=typeof data.category){const err13={instancePath:instancePath+"/category",schemaPath:"#/properties/category/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err13]:vErrors.push(err13),errors++}if(void 0!==data.imageUrl){let data8=data.imageUrl;if("string"==typeof data8){if(!pattern3.test(data8)){const err14={instancePath:instancePath+"/imageUrl",schemaPath:"#/properties/imageUrl/pattern",keyword:"pattern",params:{pattern:"^https?://"},message:'must match pattern "^https?://"'};null===vErrors?vErrors=[err14]:vErrors.push(err14),errors++}if(!formats0(data8)){const err15={instancePath:instancePath+"/imageUrl",schemaPath:"#/properties/imageUrl/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};null===vErrors?vErrors=[err15]:vErrors.push(err15),errors++}}}if(void 0!==data.systemId&&"string"!=typeof data.systemId){const err16={instancePath:instancePath+"/systemId",schemaPath:"definitions.json#/definitions/systemId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err16]:vErrors.push(err16),errors++}}else{const err17={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err17]:vErrors.push(err17),errors++}return validate59.errors=vErrors,0===errors},schema156={$schema:"http://json-schema.org/draft-07/schema",$id:"product.json",title:"Product",type:"object",required:["name","price","driver"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",default:"product",enum:["product"]},name:{type:"string"},driver:{$ref:"definitions.json#/definitions/driver"},description:{string:"string"},price:{type:"number"},tax:{type:["number","null"]},image:{$ref:"mediaFile.json"},category:{type:"string"},imageUrl:{format:"uri",pattern:"^https?://"},systemId:{$ref:"definitions.json#/definitions/systemId"}}},pattern3=new RegExp("^https?://","u");var validateProperty=function validate61(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0===data.type&&(data.type="property"),void 0===data.appFeatures&&(data.appFeatures={RoomControl:{}}),void 0===data.notifications&&(data.notifications={email:{enabled:!1},sms:{enabled:!1},push:{enabled:!1}}),void 0===data.id){const err0={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(void 0===data.name){const err1={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if(void 0===data.type){const err2={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}if(void 0===data.organization){const err3={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"organization"},message:"must have required property 'organization'"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}if(void 0===data.timezone){const err4={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"timezone"},message:"must have required property 'timezone'"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}if(void 0===data.discriminator){const err5={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"discriminator"},message:"must have required property 'discriminator'"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}if(void 0!==data.id){let data0=data.id;if("string"!=typeof data0){const err6={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}const _errs4=errors,_errs5=errors;if("global"!==data0&&"system"!==data0){const err7={};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}if(_errs5===errors){const err8={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}else errors=_errs4,null!==vErrors&&(_errs4?vErrors.length=_errs4:vErrors=null)}if(void 0!==data.name&&"string"!=typeof data.name){const err9={instancePath:instancePath+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}let data2=data.type;if("string"!=typeof data2){const err10={instancePath:instancePath+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err10]:vErrors.push(err10),errors++}if("property"!==data2){const err11={instancePath:instancePath+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:schema160.properties.type.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err11]:vErrors.push(err11),errors++}if(void 0!==data.discriminator){let data3=data.discriminator;if("string"!=typeof data3){const err12={instancePath:instancePath+"/discriminator",schemaPath:"#/properties/discriminator/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err12]:vErrors.push(err12),errors++}if("hospitality"!==data3&&"education"!==data3&&"commercial"!==data3&&"storage"!==data3){const err13={instancePath:instancePath+"/discriminator",schemaPath:"#/properties/discriminator/enum",keyword:"enum",params:{allowedValues:schema160.properties.discriminator.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err13]:vErrors.push(err13),errors++}}if(void 0!==data.organization){let data4=data.organization;if("string"!=typeof data4&&null!==data4){const err14={instancePath:instancePath+"/organization",schemaPath:"#/properties/organization/type",keyword:"type",params:{type:schema160.properties.organization.type},message:"must be string,null"};null===vErrors?vErrors=[err14]:vErrors.push(err14),errors++}}if(void 0!==data.departments){let data5=data.departments;if(Array.isArray(data5)){const len0=data5.length;for(let i0=0;i0<len0;i0++)if("string"!=typeof data5[i0]){const err15={instancePath:instancePath+"/departments/"+i0,schemaPath:"#/properties/departments/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err15]:vErrors.push(err15),errors++}}else{const err16={instancePath:instancePath+"/departments",schemaPath:"#/properties/departments/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err16]:vErrors.push(err16),errors++}}if(void 0!==data.testModeEnabled&&"boolean"!=typeof data.testModeEnabled){const err17={instancePath:instancePath+"/testModeEnabled",schemaPath:"#/properties/testModeEnabled/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err17]:vErrors.push(err17),errors++}if(void 0!==data.testMode){let data8=data.testMode;if(data8&&"object"==typeof data8&&!Array.isArray(data8)){if(void 0!==data8.notificationEmails){let data9=data8.notificationEmails;if(Array.isArray(data9)){const len1=data9.length;for(let i1=0;i1<len1;i1++)if("string"!=typeof data9[i1]){const err18={instancePath:instancePath+"/testMode/notificationEmails/"+i1,schemaPath:"#/properties/testMode/properties/notificationEmails/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err18]:vErrors.push(err18),errors++}}else{const err19={instancePath:instancePath+"/testMode/notificationEmails",schemaPath:"#/properties/testMode/properties/notificationEmails/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err19]:vErrors.push(err19),errors++}}if(void 0!==data8.notificationEmailDomains){let data11=data8.notificationEmailDomains;if(Array.isArray(data11)){const len2=data11.length;for(let i2=0;i2<len2;i2++)if("string"!=typeof data11[i2]){const err20={instancePath:instancePath+"/testMode/notificationEmailDomains/"+i2,schemaPath:"#/properties/testMode/properties/notificationEmailDomains/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err20]:vErrors.push(err20),errors++}}else{const err21={instancePath:instancePath+"/testMode/notificationEmailDomains",schemaPath:"#/properties/testMode/properties/notificationEmailDomains/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err21]:vErrors.push(err21),errors++}}}else{const err22={instancePath:instancePath+"/testMode",schemaPath:"#/properties/testMode/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err22]:vErrors.push(err22),errors++}}if(void 0!==data.timezone){let data13=data.timezone;if("string"==typeof data13){if(!pattern4.test(data13)){const err23={instancePath:instancePath+"/timezone",schemaPath:"#/properties/timezone/pattern",keyword:"pattern",params:{pattern:"^([a-zA-Z]+/[a-zA-Z_]+)$"},message:'must match pattern "^([a-zA-Z]+/[a-zA-Z_]+)$"'};null===vErrors?vErrors=[err23]:vErrors.push(err23),errors++}}else{const err24={instancePath:instancePath+"/timezone",schemaPath:"#/properties/timezone/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err24]:vErrors.push(err24),errors++}}if(void 0!==data.smsNumber&&"string"!=typeof data.smsNumber){const err25={instancePath:instancePath+"/smsNumber",schemaPath:"#/properties/smsNumber/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err25]:vErrors.push(err25),errors++}if(void 0!==data.checkInTime&&"string"!=typeof data.checkInTime){const err26={instancePath:instancePath+"/checkInTime",schemaPath:"#/properties/checkInTime/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err26]:vErrors.push(err26),errors++}if(void 0!==data.checkOutTime&&"string"!=typeof data.checkOutTime){const err27={instancePath:instancePath+"/checkOutTime",schemaPath:"#/properties/checkOutTime/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err27]:vErrors.push(err27),errors++}if(void 0!==data.address){let data17=data.address;if(data17&&"object"==typeof data17&&!Array.isArray(data17)){if(void 0!==data17.id&&"string"!=typeof data17.id){const err28={instancePath:instancePath+"/address/id",schemaPath:"definitions.json#/definitions/address/properties/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err28]:vErrors.push(err28),errors++}if(void 0!==data17.line1&&"string"!=typeof data17.line1){const err29={instancePath:instancePath+"/address/line1",schemaPath:"definitions.json#/definitions/address/properties/line1/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err29]:vErrors.push(err29),errors++}if(void 0!==data17.line2&&"string"!=typeof data17.line2){const err30={instancePath:instancePath+"/address/line2",schemaPath:"definitions.json#/definitions/address/properties/line2/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err30]:vErrors.push(err30),errors++}if(void 0!==data17.line3&&"string"!=typeof data17.line3){const err31={instancePath:instancePath+"/address/line3",schemaPath:"definitions.json#/definitions/address/properties/line3/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err31]:vErrors.push(err31),errors++}if(void 0!==data17.city&&"string"!=typeof data17.city){const err32={instancePath:instancePath+"/address/city",schemaPath:"definitions.json#/definitions/address/properties/city/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err32]:vErrors.push(err32),errors++}if(void 0!==data17.state&&"string"!=typeof data17.state){const err33={instancePath:instancePath+"/address/state",schemaPath:"definitions.json#/definitions/address/properties/state/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err33]:vErrors.push(err33),errors++}if(void 0!==data17.postalCode&&"string"!=typeof data17.postalCode){const err34={instancePath:instancePath+"/address/postalCode",schemaPath:"definitions.json#/definitions/address/properties/postalCode/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err34]:vErrors.push(err34),errors++}if(void 0!==data17.countryCode){let data25=data17.countryCode;if("string"==typeof data25){if(func3(data25)>2){const err35={instancePath:instancePath+"/address/countryCode",schemaPath:"definitions.json#/definitions/address/properties/countryCode/maxLength",keyword:"maxLength",params:{limit:2},message:"must NOT have more than 2 characters"};null===vErrors?vErrors=[err35]:vErrors.push(err35),errors++}if(func3(data25)<2){const err36={instancePath:instancePath+"/address/countryCode",schemaPath:"definitions.json#/definitions/address/properties/countryCode/minLength",keyword:"minLength",params:{limit:2},message:"must NOT have fewer than 2 characters"};null===vErrors?vErrors=[err36]:vErrors.push(err36),errors++}}else{const err37={instancePath:instancePath+"/address/countryCode",schemaPath:"definitions.json#/definitions/address/properties/countryCode/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err37]:vErrors.push(err37),errors++}}}else{const err38={instancePath:instancePath+"/address",schemaPath:"definitions.json#/definitions/address/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err38]:vErrors.push(err38),errors++}}if(void 0!==data.latitude&&"number"!=typeof data.latitude){const err39={instancePath:instancePath+"/latitude",schemaPath:"#/properties/latitude/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err39]:vErrors.push(err39),errors++}if(void 0!==data.longitude&&"number"!=typeof data.longitude){const err40={instancePath:instancePath+"/longitude",schemaPath:"#/properties/longitude/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err40]:vErrors.push(err40),errors++}let data28=data.appFeatures;if(data28&&"object"==typeof data28&&!Array.isArray(data28)){for(const key0 in data28)if(!func5.call(schema160.properties.appFeatures.properties,key0)){const err41={instancePath:instancePath+"/appFeatures",schemaPath:"#/properties/appFeatures/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key0},message:"must NOT have additional properties"};null===vErrors?vErrors=[err41]:vErrors.push(err41),errors++}if(void 0!==data28.RoomControl){let data29=data28.RoomControl;if(data29&&"object"==typeof data29&&!Array.isArray(data29)){void 0===data29.excludedDeviceIds&&(data29.excludedDeviceIds=[]);for(const key1 in data29)if("disabledSystems"!==key1&&"excludedDeviceIds"!==key1&&"commonAreas"!==key1&&"alarmConfig"!==key1){const err42={instancePath:instancePath+"/appFeatures/RoomControl",schemaPath:"#/properties/appFeatures/properties/RoomControl/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key1},message:"must NOT have additional properties"};null===vErrors?vErrors=[err42]:vErrors.push(err42),errors++}if(void 0!==data29.disabledSystems){let data30=data29.disabledSystems;if(Array.isArray(data30)){const len3=data30.length;for(let i3=0;i3<len3;i3++){let data31=data30[i3];if("string"!=typeof data31){const err43={instancePath:instancePath+"/appFeatures/RoomControl/disabledSystems/"+i3,schemaPath:"#/properties/appFeatures/properties/RoomControl/properties/disabledSystems/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err43]:vErrors.push(err43),errors++}if("climate"!==data31&&"lights"!==data31&&"shades"!==data31&&"tv"!==data31&&"doors"!==data31){const err44={instancePath:instancePath+"/appFeatures/RoomControl/disabledSystems/"+i3,schemaPath:"#/properties/appFeatures/properties/RoomControl/properties/disabledSystems/items/enum",keyword:"enum",params:{allowedValues:schema160.properties.appFeatures.properties.RoomControl.properties.disabledSystems.items.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err44]:vErrors.push(err44),errors++}}}else{const err45={instancePath:instancePath+"/appFeatures/RoomControl/disabledSystems",schemaPath:"#/properties/appFeatures/properties/RoomControl/properties/disabledSystems/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err45]:vErrors.push(err45),errors++}}let data32=data29.excludedDeviceIds;if(Array.isArray(data32)){const len4=data32.length;for(let i4=0;i4<len4;i4++)if("string"!=typeof data32[i4]){const err46={instancePath:instancePath+"/appFeatures/RoomControl/excludedDeviceIds/"+i4,schemaPath:"#/properties/appFeatures/properties/RoomControl/properties/excludedDeviceIds/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err46]:vErrors.push(err46),errors++}}else{const err47={instancePath:instancePath+"/appFeatures/RoomControl/excludedDeviceIds",schemaPath:"#/properties/appFeatures/properties/RoomControl/properties/excludedDeviceIds/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err47]:vErrors.push(err47),errors++}if(void 0!==data29.commonAreas){let data34=data29.commonAreas;if(data34&&"object"==typeof data34&&!Array.isArray(data34)){if(void 0!==data34.spaces){let data35=data34.spaces;if(Array.isArray(data35)){const len5=data35.length;for(let i5=0;i5<len5;i5++)if("string"!=typeof data35[i5]){const err48={instancePath:instancePath+"/appFeatures/RoomControl/commonAreas/spaces/"+i5,schemaPath:"#/properties/appFeatures/properties/RoomControl/properties/commonAreas/properties/spaces/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err48]:vErrors.push(err48),errors++}}else{const err49={instancePath:instancePath+"/appFeatures/RoomControl/commonAreas/spaces",schemaPath:"#/properties/appFeatures/properties/RoomControl/properties/commonAreas/properties/spaces/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err49]:vErrors.push(err49),errors++}}}else{const err50={instancePath:instancePath+"/appFeatures/RoomControl/commonAreas",schemaPath:"#/properties/appFeatures/properties/RoomControl/properties/commonAreas/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err50]:vErrors.push(err50),errors++}}if(void 0!==data29.alarmConfig){let data37=data29.alarmConfig;if(data37&&"object"==typeof data37&&!Array.isArray(data37)){for(const key2 in data37)if(pattern5.test(key2)){let data38=data37[key2];if(data38&&"object"==typeof data38&&!Array.isArray(data38)){if(void 0!==data38.zoneLockMap){let data39=data38.zoneLockMap;if(data39&&"object"==typeof data39&&!Array.isArray(data39)){for(const key3 in data39)if("string"!=typeof data39[key3]){const err51={instancePath:instancePath+"/appFeatures/RoomControl/alarmConfig/"+key2.replace(/~/g,"~0").replace(/\//g,"~1")+"/zoneLockMap/"+key3.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/appFeatures/properties/RoomControl/properties/alarmConfig/patternProperties/%5E%5Ba-zA-Z0-9%5D%2B%24/properties/zoneLockMap/additionalProperties/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err51]:vErrors.push(err51),errors++}}else{const err52={instancePath:instancePath+"/appFeatures/RoomControl/alarmConfig/"+key2.replace(/~/g,"~0").replace(/\//g,"~1")+"/zoneLockMap",schemaPath:"#/properties/appFeatures/properties/RoomControl/properties/alarmConfig/patternProperties/%5E%5Ba-zA-Z0-9%5D%2B%24/properties/zoneLockMap/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err52]:vErrors.push(err52),errors++}}}else{const err53={instancePath:instancePath+"/appFeatures/RoomControl/alarmConfig/"+key2.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/appFeatures/properties/RoomControl/properties/alarmConfig/patternProperties/%5E%5Ba-zA-Z0-9%5D%2B%24/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err53]:vErrors.push(err53),errors++}}}else{const err54={instancePath:instancePath+"/appFeatures/RoomControl/alarmConfig",schemaPath:"#/properties/appFeatures/properties/RoomControl/properties/alarmConfig/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err54]:vErrors.push(err54),errors++}}}else{const err55={instancePath:instancePath+"/appFeatures/RoomControl",schemaPath:"#/properties/appFeatures/properties/RoomControl/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err55]:vErrors.push(err55),errors++}}if(void 0!==data28.CheckIn){let data41=data28.CheckIn;if(data41&&"object"==typeof data41&&!Array.isArray(data41)&&void 0!==data41.earlyCheckIn){let data42=data41.earlyCheckIn;if(data42&&"object"==typeof data42&&!Array.isArray(data42)){if(void 0===data42.dynamic&&(data42.dynamic=!1),void 0===data42.minimumPrice&&(data42.minimumPrice=10),void 0===data42.maximumPrice&&(data42.maximumPrice=50),void 0===data42.priceRatioPerHour&&(data42.priceRatioPerHour=.1),void 0===data42.dynamic){const err56={instancePath:instancePath+"/appFeatures/CheckIn/earlyCheckIn",schemaPath:"#/properties/appFeatures/properties/CheckIn/properties/earlyCheckIn/required",keyword:"required",params:{missingProperty:"dynamic"},message:"must have required property 'dynamic'"};null===vErrors?vErrors=[err56]:vErrors.push(err56),errors++}if("boolean"!=typeof data42.dynamic){const err57={instancePath:instancePath+"/appFeatures/CheckIn/earlyCheckIn/dynamic",schemaPath:"#/properties/appFeatures/properties/CheckIn/properties/earlyCheckIn/properties/dynamic/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err57]:vErrors.push(err57),errors++}if("number"!=typeof data42.minimumPrice){const err58={instancePath:instancePath+"/appFeatures/CheckIn/earlyCheckIn/minimumPrice",schemaPath:"#/properties/appFeatures/properties/CheckIn/properties/earlyCheckIn/properties/minimumPrice/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err58]:vErrors.push(err58),errors++}if("number"!=typeof data42.maximumPrice){const err59={instancePath:instancePath+"/appFeatures/CheckIn/earlyCheckIn/maximumPrice",schemaPath:"#/properties/appFeatures/properties/CheckIn/properties/earlyCheckIn/properties/maximumPrice/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err59]:vErrors.push(err59),errors++}if("number"!=typeof data42.priceRatioPerHour){const err60={instancePath:instancePath+"/appFeatures/CheckIn/earlyCheckIn/priceRatioPerHour",schemaPath:"#/properties/appFeatures/properties/CheckIn/properties/earlyCheckIn/properties/priceRatioPerHour/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err60]:vErrors.push(err60),errors++}if(void 0!==data42.minimumTime&&"string"!=typeof data42.minimumTime){const err61={instancePath:instancePath+"/appFeatures/CheckIn/earlyCheckIn/minimumTime",schemaPath:"#/properties/appFeatures/properties/CheckIn/properties/earlyCheckIn/properties/minimumTime/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err61]:vErrors.push(err61),errors++}}else{const err62={instancePath:instancePath+"/appFeatures/CheckIn/earlyCheckIn",schemaPath:"#/properties/appFeatures/properties/CheckIn/properties/earlyCheckIn/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err62]:vErrors.push(err62),errors++}}}if(void 0!==data28.CheckOut){let data48=data28.CheckOut;if(data48&&"object"==typeof data48&&!Array.isArray(data48)&&void 0!==data48.lateCheckOut){let data49=data48.lateCheckOut;if(data49&&"object"==typeof data49&&!Array.isArray(data49)){if(void 0===data49.dynamic&&(data49.dynamic=!1),void 0===data49.minimumPrice&&(data49.minimumPrice=10),void 0===data49.maximumPrice&&(data49.maximumPrice=50),void 0===data49.priceRatioPerHour&&(data49.priceRatioPerHour=.1),void 0===data49.dynamic){const err63={instancePath:instancePath+"/appFeatures/CheckOut/lateCheckOut",schemaPath:"#/properties/appFeatures/properties/CheckOut/properties/lateCheckOut/required",keyword:"required",params:{missingProperty:"dynamic"},message:"must have required property 'dynamic'"};null===vErrors?vErrors=[err63]:vErrors.push(err63),errors++}if("boolean"!=typeof data49.dynamic){const err64={instancePath:instancePath+"/appFeatures/CheckOut/lateCheckOut/dynamic",schemaPath:"#/properties/appFeatures/properties/CheckOut/properties/lateCheckOut/properties/dynamic/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err64]:vErrors.push(err64),errors++}if("number"!=typeof data49.minimumPrice){const err65={instancePath:instancePath+"/appFeatures/CheckOut/lateCheckOut/minimumPrice",schemaPath:"#/properties/appFeatures/properties/CheckOut/properties/lateCheckOut/properties/minimumPrice/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err65]:vErrors.push(err65),errors++}if("number"!=typeof data49.maximumPrice){const err66={instancePath:instancePath+"/appFeatures/CheckOut/lateCheckOut/maximumPrice",schemaPath:"#/properties/appFeatures/properties/CheckOut/properties/lateCheckOut/properties/maximumPrice/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err66]:vErrors.push(err66),errors++}if("number"!=typeof data49.priceRatioPerHour){const err67={instancePath:instancePath+"/appFeatures/CheckOut/lateCheckOut/priceRatioPerHour",schemaPath:"#/properties/appFeatures/properties/CheckOut/properties/lateCheckOut/properties/priceRatioPerHour/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err67]:vErrors.push(err67),errors++}}else{const err68={instancePath:instancePath+"/appFeatures/CheckOut/lateCheckOut",schemaPath:"#/properties/appFeatures/properties/CheckOut/properties/lateCheckOut/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err68]:vErrors.push(err68),errors++}}}if(void 0!==data28.Concierge){let data54=data28.Concierge;if(data54&&"object"==typeof data54&&!Array.isArray(data54)){if(void 0===data54.timeTracking&&(data54.timeTracking=!1),void 0===data54.tipping&&(data54.tipping=!1),void 0===data54.ratings&&(data54.ratings=!0),void 0===data54.newTicketCCs&&(data54.newTicketCCs=[]),void 0===data54.newMessageChannel&&(data54.newMessageChannel="sms"),"boolean"!=typeof data54.timeTracking){const err69={instancePath:instancePath+"/appFeatures/Concierge/timeTracking",schemaPath:"#/properties/appFeatures/properties/Concierge/properties/timeTracking/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err69]:vErrors.push(err69),errors++}if("boolean"!=typeof data54.tipping){const err70={instancePath:instancePath+"/appFeatures/Concierge/tipping",schemaPath:"#/properties/appFeatures/properties/Concierge/properties/tipping/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err70]:vErrors.push(err70),errors++}if("boolean"!=typeof data54.ratings){const err71={instancePath:instancePath+"/appFeatures/Concierge/ratings",schemaPath:"#/properties/appFeatures/properties/Concierge/properties/ratings/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err71]:vErrors.push(err71),errors++}let data58=data54.newTicketCCs;if(Array.isArray(data58)){const len6=data58.length;for(let i6=0;i6<len6;i6++)if("string"!=typeof data58[i6]){const err72={instancePath:instancePath+"/appFeatures/Concierge/newTicketCCs/"+i6,schemaPath:"#/properties/appFeatures/properties/Concierge/properties/newTicketCCs/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err72]:vErrors.push(err72),errors++}}else{const err73={instancePath:instancePath+"/appFeatures/Concierge/newTicketCCs",schemaPath:"#/properties/appFeatures/properties/Concierge/properties/newTicketCCs/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err73]:vErrors.push(err73),errors++}let data60=data54.newMessageChannel;if("string"!=typeof data60&&null!==data60){const err74={instancePath:instancePath+"/appFeatures/Concierge/newMessageChannel",schemaPath:"#/properties/appFeatures/properties/Concierge/properties/newMessageChannel/type",keyword:"type",params:{type:schema160.properties.appFeatures.properties.Concierge.properties.newMessageChannel.type},message:"must be string,null"};null===vErrors?vErrors=[err74]:vErrors.push(err74),errors++}if("sms"!==data60&&"email"!==data60){const err75={instancePath:instancePath+"/appFeatures/Concierge/newMessageChannel",schemaPath:"#/properties/appFeatures/properties/Concierge/properties/newMessageChannel/enum",keyword:"enum",params:{allowedValues:schema160.properties.appFeatures.properties.Concierge.properties.newMessageChannel.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err75]:vErrors.push(err75),errors++}if(void 0!==data54.quickServices){let data61=data54.quickServices;if(Array.isArray(data61)){const len7=data61.length;for(let i7=0;i7<len7;i7++){let data62=data61[i7];if(data62&&"object"==typeof data62&&!Array.isArray(data62)){if(void 0===data62.name){const err76={instancePath:instancePath+"/appFeatures/Concierge/quickServices/"+i7,schemaPath:"#/properties/appFeatures/properties/Concierge/properties/quickServices/items/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};null===vErrors?vErrors=[err76]:vErrors.push(err76),errors++}if(void 0===data62.description){const err77={instancePath:instancePath+"/appFeatures/Concierge/quickServices/"+i7,schemaPath:"#/properties/appFeatures/properties/Concierge/properties/quickServices/items/required",keyword:"required",params:{missingProperty:"description"},message:"must have required property 'description'"};null===vErrors?vErrors=[err77]:vErrors.push(err77),errors++}if(void 0===data62.image){const err78={instancePath:instancePath+"/appFeatures/Concierge/quickServices/"+i7,schemaPath:"#/properties/appFeatures/properties/Concierge/properties/quickServices/items/required",keyword:"required",params:{missingProperty:"image"},message:"must have required property 'image'"};null===vErrors?vErrors=[err78]:vErrors.push(err78),errors++}if(void 0!==data62.name&&"string"!=typeof data62.name){const err79={instancePath:instancePath+"/appFeatures/Concierge/quickServices/"+i7+"/name",schemaPath:"#/properties/appFeatures/properties/Concierge/properties/quickServices/items/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err79]:vErrors.push(err79),errors++}if(void 0!==data62.description&&"string"!=typeof data62.description){const err80={instancePath:instancePath+"/appFeatures/Concierge/quickServices/"+i7+"/description",schemaPath:"#/properties/appFeatures/properties/Concierge/properties/quickServices/items/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err80]:vErrors.push(err80),errors++}if(void 0!==data62.department&&"string"!=typeof data62.department){const err81={instancePath:instancePath+"/appFeatures/Concierge/quickServices/"+i7+"/department",schemaPath:"#/properties/appFeatures/properties/Concierge/properties/quickServices/items/properties/department/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err81]:vErrors.push(err81),errors++}void 0!==data62.image&&(validate15(data62.image,{instancePath:instancePath+"/appFeatures/Concierge/quickServices/"+i7+"/image",parentData:data62,parentDataProperty:"image",rootData:rootData})||(vErrors=null===vErrors?validate15.errors:vErrors.concat(validate15.errors),errors=vErrors.length))}else{const err82={instancePath:instancePath+"/appFeatures/Concierge/quickServices/"+i7,schemaPath:"#/properties/appFeatures/properties/Concierge/properties/quickServices/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err82]:vErrors.push(err82),errors++}}}else{const err83={instancePath:instancePath+"/appFeatures/Concierge/quickServices",schemaPath:"#/properties/appFeatures/properties/Concierge/properties/quickServices/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err83]:vErrors.push(err83),errors++}}if(void 0!==data54.issues){let data67=data54.issues;if(data67&&"object"==typeof data67&&!Array.isArray(data67)){if(void 0!==data67.syncWithPropertyId&&"string"!=typeof data67.syncWithPropertyId){const err84={instancePath:instancePath+"/appFeatures/Concierge/issues/syncWithPropertyId",schemaPath:"#/properties/appFeatures/properties/Concierge/properties/issues/properties/syncWithPropertyId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err84]:vErrors.push(err84),errors++}}else{const err85={instancePath:instancePath+"/appFeatures/Concierge/issues",schemaPath:"#/properties/appFeatures/properties/Concierge/properties/issues/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err85]:vErrors.push(err85),errors++}}}else{const err86={instancePath:instancePath+"/appFeatures/Concierge",schemaPath:"#/properties/appFeatures/properties/Concierge/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err86]:vErrors.push(err86),errors++}}if(void 0!==data28.DigitalKey){let data69=data28.DigitalKey;if(data69&&"object"==typeof data69&&!Array.isArray(data69)){if(void 0===data69.systemOnline&&(data69.systemOnline=!1),void 0===data69.systemConfig&&(data69.systemConfig={}),void 0!==data69.system){let data70=data69.system;if("string"!=typeof data70){const err87={instancePath:instancePath+"/appFeatures/DigitalKey/system",schemaPath:"#/properties/appFeatures/properties/DigitalKey/properties/system/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err87]:vErrors.push(err87),errors++}if("salto"!==data70&&"dormakaba"!==data70){const err88={instancePath:instancePath+"/appFeatures/DigitalKey/system",schemaPath:"#/properties/appFeatures/properties/DigitalKey/properties/system/enum",keyword:"enum",params:{allowedValues:schema160.properties.appFeatures.properties.DigitalKey.properties.system.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err88]:vErrors.push(err88),errors++}}if("boolean"!=typeof data69.systemOnline){const err89={instancePath:instancePath+"/appFeatures/DigitalKey/systemOnline",schemaPath:"#/properties/appFeatures/properties/DigitalKey/properties/systemOnline/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err89]:vErrors.push(err89),errors++}let data72=data69.systemConfig;if(data72&&"object"==typeof data72&&!Array.isArray(data72)){for(const key4 in data72)if("legicUrl"!==key4&&"legicWalletName"!==key4&&"legicAppId"!==key4&&"legicTechUsername"!==key4&&"legicTechPassword"!==key4){const err90={instancePath:instancePath+"/appFeatures/DigitalKey/systemConfig",schemaPath:"#/properties/appFeatures/properties/DigitalKey/properties/systemConfig/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key4},message:"must NOT have additional properties"};null===vErrors?vErrors=[err90]:vErrors.push(err90),errors++}if(void 0!==data72.legicUrl){let data73=data72.legicUrl;if("string"==typeof data73){if(!formats0(data73)){const err91={instancePath:instancePath+"/appFeatures/DigitalKey/systemConfig/legicUrl",schemaPath:"#/properties/appFeatures/properties/DigitalKey/properties/systemConfig/properties/legicUrl/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};null===vErrors?vErrors=[err91]:vErrors.push(err91),errors++}}else{const err92={instancePath:instancePath+"/appFeatures/DigitalKey/systemConfig/legicUrl",schemaPath:"#/properties/appFeatures/properties/DigitalKey/properties/systemConfig/properties/legicUrl/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err92]:vErrors.push(err92),errors++}}if(void 0!==data72.legicWalletName&&"string"!=typeof data72.legicWalletName){const err93={instancePath:instancePath+"/appFeatures/DigitalKey/systemConfig/legicWalletName",schemaPath:"#/properties/appFeatures/properties/DigitalKey/properties/systemConfig/properties/legicWalletName/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err93]:vErrors.push(err93),errors++}if(void 0!==data72.legicAppId&&"number"!=typeof data72.legicAppId){const err94={instancePath:instancePath+"/appFeatures/DigitalKey/systemConfig/legicAppId",schemaPath:"#/properties/appFeatures/properties/DigitalKey/properties/systemConfig/properties/legicAppId/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err94]:vErrors.push(err94),errors++}if(void 0!==data72.legicTechUsername&&"string"!=typeof data72.legicTechUsername){const err95={instancePath:instancePath+"/appFeatures/DigitalKey/systemConfig/legicTechUsername",schemaPath:"#/properties/appFeatures/properties/DigitalKey/properties/systemConfig/properties/legicTechUsername/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err95]:vErrors.push(err95),errors++}if(void 0!==data72.legicTechPassword&&"string"!=typeof data72.legicTechPassword){const err96={instancePath:instancePath+"/appFeatures/DigitalKey/systemConfig/legicTechPassword",schemaPath:"#/properties/appFeatures/properties/DigitalKey/properties/systemConfig/properties/legicTechPassword/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err96]:vErrors.push(err96),errors++}}else{const err97={instancePath:instancePath+"/appFeatures/DigitalKey/systemConfig",schemaPath:"#/properties/appFeatures/properties/DigitalKey/properties/systemConfig/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err97]:vErrors.push(err97),errors++}if(void 0!==data69.enableApp&&"boolean"!=typeof data69.enableApp){const err98={instancePath:instancePath+"/appFeatures/DigitalKey/enableApp",schemaPath:"#/properties/appFeatures/properties/DigitalKey/properties/enableApp/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err98]:vErrors.push(err98),errors++}if(void 0!==data69.branding){let data79=data69.branding;if(data79&&"object"==typeof data79&&!Array.isArray(data79)){if(void 0!==data79.logo){let data80=data79.logo;if("string"==typeof data80){if(!formats0(data80)){const err99={instancePath:instancePath+"/appFeatures/DigitalKey/branding/logo",schemaPath:"#/properties/appFeatures/properties/DigitalKey/properties/branding/properties/logo/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};null===vErrors?vErrors=[err99]:vErrors.push(err99),errors++}}else{const err100={instancePath:instancePath+"/appFeatures/DigitalKey/branding/logo",schemaPath:"#/properties/appFeatures/properties/DigitalKey/properties/branding/properties/logo/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err100]:vErrors.push(err100),errors++}}if(void 0!==data79.gradient){let data81=data79.gradient;if(Array.isArray(data81)){if(data81.length>2){const err101={instancePath:instancePath+"/appFeatures/DigitalKey/branding/gradient",schemaPath:"#/properties/appFeatures/properties/DigitalKey/properties/branding/properties/gradient/maxItems",keyword:"maxItems",params:{limit:2},message:"must NOT have more than 2 items"};null===vErrors?vErrors=[err101]:vErrors.push(err101),errors++}if(data81.length<2){const err102={instancePath:instancePath+"/appFeatures/DigitalKey/branding/gradient",schemaPath:"#/properties/appFeatures/properties/DigitalKey/properties/branding/properties/gradient/minItems",keyword:"minItems",params:{limit:2},message:"must NOT have fewer than 2 items"};null===vErrors?vErrors=[err102]:vErrors.push(err102),errors++}const len8=data81.length;for(let i8=0;i8<len8;i8++){let data82=data81[i8];if("string"==typeof data82){if(!pattern6.test(data82)){const err103={instancePath:instancePath+"/appFeatures/DigitalKey/branding/gradient/"+i8,schemaPath:"#/properties/appFeatures/properties/DigitalKey/properties/branding/properties/gradient/items/pattern",keyword:"pattern",params:{pattern:"^(?!#ffffff)(#[0-9a-fA-F]{6})$"},message:'must match pattern "^(?!#ffffff)(#[0-9a-fA-F]{6})$"'};null===vErrors?vErrors=[err103]:vErrors.push(err103),errors++}}else{const err104={instancePath:instancePath+"/appFeatures/DigitalKey/branding/gradient/"+i8,schemaPath:"#/properties/appFeatures/properties/DigitalKey/properties/branding/properties/gradient/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err104]:vErrors.push(err104),errors++}}}else{const err105={instancePath:instancePath+"/appFeatures/DigitalKey/branding/gradient",schemaPath:"#/properties/appFeatures/properties/DigitalKey/properties/branding/properties/gradient/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err105]:vErrors.push(err105),errors++}}if(void 0!==data79.highlightedGradient){let data83=data79.highlightedGradient;if(Array.isArray(data83)){if(data83.length>3){const err106={instancePath:instancePath+"/appFeatures/DigitalKey/branding/highlightedGradient",schemaPath:"#/properties/appFeatures/properties/DigitalKey/properties/branding/properties/highlightedGradient/maxItems",keyword:"maxItems",params:{limit:3},message:"must NOT have more than 3 items"};null===vErrors?vErrors=[err106]:vErrors.push(err106),errors++}if(data83.length<2){const err107={instancePath:instancePath+"/appFeatures/DigitalKey/branding/highlightedGradient",schemaPath:"#/properties/appFeatures/properties/DigitalKey/properties/branding/properties/highlightedGradient/minItems",keyword:"minItems",params:{limit:2},message:"must NOT have fewer than 2 items"};null===vErrors?vErrors=[err107]:vErrors.push(err107),errors++}const len9=data83.length;for(let i9=0;i9<len9;i9++){let data84=data83[i9];if("string"==typeof data84){if(!pattern6.test(data84)){const err108={instancePath:instancePath+"/appFeatures/DigitalKey/branding/highlightedGradient/"+i9,schemaPath:"#/properties/appFeatures/properties/DigitalKey/properties/branding/properties/highlightedGradient/items/pattern",keyword:"pattern",params:{pattern:"^(?!#ffffff)(#[0-9a-fA-F]{6})$"},message:'must match pattern "^(?!#ffffff)(#[0-9a-fA-F]{6})$"'};null===vErrors?vErrors=[err108]:vErrors.push(err108),errors++}}else{const err109={instancePath:instancePath+"/appFeatures/DigitalKey/branding/highlightedGradient/"+i9,schemaPath:"#/properties/appFeatures/properties/DigitalKey/properties/branding/properties/highlightedGradient/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err109]:vErrors.push(err109),errors++}}}else{const err110={instancePath:instancePath+"/appFeatures/DigitalKey/branding/highlightedGradient",schemaPath:"#/properties/appFeatures/properties/DigitalKey/properties/branding/properties/highlightedGradient/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err110]:vErrors.push(err110),errors++}}}else{const err111={instancePath:instancePath+"/appFeatures/DigitalKey/branding",schemaPath:"#/properties/appFeatures/properties/DigitalKey/properties/branding/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err111]:vErrors.push(err111),errors++}}}else{const err112={instancePath:instancePath+"/appFeatures/DigitalKey",schemaPath:"#/properties/appFeatures/properties/DigitalKey/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err112]:vErrors.push(err112),errors++}}if(void 0!==data28.SOS){let data85=data28.SOS;if(data85&&"object"==typeof data85&&!Array.isArray(data85)){if(void 0!==data85.active&&"boolean"!=typeof data85.active){const err113={instancePath:instancePath+"/appFeatures/SOS/active",schemaPath:"#/properties/appFeatures/properties/SOS/properties/active/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err113]:vErrors.push(err113),errors++}if(void 0!==data85.activeEmergencies){let data87=data85.activeEmergencies;if(Array.isArray(data87)){const len10=data87.length;for(let i10=0;i10<len10;i10++){let data88=data87[i10];if("string"!=typeof data88){const err114={instancePath:instancePath+"/appFeatures/SOS/activeEmergencies/"+i10,schemaPath:"#/properties/appFeatures/properties/SOS/properties/activeEmergencies/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err114]:vErrors.push(err114),errors++}if("medical"!==data88&&"fire"!==data88&&"suspiciousPerson"!==data88&&"other"!==data88&&"conflict"!==data88&&"shooter"!==data88){const err115={instancePath:instancePath+"/appFeatures/SOS/activeEmergencies/"+i10,schemaPath:"#/properties/appFeatures/properties/SOS/properties/activeEmergencies/items/enum",keyword:"enum",params:{allowedValues:schema160.properties.appFeatures.properties.SOS.properties.activeEmergencies.items.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err115]:vErrors.push(err115),errors++}}}else{const err116={instancePath:instancePath+"/appFeatures/SOS/activeEmergencies",schemaPath:"#/properties/appFeatures/properties/SOS/properties/activeEmergencies/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err116]:vErrors.push(err116),errors++}}}else{const err117={instancePath:instancePath+"/appFeatures/SOS",schemaPath:"#/properties/appFeatures/properties/SOS/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err117]:vErrors.push(err117),errors++}}if(void 0!==data28.Dining){let data89=data28.Dining;if(data89&&"object"==typeof data89&&!Array.isArray(data89)){if(void 0!==data89.system){let data90=data89.system;if("string"!=typeof data90){const err118={instancePath:instancePath+"/appFeatures/Dining/system",schemaPath:"#/properties/appFeatures/properties/Dining/properties/system/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err118]:vErrors.push(err118),errors++}if("gotab"!==data90){const err119={instancePath:instancePath+"/appFeatures/Dining/system",schemaPath:"#/properties/appFeatures/properties/Dining/properties/system/enum",keyword:"enum",params:{allowedValues:schema160.properties.appFeatures.properties.Dining.properties.system.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err119]:vErrors.push(err119),errors++}}if(void 0!==data89.systemConfig){let data91=data89.systemConfig;if(data91&&"object"==typeof data91&&!Array.isArray(data91)){for(const key5 in data91)if("landingUrl"!==key5&&"includeUserDetails"!==key5){const err120={instancePath:instancePath+"/appFeatures/Dining/systemConfig",schemaPath:"#/properties/appFeatures/properties/Dining/properties/systemConfig/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key5},message:"must NOT have additional properties"};null===vErrors?vErrors=[err120]:vErrors.push(err120),errors++}if(void 0!==data91.landingUrl){let data92=data91.landingUrl;if("string"==typeof data92){if(!formats0(data92)){const err121={instancePath:instancePath+"/appFeatures/Dining/systemConfig/landingUrl",schemaPath:"#/properties/appFeatures/properties/Dining/properties/systemConfig/properties/landingUrl/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};null===vErrors?vErrors=[err121]:vErrors.push(err121),errors++}}else{const err122={instancePath:instancePath+"/appFeatures/Dining/systemConfig/landingUrl",schemaPath:"#/properties/appFeatures/properties/Dining/properties/systemConfig/properties/landingUrl/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err122]:vErrors.push(err122),errors++}}if(void 0!==data91.includeUserDetails&&"boolean"!=typeof data91.includeUserDetails){const err123={instancePath:instancePath+"/appFeatures/Dining/systemConfig/includeUserDetails",schemaPath:"#/properties/appFeatures/properties/Dining/properties/systemConfig/properties/includeUserDetails/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err123]:vErrors.push(err123),errors++}}else{const err124={instancePath:instancePath+"/appFeatures/Dining/systemConfig",schemaPath:"#/properties/appFeatures/properties/Dining/properties/systemConfig/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err124]:vErrors.push(err124),errors++}}}else{const err125={instancePath:instancePath+"/appFeatures/Dining",schemaPath:"#/properties/appFeatures/properties/Dining/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err125]:vErrors.push(err125),errors++}}}else{const err126={instancePath:instancePath+"/appFeatures",schemaPath:"#/properties/appFeatures/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err126]:vErrors.push(err126),errors++}let data94=data.notifications;if(data94&&"object"==typeof data94&&!Array.isArray(data94)){for(const key6 in data94)if("email"!==key6&&"sms"!==key6&&"push"!==key6){const err127={instancePath:instancePath+"/notifications",schemaPath:"#/properties/notifications/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key6},message:"must NOT have additional properties"};null===vErrors?vErrors=[err127]:vErrors.push(err127),errors++}if(void 0!==data94.email){let data95=data94.email;if(data95&&"object"==typeof data95&&!Array.isArray(data95)){for(const key7 in data95)if("enabled"!==key7){const err128={instancePath:instancePath+"/notifications/email",schemaPath:"#/properties/notifications/properties/email/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key7},message:"must NOT have additional properties"};null===vErrors?vErrors=[err128]:vErrors.push(err128),errors++}if(void 0!==data95.enabled&&"boolean"!=typeof data95.enabled){const err129={instancePath:instancePath+"/notifications/email/enabled",schemaPath:"#/properties/notifications/properties/email/properties/enabled/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err129]:vErrors.push(err129),errors++}}else{const err130={instancePath:instancePath+"/notifications/email",schemaPath:"#/properties/notifications/properties/email/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err130]:vErrors.push(err130),errors++}}if(void 0!==data94.sms){let data97=data94.sms;if(data97&&"object"==typeof data97&&!Array.isArray(data97)){for(const key8 in data97)if("enabled"!==key8){const err131={instancePath:instancePath+"/notifications/sms",schemaPath:"#/properties/notifications/properties/sms/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key8},message:"must NOT have additional properties"};null===vErrors?vErrors=[err131]:vErrors.push(err131),errors++}if(void 0!==data97.enabled&&"boolean"!=typeof data97.enabled){const err132={instancePath:instancePath+"/notifications/sms/enabled",schemaPath:"#/properties/notifications/properties/sms/properties/enabled/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err132]:vErrors.push(err132),errors++}}else{const err133={instancePath:instancePath+"/notifications/sms",schemaPath:"#/properties/notifications/properties/sms/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err133]:vErrors.push(err133),errors++}}if(void 0!==data94.push){let data99=data94.push;if(data99&&"object"==typeof data99&&!Array.isArray(data99)){for(const key9 in data99)if("enabled"!==key9){const err134={instancePath:instancePath+"/notifications/push",schemaPath:"#/properties/notifications/properties/push/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key9},message:"must NOT have additional properties"};null===vErrors?vErrors=[err134]:vErrors.push(err134),errors++}if(void 0!==data99.enabled&&"boolean"!=typeof data99.enabled){const err135={instancePath:instancePath+"/notifications/push/enabled",schemaPath:"#/properties/notifications/properties/push/properties/enabled/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err135]:vErrors.push(err135),errors++}}else{const err136={instancePath:instancePath+"/notifications/push",schemaPath:"#/properties/notifications/properties/push/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err136]:vErrors.push(err136),errors++}}}else{const err137={instancePath:instancePath+"/notifications",schemaPath:"#/properties/notifications/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err137]:vErrors.push(err137),errors++}if(void 0!==data.credentials){let data101=data.credentials;if(!data101||"object"!=typeof data101||Array.isArray(data101)){const err138={instancePath:instancePath+"/credentials",schemaPath:"#/properties/credentials/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err138]:vErrors.push(err138),errors++}}}else{const err139={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err139]:vErrors.push(err139),errors++}return validate61.errors=vErrors,0===errors},schema160={$schema:"http://json-schema.org/draft-07/schema",$id:"property.json",title:"Property",type:"object",description:"A property is a physical asset or building",required:["id","name","type","organization","timezone","discriminator"],properties:{id:{$ref:"definitions.json#/definitions/id"},name:{type:"string"},type:{type:"string",default:"property",enum:["property"]},discriminator:{type:"string",enum:["hospitality","education","commercial","storage"]},organization:{type:["string","null"],description:"Reference (id) to the organization that owns this property"},departments:{type:"array",items:{type:"string"}},testModeEnabled:{type:"boolean"},testMode:{type:"object",properties:{notificationEmails:{type:"array",items:{type:"string"},description:"Only users with these email addresses will receive notifications in test mode, including sms, email, or push."},notificationEmailDomains:{type:"array",items:{type:"string"},description:"Only users with email addreses ending in these domains will receive notifications in test mode, including sms, email, or push."}}},timezone:{type:"string",description:"IANA timezone string",pattern:"^([a-zA-Z]+/[a-zA-Z_]+)$",examples:["America/New_York","America/Los_Angeles"]},smsNumber:{type:"string"},checkInTime:{type:"string"},checkOutTime:{type:"string"},address:{$ref:"definitions.json#/definitions/address"},latitude:{type:"number"},longitude:{type:"number"},appFeatures:{type:"object",properties:{RoomControl:{type:"object",properties:{disabledSystems:{type:"array",items:{type:"string",enum:["climate","lights","shades","tv","doors"]}},excludedDeviceIds:{type:"array",items:{type:"string"},default:[]},commonAreas:{type:"object",properties:{spaces:{type:"array",items:{type:"string"}}}},alarmConfig:{type:"object",patternProperties:{"^[a-zA-Z0-9]+$":{type:"object",properties:{zoneLockMap:{type:"object",description:"Maps zone numbers to lock ids",additionalProperties:{type:"string"}}}}},examples:[{wZz7hucY:{zoneLockMap:{1:"wc87hucc",2:"bc86hzxc",3:"zv5ah5jv"}}}]}},additionalProperties:!1},CheckIn:{properties:{payment:{},identification:{},earlyCheckIn:{type:"object",required:["dynamic"],properties:{dynamic:{type:"boolean",default:!1},minimumPrice:{type:"number",default:10},maximumPrice:{type:"number",default:50},priceRatioPerHour:{type:"number",default:.1},minimumTime:{type:"string"}}},roomUpgrades:{},pet:{},promos:{}}},CheckOut:{properties:{lateCheckOut:{type:"object",required:["dynamic"],properties:{dynamic:{type:"boolean",default:!1},minimumPrice:{type:"number",default:10},maximumPrice:{type:"number",default:50},priceRatioPerHour:{type:"number",default:.1}}}}},Concierge:{type:"object",properties:{timeTracking:{type:"boolean",default:!1},tipping:{type:"boolean",default:!1},ratings:{type:"boolean",default:!0},newTicketCCs:{type:"array",items:{type:"string"},default:[]},newMessageChannel:{type:["string","null"],enum:["sms","email"],default:"sms",description:"Determines how users should be notified of new messages in the concierge system"},quickServices:{type:"array",items:{type:"object",properties:{name:{type:"string"},description:{type:"string"},department:{type:"string"},image:{$ref:"mediaFile.json"}},required:["name","description","image"]}},issues:{type:"object",properties:{syncWithPropertyId:{type:"string"}}}}},DigitalKey:{type:"object",properties:{system:{type:"string",enum:["salto","dormakaba"]},systemOnline:{type:"boolean",default:!1},systemConfig:{type:"object",properties:{legicUrl:{type:"string",format:"uri"},legicWalletName:{type:"string"},legicAppId:{type:"number"},legicTechUsername:{type:"string"},legicTechPassword:{type:"string"}},additionalProperties:!1,default:{}},enableApp:{type:"boolean"},branding:{type:"object",properties:{logo:{type:"string",format:"uri"},gradient:{type:"array",items:{type:"string",pattern:"^(?!#ffffff)(#[0-9a-fA-F]{6})$"},minItems:2,maxItems:2},highlightedGradient:{type:"array",items:{type:"string",pattern:"^(?!#ffffff)(#[0-9a-fA-F]{6})$"},minItems:2,maxItems:3}}}}},SOS:{type:"object",properties:{active:{type:"boolean"},activeEmergencies:{type:"array",items:{type:"string",enum:["medical","fire","suspiciousPerson","other","conflict","shooter"]}}}},Elevator:{},Experiences:{},Dining:{type:"object",properties:{system:{type:"string",enum:["gotab"]},systemConfig:{type:"object",properties:{landingUrl:{type:"string",format:"uri"},includeUserDetails:{type:"boolean"}},additionalProperties:!1}}},Rentals:{},Shop:{},Spa:{},Valet:{}},additionalProperties:!1,default:{RoomControl:{}}},notifications:{type:"object",properties:{email:{type:"object",properties:{enabled:{type:"boolean"}},additionalProperties:!1},sms:{type:"object",properties:{enabled:{type:"boolean"}},additionalProperties:!1},push:{type:"object",properties:{enabled:{type:"boolean"}},additionalProperties:!1}},additionalProperties:!1,default:{email:{enabled:!1},sms:{enabled:!1},push:{enabled:!1}}},credentials:{type:"object",additionalProperties:!0}}},pattern4=new RegExp("^([a-zA-Z]+/[a-zA-Z_]+)$","u"),pattern5=new RegExp("^[a-zA-Z0-9]+$","u"),pattern6=new RegExp("^(?!#ffffff)(#[0-9a-fA-F]{6})$","u");var validateReservation=validate63,schema163={$schema:"http://json-schema.org/draft-07/schema",$id:"reservation.json",title:"Reservation",type:"object",required:["type","status","checkInDateTime","checkOutDateTime"],properties:{id:{$ref:"definitions.json#/definitions/id"},driver:{$ref:"definitions.json#/definitions/driver"},primaryGuest:{type:"string"},type:{type:"string",default:"reservation",enum:["reservation"]},sharedGuests:{type:"array",items:{type:"string"}},spaceCategory:{type:"string"},space:{type:["string","null"]},previousSpace:{type:["string","null"],default:null,description:"Used when there was a space assigned and it changes"},status:{type:"string",enum:["reserved","checkedIn","checkedOut","cancelled","noShow","enquired","requested","optional"],description:" reserved - confirmed by both parties, before check-in\n checkedIn - checked in\n checkedOut - checked out\n cancelled - Cancelled\n noShow - No show\n enquired - Confirmed neither by the customer nor enterprise\n requested - Confirmed by the customer but not the enterprise (waitlist)\n optional - Confirmed by the enterprise but not the customer (holding)"},mobileCheckInSpaceCategoryChanged:{type:"boolean",description:"spaceCategory has changed from original."},mobileCheckInSpaceChanged:{type:"boolean"},mobileCheckInStatus:{type:"string",enum:["ready","blocked","preArrivalStepsRequired","spaceNotAssigned","spaceNotReady","checkInTimeNotStarted"]},mobileCheckInStatusMessage:{type:"string"},confirmationNumber:{type:"string"},expectedCheckInDateTime:{type:["string","object"],format:"date-time",description:"Expected arrival time of guest."},checkInDateTime:{type:["string","object"],format:"date-time"},checkOutDateTime:{type:["string","object"],format:"date-time"},adultCount:{type:"number",default:1,minimum:1},childCount:{type:"number",default:0},spaceCategoryAvailabilites:{type:"array",items:{type:"object",properties:{id:{type:"string"},price:{type:"number"},unit:{type:"string",enum:["night","stay","hour"]},isUpgrade:{type:"boolean"}}}},revenue:{$ref:"definitions.json#/definitions/revenue"},rateSuppressed:{type:"boolean"},payment:{type:"string"},company:{type:"string"},travelAgent:{type:"string"},systemId:{$ref:"definitions.json#/definitions/systemId"},metadata:{ref:"definitions.json#/definitions/metadata"},updatedAt:{$ref:"definitions.json#/definitions/updatedAt"}}},schema166={type:"array",items:{type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},name:{type:"string"},date:{type:"string",format:"date-time"},price:{type:"number"},tax:{type:["number","null"]}}}};function validate64(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(Array.isArray(data)){const len0=data.length;for(let i0=0;i0<len0;i0++){let data0=data[i0];if(data0&&"object"==typeof data0&&!Array.isArray(data0)){if(void 0!==data0.id){let data1=data0.id;if("string"!=typeof data1){const err0={instancePath:instancePath+"/"+i0+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}const _errs6=errors,_errs7=errors;if("global"!==data1&&"system"!==data1){const err1={};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if(_errs7===errors){const err2={instancePath:instancePath+"/"+i0+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}else errors=_errs6,null!==vErrors&&(_errs6?vErrors.length=_errs6:vErrors=null)}if(void 0!==data0.name&&"string"!=typeof data0.name){const err3={instancePath:instancePath+"/"+i0+"/name",schemaPath:"#/items/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}if(void 0!==data0.date){let data3=data0.date;if("string"==typeof data3){if(!formats4.validate(data3)){const err4={instancePath:instancePath+"/"+i0+"/date",schemaPath:"#/items/properties/date/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}}else{const err5={instancePath:instancePath+"/"+i0+"/date",schemaPath:"#/items/properties/date/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}}if(void 0!==data0.price&&"number"!=typeof data0.price){const err6={instancePath:instancePath+"/"+i0+"/price",schemaPath:"#/items/properties/price/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}if(void 0!==data0.tax){let data5=data0.tax;if("number"!=typeof data5&&null!==data5){const err7={instancePath:instancePath+"/"+i0+"/tax",schemaPath:"#/items/properties/tax/type",keyword:"type",params:{type:schema166.items.properties.tax.type},message:"must be number,null"};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}}}else{const err8={instancePath:instancePath+"/"+i0,schemaPath:"#/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}}}else{const err9={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}return validate64.errors=vErrors,0===errors}function validate63(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0===data.type&&(data.type="reservation"),void 0===data.previousSpace&&(data.previousSpace=null),void 0===data.adultCount&&(data.adultCount=1),void 0===data.childCount&&(data.childCount=0),void 0===data.type){const err0={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(void 0===data.status){const err1={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"status"},message:"must have required property 'status'"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if(void 0===data.checkInDateTime){const err2={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"checkInDateTime"},message:"must have required property 'checkInDateTime'"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}if(void 0===data.checkOutDateTime){const err3={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"checkOutDateTime"},message:"must have required property 'checkOutDateTime'"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}if(void 0!==data.id){let data0=data.id;if("string"!=typeof data0){const err4={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}const _errs4=errors,_errs5=errors;if("global"!==data0&&"system"!==data0){const err5={};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}if(_errs5===errors){const err6={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}else errors=_errs4,null!==vErrors&&(_errs4?vErrors.length=_errs4:vErrors=null)}if(void 0!==data.driver){let data1=data.driver;if("string"!=typeof data1){const err7={instancePath:instancePath+"/driver",schemaPath:"definitions.json#/definitions/driver/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}if("adlink"!==data1&&"aws-kinesis"!==data1&&"butler"!==data1&&"crestron"!==data1&&"dell"!==data1&&"dmp"!==data1&&"doorbird"!==data1&&"dormakaba"!==data1&&"dsc"!==data1&&"ecobee"!==data1&&"epson"!==data1&&"geovision-rs"!==data1&&"geovision-as-manager"!==data1&&"honeywell-vista"!==data1&&"igor"!==data1&&"inncom"!==data1&&"isapi"!==data1&&"kohost-k7"!==data1&&"kohost"!==data1&&"lg"!==data1&&"lg-webos"!==data1&&"lapi"!==data1&&"lirc"!==data1&&"mews"!==data1&&"mht"!==data1&&"paxton"!==data1&&"pelican-wireless"!==data1&&"power-shades"!==data1&&"rachio"!==data1&&"rebrandly"!==data1&&"rtsp"!==data1&&"salto"!==data1&&"salto-irn"!==data1&&"samsung"!==data1&&"se"!==data1&&"sendgrid"!==data1&&"sonifi"!==data1&&"stay-n-touch"!==data1&&"storable"!==data1&&"twilio"!==data1&&"unifi"!==data1&&"valcom"!==data1&&"vizio"!==data1&&"wisenet"!==data1&&"cloudflare-images"!==data1&&"cloudflare-stream"!==data1&&"insperia-privacy"!==data1){const err8={instancePath:instancePath+"/driver",schemaPath:"definitions.json#/definitions/driver/enum",keyword:"enum",params:{allowedValues:schema18.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}}if(void 0!==data.primaryGuest&&"string"!=typeof data.primaryGuest){const err9={instancePath:instancePath+"/primaryGuest",schemaPath:"#/properties/primaryGuest/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}let data3=data.type;if("string"!=typeof data3){const err10={instancePath:instancePath+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err10]:vErrors.push(err10),errors++}if("reservation"!==data3){const err11={instancePath:instancePath+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:schema163.properties.type.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err11]:vErrors.push(err11),errors++}if(void 0!==data.sharedGuests){let data4=data.sharedGuests;if(Array.isArray(data4)){const len0=data4.length;for(let i0=0;i0<len0;i0++)if("string"!=typeof data4[i0]){const err12={instancePath:instancePath+"/sharedGuests/"+i0,schemaPath:"#/properties/sharedGuests/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err12]:vErrors.push(err12),errors++}}else{const err13={instancePath:instancePath+"/sharedGuests",schemaPath:"#/properties/sharedGuests/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err13]:vErrors.push(err13),errors++}}if(void 0!==data.spaceCategory&&"string"!=typeof data.spaceCategory){const err14={instancePath:instancePath+"/spaceCategory",schemaPath:"#/properties/spaceCategory/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err14]:vErrors.push(err14),errors++}if(void 0!==data.space){let data7=data.space;if("string"!=typeof data7&&null!==data7){const err15={instancePath:instancePath+"/space",schemaPath:"#/properties/space/type",keyword:"type",params:{type:schema163.properties.space.type},message:"must be string,null"};null===vErrors?vErrors=[err15]:vErrors.push(err15),errors++}}let data8=data.previousSpace;if("string"!=typeof data8&&null!==data8){const err16={instancePath:instancePath+"/previousSpace",schemaPath:"#/properties/previousSpace/type",keyword:"type",params:{type:schema163.properties.previousSpace.type},message:"must be string,null"};null===vErrors?vErrors=[err16]:vErrors.push(err16),errors++}if(void 0!==data.status){let data9=data.status;if("string"!=typeof data9){const err17={instancePath:instancePath+"/status",schemaPath:"#/properties/status/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err17]:vErrors.push(err17),errors++}if("reserved"!==data9&&"checkedIn"!==data9&&"checkedOut"!==data9&&"cancelled"!==data9&&"noShow"!==data9&&"enquired"!==data9&&"requested"!==data9&&"optional"!==data9){const err18={instancePath:instancePath+"/status",schemaPath:"#/properties/status/enum",keyword:"enum",params:{allowedValues:schema163.properties.status.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err18]:vErrors.push(err18),errors++}}if(void 0!==data.mobileCheckInSpaceCategoryChanged&&"boolean"!=typeof data.mobileCheckInSpaceCategoryChanged){const err19={instancePath:instancePath+"/mobileCheckInSpaceCategoryChanged",schemaPath:"#/properties/mobileCheckInSpaceCategoryChanged/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err19]:vErrors.push(err19),errors++}if(void 0!==data.mobileCheckInSpaceChanged&&"boolean"!=typeof data.mobileCheckInSpaceChanged){const err20={instancePath:instancePath+"/mobileCheckInSpaceChanged",schemaPath:"#/properties/mobileCheckInSpaceChanged/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err20]:vErrors.push(err20),errors++}if(void 0!==data.mobileCheckInStatus){let data12=data.mobileCheckInStatus;if("string"!=typeof data12){const err21={instancePath:instancePath+"/mobileCheckInStatus",schemaPath:"#/properties/mobileCheckInStatus/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err21]:vErrors.push(err21),errors++}if("ready"!==data12&&"blocked"!==data12&&"preArrivalStepsRequired"!==data12&&"spaceNotAssigned"!==data12&&"spaceNotReady"!==data12&&"checkInTimeNotStarted"!==data12){const err22={instancePath:instancePath+"/mobileCheckInStatus",schemaPath:"#/properties/mobileCheckInStatus/enum",keyword:"enum",params:{allowedValues:schema163.properties.mobileCheckInStatus.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err22]:vErrors.push(err22),errors++}}if(void 0!==data.mobileCheckInStatusMessage&&"string"!=typeof data.mobileCheckInStatusMessage){const err23={instancePath:instancePath+"/mobileCheckInStatusMessage",schemaPath:"#/properties/mobileCheckInStatusMessage/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err23]:vErrors.push(err23),errors++}if(void 0!==data.confirmationNumber&&"string"!=typeof data.confirmationNumber){const err24={instancePath:instancePath+"/confirmationNumber",schemaPath:"#/properties/confirmationNumber/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err24]:vErrors.push(err24),errors++}if(void 0!==data.expectedCheckInDateTime){let data15=data.expectedCheckInDateTime;if("string"!=typeof data15&&(!data15||"object"!=typeof data15||Array.isArray(data15))){const err25={instancePath:instancePath+"/expectedCheckInDateTime",schemaPath:"#/properties/expectedCheckInDateTime/type",keyword:"type",params:{type:schema163.properties.expectedCheckInDateTime.type},message:"must be string,object"};null===vErrors?vErrors=[err25]:vErrors.push(err25),errors++}if("string"==typeof data15&&!formats4.validate(data15)){const err26={instancePath:instancePath+"/expectedCheckInDateTime",schemaPath:"#/properties/expectedCheckInDateTime/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err26]:vErrors.push(err26),errors++}}if(void 0!==data.checkInDateTime){let data16=data.checkInDateTime;if("string"!=typeof data16&&(!data16||"object"!=typeof data16||Array.isArray(data16))){const err27={instancePath:instancePath+"/checkInDateTime",schemaPath:"#/properties/checkInDateTime/type",keyword:"type",params:{type:schema163.properties.checkInDateTime.type},message:"must be string,object"};null===vErrors?vErrors=[err27]:vErrors.push(err27),errors++}if("string"==typeof data16&&!formats4.validate(data16)){const err28={instancePath:instancePath+"/checkInDateTime",schemaPath:"#/properties/checkInDateTime/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err28]:vErrors.push(err28),errors++}}if(void 0!==data.checkOutDateTime){let data17=data.checkOutDateTime;if("string"!=typeof data17&&(!data17||"object"!=typeof data17||Array.isArray(data17))){const err29={instancePath:instancePath+"/checkOutDateTime",schemaPath:"#/properties/checkOutDateTime/type",keyword:"type",params:{type:schema163.properties.checkOutDateTime.type},message:"must be string,object"};null===vErrors?vErrors=[err29]:vErrors.push(err29),errors++}if("string"==typeof data17&&!formats4.validate(data17)){const err30={instancePath:instancePath+"/checkOutDateTime",schemaPath:"#/properties/checkOutDateTime/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err30]:vErrors.push(err30),errors++}}let data18=data.adultCount;if("number"==typeof data18){if(data18<1||isNaN(data18)){const err31={instancePath:instancePath+"/adultCount",schemaPath:"#/properties/adultCount/minimum",keyword:"minimum",params:{comparison:">=",limit:1},message:"must be >= 1"};null===vErrors?vErrors=[err31]:vErrors.push(err31),errors++}}else{const err32={instancePath:instancePath+"/adultCount",schemaPath:"#/properties/adultCount/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err32]:vErrors.push(err32),errors++}if("number"!=typeof data.childCount){const err33={instancePath:instancePath+"/childCount",schemaPath:"#/properties/childCount/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err33]:vErrors.push(err33),errors++}if(void 0!==data.spaceCategoryAvailabilites){let data20=data.spaceCategoryAvailabilites;if(Array.isArray(data20)){const len1=data20.length;for(let i1=0;i1<len1;i1++){let data21=data20[i1];if(data21&&"object"==typeof data21&&!Array.isArray(data21)){if(void 0!==data21.id&&"string"!=typeof data21.id){const err34={instancePath:instancePath+"/spaceCategoryAvailabilites/"+i1+"/id",schemaPath:"#/properties/spaceCategoryAvailabilites/items/properties/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err34]:vErrors.push(err34),errors++}if(void 0!==data21.price&&"number"!=typeof data21.price){const err35={instancePath:instancePath+"/spaceCategoryAvailabilites/"+i1+"/price",schemaPath:"#/properties/spaceCategoryAvailabilites/items/properties/price/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err35]:vErrors.push(err35),errors++}if(void 0!==data21.unit){let data24=data21.unit;if("string"!=typeof data24){const err36={instancePath:instancePath+"/spaceCategoryAvailabilites/"+i1+"/unit",schemaPath:"#/properties/spaceCategoryAvailabilites/items/properties/unit/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err36]:vErrors.push(err36),errors++}if("night"!==data24&&"stay"!==data24&&"hour"!==data24){const err37={instancePath:instancePath+"/spaceCategoryAvailabilites/"+i1+"/unit",schemaPath:"#/properties/spaceCategoryAvailabilites/items/properties/unit/enum",keyword:"enum",params:{allowedValues:schema163.properties.spaceCategoryAvailabilites.items.properties.unit.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err37]:vErrors.push(err37),errors++}}if(void 0!==data21.isUpgrade&&"boolean"!=typeof data21.isUpgrade){const err38={instancePath:instancePath+"/spaceCategoryAvailabilites/"+i1+"/isUpgrade",schemaPath:"#/properties/spaceCategoryAvailabilites/items/properties/isUpgrade/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err38]:vErrors.push(err38),errors++}}else{const err39={instancePath:instancePath+"/spaceCategoryAvailabilites/"+i1,schemaPath:"#/properties/spaceCategoryAvailabilites/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err39]:vErrors.push(err39),errors++}}}else{const err40={instancePath:instancePath+"/spaceCategoryAvailabilites",schemaPath:"#/properties/spaceCategoryAvailabilites/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err40]:vErrors.push(err40),errors++}}if(void 0!==data.revenue&&(validate64(data.revenue,{instancePath:instancePath+"/revenue",parentData:data,parentDataProperty:"revenue",rootData:rootData})||(vErrors=null===vErrors?validate64.errors:vErrors.concat(validate64.errors),errors=vErrors.length)),void 0!==data.rateSuppressed&&"boolean"!=typeof data.rateSuppressed){const err41={instancePath:instancePath+"/rateSuppressed",schemaPath:"#/properties/rateSuppressed/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err41]:vErrors.push(err41),errors++}if(void 0!==data.payment&&"string"!=typeof data.payment){const err42={instancePath:instancePath+"/payment",schemaPath:"#/properties/payment/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err42]:vErrors.push(err42),errors++}if(void 0!==data.company&&"string"!=typeof data.company){const err43={instancePath:instancePath+"/company",schemaPath:"#/properties/company/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err43]:vErrors.push(err43),errors++}if(void 0!==data.travelAgent&&"string"!=typeof data.travelAgent){const err44={instancePath:instancePath+"/travelAgent",schemaPath:"#/properties/travelAgent/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err44]:vErrors.push(err44),errors++}if(void 0!==data.systemId&&"string"!=typeof data.systemId){const err45={instancePath:instancePath+"/systemId",schemaPath:"definitions.json#/definitions/systemId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err45]:vErrors.push(err45),errors++}if(void 0!==data.updatedAt){let data32=data.updatedAt;if("string"!=typeof data32&&(!data32||"object"!=typeof data32||Array.isArray(data32))){const err46={instancePath:instancePath+"/updatedAt",schemaPath:"definitions.json#/definitions/updatedAt/type",keyword:"type",params:{type:schema150.type},message:"must be string,object"};null===vErrors?vErrors=[err46]:vErrors.push(err46),errors++}if("string"==typeof data32&&!formats4.validate(data32)){const err47={instancePath:instancePath+"/updatedAt",schemaPath:"definitions.json#/definitions/updatedAt/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err47]:vErrors.push(err47),errors++}}}else{const err48={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err48]:vErrors.push(err48),errors++}return validate63.errors=vErrors,0===errors}var validateRoom=function validate66(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0===data.type&&(data.type="room"),void 0===data.dimmers&&(data.dimmers=[]),void 0===data.switches&&(data.switches=[]),void 0===data.thermostats&&(data.thermostats=[]),void 0===data.locks&&(data.locks=[]),void 0===data.windowCoverings&&(data.windowCoverings=[]),void 0===data.courtesy&&(data.courtesy=[]),void 0===data.cameras&&(data.cameras=[]),void 0===data.mediaSources&&(data.mediaSources=[]),void 0===data.motionSensors&&(data.motionSensors=[]),void 0===data.alarms&&(data.alarms=[]),void 0===data.id){const err0={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(void 0===data.name){const err1={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}for(const key0 in data)if(!func5.call(schema170.properties,key0)){const err2={instancePath:instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key0},message:"must NOT have additional properties"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}if(void 0!==data.id){let data0=data.id;if("string"!=typeof data0){const err3={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}const _errs5=errors,_errs6=errors;if("global"!==data0&&"system"!==data0){const err4={};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}if(_errs6===errors){const err5={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}else errors=_errs5,null!==vErrors&&(_errs5?vErrors.length=_errs5:vErrors=null)}let data1=data.type;if("string"!=typeof data1){const err6={instancePath:instancePath+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}if("room"!==data1){const err7={instancePath:instancePath+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:schema170.properties.type.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}if(void 0!==data.name&&"string"!=typeof data.name){const err8={instancePath:instancePath+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}if(void 0!==data.floor&&"string"!=typeof data.floor){const err9={instancePath:instancePath+"/floor",schemaPath:"#/properties/floor/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}let data4=data.dimmers;if(Array.isArray(data4)){const len0=data4.length;for(let i0=0;i0<len0;i0++)validate27(data4[i0],{instancePath:instancePath+"/dimmers/"+i0,parentData:data4,parentDataProperty:i0,rootData:rootData})||(vErrors=null===vErrors?validate27.errors:vErrors.concat(validate27.errors),errors=vErrors.length)}else{const err10={instancePath:instancePath+"/dimmers",schemaPath:"#/properties/dimmers/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err10]:vErrors.push(err10),errors++}let data6=data.switches;if(Array.isArray(data6)){const len1=data6.length;for(let i1=0;i1<len1;i1++)validate68(data6[i1],{instancePath:instancePath+"/switches/"+i1,parentData:data6,parentDataProperty:i1,rootData:rootData})||(vErrors=null===vErrors?validate68.errors:vErrors.concat(validate68.errors),errors=vErrors.length)}else{const err11={instancePath:instancePath+"/switches",schemaPath:"#/properties/switches/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err11]:vErrors.push(err11),errors++}let data8=data.thermostats;if(Array.isArray(data8)){const len2=data8.length;for(let i2=0;i2<len2;i2++)validate72(data8[i2],{instancePath:instancePath+"/thermostats/"+i2,parentData:data8,parentDataProperty:i2,rootData:rootData})||(vErrors=null===vErrors?validate72.errors:vErrors.concat(validate72.errors),errors=vErrors.length)}else{const err12={instancePath:instancePath+"/thermostats",schemaPath:"#/properties/thermostats/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err12]:vErrors.push(err12),errors++}let data10=data.locks;if(Array.isArray(data10)){const len3=data10.length;for(let i3=0;i3<len3;i3++)validate45(data10[i3],{instancePath:instancePath+"/locks/"+i3,parentData:data10,parentDataProperty:i3,rootData:rootData})||(vErrors=null===vErrors?validate45.errors:vErrors.concat(validate45.errors),errors=vErrors.length)}else{const err13={instancePath:instancePath+"/locks",schemaPath:"#/properties/locks/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err13]:vErrors.push(err13),errors++}let data12=data.windowCoverings;if(Array.isArray(data12)){const len4=data12.length;for(let i4=0;i4<len4;i4++)validate81(data12[i4],{instancePath:instancePath+"/windowCoverings/"+i4,parentData:data12,parentDataProperty:i4,rootData:rootData})||(vErrors=null===vErrors?validate81.errors:vErrors.concat(validate81.errors),errors=vErrors.length)}else{const err14={instancePath:instancePath+"/windowCoverings",schemaPath:"#/properties/windowCoverings/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err14]:vErrors.push(err14),errors++}let data14=data.courtesy;if(Array.isArray(data14)){const len5=data14.length;for(let i5=0;i5<len5;i5++)validate22(data14[i5],{instancePath:instancePath+"/courtesy/"+i5,parentData:data14,parentDataProperty:i5,rootData:rootData})||(vErrors=null===vErrors?validate22.errors:vErrors.concat(validate22.errors),errors=vErrors.length)}else{const err15={instancePath:instancePath+"/courtesy",schemaPath:"#/properties/courtesy/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err15]:vErrors.push(err15),errors++}let data16=data.cameras;if(Array.isArray(data16)){const len6=data16.length;for(let i6=0;i6<len6;i6++)validate17(data16[i6],{instancePath:instancePath+"/cameras/"+i6,parentData:data16,parentDataProperty:i6,rootData:rootData})||(vErrors=null===vErrors?validate17.errors:vErrors.concat(validate17.errors),errors=vErrors.length)}else{const err16={instancePath:instancePath+"/cameras",schemaPath:"#/properties/cameras/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err16]:vErrors.push(err16),errors++}let data18=data.mediaSources;if(Array.isArray(data18)){const len7=data18.length;for(let i7=0;i7<len7;i7++)validate49(data18[i7],{instancePath:instancePath+"/mediaSources/"+i7,parentData:data18,parentDataProperty:i7,rootData:rootData})||(vErrors=null===vErrors?validate49.errors:vErrors.concat(validate49.errors),errors=vErrors.length)}else{const err17={instancePath:instancePath+"/mediaSources",schemaPath:"#/properties/mediaSources/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err17]:vErrors.push(err17),errors++}let data20=data.motionSensors;if(Array.isArray(data20)){const len8=data20.length;for(let i8=0;i8<len8;i8++)validate52(data20[i8],{instancePath:instancePath+"/motionSensors/"+i8,parentData:data20,parentDataProperty:i8,rootData:rootData})||(vErrors=null===vErrors?validate52.errors:vErrors.concat(validate52.errors),errors=vErrors.length)}else{const err18={instancePath:instancePath+"/motionSensors",schemaPath:"#/properties/motionSensors/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err18]:vErrors.push(err18),errors++}let data22=data.alarms;if(Array.isArray(data22)){const len9=data22.length;for(let i9=0;i9<len9;i9++)validate10(data22[i9],{instancePath:instancePath+"/alarms/"+i9,parentData:data22,parentDataProperty:i9,rootData:rootData})||(vErrors=null===vErrors?validate10.errors:vErrors.concat(validate10.errors),errors=vErrors.length)}else{const err19={instancePath:instancePath+"/alarms",schemaPath:"#/properties/alarms/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err19]:vErrors.push(err19),errors++}if(void 0!==data.occupiedAt){let data24=data.occupiedAt;if("string"!=typeof data24&&(!data24||"object"!=typeof data24||Array.isArray(data24))){const err20={instancePath:instancePath+"/occupiedAt",schemaPath:"definitions.json#/definitions/createdAt/type",keyword:"type",params:{type:schema102.type},message:"must be string,object"};null===vErrors?vErrors=[err20]:vErrors.push(err20),errors++}if("string"==typeof data24&&!formats4.validate(data24)){const err21={instancePath:instancePath+"/occupiedAt",schemaPath:"definitions.json#/definitions/createdAt/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err21]:vErrors.push(err21),errors++}}if(void 0!==data.createdAt){let data25=data.createdAt;if("string"!=typeof data25&&(!data25||"object"!=typeof data25||Array.isArray(data25))){const err22={instancePath:instancePath+"/createdAt",schemaPath:"definitions.json#/definitions/createdAt/type",keyword:"type",params:{type:schema102.type},message:"must be string,object"};null===vErrors?vErrors=[err22]:vErrors.push(err22),errors++}if("string"==typeof data25&&!formats4.validate(data25)){const err23={instancePath:instancePath+"/createdAt",schemaPath:"definitions.json#/definitions/createdAt/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err23]:vErrors.push(err23),errors++}}if(void 0!==data.updatedAt){let data26=data.updatedAt;if("string"!=typeof data26&&(!data26||"object"!=typeof data26||Array.isArray(data26))){const err24={instancePath:instancePath+"/updatedAt",schemaPath:"definitions.json#/definitions/updatedAt/type",keyword:"type",params:{type:schema150.type},message:"must be string,object"};null===vErrors?vErrors=[err24]:vErrors.push(err24),errors++}if("string"==typeof data26&&!formats4.validate(data26)){const err25={instancePath:instancePath+"/updatedAt",schemaPath:"definitions.json#/definitions/updatedAt/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err25]:vErrors.push(err25),errors++}}}else{const err26={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err26]:vErrors.push(err26),errors++}return validate66.errors=vErrors,0===errors},schema170={$schema:"http://json-schema.org/draft-07/schema",$id:"room.json",title:"Room",description:"A room represents a physical space of controllable IoT devices",type:"object",required:["id","name"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",enum:["room"],default:"room"},name:{type:"string"},floor:{type:"string"},dimmers:{type:"array",default:[],items:{$ref:"dimmer.json"}},switches:{type:"array",default:[],items:{$ref:"switch.json"}},thermostats:{type:"array",default:[],items:{$ref:"thermostat.json"}},locks:{type:"array",default:[],items:{$ref:"lock.json"}},windowCoverings:{type:"array",default:[],items:{$ref:"windowCovering.json"}},courtesy:{type:"array",default:[],items:{$ref:"courtesy.json"}},cameras:{type:"array",default:[],items:{$ref:"camera.json"}},mediaSources:{type:"array",default:[],items:{$ref:"mediaSource.json"}},motionSensors:{type:"array",default:[],items:{$ref:"motionSensor.json"}},alarms:{type:"array",default:[],items:{$ref:"alarm.json"}},occupiedAt:{$ref:"definitions.json#/definitions/createdAt"},createdAt:{$ref:"definitions.json#/definitions/createdAt"},updatedAt:{$ref:"definitions.json#/definitions/updatedAt"}},additionalProperties:!1},schema172={$schema:"http://json-schema.org/draft-07/schema",$id:"switch.json",title:"Switch",description:"Any smart switch",type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},name:{type:"string"},type:{$ref:"definitions.json#/definitions/type"},discriminator:{type:"string",enum:["light","fan","irrigation"]},supportedNotifications:{$ref:"definitions.json#/definitions/supportedNotifications"},notification:{$ref:"definitions.json#/definitions/notification"},driver:{$ref:"definitions.json#/definitions/driver"},offline:{type:"boolean"},state:{type:"string",enum:["on","off"]},systemId:{$ref:"definitions.json#/definitions/systemId"},watts:{$ref:"definitions.json#/definitions/watts"},icon:{type:"string"},modelNumber:{type:"string"},serialNumber:{type:"string"},firmwareVersion:{type:"string"}},required:["id","type","state","driver"]};function validate69(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if((!data||"object"!=typeof data||Array.isArray(data))&&null!==data){const err0={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:schema16.type},message:"must be object,null"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0!==data.name){let data0=data.name;if("string"!=typeof data0){const err1={instancePath:instancePath+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if("button 1"!==data0&&"button 2"!==data0&&"button 3"!==data0&&"button 4"!==data0&&"button 5"!==data0&&"idle"!==data0&&"powerHasBeedApplied"!==data0&&"acMainsDisconnected"!==data0&&"acMainsReconnected"!==data0&&"replaceBatterySoon"!==data0&&"replaceBatteryNow"!==data0&&"batteryOk"!==data0&&"hardwareFailure"!==data0&&"softwareFailure"!==data0&&"hardwareFailureWithCode"!==data0&&"softwareFailureWithCode"!==data0&&"motionDetection"!==data0&&"airFilterNeedsCleaned"!==data0&&"airFilterNeedsReplaced"!==data0&&"smokeDetected"!==data0&&"outsideSafeTemperatureRange"!==data0&&"outsideSafeHumidityRange"!==data0&&"scheduleMaintenance"!==data0&&"doorAjar"!==data0&&"communicationFailure"!==data0&&"communicationOk"!==data0&&"burglarAlarm"!==data0&&"fireAlarm"!==data0){const err2={instancePath:instancePath+"/name",schemaPath:"#/definitions/supportedNotifications/items/enum",keyword:"enum",params:{allowedValues:schema17.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}}if(void 0!==data.timestamp){let data1=data.timestamp;if("number"==typeof data1){if(data1<1655907956593||isNaN(data1)){const err3={instancePath:instancePath+"/timestamp",schemaPath:"#/properties/timestamp/minimum",keyword:"minimum",params:{comparison:">=",limit:1655907956593},message:"must be >= 1655907956593"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}}else{const err4={instancePath:instancePath+"/timestamp",schemaPath:"#/properties/timestamp/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}}if(void 0!==data.description&&"string"!=typeof data.description){const err5={instancePath:instancePath+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}}return validate69.errors=vErrors,0===errors}function validate68(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0===data.id){const err0={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(void 0===data.type){const err1={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if(void 0===data.state){const err2={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"state"},message:"must have required property 'state'"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}if(void 0===data.driver){const err3={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"driver"},message:"must have required property 'driver'"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}if(void 0!==data.id){let data0=data.id;if("string"!=typeof data0){const err4={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}const _errs4=errors,_errs5=errors;if("global"!==data0&&"system"!==data0){const err5={};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}if(_errs5===errors){const err6={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}else errors=_errs4,null!==vErrors&&(_errs4?vErrors.length=_errs4:vErrors=null)}if(void 0!==data.name&&"string"!=typeof data.name){const err7={instancePath:instancePath+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}if(void 0!==data.type){let data2=data.type;if("string"!=typeof data2){const err8={instancePath:instancePath+"/type",schemaPath:"definitions.json#/definitions/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}if("alarm"!==data2&&"dimmer"!==data2&&"switch"!==data2&&"motionSensor"!==data2&&"windowCovering"!==data2&&"camera"!==data2&&"mediaSource"!==data2&&"thermostat"!==data2&&"lock"!==data2&&"courtesy"!==data2&&"gateway"!==data2&&"tv"!==data2&&"dvr"!==data2&&"appleTv"!==data2&&"discPlayer"!==data2&&"mediaPlayer"!==data2&&"uncontrolledDevice"!==data2){const err9={instancePath:instancePath+"/type",schemaPath:"definitions.json#/definitions/type/enum",keyword:"enum",params:{allowedValues:schema31.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}}if(void 0!==data.discriminator){let data3=data.discriminator;if("string"!=typeof data3){const err10={instancePath:instancePath+"/discriminator",schemaPath:"#/properties/discriminator/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err10]:vErrors.push(err10),errors++}if("light"!==data3&&"fan"!==data3&&"irrigation"!==data3){const err11={instancePath:instancePath+"/discriminator",schemaPath:"#/properties/discriminator/enum",keyword:"enum",params:{allowedValues:schema172.properties.discriminator.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err11]:vErrors.push(err11),errors++}}if(void 0!==data.supportedNotifications){let data4=data.supportedNotifications;if(Array.isArray(data4)){const len0=data4.length;for(let i0=0;i0<len0;i0++){let data5=data4[i0];if("button 1"!==data5&&"button 2"!==data5&&"button 3"!==data5&&"button 4"!==data5&&"button 5"!==data5&&"idle"!==data5&&"powerHasBeedApplied"!==data5&&"acMainsDisconnected"!==data5&&"acMainsReconnected"!==data5&&"replaceBatterySoon"!==data5&&"replaceBatteryNow"!==data5&&"batteryOk"!==data5&&"hardwareFailure"!==data5&&"softwareFailure"!==data5&&"hardwareFailureWithCode"!==data5&&"softwareFailureWithCode"!==data5&&"motionDetection"!==data5&&"airFilterNeedsCleaned"!==data5&&"airFilterNeedsReplaced"!==data5&&"smokeDetected"!==data5&&"outsideSafeTemperatureRange"!==data5&&"outsideSafeHumidityRange"!==data5&&"scheduleMaintenance"!==data5&&"doorAjar"!==data5&&"communicationFailure"!==data5&&"communicationOk"!==data5&&"burglarAlarm"!==data5&&"fireAlarm"!==data5){const err12={instancePath:instancePath+"/supportedNotifications/"+i0,schemaPath:"definitions.json#/definitions/supportedNotifications/items/enum",keyword:"enum",params:{allowedValues:schema15.items.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err12]:vErrors.push(err12),errors++}}let j0,i1=data4.length;if(i1>1)outer0:for(;i1--;)for(j0=i1;j0--;)if(func0(data4[i1],data4[j0])){const err13={instancePath:instancePath+"/supportedNotifications",schemaPath:"definitions.json#/definitions/supportedNotifications/uniqueItems",keyword:"uniqueItems",params:{i:i1,j:j0},message:"must NOT have duplicate items (items ## "+j0+" and "+i1+" are identical)"};null===vErrors?vErrors=[err13]:vErrors.push(err13),errors++;break outer0}}else{const err14={instancePath:instancePath+"/supportedNotifications",schemaPath:"definitions.json#/definitions/supportedNotifications/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err14]:vErrors.push(err14),errors++}}if(void 0!==data.notification&&(validate69(data.notification,{instancePath:instancePath+"/notification",parentData:data,parentDataProperty:"notification",rootData:rootData})||(vErrors=null===vErrors?validate69.errors:vErrors.concat(validate69.errors),errors=vErrors.length)),void 0!==data.driver){let data7=data.driver;if("string"!=typeof data7){const err15={instancePath:instancePath+"/driver",schemaPath:"definitions.json#/definitions/driver/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err15]:vErrors.push(err15),errors++}if("adlink"!==data7&&"aws-kinesis"!==data7&&"butler"!==data7&&"crestron"!==data7&&"dell"!==data7&&"dmp"!==data7&&"doorbird"!==data7&&"dormakaba"!==data7&&"dsc"!==data7&&"ecobee"!==data7&&"epson"!==data7&&"geovision-rs"!==data7&&"geovision-as-manager"!==data7&&"honeywell-vista"!==data7&&"igor"!==data7&&"inncom"!==data7&&"isapi"!==data7&&"kohost-k7"!==data7&&"kohost"!==data7&&"lg"!==data7&&"lg-webos"!==data7&&"lapi"!==data7&&"lirc"!==data7&&"mews"!==data7&&"mht"!==data7&&"paxton"!==data7&&"pelican-wireless"!==data7&&"power-shades"!==data7&&"rachio"!==data7&&"rebrandly"!==data7&&"rtsp"!==data7&&"salto"!==data7&&"salto-irn"!==data7&&"samsung"!==data7&&"se"!==data7&&"sendgrid"!==data7&&"sonifi"!==data7&&"stay-n-touch"!==data7&&"storable"!==data7&&"twilio"!==data7&&"unifi"!==data7&&"valcom"!==data7&&"vizio"!==data7&&"wisenet"!==data7&&"cloudflare-images"!==data7&&"cloudflare-stream"!==data7&&"insperia-privacy"!==data7){const err16={instancePath:instancePath+"/driver",schemaPath:"definitions.json#/definitions/driver/enum",keyword:"enum",params:{allowedValues:schema18.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err16]:vErrors.push(err16),errors++}}if(void 0!==data.offline&&"boolean"!=typeof data.offline){const err17={instancePath:instancePath+"/offline",schemaPath:"#/properties/offline/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err17]:vErrors.push(err17),errors++}if(void 0!==data.state){let data9=data.state;if("string"!=typeof data9){const err18={instancePath:instancePath+"/state",schemaPath:"#/properties/state/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err18]:vErrors.push(err18),errors++}if("on"!==data9&&"off"!==data9){const err19={instancePath:instancePath+"/state",schemaPath:"#/properties/state/enum",keyword:"enum",params:{allowedValues:schema172.properties.state.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err19]:vErrors.push(err19),errors++}}if(void 0!==data.systemId&&"string"!=typeof data.systemId){const err20={instancePath:instancePath+"/systemId",schemaPath:"definitions.json#/definitions/systemId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err20]:vErrors.push(err20),errors++}if(void 0!==data.watts){let data11=data.watts;if("number"==typeof data11){if(data11<0||isNaN(data11)){const err21={instancePath:instancePath+"/watts",schemaPath:"definitions.json#/definitions/watts/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===vErrors?vErrors=[err21]:vErrors.push(err21),errors++}}else{const err22={instancePath:instancePath+"/watts",schemaPath:"definitions.json#/definitions/watts/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err22]:vErrors.push(err22),errors++}}if(void 0!==data.icon&&"string"!=typeof data.icon){const err23={instancePath:instancePath+"/icon",schemaPath:"#/properties/icon/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err23]:vErrors.push(err23),errors++}if(void 0!==data.modelNumber&&"string"!=typeof data.modelNumber){const err24={instancePath:instancePath+"/modelNumber",schemaPath:"#/properties/modelNumber/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err24]:vErrors.push(err24),errors++}if(void 0!==data.serialNumber&&"string"!=typeof data.serialNumber){const err25={instancePath:instancePath+"/serialNumber",schemaPath:"#/properties/serialNumber/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err25]:vErrors.push(err25),errors++}if(void 0!==data.firmwareVersion&&"string"!=typeof data.firmwareVersion){const err26={instancePath:instancePath+"/firmwareVersion",schemaPath:"#/properties/firmwareVersion/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err26]:vErrors.push(err26),errors++}}else{const err27={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err27]:vErrors.push(err27),errors++}return validate68.errors=vErrors,0===errors}var schema181={$schema:"http://json-schema.org/draft-07/schema",$id:"thermostat.json",title:"Thermostat",description:"Any smart thermostat",type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},name:{$ref:"definitions.json#/definitions/name"},type:{$ref:"definitions.json#/definitions/type",default:"thermostat"},driver:{$ref:"definitions.json#/definitions/driver"},offline:{type:"boolean"},supportedNotifications:{$ref:"definitions.json#/definitions/supportedNotifications"},notification:{$ref:"definitions.json#/definitions/notification"},currentTemperature:{type:"number"},currentHumidity:{type:"number",minimum:0},hvacMode:{type:"string",$ref:"#/properties/supportedHvacModes/items"},hvacState:{type:["string","null"],enum:["cooling","heating","off",null]},fanMode:{type:"string",$ref:"#/properties/supportedFanModes/items"},fanState:{type:["string","null"],enum:["off","low","medium","high","on",null]},temperatureScale:{type:"string",enum:["celsius","fahrenheit"],default:"fahrenheit"},humidityScale:{type:["string","null"],enum:["absolute","relative",null]},supportedHvacModes:{type:"array",uniqueItems:!0,minItems:2,items:{enum:["cool","heat","auto","off"]}},supportedFanModes:{type:"array",uniqueItems:!0,items:{enum:["auto","low","medium","high","off","on"]}},setpoints:{type:"object",additionalProperties:!1,properties:{cool:{$ref:"#/$defs/setpoint"},heat:{$ref:"#/$defs/setpoint"},auto:{$ref:"#/$defs/setpoint"}}},minAutoDelta:{type:"number",default:3},cycleRate:{type:"number"},batteryLevel:{$ref:"definitions.json#/definitions/batteryLevel"},systemId:{$ref:"definitions.json#/definitions/systemId"},watts:{$ref:"definitions.json#/definitions/watts"},icon:{type:"string"},modelNumber:{type:"string"},serialNumber:{type:"string"},firmwareVersion:{type:"string"}},$defs:{setpoint:{type:"object",additionalProperties:!1,properties:{value:{$ref:"#/$defs/setpointValue"},min:{$ref:"#/$defs/setpointMinMax"},max:{$ref:"#/$defs/setpointMinMax"}}},setpointValue:{type:"number",minimum:0,maximum:99},setpointMinMax:{type:["number","null"],minimum:0,maximum:99}},required:["id","type","hvacMode","fanMode","hvacState","fanState","setpoints","temperatureScale","supportedHvacModes","supportedFanModes","driver"]},schema189={enum:["cool","heat","auto","off"]},schema190={enum:["auto","low","medium","high","off","on"]};function validate73(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if((!data||"object"!=typeof data||Array.isArray(data))&&null!==data){const err0={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:schema16.type},message:"must be object,null"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0!==data.name){let data0=data.name;if("string"!=typeof data0){const err1={instancePath:instancePath+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if("button 1"!==data0&&"button 2"!==data0&&"button 3"!==data0&&"button 4"!==data0&&"button 5"!==data0&&"idle"!==data0&&"powerHasBeedApplied"!==data0&&"acMainsDisconnected"!==data0&&"acMainsReconnected"!==data0&&"replaceBatterySoon"!==data0&&"replaceBatteryNow"!==data0&&"batteryOk"!==data0&&"hardwareFailure"!==data0&&"softwareFailure"!==data0&&"hardwareFailureWithCode"!==data0&&"softwareFailureWithCode"!==data0&&"motionDetection"!==data0&&"airFilterNeedsCleaned"!==data0&&"airFilterNeedsReplaced"!==data0&&"smokeDetected"!==data0&&"outsideSafeTemperatureRange"!==data0&&"outsideSafeHumidityRange"!==data0&&"scheduleMaintenance"!==data0&&"doorAjar"!==data0&&"communicationFailure"!==data0&&"communicationOk"!==data0&&"burglarAlarm"!==data0&&"fireAlarm"!==data0){const err2={instancePath:instancePath+"/name",schemaPath:"#/definitions/supportedNotifications/items/enum",keyword:"enum",params:{allowedValues:schema17.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}}if(void 0!==data.timestamp){let data1=data.timestamp;if("number"==typeof data1){if(data1<1655907956593||isNaN(data1)){const err3={instancePath:instancePath+"/timestamp",schemaPath:"#/properties/timestamp/minimum",keyword:"minimum",params:{comparison:">=",limit:1655907956593},message:"must be >= 1655907956593"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}}else{const err4={instancePath:instancePath+"/timestamp",schemaPath:"#/properties/timestamp/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}}if(void 0!==data.description&&"string"!=typeof data.description){const err5={instancePath:instancePath+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}}return validate73.errors=vErrors,0===errors}var schema193={type:["number","null"],minimum:0,maximum:99};function validate75(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){for(const key0 in data)if("value"!==key0&&"min"!==key0&&"max"!==key0){const err0={instancePath:instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key0},message:"must NOT have additional properties"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(void 0!==data.value){let data0=data.value;if("number"==typeof data0){if(data0>99||isNaN(data0)){const err1={instancePath:instancePath+"/value",schemaPath:"#/$defs/setpointValue/maximum",keyword:"maximum",params:{comparison:"<=",limit:99},message:"must be <= 99"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if(data0<0||isNaN(data0)){const err2={instancePath:instancePath+"/value",schemaPath:"#/$defs/setpointValue/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}}else{const err3={instancePath:instancePath+"/value",schemaPath:"#/$defs/setpointValue/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}}if(void 0!==data.min){let data1=data.min;if("number"!=typeof data1&&null!==data1){const err4={instancePath:instancePath+"/min",schemaPath:"#/$defs/setpointMinMax/type",keyword:"type",params:{type:schema193.type},message:"must be number,null"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}if("number"==typeof data1){if(data1>99||isNaN(data1)){const err5={instancePath:instancePath+"/min",schemaPath:"#/$defs/setpointMinMax/maximum",keyword:"maximum",params:{comparison:"<=",limit:99},message:"must be <= 99"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}if(data1<0||isNaN(data1)){const err6={instancePath:instancePath+"/min",schemaPath:"#/$defs/setpointMinMax/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}}}if(void 0!==data.max){let data2=data.max;if("number"!=typeof data2&&null!==data2){const err7={instancePath:instancePath+"/max",schemaPath:"#/$defs/setpointMinMax/type",keyword:"type",params:{type:schema193.type},message:"must be number,null"};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}if("number"==typeof data2){if(data2>99||isNaN(data2)){const err8={instancePath:instancePath+"/max",schemaPath:"#/$defs/setpointMinMax/maximum",keyword:"maximum",params:{comparison:"<=",limit:99},message:"must be <= 99"};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}if(data2<0||isNaN(data2)){const err9={instancePath:instancePath+"/max",schemaPath:"#/$defs/setpointMinMax/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}}}}else{const err10={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err10]:vErrors.push(err10),errors++}return validate75.errors=vErrors,0===errors}function validate72(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0===data.type&&(data.type="thermostat"),void 0===data.temperatureScale&&(data.temperatureScale="fahrenheit"),void 0===data.minAutoDelta&&(data.minAutoDelta=3),void 0===data.id){const err0={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(void 0===data.type){const err1={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if(void 0===data.hvacMode){const err2={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"hvacMode"},message:"must have required property 'hvacMode'"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}if(void 0===data.fanMode){const err3={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"fanMode"},message:"must have required property 'fanMode'"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}if(void 0===data.hvacState){const err4={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"hvacState"},message:"must have required property 'hvacState'"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}if(void 0===data.fanState){const err5={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"fanState"},message:"must have required property 'fanState'"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}if(void 0===data.setpoints){const err6={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"setpoints"},message:"must have required property 'setpoints'"};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}if(void 0===data.temperatureScale){const err7={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"temperatureScale"},message:"must have required property 'temperatureScale'"};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}if(void 0===data.supportedHvacModes){const err8={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"supportedHvacModes"},message:"must have required property 'supportedHvacModes'"};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}if(void 0===data.supportedFanModes){const err9={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"supportedFanModes"},message:"must have required property 'supportedFanModes'"};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}if(void 0===data.driver){const err10={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"driver"},message:"must have required property 'driver'"};null===vErrors?vErrors=[err10]:vErrors.push(err10),errors++}if(void 0!==data.id){let data0=data.id;if("string"!=typeof data0){const err11={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err11]:vErrors.push(err11),errors++}const _errs4=errors,_errs5=errors;if("global"!==data0&&"system"!==data0){const err12={};null===vErrors?vErrors=[err12]:vErrors.push(err12),errors++}if(_errs5===errors){const err13={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err13]:vErrors.push(err13),errors++}else errors=_errs4,null!==vErrors&&(_errs4?vErrors.length=_errs4:vErrors=null)}if(void 0!==data.name&&"string"!=typeof data.name){const err14={instancePath:instancePath+"/name",schemaPath:"definitions.json#/definitions/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err14]:vErrors.push(err14),errors++}let data2=data.type;if("string"!=typeof data2){const err15={instancePath:instancePath+"/type",schemaPath:"definitions.json#/definitions/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err15]:vErrors.push(err15),errors++}if("alarm"!==data2&&"dimmer"!==data2&&"switch"!==data2&&"motionSensor"!==data2&&"windowCovering"!==data2&&"camera"!==data2&&"mediaSource"!==data2&&"thermostat"!==data2&&"lock"!==data2&&"courtesy"!==data2&&"gateway"!==data2&&"tv"!==data2&&"dvr"!==data2&&"appleTv"!==data2&&"discPlayer"!==data2&&"mediaPlayer"!==data2&&"uncontrolledDevice"!==data2){const err16={instancePath:instancePath+"/type",schemaPath:"definitions.json#/definitions/type/enum",keyword:"enum",params:{allowedValues:schema31.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err16]:vErrors.push(err16),errors++}if(void 0!==data.driver){let data3=data.driver;if("string"!=typeof data3){const err17={instancePath:instancePath+"/driver",schemaPath:"definitions.json#/definitions/driver/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err17]:vErrors.push(err17),errors++}if("adlink"!==data3&&"aws-kinesis"!==data3&&"butler"!==data3&&"crestron"!==data3&&"dell"!==data3&&"dmp"!==data3&&"doorbird"!==data3&&"dormakaba"!==data3&&"dsc"!==data3&&"ecobee"!==data3&&"epson"!==data3&&"geovision-rs"!==data3&&"geovision-as-manager"!==data3&&"honeywell-vista"!==data3&&"igor"!==data3&&"inncom"!==data3&&"isapi"!==data3&&"kohost-k7"!==data3&&"kohost"!==data3&&"lg"!==data3&&"lg-webos"!==data3&&"lapi"!==data3&&"lirc"!==data3&&"mews"!==data3&&"mht"!==data3&&"paxton"!==data3&&"pelican-wireless"!==data3&&"power-shades"!==data3&&"rachio"!==data3&&"rebrandly"!==data3&&"rtsp"!==data3&&"salto"!==data3&&"salto-irn"!==data3&&"samsung"!==data3&&"se"!==data3&&"sendgrid"!==data3&&"sonifi"!==data3&&"stay-n-touch"!==data3&&"storable"!==data3&&"twilio"!==data3&&"unifi"!==data3&&"valcom"!==data3&&"vizio"!==data3&&"wisenet"!==data3&&"cloudflare-images"!==data3&&"cloudflare-stream"!==data3&&"insperia-privacy"!==data3){const err18={instancePath:instancePath+"/driver",schemaPath:"definitions.json#/definitions/driver/enum",keyword:"enum",params:{allowedValues:schema18.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err18]:vErrors.push(err18),errors++}}if(void 0!==data.offline&&"boolean"!=typeof data.offline){const err19={instancePath:instancePath+"/offline",schemaPath:"#/properties/offline/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err19]:vErrors.push(err19),errors++}if(void 0!==data.supportedNotifications){let data5=data.supportedNotifications;if(Array.isArray(data5)){const len0=data5.length;for(let i0=0;i0<len0;i0++){let data6=data5[i0];if("button 1"!==data6&&"button 2"!==data6&&"button 3"!==data6&&"button 4"!==data6&&"button 5"!==data6&&"idle"!==data6&&"powerHasBeedApplied"!==data6&&"acMainsDisconnected"!==data6&&"acMainsReconnected"!==data6&&"replaceBatterySoon"!==data6&&"replaceBatteryNow"!==data6&&"batteryOk"!==data6&&"hardwareFailure"!==data6&&"softwareFailure"!==data6&&"hardwareFailureWithCode"!==data6&&"softwareFailureWithCode"!==data6&&"motionDetection"!==data6&&"airFilterNeedsCleaned"!==data6&&"airFilterNeedsReplaced"!==data6&&"smokeDetected"!==data6&&"outsideSafeTemperatureRange"!==data6&&"outsideSafeHumidityRange"!==data6&&"scheduleMaintenance"!==data6&&"doorAjar"!==data6&&"communicationFailure"!==data6&&"communicationOk"!==data6&&"burglarAlarm"!==data6&&"fireAlarm"!==data6){const err20={instancePath:instancePath+"/supportedNotifications/"+i0,schemaPath:"definitions.json#/definitions/supportedNotifications/items/enum",keyword:"enum",params:{allowedValues:schema15.items.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err20]:vErrors.push(err20),errors++}}let j0,i1=data5.length;if(i1>1)outer0:for(;i1--;)for(j0=i1;j0--;)if(func0(data5[i1],data5[j0])){const err21={instancePath:instancePath+"/supportedNotifications",schemaPath:"definitions.json#/definitions/supportedNotifications/uniqueItems",keyword:"uniqueItems",params:{i:i1,j:j0},message:"must NOT have duplicate items (items ## "+j0+" and "+i1+" are identical)"};null===vErrors?vErrors=[err21]:vErrors.push(err21),errors++;break outer0}}else{const err22={instancePath:instancePath+"/supportedNotifications",schemaPath:"definitions.json#/definitions/supportedNotifications/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err22]:vErrors.push(err22),errors++}}if(void 0!==data.notification&&(validate73(data.notification,{instancePath:instancePath+"/notification",parentData:data,parentDataProperty:"notification",rootData:rootData})||(vErrors=null===vErrors?validate73.errors:vErrors.concat(validate73.errors),errors=vErrors.length)),void 0!==data.currentTemperature&&"number"!=typeof data.currentTemperature){const err23={instancePath:instancePath+"/currentTemperature",schemaPath:"#/properties/currentTemperature/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err23]:vErrors.push(err23),errors++}if(void 0!==data.currentHumidity){let data9=data.currentHumidity;if("number"==typeof data9){if(data9<0||isNaN(data9)){const err24={instancePath:instancePath+"/currentHumidity",schemaPath:"#/properties/currentHumidity/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===vErrors?vErrors=[err24]:vErrors.push(err24),errors++}}else{const err25={instancePath:instancePath+"/currentHumidity",schemaPath:"#/properties/currentHumidity/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err25]:vErrors.push(err25),errors++}}if(void 0!==data.hvacMode){let data10=data.hvacMode;if("string"!=typeof data10){const err26={instancePath:instancePath+"/hvacMode",schemaPath:"#/properties/hvacMode/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err26]:vErrors.push(err26),errors++}if("cool"!==data10&&"heat"!==data10&&"auto"!==data10&&"off"!==data10){const err27={instancePath:instancePath+"/hvacMode",schemaPath:"#/properties/supportedHvacModes/items/enum",keyword:"enum",params:{allowedValues:schema189.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err27]:vErrors.push(err27),errors++}}if(void 0!==data.hvacState){let data11=data.hvacState;if("string"!=typeof data11&&null!==data11){const err28={instancePath:instancePath+"/hvacState",schemaPath:"#/properties/hvacState/type",keyword:"type",params:{type:schema181.properties.hvacState.type},message:"must be string,null"};null===vErrors?vErrors=[err28]:vErrors.push(err28),errors++}if("cooling"!==data11&&"heating"!==data11&&"off"!==data11&&null!==data11){const err29={instancePath:instancePath+"/hvacState",schemaPath:"#/properties/hvacState/enum",keyword:"enum",params:{allowedValues:schema181.properties.hvacState.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err29]:vErrors.push(err29),errors++}}if(void 0!==data.fanMode){let data12=data.fanMode;if("string"!=typeof data12){const err30={instancePath:instancePath+"/fanMode",schemaPath:"#/properties/fanMode/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err30]:vErrors.push(err30),errors++}if("auto"!==data12&&"low"!==data12&&"medium"!==data12&&"high"!==data12&&"off"!==data12&&"on"!==data12){const err31={instancePath:instancePath+"/fanMode",schemaPath:"#/properties/supportedFanModes/items/enum",keyword:"enum",params:{allowedValues:schema190.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err31]:vErrors.push(err31),errors++}}if(void 0!==data.fanState){let data13=data.fanState;if("string"!=typeof data13&&null!==data13){const err32={instancePath:instancePath+"/fanState",schemaPath:"#/properties/fanState/type",keyword:"type",params:{type:schema181.properties.fanState.type},message:"must be string,null"};null===vErrors?vErrors=[err32]:vErrors.push(err32),errors++}if("off"!==data13&&"low"!==data13&&"medium"!==data13&&"high"!==data13&&"on"!==data13&&null!==data13){const err33={instancePath:instancePath+"/fanState",schemaPath:"#/properties/fanState/enum",keyword:"enum",params:{allowedValues:schema181.properties.fanState.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err33]:vErrors.push(err33),errors++}}let data14=data.temperatureScale;if("string"!=typeof data14){const err34={instancePath:instancePath+"/temperatureScale",schemaPath:"#/properties/temperatureScale/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err34]:vErrors.push(err34),errors++}if("celsius"!==data14&&"fahrenheit"!==data14){const err35={instancePath:instancePath+"/temperatureScale",schemaPath:"#/properties/temperatureScale/enum",keyword:"enum",params:{allowedValues:schema181.properties.temperatureScale.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err35]:vErrors.push(err35),errors++}if(void 0!==data.humidityScale){let data15=data.humidityScale;if("string"!=typeof data15&&null!==data15){const err36={instancePath:instancePath+"/humidityScale",schemaPath:"#/properties/humidityScale/type",keyword:"type",params:{type:schema181.properties.humidityScale.type},message:"must be string,null"};null===vErrors?vErrors=[err36]:vErrors.push(err36),errors++}if("absolute"!==data15&&"relative"!==data15&&null!==data15){const err37={instancePath:instancePath+"/humidityScale",schemaPath:"#/properties/humidityScale/enum",keyword:"enum",params:{allowedValues:schema181.properties.humidityScale.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err37]:vErrors.push(err37),errors++}}if(void 0!==data.supportedHvacModes){let data16=data.supportedHvacModes;if(Array.isArray(data16)){if(data16.length<2){const err38={instancePath:instancePath+"/supportedHvacModes",schemaPath:"#/properties/supportedHvacModes/minItems",keyword:"minItems",params:{limit:2},message:"must NOT have fewer than 2 items"};null===vErrors?vErrors=[err38]:vErrors.push(err38),errors++}const len1=data16.length;for(let i2=0;i2<len1;i2++){let data17=data16[i2];if("cool"!==data17&&"heat"!==data17&&"auto"!==data17&&"off"!==data17){const err39={instancePath:instancePath+"/supportedHvacModes/"+i2,schemaPath:"#/properties/supportedHvacModes/items/enum",keyword:"enum",params:{allowedValues:schema181.properties.supportedHvacModes.items.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err39]:vErrors.push(err39),errors++}}let j1,i3=data16.length;if(i3>1)outer1:for(;i3--;)for(j1=i3;j1--;)if(func0(data16[i3],data16[j1])){const err40={instancePath:instancePath+"/supportedHvacModes",schemaPath:"#/properties/supportedHvacModes/uniqueItems",keyword:"uniqueItems",params:{i:i3,j:j1},message:"must NOT have duplicate items (items ## "+j1+" and "+i3+" are identical)"};null===vErrors?vErrors=[err40]:vErrors.push(err40),errors++;break outer1}}else{const err41={instancePath:instancePath+"/supportedHvacModes",schemaPath:"#/properties/supportedHvacModes/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err41]:vErrors.push(err41),errors++}}if(void 0!==data.supportedFanModes){let data18=data.supportedFanModes;if(Array.isArray(data18)){const len2=data18.length;for(let i4=0;i4<len2;i4++){let data19=data18[i4];if("auto"!==data19&&"low"!==data19&&"medium"!==data19&&"high"!==data19&&"off"!==data19&&"on"!==data19){const err42={instancePath:instancePath+"/supportedFanModes/"+i4,schemaPath:"#/properties/supportedFanModes/items/enum",keyword:"enum",params:{allowedValues:schema181.properties.supportedFanModes.items.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err42]:vErrors.push(err42),errors++}}let j2,i5=data18.length;if(i5>1)outer2:for(;i5--;)for(j2=i5;j2--;)if(func0(data18[i5],data18[j2])){const err43={instancePath:instancePath+"/supportedFanModes",schemaPath:"#/properties/supportedFanModes/uniqueItems",keyword:"uniqueItems",params:{i:i5,j:j2},message:"must NOT have duplicate items (items ## "+j2+" and "+i5+" are identical)"};null===vErrors?vErrors=[err43]:vErrors.push(err43),errors++;break outer2}}else{const err44={instancePath:instancePath+"/supportedFanModes",schemaPath:"#/properties/supportedFanModes/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err44]:vErrors.push(err44),errors++}}if(void 0!==data.setpoints){let data20=data.setpoints;if(data20&&"object"==typeof data20&&!Array.isArray(data20)){for(const key0 in data20)if("cool"!==key0&&"heat"!==key0&&"auto"!==key0){const err45={instancePath:instancePath+"/setpoints",schemaPath:"#/properties/setpoints/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key0},message:"must NOT have additional properties"};null===vErrors?vErrors=[err45]:vErrors.push(err45),errors++}void 0!==data20.cool&&(validate75(data20.cool,{instancePath:instancePath+"/setpoints/cool",parentData:data20,parentDataProperty:"cool",rootData:rootData})||(vErrors=null===vErrors?validate75.errors:vErrors.concat(validate75.errors),errors=vErrors.length)),void 0!==data20.heat&&(validate75(data20.heat,{instancePath:instancePath+"/setpoints/heat",parentData:data20,parentDataProperty:"heat",rootData:rootData})||(vErrors=null===vErrors?validate75.errors:vErrors.concat(validate75.errors),errors=vErrors.length)),void 0!==data20.auto&&(validate75(data20.auto,{instancePath:instancePath+"/setpoints/auto",parentData:data20,parentDataProperty:"auto",rootData:rootData})||(vErrors=null===vErrors?validate75.errors:vErrors.concat(validate75.errors),errors=vErrors.length))}else{const err46={instancePath:instancePath+"/setpoints",schemaPath:"#/properties/setpoints/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err46]:vErrors.push(err46),errors++}}if("number"!=typeof data.minAutoDelta){const err47={instancePath:instancePath+"/minAutoDelta",schemaPath:"#/properties/minAutoDelta/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err47]:vErrors.push(err47),errors++}if(void 0!==data.cycleRate&&"number"!=typeof data.cycleRate){const err48={instancePath:instancePath+"/cycleRate",schemaPath:"#/properties/cycleRate/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err48]:vErrors.push(err48),errors++}if(void 0!==data.batteryLevel){let data26=data.batteryLevel;if("number"==typeof data26){if(data26>100||isNaN(data26)){const err49={instancePath:instancePath+"/batteryLevel",schemaPath:"definitions.json#/definitions/batteryLevel/maximum",keyword:"maximum",params:{comparison:"<=",limit:100},message:"must be <= 100"};null===vErrors?vErrors=[err49]:vErrors.push(err49),errors++}if(data26<0||isNaN(data26)){const err50={instancePath:instancePath+"/batteryLevel",schemaPath:"definitions.json#/definitions/batteryLevel/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===vErrors?vErrors=[err50]:vErrors.push(err50),errors++}}else{const err51={instancePath:instancePath+"/batteryLevel",schemaPath:"definitions.json#/definitions/batteryLevel/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err51]:vErrors.push(err51),errors++}}if(void 0!==data.systemId&&"string"!=typeof data.systemId){const err52={instancePath:instancePath+"/systemId",schemaPath:"definitions.json#/definitions/systemId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err52]:vErrors.push(err52),errors++}if(void 0!==data.watts){let data28=data.watts;if("number"==typeof data28){if(data28<0||isNaN(data28)){const err53={instancePath:instancePath+"/watts",schemaPath:"definitions.json#/definitions/watts/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===vErrors?vErrors=[err53]:vErrors.push(err53),errors++}}else{const err54={instancePath:instancePath+"/watts",schemaPath:"definitions.json#/definitions/watts/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err54]:vErrors.push(err54),errors++}}if(void 0!==data.icon&&"string"!=typeof data.icon){const err55={instancePath:instancePath+"/icon",schemaPath:"#/properties/icon/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err55]:vErrors.push(err55),errors++}if(void 0!==data.modelNumber&&"string"!=typeof data.modelNumber){const err56={instancePath:instancePath+"/modelNumber",schemaPath:"#/properties/modelNumber/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err56]:vErrors.push(err56),errors++}if(void 0!==data.serialNumber&&"string"!=typeof data.serialNumber){const err57={instancePath:instancePath+"/serialNumber",schemaPath:"#/properties/serialNumber/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err57]:vErrors.push(err57),errors++}if(void 0!==data.firmwareVersion&&"string"!=typeof data.firmwareVersion){const err58={instancePath:instancePath+"/firmwareVersion",schemaPath:"#/properties/firmwareVersion/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err58]:vErrors.push(err58),errors++}}else{const err59={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err59]:vErrors.push(err59),errors++}return validate72.errors=vErrors,0===errors}var schema198={$schema:"http://json-schema.org/draft-07/schema",$id:"windowCovering.json",title:"Window Covering",description:"Any smart window covering",type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},name:{type:"string"},type:{$ref:"definitions.json#/definitions/type",default:"windowCovering"},discriminator:{type:"string",enum:["basic","variable"],default:"variable"},supportedNotifications:{$ref:"definitions.json#/definitions/supportedNotifications"},notification:{$ref:"definitions.json#/definitions/notification"},driver:{$ref:"definitions.json#/definitions/driver"},offline:{type:"boolean"},position:{type:["number","null"],minimum:0,maximum:100},systemId:{$ref:"definitions.json#/definitions/systemId"},watts:{$ref:"definitions.json#/definitions/watts"},icon:{type:"string"},modelNumber:{type:"string"},serialNumber:{type:"string"},firmwareVersion:{type:"string"}},required:["id","type","position","driver"]};function validate82(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if((!data||"object"!=typeof data||Array.isArray(data))&&null!==data){const err0={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:schema16.type},message:"must be object,null"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0!==data.name){let data0=data.name;if("string"!=typeof data0){const err1={instancePath:instancePath+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if("button 1"!==data0&&"button 2"!==data0&&"button 3"!==data0&&"button 4"!==data0&&"button 5"!==data0&&"idle"!==data0&&"powerHasBeedApplied"!==data0&&"acMainsDisconnected"!==data0&&"acMainsReconnected"!==data0&&"replaceBatterySoon"!==data0&&"replaceBatteryNow"!==data0&&"batteryOk"!==data0&&"hardwareFailure"!==data0&&"softwareFailure"!==data0&&"hardwareFailureWithCode"!==data0&&"softwareFailureWithCode"!==data0&&"motionDetection"!==data0&&"airFilterNeedsCleaned"!==data0&&"airFilterNeedsReplaced"!==data0&&"smokeDetected"!==data0&&"outsideSafeTemperatureRange"!==data0&&"outsideSafeHumidityRange"!==data0&&"scheduleMaintenance"!==data0&&"doorAjar"!==data0&&"communicationFailure"!==data0&&"communicationOk"!==data0&&"burglarAlarm"!==data0&&"fireAlarm"!==data0){const err2={instancePath:instancePath+"/name",schemaPath:"#/definitions/supportedNotifications/items/enum",keyword:"enum",params:{allowedValues:schema17.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}}if(void 0!==data.timestamp){let data1=data.timestamp;if("number"==typeof data1){if(data1<1655907956593||isNaN(data1)){const err3={instancePath:instancePath+"/timestamp",schemaPath:"#/properties/timestamp/minimum",keyword:"minimum",params:{comparison:">=",limit:1655907956593},message:"must be >= 1655907956593"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}}else{const err4={instancePath:instancePath+"/timestamp",schemaPath:"#/properties/timestamp/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}}if(void 0!==data.description&&"string"!=typeof data.description){const err5={instancePath:instancePath+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}}return validate82.errors=vErrors,0===errors}function validate81(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0===data.type&&(data.type="windowCovering"),void 0===data.discriminator&&(data.discriminator="variable"),void 0===data.id){const err0={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(void 0===data.type){const err1={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if(void 0===data.position){const err2={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"position"},message:"must have required property 'position'"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}if(void 0===data.driver){const err3={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"driver"},message:"must have required property 'driver'"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}if(void 0!==data.id){let data0=data.id;if("string"!=typeof data0){const err4={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}const _errs4=errors,_errs5=errors;if("global"!==data0&&"system"!==data0){const err5={};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}if(_errs5===errors){const err6={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}else errors=_errs4,null!==vErrors&&(_errs4?vErrors.length=_errs4:vErrors=null)}if(void 0!==data.name&&"string"!=typeof data.name){const err7={instancePath:instancePath+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}let data2=data.type;if("string"!=typeof data2){const err8={instancePath:instancePath+"/type",schemaPath:"definitions.json#/definitions/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}if("alarm"!==data2&&"dimmer"!==data2&&"switch"!==data2&&"motionSensor"!==data2&&"windowCovering"!==data2&&"camera"!==data2&&"mediaSource"!==data2&&"thermostat"!==data2&&"lock"!==data2&&"courtesy"!==data2&&"gateway"!==data2&&"tv"!==data2&&"dvr"!==data2&&"appleTv"!==data2&&"discPlayer"!==data2&&"mediaPlayer"!==data2&&"uncontrolledDevice"!==data2){const err9={instancePath:instancePath+"/type",schemaPath:"definitions.json#/definitions/type/enum",keyword:"enum",params:{allowedValues:schema31.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}let data3=data.discriminator;if("string"!=typeof data3){const err10={instancePath:instancePath+"/discriminator",schemaPath:"#/properties/discriminator/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err10]:vErrors.push(err10),errors++}if("basic"!==data3&&"variable"!==data3){const err11={instancePath:instancePath+"/discriminator",schemaPath:"#/properties/discriminator/enum",keyword:"enum",params:{allowedValues:schema198.properties.discriminator.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err11]:vErrors.push(err11),errors++}if(void 0!==data.supportedNotifications){let data4=data.supportedNotifications;if(Array.isArray(data4)){const len0=data4.length;for(let i0=0;i0<len0;i0++){let data5=data4[i0];if("button 1"!==data5&&"button 2"!==data5&&"button 3"!==data5&&"button 4"!==data5&&"button 5"!==data5&&"idle"!==data5&&"powerHasBeedApplied"!==data5&&"acMainsDisconnected"!==data5&&"acMainsReconnected"!==data5&&"replaceBatterySoon"!==data5&&"replaceBatteryNow"!==data5&&"batteryOk"!==data5&&"hardwareFailure"!==data5&&"softwareFailure"!==data5&&"hardwareFailureWithCode"!==data5&&"softwareFailureWithCode"!==data5&&"motionDetection"!==data5&&"airFilterNeedsCleaned"!==data5&&"airFilterNeedsReplaced"!==data5&&"smokeDetected"!==data5&&"outsideSafeTemperatureRange"!==data5&&"outsideSafeHumidityRange"!==data5&&"scheduleMaintenance"!==data5&&"doorAjar"!==data5&&"communicationFailure"!==data5&&"communicationOk"!==data5&&"burglarAlarm"!==data5&&"fireAlarm"!==data5){const err12={instancePath:instancePath+"/supportedNotifications/"+i0,schemaPath:"definitions.json#/definitions/supportedNotifications/items/enum",keyword:"enum",params:{allowedValues:schema15.items.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err12]:vErrors.push(err12),errors++}}let j0,i1=data4.length;if(i1>1)outer0:for(;i1--;)for(j0=i1;j0--;)if(func0(data4[i1],data4[j0])){const err13={instancePath:instancePath+"/supportedNotifications",schemaPath:"definitions.json#/definitions/supportedNotifications/uniqueItems",keyword:"uniqueItems",params:{i:i1,j:j0},message:"must NOT have duplicate items (items ## "+j0+" and "+i1+" are identical)"};null===vErrors?vErrors=[err13]:vErrors.push(err13),errors++;break outer0}}else{const err14={instancePath:instancePath+"/supportedNotifications",schemaPath:"definitions.json#/definitions/supportedNotifications/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err14]:vErrors.push(err14),errors++}}if(void 0!==data.notification&&(validate82(data.notification,{instancePath:instancePath+"/notification",parentData:data,parentDataProperty:"notification",rootData:rootData})||(vErrors=null===vErrors?validate82.errors:vErrors.concat(validate82.errors),errors=vErrors.length)),void 0!==data.driver){let data7=data.driver;if("string"!=typeof data7){const err15={instancePath:instancePath+"/driver",schemaPath:"definitions.json#/definitions/driver/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err15]:vErrors.push(err15),errors++}if("adlink"!==data7&&"aws-kinesis"!==data7&&"butler"!==data7&&"crestron"!==data7&&"dell"!==data7&&"dmp"!==data7&&"doorbird"!==data7&&"dormakaba"!==data7&&"dsc"!==data7&&"ecobee"!==data7&&"epson"!==data7&&"geovision-rs"!==data7&&"geovision-as-manager"!==data7&&"honeywell-vista"!==data7&&"igor"!==data7&&"inncom"!==data7&&"isapi"!==data7&&"kohost-k7"!==data7&&"kohost"!==data7&&"lg"!==data7&&"lg-webos"!==data7&&"lapi"!==data7&&"lirc"!==data7&&"mews"!==data7&&"mht"!==data7&&"paxton"!==data7&&"pelican-wireless"!==data7&&"power-shades"!==data7&&"rachio"!==data7&&"rebrandly"!==data7&&"rtsp"!==data7&&"salto"!==data7&&"salto-irn"!==data7&&"samsung"!==data7&&"se"!==data7&&"sendgrid"!==data7&&"sonifi"!==data7&&"stay-n-touch"!==data7&&"storable"!==data7&&"twilio"!==data7&&"unifi"!==data7&&"valcom"!==data7&&"vizio"!==data7&&"wisenet"!==data7&&"cloudflare-images"!==data7&&"cloudflare-stream"!==data7&&"insperia-privacy"!==data7){const err16={instancePath:instancePath+"/driver",schemaPath:"definitions.json#/definitions/driver/enum",keyword:"enum",params:{allowedValues:schema18.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err16]:vErrors.push(err16),errors++}}if(void 0!==data.offline&&"boolean"!=typeof data.offline){const err17={instancePath:instancePath+"/offline",schemaPath:"#/properties/offline/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err17]:vErrors.push(err17),errors++}if(void 0!==data.position){let data9=data.position;if("number"!=typeof data9&&null!==data9){const err18={instancePath:instancePath+"/position",schemaPath:"#/properties/position/type",keyword:"type",params:{type:schema198.properties.position.type},message:"must be number,null"};null===vErrors?vErrors=[err18]:vErrors.push(err18),errors++}if("number"==typeof data9){if(data9>100||isNaN(data9)){const err19={instancePath:instancePath+"/position",schemaPath:"#/properties/position/maximum",keyword:"maximum",params:{comparison:"<=",limit:100},message:"must be <= 100"};null===vErrors?vErrors=[err19]:vErrors.push(err19),errors++}if(data9<0||isNaN(data9)){const err20={instancePath:instancePath+"/position",schemaPath:"#/properties/position/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===vErrors?vErrors=[err20]:vErrors.push(err20),errors++}}}if(void 0!==data.systemId&&"string"!=typeof data.systemId){const err21={instancePath:instancePath+"/systemId",schemaPath:"definitions.json#/definitions/systemId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err21]:vErrors.push(err21),errors++}if(void 0!==data.watts){let data11=data.watts;if("number"==typeof data11){if(data11<0||isNaN(data11)){const err22={instancePath:instancePath+"/watts",schemaPath:"definitions.json#/definitions/watts/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===vErrors?vErrors=[err22]:vErrors.push(err22),errors++}}else{const err23={instancePath:instancePath+"/watts",schemaPath:"definitions.json#/definitions/watts/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err23]:vErrors.push(err23),errors++}}if(void 0!==data.icon&&"string"!=typeof data.icon){const err24={instancePath:instancePath+"/icon",schemaPath:"#/properties/icon/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err24]:vErrors.push(err24),errors++}if(void 0!==data.modelNumber&&"string"!=typeof data.modelNumber){const err25={instancePath:instancePath+"/modelNumber",schemaPath:"#/properties/modelNumber/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err25]:vErrors.push(err25),errors++}if(void 0!==data.serialNumber&&"string"!=typeof data.serialNumber){const err26={instancePath:instancePath+"/serialNumber",schemaPath:"#/properties/serialNumber/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err26]:vErrors.push(err26),errors++}if(void 0!==data.firmwareVersion&&"string"!=typeof data.firmwareVersion){const err27={instancePath:instancePath+"/firmwareVersion",schemaPath:"#/properties/firmwareVersion/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err27]:vErrors.push(err27),errors++}}else{const err28={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err28]:vErrors.push(err28),errors++}return validate81.errors=vErrors,0===errors}var validateScene=function validate90(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0===data.type&&(data.type="scene"),void 0===data.isDefault&&(data.isDefault=!1),void 0===data.showOnUi&&(data.showOnUi=!0),void 0===data.id){const err0={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(void 0===data.name){const err1={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if(void 0===data.type){const err2={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}for(const key0 in data)if("id"!==key0&&"name"!==key0&&"description"!==key0&&"type"!==key0&&"devices"!==key0&&"isDefault"!==key0&&"showOnUi"!==key0){const err3={instancePath:instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key0},message:"must NOT have additional properties"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}if(void 0!==data.id){let data0=data.id;if("string"!=typeof data0){const err4={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}const _errs5=errors,_errs6=errors;if("global"!==data0&&"system"!==data0){const err5={};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}if(_errs6===errors){const err6={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}else errors=_errs5,null!==vErrors&&(_errs5?vErrors.length=_errs5:vErrors=null)}if(void 0!==data.name&&"string"!=typeof data.name){const err7={instancePath:instancePath+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}if(void 0!==data.description&&"string"!=typeof data.description){const err8={instancePath:instancePath+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}let data3=data.type;if("string"!=typeof data3){const err9={instancePath:instancePath+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}if("scene"!==data3){const err10={instancePath:instancePath+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:schema210.properties.type.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err10]:vErrors.push(err10),errors++}if(void 0!==data.devices){let data4=data.devices;if(data4&&"object"==typeof data4&&!Array.isArray(data4)){void 0===data4.dimmers&&(data4.dimmers=[]),void 0===data4.windowCoverings&&(data4.windowCoverings=[]),void 0===data4.thermostats&&(data4.thermostats=[]);for(const key1 in data4)if("switches"!==key1&&"dimmers"!==key1&&"windowCoverings"!==key1&&"thermostats"!==key1&&"mediaSources"!==key1&&"locks"!==key1){const err11={instancePath:instancePath+"/devices",schemaPath:"#/properties/devices/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key1},message:"must NOT have additional properties"};null===vErrors?vErrors=[err11]:vErrors.push(err11),errors++}if(void 0!==data4.switches){let data5=data4.switches;if(Array.isArray(data5)){const len0=data5.length;for(let i0=0;i0<len0;i0++){let data6=data5[i0];if(data6&&"object"==typeof data6&&!Array.isArray(data6)){if(void 0!==data6.id){let data7=data6.id;if("string"!=typeof data7){const err12={instancePath:instancePath+"/devices/switches/"+i0+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err12]:vErrors.push(err12),errors++}const _errs23=errors,_errs24=errors;if("global"!==data7&&"system"!==data7){const err13={};null===vErrors?vErrors=[err13]:vErrors.push(err13),errors++}if(_errs24===errors){const err14={instancePath:instancePath+"/devices/switches/"+i0+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err14]:vErrors.push(err14),errors++}else errors=_errs23,null!==vErrors&&(_errs23?vErrors.length=_errs23:vErrors=null)}if(void 0!==data6.state){let data8=data6.state;if("string"!=typeof data8){const err15={instancePath:instancePath+"/devices/switches/"+i0+"/state",schemaPath:"switch.json#/properties/state/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err15]:vErrors.push(err15),errors++}if("on"!==data8&&"off"!==data8){const err16={instancePath:instancePath+"/devices/switches/"+i0+"/state",schemaPath:"switch.json#/properties/state/enum",keyword:"enum",params:{allowedValues:schema213.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err16]:vErrors.push(err16),errors++}}}else{const err17={instancePath:instancePath+"/devices/switches/"+i0,schemaPath:"#/properties/devices/properties/switches/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err17]:vErrors.push(err17),errors++}}}else{const err18={instancePath:instancePath+"/devices/switches",schemaPath:"#/properties/devices/properties/switches/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err18]:vErrors.push(err18),errors++}}let data9=data4.dimmers;if(Array.isArray(data9)){const len1=data9.length;for(let i1=0;i1<len1;i1++){let data10=data9[i1];if(data10&&"object"==typeof data10&&!Array.isArray(data10)){if(void 0!==data10.id){let data11=data10.id;if("string"!=typeof data11){const err19={instancePath:instancePath+"/devices/dimmers/"+i1+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err19]:vErrors.push(err19),errors++}const _errs35=errors,_errs36=errors;if("global"!==data11&&"system"!==data11){const err20={};null===vErrors?vErrors=[err20]:vErrors.push(err20),errors++}if(_errs36===errors){const err21={instancePath:instancePath+"/devices/dimmers/"+i1+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err21]:vErrors.push(err21),errors++}else errors=_errs35,null!==vErrors&&(_errs35?vErrors.length=_errs35:vErrors=null)}if(void 0!==data10.level){let data12=data10.level;if("number"!=typeof data12&&null!==data12){const err22={instancePath:instancePath+"/devices/dimmers/"+i1+"/level",schemaPath:"dimmer.json#/properties/level/type",keyword:"type",params:{type:schema215.type},message:"must be number,null"};null===vErrors?vErrors=[err22]:vErrors.push(err22),errors++}if("number"==typeof data12){if(data12>100||isNaN(data12)){const err23={instancePath:instancePath+"/devices/dimmers/"+i1+"/level",schemaPath:"dimmer.json#/properties/level/maximum",keyword:"maximum",params:{comparison:"<=",limit:100},message:"must be <= 100"};null===vErrors?vErrors=[err23]:vErrors.push(err23),errors++}if(data12<0||isNaN(data12)){const err24={instancePath:instancePath+"/devices/dimmers/"+i1+"/level",schemaPath:"dimmer.json#/properties/level/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===vErrors?vErrors=[err24]:vErrors.push(err24),errors++}}}}else{const err25={instancePath:instancePath+"/devices/dimmers/"+i1,schemaPath:"#/properties/devices/properties/dimmers/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err25]:vErrors.push(err25),errors++}}}else{const err26={instancePath:instancePath+"/devices/dimmers",schemaPath:"#/properties/devices/properties/dimmers/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err26]:vErrors.push(err26),errors++}let data13=data4.windowCoverings;if(Array.isArray(data13)){const len2=data13.length;for(let i2=0;i2<len2;i2++){let data14=data13[i2];if(data14&&"object"==typeof data14&&!Array.isArray(data14)){if(void 0!==data14.id){let data15=data14.id;if("string"!=typeof data15){const err27={instancePath:instancePath+"/devices/windowCoverings/"+i2+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err27]:vErrors.push(err27),errors++}const _errs47=errors,_errs48=errors;if("global"!==data15&&"system"!==data15){const err28={};null===vErrors?vErrors=[err28]:vErrors.push(err28),errors++}if(_errs48===errors){const err29={instancePath:instancePath+"/devices/windowCoverings/"+i2+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err29]:vErrors.push(err29),errors++}else errors=_errs47,null!==vErrors&&(_errs47?vErrors.length=_errs47:vErrors=null)}if(void 0!==data14.position){let data16=data14.position;if("number"!=typeof data16&&null!==data16){const err30={instancePath:instancePath+"/devices/windowCoverings/"+i2+"/position",schemaPath:"windowCovering.json#/properties/position/type",keyword:"type",params:{type:schema217.type},message:"must be number,null"};null===vErrors?vErrors=[err30]:vErrors.push(err30),errors++}if("number"==typeof data16){if(data16>100||isNaN(data16)){const err31={instancePath:instancePath+"/devices/windowCoverings/"+i2+"/position",schemaPath:"windowCovering.json#/properties/position/maximum",keyword:"maximum",params:{comparison:"<=",limit:100},message:"must be <= 100"};null===vErrors?vErrors=[err31]:vErrors.push(err31),errors++}if(data16<0||isNaN(data16)){const err32={instancePath:instancePath+"/devices/windowCoverings/"+i2+"/position",schemaPath:"windowCovering.json#/properties/position/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===vErrors?vErrors=[err32]:vErrors.push(err32),errors++}}}}else{const err33={instancePath:instancePath+"/devices/windowCoverings/"+i2,schemaPath:"#/properties/devices/properties/windowCoverings/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err33]:vErrors.push(err33),errors++}}}else{const err34={instancePath:instancePath+"/devices/windowCoverings",schemaPath:"#/properties/devices/properties/windowCoverings/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err34]:vErrors.push(err34),errors++}let data17=data4.thermostats;if(Array.isArray(data17)){const len3=data17.length;for(let i3=0;i3<len3;i3++){let data18=data17[i3];if(data18&&"object"==typeof data18&&!Array.isArray(data18)){if(void 0!==data18.id){let data19=data18.id;if("string"!=typeof data19){const err35={instancePath:instancePath+"/devices/thermostats/"+i3+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err35]:vErrors.push(err35),errors++}const _errs59=errors,_errs60=errors;if("global"!==data19&&"system"!==data19){const err36={};null===vErrors?vErrors=[err36]:vErrors.push(err36),errors++}if(_errs60===errors){const err37={instancePath:instancePath+"/devices/thermostats/"+i3+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err37]:vErrors.push(err37),errors++}else errors=_errs59,null!==vErrors&&(_errs59?vErrors.length=_errs59:vErrors=null)}if(void 0!==data18.hvacMode&&(validate91(data18.hvacMode,{instancePath:instancePath+"/devices/thermostats/"+i3+"/hvacMode",parentData:data18,parentDataProperty:"hvacMode",rootData:rootData})||(vErrors=null===vErrors?validate91.errors:vErrors.concat(validate91.errors),errors=vErrors.length)),void 0!==data18.setpoints&&(validate93(data18.setpoints,{instancePath:instancePath+"/devices/thermostats/"+i3+"/setpoints",parentData:data18,parentDataProperty:"setpoints",rootData:rootData})||(vErrors=null===vErrors?validate93.errors:vErrors.concat(validate93.errors),errors=vErrors.length)),void 0!==data18.fanMode&&(validate98(data18.fanMode,{instancePath:instancePath+"/devices/thermostats/"+i3+"/fanMode",parentData:data18,parentDataProperty:"fanMode",rootData:rootData})||(vErrors=null===vErrors?validate98.errors:vErrors.concat(validate98.errors),errors=vErrors.length)),void 0!==data18.setpointDelta&&"number"!=typeof data18.setpointDelta){const err38={instancePath:instancePath+"/devices/thermostats/"+i3+"/setpointDelta",schemaPath:"#/properties/devices/properties/thermostats/items/properties/setpointDelta/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err38]:vErrors.push(err38),errors++}}else{const err39={instancePath:instancePath+"/devices/thermostats/"+i3,schemaPath:"#/properties/devices/properties/thermostats/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err39]:vErrors.push(err39),errors++}}}else{const err40={instancePath:instancePath+"/devices/thermostats",schemaPath:"#/properties/devices/properties/thermostats/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err40]:vErrors.push(err40),errors++}if(void 0!==data4.mediaSources){let data24=data4.mediaSources;if(Array.isArray(data24)){const len4=data24.length;for(let i4=0;i4<len4;i4++){let data25=data24[i4];if(data25&&"object"==typeof data25&&!Array.isArray(data25)){if(void 0!==data25.id){let data26=data25.id;if("string"!=typeof data26){const err41={instancePath:instancePath+"/devices/mediaSources/"+i4+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err41]:vErrors.push(err41),errors++}const _errs73=errors,_errs74=errors;if("global"!==data26&&"system"!==data26){const err42={};null===vErrors?vErrors=[err42]:vErrors.push(err42),errors++}if(_errs74===errors){const err43={instancePath:instancePath+"/devices/mediaSources/"+i4+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err43]:vErrors.push(err43),errors++}else errors=_errs73,null!==vErrors&&(_errs73?vErrors.length=_errs73:vErrors=null)}if(void 0!==data25.volume){let data27=data25.volume;if("number"==typeof data27){if(data27>100||isNaN(data27)){const err44={instancePath:instancePath+"/devices/mediaSources/"+i4+"/volume",schemaPath:"#/properties/devices/properties/mediaSources/items/properties/volume/maximum",keyword:"maximum",params:{comparison:"<=",limit:100},message:"must be <= 100"};null===vErrors?vErrors=[err44]:vErrors.push(err44),errors++}if(data27<0||isNaN(data27)){const err45={instancePath:instancePath+"/devices/mediaSources/"+i4+"/volume",schemaPath:"#/properties/devices/properties/mediaSources/items/properties/volume/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===vErrors?vErrors=[err45]:vErrors.push(err45),errors++}}else{const err46={instancePath:instancePath+"/devices/mediaSources/"+i4+"/volume",schemaPath:"#/properties/devices/properties/mediaSources/items/properties/volume/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err46]:vErrors.push(err46),errors++}}if(void 0!==data25.commands){let data28=data25.commands;if(Array.isArray(data28)){const len5=data28.length;for(let i5=0;i5<len5;i5++)if("string"!=typeof data28[i5]){const err47={instancePath:instancePath+"/devices/mediaSources/"+i4+"/commands/"+i5,schemaPath:"#/properties/devices/properties/mediaSources/items/properties/commands/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err47]:vErrors.push(err47),errors++}}else{const err48={instancePath:instancePath+"/devices/mediaSources/"+i4+"/commands",schemaPath:"#/properties/devices/properties/mediaSources/items/properties/commands/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err48]:vErrors.push(err48),errors++}}}else{const err49={instancePath:instancePath+"/devices/mediaSources/"+i4,schemaPath:"#/properties/devices/properties/mediaSources/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err49]:vErrors.push(err49),errors++}}}else{const err50={instancePath:instancePath+"/devices/mediaSources",schemaPath:"#/properties/devices/properties/mediaSources/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err50]:vErrors.push(err50),errors++}}if(void 0!==data4.locks){let data30=data4.locks;if(Array.isArray(data30)){const len6=data30.length;for(let i6=0;i6<len6;i6++){let data31=data30[i6];if(data31&&"object"==typeof data31&&!Array.isArray(data31)){if(void 0!==data31.id){let data32=data31.id;if("string"!=typeof data32){const err51={instancePath:instancePath+"/devices/locks/"+i6+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err51]:vErrors.push(err51),errors++}const _errs88=errors,_errs89=errors;if("global"!==data32&&"system"!==data32){const err52={};null===vErrors?vErrors=[err52]:vErrors.push(err52),errors++}if(_errs89===errors){const err53={instancePath:instancePath+"/devices/locks/"+i6+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err53]:vErrors.push(err53),errors++}else errors=_errs88,null!==vErrors&&(_errs88?vErrors.length=_errs88:vErrors=null)}if(void 0!==data31.state){let data33=data31.state;if("string"!=typeof data33&&null!==data33){const err54={instancePath:instancePath+"/devices/locks/"+i6+"/state",schemaPath:"lock.json#/properties/state/type",keyword:"type",params:{type:schema226.type},message:"must be string,null"};null===vErrors?vErrors=[err54]:vErrors.push(err54),errors++}if("locked"!==data33&&"unlocked"!==data33&&null!==data33){const err55={instancePath:instancePath+"/devices/locks/"+i6+"/state",schemaPath:"lock.json#/properties/state/enum",keyword:"enum",params:{allowedValues:schema226.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err55]:vErrors.push(err55),errors++}}if(void 0!==data31.mode){let data34=data31.mode;if("string"!=typeof data34&&null!==data34){const err56={instancePath:instancePath+"/devices/locks/"+i6+"/mode",schemaPath:"lock.json#/properties/mode/type",keyword:"type",params:{type:schema227.type},message:"must be string,null"};null===vErrors?vErrors=[err56]:vErrors.push(err56),errors++}if("normal"!==data34&&"autoLock"!==data34&&"emergencyOpen"!==data34&&"emergencyClose"!==data34&&"holdOpen"!==data34&&"lockdown"!==data34&&null!==data34){const err57={instancePath:instancePath+"/devices/locks/"+i6+"/mode",schemaPath:"lock.json#/properties/mode/enum",keyword:"enum",params:{allowedValues:schema227.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err57]:vErrors.push(err57),errors++}}}else{const err58={instancePath:instancePath+"/devices/locks/"+i6,schemaPath:"#/properties/devices/properties/locks/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err58]:vErrors.push(err58),errors++}}}else{const err59={instancePath:instancePath+"/devices/locks",schemaPath:"#/properties/devices/properties/locks/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err59]:vErrors.push(err59),errors++}}}else{const err60={instancePath:instancePath+"/devices",schemaPath:"#/properties/devices/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err60]:vErrors.push(err60),errors++}}if("boolean"!=typeof data.isDefault){const err61={instancePath:instancePath+"/isDefault",schemaPath:"#/properties/isDefault/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err61]:vErrors.push(err61),errors++}if("boolean"!=typeof data.showOnUi){const err62={instancePath:instancePath+"/showOnUi",schemaPath:"#/properties/showOnUi/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err62]:vErrors.push(err62),errors++}}else{const err63={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err63]:vErrors.push(err63),errors++}return validate90.errors=vErrors,0===errors},schema210={$schema:"http://json-schema.org/draft-07/schema",$id:"scene.json",title:"Scene",description:"A room represents a physical space of controllable IoT devices",type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},name:{type:"string"},description:{type:"string"},type:{type:"string",enum:["scene"],default:"scene"},devices:{type:"object",properties:{switches:{type:"array",items:{type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},state:{$ref:"switch.json#/properties/state"}},default:[]}},dimmers:{type:"array",items:{type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},level:{$ref:"dimmer.json#/properties/level"}}},default:[]},windowCoverings:{type:"array",items:{type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},position:{$ref:"windowCovering.json#/properties/position"}}},default:[]},thermostats:{type:"array",items:{type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},hvacMode:{$ref:"thermostat.json#/properties/hvacMode"},setpoints:{$ref:"thermostat.json#/properties/setpoints"},fanMode:{$ref:"thermostat.json#/properties/fanMode"},setpointDelta:{type:"number"}}},default:[]},mediaSources:{type:"array",items:{type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},volume:{type:"number",minimum:0,maximum:100},commands:{type:"array",items:{type:"string"}}}}},locks:{type:"array",items:{type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},state:{$ref:"lock.json#/properties/state"},mode:{$ref:"lock.json#/properties/mode"}}}}},additionalProperties:!1},isDefault:{type:"boolean",default:!1},showOnUi:{type:"boolean",default:!0}},required:["id","name","type"],additionalProperties:!1},schema213={type:"string",enum:["on","off"]},schema215={type:["number","null"],minimum:0,maximum:100},schema217={type:["number","null"],minimum:0,maximum:100},schema226={type:["string","null"],enum:["locked","unlocked",null]},schema227={type:["string","null"],enum:["normal","autoLock","emergencyOpen","emergencyClose","holdOpen","lockdown",null],description:"emergencyOpen and emergencyClose are deprecated and can be removed once Salto, Paxton and Geovision drivers are updated",default:null};function validate91(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if("string"!=typeof data){const err0={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if("cool"!==data&&"heat"!==data&&"auto"!==data&&"off"!==data){const err1={instancePath:instancePath,schemaPath:"#/properties/supportedHvacModes/items/enum",keyword:"enum",params:{allowedValues:schema189.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}return validate91.errors=vErrors,0===errors}function validate93(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){for(const key0 in data)if("cool"!==key0&&"heat"!==key0&&"auto"!==key0){const err0={instancePath:instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key0},message:"must NOT have additional properties"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}void 0!==data.cool&&(validate75(data.cool,{instancePath:instancePath+"/cool",parentData:data,parentDataProperty:"cool",rootData:rootData})||(vErrors=null===vErrors?validate75.errors:vErrors.concat(validate75.errors),errors=vErrors.length)),void 0!==data.heat&&(validate75(data.heat,{instancePath:instancePath+"/heat",parentData:data,parentDataProperty:"heat",rootData:rootData})||(vErrors=null===vErrors?validate75.errors:vErrors.concat(validate75.errors),errors=vErrors.length)),void 0!==data.auto&&(validate75(data.auto,{instancePath:instancePath+"/auto",parentData:data,parentDataProperty:"auto",rootData:rootData})||(vErrors=null===vErrors?validate75.errors:vErrors.concat(validate75.errors),errors=vErrors.length))}else{const err1={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}return validate93.errors=vErrors,0===errors}function validate98(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if("string"!=typeof data){const err0={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if("auto"!==data&&"low"!==data&&"medium"!==data&&"high"!==data&&"off"!==data&&"on"!==data){const err1={instancePath:instancePath,schemaPath:"#/properties/supportedFanModes/items/enum",keyword:"enum",params:{allowedValues:schema190.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}return validate98.errors=vErrors,0===errors}var validateShortLink=function validate100(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0===data.type&&(data.type="shortLink"),void 0===data.destination){const err0={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"destination"},message:"must have required property 'destination'"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(void 0===data.url){const err1={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"url"},message:"must have required property 'url'"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if(void 0!==data.id){let data0=data.id;if("string"!=typeof data0){const err2={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}const _errs4=errors,_errs5=errors;if("global"!==data0&&"system"!==data0){const err3={};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}if(_errs5===errors){const err4={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}else errors=_errs4,null!==vErrors&&(_errs4?vErrors.length=_errs4:vErrors=null)}let data1=data.type;if("string"!=typeof data1){const err5={instancePath:instancePath+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}if("shortLink"!==data1){const err6={instancePath:instancePath+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:schema228.properties.type.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}if(void 0!==data.title&&"string"!=typeof data.title){const err7={instancePath:instancePath+"/title",schemaPath:"#/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}if(void 0!==data.destination){let data3=data.destination;if("string"==typeof data3&&!formats0(data3)){const err8={instancePath:instancePath+"/destination",schemaPath:"#/properties/destination/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}}if(void 0!==data.url){let data4=data.url;if("string"==typeof data4&&!formats0(data4)){const err9={instancePath:instancePath+"/url",schemaPath:"#/properties/url/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}}if(void 0!==data.systemId&&"string"!=typeof data.systemId){const err10={instancePath:instancePath+"/systemId",schemaPath:"definitions.json#/definitions/systemId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err10]:vErrors.push(err10),errors++}}else{const err11={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err11]:vErrors.push(err11),errors++}return validate100.errors=vErrors,0===errors},schema228={$schema:"http://json-schema.org/draft-07/schema",$id:"shortLink.json",title:"Short Link",type:"object",required:["destination","url"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",default:"shortLink",enum:["shortLink"]},title:{type:"string"},destination:{string:"string",format:"uri"},url:{string:"string",format:"uri"},systemId:{$ref:"definitions.json#/definitions/systemId"}}};var validateSmsMessage=function validate101(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0===data.type&&(data.type="smsMessage"),void 0===data.to){const err0={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"to"},message:"must have required property 'to'"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(void 0===data.from){const err1={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"from"},message:"must have required property 'from'"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if(void 0===data.status){const err2={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"status"},message:"must have required property 'status'"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}if(void 0!==data.id){let data0=data.id;if("string"!=typeof data0){const err3={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}const _errs4=errors,_errs5=errors;if("global"!==data0&&"system"!==data0){const err4={};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}if(_errs5===errors){const err5={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}else errors=_errs4,null!==vErrors&&(_errs4?vErrors.length=_errs4:vErrors=null)}let data1=data.type;if("string"!=typeof data1){const err6={instancePath:instancePath+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}if("smsMessage"!==data1){const err7={instancePath:instancePath+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:schema231.properties.type.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}if(void 0!==data.to){let data2=data.to;if("string"==typeof data2){if(!pattern8.test(data2)){const err8={instancePath:instancePath+"/to",schemaPath:"#/properties/to/pattern",keyword:"pattern",params:{pattern:"^\\+[0-9]{1,14}$"},message:'must match pattern "^\\+[0-9]{1,14}$"'};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}}else{const err9={instancePath:instancePath+"/to",schemaPath:"#/properties/to/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}}if(void 0!==data.from){let data3=data.from;if("string"==typeof data3){if(!pattern8.test(data3)){const err10={instancePath:instancePath+"/from",schemaPath:"#/properties/from/pattern",keyword:"pattern",params:{pattern:"^\\+[0-9]{1,14}$"},message:'must match pattern "^\\+[0-9]{1,14}$"'};null===vErrors?vErrors=[err10]:vErrors.push(err10),errors++}}else{const err11={instancePath:instancePath+"/from",schemaPath:"#/properties/from/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err11]:vErrors.push(err11),errors++}}if(void 0!==data.media){let data4=data.media;if("string"==typeof data4){if(!formats0(data4)){const err12={instancePath:instancePath+"/media",schemaPath:"#/properties/media/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};null===vErrors?vErrors=[err12]:vErrors.push(err12),errors++}}else{const err13={instancePath:instancePath+"/media",schemaPath:"#/properties/media/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err13]:vErrors.push(err13),errors++}}if(void 0!==data.status){let data5=data.status;if("string"!=typeof data5){const err14={instancePath:instancePath+"/status",schemaPath:"#/properties/status/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err14]:vErrors.push(err14),errors++}if("queued"!==data5&&"accepted"!==data5&&"sending"!==data5&&"sent"!==data5&&"failed"!==data5&&"delivered"!==data5&&"undelivered"!==data5&&"receiving"!==data5&&"received"!==data5&&"read"!==data5){const err15={instancePath:instancePath+"/status",schemaPath:"#/properties/status/enum",keyword:"enum",params:{allowedValues:schema231.properties.status.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err15]:vErrors.push(err15),errors++}}if(void 0!==data.body&&"string"!=typeof data.body){const err16={instancePath:instancePath+"/body",schemaPath:"#/properties/body/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err16]:vErrors.push(err16),errors++}if(void 0!==data.driver&&"string"!=typeof data.driver){const err17={instancePath:instancePath+"/driver",schemaPath:"#/properties/driver/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err17]:vErrors.push(err17),errors++}if(void 0!==data.appData){let data8=data.appData;if(!data8||"object"!=typeof data8||Array.isArray(data8)){const err18={instancePath:instancePath+"/appData",schemaPath:"#/properties/appData/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err18]:vErrors.push(err18),errors++}}if(void 0!==data.createdAt){let data9=data.createdAt;if("string"!=typeof data9&&(!data9||"object"!=typeof data9||Array.isArray(data9))){const err19={instancePath:instancePath+"/createdAt",schemaPath:"definitions.json#/definitions/date/type",keyword:"type",params:{type:schema25.type},message:"must be string,object"};null===vErrors?vErrors=[err19]:vErrors.push(err19),errors++}if("string"==typeof data9&&!formats4.validate(data9)){const err20={instancePath:instancePath+"/createdAt",schemaPath:"definitions.json#/definitions/date/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err20]:vErrors.push(err20),errors++}}if(void 0!==data.updatedAt){let data10=data.updatedAt;if("string"!=typeof data10&&(!data10||"object"!=typeof data10||Array.isArray(data10))){const err21={instancePath:instancePath+"/updatedAt",schemaPath:"definitions.json#/definitions/date/type",keyword:"type",params:{type:schema25.type},message:"must be string,object"};null===vErrors?vErrors=[err21]:vErrors.push(err21),errors++}if("string"==typeof data10&&!formats4.validate(data10)){const err22={instancePath:instancePath+"/updatedAt",schemaPath:"definitions.json#/definitions/date/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err22]:vErrors.push(err22),errors++}}if(void 0!==data.systemId&&"string"!=typeof data.systemId){const err23={instancePath:instancePath+"/systemId",schemaPath:"definitions.json#/definitions/systemId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err23]:vErrors.push(err23),errors++}}else{const err24={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err24]:vErrors.push(err24),errors++}return validate101.errors=vErrors,0===errors},schema231={$schema:"http://json-schema.org/draft-07/schema",$id:"smsMessage.json",title:"Sms Message",type:"object",required:["to","from","status"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",default:"smsMessage",enum:["smsMessage"]},to:{type:"string",pattern:"^\\+[0-9]{1,14}$"},from:{type:"string",pattern:"^\\+[0-9]{1,14}$"},media:{type:"string",format:"uri"},status:{type:"string",enum:["queued","accepted","sending","sent","failed","delivered","undelivered","receiving","received","read"]},body:{type:"string"},driver:{type:"string"},appData:{type:"object"},createdAt:{$ref:"definitions.json#/definitions/date"},updatedAt:{$ref:"definitions.json#/definitions/date"},systemId:{$ref:"definitions.json#/definitions/systemId"}}},pattern8=new RegExp("^\\+[0-9]{1,14}$","u");var validateSpace=function validate102(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;const _errs1=errors;let valid0=!0;const _errs2=errors;if(data&&"object"==typeof data&&!Array.isArray(data)&&void 0!==data.type&&"hotelRoom"!==data.type){const err0={};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}var _valid0=_errs2===errors;errors=_errs1,null!==vErrors&&(_errs1?vErrors.length=_errs1:vErrors=null);let ifClause0;if(_valid0){const _errs4=errors;if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0===data.features&&(data.features=[]),void 0===data.maximumOccupancy&&(data.maximumOccupancy=2),void 0===data.housekeepingStatus&&(data.housekeepingStatus="dirty"),void 0===data.serviceStatus&&(data.serviceStatus="inService"),void 0===data.name){const err1={instancePath:instancePath,schemaPath:"#/then/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if(void 0===data.type){const err2={instancePath:instancePath,schemaPath:"#/then/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}if(void 0===data.features){const err3={instancePath:instancePath,schemaPath:"#/then/required",keyword:"required",params:{missingProperty:"features"},message:"must have required property 'features'"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}if(void 0===data.maximumOccupancy){const err4={instancePath:instancePath,schemaPath:"#/then/required",keyword:"required",params:{missingProperty:"maximumOccupancy"},message:"must have required property 'maximumOccupancy'"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}if(void 0===data.housekeepingStatus){const err5={instancePath:instancePath,schemaPath:"#/then/required",keyword:"required",params:{missingProperty:"housekeepingStatus"},message:"must have required property 'housekeepingStatus'"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}if(void 0===data.serviceStatus){const err6={instancePath:instancePath,schemaPath:"#/then/required",keyword:"required",params:{missingProperty:"serviceStatus"},message:"must have required property 'serviceStatus'"};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}}valid0=_valid0=_errs4===errors,ifClause0="then"}else{const _errs5=errors;if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0===data.name){const err7={instancePath:instancePath,schemaPath:"#/else/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}if(void 0===data.type){const err8={instancePath:instancePath,schemaPath:"#/else/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}}valid0=_valid0=_errs5===errors,ifClause0="else"}if(!valid0){const err9={instancePath:instancePath,schemaPath:"#/if",keyword:"if",params:{failingKeyword:ifClause0},message:'must match "'+ifClause0+'" schema'};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0===data.type&&(data.type="space"),void 0===data.eco&&(data.eco={active:!1,allowed:!1,previousState:null}),void 0!==data.id){let data1=data.id;if("string"!=typeof data1){const err10={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err10]:vErrors.push(err10),errors++}const _errs9=errors,_errs10=errors;if("global"!==data1&&"system"!==data1){const err11={};null===vErrors?vErrors=[err11]:vErrors.push(err11),errors++}if(_errs10===errors){const err12={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err12]:vErrors.push(err12),errors++}else errors=_errs9,null!==vErrors&&(_errs9?vErrors.length=_errs9:vErrors=null)}if(void 0!==data.name){let data2=data.name;if("string"==typeof data2){if(func3(data2)<1){const err13={instancePath:instancePath+"/name",schemaPath:"#/properties/name/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};null===vErrors?vErrors=[err13]:vErrors.push(err13),errors++}}else{const err14={instancePath:instancePath+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err14]:vErrors.push(err14),errors++}}let data3=data.type;if("string"!=typeof data3){const err15={instancePath:instancePath+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err15]:vErrors.push(err15),errors++}if("space"!==data3){const err16={instancePath:instancePath+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:schema236.properties.type.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err16]:vErrors.push(err16),errors++}if(void 0!==data.discriminator){let data4=data.discriminator;if("string"!=typeof data4){const err17={instancePath:instancePath+"/discriminator",schemaPath:"#/properties/discriminator/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err17]:vErrors.push(err17),errors++}if("classRoom"!==data4&&"hotelRoom"!==data4&&"office"!==data4&&"building"!==data4&&"commonArea"!==data4&&"conferenceRoom"!==data4&&"lobby"!==data4&&"gym"!==data4&&"pool"!==data4&&"restaurant"!==data4&&"unit"!==data4){const err18={instancePath:instancePath+"/discriminator",schemaPath:"#/properties/discriminator/enum",keyword:"enum",params:{allowedValues:schema236.properties.discriminator.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err18]:vErrors.push(err18),errors++}}if(void 0!==data.driver){let data5=data.driver;if("string"!=typeof data5){const err19={instancePath:instancePath+"/driver",schemaPath:"definitions.json#/definitions/driver/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err19]:vErrors.push(err19),errors++}if("adlink"!==data5&&"aws-kinesis"!==data5&&"butler"!==data5&&"crestron"!==data5&&"dell"!==data5&&"dmp"!==data5&&"doorbird"!==data5&&"dormakaba"!==data5&&"dsc"!==data5&&"ecobee"!==data5&&"epson"!==data5&&"geovision-rs"!==data5&&"geovision-as-manager"!==data5&&"honeywell-vista"!==data5&&"igor"!==data5&&"inncom"!==data5&&"isapi"!==data5&&"kohost-k7"!==data5&&"kohost"!==data5&&"lg"!==data5&&"lg-webos"!==data5&&"lapi"!==data5&&"lirc"!==data5&&"mews"!==data5&&"mht"!==data5&&"paxton"!==data5&&"pelican-wireless"!==data5&&"power-shades"!==data5&&"rachio"!==data5&&"rebrandly"!==data5&&"rtsp"!==data5&&"salto"!==data5&&"salto-irn"!==data5&&"samsung"!==data5&&"se"!==data5&&"sendgrid"!==data5&&"sonifi"!==data5&&"stay-n-touch"!==data5&&"storable"!==data5&&"twilio"!==data5&&"unifi"!==data5&&"valcom"!==data5&&"vizio"!==data5&&"wisenet"!==data5&&"cloudflare-images"!==data5&&"cloudflare-stream"!==data5&&"insperia-privacy"!==data5){const err20={instancePath:instancePath+"/driver",schemaPath:"definitions.json#/definitions/driver/enum",keyword:"enum",params:{allowedValues:schema18.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err20]:vErrors.push(err20),errors++}}if(void 0!==data.category&&"string"!=typeof data.category){const err21={instancePath:instancePath+"/category",schemaPath:"#/properties/category/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err21]:vErrors.push(err21),errors++}if(void 0!==data.rooms){let data7=data.rooms;if(Array.isArray(data7)){const len0=data7.length;for(let i0=0;i0<len0;i0++)if("string"!=typeof data7[i0]){const err22={instancePath:instancePath+"/rooms/"+i0,schemaPath:"#/properties/rooms/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err22]:vErrors.push(err22),errors++}}else{const err23={instancePath:instancePath+"/rooms",schemaPath:"#/properties/rooms/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err23]:vErrors.push(err23),errors++}}if(void 0!==data.subGroups){let data9=data.subGroups;if(Array.isArray(data9)){const len1=data9.length;for(let i1=0;i1<len1;i1++)if("string"!=typeof data9[i1]){const err24={instancePath:instancePath+"/subGroups/"+i1,schemaPath:"#/properties/subGroups/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err24]:vErrors.push(err24),errors++}}else{const err25={instancePath:instancePath+"/subGroups",schemaPath:"#/properties/subGroups/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err25]:vErrors.push(err25),errors++}}if(void 0!==data.occupied&&"boolean"!=typeof data.occupied){const err26={instancePath:instancePath+"/occupied",schemaPath:"#/properties/occupied/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err26]:vErrors.push(err26),errors++}if(void 0!==data.inUse&&"boolean"!=typeof data.inUse){const err27={instancePath:instancePath+"/inUse",schemaPath:"#/properties/inUse/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err27]:vErrors.push(err27),errors++}let data13=data.eco;if(data13&&"object"==typeof data13&&!Array.isArray(data13)){void 0===data13.active&&(data13.active=!1),void 0===data13.allowed&&(data13.allowed=!1);for(const key0 in data13)if("active"!==key0&&"activatedAt"!==key0&&"allowed"!==key0&&"previousState"!==key0){const err28={instancePath:instancePath+"/eco",schemaPath:"#/properties/eco/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key0},message:"must NOT have additional properties"};null===vErrors?vErrors=[err28]:vErrors.push(err28),errors++}if("boolean"!=typeof data13.active){const err29={instancePath:instancePath+"/eco/active",schemaPath:"#/properties/eco/properties/active/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err29]:vErrors.push(err29),errors++}if(void 0!==data13.activatedAt){let data15=data13.activatedAt;if("string"!=typeof data15&&(!data15||"object"!=typeof data15||Array.isArray(data15))){const err30={instancePath:instancePath+"/eco/activatedAt",schemaPath:"#/properties/eco/properties/activatedAt/type",keyword:"type",params:{type:schema236.properties.eco.properties.activatedAt.type},message:"must be string,object"};null===vErrors?vErrors=[err30]:vErrors.push(err30),errors++}if("string"==typeof data15&&!formats4.validate(data15)){const err31={instancePath:instancePath+"/eco/activatedAt",schemaPath:"#/properties/eco/properties/activatedAt/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err31]:vErrors.push(err31),errors++}}if("boolean"!=typeof data13.allowed){const err32={instancePath:instancePath+"/eco/allowed",schemaPath:"#/properties/eco/properties/allowed/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err32]:vErrors.push(err32),errors++}if(void 0!==data13.previousState){let data17=data13.previousState;if((!data17||"object"!=typeof data17||Array.isArray(data17))&&null!==data17){const err33={instancePath:instancePath+"/eco/previousState",schemaPath:"#/properties/eco/properties/previousState/type",keyword:"type",params:{type:schema236.properties.eco.properties.previousState.type},message:"must be object,null"};null===vErrors?vErrors=[err33]:vErrors.push(err33),errors++}if(data17&&"object"==typeof data17&&!Array.isArray(data17)){for(const key1 in data17)if("thermostats"!==key1){const err34={instancePath:instancePath+"/eco/previousState",schemaPath:"#/properties/eco/properties/previousState/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key1},message:"must NOT have additional properties"};null===vErrors?vErrors=[err34]:vErrors.push(err34),errors++}if(void 0!==data17.thermostats){let data18=data17.thermostats;if(data18&&"object"==typeof data18&&!Array.isArray(data18)){for(const key2 in data18)if(pattern10.test(key2)){let data19=data18[key2];if(data19&&"object"==typeof data19&&!Array.isArray(data19))void 0!==data19.setpoints&&(validate103(data19.setpoints,{instancePath:instancePath+"/eco/previousState/thermostats/"+key2.replace(/~/g,"~0").replace(/\//g,"~1")+"/setpoints",parentData:data19,parentDataProperty:"setpoints",rootData:rootData})||(vErrors=null===vErrors?validate103.errors:vErrors.concat(validate103.errors),errors=vErrors.length));else{const err35={instancePath:instancePath+"/eco/previousState/thermostats/"+key2.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/eco/properties/previousState/properties/thermostats/patternProperties/.*/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err35]:vErrors.push(err35),errors++}}}else{const err36={instancePath:instancePath+"/eco/previousState/thermostats",schemaPath:"#/properties/eco/properties/previousState/properties/thermostats/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err36]:vErrors.push(err36),errors++}}}}}else{const err37={instancePath:instancePath+"/eco",schemaPath:"#/properties/eco/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err37]:vErrors.push(err37),errors++}if(void 0!==data.features){let data21=data.features;if(Array.isArray(data21)){const len2=data21.length;for(let i2=0;i2<len2;i2++){let data22=data21[i2];if("string"!=typeof data22){const err38={instancePath:instancePath+"/features/"+i2,schemaPath:"#/properties/features/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err38]:vErrors.push(err38),errors++}if("pet"!==data22){const err39={instancePath:instancePath+"/features/"+i2,schemaPath:"#/properties/features/items/enum",keyword:"enum",params:{allowedValues:schema236.properties.features.items.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err39]:vErrors.push(err39),errors++}}}else{const err40={instancePath:instancePath+"/features",schemaPath:"#/properties/features/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err40]:vErrors.push(err40),errors++}}if(void 0!==data.maximumOccupancy){let data23=data.maximumOccupancy;if("number"==typeof data23){if(data23<1||isNaN(data23)){const err41={instancePath:instancePath+"/maximumOccupancy",schemaPath:"#/properties/maximumOccupancy/minimum",keyword:"minimum",params:{comparison:">=",limit:1},message:"must be >= 1"};null===vErrors?vErrors=[err41]:vErrors.push(err41),errors++}}else{const err42={instancePath:instancePath+"/maximumOccupancy",schemaPath:"#/properties/maximumOccupancy/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err42]:vErrors.push(err42),errors++}}if(void 0!==data.housekeepingStatus){let data24=data.housekeepingStatus;if("string"!=typeof data24){const err43={instancePath:instancePath+"/housekeepingStatus",schemaPath:"#/properties/housekeepingStatus/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err43]:vErrors.push(err43),errors++}if("clean"!==data24&&"dirty"!==data24&&"inspected"!==data24&&"pickup"!==data24){const err44={instancePath:instancePath+"/housekeepingStatus",schemaPath:"#/properties/housekeepingStatus/enum",keyword:"enum",params:{allowedValues:schema236.properties.housekeepingStatus.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err44]:vErrors.push(err44),errors++}}if(void 0!==data.serviceStatus){let data25=data.serviceStatus;if("string"!=typeof data25){const err45={instancePath:instancePath+"/serviceStatus",schemaPath:"#/properties/serviceStatus/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err45]:vErrors.push(err45),errors++}if("inService"!==data25&&"outOfOrder"!==data25&&"outOfService"!==data25){const err46={instancePath:instancePath+"/serviceStatus",schemaPath:"#/properties/serviceStatus/enum",keyword:"enum",params:{allowedValues:schema236.properties.serviceStatus.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err46]:vErrors.push(err46),errors++}}if(void 0!==data.systemId&&"string"!=typeof data.systemId){const err47={instancePath:instancePath+"/systemId",schemaPath:"definitions.json#/definitions/systemId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err47]:vErrors.push(err47),errors++}}else{const err48={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err48]:vErrors.push(err48),errors++}return validate102.errors=vErrors,0===errors},schema236={$schema:"http://json-schema.org/draft-07/schema",$id:"space.json",title:"Space",type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},name:{type:"string",minLength:1},type:{type:"string",default:"space",enum:["space"]},discriminator:{type:"string",enum:["classRoom","hotelRoom","office","building","commonArea","conferenceRoom","lobby","gym","pool","restaurant","unit"]},driver:{$ref:"definitions.json#/definitions/driver"},category:{type:"string",description:"This is the category id"},rooms:{type:"array",items:{type:"string"}},subGroups:{type:"array",items:{type:"string"}},occupied:{type:"boolean"},inUse:{type:"boolean"},eco:{type:"object",additionalProperties:!1,default:{active:!1,allowed:!1,previousState:null},properties:{active:{type:"boolean",default:!1},activatedAt:{type:["string","object"],format:"date-time"},allowed:{type:"boolean",default:!1},previousState:{type:["object","null"],properties:{thermostats:{type:"object",patternProperties:{".*":{type:"object",properties:{setpoints:{$ref:"thermostat.json#/properties/setpoints"}}}}}},additionalProperties:!1}}},features:{type:"array",items:{type:"string",enum:["pet"]}},maximumOccupancy:{type:"number",minimum:1},housekeepingStatus:{type:"string",enum:["clean","dirty","inspected","pickup"]},serviceStatus:{type:"string",enum:["inService","outOfOrder","outOfService"]},systemId:{$ref:"definitions.json#/definitions/systemId"}},if:{properties:{type:{const:"hotelRoom"}}},then:{required:["name","type","features","maximumOccupancy","housekeepingStatus","serviceStatus"],properties:{features:{default:[]},maximumOccupancy:{default:2},housekeepingStatus:{default:"dirty"},serviceStatus:{default:"inService"}}},else:{required:["name","type"]}},pattern10=new RegExp(".*","u");function validate103(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){for(const key0 in data)if("cool"!==key0&&"heat"!==key0&&"auto"!==key0){const err0={instancePath:instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key0},message:"must NOT have additional properties"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}void 0!==data.cool&&(validate75(data.cool,{instancePath:instancePath+"/cool",parentData:data,parentDataProperty:"cool",rootData:rootData})||(vErrors=null===vErrors?validate75.errors:vErrors.concat(validate75.errors),errors=vErrors.length)),void 0!==data.heat&&(validate75(data.heat,{instancePath:instancePath+"/heat",parentData:data,parentDataProperty:"heat",rootData:rootData})||(vErrors=null===vErrors?validate75.errors:vErrors.concat(validate75.errors),errors=vErrors.length)),void 0!==data.auto&&(validate75(data.auto,{instancePath:instancePath+"/auto",parentData:data,parentDataProperty:"auto",rootData:rootData})||(vErrors=null===vErrors?validate75.errors:vErrors.concat(validate75.errors),errors=vErrors.length))}else{const err1={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}return validate103.errors=vErrors,0===errors}var validateSwitch=validate68,validateSystemUser=function validate108(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0===data.type&&(data.type="systemUser"),void 0===data.firstName){const err0={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"firstName"},message:"must have required property 'firstName'"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(void 0===data.lastName){const err1={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"lastName"},message:"must have required property 'lastName'"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if(void 0!==data.id){let data0=data.id;if("string"!=typeof data0){const err2={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}const _errs4=errors,_errs5=errors;if("global"!==data0&&"system"!==data0){const err3={};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}if(_errs5===errors){const err4={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}else errors=_errs4,null!==vErrors&&(_errs4?vErrors.length=_errs4:vErrors=null)}let data1=data.type;if("string"!=typeof data1){const err5={instancePath:instancePath+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}if("systemUser"!==data1){const err6={instancePath:instancePath+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:schema241.properties.type.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}if(void 0!==data.driver){let data2=data.driver;if("string"!=typeof data2){const err7={instancePath:instancePath+"/driver",schemaPath:"definitions.json#/definitions/driver/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}if("adlink"!==data2&&"aws-kinesis"!==data2&&"butler"!==data2&&"crestron"!==data2&&"dell"!==data2&&"dmp"!==data2&&"doorbird"!==data2&&"dormakaba"!==data2&&"dsc"!==data2&&"ecobee"!==data2&&"epson"!==data2&&"geovision-rs"!==data2&&"geovision-as-manager"!==data2&&"honeywell-vista"!==data2&&"igor"!==data2&&"inncom"!==data2&&"isapi"!==data2&&"kohost-k7"!==data2&&"kohost"!==data2&&"lg"!==data2&&"lg-webos"!==data2&&"lapi"!==data2&&"lirc"!==data2&&"mews"!==data2&&"mht"!==data2&&"paxton"!==data2&&"pelican-wireless"!==data2&&"power-shades"!==data2&&"rachio"!==data2&&"rebrandly"!==data2&&"rtsp"!==data2&&"salto"!==data2&&"salto-irn"!==data2&&"samsung"!==data2&&"se"!==data2&&"sendgrid"!==data2&&"sonifi"!==data2&&"stay-n-touch"!==data2&&"storable"!==data2&&"twilio"!==data2&&"unifi"!==data2&&"valcom"!==data2&&"vizio"!==data2&&"wisenet"!==data2&&"cloudflare-images"!==data2&&"cloudflare-stream"!==data2&&"insperia-privacy"!==data2){const err8={instancePath:instancePath+"/driver",schemaPath:"definitions.json#/definitions/driver/enum",keyword:"enum",params:{allowedValues:schema18.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}}if(void 0!==data.firstName&&"string"!=typeof data.firstName){const err9={instancePath:instancePath+"/firstName",schemaPath:"#/properties/firstName/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}if(void 0!==data.lastName&&"string"!=typeof data.lastName){const err10={instancePath:instancePath+"/lastName",schemaPath:"#/properties/lastName/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err10]:vErrors.push(err10),errors++}if(void 0!==data.phone){let data5=data.phone;if("string"!=typeof data5&&null!==data5){const err11={instancePath:instancePath+"/phone",schemaPath:"#/properties/phone/type",keyword:"type",params:{type:schema241.properties.phone.type},message:"must be string,null"};null===vErrors?vErrors=[err11]:vErrors.push(err11),errors++}if("string"==typeof data5&&!pattern8.test(data5)){const err12={instancePath:instancePath+"/phone",schemaPath:"#/properties/phone/pattern",keyword:"pattern",params:{pattern:"^\\+[0-9]{1,14}$"},message:'must match pattern "^\\+[0-9]{1,14}$"'};null===vErrors?vErrors=[err12]:vErrors.push(err12),errors++}}if(void 0!==data.email){let data6=data.email;if("string"!=typeof data6&&null!==data6){const err13={instancePath:instancePath+"/email",schemaPath:"#/properties/email/type",keyword:"type",params:{type:schema241.properties.email.type},message:"must be string,null"};null===vErrors?vErrors=[err13]:vErrors.push(err13),errors++}if("string"==typeof data6&&!formats88.test(data6)){const err14={instancePath:instancePath+"/email",schemaPath:"#/properties/email/format",keyword:"format",params:{format:"email"},message:'must match format "email"'};null===vErrors?vErrors=[err14]:vErrors.push(err14),errors++}}if(void 0!==data.address){let data7=data.address;if(data7&&"object"==typeof data7&&!Array.isArray(data7)){if(void 0!==data7.id&&"string"!=typeof data7.id){const err15={instancePath:instancePath+"/address/id",schemaPath:"definitions.json#/definitions/address/properties/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err15]:vErrors.push(err15),errors++}if(void 0!==data7.line1&&"string"!=typeof data7.line1){const err16={instancePath:instancePath+"/address/line1",schemaPath:"definitions.json#/definitions/address/properties/line1/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err16]:vErrors.push(err16),errors++}if(void 0!==data7.line2&&"string"!=typeof data7.line2){const err17={instancePath:instancePath+"/address/line2",schemaPath:"definitions.json#/definitions/address/properties/line2/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err17]:vErrors.push(err17),errors++}if(void 0!==data7.line3&&"string"!=typeof data7.line3){const err18={instancePath:instancePath+"/address/line3",schemaPath:"definitions.json#/definitions/address/properties/line3/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err18]:vErrors.push(err18),errors++}if(void 0!==data7.city&&"string"!=typeof data7.city){const err19={instancePath:instancePath+"/address/city",schemaPath:"definitions.json#/definitions/address/properties/city/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err19]:vErrors.push(err19),errors++}if(void 0!==data7.state&&"string"!=typeof data7.state){const err20={instancePath:instancePath+"/address/state",schemaPath:"definitions.json#/definitions/address/properties/state/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err20]:vErrors.push(err20),errors++}if(void 0!==data7.postalCode&&"string"!=typeof data7.postalCode){const err21={instancePath:instancePath+"/address/postalCode",schemaPath:"definitions.json#/definitions/address/properties/postalCode/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err21]:vErrors.push(err21),errors++}if(void 0!==data7.countryCode){let data15=data7.countryCode;if("string"==typeof data15){if(func3(data15)>2){const err22={instancePath:instancePath+"/address/countryCode",schemaPath:"definitions.json#/definitions/address/properties/countryCode/maxLength",keyword:"maxLength",params:{limit:2},message:"must NOT have more than 2 characters"};null===vErrors?vErrors=[err22]:vErrors.push(err22),errors++}if(func3(data15)<2){const err23={instancePath:instancePath+"/address/countryCode",schemaPath:"definitions.json#/definitions/address/properties/countryCode/minLength",keyword:"minLength",params:{limit:2},message:"must NOT have fewer than 2 characters"};null===vErrors?vErrors=[err23]:vErrors.push(err23),errors++}}else{const err24={instancePath:instancePath+"/address/countryCode",schemaPath:"definitions.json#/definitions/address/properties/countryCode/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err24]:vErrors.push(err24),errors++}}}else{const err25={instancePath:instancePath+"/address",schemaPath:"definitions.json#/definitions/address/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err25]:vErrors.push(err25),errors++}}if(void 0!==data.photo&&"string"!=typeof data.photo){const err26={instancePath:instancePath+"/photo",schemaPath:"#/properties/photo/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err26]:vErrors.push(err26),errors++}if(void 0!==data.jobTitle&&"string"!=typeof data.jobTitle){const err27={instancePath:instancePath+"/jobTitle",schemaPath:"#/properties/jobTitle/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err27]:vErrors.push(err27),errors++}if(void 0!==data.dob&&"string"!=typeof data.dob){const err28={instancePath:instancePath+"/dob",schemaPath:"#/properties/dob/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err28]:vErrors.push(err28),errors++}if(void 0!==data.gender){let data19=data.gender;if("string"!=typeof data19){const err29={instancePath:instancePath+"/gender",schemaPath:"#/properties/gender/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err29]:vErrors.push(err29),errors++}if("male"!==data19&&"female"!==data19){const err30={instancePath:instancePath+"/gender",schemaPath:"#/properties/gender/enum",keyword:"enum",params:{allowedValues:schema241.properties.gender.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err30]:vErrors.push(err30),errors++}}if(void 0!==data.roles){let data20=data.roles;if(Array.isArray(data20)){const len0=data20.length;for(let i0=0;i0<len0;i0++){let data21=data20[i0];if("string"!=typeof data21){const err31={instancePath:instancePath+"/roles/"+i0,schemaPath:"#/properties/roles/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err31]:vErrors.push(err31),errors++}if("Guest"!==data21&&"User"!==data21&&"Manager"!==data21&&"Maintenance"!==data21&&"Administrator"!==data21&&"SuperAdmin"!==data21){const err32={instancePath:instancePath+"/roles/"+i0,schemaPath:"#/properties/roles/items/enum",keyword:"enum",params:{allowedValues:schema241.properties.roles.items.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err32]:vErrors.push(err32),errors++}}}else{const err33={instancePath:instancePath+"/roles",schemaPath:"#/properties/roles/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err33]:vErrors.push(err33),errors++}}if(void 0!==data.nationality){let data22=data.nationality;if("string"==typeof data22){if(func3(data22)>2){const err34={instancePath:instancePath+"/nationality",schemaPath:"#/properties/nationality/maxLength",keyword:"maxLength",params:{limit:2},message:"must NOT have more than 2 characters"};null===vErrors?vErrors=[err34]:vErrors.push(err34),errors++}if(func3(data22)<2){const err35={instancePath:instancePath+"/nationality",schemaPath:"#/properties/nationality/minLength",keyword:"minLength",params:{limit:2},message:"must NOT have fewer than 2 characters"};null===vErrors?vErrors=[err35]:vErrors.push(err35),errors++}}else{const err36={instancePath:instancePath+"/nationality",schemaPath:"#/properties/nationality/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err36]:vErrors.push(err36),errors++}}if(void 0!==data.notes){let data23=data.notes;if(Array.isArray(data23)){const len1=data23.length;for(let i1=0;i1<len1;i1++)if("string"!=typeof data23[i1]){const err37={instancePath:instancePath+"/notes/"+i1,schemaPath:"#/properties/notes/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err37]:vErrors.push(err37),errors++}}else{const err38={instancePath:instancePath+"/notes",schemaPath:"#/properties/notes/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err38]:vErrors.push(err38),errors++}}if(void 0!==data.files){let data25=data.files;if(Array.isArray(data25)){const len2=data25.length;for(let i2=0;i2<len2;i2++)validate15(data25[i2],{instancePath:instancePath+"/files/"+i2,parentData:data25,parentDataProperty:i2,rootData:rootData})||(vErrors=null===vErrors?validate15.errors:vErrors.concat(validate15.errors),errors=vErrors.length)}else{const err39={instancePath:instancePath+"/files",schemaPath:"#/properties/files/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err39]:vErrors.push(err39),errors++}}if(void 0!==data.identifications){let data27=data.identifications;if(Array.isArray(data27)){const len3=data27.length;for(let i3=0;i3<len3;i3++)validate37(data27[i3],{instancePath:instancePath+"/identifications/"+i3,parentData:data27,parentDataProperty:i3,rootData:rootData})||(vErrors=null===vErrors?validate37.errors:vErrors.concat(validate37.errors),errors=vErrors.length)}else{const err40={instancePath:instancePath+"/identifications",schemaPath:"#/properties/identifications/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err40]:vErrors.push(err40),errors++}}if(void 0!==data.payments){let data29=data.payments;if(Array.isArray(data29)){const len4=data29.length;for(let i4=0;i4<len4;i4++)validate57(data29[i4],{instancePath:instancePath+"/payments/"+i4,parentData:data29,parentDataProperty:i4,rootData:rootData})||(vErrors=null===vErrors?validate57.errors:vErrors.concat(validate57.errors),errors=vErrors.length)}else{const err41={instancePath:instancePath+"/payments",schemaPath:"#/properties/payments/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err41]:vErrors.push(err41),errors++}}if(void 0!==data.revenue&&(validate112(data.revenue,{instancePath:instancePath+"/revenue",parentData:data,parentDataProperty:"revenue",rootData:rootData})||(vErrors=null===vErrors?validate112.errors:vErrors.concat(validate112.errors),errors=vErrors.length)),void 0!==data.createdAt){let data32=data.createdAt;if("string"!=typeof data32&&(!data32||"object"!=typeof data32||Array.isArray(data32))){const err42={instancePath:instancePath+"/createdAt",schemaPath:"definitions.json#/definitions/createdAt/type",keyword:"type",params:{type:schema102.type},message:"must be string,object"};null===vErrors?vErrors=[err42]:vErrors.push(err42),errors++}if("string"==typeof data32&&!formats4.validate(data32)){const err43={instancePath:instancePath+"/createdAt",schemaPath:"definitions.json#/definitions/createdAt/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err43]:vErrors.push(err43),errors++}}if(void 0!==data.updatedAt){let data33=data.updatedAt;if("string"!=typeof data33&&(!data33||"object"!=typeof data33||Array.isArray(data33))){const err44={instancePath:instancePath+"/updatedAt",schemaPath:"definitions.json#/definitions/updatedAt/type",keyword:"type",params:{type:schema150.type},message:"must be string,object"};null===vErrors?vErrors=[err44]:vErrors.push(err44),errors++}if("string"==typeof data33&&!formats4.validate(data33)){const err45={instancePath:instancePath+"/updatedAt",schemaPath:"definitions.json#/definitions/updatedAt/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err45]:vErrors.push(err45),errors++}}if(void 0!==data.systemId&&"string"!=typeof data.systemId){const err46={instancePath:instancePath+"/systemId",schemaPath:"definitions.json#/definitions/systemId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err46]:vErrors.push(err46),errors++}}else{const err47={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err47]:vErrors.push(err47),errors++}return validate108.errors=vErrors,0===errors},schema241={$schema:"http://json-schema.org/draft-07/schema",$id:"systemUser.json",title:"System User",description:"A system user is a user that originated from an external 3rd party system.",type:"object",required:["firstName","lastName"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",default:"systemUser",enum:["systemUser"]},driver:{$ref:"definitions.json#/definitions/driver"},firstName:{type:"string"},lastName:{type:"string"},phone:{type:["string","null"],pattern:"^\\+[0-9]{1,14}$"},email:{type:["string","null"],format:"email"},address:{$ref:"definitions.json#/definitions/address"},photo:{type:"string"},jobTitle:{type:"string"},dob:{type:"string"},gender:{type:"string",enum:["male","female"]},roles:{type:"array",items:{type:"string",enum:["Guest","User","Manager","Maintenance","Administrator","SuperAdmin"]}},nationality:{type:"string",minLength:2,maxLength:2},notes:{type:"array",items:{type:"string"}},files:{type:"array",items:{$ref:"mediaFile.json#"}},identifications:{type:"array",items:{$ref:"identification.json#"}},payments:{type:"array",items:{$ref:"payment.json#"}},revenue:{$ref:"definitions.json#/definitions/revenue"},createdAt:{$ref:"definitions.json#/definitions/createdAt"},updatedAt:{$ref:"definitions.json#/definitions/updatedAt"},systemId:{$ref:"definitions.json#/definitions/systemId"}}},formats88=/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i;function validate112(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(Array.isArray(data)){const len0=data.length;for(let i0=0;i0<len0;i0++){let data0=data[i0];if(data0&&"object"==typeof data0&&!Array.isArray(data0)){if(void 0!==data0.id){let data1=data0.id;if("string"!=typeof data1){const err0={instancePath:instancePath+"/"+i0+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}const _errs6=errors,_errs7=errors;if("global"!==data1&&"system"!==data1){const err1={};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if(_errs7===errors){const err2={instancePath:instancePath+"/"+i0+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}else errors=_errs6,null!==vErrors&&(_errs6?vErrors.length=_errs6:vErrors=null)}if(void 0!==data0.name&&"string"!=typeof data0.name){const err3={instancePath:instancePath+"/"+i0+"/name",schemaPath:"#/items/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}if(void 0!==data0.date){let data3=data0.date;if("string"==typeof data3){if(!formats4.validate(data3)){const err4={instancePath:instancePath+"/"+i0+"/date",schemaPath:"#/items/properties/date/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}}else{const err5={instancePath:instancePath+"/"+i0+"/date",schemaPath:"#/items/properties/date/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}}if(void 0!==data0.price&&"number"!=typeof data0.price){const err6={instancePath:instancePath+"/"+i0+"/price",schemaPath:"#/items/properties/price/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}if(void 0!==data0.tax){let data5=data0.tax;if("number"!=typeof data5&&null!==data5){const err7={instancePath:instancePath+"/"+i0+"/tax",schemaPath:"#/items/properties/tax/type",keyword:"type",params:{type:schema166.items.properties.tax.type},message:"must be number,null"};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}}}else{const err8={instancePath:instancePath+"/"+i0,schemaPath:"#/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}}}else{const err9={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}return validate112.errors=vErrors,0===errors}var validateThermostat=validate72,validateTicket=function validate39(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0===data.type&&(data.type="ticket"),void 0===data.conversation&&(data.conversation=[]),void 0===data.status&&(data.status="open"),void 0===data.priority&&(data.priority="normal"),void 0===data.tags&&(data.tags=[]),void 0===data.id){const err0={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(void 0===data.conversation){const err1={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"conversation"},message:"must have required property 'conversation'"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if(void 0===data.requester){const err2={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"requester"},message:"must have required property 'requester'"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}if(void 0===data.status){const err3={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"status"},message:"must have required property 'status'"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}if(void 0===data.tags){const err4={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"tags"},message:"must have required property 'tags'"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}if(void 0===data.createdAt){const err5={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"createdAt"},message:"must have required property 'createdAt'"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}if(void 0===data.updatedAt){const err6={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"updatedAt"},message:"must have required property 'updatedAt'"};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}for(const key0 in data)if(!func5.call(schema100.properties,key0)){const err7={instancePath:instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key0},message:"must NOT have additional properties"};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}if(void 0!==data.id){let data0=data.id;if("string"!=typeof data0){const err8={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}const _errs5=errors,_errs6=errors;if("global"!==data0&&"system"!==data0){const err9={};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}if(_errs6===errors){const err10={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err10]:vErrors.push(err10),errors++}else errors=_errs5,null!==vErrors&&(_errs5?vErrors.length=_errs5:vErrors=null)}let data1=data.type;if("string"!=typeof data1){const err11={instancePath:instancePath+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err11]:vErrors.push(err11),errors++}if("ticket"!==data1){const err12={instancePath:instancePath+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:schema100.properties.type.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err12]:vErrors.push(err12),errors++}if(void 0!==data.number&&"string"!=typeof data.number){const err13={instancePath:instancePath+"/number",schemaPath:"#/properties/number/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err13]:vErrors.push(err13),errors++}if(void 0!==data.issueId&&"string"!=typeof data.issueId){const err14={instancePath:instancePath+"/issueId",schemaPath:"#/properties/issueId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err14]:vErrors.push(err14),errors++}let data4=data.conversation;if(Array.isArray(data4)){const len0=data4.length;for(let i0=0;i0<len0;i0++){let data5=data4[i0];const _errs17=errors;let valid5=!1;const _errs18=errors;if(data5&&"object"==typeof data5&&!Array.isArray(data5)){if(void 0===data5.id){const err15={instancePath:instancePath+"/conversation/"+i0,schemaPath:"#/properties/conversation/items/anyOf/0/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};null===vErrors?vErrors=[err15]:vErrors.push(err15),errors++}if(void 0===data5.userId){const err16={instancePath:instancePath+"/conversation/"+i0,schemaPath:"#/properties/conversation/items/anyOf/0/required",keyword:"required",params:{missingProperty:"userId"},message:"must have required property 'userId'"};null===vErrors?vErrors=[err16]:vErrors.push(err16),errors++}if(void 0===data5.timestamp){const err17={instancePath:instancePath+"/conversation/"+i0,schemaPath:"#/properties/conversation/items/anyOf/0/required",keyword:"required",params:{missingProperty:"timestamp"},message:"must have required property 'timestamp'"};null===vErrors?vErrors=[err17]:vErrors.push(err17),errors++}if(void 0===data5.body){const err18={instancePath:instancePath+"/conversation/"+i0,schemaPath:"#/properties/conversation/items/anyOf/0/required",keyword:"required",params:{missingProperty:"body"},message:"must have required property 'body'"};null===vErrors?vErrors=[err18]:vErrors.push(err18),errors++}}var _valid0=_errs18===errors;if(valid5=valid5||_valid0,!valid5){const _errs19=errors;if(data5&&"object"==typeof data5&&!Array.isArray(data5)){if(void 0===data5.id){const err19={instancePath:instancePath+"/conversation/"+i0,schemaPath:"#/properties/conversation/items/anyOf/1/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};null===vErrors?vErrors=[err19]:vErrors.push(err19),errors++}if(void 0===data5.systemId){const err20={instancePath:instancePath+"/conversation/"+i0,schemaPath:"#/properties/conversation/items/anyOf/1/required",keyword:"required",params:{missingProperty:"systemId"},message:"must have required property 'systemId'"};null===vErrors?vErrors=[err20]:vErrors.push(err20),errors++}if(void 0===data5.timestamp){const err21={instancePath:instancePath+"/conversation/"+i0,schemaPath:"#/properties/conversation/items/anyOf/1/required",keyword:"required",params:{missingProperty:"timestamp"},message:"must have required property 'timestamp'"};null===vErrors?vErrors=[err21]:vErrors.push(err21),errors++}if(void 0===data5.body){const err22={instancePath:instancePath+"/conversation/"+i0,schemaPath:"#/properties/conversation/items/anyOf/1/required",keyword:"required",params:{missingProperty:"body"},message:"must have required property 'body'"};null===vErrors?vErrors=[err22]:vErrors.push(err22),errors++}}_valid0=_errs19===errors;if(valid5=valid5||_valid0,!valid5){const _errs20=errors;if(data5&&"object"==typeof data5&&!Array.isArray(data5)){if(void 0===data5.id){const err23={instancePath:instancePath+"/conversation/"+i0,schemaPath:"#/properties/conversation/items/anyOf/2/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};null===vErrors?vErrors=[err23]:vErrors.push(err23),errors++}if(void 0===data5.vendorId){const err24={instancePath:instancePath+"/conversation/"+i0,schemaPath:"#/properties/conversation/items/anyOf/2/required",keyword:"required",params:{missingProperty:"vendorId"},message:"must have required property 'vendorId'"};null===vErrors?vErrors=[err24]:vErrors.push(err24),errors++}if(void 0===data5.timestamp){const err25={instancePath:instancePath+"/conversation/"+i0,schemaPath:"#/properties/conversation/items/anyOf/2/required",keyword:"required",params:{missingProperty:"timestamp"},message:"must have required property 'timestamp'"};null===vErrors?vErrors=[err25]:vErrors.push(err25),errors++}if(void 0===data5.body){const err26={instancePath:instancePath+"/conversation/"+i0,schemaPath:"#/properties/conversation/items/anyOf/2/required",keyword:"required",params:{missingProperty:"body"},message:"must have required property 'body'"};null===vErrors?vErrors=[err26]:vErrors.push(err26),errors++}}_valid0=_errs20===errors;valid5=valid5||_valid0}}if(valid5)errors=_errs17,null!==vErrors&&(_errs17?vErrors.length=_errs17:vErrors=null);else{const err27={instancePath:instancePath+"/conversation/"+i0,schemaPath:"#/properties/conversation/items/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};null===vErrors?vErrors=[err27]:vErrors.push(err27),errors++}if(data5&&"object"==typeof data5&&!Array.isArray(data5)){void 0===data5.readBy&&(data5.readBy=[]);for(const key1 in data5)if(!func5.call(schema100.properties.conversation.items.properties,key1)){const err28={instancePath:instancePath+"/conversation/"+i0,schemaPath:"#/properties/conversation/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key1},message:"must NOT have additional properties"};null===vErrors?vErrors=[err28]:vErrors.push(err28),errors++}if(void 0!==data5.id&&"string"!=typeof data5.id){const err29={instancePath:instancePath+"/conversation/"+i0+"/id",schemaPath:"#/properties/conversation/items/properties/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err29]:vErrors.push(err29),errors++}if(void 0!==data5.userId&&"string"!=typeof data5.userId){const err30={instancePath:instancePath+"/conversation/"+i0+"/userId",schemaPath:"#/properties/conversation/items/properties/userId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err30]:vErrors.push(err30),errors++}if(void 0!==data5.userName&&"string"!=typeof data5.userName){const err31={instancePath:instancePath+"/conversation/"+i0+"/userName",schemaPath:"#/properties/conversation/items/properties/userName/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err31]:vErrors.push(err31),errors++}if(void 0!==data5.vendorId&&"string"!=typeof data5.vendorId){const err32={instancePath:instancePath+"/conversation/"+i0+"/vendorId",schemaPath:"#/properties/conversation/items/properties/vendorId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err32]:vErrors.push(err32),errors++}if(void 0!==data5.vendorName&&"string"!=typeof data5.vendorName){const err33={instancePath:instancePath+"/conversation/"+i0+"/vendorName",schemaPath:"#/properties/conversation/items/properties/vendorName/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err33]:vErrors.push(err33),errors++}if(void 0!==data5.systemId&&"string"!=typeof data5.systemId){const err34={instancePath:instancePath+"/conversation/"+i0+"/systemId",schemaPath:"#/properties/conversation/items/properties/systemId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err34]:vErrors.push(err34),errors++}if(void 0!==data5.systemName&&"string"!=typeof data5.systemName){const err35={instancePath:instancePath+"/conversation/"+i0+"/systemName",schemaPath:"#/properties/conversation/items/properties/systemName/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err35]:vErrors.push(err35),errors++}if(void 0!==data5.timestamp){let data13=data5.timestamp;if("string"!=typeof data13&&(!data13||"object"!=typeof data13||Array.isArray(data13))){const err36={instancePath:instancePath+"/conversation/"+i0+"/timestamp",schemaPath:"definitions.json#/definitions/createdAt/type",keyword:"type",params:{type:schema102.type},message:"must be string,object"};null===vErrors?vErrors=[err36]:vErrors.push(err36),errors++}if("string"==typeof data13&&!formats4.validate(data13)){const err37={instancePath:instancePath+"/conversation/"+i0+"/timestamp",schemaPath:"definitions.json#/definitions/createdAt/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err37]:vErrors.push(err37),errors++}}if(void 0!==data5.body&&"string"!=typeof data5.body){const err38={instancePath:instancePath+"/conversation/"+i0+"/body",schemaPath:"#/properties/conversation/items/properties/body/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err38]:vErrors.push(err38),errors++}let data15=data5.readBy;if(Array.isArray(data15)){const len1=data15.length;for(let i1=0;i1<len1;i1++)if("string"!=typeof data15[i1]){const err39={instancePath:instancePath+"/conversation/"+i0+"/readBy/"+i1,schemaPath:"#/properties/conversation/items/properties/readBy/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err39]:vErrors.push(err39),errors++}}else{const err40={instancePath:instancePath+"/conversation/"+i0+"/readBy",schemaPath:"#/properties/conversation/items/properties/readBy/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err40]:vErrors.push(err40),errors++}if(void 0!==data5.media){let data17=data5.media;const _errs46=errors;let valid10=!1;const _errs47=errors;validate15(data17,{instancePath:instancePath+"/conversation/"+i0+"/media",parentData:data5,parentDataProperty:"media",rootData:rootData})||(vErrors=null===vErrors?validate15.errors:vErrors.concat(validate15.errors),errors=vErrors.length);var _valid1=_errs47===errors;if(valid10=valid10||_valid1,!valid10){const _errs48=errors;if(null!==data17){const err41={instancePath:instancePath+"/conversation/"+i0+"/media",schemaPath:"#/properties/conversation/items/properties/media/anyOf/1/type",keyword:"type",params:{type:"null"},message:"must be null"};null===vErrors?vErrors=[err41]:vErrors.push(err41),errors++}_valid1=_errs48===errors;valid10=valid10||_valid1}if(valid10)errors=_errs46,null!==vErrors&&(_errs46?vErrors.length=_errs46:vErrors=null);else{const err42={instancePath:instancePath+"/conversation/"+i0+"/media",schemaPath:"#/properties/conversation/items/properties/media/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};null===vErrors?vErrors=[err42]:vErrors.push(err42),errors++}}}else{const err43={instancePath:instancePath+"/conversation/"+i0,schemaPath:"#/properties/conversation/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err43]:vErrors.push(err43),errors++}}}else{const err44={instancePath:instancePath+"/conversation",schemaPath:"#/properties/conversation/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err44]:vErrors.push(err44),errors++}if(void 0!==data.openedBy){let data18=data.openedBy;if(data18&&"object"==typeof data18&&!Array.isArray(data18)){if(void 0!==data18.userId&&"string"!=typeof data18.userId){const err45={instancePath:instancePath+"/openedBy/userId",schemaPath:"#/properties/openedBy/properties/userId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err45]:vErrors.push(err45),errors++}if(void 0!==data18.systemId&&"string"!=typeof data18.systemId){const err46={instancePath:instancePath+"/openedBy/systemId",schemaPath:"#/properties/openedBy/properties/systemId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err46]:vErrors.push(err46),errors++}}else{const err47={instancePath:instancePath+"/openedBy",schemaPath:"#/properties/openedBy/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err47]:vErrors.push(err47),errors++}}if(void 0!==data.requester){let data21=data.requester;if(data21&&"object"==typeof data21&&!Array.isArray(data21)){if(void 0!==data21.systemId&&"string"!=typeof data21.systemId){const err48={instancePath:instancePath+"/requester/systemId",schemaPath:"#/properties/requester/properties/systemId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err48]:vErrors.push(err48),errors++}if(void 0!==data21.systemName&&"string"!=typeof data21.systemName){const err49={instancePath:instancePath+"/requester/systemName",schemaPath:"#/properties/requester/properties/systemName/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err49]:vErrors.push(err49),errors++}if(void 0!==data21.systemPhoto){let data24=data21.systemPhoto;const _errs63=errors;let valid13=!1;const _errs64=errors;validate15(data24,{instancePath:instancePath+"/requester/systemPhoto",parentData:data21,parentDataProperty:"systemPhoto",rootData:rootData})||(vErrors=null===vErrors?validate15.errors:vErrors.concat(validate15.errors),errors=vErrors.length);var _valid2=_errs64===errors;if(valid13=valid13||_valid2,!valid13){const _errs65=errors;if(null!==data24){const err50={instancePath:instancePath+"/requester/systemPhoto",schemaPath:"#/properties/requester/properties/systemPhoto/anyOf/1/type",keyword:"type",params:{type:"null"},message:"must be null"};null===vErrors?vErrors=[err50]:vErrors.push(err50),errors++}_valid2=_errs65===errors;if(valid13=valid13||_valid2,!valid13){const _errs67=errors;if("string"!=typeof data24){const err51={instancePath:instancePath+"/requester/systemPhoto",schemaPath:"#/properties/requester/properties/systemPhoto/anyOf/2/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err51]:vErrors.push(err51),errors++}_valid2=_errs67===errors;valid13=valid13||_valid2}}if(valid13)errors=_errs63,null!==vErrors&&(_errs63?vErrors.length=_errs63:vErrors=null);else{const err52={instancePath:instancePath+"/requester/systemPhoto",schemaPath:"#/properties/requester/properties/systemPhoto/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};null===vErrors?vErrors=[err52]:vErrors.push(err52),errors++}}if(void 0!==data21.userId&&"string"!=typeof data21.userId){const err53={instancePath:instancePath+"/requester/userId",schemaPath:"#/properties/requester/properties/userId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err53]:vErrors.push(err53),errors++}if(void 0!==data21.userName&&"string"!=typeof data21.userName){const err54={instancePath:instancePath+"/requester/userName",schemaPath:"#/properties/requester/properties/userName/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err54]:vErrors.push(err54),errors++}if(void 0!==data21.userPhoto){let data27=data21.userPhoto;const _errs74=errors;let valid14=!1;const _errs75=errors;validate15(data27,{instancePath:instancePath+"/requester/userPhoto",parentData:data21,parentDataProperty:"userPhoto",rootData:rootData})||(vErrors=null===vErrors?validate15.errors:vErrors.concat(validate15.errors),errors=vErrors.length);var _valid3=_errs75===errors;if(valid14=valid14||_valid3,!valid14){const _errs76=errors;if(null!==data27){const err55={instancePath:instancePath+"/requester/userPhoto",schemaPath:"#/properties/requester/properties/userPhoto/anyOf/1/type",keyword:"type",params:{type:"null"},message:"must be null"};null===vErrors?vErrors=[err55]:vErrors.push(err55),errors++}_valid3=_errs76===errors;if(valid14=valid14||_valid3,!valid14){const _errs78=errors;if("string"!=typeof data27){const err56={instancePath:instancePath+"/requester/userPhoto",schemaPath:"#/properties/requester/properties/userPhoto/anyOf/2/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err56]:vErrors.push(err56),errors++}_valid3=_errs78===errors;valid14=valid14||_valid3}}if(valid14)errors=_errs74,null!==vErrors&&(_errs74?vErrors.length=_errs74:vErrors=null);else{const err57={instancePath:instancePath+"/requester/userPhoto",schemaPath:"#/properties/requester/properties/userPhoto/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};null===vErrors?vErrors=[err57]:vErrors.push(err57),errors++}}if(void 0!==data21.deviceId&&"string"!=typeof data21.deviceId){const err58={instancePath:instancePath+"/requester/deviceId",schemaPath:"#/properties/requester/properties/deviceId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err58]:vErrors.push(err58),errors++}if(void 0!==data21.roomId&&"string"!=typeof data21.roomId){const err59={instancePath:instancePath+"/requester/roomId",schemaPath:"#/properties/requester/properties/roomId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err59]:vErrors.push(err59),errors++}if(void 0!==data21.reservationId&&"string"!=typeof data21.reservationId){const err60={instancePath:instancePath+"/requester/reservationId",schemaPath:"#/properties/requester/properties/reservationId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err60]:vErrors.push(err60),errors++}if(void 0!==data21.spaceId&&"string"!=typeof data21.spaceId){const err61={instancePath:instancePath+"/requester/spaceId",schemaPath:"#/properties/requester/properties/spaceId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err61]:vErrors.push(err61),errors++}if(void 0!==data21.spaceName&&"string"!=typeof data21.spaceName){const err62={instancePath:instancePath+"/requester/spaceName",schemaPath:"#/properties/requester/properties/spaceName/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err62]:vErrors.push(err62),errors++}}else{const err63={instancePath:instancePath+"/requester",schemaPath:"#/properties/requester/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err63]:vErrors.push(err63),errors++}}if(void 0!==data.assignedTo){let data33=data.assignedTo;if(data33&&"object"==typeof data33&&!Array.isArray(data33)){if(void 0!==data33.userId&&"string"!=typeof data33.userId){const err64={instancePath:instancePath+"/assignedTo/userId",schemaPath:"#/properties/assignedTo/properties/userId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err64]:vErrors.push(err64),errors++}if(void 0!==data33.userName&&"string"!=typeof data33.userName){const err65={instancePath:instancePath+"/assignedTo/userName",schemaPath:"#/properties/assignedTo/properties/userName/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err65]:vErrors.push(err65),errors++}if(void 0!==data33.userPhoto){let data36=data33.userPhoto;const _errs97=errors;let valid16=!1;const _errs98=errors;validate15(data36,{instancePath:instancePath+"/assignedTo/userPhoto",parentData:data33,parentDataProperty:"userPhoto",rootData:rootData})||(vErrors=null===vErrors?validate15.errors:vErrors.concat(validate15.errors),errors=vErrors.length);var _valid4=_errs98===errors;if(valid16=valid16||_valid4,!valid16){const _errs99=errors;if(null!==data36){const err66={instancePath:instancePath+"/assignedTo/userPhoto",schemaPath:"#/properties/assignedTo/properties/userPhoto/anyOf/1/type",keyword:"type",params:{type:"null"},message:"must be null"};null===vErrors?vErrors=[err66]:vErrors.push(err66),errors++}_valid4=_errs99===errors;if(valid16=valid16||_valid4,!valid16){const _errs101=errors;if("string"!=typeof data36){const err67={instancePath:instancePath+"/assignedTo/userPhoto",schemaPath:"#/properties/assignedTo/properties/userPhoto/anyOf/2/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err67]:vErrors.push(err67),errors++}_valid4=_errs101===errors;valid16=valid16||_valid4}}if(valid16)errors=_errs97,null!==vErrors&&(_errs97?vErrors.length=_errs97:vErrors=null);else{const err68={instancePath:instancePath+"/assignedTo/userPhoto",schemaPath:"#/properties/assignedTo/properties/userPhoto/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};null===vErrors?vErrors=[err68]:vErrors.push(err68),errors++}}if(void 0!==data33.vendorId&&"string"!=typeof data33.vendorId){const err69={instancePath:instancePath+"/assignedTo/vendorId",schemaPath:"#/properties/assignedTo/properties/vendorId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err69]:vErrors.push(err69),errors++}if(void 0!==data33.vendorName&&"string"!=typeof data33.vendorName){const err70={instancePath:instancePath+"/assignedTo/vendorName",schemaPath:"#/properties/assignedTo/properties/vendorName/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err70]:vErrors.push(err70),errors++}if(void 0!==data33.vendorPhoto){let data39=data33.vendorPhoto;const _errs108=errors;let valid17=!1;const _errs109=errors;validate15(data39,{instancePath:instancePath+"/assignedTo/vendorPhoto",parentData:data33,parentDataProperty:"vendorPhoto",rootData:rootData})||(vErrors=null===vErrors?validate15.errors:vErrors.concat(validate15.errors),errors=vErrors.length);var _valid5=_errs109===errors;if(valid17=valid17||_valid5,!valid17){const _errs110=errors;if(null!==data39){const err71={instancePath:instancePath+"/assignedTo/vendorPhoto",schemaPath:"#/properties/assignedTo/properties/vendorPhoto/anyOf/1/type",keyword:"type",params:{type:"null"},message:"must be null"};null===vErrors?vErrors=[err71]:vErrors.push(err71),errors++}_valid5=_errs110===errors;if(valid17=valid17||_valid5,!valid17){const _errs112=errors;if("string"!=typeof data39){const err72={instancePath:instancePath+"/assignedTo/vendorPhoto",schemaPath:"#/properties/assignedTo/properties/vendorPhoto/anyOf/2/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err72]:vErrors.push(err72),errors++}_valid5=_errs112===errors;valid17=valid17||_valid5}}if(valid17)errors=_errs108,null!==vErrors&&(_errs108?vErrors.length=_errs108:vErrors=null);else{const err73={instancePath:instancePath+"/assignedTo/vendorPhoto",schemaPath:"#/properties/assignedTo/properties/vendorPhoto/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};null===vErrors?vErrors=[err73]:vErrors.push(err73),errors++}}}else{const err74={instancePath:instancePath+"/assignedTo",schemaPath:"#/properties/assignedTo/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err74]:vErrors.push(err74),errors++}}let data40=data.status;if("string"!=typeof data40){const err75={instancePath:instancePath+"/status",schemaPath:"#/properties/status/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err75]:vErrors.push(err75),errors++}if("open"!==data40&&"pending"!==data40&&"solved"!==data40&&"closed"!==data40){const err76={instancePath:instancePath+"/status",schemaPath:"#/properties/status/enum",keyword:"enum",params:{allowedValues:schema100.properties.status.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err76]:vErrors.push(err76),errors++}let data41=data.priority;if("string"!=typeof data41){const err77={instancePath:instancePath+"/priority",schemaPath:"#/properties/priority/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err77]:vErrors.push(err77),errors++}if("low"!==data41&&"normal"!==data41&&"high"!==data41){const err78={instancePath:instancePath+"/priority",schemaPath:"#/properties/priority/enum",keyword:"enum",params:{allowedValues:schema100.properties.priority.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err78]:vErrors.push(err78),errors++}let data42=data.tags;if(Array.isArray(data42)){const len2=data42.length;for(let i2=0;i2<len2;i2++)if("string"!=typeof data42[i2]){const err79={instancePath:instancePath+"/tags/"+i2,schemaPath:"#/properties/tags/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err79]:vErrors.push(err79),errors++}}else{const err80={instancePath:instancePath+"/tags",schemaPath:"#/properties/tags/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err80]:vErrors.push(err80),errors++}if(void 0!==data.department&&"string"!=typeof data.department){const err81={instancePath:instancePath+"/department",schemaPath:"#/properties/department/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err81]:vErrors.push(err81),errors++}if(void 0!==data.rating){let data45=data.rating;if("number"==typeof data45){if(data45>5||isNaN(data45)){const err82={instancePath:instancePath+"/rating",schemaPath:"#/properties/rating/maximum",keyword:"maximum",params:{comparison:"<=",limit:5},message:"must be <= 5"};null===vErrors?vErrors=[err82]:vErrors.push(err82),errors++}if(data45<0||isNaN(data45)){const err83={instancePath:instancePath+"/rating",schemaPath:"#/properties/rating/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===vErrors?vErrors=[err83]:vErrors.push(err83),errors++}}else{const err84={instancePath:instancePath+"/rating",schemaPath:"#/properties/rating/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err84]:vErrors.push(err84),errors++}}if(void 0!==data.ratingComment&&"string"!=typeof data.ratingComment){const err85={instancePath:instancePath+"/ratingComment",schemaPath:"#/properties/ratingComment/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err85]:vErrors.push(err85),errors++}if(void 0!==data.tipAmount&&"string"!=typeof data.tipAmount){const err86={instancePath:instancePath+"/tipAmount",schemaPath:"#/properties/tipAmount/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err86]:vErrors.push(err86),errors++}if(void 0!==data.autoCloseAt){let data48=data.autoCloseAt;if("string"!=typeof data48&&(!data48||"object"!=typeof data48||Array.isArray(data48))){const err87={instancePath:instancePath+"/autoCloseAt",schemaPath:"definitions.json#/definitions/date/type",keyword:"type",params:{type:schema25.type},message:"must be string,object"};null===vErrors?vErrors=[err87]:vErrors.push(err87),errors++}if("string"==typeof data48&&!formats4.validate(data48)){const err88={instancePath:instancePath+"/autoCloseAt",schemaPath:"definitions.json#/definitions/date/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err88]:vErrors.push(err88),errors++}}if(void 0!==data.scheduleDate){let data49=data.scheduleDate;if("string"!=typeof data49&&(!data49||"object"!=typeof data49||Array.isArray(data49))){const err89={instancePath:instancePath+"/scheduleDate",schemaPath:"definitions.json#/definitions/date/type",keyword:"type",params:{type:schema25.type},message:"must be string,object"};null===vErrors?vErrors=[err89]:vErrors.push(err89),errors++}if("string"==typeof data49&&!formats4.validate(data49)){const err90={instancePath:instancePath+"/scheduleDate",schemaPath:"definitions.json#/definitions/date/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err90]:vErrors.push(err90),errors++}}if(void 0!==data.createdAt){let data50=data.createdAt;if("string"!=typeof data50&&(!data50||"object"!=typeof data50||Array.isArray(data50))){const err91={instancePath:instancePath+"/createdAt",schemaPath:"definitions.json#/definitions/date/type",keyword:"type",params:{type:schema25.type},message:"must be string,object"};null===vErrors?vErrors=[err91]:vErrors.push(err91),errors++}if("string"==typeof data50&&!formats4.validate(data50)){const err92={instancePath:instancePath+"/createdAt",schemaPath:"definitions.json#/definitions/date/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err92]:vErrors.push(err92),errors++}}if(void 0!==data.updatedAt){let data51=data.updatedAt;if("string"!=typeof data51&&(!data51||"object"!=typeof data51||Array.isArray(data51))){const err93={instancePath:instancePath+"/updatedAt",schemaPath:"definitions.json#/definitions/date/type",keyword:"type",params:{type:schema25.type},message:"must be string,object"};null===vErrors?vErrors=[err93]:vErrors.push(err93),errors++}if("string"==typeof data51&&!formats4.validate(data51)){const err94={instancePath:instancePath+"/updatedAt",schemaPath:"definitions.json#/definitions/date/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err94]:vErrors.push(err94),errors++}}if(void 0!==data.solvedAt){let data52=data.solvedAt;if("string"!=typeof data52&&(!data52||"object"!=typeof data52||Array.isArray(data52))){const err95={instancePath:instancePath+"/solvedAt",schemaPath:"definitions.json#/definitions/date/type",keyword:"type",params:{type:schema25.type},message:"must be string,object"};null===vErrors?vErrors=[err95]:vErrors.push(err95),errors++}if("string"==typeof data52&&!formats4.validate(data52)){const err96={instancePath:instancePath+"/solvedAt",schemaPath:"definitions.json#/definitions/date/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err96]:vErrors.push(err96),errors++}}if(void 0!==data.closedAt){let data53=data.closedAt;if("string"!=typeof data53&&(!data53||"object"!=typeof data53||Array.isArray(data53))){const err97={instancePath:instancePath+"/closedAt",schemaPath:"definitions.json#/definitions/date/type",keyword:"type",params:{type:schema25.type},message:"must be string,object"};null===vErrors?vErrors=[err97]:vErrors.push(err97),errors++}if("string"==typeof data53&&!formats4.validate(data53)){const err98={instancePath:instancePath+"/closedAt",schemaPath:"definitions.json#/definitions/date/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err98]:vErrors.push(err98),errors++}}}else{const err99={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err99]:vErrors.push(err99),errors++}return validate39.errors=vErrors,0===errors},schema100={$schema:"http://json-schema.org/draft-07/schema",$id:"ticket.json",title:"Ticket",description:"A ticket is a request from a user.",type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",enum:["ticket"],default:"ticket"},number:{type:"string"},issueId:{type:"string"},conversation:{type:"array",default:[],items:{type:"object",additionalProperties:!1,properties:{id:{type:"string"},userId:{type:"string"},userName:{type:"string"},vendorId:{type:"string"},vendorName:{type:"string"},systemId:{type:"string"},systemName:{type:"string"},timestamp:{$ref:"definitions.json#/definitions/createdAt"},body:{type:"string"},readBy:{type:"array",default:[],items:{type:"string"}},media:{anyOf:[{$ref:"mediaFile.json"},{type:"null"}]}},anyOf:[{required:["id","userId","timestamp","body"]},{required:["id","systemId","timestamp","body"]},{required:["id","vendorId","timestamp","body"]}]}},openedBy:{type:"object",properties:{userId:{type:"string"},systemId:{type:"string"}}},requester:{type:"object",properties:{systemId:{type:"string"},systemName:{type:"string"},systemPhoto:{anyOf:[{$ref:"mediaFile.json"},{type:"null"},{type:"string"}]},userId:{type:"string"},userName:{type:"string"},userPhoto:{anyOf:[{$ref:"mediaFile.json"},{type:"null"},{type:"string"}]},deviceId:{type:"string"},roomId:{type:"string"},reservationId:{type:"string"},spaceId:{type:"string"},spaceName:{type:"string"}}},assignedTo:{type:"object",properties:{userId:{type:"string"},userName:{type:"string"},userPhoto:{anyOf:[{$ref:"mediaFile.json"},{type:"null"},{type:"string"}]},vendorId:{type:"string"},vendorName:{type:"string"},vendorPhoto:{anyOf:[{$ref:"mediaFile.json"},{type:"null"},{type:"string"}]}}},status:{type:"string",enum:["open","pending","solved","closed"],default:"open"},priority:{type:"string",enum:["low","normal","high"],default:"normal"},tags:{type:"array",default:[],items:{type:"string"}},department:{type:"string"},rating:{type:"number",minimum:0,maximum:5},ratingComment:{type:"string"},tipAmount:{type:"string"},autoCloseAt:{$ref:"definitions.json#/definitions/date"},scheduleDate:{$ref:"definitions.json#/definitions/date"},createdAt:{$ref:"definitions.json#/definitions/date"},updatedAt:{$ref:"definitions.json#/definitions/date"},solvedAt:{$ref:"definitions.json#/definitions/date"},closedAt:{$ref:"definitions.json#/definitions/date"}},required:["id","conversation","requester","status","tags","createdAt","updatedAt"],additionalProperties:!1};var validateTimeSheet=function validate114(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0===data.type&&(data.type="timeSheet"),void 0===data.locked&&(data.locked=!1),void 0===data.timeEntries&&(data.timeEntries=[]),void 0===data.userId){const err0={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"userId"},message:"must have required property 'userId'"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(void 0===data.day){const err1={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"day"},message:"must have required property 'day'"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if(void 0!==data.id){let data0=data.id;if("string"!=typeof data0){const err2={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}const _errs4=errors,_errs5=errors;if("global"!==data0&&"system"!==data0){const err3={};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}if(_errs5===errors){const err4={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}else errors=_errs4,null!==vErrors&&(_errs4?vErrors.length=_errs4:vErrors=null)}let data1=data.type;if("string"!=typeof data1){const err5={instancePath:instancePath+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}if("timeSheet"!==data1){const err6={instancePath:instancePath+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:schema250.properties.type.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}if(void 0!==data.userId){let data2=data.userId;if("string"!=typeof data2){const err7={instancePath:instancePath+"/userId",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}const _errs11=errors,_errs12=errors;if("global"!==data2&&"system"!==data2){const err8={};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}if(_errs12===errors){const err9={instancePath:instancePath+"/userId",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}else errors=_errs11,null!==vErrors&&(_errs11?vErrors.length=_errs11:vErrors=null)}if(void 0!==data.day){let data3=data.day;if("string"!=typeof data3&&(!data3||"object"!=typeof data3||Array.isArray(data3))){const err10={instancePath:instancePath+"/day",schemaPath:"#/properties/day/type",keyword:"type",params:{type:schema250.properties.day.type},message:"must be string,object"};null===vErrors?vErrors=[err10]:vErrors.push(err10),errors++}if("string"==typeof data3&&!formats4.validate(data3)){const err11={instancePath:instancePath+"/day",schemaPath:"#/properties/day/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err11]:vErrors.push(err11),errors++}}if("boolean"!=typeof data.locked){const err12={instancePath:instancePath+"/locked",schemaPath:"#/properties/locked/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err12]:vErrors.push(err12),errors++}let data5=data.timeEntries;if(Array.isArray(data5)){const len0=data5.length;for(let i0=0;i0<len0;i0++){let data6=data5[i0];if(data6&&"object"==typeof data6&&!Array.isArray(data6)){if(void 0===data6.start){const err13={instancePath:instancePath+"/timeEntries/"+i0,schemaPath:"#/properties/timeEntries/items/required",keyword:"required",params:{missingProperty:"start"},message:"must have required property 'start'"};null===vErrors?vErrors=[err13]:vErrors.push(err13),errors++}if(void 0===data6.discriminator){const err14={instancePath:instancePath+"/timeEntries/"+i0,schemaPath:"#/properties/timeEntries/items/required",keyword:"required",params:{missingProperty:"discriminator"},message:"must have required property 'discriminator'"};null===vErrors?vErrors=[err14]:vErrors.push(err14),errors++}for(const key0 in data6)if("id"!==key0&&"discriminator"!==key0&&"start"!==key0&&"end"!==key0&&"comment"!==key0&&"ticketId"!==key0){const err15={instancePath:instancePath+"/timeEntries/"+i0,schemaPath:"#/properties/timeEntries/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key0},message:"must NOT have additional properties"};null===vErrors?vErrors=[err15]:vErrors.push(err15),errors++}if(void 0!==data6.id){let data7=data6.id;if("string"!=typeof data7){const err16={instancePath:instancePath+"/timeEntries/"+i0+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err16]:vErrors.push(err16),errors++}const _errs25=errors,_errs26=errors;if("global"!==data7&&"system"!==data7){const err17={};null===vErrors?vErrors=[err17]:vErrors.push(err17),errors++}if(_errs26===errors){const err18={instancePath:instancePath+"/timeEntries/"+i0+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err18]:vErrors.push(err18),errors++}else errors=_errs25,null!==vErrors&&(_errs25?vErrors.length=_errs25:vErrors=null)}if(void 0!==data6.discriminator){let data8=data6.discriminator;if("string"!=typeof data8){const err19={instancePath:instancePath+"/timeEntries/"+i0+"/discriminator",schemaPath:"#/properties/timeEntries/items/properties/discriminator/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err19]:vErrors.push(err19),errors++}if("working"!==data8&&"driving"!==data8&&"meeting"!==data8&&"break"!==data8){const err20={instancePath:instancePath+"/timeEntries/"+i0+"/discriminator",schemaPath:"#/properties/timeEntries/items/properties/discriminator/enum",keyword:"enum",params:{allowedValues:schema250.properties.timeEntries.items.properties.discriminator.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err20]:vErrors.push(err20),errors++}}if(void 0!==data6.start){let data9=data6.start;if("string"!=typeof data9&&(!data9||"object"!=typeof data9||Array.isArray(data9))){const err21={instancePath:instancePath+"/timeEntries/"+i0+"/start",schemaPath:"#/properties/timeEntries/items/properties/start/type",keyword:"type",params:{type:schema250.properties.timeEntries.items.properties.start.type},message:"must be string,object"};null===vErrors?vErrors=[err21]:vErrors.push(err21),errors++}if("string"==typeof data9&&!formats4.validate(data9)){const err22={instancePath:instancePath+"/timeEntries/"+i0+"/start",schemaPath:"#/properties/timeEntries/items/properties/start/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err22]:vErrors.push(err22),errors++}}if(void 0!==data6.end){let data10=data6.end;if("string"!=typeof data10&&(!data10||"object"!=typeof data10||Array.isArray(data10))){const err23={instancePath:instancePath+"/timeEntries/"+i0+"/end",schemaPath:"#/properties/timeEntries/items/properties/end/type",keyword:"type",params:{type:schema250.properties.timeEntries.items.properties.end.type},message:"must be string,object"};null===vErrors?vErrors=[err23]:vErrors.push(err23),errors++}if("string"==typeof data10&&!formats4.validate(data10)){const err24={instancePath:instancePath+"/timeEntries/"+i0+"/end",schemaPath:"#/properties/timeEntries/items/properties/end/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err24]:vErrors.push(err24),errors++}}if(void 0!==data6.comment&&"string"!=typeof data6.comment){const err25={instancePath:instancePath+"/timeEntries/"+i0+"/comment",schemaPath:"#/properties/timeEntries/items/properties/comment/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err25]:vErrors.push(err25),errors++}if(void 0!==data6.ticketId&&"string"!=typeof data6.ticketId){const err26={instancePath:instancePath+"/timeEntries/"+i0+"/ticketId",schemaPath:"#/properties/timeEntries/items/properties/ticketId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err26]:vErrors.push(err26),errors++}}else{const err27={instancePath:instancePath+"/timeEntries/"+i0,schemaPath:"#/properties/timeEntries/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err27]:vErrors.push(err27),errors++}}}else{const err28={instancePath:instancePath+"/timeEntries",schemaPath:"#/properties/timeEntries/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err28]:vErrors.push(err28),errors++}}else{const err29={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err29]:vErrors.push(err29),errors++}return validate114.errors=vErrors,0===errors},schema250={$schema:"http://json-schema.org/draft-07/schema",$id:"timeSheet.json",title:"Time Sheet",type:"object",required:["userId","day"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",default:"timeSheet",enum:["timeSheet"]},userId:{$ref:"definitions.json#/definitions/id"},day:{type:["string","object"],format:"date-time"},locked:{type:"boolean",default:!1,description:"If true, the time sheet is locked and cannot be modified"},timeEntries:{type:"array",default:[],items:{type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},discriminator:{type:"string",enum:["working","driving","meeting","break"]},start:{type:["string","object"],format:"date-time"},end:{type:["string","object"],format:"date-time"},comment:{type:"string"},ticketId:{type:"string"}},required:["start","discriminator"],additionalProperties:!1}}}};var validateUser=function validate115(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0===data.type&&(data.type="user"),void 0===data.permissions&&(data.permissions=[]),void 0===data.systems&&(data.systems=[]),void 0===data.firstName){const err0={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"firstName"},message:"must have required property 'firstName'"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(void 0===data.lastName){const err1={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"lastName"},message:"must have required property 'lastName'"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if(void 0!==data.id){let data0=data.id;if("string"!=typeof data0){const err2={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}const _errs4=errors,_errs5=errors;if("global"!==data0&&"system"!==data0){const err3={};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}if(_errs5===errors){const err4={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}else errors=_errs4,null!==vErrors&&(_errs4?vErrors.length=_errs4:vErrors=null)}if("string"!=typeof data.type){const err5={instancePath:instancePath+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}if(void 0!==data.firstName&&"string"!=typeof data.firstName){const err6={instancePath:instancePath+"/firstName",schemaPath:"#/properties/firstName/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}if(void 0!==data.lastName&&"string"!=typeof data.lastName){const err7={instancePath:instancePath+"/lastName",schemaPath:"#/properties/lastName/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}if(void 0!==data.phone){let data4=data.phone;if("string"!=typeof data4&&null!==data4){const err8={instancePath:instancePath+"/phone",schemaPath:"#/properties/phone/type",keyword:"type",params:{type:schema254.properties.phone.type},message:"must be string,null"};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}if("string"==typeof data4&&!pattern8.test(data4)){const err9={instancePath:instancePath+"/phone",schemaPath:"#/properties/phone/pattern",keyword:"pattern",params:{pattern:"^\\+[0-9]{1,14}$"},message:'must match pattern "^\\+[0-9]{1,14}$"'};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}}if(void 0!==data.phoneVerified&&"boolean"!=typeof data.phoneVerified){const err10={instancePath:instancePath+"/phoneVerified",schemaPath:"#/properties/phoneVerified/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err10]:vErrors.push(err10),errors++}if(void 0!==data.email){let data6=data.email;if("string"!=typeof data6&&null!==data6){const err11={instancePath:instancePath+"/email",schemaPath:"#/properties/email/type",keyword:"type",params:{type:schema254.properties.email.type},message:"must be string,null"};null===vErrors?vErrors=[err11]:vErrors.push(err11),errors++}if("string"==typeof data6&&!formats88.test(data6)){const err12={instancePath:instancePath+"/email",schemaPath:"#/properties/email/format",keyword:"format",params:{format:"email"},message:'must match format "email"'};null===vErrors?vErrors=[err12]:vErrors.push(err12),errors++}}if(void 0!==data.emailVerified&&"boolean"!=typeof data.emailVerified){const err13={instancePath:instancePath+"/emailVerified",schemaPath:"#/properties/emailVerified/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===vErrors?vErrors=[err13]:vErrors.push(err13),errors++}if(void 0!==data.address){let data8=data.address;if(data8&&"object"==typeof data8&&!Array.isArray(data8)){if(void 0!==data8.id&&"string"!=typeof data8.id){const err14={instancePath:instancePath+"/address/id",schemaPath:"definitions.json#/definitions/address/properties/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err14]:vErrors.push(err14),errors++}if(void 0!==data8.line1&&"string"!=typeof data8.line1){const err15={instancePath:instancePath+"/address/line1",schemaPath:"definitions.json#/definitions/address/properties/line1/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err15]:vErrors.push(err15),errors++}if(void 0!==data8.line2&&"string"!=typeof data8.line2){const err16={instancePath:instancePath+"/address/line2",schemaPath:"definitions.json#/definitions/address/properties/line2/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err16]:vErrors.push(err16),errors++}if(void 0!==data8.line3&&"string"!=typeof data8.line3){const err17={instancePath:instancePath+"/address/line3",schemaPath:"definitions.json#/definitions/address/properties/line3/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err17]:vErrors.push(err17),errors++}if(void 0!==data8.city&&"string"!=typeof data8.city){const err18={instancePath:instancePath+"/address/city",schemaPath:"definitions.json#/definitions/address/properties/city/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err18]:vErrors.push(err18),errors++}if(void 0!==data8.state&&"string"!=typeof data8.state){const err19={instancePath:instancePath+"/address/state",schemaPath:"definitions.json#/definitions/address/properties/state/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err19]:vErrors.push(err19),errors++}if(void 0!==data8.postalCode&&"string"!=typeof data8.postalCode){const err20={instancePath:instancePath+"/address/postalCode",schemaPath:"definitions.json#/definitions/address/properties/postalCode/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err20]:vErrors.push(err20),errors++}if(void 0!==data8.countryCode){let data16=data8.countryCode;if("string"==typeof data16){if(func3(data16)>2){const err21={instancePath:instancePath+"/address/countryCode",schemaPath:"definitions.json#/definitions/address/properties/countryCode/maxLength",keyword:"maxLength",params:{limit:2},message:"must NOT have more than 2 characters"};null===vErrors?vErrors=[err21]:vErrors.push(err21),errors++}if(func3(data16)<2){const err22={instancePath:instancePath+"/address/countryCode",schemaPath:"definitions.json#/definitions/address/properties/countryCode/minLength",keyword:"minLength",params:{limit:2},message:"must NOT have fewer than 2 characters"};null===vErrors?vErrors=[err22]:vErrors.push(err22),errors++}}else{const err23={instancePath:instancePath+"/address/countryCode",schemaPath:"definitions.json#/definitions/address/properties/countryCode/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err23]:vErrors.push(err23),errors++}}}else{const err24={instancePath:instancePath+"/address",schemaPath:"definitions.json#/definitions/address/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err24]:vErrors.push(err24),errors++}}if(void 0!==data.secretKey&&"string"!=typeof data.secretKey){const err25={instancePath:instancePath+"/secretKey",schemaPath:"#/properties/secretKey/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err25]:vErrors.push(err25),errors++}if(void 0!==data.photo&&(validate15(data.photo,{instancePath:instancePath+"/photo",parentData:data,parentDataProperty:"photo",rootData:rootData})||(vErrors=null===vErrors?validate15.errors:vErrors.concat(validate15.errors),errors=vErrors.length)),void 0!==data.jobTitle&&"string"!=typeof data.jobTitle){const err26={instancePath:instancePath+"/jobTitle",schemaPath:"#/properties/jobTitle/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err26]:vErrors.push(err26),errors++}if(void 0!==data.dob&&"string"!=typeof data.dob){const err27={instancePath:instancePath+"/dob",schemaPath:"#/properties/dob/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err27]:vErrors.push(err27),errors++}if(void 0!==data.gender){let data21=data.gender;if("string"!=typeof data21){const err28={instancePath:instancePath+"/gender",schemaPath:"#/properties/gender/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err28]:vErrors.push(err28),errors++}if("male"!==data21&&"female"!==data21){const err29={instancePath:instancePath+"/gender",schemaPath:"#/properties/gender/enum",keyword:"enum",params:{allowedValues:schema254.properties.gender.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err29]:vErrors.push(err29),errors++}}if(void 0!==data.nationality){let data22=data.nationality;if("string"==typeof data22){if(func3(data22)>2){const err30={instancePath:instancePath+"/nationality",schemaPath:"#/properties/nationality/maxLength",keyword:"maxLength",params:{limit:2},message:"must NOT have more than 2 characters"};null===vErrors?vErrors=[err30]:vErrors.push(err30),errors++}if(func3(data22)<2){const err31={instancePath:instancePath+"/nationality",schemaPath:"#/properties/nationality/minLength",keyword:"minLength",params:{limit:2},message:"must NOT have fewer than 2 characters"};null===vErrors?vErrors=[err31]:vErrors.push(err31),errors++}}else{const err32={instancePath:instancePath+"/nationality",schemaPath:"#/properties/nationality/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err32]:vErrors.push(err32),errors++}}let data23=data.permissions;if(Array.isArray(data23)){const len0=data23.length;for(let i0=0;i0<len0;i0++){let data24=data23[i0];if(data24&&"object"==typeof data24&&!Array.isArray(data24)){if(void 0===data24.organizationId){const err33={instancePath:instancePath+"/permissions/"+i0,schemaPath:"#/properties/permissions/items/required",keyword:"required",params:{missingProperty:"organizationId"},message:"must have required property 'organizationId'"};null===vErrors?vErrors=[err33]:vErrors.push(err33),errors++}if(void 0===data24.propertyId){const err34={instancePath:instancePath+"/permissions/"+i0,schemaPath:"#/properties/permissions/items/required",keyword:"required",params:{missingProperty:"propertyId"},message:"must have required property 'propertyId'"};null===vErrors?vErrors=[err34]:vErrors.push(err34),errors++}if(void 0===data24.role){const err35={instancePath:instancePath+"/permissions/"+i0,schemaPath:"#/properties/permissions/items/required",keyword:"required",params:{missingProperty:"role"},message:"must have required property 'role'"};null===vErrors?vErrors=[err35]:vErrors.push(err35),errors++}for(const key0 in data24)if("organizationId"!==key0&&"propertyId"!==key0&&"role"!==key0&&"department"!==key0&&"policyIds"!==key0&&"policies"!==key0){const err36={instancePath:instancePath+"/permissions/"+i0,schemaPath:"#/properties/permissions/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key0},message:"must NOT have additional properties"};null===vErrors?vErrors=[err36]:vErrors.push(err36),errors++}if(void 0!==data24.organizationId&&"string"!=typeof data24.organizationId){const err37={instancePath:instancePath+"/permissions/"+i0+"/organizationId",schemaPath:"#/properties/permissions/items/properties/organizationId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err37]:vErrors.push(err37),errors++}if(void 0!==data24.propertyId&&"string"!=typeof data24.propertyId){const err38={instancePath:instancePath+"/permissions/"+i0+"/propertyId",schemaPath:"#/properties/permissions/items/properties/propertyId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err38]:vErrors.push(err38),errors++}if(void 0!==data24.role){let data27=data24.role;if("string"!=typeof data27){const err39={instancePath:instancePath+"/permissions/"+i0+"/role",schemaPath:"#/properties/permissions/items/properties/role/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err39]:vErrors.push(err39),errors++}if("Guest"!==data27&&"User"!==data27&&"Manager"!==data27&&"Maintenance"!==data27&&"Administrator"!==data27&&"SuperAdmin"!==data27){const err40={instancePath:instancePath+"/permissions/"+i0+"/role",schemaPath:"#/properties/permissions/items/properties/role/enum",keyword:"enum",params:{allowedValues:schema254.properties.permissions.items.properties.role.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err40]:vErrors.push(err40),errors++}}if(void 0!==data24.department&&"string"!=typeof data24.department){const err41={instancePath:instancePath+"/permissions/"+i0+"/department",schemaPath:"#/properties/permissions/items/properties/department/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err41]:vErrors.push(err41),errors++}if(void 0!==data24.policyIds){let data29=data24.policyIds;if(Array.isArray(data29)){const len1=data29.length;for(let i1=0;i1<len1;i1++)if("string"!=typeof data29[i1]){const err42={instancePath:instancePath+"/permissions/"+i0+"/policyIds/"+i1,schemaPath:"#/properties/permissions/items/properties/policyIds/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err42]:vErrors.push(err42),errors++}}else{const err43={instancePath:instancePath+"/permissions/"+i0+"/policyIds",schemaPath:"#/properties/permissions/items/properties/policyIds/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err43]:vErrors.push(err43),errors++}}if(void 0!==data24.policies){let data31=data24.policies;if(Array.isArray(data31)){const len2=data31.length;for(let i2=0;i2<len2;i2++)validate58(data31[i2],{instancePath:instancePath+"/permissions/"+i0+"/policies/"+i2,parentData:data31,parentDataProperty:i2,rootData:rootData})||(vErrors=null===vErrors?validate58.errors:vErrors.concat(validate58.errors),errors=vErrors.length)}else{const err44={instancePath:instancePath+"/permissions/"+i0+"/policies",schemaPath:"#/properties/permissions/items/properties/policies/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err44]:vErrors.push(err44),errors++}}}else{const err45={instancePath:instancePath+"/permissions/"+i0,schemaPath:"#/properties/permissions/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err45]:vErrors.push(err45),errors++}}}else{const err46={instancePath:instancePath+"/permissions",schemaPath:"#/properties/permissions/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err46]:vErrors.push(err46),errors++}if(void 0!==data.notes){let data33=data.notes;if(Array.isArray(data33)){const len3=data33.length;for(let i3=0;i3<len3;i3++)if("string"!=typeof data33[i3]){const err47={instancePath:instancePath+"/notes/"+i3,schemaPath:"#/properties/notes/items/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err47]:vErrors.push(err47),errors++}}else{const err48={instancePath:instancePath+"/notes",schemaPath:"#/properties/notes/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err48]:vErrors.push(err48),errors++}}if(void 0!==data.files){let data35=data.files;if(Array.isArray(data35)){const len4=data35.length;for(let i4=0;i4<len4;i4++)validate15(data35[i4],{instancePath:instancePath+"/files/"+i4,parentData:data35,parentDataProperty:i4,rootData:rootData})||(vErrors=null===vErrors?validate15.errors:vErrors.concat(validate15.errors),errors=vErrors.length)}else{const err49={instancePath:instancePath+"/files",schemaPath:"#/properties/files/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err49]:vErrors.push(err49),errors++}}if(void 0!==data.identifications){let data37=data.identifications;if(Array.isArray(data37)){const len5=data37.length;for(let i5=0;i5<len5;i5++)validate37(data37[i5],{instancePath:instancePath+"/identifications/"+i5,parentData:data37,parentDataProperty:i5,rootData:rootData})||(vErrors=null===vErrors?validate37.errors:vErrors.concat(validate37.errors),errors=vErrors.length)}else{const err50={instancePath:instancePath+"/identifications",schemaPath:"#/properties/identifications/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err50]:vErrors.push(err50),errors++}}if(void 0!==data.payments){let data39=data.payments;if(Array.isArray(data39)){const len6=data39.length;for(let i6=0;i6<len6;i6++)validate57(data39[i6],{instancePath:instancePath+"/payments/"+i6,parentData:data39,parentDataProperty:i6,rootData:rootData})||(vErrors=null===vErrors?validate57.errors:vErrors.concat(validate57.errors),errors=vErrors.length)}else{const err51={instancePath:instancePath+"/payments",schemaPath:"#/properties/payments/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err51]:vErrors.push(err51),errors++}}if(void 0!==data.location){let data41=data.location;if(data41&&"object"==typeof data41&&!Array.isArray(data41)){if(void 0===data41.accuracy){const err52={instancePath:instancePath+"/location",schemaPath:"#/properties/location/required",keyword:"required",params:{missingProperty:"accuracy"},message:"must have required property 'accuracy'"};null===vErrors?vErrors=[err52]:vErrors.push(err52),errors++}if(void 0===data41.latitude){const err53={instancePath:instancePath+"/location",schemaPath:"#/properties/location/required",keyword:"required",params:{missingProperty:"latitude"},message:"must have required property 'latitude'"};null===vErrors?vErrors=[err53]:vErrors.push(err53),errors++}if(void 0===data41.longitude){const err54={instancePath:instancePath+"/location",schemaPath:"#/properties/location/required",keyword:"required",params:{missingProperty:"longitude"},message:"must have required property 'longitude'"};null===vErrors?vErrors=[err54]:vErrors.push(err54),errors++}if(void 0===data41.timestamp){const err55={instancePath:instancePath+"/location",schemaPath:"#/properties/location/required",keyword:"required",params:{missingProperty:"timestamp"},message:"must have required property 'timestamp'"};null===vErrors?vErrors=[err55]:vErrors.push(err55),errors++}for(const key1 in data41)if("accuracy"!==key1&&"latitude"!==key1&&"longitude"!==key1&&"timestamp"!==key1){const err56={instancePath:instancePath+"/location",schemaPath:"#/properties/location/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key1},message:"must NOT have additional properties"};null===vErrors?vErrors=[err56]:vErrors.push(err56),errors++}if(void 0!==data41.accuracy){let data42=data41.accuracy;if("number"!=typeof data42&&null!==data42){const err57={instancePath:instancePath+"/location/accuracy",schemaPath:"#/properties/location/properties/accuracy/type",keyword:"type",params:{type:schema254.properties.location.properties.accuracy.type},message:"must be number,null"};null===vErrors?vErrors=[err57]:vErrors.push(err57),errors++}}if(void 0!==data41.latitude){let data43=data41.latitude;if("number"!=typeof data43&&null!==data43){const err58={instancePath:instancePath+"/location/latitude",schemaPath:"#/properties/location/properties/latitude/type",keyword:"type",params:{type:schema254.properties.location.properties.latitude.type},message:"must be number,null"};null===vErrors?vErrors=[err58]:vErrors.push(err58),errors++}}if(void 0!==data41.longitude){let data44=data41.longitude;if("number"!=typeof data44&&null!==data44){const err59={instancePath:instancePath+"/location/longitude",schemaPath:"#/properties/location/properties/longitude/type",keyword:"type",params:{type:schema254.properties.location.properties.longitude.type},message:"must be number,null"};null===vErrors?vErrors=[err59]:vErrors.push(err59),errors++}}if(void 0!==data41.timestamp){let data45=data41.timestamp;if("number"!=typeof data45&&null!==data45){const err60={instancePath:instancePath+"/location/timestamp",schemaPath:"#/properties/location/properties/timestamp/type",keyword:"type",params:{type:schema254.properties.location.properties.timestamp.type},message:"must be number,null"};null===vErrors?vErrors=[err60]:vErrors.push(err60),errors++}}}else{const err61={instancePath:instancePath+"/location",schemaPath:"#/properties/location/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err61]:vErrors.push(err61),errors++}}if(void 0!==data.reservations){let data46=data.reservations;if(Array.isArray(data46)){const len7=data46.length;for(let i7=0;i7<len7;i7++)validate63(data46[i7],{instancePath:instancePath+"/reservations/"+i7,parentData:data46,parentDataProperty:i7,rootData:rootData})||(vErrors=null===vErrors?validate63.errors:vErrors.concat(validate63.errors),errors=vErrors.length)}else{const err62={instancePath:instancePath+"/reservations",schemaPath:"#/properties/reservations/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err62]:vErrors.push(err62),errors++}}if(void 0!==data.spaceName&&"string"!=typeof data.spaceName){const err63={instancePath:instancePath+"/spaceName",schemaPath:"#/properties/spaceName/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err63]:vErrors.push(err63),errors++}if(void 0!==data.revenue&&(validate122(data.revenue,{instancePath:instancePath+"/revenue",parentData:data,parentDataProperty:"revenue",rootData:rootData})||(vErrors=null===vErrors?validate122.errors:vErrors.concat(validate122.errors),errors=vErrors.length)),void 0!==data.createdAt){let data50=data.createdAt;if("string"!=typeof data50&&(!data50||"object"!=typeof data50||Array.isArray(data50))){const err64={instancePath:instancePath+"/createdAt",schemaPath:"definitions.json#/definitions/createdAt/type",keyword:"type",params:{type:schema102.type},message:"must be string,object"};null===vErrors?vErrors=[err64]:vErrors.push(err64),errors++}if("string"==typeof data50&&!formats4.validate(data50)){const err65={instancePath:instancePath+"/createdAt",schemaPath:"definitions.json#/definitions/createdAt/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err65]:vErrors.push(err65),errors++}}if(void 0!==data.updatedAt){let data51=data.updatedAt;if("string"!=typeof data51&&(!data51||"object"!=typeof data51||Array.isArray(data51))){const err66={instancePath:instancePath+"/updatedAt",schemaPath:"definitions.json#/definitions/updatedAt/type",keyword:"type",params:{type:schema150.type},message:"must be string,object"};null===vErrors?vErrors=[err66]:vErrors.push(err66),errors++}if("string"==typeof data51&&!formats4.validate(data51)){const err67={instancePath:instancePath+"/updatedAt",schemaPath:"definitions.json#/definitions/updatedAt/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err67]:vErrors.push(err67),errors++}}let data52=data.systems;if(Array.isArray(data52)){const len8=data52.length;for(let i8=0;i8<len8;i8++){let data53=data52[i8];if(data53&&"object"==typeof data53&&!Array.isArray(data53)){if(void 0===data53.systemId){const err68={instancePath:instancePath+"/systems/"+i8,schemaPath:"#/properties/systems/items/required",keyword:"required",params:{missingProperty:"systemId"},message:"must have required property 'systemId'"};null===vErrors?vErrors=[err68]:vErrors.push(err68),errors++}if(void 0===data53.propertyId){const err69={instancePath:instancePath+"/systems/"+i8,schemaPath:"#/properties/systems/items/required",keyword:"required",params:{missingProperty:"propertyId"},message:"must have required property 'propertyId'"};null===vErrors?vErrors=[err69]:vErrors.push(err69),errors++}if(void 0===data53.driver){const err70={instancePath:instancePath+"/systems/"+i8,schemaPath:"#/properties/systems/items/required",keyword:"required",params:{missingProperty:"driver"},message:"must have required property 'driver'"};null===vErrors?vErrors=[err70]:vErrors.push(err70),errors++}for(const key2 in data53)if("systemId"!==key2&&"propertyId"!==key2&&"driver"!==key2){const err71={instancePath:instancePath+"/systems/"+i8,schemaPath:"#/properties/systems/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key2},message:"must NOT have additional properties"};null===vErrors?vErrors=[err71]:vErrors.push(err71),errors++}if(void 0!==data53.systemId&&"string"!=typeof data53.systemId){const err72={instancePath:instancePath+"/systems/"+i8+"/systemId",schemaPath:"#/properties/systems/items/properties/systemId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err72]:vErrors.push(err72),errors++}if(void 0!==data53.propertyId&&"string"!=typeof data53.propertyId){const err73={instancePath:instancePath+"/systems/"+i8+"/propertyId",schemaPath:"#/properties/systems/items/properties/propertyId/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err73]:vErrors.push(err73),errors++}if(void 0!==data53.driver&&"string"!=typeof data53.driver){const err74={instancePath:instancePath+"/systems/"+i8+"/driver",schemaPath:"#/properties/systems/items/properties/driver/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err74]:vErrors.push(err74),errors++}}else{const err75={instancePath:instancePath+"/systems/"+i8,schemaPath:"#/properties/systems/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err75]:vErrors.push(err75),errors++}}}else{const err76={instancePath:instancePath+"/systems",schemaPath:"#/properties/systems/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err76]:vErrors.push(err76),errors++}}else{const err77={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err77]:vErrors.push(err77),errors++}return validate115.errors=vErrors,0===errors},schema254={$schema:"http://json-schema.org/draft-07/schema",$id:"user.json",title:"User",type:"object",required:["firstName","lastName"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",default:"user"},firstName:{type:"string"},lastName:{type:"string"},phone:{type:["string","null"],pattern:"^\\+[0-9]{1,14}$"},phoneVerified:{type:"boolean"},email:{type:["string","null"],format:"email"},emailVerified:{type:"boolean"},address:{$ref:"definitions.json#/definitions/address"},secretKey:{type:"string"},photo:{$ref:"mediaFile.json#"},jobTitle:{type:"string"},dob:{type:"string"},gender:{type:"string",enum:["male","female"]},nationality:{type:"string",minLength:2,maxLength:2},permissions:{type:"array",default:[],items:{type:"object",required:["organizationId","propertyId","role"],properties:{organizationId:{type:"string",description:"The ID of the organization the permission is applies to."},propertyId:{type:"string",description:"The ID of the property the permission is applies to."},role:{type:"string",enum:["Guest","User","Manager","Maintenance","Administrator","SuperAdmin"]},department:{type:"string",description:"The department the user belongs to."},policyIds:{type:"array",items:{type:"string",description:"ID of a policy that is applied to this role."}},policies:{type:"array",items:{description:"A policy object populated from the policyIds array.",$ref:"policy.json"}}},additionalProperties:!1}},notes:{type:"array",items:{type:"string"}},files:{type:"array",items:{$ref:"mediaFile.json#"}},identifications:{type:"array",items:{$ref:"identification.json#"}},payments:{type:"array",items:{$ref:"payment.json#"}},location:{type:"object",required:["accuracy","latitude","longitude","timestamp"],additionalProperties:!1,properties:{accuracy:{type:["number","null"]},latitude:{type:["number","null"]},longitude:{type:["number","null"]},timestamp:{type:["number","null"]}}},reservations:{type:"array",items:{$ref:"reservation.json"}},spaceName:{type:"string"},revenue:{$ref:"definitions.json#/definitions/revenue"},createdAt:{$ref:"definitions.json#/definitions/createdAt"},updatedAt:{$ref:"definitions.json#/definitions/updatedAt"},systems:{type:"array",default:[],items:{type:"object",properties:{systemId:{type:"string"},propertyId:{type:"string"},driver:{type:"string"}},required:["systemId","propertyId","driver"],additionalProperties:!1}}}};function validate122(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(Array.isArray(data)){const len0=data.length;for(let i0=0;i0<len0;i0++){let data0=data[i0];if(data0&&"object"==typeof data0&&!Array.isArray(data0)){if(void 0!==data0.id){let data1=data0.id;if("string"!=typeof data1){const err0={instancePath:instancePath+"/"+i0+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}const _errs6=errors,_errs7=errors;if("global"!==data1&&"system"!==data1){const err1={};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if(_errs7===errors){const err2={instancePath:instancePath+"/"+i0+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}else errors=_errs6,null!==vErrors&&(_errs6?vErrors.length=_errs6:vErrors=null)}if(void 0!==data0.name&&"string"!=typeof data0.name){const err3={instancePath:instancePath+"/"+i0+"/name",schemaPath:"#/items/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}if(void 0!==data0.date){let data3=data0.date;if("string"==typeof data3){if(!formats4.validate(data3)){const err4={instancePath:instancePath+"/"+i0+"/date",schemaPath:"#/items/properties/date/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}}else{const err5={instancePath:instancePath+"/"+i0+"/date",schemaPath:"#/items/properties/date/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}}if(void 0!==data0.price&&"number"!=typeof data0.price){const err6={instancePath:instancePath+"/"+i0+"/price",schemaPath:"#/items/properties/price/type",keyword:"type",params:{type:"number"},message:"must be number"};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}if(void 0!==data0.tax){let data5=data0.tax;if("number"!=typeof data5&&null!==data5){const err7={instancePath:instancePath+"/"+i0+"/tax",schemaPath:"#/items/properties/tax/type",keyword:"type",params:{type:schema166.items.properties.tax.type},message:"must be number,null"};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}}}else{const err8={instancePath:instancePath+"/"+i0,schemaPath:"#/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}}}else{const err9={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"array"},message:"must be array"};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}return validate122.errors=vErrors,0===errors}var validateVendor=function validate124(data,{instancePath:instancePath="",parentData:parentData,parentDataProperty:parentDataProperty,rootData:rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0===data.type&&(data.type="vendor"),void 0===data.name){const err0={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(void 0===data.email){const err1={instancePath:instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"email"},message:"must have required property 'email'"};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}if(void 0!==data.id){let data0=data.id;if("string"!=typeof data0){const err2={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}const _errs4=errors,_errs5=errors;if("global"!==data0&&"system"!==data0){const err3={};null===vErrors?vErrors=[err3]:vErrors.push(err3),errors++}if(_errs5===errors){const err4={instancePath:instancePath+"/id",schemaPath:"definitions.json#/definitions/id/not",keyword:"not",params:{},message:"must NOT be valid"};null===vErrors?vErrors=[err4]:vErrors.push(err4),errors++}else errors=_errs4,null!==vErrors&&(_errs4?vErrors.length=_errs4:vErrors=null)}let data1=data.type;if("string"!=typeof data1){const err5={instancePath:instancePath+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err5]:vErrors.push(err5),errors++}if("vendor"!==data1){const err6={instancePath:instancePath+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:schema261.properties.type.enum},message:"must be equal to one of the allowed values"};null===vErrors?vErrors=[err6]:vErrors.push(err6),errors++}if(void 0!==data.name&&"string"!=typeof data.name){const err7={instancePath:instancePath+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err7]:vErrors.push(err7),errors++}if(void 0!==data.phone){let data3=data.phone;if("string"!=typeof data3&&null!==data3){const err8={instancePath:instancePath+"/phone",schemaPath:"#/properties/phone/type",keyword:"type",params:{type:schema261.properties.phone.type},message:"must be string,null"};null===vErrors?vErrors=[err8]:vErrors.push(err8),errors++}if("string"==typeof data3&&!pattern8.test(data3)){const err9={instancePath:instancePath+"/phone",schemaPath:"#/properties/phone/pattern",keyword:"pattern",params:{pattern:"^\\+[0-9]{1,14}$"},message:'must match pattern "^\\+[0-9]{1,14}$"'};null===vErrors?vErrors=[err9]:vErrors.push(err9),errors++}}if(void 0!==data.email){let data4=data.email;if("string"!=typeof data4&&null!==data4){const err10={instancePath:instancePath+"/email",schemaPath:"#/properties/email/type",keyword:"type",params:{type:schema261.properties.email.type},message:"must be string,null"};null===vErrors?vErrors=[err10]:vErrors.push(err10),errors++}if("string"==typeof data4&&!formats88.test(data4)){const err11={instancePath:instancePath+"/email",schemaPath:"#/properties/email/format",keyword:"format",params:{format:"email"},message:'must match format "email"'};null===vErrors?vErrors=[err11]:vErrors.push(err11),errors++}}if(void 0!==data.address){let data5=data.address;if(data5&&"object"==typeof data5&&!Array.isArray(data5)){if(void 0!==data5.id&&"string"!=typeof data5.id){const err12={instancePath:instancePath+"/address/id",schemaPath:"definitions.json#/definitions/address/properties/id/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err12]:vErrors.push(err12),errors++}if(void 0!==data5.line1&&"string"!=typeof data5.line1){const err13={instancePath:instancePath+"/address/line1",schemaPath:"definitions.json#/definitions/address/properties/line1/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err13]:vErrors.push(err13),errors++}if(void 0!==data5.line2&&"string"!=typeof data5.line2){const err14={instancePath:instancePath+"/address/line2",schemaPath:"definitions.json#/definitions/address/properties/line2/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err14]:vErrors.push(err14),errors++}if(void 0!==data5.line3&&"string"!=typeof data5.line3){const err15={instancePath:instancePath+"/address/line3",schemaPath:"definitions.json#/definitions/address/properties/line3/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err15]:vErrors.push(err15),errors++}if(void 0!==data5.city&&"string"!=typeof data5.city){const err16={instancePath:instancePath+"/address/city",schemaPath:"definitions.json#/definitions/address/properties/city/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err16]:vErrors.push(err16),errors++}if(void 0!==data5.state&&"string"!=typeof data5.state){const err17={instancePath:instancePath+"/address/state",schemaPath:"definitions.json#/definitions/address/properties/state/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err17]:vErrors.push(err17),errors++}if(void 0!==data5.postalCode&&"string"!=typeof data5.postalCode){const err18={instancePath:instancePath+"/address/postalCode",schemaPath:"definitions.json#/definitions/address/properties/postalCode/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err18]:vErrors.push(err18),errors++}if(void 0!==data5.countryCode){let data13=data5.countryCode;if("string"==typeof data13){if(func3(data13)>2){const err19={instancePath:instancePath+"/address/countryCode",schemaPath:"definitions.json#/definitions/address/properties/countryCode/maxLength",keyword:"maxLength",params:{limit:2},message:"must NOT have more than 2 characters"};null===vErrors?vErrors=[err19]:vErrors.push(err19),errors++}if(func3(data13)<2){const err20={instancePath:instancePath+"/address/countryCode",schemaPath:"definitions.json#/definitions/address/properties/countryCode/minLength",keyword:"minLength",params:{limit:2},message:"must NOT have fewer than 2 characters"};null===vErrors?vErrors=[err20]:vErrors.push(err20),errors++}}else{const err21={instancePath:instancePath+"/address/countryCode",schemaPath:"definitions.json#/definitions/address/properties/countryCode/type",keyword:"type",params:{type:"string"},message:"must be string"};null===vErrors?vErrors=[err21]:vErrors.push(err21),errors++}}}else{const err22={instancePath:instancePath+"/address",schemaPath:"definitions.json#/definitions/address/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err22]:vErrors.push(err22),errors++}}if(void 0!==data.photo&&(validate15(data.photo,{instancePath:instancePath+"/photo",parentData:data,parentDataProperty:"photo",rootData:rootData})||(vErrors=null===vErrors?validate15.errors:vErrors.concat(validate15.errors),errors=vErrors.length)),void 0!==data.createdAt){let data15=data.createdAt;if("string"!=typeof data15&&(!data15||"object"!=typeof data15||Array.isArray(data15))){const err23={instancePath:instancePath+"/createdAt",schemaPath:"definitions.json#/definitions/createdAt/type",keyword:"type",params:{type:schema102.type},message:"must be string,object"};null===vErrors?vErrors=[err23]:vErrors.push(err23),errors++}if("string"==typeof data15&&!formats4.validate(data15)){const err24={instancePath:instancePath+"/createdAt",schemaPath:"definitions.json#/definitions/createdAt/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err24]:vErrors.push(err24),errors++}}if(void 0!==data.updatedAt){let data16=data.updatedAt;if("string"!=typeof data16&&(!data16||"object"!=typeof data16||Array.isArray(data16))){const err25={instancePath:instancePath+"/updatedAt",schemaPath:"definitions.json#/definitions/updatedAt/type",keyword:"type",params:{type:schema150.type},message:"must be string,object"};null===vErrors?vErrors=[err25]:vErrors.push(err25),errors++}if("string"==typeof data16&&!formats4.validate(data16)){const err26={instancePath:instancePath+"/updatedAt",schemaPath:"definitions.json#/definitions/updatedAt/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};null===vErrors?vErrors=[err26]:vErrors.push(err26),errors++}}}else{const err27={instancePath:instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===vErrors?vErrors=[err27]:vErrors.push(err27),errors++}return validate124.errors=vErrors,0===errors},schema261={$schema:"http://json-schema.org/draft-07/schema",$id:"vendor.json",title:"Vendor",type:"object",required:["name","email"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",default:"vendor",enum:["vendor"]},name:{type:"string"},phone:{type:["string","null"],pattern:"^\\+[0-9]{1,14}$"},email:{type:["string","null"],format:"email"},address:{$ref:"definitions.json#/definitions/address"},photo:{$ref:"mediaFile.json#"},createdAt:{$ref:"definitions.json#/definitions/createdAt"},updatedAt:{$ref:"definitions.json#/definitions/updatedAt"}}};var validateWindowCovering=validate81,Alarm=class extends Entity{constructor(data){super(data),void 0!==data.id&&(this.id=data.id),void 0!==data.name&&(this.name=data.name),void 0!==data.offline&&(this.offline=data.offline),void 0!==data.type&&(this.type=data.type),void 0!==data.systemId&&(this.systemId=data.systemId),void 0!==data.supportedNotifications&&(this.supportedNotifications=data.supportedNotifications),void 0!==data.notification&&(this.notification=data.notification),void 0!==data.driver&&(this.driver=data.driver),void 0!==data.areas&&(this.areas=data.areas),void 0!==data.zones&&(this.zones=data.zones),void 0!==data.chime&&(this.chime=data.chime),void 0!==data.watts&&(this.watts=data.watts),void 0!==data.icon&&(this.icon=data.icon),void 0!==data.modelNumber&&(this.modelNumber=data.modelNumber),void 0!==data.serialNumber&&(this.serialNumber=data.serialNumber),void 0!==data.firmwareVersion&&(this.firmwareVersion=data.firmwareVersion),void 0!==data.address&&(this.address=data.address)}};Object.defineProperty(Alarm.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"alarm.json",title:"Alarm",description:"Any smart alarm system",type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},name:{type:"string",description:"Name of the alarm"},offline:{type:"boolean"},type:{type:"string",enum:["alarm"],default:"alarm"},systemId:{$ref:"definitions.json#/definitions/systemId"},supportedNotifications:{$ref:"definitions.json#/definitions/supportedNotifications"},notification:{$ref:"definitions.json#/definitions/notification"},driver:{$ref:"definitions.json#/definitions/driver"},areas:{type:"array",items:{type:"object",properties:{number:{type:"number"},name:{type:"string"},securityMode:{type:["string","null"],enum:["arming","disarming","armed","disarmed","alarm",null]}},additionalProperties:!1}},zones:{type:"array",items:{type:"object",properties:{number:{type:"number",minimum:0},name:{type:"string"},secure:{type:["boolean","null"]},bypassed:{type:["boolean","null"]}},additionalProperties:!1}},chime:{type:"boolean",description:"Reflects whether console chime is enabled"},watts:{$ref:"definitions.json#/definitions/watts"},icon:{type:"string"},modelNumber:{type:"string"},serialNumber:{type:"string"},firmwareVersion:{type:"string"},address:{$ref:"definitions.json#/definitions/address"}},required:["id","type","areas","zones","driver"]}}),Object.defineProperty(Alarm.prototype,"validator",{get:function(){return validateAlarm}});var Announcement=class extends Entity{constructor(data){super(data),void 0!==data.id&&(this.id=data.id),void 0!==data.type&&(this.type=data.type),void 0!==data.users&&(this.users=data.users),void 0!==data.group&&(this.group=data.group),void 0!==data.body&&(this.body=data.body),void 0!==data.media&&(this.media=data.media),void 0!==data.sentBy&&(this.sentBy=data.sentBy),void 0!==data.tags&&(this.tags=data.tags),void 0!==data.createdAt&&(this.createdAt=data.createdAt),void 0!==data.updatedAt&&(this.updatedAt=data.updatedAt)}};Object.defineProperty(Announcement.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"announcement.json",title:"Announcement",description:"Announcement message sent to users",type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",enum:["announcement"],default:"announcement"},users:{type:"array",items:{type:"string"},minItems:1},group:{type:"string"},body:{type:"string"},media:{$ref:"mediaFile.json"},sentBy:{type:"string"},tags:{type:"array",items:{type:"string"}},createdAt:{$ref:"definitions.json#/definitions/date"},updatedAt:{$ref:"definitions.json#/definitions/date"}},additionalProperties:!1}}),Object.defineProperty(Announcement.prototype,"validator",{get:function(){return validateAnnouncement}});var Camera=class extends Entity{constructor(data){super(data),void 0!==data.id&&(this.id=data.id),void 0!==data.name&&(this.name=data.name),void 0!==data.type&&(this.type=data.type),void 0!==data.offline&&(this.offline=data.offline),void 0!==data.supportedNotifications&&(this.supportedNotifications=data.supportedNotifications),void 0!==data.notification&&(this.notification=data.notification),void 0!==data.driver&&(this.driver=data.driver),void 0!==data.liveStreams&&(this.liveStreams=data.liveStreams),void 0!==data.liveStream&&(this.liveStream=data.liveStream),void 0!==data.systemId&&(this.systemId=data.systemId),void 0!==data.watts&&(this.watts=data.watts),void 0!==data.icon&&(this.icon=data.icon),void 0!==data.modelNumber&&(this.modelNumber=data.modelNumber),void 0!==data.serialNumber&&(this.serialNumber=data.serialNumber),void 0!==data.firmwareVersion&&(this.firmwareVersion=data.firmwareVersion)}};Object.defineProperty(Camera.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"camera.json",title:"Camera",description:"Any smart camera",type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},name:{type:"string"},type:{$ref:"definitions.json#/definitions/type",default:"camera"},offline:{type:"boolean"},supportedNotifications:{$ref:"definitions.json#/definitions/supportedNotifications"},notification:{$ref:"definitions.json#/definitions/notification"},driver:{$ref:"definitions.json#/definitions/driver"},liveStreams:{type:"object",additionalProperties:!1,$comment:"This is now deprecated. Use liveStream instead. This will remain here for backwards compatibility.",properties:{iframe:{type:["string","null"]},hls:{type:["string","null"]},webRTC:{type:["string","null"]},rtsp:{type:["string","null"]}}},liveStream:{type:"object",additionalProperties:!1,properties:{id:{type:"string"},driver:{type:"string",enum:["cloudflare-stream","aws-kinesis","digital-watchdog"]},allowedOrigins:{type:"array",items:{type:"string"}},authRequired:{type:"boolean"},iframe:{type:["string","null"]},hls:{type:["string","null"]},webRTC:{type:["string","null"]},rtsp:{type:["string","null"],description:"Local RTSP stream URL",examples:["rtsp://192.168.1.4:544/channels/1","rtsp://10.145.6.129:8554/unicast"]},previewImage:{type:["string","null"],description:"Source to preview the camera stream",examples:["https://example.com/preview.jpg","data:image/jpegbase64,/9j/4AAQSkZJRgABAQEAYABgAAD/4QBYRXhpZgAATU0AKgAAAAgAA1EQAAEAAAABAQAAAFERAAQAAAABAAABAgABAA"]}}},systemId:{$ref:"definitions.json#/definitions/systemId"},watts:{$ref:"definitions.json#/definitions/watts"},icon:{type:"string"},modelNumber:{type:"string"},serialNumber:{type:"string"},firmwareVersion:{type:"string"}},additionalProperties:!1,required:["id","type","driver"]}}),Object.defineProperty(Camera.prototype,"validator",{get:function(){return validateCamera}});var Category=class extends Entity{constructor(data){super(data),void 0!==data.id&&(this.id=data.id),void 0!==data.type&&(this.type=data.type),void 0!==data.name&&(this.name=data.name),void 0!==data.driver&&(this.driver=data.driver),void 0!==data.description&&(this.description=data.description),void 0!==data.image&&(this.image=data.image),void 0!==data.rating&&(this.rating=data.rating),void 0!==data.discriminator&&(this.discriminator=data.discriminator),void 0!==data.systemId&&(this.systemId=data.systemId)}};Object.defineProperty(Category.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"category.json",title:"Category",type:"object",required:["type","discriminator"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",default:"category"},name:{type:"string",minLength:1},driver:{$ref:"definitions.json#/definitions/driver"},description:{type:"string"},image:{$ref:"mediaFile.json"},rating:{type:"number",minimum:0,maximum:10,default:9},discriminator:{type:"string",enum:["space","product","mediaFile"]},systemId:{$ref:"definitions.json#/definitions/systemId"}}}}),Object.defineProperty(Category.prototype,"validator",{get:function(){return validateCategory}});var Courtesy=class extends Entity{constructor(data){super(data),void 0!==data.id&&(this.id=data.id),void 0!==data.name&&(this.name=data.name),void 0!==data.type&&(this.type=data.type),void 0!==data.supportedNotifications&&(this.supportedNotifications=data.supportedNotifications),void 0!==data.notification&&(this.notification=data.notification),void 0!==data.driver&&(this.driver=data.driver),void 0!==data.offline&&(this.offline=data.offline),void 0!==data.supportedStates&&(this.supportedStates=data.supportedStates),void 0!==data.state&&(this.state=data.state),void 0!==data.systemId&&(this.systemId=data.systemId),void 0!==data.watts&&(this.watts=data.watts),void 0!==data.icon&&(this.icon=data.icon),void 0!==data.modelNumber&&(this.modelNumber=data.modelNumber),void 0!==data.serialNumber&&(this.serialNumber=data.serialNumber),void 0!==data.firmwareVersion&&(this.firmwareVersion=data.firmwareVersion)}};Object.defineProperty(Courtesy.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"courtesy.json",title:"Courtesy",description:"Any smart courtesy system",type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},name:{type:"string"},type:{$ref:"definitions.json#/definitions/type"},supportedNotifications:{$ref:"definitions.json#/definitions/supportedNotifications"},notification:{$ref:"definitions.json#/definitions/notification"},driver:{$ref:"definitions.json#/definitions/driver"},offline:{type:"boolean"},supportedStates:{type:"array",uniqueItems:!0,items:{enum:["privacy","service","none"]}},state:{type:"string",$ref:"#/properties/supportedStates/items"},systemId:{$ref:"definitions.json#/definitions/systemId"},watts:{$ref:"definitions.json#/definitions/watts"},icon:{type:"string"},modelNumber:{type:"string"},serialNumber:{type:"string"},firmwareVersion:{type:"string"}},required:["id","type","driver","supportedStates","state"]}}),Object.defineProperty(Courtesy.prototype,"validator",{get:function(){return validateCourtesy}});var Credential=class extends Entity{constructor(data){super(data),void 0!==data.id&&(this.id=data.id),void 0!==data.type&&(this.type=data.type),void 0!==data.driver&&(this.driver=data.driver),void 0!==data.discriminator&&(this.discriminator=data.discriminator),void 0!==data.credential&&(this.credential=data.credential),void 0!==data.userId&&(this.userId=data.userId),void 0!==data.organizationId&&(this.organizationId=data.organizationId),void 0!==data.propertyId&&(this.propertyId=data.propertyId),void 0!==data.deviceId&&(this.deviceId=data.deviceId),void 0!==data.userAgent&&(this.userAgent=data.userAgent),void 0!==data.expires&&(this.expires=data.expires),void 0!==data.systemId&&(this.systemId=data.systemId)}};Object.defineProperty(Credential.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"credential.json",title:"Credential",type:"object",required:["type","credential","expires"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",default:"credential"},driver:{$ref:"definitions.json#/definitions/driver"},discriminator:{type:"string",enum:["verificationCode","token","mobileKey","pin","publicKey","passkeyChallenge"]},credential:{type:"string"},userId:{type:"string"},organizationId:{type:"string"},propertyId:{type:"string"},deviceId:{type:"string"},userAgent:{type:"string"},expires:{type:["string","object","null"]},systemId:{$ref:"definitions.json#/definitions/systemId"}}}}),Object.defineProperty(Credential.prototype,"validator",{get:function(){return validateCredential}});var DeviceRouter=class extends Entity{constructor(data){super(data),void 0!==data.id&&(this.id=data.id),void 0!==data.type&&(this.type=data.type),void 0!==data.driver&&(this.driver=data.driver),void 0!==data.organizationId&&(this.organizationId=data.organizationId),void 0!==data.devices&&(this.devices=data.devices)}};Object.defineProperty(DeviceRouter.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"deviceRouter.json",title:"Device Router",description:"A device router contains instructions on where to route devices based on their organization and driver.",type:"object",required:["driver","organizationId"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",default:"deviceRouter",enum:["deviceRouter"]},driver:{type:"string"},organizationId:{type:["string","null"],description:"Reference (id) to the organization that owns this router"},devices:{type:"object",additionalProperties:!0}}}}),Object.defineProperty(DeviceRouter.prototype,"validator",{get:function(){return validateDeviceRouter}});var Dimmer=class extends Entity{constructor(data){super(data),void 0!==data.id&&(this.id=data.id),void 0!==data.name&&(this.name=data.name),void 0!==data.type&&(this.type=data.type),void 0!==data.supportedNotifications&&(this.supportedNotifications=data.supportedNotifications),void 0!==data.notification&&(this.notification=data.notification),void 0!==data.driver&&(this.driver=data.driver),void 0!==data.offline&&(this.offline=data.offline),void 0!==data.level&&(this.level=data.level),void 0!==data.systemId&&(this.systemId=data.systemId),void 0!==data.watts&&(this.watts=data.watts),void 0!==data.icon&&(this.icon=data.icon),void 0!==data.modelNumber&&(this.modelNumber=data.modelNumber),void 0!==data.serialNumber&&(this.serialNumber=data.serialNumber),void 0!==data.firmwareVersion&&(this.firmwareVersion=data.firmwareVersion)}};Object.defineProperty(Dimmer.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"dimmer.json",title:"Dimmer",description:"Any smart dimmer",type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},name:{type:"string"},type:{$ref:"definitions.json#/definitions/type"},supportedNotifications:{$ref:"definitions.json#/definitions/supportedNotifications"},notification:{$ref:"definitions.json#/definitions/notification"},driver:{$ref:"definitions.json#/definitions/driver"},offline:{type:"boolean"},level:{type:["number","null"],minimum:0,maximum:100},systemId:{$ref:"definitions.json#/definitions/systemId"},watts:{$ref:"definitions.json#/definitions/watts"},icon:{type:"string"},modelNumber:{type:"string"},serialNumber:{type:"string"},firmwareVersion:{type:"string"}},required:["id","type","level","driver"]}}),Object.defineProperty(Dimmer.prototype,"validator",{get:function(){return validateDimmer}});var DiscoveredDevice=class extends Entity{constructor(data){super(data),void 0!==data.id&&(this.id=data.id),void 0!==data.name&&(this.name=data.name),void 0!==data.deviceId&&(this.deviceId=data.deviceId),void 0!==data.type&&(this.type=data.type),void 0!==data.discriminator&&(this.discriminator=data.discriminator),void 0!==data.driver&&(this.driver=data.driver),void 0!==data.deviceData&&(this.deviceData=data.deviceData),void 0!==data.ignore&&(this.ignore=data.ignore),void 0!==data.organizationId&&(this.organizationId=data.organizationId),void 0!==data.propertyId&&(this.propertyId=data.propertyId)}};Object.defineProperty(DiscoveredDevice.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"discoveredDevice.json",title:"Discovered Device",description:"A device that has been discovered by Kohost, but not yet added to the Kohost system.",type:"object",required:["name","deviceId","deviceData"],properties:{id:{$ref:"definitions.json#/definitions/id"},name:{type:"string"},deviceId:{type:"string"},type:{type:"string",enum:["discoveredDevice"],default:"discoveredDevice"},discriminator:{$ref:"definitions.json#/definitions/type"},driver:{type:"string"},deviceData:{type:"object"},ignore:{type:"boolean"},organizationId:{type:["string","null"],description:"Reference (id) to the organization that owns this device"},propertyId:{type:["string","null"],description:"Reference (id) to the property that this device belongs to"}}}}),Object.defineProperty(DiscoveredDevice.prototype,"validator",{get:function(){return validateDiscoveredDevice}});var EmailMessage=class extends Entity{constructor(data){super(data),void 0!==data.id&&(this.id=data.id),void 0!==data.type&&(this.type=data.type),void 0!==data.to&&(this.to=data.to),void 0!==data.from&&(this.from=data.from),void 0!==data.subject&&(this.subject=data.subject),void 0!==data.status&&(this.status=data.status),void 0!==data.statusMessage&&(this.statusMessage=data.statusMessage),void 0!==data.html&&(this.html=data.html),void 0!==data.text&&(this.text=data.text),void 0!==data.driver&&(this.driver=data.driver),void 0!==data.appData&&(this.appData=data.appData),void 0!==data.createdAt&&(this.createdAt=data.createdAt),void 0!==data.updatedAt&&(this.updatedAt=data.updatedAt),void 0!==data.systemId&&(this.systemId=data.systemId)}};Object.defineProperty(EmailMessage.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"emailMessage.json",title:"Email Message",type:"object",required:["to","from","status","subject"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",default:"emailMessage",enum:["emailMessage"]},to:{type:"string",pattern:"^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\\.[a-zA-Z0-9-.]+$"},from:{type:"string",pattern:".*<[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\\.[a-zA-Z0-9-.]+>.*",description:"Must be in the format of 'Sender <email@example.com>"},subject:{type:"string"},status:{type:"string",enum:["queued","sending","sent","deferred","delivered","undelivered","bounced","blocked","receiving","received","opened","clicked","unsubscribed","spamReport"]},statusMessage:{type:"string"},html:{type:"string"},text:{type:"string"},driver:{type:"string"},appData:{type:"object"},createdAt:{$ref:"definitions.json#/definitions/date"},updatedAt:{$ref:"definitions.json#/definitions/date"},systemId:{$ref:"definitions.json#/definitions/systemId"}}}}),Object.defineProperty(EmailMessage.prototype,"validator",{get:function(){return validateEmailMessage}});var EnergyReport=class extends Entity{constructor(data){super(data),void 0!==data.id&&(this.id=data.id),void 0!==data.type&&(this.type=data.type),void 0!==data.reportTime&&(this.reportTime=data.reportTime),void 0!==data.roomId&&(this.roomId=data.roomId),void 0!==data.first&&(this.first=data.first),void 0!==data.last&&(this.last=data.last),void 0!==data.consumption&&(this.consumption=data.consumption),void 0!==data.totals&&(this.totals=data.totals),void 0!==data.costPerKw&&(this.costPerKw=data.costPerKw)}};Object.defineProperty(EnergyReport.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"energyReport.json",title:"Energy Report",description:"Hourly Report for Energy based on energy report shards",type:"object",required:["id","type","roomId","first","last","consumption","totals","costPerKw"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",enum:["energyReport"],default:"energyReport"},reportTime:{time:"string",enum:["hourly","daily","monthly"]},roomId:{$ref:"definitions.json#/definitions/id"},first:{type:["string","object"],format:"date-time"},last:{type:["string","object"],format:"date-time"},consumption:{type:"array",items:{type:"object",required:["id","type","kwh"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{$ref:"definitions.json#/definitions/type"},kwh:{type:"number",minimum:0}}}},totals:{type:"array",items:{type:"object",required:["lights","climate","media"],properties:{lights:{type:"number",minimum:0},climate:{type:"number",minimum:0},media:{type:"number",minimum:0}}}},costPerKw:{type:"number",minimum:0}}}}),Object.defineProperty(EnergyReport.prototype,"validator",{get:function(){return validateEnergyReport}});var EnergyReportShard=class extends Entity{constructor(data){super(data),void 0!==data.id&&(this.id=data.id),void 0!==data.type&&(this.type=data.type),void 0!==data.roomId&&(this.roomId=data.roomId),void 0!==data.first&&(this.first=data.first),void 0!==data.last&&(this.last=data.last),void 0!==data.data&&(this.data=data.data),void 0!==data.ndata&&(this.ndata=data.ndata),void 0!==data.expires&&(this.expires=data.expires)}};Object.defineProperty(EnergyReportShard.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"energyReportShard.json",title:"Energy Report Shard",description:"Shard used for Energy Reports",type:"object",required:["id","type","roomId","first","last","data","ndata","expires"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",enum:["energyReportShard"],default:"energyReportShard"},roomId:{$ref:"definitions.json#/definitions/id"},first:{type:["string","object"],format:"date-time"},last:{type:["string","object"],format:"date-time"},data:{type:"array",items:{type:"object",required:["time","watts","id","type","value"],properties:{time:{type:["string","object"],format:"date-time"},watts:{$ref:"definitions.json#/definitions/watts"},id:{$ref:"definitions.json#/definitions/id"},type:{$ref:"definitions.json#/definitions/type"},value:{type:"number",minimum:0,maximum:1}}}},ndata:{type:"integer",minimum:0,maximum:1e5,default:0},expires:{type:["string","object"],format:"date-time"}}}}),Object.defineProperty(EnergyReportShard.prototype,"validator",{get:function(){return validateEnergyReportShard}});var Gateway=class extends Entity{constructor(data){super(data),void 0!==data.id&&(this.id=data.id),void 0!==data.type&&(this.type=data.type),void 0!==data.supportedNotifications&&(this.supportedNotifications=data.supportedNotifications),void 0!==data.notification&&(this.notification=data.notification),void 0!==data.status&&(this.status=data.status),void 0!==data.systemId&&(this.systemId=data.systemId),void 0!==data.driver&&(this.driver=data.driver),void 0!==data.watts&&(this.watts=data.watts),void 0!==data.icon&&(this.icon=data.icon),void 0!==data.modelNumber&&(this.modelNumber=data.modelNumber),void 0!==data.serialNumber&&(this.serialNumber=data.serialNumber),void 0!==data.firmwareVersion&&(this.firmwareVersion=data.firmwareVersion)}};Object.defineProperty(Gateway.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"iotGateway.json",title:"Gateway",description:"Any smart gateway that is an entrypoint for controlling devices",type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},type:{$ref:"definitions.json#/definitions/type"},supportedNotifications:{$ref:"definitions.json#/definitions/supportedNotifications"},notification:{$ref:"definitions.json#/definitions/notification"},status:{type:"string"},systemId:{$ref:"definitions.json#/definitions/systemId"},driver:{$ref:"definitions.json#/definitions/driver"},watts:{$ref:"definitions.json#/definitions/watts"},icon:{type:"string"},modelNumber:{type:"string"},serialNumber:{type:"string"},firmwareVersion:{type:"string"}},required:["id","type","status","driver"]}}),Object.defineProperty(Gateway.prototype,"validator",{get:function(){return validateGateway}});var Identification=class extends Entity{constructor(data){super(data),void 0!==data.id&&(this.id=data.id),void 0!==data.type&&(this.type=data.type),void 0!==data.number&&(this.number=data.number),void 0!==data.maskedNumber&&(this.maskedNumber=data.maskedNumber),void 0!==data.encryptedNumber&&(this.encryptedNumber=data.encryptedNumber),void 0!==data.issued&&(this.issued=data.issued),void 0!==data.expires&&(this.expires=data.expires),void 0!==data.verified&&(this.verified=data.verified),void 0!==data.matched&&(this.matched=data.matched),void 0!==data.firstName&&(this.firstName=data.firstName),void 0!==data.lastName&&(this.lastName=data.lastName),void 0!==data.issuingCountry&&(this.issuingCountry=data.issuingCountry),void 0!==data.systemId&&(this.systemId=data.systemId)}};Object.defineProperty(Identification.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"identification.json",title:"Identification",type:"object",required:["type"],oneOf:[{required:["number"]},{required:["encryptedNumber"]}],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",enum:["driversLicense","passport","identityCard","visa"]},number:{string:"string"},maskedNumber:{string:"string"},encryptedNumber:{string:"string"},issued:{type:["string","object"],format:"date-time"},expires:{type:["string","object","null"],format:"date-time"},verified:{type:"boolean"},matched:{type:"boolean"},firstName:{type:"string"},lastName:{type:"string"},issuingCountry:{string:"string",minLength:2,maxLength:2},systemId:{$ref:"definitions.json#/definitions/systemId"}}}}),Object.defineProperty(Identification.prototype,"validator",{get:function(){return validateIdentification}});var Issue=class extends Entity{constructor(data){super(data),void 0!==data.id&&(this.id=data.id),void 0!==data.type&&(this.type=data.type),void 0!==data.name&&(this.name=data.name),void 0!==data.description&&(this.description=data.description),void 0!==data.department&&(this.department=data.department),void 0!==data.autoAssign&&(this.autoAssign=data.autoAssign),void 0!==data.systemKey&&(this.systemKey=data.systemKey),void 0!==data.autoCreateTicket&&(this.autoCreateTicket=data.autoCreateTicket),void 0!==data.excludedResources&&(this.excludedResources=data.excludedResources)}};Object.defineProperty(Issue.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"issue.json",title:"Issue",description:"An issue associated with ticketing and concierge.",type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",enum:["issue"],default:"issue"},name:{type:"string"},description:{type:"string"},department:{type:"string"},autoAssign:{type:"object",properties:{userId:{type:"string"},vendorId:{type:"string"},priority:{$ref:"ticket.json#/properties/priority"},tags:{type:"array",items:{type:"string"}}}},systemKey:{type:"string"},autoCreateTicket:{type:"boolean",default:!0},excludedResources:{type:"array",description:"A list of resources that should not trigger notifications of this issue",items:{type:"string"},default:[]}},required:["id","type","name","department"]}}),Object.defineProperty(Issue.prototype,"validator",{get:function(){return validateIssue}});var Lock=class extends Entity{constructor(data){super(data),void 0!==data.id&&(this.id=data.id),void 0!==data.name&&(this.name=data.name),void 0!==data.type&&(this.type=data.type),void 0!==data.offline&&(this.offline=data.offline),void 0!==data.supportedNotifications&&(this.supportedNotifications=data.supportedNotifications),void 0!==data.notification&&(this.notification=data.notification),void 0!==data.driver&&(this.driver=data.driver),void 0!==data.state&&(this.state=data.state),void 0!==data.mode&&(this.mode=data.mode),void 0!==data.supportedModes&&(this.supportedModes=data.supportedModes),void 0!==data.batteryLevel&&(this.batteryLevel=data.batteryLevel),void 0!==data.systemId&&(this.systemId=data.systemId),void 0!==data.watts&&(this.watts=data.watts),void 0!==data.icon&&(this.icon=data.icon),void 0!==data.modelNumber&&(this.modelNumber=data.modelNumber),void 0!==data.serialNumber&&(this.serialNumber=data.serialNumber),void 0!==data.firmwareVersion&&(this.firmwareVersion=data.firmwareVersion)}};Object.defineProperty(Lock.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"lock.json",title:"Lock",description:"Any smart lock",type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},name:{type:"string"},type:{$ref:"definitions.json#/definitions/type"},offline:{type:"boolean"},supportedNotifications:{$ref:"definitions.json#/definitions/supportedNotifications"},notification:{$ref:"definitions.json#/definitions/notification"},driver:{$ref:"definitions.json#/definitions/driver"},state:{type:["string","null"],enum:["locked","unlocked",null]},mode:{type:["string","null"],enum:["normal","autoLock","emergencyOpen","emergencyClose","holdOpen","lockdown",null],description:"emergencyOpen and emergencyClose are deprecated and can be removed once Salto, Paxton and Geovision drivers are updated",default:null},supportedModes:{type:"array",uniqueItems:!0,items:{enum:["normal","autoLock","emergencyOpen","emergencyClose","holdOpen","lockdown",null]}},batteryLevel:{$ref:"definitions.json#/definitions/batteryLevel"},systemId:{$ref:"definitions.json#/definitions/systemId"},watts:{$ref:"definitions.json#/definitions/watts"},icon:{type:"string"},modelNumber:{type:"string"},serialNumber:{type:"string"},firmwareVersion:{type:"string"}},required:["id","type","state","driver"]}}),Object.defineProperty(Lock.prototype,"validator",{get:function(){return validateLock}});var Log=class extends Entity{constructor(data){super(data),void 0!==data.type&&(this.type=data.type),void 0!==data.timestamp&&(this.timestamp=data.timestamp),void 0!==data.name&&(this.name=data.name),void 0!==data.field1&&(this.field1=data.field1),void 0!==data.field2&&(this.field2=data.field2),void 0!==data.field3&&(this.field3=data.field3),void 0!==data.field4&&(this.field4=data.field4),void 0!==data.field5&&(this.field5=data.field5),void 0!==data.field6&&(this.field6=data.field6)}};Object.defineProperty(Log.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"log.json",title:"Log",type:"object",properties:{type:{type:"string",default:"log",enum:["log"]},timestamp:{type:"number",minimum:1655907956593},name:{type:"string",description:"Event name"},field1:{type:"object",required:["name","value"],properties:{name:{type:"string"},value:{type:"string"}}},field2:{type:"object",required:["name","value"],properties:{name:{type:"string"},value:{type:"string"}}},field3:{type:"object",required:["name","value"],properties:{name:{type:"string"},value:{type:"string"}}},field4:{type:"object",required:["name","value"],properties:{name:{type:"string"},value:{type:"string"}}},field5:{type:"object",required:["name","value"],properties:{name:{type:"string"},value:{type:"string"}}},field6:{type:"object",required:["name","value"],properties:{name:{type:"string"},value:{type:"string"}}}}}}),Object.defineProperty(Log.prototype,"validator",{get:function(){return validateLog}});var MediaFile=class extends Entity{constructor(data){super(data),void 0!==data.id&&(this.id=data.id),void 0!==data.type&&(this.type=data.type),void 0!==data.name&&(this.name=data.name),void 0!==data.fileHash&&(this.fileHash=data.fileHash),void 0!==data.category&&(this.category=data.category),void 0!==data.mimeType&&(this.mimeType=data.mimeType),void 0!==data.data&&(this.data=data.data),void 0!==data.url&&(this.url=data.url),void 0!==data.width&&(this.width=data.width),void 0!==data.height&&(this.height=data.height),void 0!==data.size&&(this.size=data.size),void 0!==data.uploadUrl&&(this.uploadUrl=data.uploadUrl),void 0!==data.uploadUrlExpires&&(this.uploadUrlExpires=data.uploadUrlExpires),void 0!==data.createdBy&&(this.createdBy=data.createdBy),void 0!==data.systemId&&(this.systemId=data.systemId)}createImageVariant(params){if("image/*"!=this.mimeType)throw new Error("Only dynamic images can have variants");if(!this.url)throw new Error("MediaFile has no url");const query=Object.keys(params).map((key=>`${key}=${params[key]}`)).join(",");return this.url.replace(/\/public$/,`/${query}`)}};Object.defineProperty(MediaFile.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"mediaFile.json",title:"Media File",description:"Any media file",type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",default:"mediaFile",enum:["mediaFile"]},name:{type:"string"},fileHash:{type:"string"},category:{type:"string",description:"This is the category id"},mimeType:{type:"string",enum:["image/*","image/jpeg","image/png","image/gif","image/webp","image/avif","image/svg+xml","application/pdf"]},data:{type:"string"},url:{type:"string",format:"uri"},width:{type:"integer",minimum:0},height:{type:"integer",minimum:0},size:{type:"integer",minimum:0,description:"Size in bytes"},uploadUrl:{type:"string",format:"uri"},uploadUrlExpires:{$ref:"definitions.json#/definitions/date"},createdBy:{type:"string"},systemId:{$ref:"definitions.json#/definitions/systemId"}},additionalProperties:!1,required:["type"]}}),Object.defineProperty(MediaFile.prototype,"validator",{get:function(){return validateMediaFile}});var MediaSource=class extends Entity{constructor(data){super(data),void 0!==data.id&&(this.id=data.id),void 0!==data.type&&(this.type=data.type),void 0!==data.discriminator&&(this.discriminator=data.discriminator),void 0!==data.playlists&&(this.playlists=data.playlists),void 0!==data.remote&&(this.remote=data.remote),void 0!==data.name&&(this.name=data.name),void 0!==data.driver&&(this.driver=data.driver),void 0!==data.offline&&(this.offline=data.offline),void 0!==data.audio&&(this.audio=data.audio),void 0!==data.video&&(this.video=data.video),void 0!==data.powerFeedback&&(this.powerFeedback=data.powerFeedback),void 0!==data.volumeFeedback&&(this.volumeFeedback=data.volumeFeedback),void 0!==data.muted&&(this.muted=data.muted),void 0!==data.volume&&(this.volume=data.volume),void 0!==data.brightness&&(this.brightness=data.brightness),void 0!==data.contrast&&(this.contrast=data.contrast),void 0!==data.power&&(this.power=data.power),void 0!==data.input&&(this.input=data.input),void 0!==data.supportedInputs&&(this.supportedInputs=data.supportedInputs),void 0!==data.supportedOutputs&&(this.supportedOutputs=data.supportedOutputs),void 0!==data.command&&(this.command=data.command),void 0!==data.supportedNotifications&&(this.supportedNotifications=data.supportedNotifications),void 0!==data.notification&&(this.notification=data.notification),void 0!==data.systemId&&(this.systemId=data.systemId),void 0!==data.watts&&(this.watts=data.watts),void 0!==data.icon&&(this.icon=data.icon),void 0!==data.modelNumber&&(this.modelNumber=data.modelNumber),void 0!==data.serialNumber&&(this.serialNumber=data.serialNumber),void 0!==data.firmwareVersion&&(this.firmwareVersion=data.firmwareVersion)}};Object.defineProperty(MediaSource.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"mediaSource.json",title:"Media Source",description:"Any media source",type:"object",required:["id","type","discriminator","audio","video","driver"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",default:"mediaSource",enum:["mediaSource"]},discriminator:{type:"string",enum:["tv","dvr","appleTv","discPlayer","mediaPlayer","paSystem","uncontrolledDevice"]},playlists:{type:"array",items:{type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},name:{$ref:"definitions.json#/definitions/name"}}}},remote:{type:"string",enum:["MR22GA","XRT260","XRT270","HOF-16K 1.2","219863500","SONIFI","AKB76039803","BN59-01388A"]},name:{$ref:"definitions.json#/definitions/name"},driver:{$ref:"definitions.json#/definitions/driver"},offline:{type:"boolean"},audio:{type:"boolean"},video:{type:"boolean"},powerFeedback:{type:"boolean"},volumeFeedback:{type:"boolean"},muted:{type:"boolean"},volume:{type:"number",minimum:0,maximum:100},brightness:{type:"number",minimum:0,maximum:100},contrast:{type:"number",minimum:0,maximum:100},power:{type:"string",enum:["on","off"]},input:{type:"string"},supportedInputs:{type:"array",items:{type:"string"}},supportedOutputs:{type:"array",items:{type:"string"}},command:{type:["string","null"],enum:["mute","volumeUp","volumeDown","brightnessUp","brightnessDown","channelUp","channelDown","number0","number1","number2","number3","number4","number5","number6","number7","number8","number9","lastChannel","display","favoriteChannel","play","playing","stop","stopped","pause","paused","fastForward","fastForwarding","rewind","rewinding","instantReplay","record","ac3","pvrMenu","guide","menu","menuUp","menuDown","menuLeft","menuRight","pageUp","pageDown","select","exit","input","power","enterChannel","enterVolume","enterBrightness","enterContrast","number10","number11","number12","number13","number14","number15","number16","number10Plus","number20Plus","number100","dash","threeChan","threeD","sixChan","a","add","alarm","am","analog","angle","antenna","antennaEast","antennaWest","aspect","audio1","audio2","audio3","audioDumming","audioLevelDown","audioLevelUp","b","back","c","component1","component2","component3","d","home","list","liveTv","discreteInputCable","powerOff","powerOn","setupMenu","skipForward","skipReverse","video1","video2","video3","video4","video5","details","hdmi1","hdmi2","hdmi3","cecDeviceList","mtsSap","red","green","yellow","blue","alert","order"]},supportedNotifications:{$ref:"definitions.json#/definitions/supportedNotifications"},notification:{$ref:"definitions.json#/definitions/notification"},systemId:{$ref:"definitions.json#/definitions/systemId"},watts:{$ref:"definitions.json#/definitions/watts"},icon:{type:"string"},modelNumber:{type:"string"},serialNumber:{type:"string"},firmwareVersion:{type:"string"}},additionalProperties:!1}}),Object.defineProperty(MediaSource.prototype,"validator",{get:function(){return validateMediaSource}});var MotionSensor=class extends Entity{constructor(data){super(data),void 0!==data.id&&(this.id=data.id),void 0!==data.type&&(this.type=data.type),void 0!==data.driver&&(this.driver=data.driver),void 0!==data.systemId&&(this.systemId=data.systemId),void 0!==data.supportedNotifications&&(this.supportedNotifications=data.supportedNotifications),void 0!==data.notification&&(this.notification=data.notification),void 0!==data.watts&&(this.watts=data.watts),void 0!==data.icon&&(this.icon=data.icon),void 0!==data.modelNumber&&(this.modelNumber=data.modelNumber),void 0!==data.serialNumber&&(this.serialNumber=data.serialNumber),void 0!==data.firmwareVersion&&(this.firmwareVersion=data.firmwareVersion)}};Object.defineProperty(MotionSensor.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"motionSensor.json",title:"Motion Sensor",description:"Any smart motion sensor",type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},type:{$ref:"definitions.json#/definitions/type"},driver:{$ref:"definitions.json#/definitions/driver"},systemId:{$ref:"definitions.json#/definitions/systemId"},supportedNotifications:{$ref:"definitions.json#/definitions/supportedNotifications"},notification:{$ref:"definitions.json#/definitions/notification"},watts:{$ref:"definitions.json#/definitions/watts"},icon:{type:"string"},modelNumber:{type:"string"},serialNumber:{type:"string"},firmwareVersion:{type:"string"}},additionalProperties:!1,required:["id","type","driver"]}}),Object.defineProperty(MotionSensor.prototype,"validator",{get:function(){return validateMotionSensor}});var Order=class extends Entity{constructor(data){super(data),void 0!==data.id&&(this.id=data.id),void 0!==data.type&&(this.type=data.type),void 0!==data.orderNumber&&(this.orderNumber=data.orderNumber),void 0!==data.status&&(this.status=data.status),void 0!==data.userId&&(this.userId=data.userId),void 0!==data.reservationId&&(this.reservationId=data.reservationId),void 0!==data.date&&(this.date=data.date),void 0!==data.items&&(this.items=data.items),void 0!==data.taxes&&(this.taxes=data.taxes),void 0!==data.fees&&(this.fees=data.fees),void 0!==data.delivery&&(this.delivery=data.delivery),void 0!==data.payments&&(this.payments=data.payments)}getSubTotal(){return this.items.reduce(((acc,item)=>{const qty=item.quantity||1;return acc+item.price*qty}),0)}getTaxTotal(){const taxes=this.taxes;return taxes?this.items.reduce(((acc,item)=>{if(!item.taxClass)return acc;const tax=taxes.find((t=>t.class===item.taxClass));if(!tax)return acc;const{rateType:rateType,rate:rate}=tax;return"percentage"===rateType?acc+item.price*rate:acc+rate}),0):0}getDeliveryTotal(){const delivery=this.delivery;return delivery?this.items.reduce(((acc,item)=>{if(!item.deliveryClass)return acc;const d=delivery.find((d2=>d2.class===item.deliveryClass));if(!d)return acc;const{rateType:rateType,rate:rate}=d;return"percentage"===rateType?acc+item.price*rate:acc+rate}),0):0}getFeesTotal(){return this.fees.reduce(((acc,fee)=>acc+fee.price),0)}getTotal(){return this.getSubTotal()+this.getTaxTotal()+this.getDeliveryTotal()+this.getFeesTotal()}getPaymentsTotal(){return this.payments.reduce(((acc,payment)=>acc+payment.amount),0)}getBalance(){return this.getTotal()-this.getPaymentsTotal()}};Object.defineProperty(Order.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"order.json",title:"Order",description:"A purchase order for products or services.",type:"object",required:["type","status"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",default:"order",enum:["order"]},orderNumber:{type:"string"},status:{type:"string",enum:["draft","pendingPayment","processing","outForDelivery","completed","paymentFailed","cancelled","refunded"]},userId:{$ref:"definitions.json#/definitions/id",description:"User id of purchaser"},reservationId:{$ref:"definitions.json#/definitions/id",description:"Reservation id if the order is for a reservation"},date:{$ref:"definitions.json#/definitions/date"},items:{type:"array",default:[],items:{type:"object",required:["name","price"],properties:{additionalProperties:!1,name:{type:"string"},sku:{type:"string"},quantity:{type:"number",default:1},price:{type:"number"},taxClass:{type:"string"},deliveryClass:{type:"string"},productId:{type:"string"}}}},taxes:{type:"array",default:[],items:{type:"object",required:["name","rate"],properties:{additionalProperties:!1,name:{type:"string"},class:{type:"string"},rateType:{type:"string",enum:["percentage","flat"],default:"percentage"},rate:{type:"number"},total:{type:"number"}}}},fees:{type:"array",default:[],items:{type:"object",required:["name","price"],properties:{additionalProperties:!1,name:{type:"string"},price:{type:"number"}}}},delivery:{type:"array",default:[],items:{type:"object",required:["name","rate"],properties:{additionalProperties:!1,name:{type:"string"},class:{type:"string"},rateType:{type:"string",enum:["percentage","flat"],default:"percentage"},rate:{type:"number"},total:{type:"number"}}}},payments:{type:"array",default:[],items:{type:"object",properties:{method:{type:"string",enum:["folio","invoice","amex","visa","masterCard","maestro","discover","diners","jcb","applePay","alipay","chinaUnionPay","vpay"]},name:{type:"string"},date:{$ref:"definitions.json#/definitions/date"},amount:{type:"number"},transactionReference:{type:"string"}}}}}}}),Object.defineProperty(Order.prototype,"validator",{get:function(){return validateOrder}});var Organization=class extends Entity{constructor(data){super(data),void 0!==data.id&&(this.id=data.id),void 0!==data.type&&(this.type=data.type),void 0!==data.accountNumber&&(this.accountNumber=data.accountNumber),void 0!==data.name&&(this.name=data.name),void 0!==data.properties&&(this.properties=data.properties),void 0!==data.hostname&&(this.hostname=data.hostname),void 0!==data.appManifest&&(this.appManifest=data.appManifest),void 0!==data.tickets&&(this.tickets=data.tickets),void 0!==data.credentials&&(this.credentials=data.credentials),void 0!==data.createdAt&&(this.createdAt=data.createdAt),void 0!==data.updatedAt&&(this.updatedAt=data.updatedAt)}};Object.defineProperty(Organization.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"organization.json",title:"Organization",type:"object",description:"An organization is a group or entity that subscribes to Kohost software.",required:["accountNumber","name"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",default:"organization",enum:["organization"]},accountNumber:{type:["number","null"],minimum:1e4},name:{type:"string"},properties:{type:"array",items:{type:"string"}},hostname:{type:["string","null"]},appManifest:{type:"object",properties:{name:{type:"string"},short_name:{type:"string"},scope:{type:"string"},start_url:{type:"string"},themeColor:{type:"string"},backgroundColor:{type:"string"},display:{type:"string",enum:["fullscreen","standalone","minimal-ui","browser"],default:"fullscreen"},orientation:{type:"string",enum:["portrait","landscape"],default:"portrait"},splash:{type:"object",properties:{src:{type:"string"},type:{type:"string"},sizes:{type:"string"}}},icons:{type:"array",items:{type:"object",properties:{src:{type:"string"},sizes:{type:"string"},type:{type:"string"}}}},logo:{type:"object",properties:{src:{type:"string"},type:{type:"string"},sizes:{type:"string"}}}},default:{name:"Kohost",short_name:"Kohost",start_url:"/",scope:"/",display:"fullscreen",orientation:"portrait",theme_color:"#1d1f22",background_color:"#1d1f22",icons:[{src:"https://images.kohost.io/cdn-cgi/imagedelivery/vcVX2aBwdFSYr66spcFKaA/9c85047f-ccba-4b1c-3070-5463fbe93b00/w=512",sizes:"512x512",type:"image/png"}],splash:{src:"https://images.kohost.io/cdn-cgi/imagedelivery/vcVX2aBwdFSYr66spcFKaA/034fb112-5326-4d37-373e-d1cc2a4d0400/w=1500",sizes:"1500x800",type:"image/jpg"},logo:{src:"https://images.kohost.io/cdn-cgi/imagedelivery/vcVX2aBwdFSYr66spcFKaA/1e54c54d-3bac-4745-f46f-c2f98036af00/h=75",sizes:"300x75",type:"image/png"}}},tickets:{type:"object",properties:{nextTicketNumber:{type:["string","integer"],default:1}}},credentials:{type:"object",additionalProperties:!0},createdAt:{$ref:"definitions.json#/definitions/createdAt"},updatedAt:{$ref:"definitions.json#/definitions/updatedAt"}}}}),Object.defineProperty(Organization.prototype,"validator",{get:function(){return validateOrganization}});var Payment=class extends Entity{constructor(data){super(data),void 0!==data.id&&(this.id=data.id),void 0!==data.type&&(this.type=data.type),void 0!==data.enabled&&(this.enabled=data.enabled),void 0!==data.storageData&&(this.storageData=data.storageData),void 0!==data.maskedNumber&&(this.maskedNumber=data.maskedNumber),void 0!==data.issued&&(this.issued=data.issued),void 0!==data.expires&&(this.expires=data.expires),void 0!==data.systemId&&(this.systemId=data.systemId)}};Object.defineProperty(Payment.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"payment.json",title:"Payment",type:"object",required:["type","maskedNumber","expires"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",enum:["amex","visa","masterCard","maestro","discover","diners","jcb","applePay","alipay","chinaUnionPay","vpay"]},enabled:{type:"boolean",default:!0},storageData:{type:["string","null"]},maskedNumber:{string:"string"},issued:{type:["string","null"]},expires:{string:"string"},systemId:{$ref:"definitions.json#/definitions/systemId"}}}}),Object.defineProperty(Payment.prototype,"validator",{get:function(){return validatePayment}});var Policy=class extends Entity{constructor(data){super(data),void 0!==data.id&&(this.id=data.id),void 0!==data.type&&(this.type=data.type),void 0!==data.discriminator&&(this.discriminator=data.discriminator),void 0!==data.name&&(this.name=data.name),void 0!==data.description&&(this.description=data.description),void 0!==data.organizationId&&(this.organizationId=data.organizationId),void 0!==data.propertyId&&(this.propertyId=data.propertyId),void 0!==data.permissions&&(this.permissions=data.permissions)}};Object.defineProperty(Policy.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"policy.json",title:"Policy",description:"A policy is a set of permissions that can be applied to a user to limit their access to resources.",type:"object",required:["name","type","organizationId","propertyId","permissions","discriminator"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",default:"policy",enum:["policy"]},discriminator:{type:"string",enum:["user"]},name:{type:"string",minLength:1},description:{type:"string"},organizationId:{type:"string"},propertyId:{type:"string"},permissions:{type:"array",items:{type:"object",required:["entities","effect"],properties:{entities:{type:"array",items:{type:"string",pattern:"^[^:]+(:.+)+$"}},effect:{type:"string",enum:["Allow","Deny"]}}}}}}}),Object.defineProperty(Policy.prototype,"validator",{get:function(){return validatePolicy}});var Product=class extends Entity{constructor(data){super(data),void 0!==data.id&&(this.id=data.id),void 0!==data.type&&(this.type=data.type),void 0!==data.name&&(this.name=data.name),void 0!==data.driver&&(this.driver=data.driver),void 0!==data.description&&(this.description=data.description),void 0!==data.price&&(this.price=data.price),void 0!==data.tax&&(this.tax=data.tax),void 0!==data.image&&(this.image=data.image),void 0!==data.category&&(this.category=data.category),void 0!==data.imageUrl&&(this.imageUrl=data.imageUrl),void 0!==data.systemId&&(this.systemId=data.systemId)}};Object.defineProperty(Product.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"product.json",title:"Product",type:"object",required:["name","price","driver"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",default:"product",enum:["product"]},name:{type:"string"},driver:{$ref:"definitions.json#/definitions/driver"},description:{string:"string"},price:{type:"number"},tax:{type:["number","null"]},image:{$ref:"mediaFile.json"},category:{type:"string"},imageUrl:{format:"uri",pattern:"^https?://"},systemId:{$ref:"definitions.json#/definitions/systemId"}}}}),Object.defineProperty(Product.prototype,"validator",{get:function(){return validateProduct}});var Property=class extends Entity{constructor(data){super(data),void 0!==data.id&&(this.id=data.id),void 0!==data.name&&(this.name=data.name),void 0!==data.type&&(this.type=data.type),void 0!==data.discriminator&&(this.discriminator=data.discriminator),void 0!==data.organization&&(this.organization=data.organization),void 0!==data.departments&&(this.departments=data.departments),void 0!==data.testModeEnabled&&(this.testModeEnabled=data.testModeEnabled),void 0!==data.testMode&&(this.testMode=data.testMode),void 0!==data.timezone&&(this.timezone=data.timezone),void 0!==data.smsNumber&&(this.smsNumber=data.smsNumber),void 0!==data.checkInTime&&(this.checkInTime=data.checkInTime),void 0!==data.checkOutTime&&(this.checkOutTime=data.checkOutTime),void 0!==data.address&&(this.address=data.address),void 0!==data.latitude&&(this.latitude=data.latitude),void 0!==data.longitude&&(this.longitude=data.longitude),void 0!==data.appFeatures&&(this.appFeatures=data.appFeatures),void 0!==data.notifications&&(this.notifications=data.notifications),void 0!==data.credentials&&(this.credentials=data.credentials)}};Object.defineProperty(Property.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"property.json",title:"Property",type:"object",description:"A property is a physical asset or building",required:["id","name","type","organization","timezone","discriminator"],properties:{id:{$ref:"definitions.json#/definitions/id"},name:{type:"string"},type:{type:"string",default:"property",enum:["property"]},discriminator:{type:"string",enum:["hospitality","education","commercial","storage"]},organization:{type:["string","null"],description:"Reference (id) to the organization that owns this property"},departments:{type:"array",items:{type:"string"}},testModeEnabled:{type:"boolean"},testMode:{type:"object",properties:{notificationEmails:{type:"array",items:{type:"string"},description:"Only users with these email addresses will receive notifications in test mode, including sms, email, or push."},notificationEmailDomains:{type:"array",items:{type:"string"},description:"Only users with email addreses ending in these domains will receive notifications in test mode, including sms, email, or push."}}},timezone:{type:"string",description:"IANA timezone string",pattern:"^([a-zA-Z]+/[a-zA-Z_]+)$",examples:["America/New_York","America/Los_Angeles"]},smsNumber:{type:"string"},checkInTime:{type:"string"},checkOutTime:{type:"string"},address:{$ref:"definitions.json#/definitions/address"},latitude:{type:"number"},longitude:{type:"number"},appFeatures:{type:"object",properties:{RoomControl:{type:"object",properties:{disabledSystems:{type:"array",items:{type:"string",enum:["climate","lights","shades","tv","doors"]}},excludedDeviceIds:{type:"array",items:{type:"string"},default:[]},commonAreas:{type:"object",properties:{spaces:{type:"array",items:{type:"string"}}}},alarmConfig:{type:"object",patternProperties:{"^[a-zA-Z0-9]+$":{type:"object",properties:{zoneLockMap:{type:"object",description:"Maps zone numbers to lock ids",additionalProperties:{type:"string"}}}}},examples:[{wZz7hucY:{zoneLockMap:{1:"wc87hucc",2:"bc86hzxc",3:"zv5ah5jv"}}}]}},additionalProperties:!1},CheckIn:{properties:{payment:{},identification:{},earlyCheckIn:{type:"object",required:["dynamic"],properties:{dynamic:{type:"boolean",default:!1},minimumPrice:{type:"number",default:10},maximumPrice:{type:"number",default:50},priceRatioPerHour:{type:"number",default:.1},minimumTime:{type:"string"}}},roomUpgrades:{},pet:{},promos:{}}},CheckOut:{properties:{lateCheckOut:{type:"object",required:["dynamic"],properties:{dynamic:{type:"boolean",default:!1},minimumPrice:{type:"number",default:10},maximumPrice:{type:"number",default:50},priceRatioPerHour:{type:"number",default:.1}}}}},Concierge:{type:"object",properties:{timeTracking:{type:"boolean",default:!1},tipping:{type:"boolean",default:!1},ratings:{type:"boolean",default:!0},newTicketCCs:{type:"array",items:{type:"string"},default:[]},newMessageChannel:{type:["string","null"],enum:["sms","email"],default:"sms",description:"Determines how users should be notified of new messages in the concierge system"},quickServices:{type:"array",items:{type:"object",properties:{name:{type:"string"},description:{type:"string"},department:{type:"string"},image:{$ref:"mediaFile.json"}},required:["name","description","image"]}},issues:{type:"object",properties:{syncWithPropertyId:{type:"string"}}}}},DigitalKey:{type:"object",properties:{system:{type:"string",enum:["salto","dormakaba"]},systemOnline:{type:"boolean",default:!1},systemConfig:{type:"object",properties:{legicUrl:{type:"string",format:"uri"},legicWalletName:{type:"string"},legicAppId:{type:"number"},legicTechUsername:{type:"string"},legicTechPassword:{type:"string"}},additionalProperties:!1,default:{}},enableApp:{type:"boolean"},branding:{type:"object",properties:{logo:{type:"string",format:"uri"},gradient:{type:"array",items:{type:"string",pattern:"^(?!#ffffff)(#[0-9a-fA-F]{6})$"},minItems:2,maxItems:2},highlightedGradient:{type:"array",items:{type:"string",pattern:"^(?!#ffffff)(#[0-9a-fA-F]{6})$"},minItems:2,maxItems:3}}}}},SOS:{type:"object",properties:{active:{type:"boolean"},activeEmergencies:{type:"array",items:{type:"string",enum:["medical","fire","suspiciousPerson","other","conflict","shooter"]}}}},Elevator:{},Experiences:{},Dining:{type:"object",properties:{system:{type:"string",enum:["gotab"]},systemConfig:{type:"object",properties:{landingUrl:{type:"string",format:"uri"},includeUserDetails:{type:"boolean"}},additionalProperties:!1}}},Rentals:{},Shop:{},Spa:{},Valet:{}},additionalProperties:!1,default:{RoomControl:{}}},notifications:{type:"object",properties:{email:{type:"object",properties:{enabled:{type:"boolean"}},additionalProperties:!1},sms:{type:"object",properties:{enabled:{type:"boolean"}},additionalProperties:!1},push:{type:"object",properties:{enabled:{type:"boolean"}},additionalProperties:!1}},additionalProperties:!1,default:{email:{enabled:!1},sms:{enabled:!1},push:{enabled:!1}}},credentials:{type:"object",additionalProperties:!0}}}}),Object.defineProperty(Property.prototype,"validator",{get:function(){return validateProperty}});var Reservation=class extends Entity{constructor(data){super(data),void 0!==data.id&&(this.id=data.id),void 0!==data.driver&&(this.driver=data.driver),void 0!==data.primaryGuest&&(this.primaryGuest=data.primaryGuest),void 0!==data.type&&(this.type=data.type),void 0!==data.sharedGuests&&(this.sharedGuests=data.sharedGuests),void 0!==data.spaceCategory&&(this.spaceCategory=data.spaceCategory),void 0!==data.space&&(this.space=data.space),void 0!==data.previousSpace&&(this.previousSpace=data.previousSpace),void 0!==data.status&&(this.status=data.status),void 0!==data.mobileCheckInSpaceCategoryChanged&&(this.mobileCheckInSpaceCategoryChanged=data.mobileCheckInSpaceCategoryChanged),void 0!==data.mobileCheckInSpaceChanged&&(this.mobileCheckInSpaceChanged=data.mobileCheckInSpaceChanged),void 0!==data.mobileCheckInStatus&&(this.mobileCheckInStatus=data.mobileCheckInStatus),void 0!==data.mobileCheckInStatusMessage&&(this.mobileCheckInStatusMessage=data.mobileCheckInStatusMessage),void 0!==data.confirmationNumber&&(this.confirmationNumber=data.confirmationNumber),void 0!==data.expectedCheckInDateTime&&(this.expectedCheckInDateTime=data.expectedCheckInDateTime),void 0!==data.checkInDateTime&&(this.checkInDateTime=data.checkInDateTime),void 0!==data.checkOutDateTime&&(this.checkOutDateTime=data.checkOutDateTime),void 0!==data.adultCount&&(this.adultCount=data.adultCount),void 0!==data.childCount&&(this.childCount=data.childCount),void 0!==data.spaceCategoryAvailabilites&&(this.spaceCategoryAvailabilites=data.spaceCategoryAvailabilites),void 0!==data.revenue&&(this.revenue=data.revenue),void 0!==data.rateSuppressed&&(this.rateSuppressed=data.rateSuppressed),void 0!==data.payment&&(this.payment=data.payment),void 0!==data.company&&(this.company=data.company),void 0!==data.travelAgent&&(this.travelAgent=data.travelAgent),void 0!==data.systemId&&(this.systemId=data.systemId),void 0!==data.metadata&&(this.metadata=data.metadata),void 0!==data.updatedAt&&(this.updatedAt=data.updatedAt)}checkInTime(tz){return new Date(this.checkInDateTime).toLocaleString("default",{hour:"numeric",minute:"numeric",timeZone:tz})}checkOutTime(tz){return new Date(this.checkOutDateTime).toLocaleString("default",{hour:"numeric",minute:"numeric",timeZone:tz})}getNights(){const start=new Date(this.checkInDateTime),end=new Date(this.checkOutDateTime);let nights=Math.round((end-start)/864e5);return nights<=0&&(nights=1),nights}};Object.defineProperty(Reservation.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"reservation.json",title:"Reservation",type:"object",required:["type","status","checkInDateTime","checkOutDateTime"],properties:{id:{$ref:"definitions.json#/definitions/id"},driver:{$ref:"definitions.json#/definitions/driver"},primaryGuest:{type:"string"},type:{type:"string",default:"reservation",enum:["reservation"]},sharedGuests:{type:"array",items:{type:"string"}},spaceCategory:{type:"string"},space:{type:["string","null"]},previousSpace:{type:["string","null"],default:null,description:"Used when there was a space assigned and it changes"},status:{type:"string",enum:["reserved","checkedIn","checkedOut","cancelled","noShow","enquired","requested","optional"],description:" reserved - confirmed by both parties, before check-in\n checkedIn - checked in\n checkedOut - checked out\n cancelled - Cancelled\n noShow - No show\n enquired - Confirmed neither by the customer nor enterprise\n requested - Confirmed by the customer but not the enterprise (waitlist)\n optional - Confirmed by the enterprise but not the customer (holding)"},mobileCheckInSpaceCategoryChanged:{type:"boolean",description:"spaceCategory has changed from original."},mobileCheckInSpaceChanged:{type:"boolean"},mobileCheckInStatus:{type:"string",enum:["ready","blocked","preArrivalStepsRequired","spaceNotAssigned","spaceNotReady","checkInTimeNotStarted"]},mobileCheckInStatusMessage:{type:"string"},confirmationNumber:{type:"string"},expectedCheckInDateTime:{type:["string","object"],format:"date-time",description:"Expected arrival time of guest."},checkInDateTime:{type:["string","object"],format:"date-time"},checkOutDateTime:{type:["string","object"],format:"date-time"},adultCount:{type:"number",default:1,minimum:1},childCount:{type:"number",default:0},spaceCategoryAvailabilites:{type:"array",items:{type:"object",properties:{id:{type:"string"},price:{type:"number"},unit:{type:"string",enum:["night","stay","hour"]},isUpgrade:{type:"boolean"}}}},revenue:{$ref:"definitions.json#/definitions/revenue"},rateSuppressed:{type:"boolean"},payment:{type:"string"},company:{type:"string"},travelAgent:{type:"string"},systemId:{$ref:"definitions.json#/definitions/systemId"},metadata:{ref:"definitions.json#/definitions/metadata"},updatedAt:{$ref:"definitions.json#/definitions/updatedAt"}}}}),Object.defineProperty(Reservation.prototype,"validator",{get:function(){return validateReservation}});var Room=class extends Entity{constructor(data){super(data),void 0!==data.id&&(this.id=data.id),void 0!==data.type&&(this.type=data.type),void 0!==data.name&&(this.name=data.name),void 0!==data.floor&&(this.floor=data.floor),void 0!==data.dimmers&&(this.dimmers=data.dimmers),void 0!==data.switches&&(this.switches=data.switches),void 0!==data.thermostats&&(this.thermostats=data.thermostats),void 0!==data.locks&&(this.locks=data.locks),void 0!==data.windowCoverings&&(this.windowCoverings=data.windowCoverings),void 0!==data.courtesy&&(this.courtesy=data.courtesy),void 0!==data.cameras&&(this.cameras=data.cameras),void 0!==data.mediaSources&&(this.mediaSources=data.mediaSources),void 0!==data.motionSensors&&(this.motionSensors=data.motionSensors),void 0!==data.alarms&&(this.alarms=data.alarms),void 0!==data.occupiedAt&&(this.occupiedAt=data.occupiedAt),void 0!==data.createdAt&&(this.createdAt=data.createdAt),void 0!==data.updatedAt&&(this.updatedAt=data.updatedAt)}static getDevicePath(type){switch(type){case"tv":case"dvr":case"appleTv":case"discPlayer":case"mediaPlayer":case"uncontrolledDevice":case"mediaSource":return"mediaSources";case"courtesy":return"courtesy";case"switch":return"switches";case"dimmer":return"dimmers";case"thermostat":return"thermostats";case"lock":return"locks";case"windowCovering":return"windowCoverings";case"camera":return"cameras";case"motionSensor":return"motionSensors";case"alarm":return"alarms";default:throw new Error("Invalid device type:"+type)}}static getDeviceTypeFromPath(path){if(!["dimmers","switches","thermostats","locks","windowCoverings","courtesy","cameras","mediaSources","motionSensors","alarms"].includes(path))throw new Error("Invalid device path:"+path);switch(path){case"courtesy":return path;case"switches":return"switch";default:return path.slice(0,-1)}}get hasDimmer(){return this.dimmers?.length>0}get hasSwitch(){return this.switches?.length>0}get hasWindowCovering(){return this.windowCoverings?.length>0}get hasShade(){return this.hasWindowCovering}get hasThermostat(){return this.thermostats?.length>0}get hasClimate(){return this.hasThermostat}get hasLock(){return this.locks?.length>0}get hasCourtesy(){return this.courtesy?.length>0}get hasCamera(){return this.cameras?.length>0}get hasMedia(){return this.mediaSources?.length>0}get hasLight(){const hasDiscriminatorLight=this.switches?.some((sw=>"light"===sw.discriminator||"fan"===sw.discriminator));return this.hasDimmer||hasDiscriminatorLight}get hasAlarm(){return this.alarms?.length>0}get occupied(){const now=new Date,lastOccupied=new Date(this.occupiedAt);return now.getTime()-lastOccupied.getTime()<36e5}};Object.defineProperty(Room.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"room.json",title:"Room",description:"A room represents a physical space of controllable IoT devices",type:"object",required:["id","name"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",enum:["room"],default:"room"},name:{type:"string"},floor:{type:"string"},dimmers:{type:"array",default:[],items:{$ref:"dimmer.json"}},switches:{type:"array",default:[],items:{$ref:"switch.json"}},thermostats:{type:"array",default:[],items:{$ref:"thermostat.json"}},locks:{type:"array",default:[],items:{$ref:"lock.json"}},windowCoverings:{type:"array",default:[],items:{$ref:"windowCovering.json"}},courtesy:{type:"array",default:[],items:{$ref:"courtesy.json"}},cameras:{type:"array",default:[],items:{$ref:"camera.json"}},mediaSources:{type:"array",default:[],items:{$ref:"mediaSource.json"}},motionSensors:{type:"array",default:[],items:{$ref:"motionSensor.json"}},alarms:{type:"array",default:[],items:{$ref:"alarm.json"}},occupiedAt:{$ref:"definitions.json#/definitions/createdAt"},createdAt:{$ref:"definitions.json#/definitions/createdAt"},updatedAt:{$ref:"definitions.json#/definitions/updatedAt"}},additionalProperties:!1}}),Object.defineProperty(Room.prototype,"validator",{get:function(){return validateRoom}});var Scene=class extends Entity{constructor(data){super(data),void 0!==data.id&&(this.id=data.id),void 0!==data.name&&(this.name=data.name),void 0!==data.description&&(this.description=data.description),void 0!==data.type&&(this.type=data.type),void 0!==data.devices&&(this.devices=data.devices),void 0!==data.isDefault&&(this.isDefault=data.isDefault),void 0!==data.showOnUi&&(this.showOnUi=data.showOnUi)}};Object.defineProperty(Scene.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"scene.json",title:"Scene",description:"A room represents a physical space of controllable IoT devices",type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},name:{type:"string"},description:{type:"string"},type:{type:"string",enum:["scene"],default:"scene"},devices:{type:"object",properties:{switches:{type:"array",items:{type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},state:{$ref:"switch.json#/properties/state"}},default:[]}},dimmers:{type:"array",items:{type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},level:{$ref:"dimmer.json#/properties/level"}}},default:[]},windowCoverings:{type:"array",items:{type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},position:{$ref:"windowCovering.json#/properties/position"}}},default:[]},thermostats:{type:"array",items:{type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},hvacMode:{$ref:"thermostat.json#/properties/hvacMode"},setpoints:{$ref:"thermostat.json#/properties/setpoints"},fanMode:{$ref:"thermostat.json#/properties/fanMode"},setpointDelta:{type:"number"}}},default:[]},mediaSources:{type:"array",items:{type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},volume:{type:"number",minimum:0,maximum:100},commands:{type:"array",items:{type:"string"}}}}},locks:{type:"array",items:{type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},state:{$ref:"lock.json#/properties/state"},mode:{$ref:"lock.json#/properties/mode"}}}}},additionalProperties:!1},isDefault:{type:"boolean",default:!1},showOnUi:{type:"boolean",default:!0}},required:["id","name","type"],additionalProperties:!1}}),Object.defineProperty(Scene.prototype,"validator",{get:function(){return validateScene}});var ShortLink=class extends Entity{constructor(data){super(data),void 0!==data.id&&(this.id=data.id),void 0!==data.type&&(this.type=data.type),void 0!==data.title&&(this.title=data.title),void 0!==data.destination&&(this.destination=data.destination),void 0!==data.url&&(this.url=data.url),void 0!==data.systemId&&(this.systemId=data.systemId)}};Object.defineProperty(ShortLink.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"shortLink.json",title:"Short Link",type:"object",required:["destination","url"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",default:"shortLink",enum:["shortLink"]},title:{type:"string"},destination:{string:"string",format:"uri"},url:{string:"string",format:"uri"},systemId:{$ref:"definitions.json#/definitions/systemId"}}}}),Object.defineProperty(ShortLink.prototype,"validator",{get:function(){return validateShortLink}});var SmsMessage=class extends Entity{constructor(data){super(data),void 0!==data.id&&(this.id=data.id),void 0!==data.type&&(this.type=data.type),void 0!==data.to&&(this.to=data.to),void 0!==data.from&&(this.from=data.from),void 0!==data.media&&(this.media=data.media),void 0!==data.status&&(this.status=data.status),void 0!==data.body&&(this.body=data.body),void 0!==data.driver&&(this.driver=data.driver),void 0!==data.appData&&(this.appData=data.appData),void 0!==data.createdAt&&(this.createdAt=data.createdAt),void 0!==data.updatedAt&&(this.updatedAt=data.updatedAt),void 0!==data.systemId&&(this.systemId=data.systemId)}};Object.defineProperty(SmsMessage.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"smsMessage.json",title:"Sms Message",type:"object",required:["to","from","status"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",default:"smsMessage",enum:["smsMessage"]},to:{type:"string",pattern:"^\\+[0-9]{1,14}$"},from:{type:"string",pattern:"^\\+[0-9]{1,14}$"},media:{type:"string",format:"uri"},status:{type:"string",enum:["queued","accepted","sending","sent","failed","delivered","undelivered","receiving","received","read"]},body:{type:"string"},driver:{type:"string"},appData:{type:"object"},createdAt:{$ref:"definitions.json#/definitions/date"},updatedAt:{$ref:"definitions.json#/definitions/date"},systemId:{$ref:"definitions.json#/definitions/systemId"}}}}),Object.defineProperty(SmsMessage.prototype,"validator",{get:function(){return validateSmsMessage}});var Space=class extends Entity{constructor(data){super(data),void 0!==data.id&&(this.id=data.id),void 0!==data.name&&(this.name=data.name),void 0!==data.type&&(this.type=data.type),void 0!==data.discriminator&&(this.discriminator=data.discriminator),void 0!==data.driver&&(this.driver=data.driver),void 0!==data.category&&(this.category=data.category),void 0!==data.rooms&&(this.rooms=data.rooms),void 0!==data.subGroups&&(this.subGroups=data.subGroups),void 0!==data.occupied&&(this.occupied=data.occupied),void 0!==data.inUse&&(this.inUse=data.inUse),void 0!==data.eco&&(this.eco=data.eco),void 0!==data.features&&(this.features=data.features),void 0!==data.maximumOccupancy&&(this.maximumOccupancy=data.maximumOccupancy),void 0!==data.housekeepingStatus&&(this.housekeepingStatus=data.housekeepingStatus),void 0!==data.serviceStatus&&(this.serviceStatus=data.serviceStatus),void 0!==data.systemId&&(this.systemId=data.systemId)}get floor(){const floors=new Set;return this.rooms.forEach((room=>{room.floor&&floors.add(room.floor)})),1==floors.size?[...floors][0]:void 0}get hasDimmer(){return this.rooms.some((room=>room.hasDimmer))}get hasSwitch(){return this.rooms.some((room=>room.hasSwitch))}get hasWindowCovering(){return this.rooms.some((room=>room.hasWindowCovering))}get hasThermostat(){return this.rooms.some((room=>room.hasThermostat))}get hasLock(){return this.rooms.some((room=>room.hasLock))}get hasCourtesy(){return this.rooms.some((room=>room.hasCourtesy))}get hasCamera(){return this.rooms.some((room=>room.hasCamera))}get hasAlarm(){return this.rooms.some((room=>room.hasAlarm))}get hasMedia(){return this.rooms.some((room=>room.hasMedia))}};Object.defineProperty(Space.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"space.json",title:"Space",type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},name:{type:"string",minLength:1},type:{type:"string",default:"space",enum:["space"]},discriminator:{type:"string",enum:["classRoom","hotelRoom","office","building","commonArea","conferenceRoom","lobby","gym","pool","restaurant","unit"]},driver:{$ref:"definitions.json#/definitions/driver"},category:{type:"string",description:"This is the category id"},rooms:{type:"array",items:{type:"string"}},subGroups:{type:"array",items:{type:"string"}},occupied:{type:"boolean"},inUse:{type:"boolean"},eco:{type:"object",additionalProperties:!1,default:{active:!1,allowed:!1,previousState:null},properties:{active:{type:"boolean",default:!1},activatedAt:{type:["string","object"],format:"date-time"},allowed:{type:"boolean",default:!1},previousState:{type:["object","null"],properties:{thermostats:{type:"object",patternProperties:{".*":{type:"object",properties:{setpoints:{$ref:"thermostat.json#/properties/setpoints"}}}}}},additionalProperties:!1}}},features:{type:"array",items:{type:"string",enum:["pet"]}},maximumOccupancy:{type:"number",minimum:1},housekeepingStatus:{type:"string",enum:["clean","dirty","inspected","pickup"]},serviceStatus:{type:"string",enum:["inService","outOfOrder","outOfService"]},systemId:{$ref:"definitions.json#/definitions/systemId"}},if:{properties:{type:{const:"hotelRoom"}}},then:{required:["name","type","features","maximumOccupancy","housekeepingStatus","serviceStatus"],properties:{features:{default:[]},maximumOccupancy:{default:2},housekeepingStatus:{default:"dirty"},serviceStatus:{default:"inService"}}},else:{required:["name","type"]}}}),Object.defineProperty(Space.prototype,"validator",{get:function(){return validateSpace}});var Switch=class extends Entity{constructor(data){super(data),void 0!==data.id&&(this.id=data.id),void 0!==data.name&&(this.name=data.name),void 0!==data.type&&(this.type=data.type),void 0!==data.discriminator&&(this.discriminator=data.discriminator),void 0!==data.supportedNotifications&&(this.supportedNotifications=data.supportedNotifications),void 0!==data.notification&&(this.notification=data.notification),void 0!==data.driver&&(this.driver=data.driver),void 0!==data.offline&&(this.offline=data.offline),void 0!==data.state&&(this.state=data.state),void 0!==data.systemId&&(this.systemId=data.systemId),void 0!==data.watts&&(this.watts=data.watts),void 0!==data.icon&&(this.icon=data.icon),void 0!==data.modelNumber&&(this.modelNumber=data.modelNumber),void 0!==data.serialNumber&&(this.serialNumber=data.serialNumber),void 0!==data.firmwareVersion&&(this.firmwareVersion=data.firmwareVersion)}};Object.defineProperty(Switch.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"switch.json",title:"Switch",description:"Any smart switch",type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},name:{type:"string"},type:{$ref:"definitions.json#/definitions/type"},discriminator:{type:"string",enum:["light","fan","irrigation"]},supportedNotifications:{$ref:"definitions.json#/definitions/supportedNotifications"},notification:{$ref:"definitions.json#/definitions/notification"},driver:{$ref:"definitions.json#/definitions/driver"},offline:{type:"boolean"},state:{type:"string",enum:["on","off"]},systemId:{$ref:"definitions.json#/definitions/systemId"},watts:{$ref:"definitions.json#/definitions/watts"},icon:{type:"string"},modelNumber:{type:"string"},serialNumber:{type:"string"},firmwareVersion:{type:"string"}},required:["id","type","state","driver"]}}),Object.defineProperty(Switch.prototype,"validator",{get:function(){return validateSwitch}});var SystemUser=class extends Entity{constructor(data){super(data),void 0!==data.id&&(this.id=data.id),void 0!==data.type&&(this.type=data.type),void 0!==data.driver&&(this.driver=data.driver),void 0!==data.firstName&&(this.firstName=data.firstName),void 0!==data.lastName&&(this.lastName=data.lastName),void 0!==data.phone&&(this.phone=data.phone),void 0!==data.email&&(this.email=data.email),void 0!==data.address&&(this.address=data.address),void 0!==data.photo&&(this.photo=data.photo),void 0!==data.jobTitle&&(this.jobTitle=data.jobTitle),void 0!==data.dob&&(this.dob=data.dob),void 0!==data.gender&&(this.gender=data.gender),void 0!==data.roles&&(this.roles=data.roles),void 0!==data.nationality&&(this.nationality=data.nationality),void 0!==data.notes&&(this.notes=data.notes),void 0!==data.files&&(this.files=data.files),void 0!==data.identifications&&(this.identifications=data.identifications),void 0!==data.payments&&(this.payments=data.payments),void 0!==data.revenue&&(this.revenue=data.revenue),void 0!==data.createdAt&&(this.createdAt=data.createdAt),void 0!==data.updatedAt&&(this.updatedAt=data.updatedAt),void 0!==data.systemId&&(this.systemId=data.systemId)}};Object.defineProperty(SystemUser.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"systemUser.json",title:"System User",description:"A system user is a user that originated from an external 3rd party system.",type:"object",required:["firstName","lastName"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",default:"systemUser",enum:["systemUser"]},driver:{$ref:"definitions.json#/definitions/driver"},firstName:{type:"string"},lastName:{type:"string"},phone:{type:["string","null"],pattern:"^\\+[0-9]{1,14}$"},email:{type:["string","null"],format:"email"},address:{$ref:"definitions.json#/definitions/address"},photo:{type:"string"},jobTitle:{type:"string"},dob:{type:"string"},gender:{type:"string",enum:["male","female"]},roles:{type:"array",items:{type:"string",enum:["Guest","User","Manager","Maintenance","Administrator","SuperAdmin"]}},nationality:{type:"string",minLength:2,maxLength:2},notes:{type:"array",items:{type:"string"}},files:{type:"array",items:{$ref:"mediaFile.json#"}},identifications:{type:"array",items:{$ref:"identification.json#"}},payments:{type:"array",items:{$ref:"payment.json#"}},revenue:{$ref:"definitions.json#/definitions/revenue"},createdAt:{$ref:"definitions.json#/definitions/createdAt"},updatedAt:{$ref:"definitions.json#/definitions/updatedAt"},systemId:{$ref:"definitions.json#/definitions/systemId"}}}}),Object.defineProperty(SystemUser.prototype,"validator",{get:function(){return validateSystemUser}});var Thermostat=class extends Entity{constructor(data){super(data),void 0!==data.id&&(this.id=data.id),void 0!==data.name&&(this.name=data.name),void 0!==data.type&&(this.type=data.type),void 0!==data.driver&&(this.driver=data.driver),void 0!==data.offline&&(this.offline=data.offline),void 0!==data.supportedNotifications&&(this.supportedNotifications=data.supportedNotifications),void 0!==data.notification&&(this.notification=data.notification),void 0!==data.currentTemperature&&(this.currentTemperature=data.currentTemperature),void 0!==data.currentHumidity&&(this.currentHumidity=data.currentHumidity),void 0!==data.hvacMode&&(this.hvacMode=data.hvacMode),void 0!==data.hvacState&&(this.hvacState=data.hvacState),void 0!==data.fanMode&&(this.fanMode=data.fanMode),void 0!==data.fanState&&(this.fanState=data.fanState),void 0!==data.temperatureScale&&(this.temperatureScale=data.temperatureScale),void 0!==data.humidityScale&&(this.humidityScale=data.humidityScale),void 0!==data.supportedHvacModes&&(this.supportedHvacModes=data.supportedHvacModes),void 0!==data.supportedFanModes&&(this.supportedFanModes=data.supportedFanModes),void 0!==data.setpoints&&(this.setpoints=data.setpoints),void 0!==data.minAutoDelta&&(this.minAutoDelta=data.minAutoDelta),void 0!==data.cycleRate&&(this.cycleRate=data.cycleRate),void 0!==data.batteryLevel&&(this.batteryLevel=data.batteryLevel),void 0!==data.systemId&&(this.systemId=data.systemId),void 0!==data.watts&&(this.watts=data.watts),void 0!==data.icon&&(this.icon=data.icon),void 0!==data.modelNumber&&(this.modelNumber=data.modelNumber),void 0!==data.serialNumber&&(this.serialNumber=data.serialNumber),void 0!==data.firmwareVersion&&(this.firmwareVersion=data.firmwareVersion)}};Object.defineProperty(Thermostat.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"thermostat.json",title:"Thermostat",description:"Any smart thermostat",type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},name:{$ref:"definitions.json#/definitions/name"},type:{$ref:"definitions.json#/definitions/type",default:"thermostat"},driver:{$ref:"definitions.json#/definitions/driver"},offline:{type:"boolean"},supportedNotifications:{$ref:"definitions.json#/definitions/supportedNotifications"},notification:{$ref:"definitions.json#/definitions/notification"},currentTemperature:{type:"number"},currentHumidity:{type:"number",minimum:0},hvacMode:{type:"string",$ref:"#/properties/supportedHvacModes/items"},hvacState:{type:["string","null"],enum:["cooling","heating","off",null]},fanMode:{type:"string",$ref:"#/properties/supportedFanModes/items"},fanState:{type:["string","null"],enum:["off","low","medium","high","on",null]},temperatureScale:{type:"string",enum:["celsius","fahrenheit"],default:"fahrenheit"},humidityScale:{type:["string","null"],enum:["absolute","relative",null]},supportedHvacModes:{type:"array",uniqueItems:!0,minItems:2,items:{enum:["cool","heat","auto","off"]}},supportedFanModes:{type:"array",uniqueItems:!0,items:{enum:["auto","low","medium","high","off","on"]}},setpoints:{type:"object",additionalProperties:!1,properties:{cool:{$ref:"#/$defs/setpoint"},heat:{$ref:"#/$defs/setpoint"},auto:{$ref:"#/$defs/setpoint"}}},minAutoDelta:{type:"number",default:3},cycleRate:{type:"number"},batteryLevel:{$ref:"definitions.json#/definitions/batteryLevel"},systemId:{$ref:"definitions.json#/definitions/systemId"},watts:{$ref:"definitions.json#/definitions/watts"},icon:{type:"string"},modelNumber:{type:"string"},serialNumber:{type:"string"},firmwareVersion:{type:"string"}},$defs:{setpoint:{type:"object",additionalProperties:!1,properties:{value:{$ref:"#/$defs/setpointValue"},min:{$ref:"#/$defs/setpointMinMax"},max:{$ref:"#/$defs/setpointMinMax"}}},setpointValue:{type:"number",minimum:0,maximum:99},setpointMinMax:{type:["number","null"],minimum:0,maximum:99}},required:["id","type","hvacMode","fanMode","hvacState","fanState","setpoints","temperatureScale","supportedHvacModes","supportedFanModes","driver"]}}),Object.defineProperty(Thermostat.prototype,"validator",{get:function(){return validateThermostat}});var Ticket=class extends Entity{constructor(data){super(data),void 0!==data.id&&(this.id=data.id),void 0!==data.type&&(this.type=data.type),void 0!==data.number&&(this.number=data.number),void 0!==data.issueId&&(this.issueId=data.issueId),void 0!==data.conversation&&(this.conversation=data.conversation),void 0!==data.openedBy&&(this.openedBy=data.openedBy),void 0!==data.requester&&(this.requester=data.requester),void 0!==data.assignedTo&&(this.assignedTo=data.assignedTo),void 0!==data.status&&(this.status=data.status),void 0!==data.priority&&(this.priority=data.priority),void 0!==data.tags&&(this.tags=data.tags),void 0!==data.department&&(this.department=data.department),void 0!==data.rating&&(this.rating=data.rating),void 0!==data.ratingComment&&(this.ratingComment=data.ratingComment),void 0!==data.tipAmount&&(this.tipAmount=data.tipAmount),void 0!==data.autoCloseAt&&(this.autoCloseAt=data.autoCloseAt),void 0!==data.scheduleDate&&(this.scheduleDate=data.scheduleDate),void 0!==data.createdAt&&(this.createdAt=data.createdAt),void 0!==data.updatedAt&&(this.updatedAt=data.updatedAt),void 0!==data.solvedAt&&(this.solvedAt=data.solvedAt),void 0!==data.closedAt&&(this.closedAt=data.closedAt)}};Object.defineProperty(Ticket.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"ticket.json",title:"Ticket",description:"A ticket is a request from a user.",type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",enum:["ticket"],default:"ticket"},number:{type:"string"},issueId:{type:"string"},conversation:{type:"array",default:[],items:{type:"object",additionalProperties:!1,properties:{id:{type:"string"},userId:{type:"string"},userName:{type:"string"},vendorId:{type:"string"},vendorName:{type:"string"},systemId:{type:"string"},systemName:{type:"string"},timestamp:{$ref:"definitions.json#/definitions/createdAt"},body:{type:"string"},readBy:{type:"array",default:[],items:{type:"string"}},media:{anyOf:[{$ref:"mediaFile.json"},{type:"null"}]}},anyOf:[{required:["id","userId","timestamp","body"]},{required:["id","systemId","timestamp","body"]},{required:["id","vendorId","timestamp","body"]}]}},openedBy:{type:"object",properties:{userId:{type:"string"},systemId:{type:"string"}}},requester:{type:"object",properties:{systemId:{type:"string"},systemName:{type:"string"},systemPhoto:{anyOf:[{$ref:"mediaFile.json"},{type:"null"},{type:"string"}]},userId:{type:"string"},userName:{type:"string"},userPhoto:{anyOf:[{$ref:"mediaFile.json"},{type:"null"},{type:"string"}]},deviceId:{type:"string"},roomId:{type:"string"},reservationId:{type:"string"},spaceId:{type:"string"},spaceName:{type:"string"}}},assignedTo:{type:"object",properties:{userId:{type:"string"},userName:{type:"string"},userPhoto:{anyOf:[{$ref:"mediaFile.json"},{type:"null"},{type:"string"}]},vendorId:{type:"string"},vendorName:{type:"string"},vendorPhoto:{anyOf:[{$ref:"mediaFile.json"},{type:"null"},{type:"string"}]}}},status:{type:"string",enum:["open","pending","solved","closed"],default:"open"},priority:{type:"string",enum:["low","normal","high"],default:"normal"},tags:{type:"array",default:[],items:{type:"string"}},department:{type:"string"},rating:{type:"number",minimum:0,maximum:5},ratingComment:{type:"string"},tipAmount:{type:"string"},autoCloseAt:{$ref:"definitions.json#/definitions/date"},scheduleDate:{$ref:"definitions.json#/definitions/date"},createdAt:{$ref:"definitions.json#/definitions/date"},updatedAt:{$ref:"definitions.json#/definitions/date"},solvedAt:{$ref:"definitions.json#/definitions/date"},closedAt:{$ref:"definitions.json#/definitions/date"}},required:["id","conversation","requester","status","tags","createdAt","updatedAt"],additionalProperties:!1}}),Object.defineProperty(Ticket.prototype,"validator",{get:function(){return validateTicket}});var TimeSheet=class extends Entity{constructor(data){super(data),void 0!==data.id&&(this.id=data.id),void 0!==data.type&&(this.type=data.type),void 0!==data.userId&&(this.userId=data.userId),void 0!==data.day&&(this.day=data.day),void 0!==data.locked&&(this.locked=data.locked),void 0!==data.timeEntries&&(this.timeEntries=data.timeEntries)}};Object.defineProperty(TimeSheet.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"timeSheet.json",title:"Time Sheet",type:"object",required:["userId","day"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",default:"timeSheet",enum:["timeSheet"]},userId:{$ref:"definitions.json#/definitions/id"},day:{type:["string","object"],format:"date-time"},locked:{type:"boolean",default:!1,description:"If true, the time sheet is locked and cannot be modified"},timeEntries:{type:"array",default:[],items:{type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},discriminator:{type:"string",enum:["working","driving","meeting","break"]},start:{type:["string","object"],format:"date-time"},end:{type:["string","object"],format:"date-time"},comment:{type:"string"},ticketId:{type:"string"}},required:["start","discriminator"],additionalProperties:!1}}}}}),Object.defineProperty(TimeSheet.prototype,"validator",{get:function(){return validateTimeSheet}});var User=class extends Entity{constructor(data){super(data),void 0!==data.id&&(this.id=data.id),void 0!==data.type&&(this.type=data.type),void 0!==data.firstName&&(this.firstName=data.firstName),void 0!==data.lastName&&(this.lastName=data.lastName),void 0!==data.phone&&(this.phone=data.phone),void 0!==data.phoneVerified&&(this.phoneVerified=data.phoneVerified),void 0!==data.email&&(this.email=data.email),void 0!==data.emailVerified&&(this.emailVerified=data.emailVerified),void 0!==data.address&&(this.address=data.address),void 0!==data.secretKey&&(this.secretKey=data.secretKey),void 0!==data.photo&&(this.photo=data.photo),void 0!==data.jobTitle&&(this.jobTitle=data.jobTitle),void 0!==data.dob&&(this.dob=data.dob),void 0!==data.gender&&(this.gender=data.gender),void 0!==data.nationality&&(this.nationality=data.nationality),void 0!==data.permissions&&(this.permissions=data.permissions),void 0!==data.notes&&(this.notes=data.notes),void 0!==data.files&&(this.files=data.files),void 0!==data.identifications&&(this.identifications=data.identifications),void 0!==data.payments&&(this.payments=data.payments),void 0!==data.location&&(this.location=data.location),void 0!==data.reservations&&(this.reservations=data.reservations),void 0!==data.spaceName&&(this.spaceName=data.spaceName),void 0!==data.revenue&&(this.revenue=data.revenue),void 0!==data.createdAt&&(this.createdAt=data.createdAt),void 0!==data.updatedAt&&(this.updatedAt=data.updatedAt),void 0!==data.systems&&(this.systems=data.systems)}get fullName(){return`${this.firstName} ${this.lastName}`}get roles(){const roles=new Set;if(this.permissions)for(const permission of this.permissions)roles.add(permission.role);return Array.from(roles)}get isSuperAdmin(){return this.roles.includes("SuperAdmin")}get isAdmin(){return this.roles.includes("Admin")||this.roles.includes("Administrator")}get isManager(){return this.roles.includes("Manager")}get isUser(){return this.roles.includes("User")}};Object.defineProperty(User.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"user.json",title:"User",type:"object",required:["firstName","lastName"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",default:"user"},firstName:{type:"string"},lastName:{type:"string"},phone:{type:["string","null"],pattern:"^\\+[0-9]{1,14}$"},phoneVerified:{type:"boolean"},email:{type:["string","null"],format:"email"},emailVerified:{type:"boolean"},address:{$ref:"definitions.json#/definitions/address"},secretKey:{type:"string"},photo:{$ref:"mediaFile.json#"},jobTitle:{type:"string"},dob:{type:"string"},gender:{type:"string",enum:["male","female"]},nationality:{type:"string",minLength:2,maxLength:2},permissions:{type:"array",default:[],items:{type:"object",required:["organizationId","propertyId","role"],properties:{organizationId:{type:"string",description:"The ID of the organization the permission is applies to."},propertyId:{type:"string",description:"The ID of the property the permission is applies to."},role:{type:"string",enum:["Guest","User","Manager","Maintenance","Administrator","SuperAdmin"]},department:{type:"string",description:"The department the user belongs to."},policyIds:{type:"array",items:{type:"string",description:"ID of a policy that is applied to this role."}},policies:{type:"array",items:{description:"A policy object populated from the policyIds array.",$ref:"policy.json"}}},additionalProperties:!1}},notes:{type:"array",items:{type:"string"}},files:{type:"array",items:{$ref:"mediaFile.json#"}},identifications:{type:"array",items:{$ref:"identification.json#"}},payments:{type:"array",items:{$ref:"payment.json#"}},location:{type:"object",required:["accuracy","latitude","longitude","timestamp"],additionalProperties:!1,properties:{accuracy:{type:["number","null"]},latitude:{type:["number","null"]},longitude:{type:["number","null"]},timestamp:{type:["number","null"]}}},reservations:{type:"array",items:{$ref:"reservation.json"}},spaceName:{type:"string"},revenue:{$ref:"definitions.json#/definitions/revenue"},createdAt:{$ref:"definitions.json#/definitions/createdAt"},updatedAt:{$ref:"definitions.json#/definitions/updatedAt"},systems:{type:"array",default:[],items:{type:"object",properties:{systemId:{type:"string"},propertyId:{type:"string"},driver:{type:"string"}},required:["systemId","propertyId","driver"],additionalProperties:!1}}}}}),Object.defineProperty(User.prototype,"validator",{get:function(){return validateUser}});var Vendor=class extends Entity{constructor(data){super(data),void 0!==data.id&&(this.id=data.id),void 0!==data.type&&(this.type=data.type),void 0!==data.name&&(this.name=data.name),void 0!==data.phone&&(this.phone=data.phone),void 0!==data.email&&(this.email=data.email),void 0!==data.address&&(this.address=data.address),void 0!==data.photo&&(this.photo=data.photo),void 0!==data.createdAt&&(this.createdAt=data.createdAt),void 0!==data.updatedAt&&(this.updatedAt=data.updatedAt)}};Object.defineProperty(Vendor.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"vendor.json",title:"Vendor",type:"object",required:["name","email"],properties:{id:{$ref:"definitions.json#/definitions/id"},type:{type:"string",default:"vendor",enum:["vendor"]},name:{type:"string"},phone:{type:["string","null"],pattern:"^\\+[0-9]{1,14}$"},email:{type:["string","null"],format:"email"},address:{$ref:"definitions.json#/definitions/address"},photo:{$ref:"mediaFile.json#"},createdAt:{$ref:"definitions.json#/definitions/createdAt"},updatedAt:{$ref:"definitions.json#/definitions/updatedAt"}}}}),Object.defineProperty(Vendor.prototype,"validator",{get:function(){return validateVendor}});var WindowCovering=class extends Entity{constructor(data){super(data),void 0!==data.id&&(this.id=data.id),void 0!==data.name&&(this.name=data.name),void 0!==data.type&&(this.type=data.type),void 0!==data.discriminator&&(this.discriminator=data.discriminator),void 0!==data.supportedNotifications&&(this.supportedNotifications=data.supportedNotifications),void 0!==data.notification&&(this.notification=data.notification),void 0!==data.driver&&(this.driver=data.driver),void 0!==data.offline&&(this.offline=data.offline),void 0!==data.position&&(this.position=data.position),void 0!==data.systemId&&(this.systemId=data.systemId),void 0!==data.watts&&(this.watts=data.watts),void 0!==data.icon&&(this.icon=data.icon),void 0!==data.modelNumber&&(this.modelNumber=data.modelNumber),void 0!==data.serialNumber&&(this.serialNumber=data.serialNumber),void 0!==data.firmwareVersion&&(this.firmwareVersion=data.firmwareVersion)}};Object.defineProperty(WindowCovering.prototype,"schema",{value:{$schema:"http://json-schema.org/draft-07/schema",$id:"windowCovering.json",title:"Window Covering",description:"Any smart window covering",type:"object",properties:{id:{$ref:"definitions.json#/definitions/id"},name:{type:"string"},type:{$ref:"definitions.json#/definitions/type",default:"windowCovering"},discriminator:{type:"string",enum:["basic","variable"],default:"variable"},supportedNotifications:{$ref:"definitions.json#/definitions/supportedNotifications"},notification:{$ref:"definitions.json#/definitions/notification"},driver:{$ref:"definitions.json#/definitions/driver"},offline:{type:"boolean"},position:{type:["number","null"],minimum:0,maximum:100},systemId:{$ref:"definitions.json#/definitions/systemId"},watts:{$ref:"definitions.json#/definitions/watts"},icon:{type:"string"},modelNumber:{type:"string"},serialNumber:{type:"string"},firmwareVersion:{type:"string"}},required:["id","type","position","driver"]}}),Object.defineProperty(WindowCovering.prototype,"validator",{get:function(){return validateWindowCovering}});//# sourceMappingURL=models.cjs.map
|