@eventsdk/sdk 0.3.1 → 0.4.0
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/conformance/event-link/harness.d.ts +13 -0
- package/dist/conformance/event-link/run-suite.d.ts +2 -0
- package/dist/conformance/index.d.ts +2 -0
- package/dist/conformance/index.js +1 -1
- package/dist/contracts/generated/event-link-authorization-request.d.ts +22 -0
- package/dist/contracts/generated/event-link-proposal.d.ts +27 -0
- package/dist/contracts/generated/event-link-token-request.d.ts +7 -0
- package/dist/contracts/generated/portable-event-link-authorization-request.d.ts +98 -0
- package/dist/contracts/generated/portable-event-link-proposal.d.ts +121 -0
- package/dist/contracts/generated/portable-event-link-token-request.d.ts +34 -0
- package/dist/contracts/index.d.ts +8 -3
- package/dist/contracts/index.js +1 -1
- package/dist/contracts/validation/event-link.d.ts +9 -0
- package/dist/event-link/errors.d.ts +5 -0
- package/dist/event-link/exchange.d.ts +9 -0
- package/dist/event-link/index.d.ts +12 -0
- package/dist/event-link/index.js +1 -0
- package/dist/event-link/primitives.d.ts +10 -0
- package/dist/event-link/protocol.d.ts +21 -0
- package/dist/event-link/receiver-ports.d.ts +42 -0
- package/dist/event-link/receiver.d.ts +18 -0
- package/dist/event-link/registration.d.ts +21 -0
- package/dist/event-link/sender.d.ts +22 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -0
- package/package.json +5 -1
package/dist/contracts/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var MAX_DEPTH=64;var MAX_NODES=1e5;var MAX_LENGTH=1048576;function canonicalJson(value){const seen=new Set;return encode(value,seen,{nodes:0,bytes:0},0)}function reserve(bytes,budget){budget.bytes+=bytes;if(budget.bytes>MAX_LENGTH)throw new TypeError("JSON_SIZE_EXCEEDED")}function scalar(text,budget){reserve(new TextEncoder().encode(text).byteLength,budget);return text}function validString(value,budget){if(value.length>MAX_LENGTH)throw new TypeError("JSON_SIZE_EXCEEDED");if(/[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?<![\uD800-\uDBFF])[\uDC00-\uDFFF]/u.test(value))throw new TypeError("INVALID_UNICODE");return scalar(JSON.stringify(value),budget)}function encode(value,seen,budget,depth){if(++budget.nodes>MAX_NODES||depth>MAX_DEPTH)throw new TypeError("JSON_LIMIT_EXCEEDED");if(value===null)return scalar("null",budget);if(typeof value==="string")return validString(value,budget);if(typeof value==="boolean")return scalar(String(value),budget);if(typeof value==="number"){if(!Number.isFinite(value))throw new TypeError("INVALID_JSON_NUMBER");return scalar(JSON.stringify(value),budget)}if(typeof value!=="object")throw new TypeError("INVALID_JSON_VALUE");if(seen.has(value))throw new TypeError("CYCLIC_JSON");seen.add(value);try{return Array.isArray(value)?encodeArray(value,seen,budget,depth):encodeObject(value,seen,budget,depth)}finally{seen.delete(value)}}function encodeArray(value,seen,budget,depth){if(value.length>MAX_NODES)throw new TypeError("JSON_LIMIT_EXCEEDED");if(Reflect.ownKeys(value).length!==value.length+1)throw new TypeError("INVALID_JSON_ARRAY");reserve(value.length===0?2:value.length+1,budget);const values=[];for(let index=0;index<value.length;index++){const property=Object.getOwnPropertyDescriptor(value,String(index));if(!property||!("value"in property))throw new TypeError("INVALID_JSON_ARRAY");values.push(encode(property.value,seen,budget,depth+1))}return`[${values.join(",")}]`}function encodeObject(value,seen,budget,depth){const prototype=Object.getPrototypeOf(value);if(prototype!==Object.prototype&&prototype!==null)throw new TypeError("INVALID_JSON_OBJECT");if(Object.getOwnPropertySymbols(value).length>0)throw new TypeError("INVALID_JSON_OBJECT");const values=[];const keys=Object.keys(value);if(keys.length>MAX_NODES-budget.nodes)throw new TypeError("JSON_LIMIT_EXCEEDED");reserve(keys.length===0?2:keys.length*2+1,budget);for(const key of keys.sort()){const property=Object.getOwnPropertyDescriptor(value,key);if(!property||!("value"in property))throw new TypeError("INVALID_JSON_PROPERTY");values.push(`${validString(key,budget)}:${encode(property.value,seen,budget,depth+1)}`)}return`{${values.join(",")}}`}var EVENTSDK_ORIGIN_PROOF_HEADER="EventSDK-Origin-Proof";var EVENTSDK_ORIGIN_PROOF_TYPE="eventsdk-origin+jws";function isEventOriginProofWireForm(value){if(typeof value!=="string"||value.length>8192||!/^[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+$/.test(value))return false;try{const first=value.split(".")[0]??"";if(first.length>2048)return false;const normalized=first.replace(/-/g,"+").replace(/_/g,"/");const header=JSON.parse(atob(normalized));return!!header&&typeof header==="object"&&"typ"in header&&header.typ===EVENTSDK_ORIGIN_PROOF_TYPE}catch{return false}}var ContractError=class extends Error{constructor(issues){super("The value does not match the EventSDK contract");this.issues=issues;this.name="ContractError"}issues;code="INVALID_CONTRACT"};import runtime0 from"ajv/dist/runtime/ucs2length.js";import runtime1 from"ajv-formats/dist/formats.js";import runtime2 from"ajv/dist/runtime/equal.js";function validate20(data,{instancePath="",parentData,parentDataProperty,rootData=data,dynamicAnchors={}}={}){let vErrors=null;let errors=0;const evaluated0=validate20.evaluated;if(evaluated0.dynamicProps){evaluated0.props=void 0}if(evaluated0.dynamicItems){evaluated0.items=void 0}const _errs0=errors;let valid0=false;const _errs1=errors;if(data!==null){const err0={instancePath,schemaPath:"#/anyOf/0/type",keyword:"type",params:{type:"null"},message:"must be null"};if(vErrors===null){vErrors=[err0]}else{vErrors.push(err0)}errors++}var _valid0=_errs1===errors;valid0=valid0||_valid0;const _errs3=errors;if(typeof data!=="boolean"){const err1={instancePath,schemaPath:"#/anyOf/1/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};if(vErrors===null){vErrors=[err1]}else{vErrors.push(err1)}errors++}var _valid0=_errs3===errors;valid0=valid0||_valid0;const _errs5=errors;if(!(typeof data=="number"&&isFinite(data))){const err2={instancePath,schemaPath:"#/anyOf/2/type",keyword:"type",params:{type:"number"},message:"must be number"};if(vErrors===null){vErrors=[err2]}else{vErrors.push(err2)}errors++}var _valid0=_errs5===errors;valid0=valid0||_valid0;const _errs7=errors;if(typeof data!=="string"){const err3={instancePath,schemaPath:"#/anyOf/3/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err3]}else{vErrors.push(err3)}errors++}var _valid0=_errs7===errors;valid0=valid0||_valid0;const _errs9=errors;if(Array.isArray(data)){const len0=data.length;for(let i0=0;i0<len0;i0++){if(!validate20(data[i0],{instancePath:instancePath+"/"+i0,parentData:data,parentDataProperty:i0,rootData,dynamicAnchors})){vErrors=vErrors===null?validate20.errors:vErrors.concat(validate20.errors);errors=vErrors.length}}}else{const err4={instancePath,schemaPath:"#/anyOf/4/type",keyword:"type",params:{type:"array"},message:"must be array"};if(vErrors===null){vErrors=[err4]}else{vErrors.push(err4)}errors++}var _valid0=_errs9===errors;valid0=valid0||_valid0;if(_valid0){var items1=true}const _errs12=errors;if(data&&typeof data=="object"&&!Array.isArray(data)){for(const key0 in data){if(!validate20(data[key0],{instancePath:instancePath+"/"+key0.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:data,parentDataProperty:key0,rootData,dynamicAnchors})){vErrors=vErrors===null?validate20.errors:vErrors.concat(validate20.errors);errors=vErrors.length}}}else{const err5={instancePath,schemaPath:"#/anyOf/5/type",keyword:"type",params:{type:"object"},message:"must be object"};if(vErrors===null){vErrors=[err5]}else{vErrors.push(err5)}errors++}var _valid0=_errs12===errors;valid0=valid0||_valid0;if(_valid0){var props2=true}if(!valid0){const err6={instancePath,schemaPath:"#/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors===null){vErrors=[err6]}else{vErrors.push(err6)}errors++}else{errors=_errs0;if(vErrors!==null){if(_errs0){vErrors.length=_errs0}else{vErrors=null}}}validate20.errors=vErrors;evaluated0.props=props2;evaluated0.items=items1;return errors===0}validate20.evaluated={dynamicProps:true,dynamicItems:true};var resultRef=validate21;var func1=runtime0.default;var pattern4=new RegExp("^[^\\u0000-\\u001f\\u007f]+$","u");var pattern8=new RegExp("^sha256:[a-f0-9]{64}$","u");function validate21(data,{instancePath="",parentData,parentDataProperty,rootData=data,dynamicAnchors={}}={}){let vErrors=null;let errors=0;const evaluated0=validate21.evaluated;if(evaluated0.dynamicProps){evaluated0.props=void 0}if(evaluated0.dynamicItems){evaluated0.items=void 0}if(data&&typeof data=="object"&&!Array.isArray(data)){if(data.sourceSystem===void 0){const err0={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"sourceSystem"},message:"must have required property 'sourceSystem'"};if(vErrors===null){vErrors=[err0]}else{vErrors.push(err0)}errors++}if(data.resourceType===void 0){const err1={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"resourceType"},message:"must have required property 'resourceType'"};if(vErrors===null){vErrors=[err1]}else{vErrors.push(err1)}errors++}if(data.resourceId===void 0){const err2={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"resourceId"},message:"must have required property 'resourceId'"};if(vErrors===null){vErrors=[err2]}else{vErrors.push(err2)}errors++}if(data.revision===void 0){const err3={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"revision"},message:"must have required property 'revision'"};if(vErrors===null){vErrors=[err3]}else{vErrors.push(err3)}errors++}if(data.digest===void 0){const err4={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"digest"},message:"must have required property 'digest'"};if(vErrors===null){vErrors=[err4]}else{vErrors.push(err4)}errors++}for(const key0 in data){if(!(key0==="sourceSystem"||key0==="resourceType"||key0==="resourceId"||key0==="revision"||key0==="digest"||key0==="evidenceRef")){const err5={instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key0},message:"must NOT have additional properties"};if(vErrors===null){vErrors=[err5]}else{vErrors.push(err5)}errors++}}if(data.sourceSystem!==void 0){let data0=data.sourceSystem;if(typeof data0==="string"){if(func1(data0)>256){const err6={instancePath:instancePath+"/sourceSystem",schemaPath:"#/properties/sourceSystem/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err6]}else{vErrors.push(err6)}errors++}if(func1(data0)<1){const err7={instancePath:instancePath+"/sourceSystem",schemaPath:"#/properties/sourceSystem/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err7]}else{vErrors.push(err7)}errors++}if(!pattern4.test(data0)){const err8={instancePath:instancePath+"/sourceSystem",schemaPath:"#/properties/sourceSystem/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err8]}else{vErrors.push(err8)}errors++}}else{const err9={instancePath:instancePath+"/sourceSystem",schemaPath:"#/properties/sourceSystem/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err9]}else{vErrors.push(err9)}errors++}}if(data.resourceType!==void 0){let data1=data.resourceType;if(typeof data1==="string"){if(func1(data1)>256){const err10={instancePath:instancePath+"/resourceType",schemaPath:"#/properties/resourceType/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err10]}else{vErrors.push(err10)}errors++}if(func1(data1)<1){const err11={instancePath:instancePath+"/resourceType",schemaPath:"#/properties/resourceType/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err11]}else{vErrors.push(err11)}errors++}if(!pattern4.test(data1)){const err12={instancePath:instancePath+"/resourceType",schemaPath:"#/properties/resourceType/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err12]}else{vErrors.push(err12)}errors++}}else{const err13={instancePath:instancePath+"/resourceType",schemaPath:"#/properties/resourceType/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err13]}else{vErrors.push(err13)}errors++}}if(data.resourceId!==void 0){let data2=data.resourceId;if(typeof data2==="string"){if(func1(data2)>256){const err14={instancePath:instancePath+"/resourceId",schemaPath:"#/properties/resourceId/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err14]}else{vErrors.push(err14)}errors++}if(func1(data2)<1){const err15={instancePath:instancePath+"/resourceId",schemaPath:"#/properties/resourceId/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err15]}else{vErrors.push(err15)}errors++}if(!pattern4.test(data2)){const err16={instancePath:instancePath+"/resourceId",schemaPath:"#/properties/resourceId/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err16]}else{vErrors.push(err16)}errors++}}else{const err17={instancePath:instancePath+"/resourceId",schemaPath:"#/properties/resourceId/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err17]}else{vErrors.push(err17)}errors++}}if(data.revision!==void 0){let data3=data.revision;if(typeof data3==="string"){if(func1(data3)>256){const err18={instancePath:instancePath+"/revision",schemaPath:"#/properties/revision/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err18]}else{vErrors.push(err18)}errors++}if(func1(data3)<1){const err19={instancePath:instancePath+"/revision",schemaPath:"#/properties/revision/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err19]}else{vErrors.push(err19)}errors++}if(!pattern4.test(data3)){const err20={instancePath:instancePath+"/revision",schemaPath:"#/properties/revision/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err20]}else{vErrors.push(err20)}errors++}}else{const err21={instancePath:instancePath+"/revision",schemaPath:"#/properties/revision/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err21]}else{vErrors.push(err21)}errors++}}if(data.digest!==void 0){let data4=data.digest;if(typeof data4==="string"){if(!pattern8.test(data4)){const err22={instancePath:instancePath+"/digest",schemaPath:"#/properties/digest/pattern",keyword:"pattern",params:{pattern:"^sha256:[a-f0-9]{64}$"},message:'must match pattern "^sha256:[a-f0-9]{64}$"'};if(vErrors===null){vErrors=[err22]}else{vErrors.push(err22)}errors++}}else{const err23={instancePath:instancePath+"/digest",schemaPath:"#/properties/digest/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err23]}else{vErrors.push(err23)}errors++}}if(data.evidenceRef!==void 0){let data5=data.evidenceRef;if(typeof data5==="string"){if(func1(data5)>256){const err24={instancePath:instancePath+"/evidenceRef",schemaPath:"#/properties/evidenceRef/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err24]}else{vErrors.push(err24)}errors++}if(func1(data5)<1){const err25={instancePath:instancePath+"/evidenceRef",schemaPath:"#/properties/evidenceRef/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err25]}else{vErrors.push(err25)}errors++}if(!pattern4.test(data5)){const err26={instancePath:instancePath+"/evidenceRef",schemaPath:"#/properties/evidenceRef/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err26]}else{vErrors.push(err26)}errors++}}else{const err27={instancePath:instancePath+"/evidenceRef",schemaPath:"#/properties/evidenceRef/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err27]}else{vErrors.push(err27)}errors++}}}else{const err28={instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};if(vErrors===null){vErrors=[err28]}else{vErrors.push(err28)}errors++}validate21.errors=vErrors;return errors===0}validate21.evaluated={props:true,dynamicProps:false,dynamicItems:false};var cloudEvent=validate22;var schema33={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://eventsdk.dev/schemas/v1/cloud-event.schema.json",title:"CloudEvent",type:"object",additionalProperties:false,properties:{specversion:{const:"1.0",type:"string"},id:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u001f\\u007f]+$"},source:{type:"string",minLength:1,maxLength:2048,pattern:"^[^\\u0000-\\u001f\\u007f]+$",format:"uri"},type:{type:"string",minLength:1,maxLength:256,pattern:"^[a-zA-Z0-9][a-zA-Z0-9._-]*\\.v[1-9][0-9]*$"},time:{type:"string",format:"date-time",maxLength:64},dataschema:{type:"string",minLength:1,maxLength:2048,pattern:"^[^\\u0000-\\u001f\\u007f]+$",format:"uri"},datacontenttype:{const:"application/json",type:"string"},profile:{const:"eventsdk/1.0",type:"string"},kind:{enum:["EVENT","HANDOFF","RECEIPT"],type:"string"},serviceorigin:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u001f\\u007f]+$"},sourcetenant:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u001f\\u007f]+$",description:"Opaque tenant reference scoped by the required serviceorigin. The namespace is the ordered pair (serviceorigin, sourcetenant)."},audience:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u001f\\u007f]+$"},connectionref:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u001f\\u007f]+$"},grantref:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u001f\\u007f]+$"},grantversion:{type:"integer",minimum:1,maximum:2147483647},correlationid:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u001f\\u007f]+$"},causationid:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u001f\\u007f]+$"},subject:{type:"string",minLength:1,maxLength:1024,pattern:"^[^\\u0000-\\u001f\\u007f]+$"},data:{$ref:"json-value.schema.json"}},required:["specversion","id","source","type","time","dataschema","datacontenttype","profile","kind","serviceorigin","sourcetenant","audience","connectionref","grantref","grantversion","correlationid","data"]};var func11=Object.prototype.hasOwnProperty;var pattern12=new RegExp("^[a-zA-Z0-9][a-zA-Z0-9._-]*\\.v[1-9][0-9]*$","u");var formats0=runtime1.fullFormats.uri;var formats2=runtime1.fullFormats["date-time"];function validate22(data,{instancePath="",parentData,parentDataProperty,rootData=data,dynamicAnchors={}}={}){let vErrors=null;let errors=0;const evaluated0=validate22.evaluated;if(evaluated0.dynamicProps){evaluated0.props=void 0}if(evaluated0.dynamicItems){evaluated0.items=void 0}if(data&&typeof data=="object"&&!Array.isArray(data)){if(data.specversion===void 0){const err0={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"specversion"},message:"must have required property 'specversion'"};if(vErrors===null){vErrors=[err0]}else{vErrors.push(err0)}errors++}if(data.id===void 0){const err1={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};if(vErrors===null){vErrors=[err1]}else{vErrors.push(err1)}errors++}if(data.source===void 0){const err2={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"source"},message:"must have required property 'source'"};if(vErrors===null){vErrors=[err2]}else{vErrors.push(err2)}errors++}if(data.type===void 0){const err3={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};if(vErrors===null){vErrors=[err3]}else{vErrors.push(err3)}errors++}if(data.time===void 0){const err4={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"time"},message:"must have required property 'time'"};if(vErrors===null){vErrors=[err4]}else{vErrors.push(err4)}errors++}if(data.dataschema===void 0){const err5={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"dataschema"},message:"must have required property 'dataschema'"};if(vErrors===null){vErrors=[err5]}else{vErrors.push(err5)}errors++}if(data.datacontenttype===void 0){const err6={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"datacontenttype"},message:"must have required property 'datacontenttype'"};if(vErrors===null){vErrors=[err6]}else{vErrors.push(err6)}errors++}if(data.profile===void 0){const err7={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"profile"},message:"must have required property 'profile'"};if(vErrors===null){vErrors=[err7]}else{vErrors.push(err7)}errors++}if(data.kind===void 0){const err8={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"kind"},message:"must have required property 'kind'"};if(vErrors===null){vErrors=[err8]}else{vErrors.push(err8)}errors++}if(data.serviceorigin===void 0){const err9={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"serviceorigin"},message:"must have required property 'serviceorigin'"};if(vErrors===null){vErrors=[err9]}else{vErrors.push(err9)}errors++}if(data.sourcetenant===void 0){const err10={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"sourcetenant"},message:"must have required property 'sourcetenant'"};if(vErrors===null){vErrors=[err10]}else{vErrors.push(err10)}errors++}if(data.audience===void 0){const err11={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"audience"},message:"must have required property 'audience'"};if(vErrors===null){vErrors=[err11]}else{vErrors.push(err11)}errors++}if(data.connectionref===void 0){const err12={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"connectionref"},message:"must have required property 'connectionref'"};if(vErrors===null){vErrors=[err12]}else{vErrors.push(err12)}errors++}if(data.grantref===void 0){const err13={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"grantref"},message:"must have required property 'grantref'"};if(vErrors===null){vErrors=[err13]}else{vErrors.push(err13)}errors++}if(data.grantversion===void 0){const err14={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"grantversion"},message:"must have required property 'grantversion'"};if(vErrors===null){vErrors=[err14]}else{vErrors.push(err14)}errors++}if(data.correlationid===void 0){const err15={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"correlationid"},message:"must have required property 'correlationid'"};if(vErrors===null){vErrors=[err15]}else{vErrors.push(err15)}errors++}if(data.data===void 0){const err16={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"data"},message:"must have required property 'data'"};if(vErrors===null){vErrors=[err16]}else{vErrors.push(err16)}errors++}for(const key0 in data){if(!func11.call(schema33.properties,key0)){const err17={instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key0},message:"must NOT have additional properties"};if(vErrors===null){vErrors=[err17]}else{vErrors.push(err17)}errors++}}if(data.specversion!==void 0){let data0=data.specversion;if(typeof data0!=="string"){const err18={instancePath:instancePath+"/specversion",schemaPath:"#/properties/specversion/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err18]}else{vErrors.push(err18)}errors++}if("1.0"!==data0){const err19={instancePath:instancePath+"/specversion",schemaPath:"#/properties/specversion/const",keyword:"const",params:{allowedValue:"1.0"},message:"must be equal to constant"};if(vErrors===null){vErrors=[err19]}else{vErrors.push(err19)}errors++}}if(data.id!==void 0){let data1=data.id;if(typeof data1==="string"){if(func1(data1)>256){const err20={instancePath:instancePath+"/id",schemaPath:"#/properties/id/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err20]}else{vErrors.push(err20)}errors++}if(func1(data1)<1){const err21={instancePath:instancePath+"/id",schemaPath:"#/properties/id/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err21]}else{vErrors.push(err21)}errors++}if(!pattern4.test(data1)){const err22={instancePath:instancePath+"/id",schemaPath:"#/properties/id/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err22]}else{vErrors.push(err22)}errors++}}else{const err23={instancePath:instancePath+"/id",schemaPath:"#/properties/id/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err23]}else{vErrors.push(err23)}errors++}}if(data.source!==void 0){let data2=data.source;if(typeof data2==="string"){if(func1(data2)>2048){const err24={instancePath:instancePath+"/source",schemaPath:"#/properties/source/maxLength",keyword:"maxLength",params:{limit:2048},message:"must NOT have more than 2048 characters"};if(vErrors===null){vErrors=[err24]}else{vErrors.push(err24)}errors++}if(func1(data2)<1){const err25={instancePath:instancePath+"/source",schemaPath:"#/properties/source/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err25]}else{vErrors.push(err25)}errors++}if(!pattern4.test(data2)){const err26={instancePath:instancePath+"/source",schemaPath:"#/properties/source/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err26]}else{vErrors.push(err26)}errors++}if(!formats0(data2)){const err27={instancePath:instancePath+"/source",schemaPath:"#/properties/source/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};if(vErrors===null){vErrors=[err27]}else{vErrors.push(err27)}errors++}}else{const err28={instancePath:instancePath+"/source",schemaPath:"#/properties/source/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err28]}else{vErrors.push(err28)}errors++}}if(data.type!==void 0){let data3=data.type;if(typeof data3==="string"){if(func1(data3)>256){const err29={instancePath:instancePath+"/type",schemaPath:"#/properties/type/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err29]}else{vErrors.push(err29)}errors++}if(func1(data3)<1){const err30={instancePath:instancePath+"/type",schemaPath:"#/properties/type/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err30]}else{vErrors.push(err30)}errors++}if(!pattern12.test(data3)){const err31={instancePath:instancePath+"/type",schemaPath:"#/properties/type/pattern",keyword:"pattern",params:{pattern:"^[a-zA-Z0-9][a-zA-Z0-9._-]*\\.v[1-9][0-9]*$"},message:'must match pattern "^[a-zA-Z0-9][a-zA-Z0-9._-]*\\.v[1-9][0-9]*$"'};if(vErrors===null){vErrors=[err31]}else{vErrors.push(err31)}errors++}}else{const err32={instancePath:instancePath+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err32]}else{vErrors.push(err32)}errors++}}if(data.time!==void 0){let data4=data.time;if(typeof data4==="string"){if(func1(data4)>64){const err33={instancePath:instancePath+"/time",schemaPath:"#/properties/time/maxLength",keyword:"maxLength",params:{limit:64},message:"must NOT have more than 64 characters"};if(vErrors===null){vErrors=[err33]}else{vErrors.push(err33)}errors++}if(!formats2.validate(data4)){const err34={instancePath:instancePath+"/time",schemaPath:"#/properties/time/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};if(vErrors===null){vErrors=[err34]}else{vErrors.push(err34)}errors++}}else{const err35={instancePath:instancePath+"/time",schemaPath:"#/properties/time/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err35]}else{vErrors.push(err35)}errors++}}if(data.dataschema!==void 0){let data5=data.dataschema;if(typeof data5==="string"){if(func1(data5)>2048){const err36={instancePath:instancePath+"/dataschema",schemaPath:"#/properties/dataschema/maxLength",keyword:"maxLength",params:{limit:2048},message:"must NOT have more than 2048 characters"};if(vErrors===null){vErrors=[err36]}else{vErrors.push(err36)}errors++}if(func1(data5)<1){const err37={instancePath:instancePath+"/dataschema",schemaPath:"#/properties/dataschema/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err37]}else{vErrors.push(err37)}errors++}if(!pattern4.test(data5)){const err38={instancePath:instancePath+"/dataschema",schemaPath:"#/properties/dataschema/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err38]}else{vErrors.push(err38)}errors++}if(!formats0(data5)){const err39={instancePath:instancePath+"/dataschema",schemaPath:"#/properties/dataschema/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};if(vErrors===null){vErrors=[err39]}else{vErrors.push(err39)}errors++}}else{const err40={instancePath:instancePath+"/dataschema",schemaPath:"#/properties/dataschema/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err40]}else{vErrors.push(err40)}errors++}}if(data.datacontenttype!==void 0){let data6=data.datacontenttype;if(typeof data6!=="string"){const err41={instancePath:instancePath+"/datacontenttype",schemaPath:"#/properties/datacontenttype/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err41]}else{vErrors.push(err41)}errors++}if("application/json"!==data6){const err42={instancePath:instancePath+"/datacontenttype",schemaPath:"#/properties/datacontenttype/const",keyword:"const",params:{allowedValue:"application/json"},message:"must be equal to constant"};if(vErrors===null){vErrors=[err42]}else{vErrors.push(err42)}errors++}}if(data.profile!==void 0){let data7=data.profile;if(typeof data7!=="string"){const err43={instancePath:instancePath+"/profile",schemaPath:"#/properties/profile/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err43]}else{vErrors.push(err43)}errors++}if("eventsdk/1.0"!==data7){const err44={instancePath:instancePath+"/profile",schemaPath:"#/properties/profile/const",keyword:"const",params:{allowedValue:"eventsdk/1.0"},message:"must be equal to constant"};if(vErrors===null){vErrors=[err44]}else{vErrors.push(err44)}errors++}}if(data.kind!==void 0){let data8=data.kind;if(typeof data8!=="string"){const err45={instancePath:instancePath+"/kind",schemaPath:"#/properties/kind/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err45]}else{vErrors.push(err45)}errors++}if(!(data8==="EVENT"||data8==="HANDOFF"||data8==="RECEIPT")){const err46={instancePath:instancePath+"/kind",schemaPath:"#/properties/kind/enum",keyword:"enum",params:{allowedValues:schema33.properties.kind.enum},message:"must be equal to one of the allowed values"};if(vErrors===null){vErrors=[err46]}else{vErrors.push(err46)}errors++}}if(data.serviceorigin!==void 0){let data9=data.serviceorigin;if(typeof data9==="string"){if(func1(data9)>256){const err47={instancePath:instancePath+"/serviceorigin",schemaPath:"#/properties/serviceorigin/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err47]}else{vErrors.push(err47)}errors++}if(func1(data9)<1){const err48={instancePath:instancePath+"/serviceorigin",schemaPath:"#/properties/serviceorigin/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err48]}else{vErrors.push(err48)}errors++}if(!pattern4.test(data9)){const err49={instancePath:instancePath+"/serviceorigin",schemaPath:"#/properties/serviceorigin/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err49]}else{vErrors.push(err49)}errors++}}else{const err50={instancePath:instancePath+"/serviceorigin",schemaPath:"#/properties/serviceorigin/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err50]}else{vErrors.push(err50)}errors++}}if(data.sourcetenant!==void 0){let data10=data.sourcetenant;if(typeof data10==="string"){if(func1(data10)>256){const err51={instancePath:instancePath+"/sourcetenant",schemaPath:"#/properties/sourcetenant/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err51]}else{vErrors.push(err51)}errors++}if(func1(data10)<1){const err52={instancePath:instancePath+"/sourcetenant",schemaPath:"#/properties/sourcetenant/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err52]}else{vErrors.push(err52)}errors++}if(!pattern4.test(data10)){const err53={instancePath:instancePath+"/sourcetenant",schemaPath:"#/properties/sourcetenant/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err53]}else{vErrors.push(err53)}errors++}}else{const err54={instancePath:instancePath+"/sourcetenant",schemaPath:"#/properties/sourcetenant/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err54]}else{vErrors.push(err54)}errors++}}if(data.audience!==void 0){let data11=data.audience;if(typeof data11==="string"){if(func1(data11)>256){const err55={instancePath:instancePath+"/audience",schemaPath:"#/properties/audience/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err55]}else{vErrors.push(err55)}errors++}if(func1(data11)<1){const err56={instancePath:instancePath+"/audience",schemaPath:"#/properties/audience/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err56]}else{vErrors.push(err56)}errors++}if(!pattern4.test(data11)){const err57={instancePath:instancePath+"/audience",schemaPath:"#/properties/audience/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err57]}else{vErrors.push(err57)}errors++}}else{const err58={instancePath:instancePath+"/audience",schemaPath:"#/properties/audience/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err58]}else{vErrors.push(err58)}errors++}}if(data.connectionref!==void 0){let data12=data.connectionref;if(typeof data12==="string"){if(func1(data12)>256){const err59={instancePath:instancePath+"/connectionref",schemaPath:"#/properties/connectionref/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err59]}else{vErrors.push(err59)}errors++}if(func1(data12)<1){const err60={instancePath:instancePath+"/connectionref",schemaPath:"#/properties/connectionref/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err60]}else{vErrors.push(err60)}errors++}if(!pattern4.test(data12)){const err61={instancePath:instancePath+"/connectionref",schemaPath:"#/properties/connectionref/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err61]}else{vErrors.push(err61)}errors++}}else{const err62={instancePath:instancePath+"/connectionref",schemaPath:"#/properties/connectionref/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err62]}else{vErrors.push(err62)}errors++}}if(data.grantref!==void 0){let data13=data.grantref;if(typeof data13==="string"){if(func1(data13)>256){const err63={instancePath:instancePath+"/grantref",schemaPath:"#/properties/grantref/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err63]}else{vErrors.push(err63)}errors++}if(func1(data13)<1){const err64={instancePath:instancePath+"/grantref",schemaPath:"#/properties/grantref/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err64]}else{vErrors.push(err64)}errors++}if(!pattern4.test(data13)){const err65={instancePath:instancePath+"/grantref",schemaPath:"#/properties/grantref/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err65]}else{vErrors.push(err65)}errors++}}else{const err66={instancePath:instancePath+"/grantref",schemaPath:"#/properties/grantref/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err66]}else{vErrors.push(err66)}errors++}}if(data.grantversion!==void 0){let data14=data.grantversion;if(!(typeof data14=="number"&&!(data14%1)&&!isNaN(data14)&&isFinite(data14))){const err67={instancePath:instancePath+"/grantversion",schemaPath:"#/properties/grantversion/type",keyword:"type",params:{type:"integer"},message:"must be integer"};if(vErrors===null){vErrors=[err67]}else{vErrors.push(err67)}errors++}if(typeof data14=="number"&&isFinite(data14)){if(data14>2147483647||isNaN(data14)){const err68={instancePath:instancePath+"/grantversion",schemaPath:"#/properties/grantversion/maximum",keyword:"maximum",params:{comparison:"<=",limit:2147483647},message:"must be <= 2147483647"};if(vErrors===null){vErrors=[err68]}else{vErrors.push(err68)}errors++}if(data14<1||isNaN(data14)){const err69={instancePath:instancePath+"/grantversion",schemaPath:"#/properties/grantversion/minimum",keyword:"minimum",params:{comparison:">=",limit:1},message:"must be >= 1"};if(vErrors===null){vErrors=[err69]}else{vErrors.push(err69)}errors++}}}if(data.correlationid!==void 0){let data15=data.correlationid;if(typeof data15==="string"){if(func1(data15)>256){const err70={instancePath:instancePath+"/correlationid",schemaPath:"#/properties/correlationid/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err70]}else{vErrors.push(err70)}errors++}if(func1(data15)<1){const err71={instancePath:instancePath+"/correlationid",schemaPath:"#/properties/correlationid/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err71]}else{vErrors.push(err71)}errors++}if(!pattern4.test(data15)){const err72={instancePath:instancePath+"/correlationid",schemaPath:"#/properties/correlationid/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err72]}else{vErrors.push(err72)}errors++}}else{const err73={instancePath:instancePath+"/correlationid",schemaPath:"#/properties/correlationid/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err73]}else{vErrors.push(err73)}errors++}}if(data.causationid!==void 0){let data16=data.causationid;if(typeof data16==="string"){if(func1(data16)>256){const err74={instancePath:instancePath+"/causationid",schemaPath:"#/properties/causationid/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err74]}else{vErrors.push(err74)}errors++}if(func1(data16)<1){const err75={instancePath:instancePath+"/causationid",schemaPath:"#/properties/causationid/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err75]}else{vErrors.push(err75)}errors++}if(!pattern4.test(data16)){const err76={instancePath:instancePath+"/causationid",schemaPath:"#/properties/causationid/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err76]}else{vErrors.push(err76)}errors++}}else{const err77={instancePath:instancePath+"/causationid",schemaPath:"#/properties/causationid/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err77]}else{vErrors.push(err77)}errors++}}if(data.subject!==void 0){let data17=data.subject;if(typeof data17==="string"){if(func1(data17)>1024){const err78={instancePath:instancePath+"/subject",schemaPath:"#/properties/subject/maxLength",keyword:"maxLength",params:{limit:1024},message:"must NOT have more than 1024 characters"};if(vErrors===null){vErrors=[err78]}else{vErrors.push(err78)}errors++}if(func1(data17)<1){const err79={instancePath:instancePath+"/subject",schemaPath:"#/properties/subject/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err79]}else{vErrors.push(err79)}errors++}if(!pattern4.test(data17)){const err80={instancePath:instancePath+"/subject",schemaPath:"#/properties/subject/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err80]}else{vErrors.push(err80)}errors++}}else{const err81={instancePath:instancePath+"/subject",schemaPath:"#/properties/subject/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err81]}else{vErrors.push(err81)}errors++}}if(data.data!==void 0){if(!validate20(data.data,{instancePath:instancePath+"/data",parentData:data,parentDataProperty:"data",rootData,dynamicAnchors})){vErrors=vErrors===null?validate20.errors:vErrors.concat(validate20.errors);errors=vErrors.length}}}else{const err82={instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};if(vErrors===null){vErrors=[err82]}else{vErrors.push(err82)}errors++}validate22.errors=vErrors;return errors===0}validate22.evaluated={props:true,dynamicProps:false,dynamicItems:false};var cloudEventContext=validate24;var schema34={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://eventsdk.dev/schemas/v1/cloud-event-context.schema.json",title:"CloudEventContext",type:"object",additionalProperties:false,properties:{specversion:{const:"1.0",type:"string"},id:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u001f\\u007f]+$"},source:{type:"string",minLength:1,maxLength:2048,pattern:"^[^\\u0000-\\u001f\\u007f]+$",format:"uri"},type:{type:"string",minLength:1,maxLength:256,pattern:"^[a-zA-Z0-9][a-zA-Z0-9._-]*\\.v[1-9][0-9]*$"},time:{type:"string",format:"date-time",maxLength:64},dataschema:{type:"string",minLength:1,maxLength:2048,pattern:"^[^\\u0000-\\u001f\\u007f]+$",format:"uri"},datacontenttype:{const:"application/json",type:"string"},profile:{const:"eventsdk/1.1",type:"string"},kind:{enum:["EVENT","HANDOFF","RECEIPT"],type:"string"},serviceorigin:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u001f\\u007f]+$"},sourcetenant:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u001f\\u007f]+$",description:"Opaque tenant reference scoped by the required serviceorigin. The namespace is the ordered pair (serviceorigin, sourcetenant)."},audience:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u001f\\u007f]+$"},connectionref:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u001f\\u007f]+$"},grantref:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u001f\\u007f]+$"},grantversion:{type:"integer",minimum:1,maximum:2147483647},correlationid:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u001f\\u007f]+$"},causationid:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u001f\\u007f]+$"},subject:{type:"string",minLength:1,maxLength:1024,pattern:"^[^\\u0000-\\u001f\\u007f]+$"},data:{$ref:"json-value.schema.json"},orgnamespace:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u001f\\u007f]+$"},orgref:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u001f\\u007f]+$"},projectnamespace:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u001f\\u007f]+$"},projectref:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u001f\\u007f]+$"},principalnamespace:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u001f\\u007f]+$"},principalref:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u001f\\u007f]+$"},resourcenamespace:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u001f\\u007f]+$"},resourceref:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u001f\\u007f]+$"}},required:["specversion","id","source","type","time","dataschema","datacontenttype","profile","kind","serviceorigin","sourcetenant","audience","connectionref","grantref","grantversion","correlationid","data"],dependentRequired:{orgnamespace:["orgref"],orgref:["orgnamespace"],projectnamespace:["projectref"],projectref:["projectnamespace"],principalnamespace:["principalref"],principalref:["principalnamespace"],resourcenamespace:["resourceref"],resourceref:["resourcenamespace"]}};function validate24(data,{instancePath="",parentData,parentDataProperty,rootData=data,dynamicAnchors={}}={}){let vErrors=null;let errors=0;const evaluated0=validate24.evaluated;if(evaluated0.dynamicProps){evaluated0.props=void 0}if(evaluated0.dynamicItems){evaluated0.items=void 0}if(data&&typeof data=="object"&&!Array.isArray(data)){if(data.specversion===void 0){const err0={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"specversion"},message:"must have required property 'specversion'"};if(vErrors===null){vErrors=[err0]}else{vErrors.push(err0)}errors++}if(data.id===void 0){const err1={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};if(vErrors===null){vErrors=[err1]}else{vErrors.push(err1)}errors++}if(data.source===void 0){const err2={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"source"},message:"must have required property 'source'"};if(vErrors===null){vErrors=[err2]}else{vErrors.push(err2)}errors++}if(data.type===void 0){const err3={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};if(vErrors===null){vErrors=[err3]}else{vErrors.push(err3)}errors++}if(data.time===void 0){const err4={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"time"},message:"must have required property 'time'"};if(vErrors===null){vErrors=[err4]}else{vErrors.push(err4)}errors++}if(data.dataschema===void 0){const err5={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"dataschema"},message:"must have required property 'dataschema'"};if(vErrors===null){vErrors=[err5]}else{vErrors.push(err5)}errors++}if(data.datacontenttype===void 0){const err6={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"datacontenttype"},message:"must have required property 'datacontenttype'"};if(vErrors===null){vErrors=[err6]}else{vErrors.push(err6)}errors++}if(data.profile===void 0){const err7={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"profile"},message:"must have required property 'profile'"};if(vErrors===null){vErrors=[err7]}else{vErrors.push(err7)}errors++}if(data.kind===void 0){const err8={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"kind"},message:"must have required property 'kind'"};if(vErrors===null){vErrors=[err8]}else{vErrors.push(err8)}errors++}if(data.serviceorigin===void 0){const err9={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"serviceorigin"},message:"must have required property 'serviceorigin'"};if(vErrors===null){vErrors=[err9]}else{vErrors.push(err9)}errors++}if(data.sourcetenant===void 0){const err10={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"sourcetenant"},message:"must have required property 'sourcetenant'"};if(vErrors===null){vErrors=[err10]}else{vErrors.push(err10)}errors++}if(data.audience===void 0){const err11={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"audience"},message:"must have required property 'audience'"};if(vErrors===null){vErrors=[err11]}else{vErrors.push(err11)}errors++}if(data.connectionref===void 0){const err12={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"connectionref"},message:"must have required property 'connectionref'"};if(vErrors===null){vErrors=[err12]}else{vErrors.push(err12)}errors++}if(data.grantref===void 0){const err13={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"grantref"},message:"must have required property 'grantref'"};if(vErrors===null){vErrors=[err13]}else{vErrors.push(err13)}errors++}if(data.grantversion===void 0){const err14={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"grantversion"},message:"must have required property 'grantversion'"};if(vErrors===null){vErrors=[err14]}else{vErrors.push(err14)}errors++}if(data.correlationid===void 0){const err15={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"correlationid"},message:"must have required property 'correlationid'"};if(vErrors===null){vErrors=[err15]}else{vErrors.push(err15)}errors++}if(data.data===void 0){const err16={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"data"},message:"must have required property 'data'"};if(vErrors===null){vErrors=[err16]}else{vErrors.push(err16)}errors++}for(const key0 in data){if(!func11.call(schema34.properties,key0)){const err17={instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key0},message:"must NOT have additional properties"};if(vErrors===null){vErrors=[err17]}else{vErrors.push(err17)}errors++}}if(data.specversion!==void 0){let data0=data.specversion;if(typeof data0!=="string"){const err18={instancePath:instancePath+"/specversion",schemaPath:"#/properties/specversion/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err18]}else{vErrors.push(err18)}errors++}if("1.0"!==data0){const err19={instancePath:instancePath+"/specversion",schemaPath:"#/properties/specversion/const",keyword:"const",params:{allowedValue:"1.0"},message:"must be equal to constant"};if(vErrors===null){vErrors=[err19]}else{vErrors.push(err19)}errors++}}if(data.id!==void 0){let data1=data.id;if(typeof data1==="string"){if(func1(data1)>256){const err20={instancePath:instancePath+"/id",schemaPath:"#/properties/id/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err20]}else{vErrors.push(err20)}errors++}if(func1(data1)<1){const err21={instancePath:instancePath+"/id",schemaPath:"#/properties/id/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err21]}else{vErrors.push(err21)}errors++}if(!pattern4.test(data1)){const err22={instancePath:instancePath+"/id",schemaPath:"#/properties/id/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err22]}else{vErrors.push(err22)}errors++}}else{const err23={instancePath:instancePath+"/id",schemaPath:"#/properties/id/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err23]}else{vErrors.push(err23)}errors++}}if(data.source!==void 0){let data2=data.source;if(typeof data2==="string"){if(func1(data2)>2048){const err24={instancePath:instancePath+"/source",schemaPath:"#/properties/source/maxLength",keyword:"maxLength",params:{limit:2048},message:"must NOT have more than 2048 characters"};if(vErrors===null){vErrors=[err24]}else{vErrors.push(err24)}errors++}if(func1(data2)<1){const err25={instancePath:instancePath+"/source",schemaPath:"#/properties/source/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err25]}else{vErrors.push(err25)}errors++}if(!pattern4.test(data2)){const err26={instancePath:instancePath+"/source",schemaPath:"#/properties/source/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err26]}else{vErrors.push(err26)}errors++}if(!formats0(data2)){const err27={instancePath:instancePath+"/source",schemaPath:"#/properties/source/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};if(vErrors===null){vErrors=[err27]}else{vErrors.push(err27)}errors++}}else{const err28={instancePath:instancePath+"/source",schemaPath:"#/properties/source/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err28]}else{vErrors.push(err28)}errors++}}if(data.type!==void 0){let data3=data.type;if(typeof data3==="string"){if(func1(data3)>256){const err29={instancePath:instancePath+"/type",schemaPath:"#/properties/type/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err29]}else{vErrors.push(err29)}errors++}if(func1(data3)<1){const err30={instancePath:instancePath+"/type",schemaPath:"#/properties/type/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err30]}else{vErrors.push(err30)}errors++}if(!pattern12.test(data3)){const err31={instancePath:instancePath+"/type",schemaPath:"#/properties/type/pattern",keyword:"pattern",params:{pattern:"^[a-zA-Z0-9][a-zA-Z0-9._-]*\\.v[1-9][0-9]*$"},message:'must match pattern "^[a-zA-Z0-9][a-zA-Z0-9._-]*\\.v[1-9][0-9]*$"'};if(vErrors===null){vErrors=[err31]}else{vErrors.push(err31)}errors++}}else{const err32={instancePath:instancePath+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err32]}else{vErrors.push(err32)}errors++}}if(data.time!==void 0){let data4=data.time;if(typeof data4==="string"){if(func1(data4)>64){const err33={instancePath:instancePath+"/time",schemaPath:"#/properties/time/maxLength",keyword:"maxLength",params:{limit:64},message:"must NOT have more than 64 characters"};if(vErrors===null){vErrors=[err33]}else{vErrors.push(err33)}errors++}if(!formats2.validate(data4)){const err34={instancePath:instancePath+"/time",schemaPath:"#/properties/time/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};if(vErrors===null){vErrors=[err34]}else{vErrors.push(err34)}errors++}}else{const err35={instancePath:instancePath+"/time",schemaPath:"#/properties/time/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err35]}else{vErrors.push(err35)}errors++}}if(data.dataschema!==void 0){let data5=data.dataschema;if(typeof data5==="string"){if(func1(data5)>2048){const err36={instancePath:instancePath+"/dataschema",schemaPath:"#/properties/dataschema/maxLength",keyword:"maxLength",params:{limit:2048},message:"must NOT have more than 2048 characters"};if(vErrors===null){vErrors=[err36]}else{vErrors.push(err36)}errors++}if(func1(data5)<1){const err37={instancePath:instancePath+"/dataschema",schemaPath:"#/properties/dataschema/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err37]}else{vErrors.push(err37)}errors++}if(!pattern4.test(data5)){const err38={instancePath:instancePath+"/dataschema",schemaPath:"#/properties/dataschema/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err38]}else{vErrors.push(err38)}errors++}if(!formats0(data5)){const err39={instancePath:instancePath+"/dataschema",schemaPath:"#/properties/dataschema/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};if(vErrors===null){vErrors=[err39]}else{vErrors.push(err39)}errors++}}else{const err40={instancePath:instancePath+"/dataschema",schemaPath:"#/properties/dataschema/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err40]}else{vErrors.push(err40)}errors++}}if(data.datacontenttype!==void 0){let data6=data.datacontenttype;if(typeof data6!=="string"){const err41={instancePath:instancePath+"/datacontenttype",schemaPath:"#/properties/datacontenttype/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err41]}else{vErrors.push(err41)}errors++}if("application/json"!==data6){const err42={instancePath:instancePath+"/datacontenttype",schemaPath:"#/properties/datacontenttype/const",keyword:"const",params:{allowedValue:"application/json"},message:"must be equal to constant"};if(vErrors===null){vErrors=[err42]}else{vErrors.push(err42)}errors++}}if(data.profile!==void 0){let data7=data.profile;if(typeof data7!=="string"){const err43={instancePath:instancePath+"/profile",schemaPath:"#/properties/profile/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err43]}else{vErrors.push(err43)}errors++}if("eventsdk/1.1"!==data7){const err44={instancePath:instancePath+"/profile",schemaPath:"#/properties/profile/const",keyword:"const",params:{allowedValue:"eventsdk/1.1"},message:"must be equal to constant"};if(vErrors===null){vErrors=[err44]}else{vErrors.push(err44)}errors++}}if(data.kind!==void 0){let data8=data.kind;if(typeof data8!=="string"){const err45={instancePath:instancePath+"/kind",schemaPath:"#/properties/kind/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err45]}else{vErrors.push(err45)}errors++}if(!(data8==="EVENT"||data8==="HANDOFF"||data8==="RECEIPT")){const err46={instancePath:instancePath+"/kind",schemaPath:"#/properties/kind/enum",keyword:"enum",params:{allowedValues:schema34.properties.kind.enum},message:"must be equal to one of the allowed values"};if(vErrors===null){vErrors=[err46]}else{vErrors.push(err46)}errors++}}if(data.serviceorigin!==void 0){let data9=data.serviceorigin;if(typeof data9==="string"){if(func1(data9)>256){const err47={instancePath:instancePath+"/serviceorigin",schemaPath:"#/properties/serviceorigin/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err47]}else{vErrors.push(err47)}errors++}if(func1(data9)<1){const err48={instancePath:instancePath+"/serviceorigin",schemaPath:"#/properties/serviceorigin/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err48]}else{vErrors.push(err48)}errors++}if(!pattern4.test(data9)){const err49={instancePath:instancePath+"/serviceorigin",schemaPath:"#/properties/serviceorigin/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err49]}else{vErrors.push(err49)}errors++}}else{const err50={instancePath:instancePath+"/serviceorigin",schemaPath:"#/properties/serviceorigin/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err50]}else{vErrors.push(err50)}errors++}}if(data.sourcetenant!==void 0){let data10=data.sourcetenant;if(typeof data10==="string"){if(func1(data10)>256){const err51={instancePath:instancePath+"/sourcetenant",schemaPath:"#/properties/sourcetenant/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err51]}else{vErrors.push(err51)}errors++}if(func1(data10)<1){const err52={instancePath:instancePath+"/sourcetenant",schemaPath:"#/properties/sourcetenant/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err52]}else{vErrors.push(err52)}errors++}if(!pattern4.test(data10)){const err53={instancePath:instancePath+"/sourcetenant",schemaPath:"#/properties/sourcetenant/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err53]}else{vErrors.push(err53)}errors++}}else{const err54={instancePath:instancePath+"/sourcetenant",schemaPath:"#/properties/sourcetenant/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err54]}else{vErrors.push(err54)}errors++}}if(data.audience!==void 0){let data11=data.audience;if(typeof data11==="string"){if(func1(data11)>256){const err55={instancePath:instancePath+"/audience",schemaPath:"#/properties/audience/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err55]}else{vErrors.push(err55)}errors++}if(func1(data11)<1){const err56={instancePath:instancePath+"/audience",schemaPath:"#/properties/audience/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err56]}else{vErrors.push(err56)}errors++}if(!pattern4.test(data11)){const err57={instancePath:instancePath+"/audience",schemaPath:"#/properties/audience/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err57]}else{vErrors.push(err57)}errors++}}else{const err58={instancePath:instancePath+"/audience",schemaPath:"#/properties/audience/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err58]}else{vErrors.push(err58)}errors++}}if(data.connectionref!==void 0){let data12=data.connectionref;if(typeof data12==="string"){if(func1(data12)>256){const err59={instancePath:instancePath+"/connectionref",schemaPath:"#/properties/connectionref/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err59]}else{vErrors.push(err59)}errors++}if(func1(data12)<1){const err60={instancePath:instancePath+"/connectionref",schemaPath:"#/properties/connectionref/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err60]}else{vErrors.push(err60)}errors++}if(!pattern4.test(data12)){const err61={instancePath:instancePath+"/connectionref",schemaPath:"#/properties/connectionref/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err61]}else{vErrors.push(err61)}errors++}}else{const err62={instancePath:instancePath+"/connectionref",schemaPath:"#/properties/connectionref/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err62]}else{vErrors.push(err62)}errors++}}if(data.grantref!==void 0){let data13=data.grantref;if(typeof data13==="string"){if(func1(data13)>256){const err63={instancePath:instancePath+"/grantref",schemaPath:"#/properties/grantref/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err63]}else{vErrors.push(err63)}errors++}if(func1(data13)<1){const err64={instancePath:instancePath+"/grantref",schemaPath:"#/properties/grantref/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err64]}else{vErrors.push(err64)}errors++}if(!pattern4.test(data13)){const err65={instancePath:instancePath+"/grantref",schemaPath:"#/properties/grantref/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err65]}else{vErrors.push(err65)}errors++}}else{const err66={instancePath:instancePath+"/grantref",schemaPath:"#/properties/grantref/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err66]}else{vErrors.push(err66)}errors++}}if(data.grantversion!==void 0){let data14=data.grantversion;if(!(typeof data14=="number"&&!(data14%1)&&!isNaN(data14)&&isFinite(data14))){const err67={instancePath:instancePath+"/grantversion",schemaPath:"#/properties/grantversion/type",keyword:"type",params:{type:"integer"},message:"must be integer"};if(vErrors===null){vErrors=[err67]}else{vErrors.push(err67)}errors++}if(typeof data14=="number"&&isFinite(data14)){if(data14>2147483647||isNaN(data14)){const err68={instancePath:instancePath+"/grantversion",schemaPath:"#/properties/grantversion/maximum",keyword:"maximum",params:{comparison:"<=",limit:2147483647},message:"must be <= 2147483647"};if(vErrors===null){vErrors=[err68]}else{vErrors.push(err68)}errors++}if(data14<1||isNaN(data14)){const err69={instancePath:instancePath+"/grantversion",schemaPath:"#/properties/grantversion/minimum",keyword:"minimum",params:{comparison:">=",limit:1},message:"must be >= 1"};if(vErrors===null){vErrors=[err69]}else{vErrors.push(err69)}errors++}}}if(data.correlationid!==void 0){let data15=data.correlationid;if(typeof data15==="string"){if(func1(data15)>256){const err70={instancePath:instancePath+"/correlationid",schemaPath:"#/properties/correlationid/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err70]}else{vErrors.push(err70)}errors++}if(func1(data15)<1){const err71={instancePath:instancePath+"/correlationid",schemaPath:"#/properties/correlationid/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err71]}else{vErrors.push(err71)}errors++}if(!pattern4.test(data15)){const err72={instancePath:instancePath+"/correlationid",schemaPath:"#/properties/correlationid/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err72]}else{vErrors.push(err72)}errors++}}else{const err73={instancePath:instancePath+"/correlationid",schemaPath:"#/properties/correlationid/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err73]}else{vErrors.push(err73)}errors++}}if(data.causationid!==void 0){let data16=data.causationid;if(typeof data16==="string"){if(func1(data16)>256){const err74={instancePath:instancePath+"/causationid",schemaPath:"#/properties/causationid/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err74]}else{vErrors.push(err74)}errors++}if(func1(data16)<1){const err75={instancePath:instancePath+"/causationid",schemaPath:"#/properties/causationid/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err75]}else{vErrors.push(err75)}errors++}if(!pattern4.test(data16)){const err76={instancePath:instancePath+"/causationid",schemaPath:"#/properties/causationid/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err76]}else{vErrors.push(err76)}errors++}}else{const err77={instancePath:instancePath+"/causationid",schemaPath:"#/properties/causationid/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err77]}else{vErrors.push(err77)}errors++}}if(data.subject!==void 0){let data17=data.subject;if(typeof data17==="string"){if(func1(data17)>1024){const err78={instancePath:instancePath+"/subject",schemaPath:"#/properties/subject/maxLength",keyword:"maxLength",params:{limit:1024},message:"must NOT have more than 1024 characters"};if(vErrors===null){vErrors=[err78]}else{vErrors.push(err78)}errors++}if(func1(data17)<1){const err79={instancePath:instancePath+"/subject",schemaPath:"#/properties/subject/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err79]}else{vErrors.push(err79)}errors++}if(!pattern4.test(data17)){const err80={instancePath:instancePath+"/subject",schemaPath:"#/properties/subject/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err80]}else{vErrors.push(err80)}errors++}}else{const err81={instancePath:instancePath+"/subject",schemaPath:"#/properties/subject/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err81]}else{vErrors.push(err81)}errors++}}if(data.data!==void 0){if(!validate20(data.data,{instancePath:instancePath+"/data",parentData:data,parentDataProperty:"data",rootData,dynamicAnchors})){vErrors=vErrors===null?validate20.errors:vErrors.concat(validate20.errors);errors=vErrors.length}}if(data.orgnamespace!==void 0){let data19=data.orgnamespace;if(typeof data19==="string"){if(func1(data19)>256){const err82={instancePath:instancePath+"/orgnamespace",schemaPath:"#/properties/orgnamespace/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err82]}else{vErrors.push(err82)}errors++}if(func1(data19)<1){const err83={instancePath:instancePath+"/orgnamespace",schemaPath:"#/properties/orgnamespace/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err83]}else{vErrors.push(err83)}errors++}if(!pattern4.test(data19)){const err84={instancePath:instancePath+"/orgnamespace",schemaPath:"#/properties/orgnamespace/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err84]}else{vErrors.push(err84)}errors++}}else{const err85={instancePath:instancePath+"/orgnamespace",schemaPath:"#/properties/orgnamespace/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err85]}else{vErrors.push(err85)}errors++}}if(data.orgref!==void 0){let data20=data.orgref;if(typeof data20==="string"){if(func1(data20)>256){const err86={instancePath:instancePath+"/orgref",schemaPath:"#/properties/orgref/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err86]}else{vErrors.push(err86)}errors++}if(func1(data20)<1){const err87={instancePath:instancePath+"/orgref",schemaPath:"#/properties/orgref/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err87]}else{vErrors.push(err87)}errors++}if(!pattern4.test(data20)){const err88={instancePath:instancePath+"/orgref",schemaPath:"#/properties/orgref/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err88]}else{vErrors.push(err88)}errors++}}else{const err89={instancePath:instancePath+"/orgref",schemaPath:"#/properties/orgref/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err89]}else{vErrors.push(err89)}errors++}}if(data.projectnamespace!==void 0){let data21=data.projectnamespace;if(typeof data21==="string"){if(func1(data21)>256){const err90={instancePath:instancePath+"/projectnamespace",schemaPath:"#/properties/projectnamespace/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err90]}else{vErrors.push(err90)}errors++}if(func1(data21)<1){const err91={instancePath:instancePath+"/projectnamespace",schemaPath:"#/properties/projectnamespace/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err91]}else{vErrors.push(err91)}errors++}if(!pattern4.test(data21)){const err92={instancePath:instancePath+"/projectnamespace",schemaPath:"#/properties/projectnamespace/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err92]}else{vErrors.push(err92)}errors++}}else{const err93={instancePath:instancePath+"/projectnamespace",schemaPath:"#/properties/projectnamespace/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err93]}else{vErrors.push(err93)}errors++}}if(data.projectref!==void 0){let data22=data.projectref;if(typeof data22==="string"){if(func1(data22)>256){const err94={instancePath:instancePath+"/projectref",schemaPath:"#/properties/projectref/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err94]}else{vErrors.push(err94)}errors++}if(func1(data22)<1){const err95={instancePath:instancePath+"/projectref",schemaPath:"#/properties/projectref/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err95]}else{vErrors.push(err95)}errors++}if(!pattern4.test(data22)){const err96={instancePath:instancePath+"/projectref",schemaPath:"#/properties/projectref/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err96]}else{vErrors.push(err96)}errors++}}else{const err97={instancePath:instancePath+"/projectref",schemaPath:"#/properties/projectref/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err97]}else{vErrors.push(err97)}errors++}}if(data.principalnamespace!==void 0){let data23=data.principalnamespace;if(typeof data23==="string"){if(func1(data23)>256){const err98={instancePath:instancePath+"/principalnamespace",schemaPath:"#/properties/principalnamespace/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err98]}else{vErrors.push(err98)}errors++}if(func1(data23)<1){const err99={instancePath:instancePath+"/principalnamespace",schemaPath:"#/properties/principalnamespace/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err99]}else{vErrors.push(err99)}errors++}if(!pattern4.test(data23)){const err100={instancePath:instancePath+"/principalnamespace",schemaPath:"#/properties/principalnamespace/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err100]}else{vErrors.push(err100)}errors++}}else{const err101={instancePath:instancePath+"/principalnamespace",schemaPath:"#/properties/principalnamespace/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err101]}else{vErrors.push(err101)}errors++}}if(data.principalref!==void 0){let data24=data.principalref;if(typeof data24==="string"){if(func1(data24)>256){const err102={instancePath:instancePath+"/principalref",schemaPath:"#/properties/principalref/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err102]}else{vErrors.push(err102)}errors++}if(func1(data24)<1){const err103={instancePath:instancePath+"/principalref",schemaPath:"#/properties/principalref/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err103]}else{vErrors.push(err103)}errors++}if(!pattern4.test(data24)){const err104={instancePath:instancePath+"/principalref",schemaPath:"#/properties/principalref/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err104]}else{vErrors.push(err104)}errors++}}else{const err105={instancePath:instancePath+"/principalref",schemaPath:"#/properties/principalref/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err105]}else{vErrors.push(err105)}errors++}}if(data.resourcenamespace!==void 0){let data25=data.resourcenamespace;if(typeof data25==="string"){if(func1(data25)>256){const err106={instancePath:instancePath+"/resourcenamespace",schemaPath:"#/properties/resourcenamespace/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err106]}else{vErrors.push(err106)}errors++}if(func1(data25)<1){const err107={instancePath:instancePath+"/resourcenamespace",schemaPath:"#/properties/resourcenamespace/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err107]}else{vErrors.push(err107)}errors++}if(!pattern4.test(data25)){const err108={instancePath:instancePath+"/resourcenamespace",schemaPath:"#/properties/resourcenamespace/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err108]}else{vErrors.push(err108)}errors++}}else{const err109={instancePath:instancePath+"/resourcenamespace",schemaPath:"#/properties/resourcenamespace/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err109]}else{vErrors.push(err109)}errors++}}if(data.resourceref!==void 0){let data26=data.resourceref;if(typeof data26==="string"){if(func1(data26)>256){const err110={instancePath:instancePath+"/resourceref",schemaPath:"#/properties/resourceref/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err110]}else{vErrors.push(err110)}errors++}if(func1(data26)<1){const err111={instancePath:instancePath+"/resourceref",schemaPath:"#/properties/resourceref/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err111]}else{vErrors.push(err111)}errors++}if(!pattern4.test(data26)){const err112={instancePath:instancePath+"/resourceref",schemaPath:"#/properties/resourceref/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err112]}else{vErrors.push(err112)}errors++}}else{const err113={instancePath:instancePath+"/resourceref",schemaPath:"#/properties/resourceref/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err113]}else{vErrors.push(err113)}errors++}}if(data.orgnamespace!==void 0){if(data.orgref===void 0){const err114={instancePath,schemaPath:"#/dependentRequired",keyword:"dependentRequired",params:{property:"orgnamespace",missingProperty:"orgref",depsCount:1,deps:"orgref"},message:"must have property orgref when property orgnamespace is present"};if(vErrors===null){vErrors=[err114]}else{vErrors.push(err114)}errors++}}if(data.orgref!==void 0){if(data.orgnamespace===void 0){const err115={instancePath,schemaPath:"#/dependentRequired",keyword:"dependentRequired",params:{property:"orgref",missingProperty:"orgnamespace",depsCount:1,deps:"orgnamespace"},message:"must have property orgnamespace when property orgref is present"};if(vErrors===null){vErrors=[err115]}else{vErrors.push(err115)}errors++}}if(data.projectnamespace!==void 0){if(data.projectref===void 0){const err116={instancePath,schemaPath:"#/dependentRequired",keyword:"dependentRequired",params:{property:"projectnamespace",missingProperty:"projectref",depsCount:1,deps:"projectref"},message:"must have property projectref when property projectnamespace is present"};if(vErrors===null){vErrors=[err116]}else{vErrors.push(err116)}errors++}}if(data.projectref!==void 0){if(data.projectnamespace===void 0){const err117={instancePath,schemaPath:"#/dependentRequired",keyword:"dependentRequired",params:{property:"projectref",missingProperty:"projectnamespace",depsCount:1,deps:"projectnamespace"},message:"must have property projectnamespace when property projectref is present"};if(vErrors===null){vErrors=[err117]}else{vErrors.push(err117)}errors++}}if(data.principalnamespace!==void 0){if(data.principalref===void 0){const err118={instancePath,schemaPath:"#/dependentRequired",keyword:"dependentRequired",params:{property:"principalnamespace",missingProperty:"principalref",depsCount:1,deps:"principalref"},message:"must have property principalref when property principalnamespace is present"};if(vErrors===null){vErrors=[err118]}else{vErrors.push(err118)}errors++}}if(data.principalref!==void 0){if(data.principalnamespace===void 0){const err119={instancePath,schemaPath:"#/dependentRequired",keyword:"dependentRequired",params:{property:"principalref",missingProperty:"principalnamespace",depsCount:1,deps:"principalnamespace"},message:"must have property principalnamespace when property principalref is present"};if(vErrors===null){vErrors=[err119]}else{vErrors.push(err119)}errors++}}if(data.resourcenamespace!==void 0){if(data.resourceref===void 0){const err120={instancePath,schemaPath:"#/dependentRequired",keyword:"dependentRequired",params:{property:"resourcenamespace",missingProperty:"resourceref",depsCount:1,deps:"resourceref"},message:"must have property resourceref when property resourcenamespace is present"};if(vErrors===null){vErrors=[err120]}else{vErrors.push(err120)}errors++}}if(data.resourceref!==void 0){if(data.resourcenamespace===void 0){const err121={instancePath,schemaPath:"#/dependentRequired",keyword:"dependentRequired",params:{property:"resourceref",missingProperty:"resourcenamespace",depsCount:1,deps:"resourcenamespace"},message:"must have property resourcenamespace when property resourceref is present"};if(vErrors===null){vErrors=[err121]}else{vErrors.push(err121)}errors++}}}else{const err122={instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};if(vErrors===null){vErrors=[err122]}else{vErrors.push(err122)}errors++}validate24.errors=vErrors;return errors===0}validate24.evaluated={props:true,dynamicProps:false,dynamicItems:false};var cloudEventFanout=validate26;var schema35={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://eventsdk.dev/schemas/v1/cloud-event-fanout.schema.json",title:"CloudEventFanout",type:"object",additionalProperties:false,properties:{specversion:{const:"1.0",type:"string"},id:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u001f\\u007f]+$"},source:{type:"string",minLength:1,maxLength:2048,pattern:"^[^\\u0000-\\u001f\\u007f]+$",format:"uri"},type:{type:"string",minLength:1,maxLength:256,pattern:"^[a-zA-Z0-9][a-zA-Z0-9._-]*\\.v[1-9][0-9]*$"},time:{type:"string",format:"date-time",maxLength:64},dataschema:{type:"string",minLength:1,maxLength:2048,pattern:"^[^\\u0000-\\u001f\\u007f]+$",format:"uri"},datacontenttype:{const:"application/json",type:"string"},profile:{const:"eventsdk/1.2",type:"string"},kind:{type:"string",const:"EVENT"},serviceorigin:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u001f\\u007f]+$"},sourcetenant:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u001f\\u007f]+$",description:"Opaque tenant reference scoped by the required serviceorigin. The namespace is the ordered pair (serviceorigin, sourcetenant)."},audience:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u001f\\u007f]+$"},connectionref:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u001f\\u007f]+$"},grantref:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u001f\\u007f]+$"},grantversion:{type:"integer",minimum:1,maximum:2147483647},correlationid:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u001f\\u007f]+$"},causationid:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u001f\\u007f]+$"},subject:{type:"string",minLength:1,maxLength:1024,pattern:"^[^\\u0000-\\u001f\\u007f]+$"},data:{$ref:"json-value.schema.json"},orgnamespace:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u001f\\u007f]+$"},orgref:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u001f\\u007f]+$"},projectnamespace:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u001f\\u007f]+$"},projectref:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u001f\\u007f]+$"},principalnamespace:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u001f\\u007f]+$"},principalref:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u001f\\u007f]+$"},resourcenamespace:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u001f\\u007f]+$"},resourceref:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u001f\\u007f]+$"},deliveryid:{type:"string",pattern:"^[0-9a-f]{64}$"}},required:["specversion","id","source","type","time","dataschema","datacontenttype","profile","kind","serviceorigin","sourcetenant","audience","connectionref","grantref","grantversion","correlationid","data","deliveryid"],dependentRequired:{orgnamespace:["orgref"],orgref:["orgnamespace"],projectnamespace:["projectref"],projectref:["projectnamespace"],principalnamespace:["principalref"],principalref:["principalnamespace"],resourcenamespace:["resourceref"],resourceref:["resourcenamespace"]}};var pattern62=new RegExp("^[0-9a-f]{64}$","u");function validate26(data,{instancePath="",parentData,parentDataProperty,rootData=data,dynamicAnchors={}}={}){let vErrors=null;let errors=0;const evaluated0=validate26.evaluated;if(evaluated0.dynamicProps){evaluated0.props=void 0}if(evaluated0.dynamicItems){evaluated0.items=void 0}if(data&&typeof data=="object"&&!Array.isArray(data)){if(data.specversion===void 0){const err0={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"specversion"},message:"must have required property 'specversion'"};if(vErrors===null){vErrors=[err0]}else{vErrors.push(err0)}errors++}if(data.id===void 0){const err1={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};if(vErrors===null){vErrors=[err1]}else{vErrors.push(err1)}errors++}if(data.source===void 0){const err2={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"source"},message:"must have required property 'source'"};if(vErrors===null){vErrors=[err2]}else{vErrors.push(err2)}errors++}if(data.type===void 0){const err3={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};if(vErrors===null){vErrors=[err3]}else{vErrors.push(err3)}errors++}if(data.time===void 0){const err4={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"time"},message:"must have required property 'time'"};if(vErrors===null){vErrors=[err4]}else{vErrors.push(err4)}errors++}if(data.dataschema===void 0){const err5={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"dataschema"},message:"must have required property 'dataschema'"};if(vErrors===null){vErrors=[err5]}else{vErrors.push(err5)}errors++}if(data.datacontenttype===void 0){const err6={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"datacontenttype"},message:"must have required property 'datacontenttype'"};if(vErrors===null){vErrors=[err6]}else{vErrors.push(err6)}errors++}if(data.profile===void 0){const err7={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"profile"},message:"must have required property 'profile'"};if(vErrors===null){vErrors=[err7]}else{vErrors.push(err7)}errors++}if(data.kind===void 0){const err8={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"kind"},message:"must have required property 'kind'"};if(vErrors===null){vErrors=[err8]}else{vErrors.push(err8)}errors++}if(data.serviceorigin===void 0){const err9={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"serviceorigin"},message:"must have required property 'serviceorigin'"};if(vErrors===null){vErrors=[err9]}else{vErrors.push(err9)}errors++}if(data.sourcetenant===void 0){const err10={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"sourcetenant"},message:"must have required property 'sourcetenant'"};if(vErrors===null){vErrors=[err10]}else{vErrors.push(err10)}errors++}if(data.audience===void 0){const err11={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"audience"},message:"must have required property 'audience'"};if(vErrors===null){vErrors=[err11]}else{vErrors.push(err11)}errors++}if(data.connectionref===void 0){const err12={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"connectionref"},message:"must have required property 'connectionref'"};if(vErrors===null){vErrors=[err12]}else{vErrors.push(err12)}errors++}if(data.grantref===void 0){const err13={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"grantref"},message:"must have required property 'grantref'"};if(vErrors===null){vErrors=[err13]}else{vErrors.push(err13)}errors++}if(data.grantversion===void 0){const err14={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"grantversion"},message:"must have required property 'grantversion'"};if(vErrors===null){vErrors=[err14]}else{vErrors.push(err14)}errors++}if(data.correlationid===void 0){const err15={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"correlationid"},message:"must have required property 'correlationid'"};if(vErrors===null){vErrors=[err15]}else{vErrors.push(err15)}errors++}if(data.data===void 0){const err16={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"data"},message:"must have required property 'data'"};if(vErrors===null){vErrors=[err16]}else{vErrors.push(err16)}errors++}if(data.deliveryid===void 0){const err17={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"deliveryid"},message:"must have required property 'deliveryid'"};if(vErrors===null){vErrors=[err17]}else{vErrors.push(err17)}errors++}for(const key0 in data){if(!func11.call(schema35.properties,key0)){const err18={instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key0},message:"must NOT have additional properties"};if(vErrors===null){vErrors=[err18]}else{vErrors.push(err18)}errors++}}if(data.specversion!==void 0){let data0=data.specversion;if(typeof data0!=="string"){const err19={instancePath:instancePath+"/specversion",schemaPath:"#/properties/specversion/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err19]}else{vErrors.push(err19)}errors++}if("1.0"!==data0){const err20={instancePath:instancePath+"/specversion",schemaPath:"#/properties/specversion/const",keyword:"const",params:{allowedValue:"1.0"},message:"must be equal to constant"};if(vErrors===null){vErrors=[err20]}else{vErrors.push(err20)}errors++}}if(data.id!==void 0){let data1=data.id;if(typeof data1==="string"){if(func1(data1)>256){const err21={instancePath:instancePath+"/id",schemaPath:"#/properties/id/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err21]}else{vErrors.push(err21)}errors++}if(func1(data1)<1){const err22={instancePath:instancePath+"/id",schemaPath:"#/properties/id/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err22]}else{vErrors.push(err22)}errors++}if(!pattern4.test(data1)){const err23={instancePath:instancePath+"/id",schemaPath:"#/properties/id/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err23]}else{vErrors.push(err23)}errors++}}else{const err24={instancePath:instancePath+"/id",schemaPath:"#/properties/id/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err24]}else{vErrors.push(err24)}errors++}}if(data.source!==void 0){let data2=data.source;if(typeof data2==="string"){if(func1(data2)>2048){const err25={instancePath:instancePath+"/source",schemaPath:"#/properties/source/maxLength",keyword:"maxLength",params:{limit:2048},message:"must NOT have more than 2048 characters"};if(vErrors===null){vErrors=[err25]}else{vErrors.push(err25)}errors++}if(func1(data2)<1){const err26={instancePath:instancePath+"/source",schemaPath:"#/properties/source/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err26]}else{vErrors.push(err26)}errors++}if(!pattern4.test(data2)){const err27={instancePath:instancePath+"/source",schemaPath:"#/properties/source/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err27]}else{vErrors.push(err27)}errors++}if(!formats0(data2)){const err28={instancePath:instancePath+"/source",schemaPath:"#/properties/source/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};if(vErrors===null){vErrors=[err28]}else{vErrors.push(err28)}errors++}}else{const err29={instancePath:instancePath+"/source",schemaPath:"#/properties/source/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err29]}else{vErrors.push(err29)}errors++}}if(data.type!==void 0){let data3=data.type;if(typeof data3==="string"){if(func1(data3)>256){const err30={instancePath:instancePath+"/type",schemaPath:"#/properties/type/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err30]}else{vErrors.push(err30)}errors++}if(func1(data3)<1){const err31={instancePath:instancePath+"/type",schemaPath:"#/properties/type/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err31]}else{vErrors.push(err31)}errors++}if(!pattern12.test(data3)){const err32={instancePath:instancePath+"/type",schemaPath:"#/properties/type/pattern",keyword:"pattern",params:{pattern:"^[a-zA-Z0-9][a-zA-Z0-9._-]*\\.v[1-9][0-9]*$"},message:'must match pattern "^[a-zA-Z0-9][a-zA-Z0-9._-]*\\.v[1-9][0-9]*$"'};if(vErrors===null){vErrors=[err32]}else{vErrors.push(err32)}errors++}}else{const err33={instancePath:instancePath+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err33]}else{vErrors.push(err33)}errors++}}if(data.time!==void 0){let data4=data.time;if(typeof data4==="string"){if(func1(data4)>64){const err34={instancePath:instancePath+"/time",schemaPath:"#/properties/time/maxLength",keyword:"maxLength",params:{limit:64},message:"must NOT have more than 64 characters"};if(vErrors===null){vErrors=[err34]}else{vErrors.push(err34)}errors++}if(!formats2.validate(data4)){const err35={instancePath:instancePath+"/time",schemaPath:"#/properties/time/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};if(vErrors===null){vErrors=[err35]}else{vErrors.push(err35)}errors++}}else{const err36={instancePath:instancePath+"/time",schemaPath:"#/properties/time/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err36]}else{vErrors.push(err36)}errors++}}if(data.dataschema!==void 0){let data5=data.dataschema;if(typeof data5==="string"){if(func1(data5)>2048){const err37={instancePath:instancePath+"/dataschema",schemaPath:"#/properties/dataschema/maxLength",keyword:"maxLength",params:{limit:2048},message:"must NOT have more than 2048 characters"};if(vErrors===null){vErrors=[err37]}else{vErrors.push(err37)}errors++}if(func1(data5)<1){const err38={instancePath:instancePath+"/dataschema",schemaPath:"#/properties/dataschema/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err38]}else{vErrors.push(err38)}errors++}if(!pattern4.test(data5)){const err39={instancePath:instancePath+"/dataschema",schemaPath:"#/properties/dataschema/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err39]}else{vErrors.push(err39)}errors++}if(!formats0(data5)){const err40={instancePath:instancePath+"/dataschema",schemaPath:"#/properties/dataschema/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};if(vErrors===null){vErrors=[err40]}else{vErrors.push(err40)}errors++}}else{const err41={instancePath:instancePath+"/dataschema",schemaPath:"#/properties/dataschema/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err41]}else{vErrors.push(err41)}errors++}}if(data.datacontenttype!==void 0){let data6=data.datacontenttype;if(typeof data6!=="string"){const err42={instancePath:instancePath+"/datacontenttype",schemaPath:"#/properties/datacontenttype/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err42]}else{vErrors.push(err42)}errors++}if("application/json"!==data6){const err43={instancePath:instancePath+"/datacontenttype",schemaPath:"#/properties/datacontenttype/const",keyword:"const",params:{allowedValue:"application/json"},message:"must be equal to constant"};if(vErrors===null){vErrors=[err43]}else{vErrors.push(err43)}errors++}}if(data.profile!==void 0){let data7=data.profile;if(typeof data7!=="string"){const err44={instancePath:instancePath+"/profile",schemaPath:"#/properties/profile/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err44]}else{vErrors.push(err44)}errors++}if("eventsdk/1.2"!==data7){const err45={instancePath:instancePath+"/profile",schemaPath:"#/properties/profile/const",keyword:"const",params:{allowedValue:"eventsdk/1.2"},message:"must be equal to constant"};if(vErrors===null){vErrors=[err45]}else{vErrors.push(err45)}errors++}}if(data.kind!==void 0){let data8=data.kind;if(typeof data8!=="string"){const err46={instancePath:instancePath+"/kind",schemaPath:"#/properties/kind/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err46]}else{vErrors.push(err46)}errors++}if("EVENT"!==data8){const err47={instancePath:instancePath+"/kind",schemaPath:"#/properties/kind/const",keyword:"const",params:{allowedValue:"EVENT"},message:"must be equal to constant"};if(vErrors===null){vErrors=[err47]}else{vErrors.push(err47)}errors++}}if(data.serviceorigin!==void 0){let data9=data.serviceorigin;if(typeof data9==="string"){if(func1(data9)>256){const err48={instancePath:instancePath+"/serviceorigin",schemaPath:"#/properties/serviceorigin/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err48]}else{vErrors.push(err48)}errors++}if(func1(data9)<1){const err49={instancePath:instancePath+"/serviceorigin",schemaPath:"#/properties/serviceorigin/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err49]}else{vErrors.push(err49)}errors++}if(!pattern4.test(data9)){const err50={instancePath:instancePath+"/serviceorigin",schemaPath:"#/properties/serviceorigin/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err50]}else{vErrors.push(err50)}errors++}}else{const err51={instancePath:instancePath+"/serviceorigin",schemaPath:"#/properties/serviceorigin/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err51]}else{vErrors.push(err51)}errors++}}if(data.sourcetenant!==void 0){let data10=data.sourcetenant;if(typeof data10==="string"){if(func1(data10)>256){const err52={instancePath:instancePath+"/sourcetenant",schemaPath:"#/properties/sourcetenant/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err52]}else{vErrors.push(err52)}errors++}if(func1(data10)<1){const err53={instancePath:instancePath+"/sourcetenant",schemaPath:"#/properties/sourcetenant/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err53]}else{vErrors.push(err53)}errors++}if(!pattern4.test(data10)){const err54={instancePath:instancePath+"/sourcetenant",schemaPath:"#/properties/sourcetenant/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err54]}else{vErrors.push(err54)}errors++}}else{const err55={instancePath:instancePath+"/sourcetenant",schemaPath:"#/properties/sourcetenant/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err55]}else{vErrors.push(err55)}errors++}}if(data.audience!==void 0){let data11=data.audience;if(typeof data11==="string"){if(func1(data11)>256){const err56={instancePath:instancePath+"/audience",schemaPath:"#/properties/audience/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err56]}else{vErrors.push(err56)}errors++}if(func1(data11)<1){const err57={instancePath:instancePath+"/audience",schemaPath:"#/properties/audience/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err57]}else{vErrors.push(err57)}errors++}if(!pattern4.test(data11)){const err58={instancePath:instancePath+"/audience",schemaPath:"#/properties/audience/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err58]}else{vErrors.push(err58)}errors++}}else{const err59={instancePath:instancePath+"/audience",schemaPath:"#/properties/audience/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err59]}else{vErrors.push(err59)}errors++}}if(data.connectionref!==void 0){let data12=data.connectionref;if(typeof data12==="string"){if(func1(data12)>256){const err60={instancePath:instancePath+"/connectionref",schemaPath:"#/properties/connectionref/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err60]}else{vErrors.push(err60)}errors++}if(func1(data12)<1){const err61={instancePath:instancePath+"/connectionref",schemaPath:"#/properties/connectionref/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err61]}else{vErrors.push(err61)}errors++}if(!pattern4.test(data12)){const err62={instancePath:instancePath+"/connectionref",schemaPath:"#/properties/connectionref/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err62]}else{vErrors.push(err62)}errors++}}else{const err63={instancePath:instancePath+"/connectionref",schemaPath:"#/properties/connectionref/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err63]}else{vErrors.push(err63)}errors++}}if(data.grantref!==void 0){let data13=data.grantref;if(typeof data13==="string"){if(func1(data13)>256){const err64={instancePath:instancePath+"/grantref",schemaPath:"#/properties/grantref/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err64]}else{vErrors.push(err64)}errors++}if(func1(data13)<1){const err65={instancePath:instancePath+"/grantref",schemaPath:"#/properties/grantref/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err65]}else{vErrors.push(err65)}errors++}if(!pattern4.test(data13)){const err66={instancePath:instancePath+"/grantref",schemaPath:"#/properties/grantref/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err66]}else{vErrors.push(err66)}errors++}}else{const err67={instancePath:instancePath+"/grantref",schemaPath:"#/properties/grantref/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err67]}else{vErrors.push(err67)}errors++}}if(data.grantversion!==void 0){let data14=data.grantversion;if(!(typeof data14=="number"&&!(data14%1)&&!isNaN(data14)&&isFinite(data14))){const err68={instancePath:instancePath+"/grantversion",schemaPath:"#/properties/grantversion/type",keyword:"type",params:{type:"integer"},message:"must be integer"};if(vErrors===null){vErrors=[err68]}else{vErrors.push(err68)}errors++}if(typeof data14=="number"&&isFinite(data14)){if(data14>2147483647||isNaN(data14)){const err69={instancePath:instancePath+"/grantversion",schemaPath:"#/properties/grantversion/maximum",keyword:"maximum",params:{comparison:"<=",limit:2147483647},message:"must be <= 2147483647"};if(vErrors===null){vErrors=[err69]}else{vErrors.push(err69)}errors++}if(data14<1||isNaN(data14)){const err70={instancePath:instancePath+"/grantversion",schemaPath:"#/properties/grantversion/minimum",keyword:"minimum",params:{comparison:">=",limit:1},message:"must be >= 1"};if(vErrors===null){vErrors=[err70]}else{vErrors.push(err70)}errors++}}}if(data.correlationid!==void 0){let data15=data.correlationid;if(typeof data15==="string"){if(func1(data15)>256){const err71={instancePath:instancePath+"/correlationid",schemaPath:"#/properties/correlationid/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err71]}else{vErrors.push(err71)}errors++}if(func1(data15)<1){const err72={instancePath:instancePath+"/correlationid",schemaPath:"#/properties/correlationid/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err72]}else{vErrors.push(err72)}errors++}if(!pattern4.test(data15)){const err73={instancePath:instancePath+"/correlationid",schemaPath:"#/properties/correlationid/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err73]}else{vErrors.push(err73)}errors++}}else{const err74={instancePath:instancePath+"/correlationid",schemaPath:"#/properties/correlationid/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err74]}else{vErrors.push(err74)}errors++}}if(data.causationid!==void 0){let data16=data.causationid;if(typeof data16==="string"){if(func1(data16)>256){const err75={instancePath:instancePath+"/causationid",schemaPath:"#/properties/causationid/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err75]}else{vErrors.push(err75)}errors++}if(func1(data16)<1){const err76={instancePath:instancePath+"/causationid",schemaPath:"#/properties/causationid/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err76]}else{vErrors.push(err76)}errors++}if(!pattern4.test(data16)){const err77={instancePath:instancePath+"/causationid",schemaPath:"#/properties/causationid/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err77]}else{vErrors.push(err77)}errors++}}else{const err78={instancePath:instancePath+"/causationid",schemaPath:"#/properties/causationid/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err78]}else{vErrors.push(err78)}errors++}}if(data.subject!==void 0){let data17=data.subject;if(typeof data17==="string"){if(func1(data17)>1024){const err79={instancePath:instancePath+"/subject",schemaPath:"#/properties/subject/maxLength",keyword:"maxLength",params:{limit:1024},message:"must NOT have more than 1024 characters"};if(vErrors===null){vErrors=[err79]}else{vErrors.push(err79)}errors++}if(func1(data17)<1){const err80={instancePath:instancePath+"/subject",schemaPath:"#/properties/subject/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err80]}else{vErrors.push(err80)}errors++}if(!pattern4.test(data17)){const err81={instancePath:instancePath+"/subject",schemaPath:"#/properties/subject/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err81]}else{vErrors.push(err81)}errors++}}else{const err82={instancePath:instancePath+"/subject",schemaPath:"#/properties/subject/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err82]}else{vErrors.push(err82)}errors++}}if(data.data!==void 0){if(!validate20(data.data,{instancePath:instancePath+"/data",parentData:data,parentDataProperty:"data",rootData,dynamicAnchors})){vErrors=vErrors===null?validate20.errors:vErrors.concat(validate20.errors);errors=vErrors.length}}if(data.orgnamespace!==void 0){let data19=data.orgnamespace;if(typeof data19==="string"){if(func1(data19)>256){const err83={instancePath:instancePath+"/orgnamespace",schemaPath:"#/properties/orgnamespace/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err83]}else{vErrors.push(err83)}errors++}if(func1(data19)<1){const err84={instancePath:instancePath+"/orgnamespace",schemaPath:"#/properties/orgnamespace/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err84]}else{vErrors.push(err84)}errors++}if(!pattern4.test(data19)){const err85={instancePath:instancePath+"/orgnamespace",schemaPath:"#/properties/orgnamespace/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err85]}else{vErrors.push(err85)}errors++}}else{const err86={instancePath:instancePath+"/orgnamespace",schemaPath:"#/properties/orgnamespace/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err86]}else{vErrors.push(err86)}errors++}}if(data.orgref!==void 0){let data20=data.orgref;if(typeof data20==="string"){if(func1(data20)>256){const err87={instancePath:instancePath+"/orgref",schemaPath:"#/properties/orgref/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err87]}else{vErrors.push(err87)}errors++}if(func1(data20)<1){const err88={instancePath:instancePath+"/orgref",schemaPath:"#/properties/orgref/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err88]}else{vErrors.push(err88)}errors++}if(!pattern4.test(data20)){const err89={instancePath:instancePath+"/orgref",schemaPath:"#/properties/orgref/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err89]}else{vErrors.push(err89)}errors++}}else{const err90={instancePath:instancePath+"/orgref",schemaPath:"#/properties/orgref/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err90]}else{vErrors.push(err90)}errors++}}if(data.projectnamespace!==void 0){let data21=data.projectnamespace;if(typeof data21==="string"){if(func1(data21)>256){const err91={instancePath:instancePath+"/projectnamespace",schemaPath:"#/properties/projectnamespace/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err91]}else{vErrors.push(err91)}errors++}if(func1(data21)<1){const err92={instancePath:instancePath+"/projectnamespace",schemaPath:"#/properties/projectnamespace/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err92]}else{vErrors.push(err92)}errors++}if(!pattern4.test(data21)){const err93={instancePath:instancePath+"/projectnamespace",schemaPath:"#/properties/projectnamespace/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err93]}else{vErrors.push(err93)}errors++}}else{const err94={instancePath:instancePath+"/projectnamespace",schemaPath:"#/properties/projectnamespace/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err94]}else{vErrors.push(err94)}errors++}}if(data.projectref!==void 0){let data22=data.projectref;if(typeof data22==="string"){if(func1(data22)>256){const err95={instancePath:instancePath+"/projectref",schemaPath:"#/properties/projectref/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err95]}else{vErrors.push(err95)}errors++}if(func1(data22)<1){const err96={instancePath:instancePath+"/projectref",schemaPath:"#/properties/projectref/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err96]}else{vErrors.push(err96)}errors++}if(!pattern4.test(data22)){const err97={instancePath:instancePath+"/projectref",schemaPath:"#/properties/projectref/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err97]}else{vErrors.push(err97)}errors++}}else{const err98={instancePath:instancePath+"/projectref",schemaPath:"#/properties/projectref/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err98]}else{vErrors.push(err98)}errors++}}if(data.principalnamespace!==void 0){let data23=data.principalnamespace;if(typeof data23==="string"){if(func1(data23)>256){const err99={instancePath:instancePath+"/principalnamespace",schemaPath:"#/properties/principalnamespace/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err99]}else{vErrors.push(err99)}errors++}if(func1(data23)<1){const err100={instancePath:instancePath+"/principalnamespace",schemaPath:"#/properties/principalnamespace/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err100]}else{vErrors.push(err100)}errors++}if(!pattern4.test(data23)){const err101={instancePath:instancePath+"/principalnamespace",schemaPath:"#/properties/principalnamespace/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err101]}else{vErrors.push(err101)}errors++}}else{const err102={instancePath:instancePath+"/principalnamespace",schemaPath:"#/properties/principalnamespace/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err102]}else{vErrors.push(err102)}errors++}}if(data.principalref!==void 0){let data24=data.principalref;if(typeof data24==="string"){if(func1(data24)>256){const err103={instancePath:instancePath+"/principalref",schemaPath:"#/properties/principalref/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err103]}else{vErrors.push(err103)}errors++}if(func1(data24)<1){const err104={instancePath:instancePath+"/principalref",schemaPath:"#/properties/principalref/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err104]}else{vErrors.push(err104)}errors++}if(!pattern4.test(data24)){const err105={instancePath:instancePath+"/principalref",schemaPath:"#/properties/principalref/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err105]}else{vErrors.push(err105)}errors++}}else{const err106={instancePath:instancePath+"/principalref",schemaPath:"#/properties/principalref/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err106]}else{vErrors.push(err106)}errors++}}if(data.resourcenamespace!==void 0){let data25=data.resourcenamespace;if(typeof data25==="string"){if(func1(data25)>256){const err107={instancePath:instancePath+"/resourcenamespace",schemaPath:"#/properties/resourcenamespace/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err107]}else{vErrors.push(err107)}errors++}if(func1(data25)<1){const err108={instancePath:instancePath+"/resourcenamespace",schemaPath:"#/properties/resourcenamespace/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err108]}else{vErrors.push(err108)}errors++}if(!pattern4.test(data25)){const err109={instancePath:instancePath+"/resourcenamespace",schemaPath:"#/properties/resourcenamespace/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err109]}else{vErrors.push(err109)}errors++}}else{const err110={instancePath:instancePath+"/resourcenamespace",schemaPath:"#/properties/resourcenamespace/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err110]}else{vErrors.push(err110)}errors++}}if(data.resourceref!==void 0){let data26=data.resourceref;if(typeof data26==="string"){if(func1(data26)>256){const err111={instancePath:instancePath+"/resourceref",schemaPath:"#/properties/resourceref/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err111]}else{vErrors.push(err111)}errors++}if(func1(data26)<1){const err112={instancePath:instancePath+"/resourceref",schemaPath:"#/properties/resourceref/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err112]}else{vErrors.push(err112)}errors++}if(!pattern4.test(data26)){const err113={instancePath:instancePath+"/resourceref",schemaPath:"#/properties/resourceref/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err113]}else{vErrors.push(err113)}errors++}}else{const err114={instancePath:instancePath+"/resourceref",schemaPath:"#/properties/resourceref/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err114]}else{vErrors.push(err114)}errors++}}if(data.deliveryid!==void 0){let data27=data.deliveryid;if(typeof data27==="string"){if(!pattern62.test(data27)){const err115={instancePath:instancePath+"/deliveryid",schemaPath:"#/properties/deliveryid/pattern",keyword:"pattern",params:{pattern:"^[0-9a-f]{64}$"},message:'must match pattern "^[0-9a-f]{64}$"'};if(vErrors===null){vErrors=[err115]}else{vErrors.push(err115)}errors++}}else{const err116={instancePath:instancePath+"/deliveryid",schemaPath:"#/properties/deliveryid/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err116]}else{vErrors.push(err116)}errors++}}if(data.orgnamespace!==void 0){if(data.orgref===void 0){const err117={instancePath,schemaPath:"#/dependentRequired",keyword:"dependentRequired",params:{property:"orgnamespace",missingProperty:"orgref",depsCount:1,deps:"orgref"},message:"must have property orgref when property orgnamespace is present"};if(vErrors===null){vErrors=[err117]}else{vErrors.push(err117)}errors++}}if(data.orgref!==void 0){if(data.orgnamespace===void 0){const err118={instancePath,schemaPath:"#/dependentRequired",keyword:"dependentRequired",params:{property:"orgref",missingProperty:"orgnamespace",depsCount:1,deps:"orgnamespace"},message:"must have property orgnamespace when property orgref is present"};if(vErrors===null){vErrors=[err118]}else{vErrors.push(err118)}errors++}}if(data.projectnamespace!==void 0){if(data.projectref===void 0){const err119={instancePath,schemaPath:"#/dependentRequired",keyword:"dependentRequired",params:{property:"projectnamespace",missingProperty:"projectref",depsCount:1,deps:"projectref"},message:"must have property projectref when property projectnamespace is present"};if(vErrors===null){vErrors=[err119]}else{vErrors.push(err119)}errors++}}if(data.projectref!==void 0){if(data.projectnamespace===void 0){const err120={instancePath,schemaPath:"#/dependentRequired",keyword:"dependentRequired",params:{property:"projectref",missingProperty:"projectnamespace",depsCount:1,deps:"projectnamespace"},message:"must have property projectnamespace when property projectref is present"};if(vErrors===null){vErrors=[err120]}else{vErrors.push(err120)}errors++}}if(data.principalnamespace!==void 0){if(data.principalref===void 0){const err121={instancePath,schemaPath:"#/dependentRequired",keyword:"dependentRequired",params:{property:"principalnamespace",missingProperty:"principalref",depsCount:1,deps:"principalref"},message:"must have property principalref when property principalnamespace is present"};if(vErrors===null){vErrors=[err121]}else{vErrors.push(err121)}errors++}}if(data.principalref!==void 0){if(data.principalnamespace===void 0){const err122={instancePath,schemaPath:"#/dependentRequired",keyword:"dependentRequired",params:{property:"principalref",missingProperty:"principalnamespace",depsCount:1,deps:"principalnamespace"},message:"must have property principalnamespace when property principalref is present"};if(vErrors===null){vErrors=[err122]}else{vErrors.push(err122)}errors++}}if(data.resourcenamespace!==void 0){if(data.resourceref===void 0){const err123={instancePath,schemaPath:"#/dependentRequired",keyword:"dependentRequired",params:{property:"resourcenamespace",missingProperty:"resourceref",depsCount:1,deps:"resourceref"},message:"must have property resourceref when property resourcenamespace is present"};if(vErrors===null){vErrors=[err123]}else{vErrors.push(err123)}errors++}}if(data.resourceref!==void 0){if(data.resourcenamespace===void 0){const err124={instancePath,schemaPath:"#/dependentRequired",keyword:"dependentRequired",params:{property:"resourceref",missingProperty:"resourcenamespace",depsCount:1,deps:"resourcenamespace"},message:"must have property resourcenamespace when property resourceref is present"};if(vErrors===null){vErrors=[err124]}else{vErrors.push(err124)}errors++}}}else{const err125={instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};if(vErrors===null){vErrors=[err125]}else{vErrors.push(err125)}errors++}validate26.errors=vErrors;return errors===0}validate26.evaluated={props:true,dynamicProps:false,dynamicItems:false};var fanoutEventDraft=validate28;var schema36={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://eventsdk.dev/schemas/v1/fanout-event-draft.schema.json",title:"FanoutEventDraft",type:"object",additionalProperties:false,properties:{specversion:{const:"1.0",type:"string"},id:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u001f\\u007f]+$"},source:{type:"string",minLength:1,maxLength:2048,pattern:"^[^\\u0000-\\u001f\\u007f]+$",format:"uri"},type:{type:"string",minLength:1,maxLength:256,pattern:"^[a-zA-Z0-9][a-zA-Z0-9._-]*\\.v[1-9][0-9]*$"},time:{type:"string",format:"date-time",maxLength:64},dataschema:{type:"string",minLength:1,maxLength:2048,pattern:"^[^\\u0000-\\u001f\\u007f]+$",format:"uri"},datacontenttype:{const:"application/json",type:"string"},profile:{const:"eventsdk/1.2",type:"string"},kind:{type:"string",const:"EVENT"},serviceorigin:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u001f\\u007f]+$"},sourcetenant:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u001f\\u007f]+$",description:"Opaque tenant reference scoped by the required serviceorigin. The namespace is the ordered pair (serviceorigin, sourcetenant)."},correlationid:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u001f\\u007f]+$"},causationid:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u001f\\u007f]+$"},subject:{type:"string",minLength:1,maxLength:1024,pattern:"^[^\\u0000-\\u001f\\u007f]+$"},data:{$ref:"json-value.schema.json"},orgnamespace:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u001f\\u007f]+$"},orgref:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u001f\\u007f]+$"},projectnamespace:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u001f\\u007f]+$"},projectref:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u001f\\u007f]+$"},principalnamespace:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u001f\\u007f]+$"},principalref:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u001f\\u007f]+$"},resourcenamespace:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u001f\\u007f]+$"},resourceref:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u001f\\u007f]+$"}},required:["specversion","id","source","type","time","dataschema","datacontenttype","profile","kind","serviceorigin","sourcetenant","correlationid","data"],dependentRequired:{orgnamespace:["orgref"],orgref:["orgnamespace"],projectnamespace:["projectref"],projectref:["projectnamespace"],principalnamespace:["principalref"],principalref:["principalnamespace"],resourcenamespace:["resourceref"],resourceref:["resourcenamespace"]}};function validate28(data,{instancePath="",parentData,parentDataProperty,rootData=data,dynamicAnchors={}}={}){let vErrors=null;let errors=0;const evaluated0=validate28.evaluated;if(evaluated0.dynamicProps){evaluated0.props=void 0}if(evaluated0.dynamicItems){evaluated0.items=void 0}if(data&&typeof data=="object"&&!Array.isArray(data)){if(data.specversion===void 0){const err0={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"specversion"},message:"must have required property 'specversion'"};if(vErrors===null){vErrors=[err0]}else{vErrors.push(err0)}errors++}if(data.id===void 0){const err1={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};if(vErrors===null){vErrors=[err1]}else{vErrors.push(err1)}errors++}if(data.source===void 0){const err2={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"source"},message:"must have required property 'source'"};if(vErrors===null){vErrors=[err2]}else{vErrors.push(err2)}errors++}if(data.type===void 0){const err3={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};if(vErrors===null){vErrors=[err3]}else{vErrors.push(err3)}errors++}if(data.time===void 0){const err4={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"time"},message:"must have required property 'time'"};if(vErrors===null){vErrors=[err4]}else{vErrors.push(err4)}errors++}if(data.dataschema===void 0){const err5={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"dataschema"},message:"must have required property 'dataschema'"};if(vErrors===null){vErrors=[err5]}else{vErrors.push(err5)}errors++}if(data.datacontenttype===void 0){const err6={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"datacontenttype"},message:"must have required property 'datacontenttype'"};if(vErrors===null){vErrors=[err6]}else{vErrors.push(err6)}errors++}if(data.profile===void 0){const err7={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"profile"},message:"must have required property 'profile'"};if(vErrors===null){vErrors=[err7]}else{vErrors.push(err7)}errors++}if(data.kind===void 0){const err8={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"kind"},message:"must have required property 'kind'"};if(vErrors===null){vErrors=[err8]}else{vErrors.push(err8)}errors++}if(data.serviceorigin===void 0){const err9={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"serviceorigin"},message:"must have required property 'serviceorigin'"};if(vErrors===null){vErrors=[err9]}else{vErrors.push(err9)}errors++}if(data.sourcetenant===void 0){const err10={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"sourcetenant"},message:"must have required property 'sourcetenant'"};if(vErrors===null){vErrors=[err10]}else{vErrors.push(err10)}errors++}if(data.correlationid===void 0){const err11={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"correlationid"},message:"must have required property 'correlationid'"};if(vErrors===null){vErrors=[err11]}else{vErrors.push(err11)}errors++}if(data.data===void 0){const err12={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"data"},message:"must have required property 'data'"};if(vErrors===null){vErrors=[err12]}else{vErrors.push(err12)}errors++}for(const key0 in data){if(!func11.call(schema36.properties,key0)){const err13={instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key0},message:"must NOT have additional properties"};if(vErrors===null){vErrors=[err13]}else{vErrors.push(err13)}errors++}}if(data.specversion!==void 0){let data0=data.specversion;if(typeof data0!=="string"){const err14={instancePath:instancePath+"/specversion",schemaPath:"#/properties/specversion/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err14]}else{vErrors.push(err14)}errors++}if("1.0"!==data0){const err15={instancePath:instancePath+"/specversion",schemaPath:"#/properties/specversion/const",keyword:"const",params:{allowedValue:"1.0"},message:"must be equal to constant"};if(vErrors===null){vErrors=[err15]}else{vErrors.push(err15)}errors++}}if(data.id!==void 0){let data1=data.id;if(typeof data1==="string"){if(func1(data1)>256){const err16={instancePath:instancePath+"/id",schemaPath:"#/properties/id/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err16]}else{vErrors.push(err16)}errors++}if(func1(data1)<1){const err17={instancePath:instancePath+"/id",schemaPath:"#/properties/id/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err17]}else{vErrors.push(err17)}errors++}if(!pattern4.test(data1)){const err18={instancePath:instancePath+"/id",schemaPath:"#/properties/id/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err18]}else{vErrors.push(err18)}errors++}}else{const err19={instancePath:instancePath+"/id",schemaPath:"#/properties/id/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err19]}else{vErrors.push(err19)}errors++}}if(data.source!==void 0){let data2=data.source;if(typeof data2==="string"){if(func1(data2)>2048){const err20={instancePath:instancePath+"/source",schemaPath:"#/properties/source/maxLength",keyword:"maxLength",params:{limit:2048},message:"must NOT have more than 2048 characters"};if(vErrors===null){vErrors=[err20]}else{vErrors.push(err20)}errors++}if(func1(data2)<1){const err21={instancePath:instancePath+"/source",schemaPath:"#/properties/source/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err21]}else{vErrors.push(err21)}errors++}if(!pattern4.test(data2)){const err22={instancePath:instancePath+"/source",schemaPath:"#/properties/source/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err22]}else{vErrors.push(err22)}errors++}if(!formats0(data2)){const err23={instancePath:instancePath+"/source",schemaPath:"#/properties/source/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};if(vErrors===null){vErrors=[err23]}else{vErrors.push(err23)}errors++}}else{const err24={instancePath:instancePath+"/source",schemaPath:"#/properties/source/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err24]}else{vErrors.push(err24)}errors++}}if(data.type!==void 0){let data3=data.type;if(typeof data3==="string"){if(func1(data3)>256){const err25={instancePath:instancePath+"/type",schemaPath:"#/properties/type/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err25]}else{vErrors.push(err25)}errors++}if(func1(data3)<1){const err26={instancePath:instancePath+"/type",schemaPath:"#/properties/type/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err26]}else{vErrors.push(err26)}errors++}if(!pattern12.test(data3)){const err27={instancePath:instancePath+"/type",schemaPath:"#/properties/type/pattern",keyword:"pattern",params:{pattern:"^[a-zA-Z0-9][a-zA-Z0-9._-]*\\.v[1-9][0-9]*$"},message:'must match pattern "^[a-zA-Z0-9][a-zA-Z0-9._-]*\\.v[1-9][0-9]*$"'};if(vErrors===null){vErrors=[err27]}else{vErrors.push(err27)}errors++}}else{const err28={instancePath:instancePath+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err28]}else{vErrors.push(err28)}errors++}}if(data.time!==void 0){let data4=data.time;if(typeof data4==="string"){if(func1(data4)>64){const err29={instancePath:instancePath+"/time",schemaPath:"#/properties/time/maxLength",keyword:"maxLength",params:{limit:64},message:"must NOT have more than 64 characters"};if(vErrors===null){vErrors=[err29]}else{vErrors.push(err29)}errors++}if(!formats2.validate(data4)){const err30={instancePath:instancePath+"/time",schemaPath:"#/properties/time/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};if(vErrors===null){vErrors=[err30]}else{vErrors.push(err30)}errors++}}else{const err31={instancePath:instancePath+"/time",schemaPath:"#/properties/time/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err31]}else{vErrors.push(err31)}errors++}}if(data.dataschema!==void 0){let data5=data.dataschema;if(typeof data5==="string"){if(func1(data5)>2048){const err32={instancePath:instancePath+"/dataschema",schemaPath:"#/properties/dataschema/maxLength",keyword:"maxLength",params:{limit:2048},message:"must NOT have more than 2048 characters"};if(vErrors===null){vErrors=[err32]}else{vErrors.push(err32)}errors++}if(func1(data5)<1){const err33={instancePath:instancePath+"/dataschema",schemaPath:"#/properties/dataschema/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err33]}else{vErrors.push(err33)}errors++}if(!pattern4.test(data5)){const err34={instancePath:instancePath+"/dataschema",schemaPath:"#/properties/dataschema/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err34]}else{vErrors.push(err34)}errors++}if(!formats0(data5)){const err35={instancePath:instancePath+"/dataschema",schemaPath:"#/properties/dataschema/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};if(vErrors===null){vErrors=[err35]}else{vErrors.push(err35)}errors++}}else{const err36={instancePath:instancePath+"/dataschema",schemaPath:"#/properties/dataschema/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err36]}else{vErrors.push(err36)}errors++}}if(data.datacontenttype!==void 0){let data6=data.datacontenttype;if(typeof data6!=="string"){const err37={instancePath:instancePath+"/datacontenttype",schemaPath:"#/properties/datacontenttype/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err37]}else{vErrors.push(err37)}errors++}if("application/json"!==data6){const err38={instancePath:instancePath+"/datacontenttype",schemaPath:"#/properties/datacontenttype/const",keyword:"const",params:{allowedValue:"application/json"},message:"must be equal to constant"};if(vErrors===null){vErrors=[err38]}else{vErrors.push(err38)}errors++}}if(data.profile!==void 0){let data7=data.profile;if(typeof data7!=="string"){const err39={instancePath:instancePath+"/profile",schemaPath:"#/properties/profile/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err39]}else{vErrors.push(err39)}errors++}if("eventsdk/1.2"!==data7){const err40={instancePath:instancePath+"/profile",schemaPath:"#/properties/profile/const",keyword:"const",params:{allowedValue:"eventsdk/1.2"},message:"must be equal to constant"};if(vErrors===null){vErrors=[err40]}else{vErrors.push(err40)}errors++}}if(data.kind!==void 0){let data8=data.kind;if(typeof data8!=="string"){const err41={instancePath:instancePath+"/kind",schemaPath:"#/properties/kind/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err41]}else{vErrors.push(err41)}errors++}if("EVENT"!==data8){const err42={instancePath:instancePath+"/kind",schemaPath:"#/properties/kind/const",keyword:"const",params:{allowedValue:"EVENT"},message:"must be equal to constant"};if(vErrors===null){vErrors=[err42]}else{vErrors.push(err42)}errors++}}if(data.serviceorigin!==void 0){let data9=data.serviceorigin;if(typeof data9==="string"){if(func1(data9)>256){const err43={instancePath:instancePath+"/serviceorigin",schemaPath:"#/properties/serviceorigin/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err43]}else{vErrors.push(err43)}errors++}if(func1(data9)<1){const err44={instancePath:instancePath+"/serviceorigin",schemaPath:"#/properties/serviceorigin/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err44]}else{vErrors.push(err44)}errors++}if(!pattern4.test(data9)){const err45={instancePath:instancePath+"/serviceorigin",schemaPath:"#/properties/serviceorigin/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err45]}else{vErrors.push(err45)}errors++}}else{const err46={instancePath:instancePath+"/serviceorigin",schemaPath:"#/properties/serviceorigin/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err46]}else{vErrors.push(err46)}errors++}}if(data.sourcetenant!==void 0){let data10=data.sourcetenant;if(typeof data10==="string"){if(func1(data10)>256){const err47={instancePath:instancePath+"/sourcetenant",schemaPath:"#/properties/sourcetenant/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err47]}else{vErrors.push(err47)}errors++}if(func1(data10)<1){const err48={instancePath:instancePath+"/sourcetenant",schemaPath:"#/properties/sourcetenant/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err48]}else{vErrors.push(err48)}errors++}if(!pattern4.test(data10)){const err49={instancePath:instancePath+"/sourcetenant",schemaPath:"#/properties/sourcetenant/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err49]}else{vErrors.push(err49)}errors++}}else{const err50={instancePath:instancePath+"/sourcetenant",schemaPath:"#/properties/sourcetenant/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err50]}else{vErrors.push(err50)}errors++}}if(data.correlationid!==void 0){let data11=data.correlationid;if(typeof data11==="string"){if(func1(data11)>256){const err51={instancePath:instancePath+"/correlationid",schemaPath:"#/properties/correlationid/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err51]}else{vErrors.push(err51)}errors++}if(func1(data11)<1){const err52={instancePath:instancePath+"/correlationid",schemaPath:"#/properties/correlationid/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err52]}else{vErrors.push(err52)}errors++}if(!pattern4.test(data11)){const err53={instancePath:instancePath+"/correlationid",schemaPath:"#/properties/correlationid/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err53]}else{vErrors.push(err53)}errors++}}else{const err54={instancePath:instancePath+"/correlationid",schemaPath:"#/properties/correlationid/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err54]}else{vErrors.push(err54)}errors++}}if(data.causationid!==void 0){let data12=data.causationid;if(typeof data12==="string"){if(func1(data12)>256){const err55={instancePath:instancePath+"/causationid",schemaPath:"#/properties/causationid/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err55]}else{vErrors.push(err55)}errors++}if(func1(data12)<1){const err56={instancePath:instancePath+"/causationid",schemaPath:"#/properties/causationid/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err56]}else{vErrors.push(err56)}errors++}if(!pattern4.test(data12)){const err57={instancePath:instancePath+"/causationid",schemaPath:"#/properties/causationid/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err57]}else{vErrors.push(err57)}errors++}}else{const err58={instancePath:instancePath+"/causationid",schemaPath:"#/properties/causationid/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err58]}else{vErrors.push(err58)}errors++}}if(data.subject!==void 0){let data13=data.subject;if(typeof data13==="string"){if(func1(data13)>1024){const err59={instancePath:instancePath+"/subject",schemaPath:"#/properties/subject/maxLength",keyword:"maxLength",params:{limit:1024},message:"must NOT have more than 1024 characters"};if(vErrors===null){vErrors=[err59]}else{vErrors.push(err59)}errors++}if(func1(data13)<1){const err60={instancePath:instancePath+"/subject",schemaPath:"#/properties/subject/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err60]}else{vErrors.push(err60)}errors++}if(!pattern4.test(data13)){const err61={instancePath:instancePath+"/subject",schemaPath:"#/properties/subject/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err61]}else{vErrors.push(err61)}errors++}}else{const err62={instancePath:instancePath+"/subject",schemaPath:"#/properties/subject/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err62]}else{vErrors.push(err62)}errors++}}if(data.data!==void 0){if(!validate20(data.data,{instancePath:instancePath+"/data",parentData:data,parentDataProperty:"data",rootData,dynamicAnchors})){vErrors=vErrors===null?validate20.errors:vErrors.concat(validate20.errors);errors=vErrors.length}}if(data.orgnamespace!==void 0){let data15=data.orgnamespace;if(typeof data15==="string"){if(func1(data15)>256){const err63={instancePath:instancePath+"/orgnamespace",schemaPath:"#/properties/orgnamespace/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err63]}else{vErrors.push(err63)}errors++}if(func1(data15)<1){const err64={instancePath:instancePath+"/orgnamespace",schemaPath:"#/properties/orgnamespace/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err64]}else{vErrors.push(err64)}errors++}if(!pattern4.test(data15)){const err65={instancePath:instancePath+"/orgnamespace",schemaPath:"#/properties/orgnamespace/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err65]}else{vErrors.push(err65)}errors++}}else{const err66={instancePath:instancePath+"/orgnamespace",schemaPath:"#/properties/orgnamespace/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err66]}else{vErrors.push(err66)}errors++}}if(data.orgref!==void 0){let data16=data.orgref;if(typeof data16==="string"){if(func1(data16)>256){const err67={instancePath:instancePath+"/orgref",schemaPath:"#/properties/orgref/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err67]}else{vErrors.push(err67)}errors++}if(func1(data16)<1){const err68={instancePath:instancePath+"/orgref",schemaPath:"#/properties/orgref/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err68]}else{vErrors.push(err68)}errors++}if(!pattern4.test(data16)){const err69={instancePath:instancePath+"/orgref",schemaPath:"#/properties/orgref/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err69]}else{vErrors.push(err69)}errors++}}else{const err70={instancePath:instancePath+"/orgref",schemaPath:"#/properties/orgref/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err70]}else{vErrors.push(err70)}errors++}}if(data.projectnamespace!==void 0){let data17=data.projectnamespace;if(typeof data17==="string"){if(func1(data17)>256){const err71={instancePath:instancePath+"/projectnamespace",schemaPath:"#/properties/projectnamespace/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err71]}else{vErrors.push(err71)}errors++}if(func1(data17)<1){const err72={instancePath:instancePath+"/projectnamespace",schemaPath:"#/properties/projectnamespace/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err72]}else{vErrors.push(err72)}errors++}if(!pattern4.test(data17)){const err73={instancePath:instancePath+"/projectnamespace",schemaPath:"#/properties/projectnamespace/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err73]}else{vErrors.push(err73)}errors++}}else{const err74={instancePath:instancePath+"/projectnamespace",schemaPath:"#/properties/projectnamespace/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err74]}else{vErrors.push(err74)}errors++}}if(data.projectref!==void 0){let data18=data.projectref;if(typeof data18==="string"){if(func1(data18)>256){const err75={instancePath:instancePath+"/projectref",schemaPath:"#/properties/projectref/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err75]}else{vErrors.push(err75)}errors++}if(func1(data18)<1){const err76={instancePath:instancePath+"/projectref",schemaPath:"#/properties/projectref/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err76]}else{vErrors.push(err76)}errors++}if(!pattern4.test(data18)){const err77={instancePath:instancePath+"/projectref",schemaPath:"#/properties/projectref/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err77]}else{vErrors.push(err77)}errors++}}else{const err78={instancePath:instancePath+"/projectref",schemaPath:"#/properties/projectref/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err78]}else{vErrors.push(err78)}errors++}}if(data.principalnamespace!==void 0){let data19=data.principalnamespace;if(typeof data19==="string"){if(func1(data19)>256){const err79={instancePath:instancePath+"/principalnamespace",schemaPath:"#/properties/principalnamespace/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err79]}else{vErrors.push(err79)}errors++}if(func1(data19)<1){const err80={instancePath:instancePath+"/principalnamespace",schemaPath:"#/properties/principalnamespace/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err80]}else{vErrors.push(err80)}errors++}if(!pattern4.test(data19)){const err81={instancePath:instancePath+"/principalnamespace",schemaPath:"#/properties/principalnamespace/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err81]}else{vErrors.push(err81)}errors++}}else{const err82={instancePath:instancePath+"/principalnamespace",schemaPath:"#/properties/principalnamespace/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err82]}else{vErrors.push(err82)}errors++}}if(data.principalref!==void 0){let data20=data.principalref;if(typeof data20==="string"){if(func1(data20)>256){const err83={instancePath:instancePath+"/principalref",schemaPath:"#/properties/principalref/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err83]}else{vErrors.push(err83)}errors++}if(func1(data20)<1){const err84={instancePath:instancePath+"/principalref",schemaPath:"#/properties/principalref/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err84]}else{vErrors.push(err84)}errors++}if(!pattern4.test(data20)){const err85={instancePath:instancePath+"/principalref",schemaPath:"#/properties/principalref/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err85]}else{vErrors.push(err85)}errors++}}else{const err86={instancePath:instancePath+"/principalref",schemaPath:"#/properties/principalref/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err86]}else{vErrors.push(err86)}errors++}}if(data.resourcenamespace!==void 0){let data21=data.resourcenamespace;if(typeof data21==="string"){if(func1(data21)>256){const err87={instancePath:instancePath+"/resourcenamespace",schemaPath:"#/properties/resourcenamespace/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err87]}else{vErrors.push(err87)}errors++}if(func1(data21)<1){const err88={instancePath:instancePath+"/resourcenamespace",schemaPath:"#/properties/resourcenamespace/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err88]}else{vErrors.push(err88)}errors++}if(!pattern4.test(data21)){const err89={instancePath:instancePath+"/resourcenamespace",schemaPath:"#/properties/resourcenamespace/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err89]}else{vErrors.push(err89)}errors++}}else{const err90={instancePath:instancePath+"/resourcenamespace",schemaPath:"#/properties/resourcenamespace/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err90]}else{vErrors.push(err90)}errors++}}if(data.resourceref!==void 0){let data22=data.resourceref;if(typeof data22==="string"){if(func1(data22)>256){const err91={instancePath:instancePath+"/resourceref",schemaPath:"#/properties/resourceref/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err91]}else{vErrors.push(err91)}errors++}if(func1(data22)<1){const err92={instancePath:instancePath+"/resourceref",schemaPath:"#/properties/resourceref/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err92]}else{vErrors.push(err92)}errors++}if(!pattern4.test(data22)){const err93={instancePath:instancePath+"/resourceref",schemaPath:"#/properties/resourceref/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err93]}else{vErrors.push(err93)}errors++}}else{const err94={instancePath:instancePath+"/resourceref",schemaPath:"#/properties/resourceref/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err94]}else{vErrors.push(err94)}errors++}}if(data.orgnamespace!==void 0){if(data.orgref===void 0){const err95={instancePath,schemaPath:"#/dependentRequired",keyword:"dependentRequired",params:{property:"orgnamespace",missingProperty:"orgref",depsCount:1,deps:"orgref"},message:"must have property orgref when property orgnamespace is present"};if(vErrors===null){vErrors=[err95]}else{vErrors.push(err95)}errors++}}if(data.orgref!==void 0){if(data.orgnamespace===void 0){const err96={instancePath,schemaPath:"#/dependentRequired",keyword:"dependentRequired",params:{property:"orgref",missingProperty:"orgnamespace",depsCount:1,deps:"orgnamespace"},message:"must have property orgnamespace when property orgref is present"};if(vErrors===null){vErrors=[err96]}else{vErrors.push(err96)}errors++}}if(data.projectnamespace!==void 0){if(data.projectref===void 0){const err97={instancePath,schemaPath:"#/dependentRequired",keyword:"dependentRequired",params:{property:"projectnamespace",missingProperty:"projectref",depsCount:1,deps:"projectref"},message:"must have property projectref when property projectnamespace is present"};if(vErrors===null){vErrors=[err97]}else{vErrors.push(err97)}errors++}}if(data.projectref!==void 0){if(data.projectnamespace===void 0){const err98={instancePath,schemaPath:"#/dependentRequired",keyword:"dependentRequired",params:{property:"projectref",missingProperty:"projectnamespace",depsCount:1,deps:"projectnamespace"},message:"must have property projectnamespace when property projectref is present"};if(vErrors===null){vErrors=[err98]}else{vErrors.push(err98)}errors++}}if(data.principalnamespace!==void 0){if(data.principalref===void 0){const err99={instancePath,schemaPath:"#/dependentRequired",keyword:"dependentRequired",params:{property:"principalnamespace",missingProperty:"principalref",depsCount:1,deps:"principalref"},message:"must have property principalref when property principalnamespace is present"};if(vErrors===null){vErrors=[err99]}else{vErrors.push(err99)}errors++}}if(data.principalref!==void 0){if(data.principalnamespace===void 0){const err100={instancePath,schemaPath:"#/dependentRequired",keyword:"dependentRequired",params:{property:"principalref",missingProperty:"principalnamespace",depsCount:1,deps:"principalnamespace"},message:"must have property principalnamespace when property principalref is present"};if(vErrors===null){vErrors=[err100]}else{vErrors.push(err100)}errors++}}if(data.resourcenamespace!==void 0){if(data.resourceref===void 0){const err101={instancePath,schemaPath:"#/dependentRequired",keyword:"dependentRequired",params:{property:"resourcenamespace",missingProperty:"resourceref",depsCount:1,deps:"resourceref"},message:"must have property resourceref when property resourcenamespace is present"};if(vErrors===null){vErrors=[err101]}else{vErrors.push(err101)}errors++}}if(data.resourceref!==void 0){if(data.resourcenamespace===void 0){const err102={instancePath,schemaPath:"#/dependentRequired",keyword:"dependentRequired",params:{property:"resourceref",missingProperty:"resourcenamespace",depsCount:1,deps:"resourcenamespace"},message:"must have property resourcenamespace when property resourceref is present"};if(vErrors===null){vErrors=[err102]}else{vErrors.push(err102)}errors++}}}else{const err103={instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};if(vErrors===null){vErrors=[err103]}else{vErrors.push(err103)}errors++}validate28.errors=vErrors;return errors===0}validate28.evaluated={props:true,dynamicProps:false,dynamicItems:false};var cloudEventSupported=validate30;function validate30(data,{instancePath="",parentData,parentDataProperty,rootData=data,dynamicAnchors={}}={}){let vErrors=null;let errors=0;const evaluated0=validate30.evaluated;if(evaluated0.dynamicProps){evaluated0.props=void 0}if(evaluated0.dynamicItems){evaluated0.items=void 0}const _errs0=errors;let valid0=false;let passing0=null;const _errs1=errors;if(!validate22(data,{instancePath,parentData,parentDataProperty,rootData,dynamicAnchors})){vErrors=vErrors===null?validate22.errors:vErrors.concat(validate22.errors);errors=vErrors.length}var _valid0=_errs1===errors;if(_valid0){valid0=true;passing0=0;var props0=true}const _errs2=errors;if(!validate24(data,{instancePath,parentData,parentDataProperty,rootData,dynamicAnchors})){vErrors=vErrors===null?validate24.errors:vErrors.concat(validate24.errors);errors=vErrors.length}var _valid0=_errs2===errors;if(_valid0&&valid0){valid0=false;passing0=[passing0,1]}else{if(_valid0){valid0=true;passing0=1;if(props0!==true){props0=true}}const _errs3=errors;if(!validate26(data,{instancePath,parentData,parentDataProperty,rootData,dynamicAnchors})){vErrors=vErrors===null?validate26.errors:vErrors.concat(validate26.errors);errors=vErrors.length}var _valid0=_errs3===errors;if(_valid0&&valid0){valid0=false;passing0=[passing0,2]}else{if(_valid0){valid0=true;passing0=2;if(props0!==true){props0=true}}}}if(!valid0){const err0={instancePath,schemaPath:"#/oneOf",keyword:"oneOf",params:{passingSchemas:passing0},message:"must match exactly one schema in oneOf"};if(vErrors===null){vErrors=[err0]}else{vErrors.push(err0)}errors++}else{errors=_errs0;if(vErrors!==null){if(_errs0){vErrors.length=_errs0}else{vErrors=null}}}validate30.errors=vErrors;evaluated0.props=props0;return errors===0}validate30.evaluated={dynamicProps:true,dynamicItems:false};var namespacedReference=validate34;function validate34(data,{instancePath="",parentData,parentDataProperty,rootData=data,dynamicAnchors={}}={}){let vErrors=null;let errors=0;const evaluated0=validate34.evaluated;if(evaluated0.dynamicProps){evaluated0.props=void 0}if(evaluated0.dynamicItems){evaluated0.items=void 0}if(data&&typeof data=="object"&&!Array.isArray(data)){if(data.namespace===void 0){const err0={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"namespace"},message:"must have required property 'namespace'"};if(vErrors===null){vErrors=[err0]}else{vErrors.push(err0)}errors++}if(data.ref===void 0){const err1={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"ref"},message:"must have required property 'ref'"};if(vErrors===null){vErrors=[err1]}else{vErrors.push(err1)}errors++}for(const key0 in data){if(!(key0==="namespace"||key0==="ref")){const err2={instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key0},message:"must NOT have additional properties"};if(vErrors===null){vErrors=[err2]}else{vErrors.push(err2)}errors++}}if(data.namespace!==void 0){let data0=data.namespace;if(typeof data0==="string"){if(func1(data0)>256){const err3={instancePath:instancePath+"/namespace",schemaPath:"#/properties/namespace/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err3]}else{vErrors.push(err3)}errors++}if(func1(data0)<1){const err4={instancePath:instancePath+"/namespace",schemaPath:"#/properties/namespace/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err4]}else{vErrors.push(err4)}errors++}if(!pattern4.test(data0)){const err5={instancePath:instancePath+"/namespace",schemaPath:"#/properties/namespace/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err5]}else{vErrors.push(err5)}errors++}}else{const err6={instancePath:instancePath+"/namespace",schemaPath:"#/properties/namespace/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err6]}else{vErrors.push(err6)}errors++}}if(data.ref!==void 0){let data1=data.ref;if(typeof data1==="string"){if(func1(data1)>256){const err7={instancePath:instancePath+"/ref",schemaPath:"#/properties/ref/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err7]}else{vErrors.push(err7)}errors++}if(func1(data1)<1){const err8={instancePath:instancePath+"/ref",schemaPath:"#/properties/ref/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err8]}else{vErrors.push(err8)}errors++}if(!pattern4.test(data1)){const err9={instancePath:instancePath+"/ref",schemaPath:"#/properties/ref/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err9]}else{vErrors.push(err9)}errors++}}else{const err10={instancePath:instancePath+"/ref",schemaPath:"#/properties/ref/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err10]}else{vErrors.push(err10)}errors++}}}else{const err11={instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};if(vErrors===null){vErrors=[err11]}else{vErrors.push(err11)}errors++}validate34.errors=vErrors;return errors===0}validate34.evaluated={props:true,dynamicProps:false,dynamicItems:false};var identityContext=validate35;function validate35(data,{instancePath="",parentData,parentDataProperty,rootData=data,dynamicAnchors={}}={}){let vErrors=null;let errors=0;const evaluated0=validate35.evaluated;if(evaluated0.dynamicProps){evaluated0.props=void 0}if(evaluated0.dynamicItems){evaluated0.items=void 0}if(data&&typeof data=="object"&&!Array.isArray(data)){if(data.sourceTenant===void 0){const err0={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"sourceTenant"},message:"must have required property 'sourceTenant'"};if(vErrors===null){vErrors=[err0]}else{vErrors.push(err0)}errors++}for(const key0 in data){if(!(key0==="sourceTenant"||key0==="organization"||key0==="project"||key0==="actorPrincipal"||key0==="resource")){const err1={instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key0},message:"must NOT have additional properties"};if(vErrors===null){vErrors=[err1]}else{vErrors.push(err1)}errors++}}if(data.sourceTenant!==void 0){let data0=data.sourceTenant;if(data0&&typeof data0=="object"&&!Array.isArray(data0)){if(data0.serviceRef===void 0){const err2={instancePath:instancePath+"/sourceTenant",schemaPath:"tenant-context.schema.json/required",keyword:"required",params:{missingProperty:"serviceRef"},message:"must have required property 'serviceRef'"};if(vErrors===null){vErrors=[err2]}else{vErrors.push(err2)}errors++}if(data0.tenantRef===void 0){const err3={instancePath:instancePath+"/sourceTenant",schemaPath:"tenant-context.schema.json/required",keyword:"required",params:{missingProperty:"tenantRef"},message:"must have required property 'tenantRef'"};if(vErrors===null){vErrors=[err3]}else{vErrors.push(err3)}errors++}for(const key1 in data0){if(!(key1==="serviceRef"||key1==="tenantRef")){const err4={instancePath:instancePath+"/sourceTenant",schemaPath:"tenant-context.schema.json/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key1},message:"must NOT have additional properties"};if(vErrors===null){vErrors=[err4]}else{vErrors.push(err4)}errors++}}if(data0.serviceRef!==void 0){let data1=data0.serviceRef;if(typeof data1==="string"){if(func1(data1)>256){const err5={instancePath:instancePath+"/sourceTenant/serviceRef",schemaPath:"tenant-context.schema.json/properties/serviceRef/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err5]}else{vErrors.push(err5)}errors++}if(func1(data1)<1){const err6={instancePath:instancePath+"/sourceTenant/serviceRef",schemaPath:"tenant-context.schema.json/properties/serviceRef/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err6]}else{vErrors.push(err6)}errors++}if(!pattern4.test(data1)){const err7={instancePath:instancePath+"/sourceTenant/serviceRef",schemaPath:"tenant-context.schema.json/properties/serviceRef/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err7]}else{vErrors.push(err7)}errors++}}else{const err8={instancePath:instancePath+"/sourceTenant/serviceRef",schemaPath:"tenant-context.schema.json/properties/serviceRef/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err8]}else{vErrors.push(err8)}errors++}}if(data0.tenantRef!==void 0){let data2=data0.tenantRef;if(typeof data2==="string"){if(func1(data2)>256){const err9={instancePath:instancePath+"/sourceTenant/tenantRef",schemaPath:"tenant-context.schema.json/properties/tenantRef/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err9]}else{vErrors.push(err9)}errors++}if(func1(data2)<1){const err10={instancePath:instancePath+"/sourceTenant/tenantRef",schemaPath:"tenant-context.schema.json/properties/tenantRef/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err10]}else{vErrors.push(err10)}errors++}if(!pattern4.test(data2)){const err11={instancePath:instancePath+"/sourceTenant/tenantRef",schemaPath:"tenant-context.schema.json/properties/tenantRef/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err11]}else{vErrors.push(err11)}errors++}}else{const err12={instancePath:instancePath+"/sourceTenant/tenantRef",schemaPath:"tenant-context.schema.json/properties/tenantRef/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err12]}else{vErrors.push(err12)}errors++}}}else{const err13={instancePath:instancePath+"/sourceTenant",schemaPath:"tenant-context.schema.json/type",keyword:"type",params:{type:"object"},message:"must be object"};if(vErrors===null){vErrors=[err13]}else{vErrors.push(err13)}errors++}}if(data.organization!==void 0){let data3=data.organization;if(data3&&typeof data3=="object"&&!Array.isArray(data3)){if(data3.namespace===void 0){const err14={instancePath:instancePath+"/organization",schemaPath:"namespaced-reference.schema.json/required",keyword:"required",params:{missingProperty:"namespace"},message:"must have required property 'namespace'"};if(vErrors===null){vErrors=[err14]}else{vErrors.push(err14)}errors++}if(data3.ref===void 0){const err15={instancePath:instancePath+"/organization",schemaPath:"namespaced-reference.schema.json/required",keyword:"required",params:{missingProperty:"ref"},message:"must have required property 'ref'"};if(vErrors===null){vErrors=[err15]}else{vErrors.push(err15)}errors++}for(const key2 in data3){if(!(key2==="namespace"||key2==="ref")){const err16={instancePath:instancePath+"/organization",schemaPath:"namespaced-reference.schema.json/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key2},message:"must NOT have additional properties"};if(vErrors===null){vErrors=[err16]}else{vErrors.push(err16)}errors++}}if(data3.namespace!==void 0){let data4=data3.namespace;if(typeof data4==="string"){if(func1(data4)>256){const err17={instancePath:instancePath+"/organization/namespace",schemaPath:"namespaced-reference.schema.json/properties/namespace/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err17]}else{vErrors.push(err17)}errors++}if(func1(data4)<1){const err18={instancePath:instancePath+"/organization/namespace",schemaPath:"namespaced-reference.schema.json/properties/namespace/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err18]}else{vErrors.push(err18)}errors++}if(!pattern4.test(data4)){const err19={instancePath:instancePath+"/organization/namespace",schemaPath:"namespaced-reference.schema.json/properties/namespace/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err19]}else{vErrors.push(err19)}errors++}}else{const err20={instancePath:instancePath+"/organization/namespace",schemaPath:"namespaced-reference.schema.json/properties/namespace/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err20]}else{vErrors.push(err20)}errors++}}if(data3.ref!==void 0){let data5=data3.ref;if(typeof data5==="string"){if(func1(data5)>256){const err21={instancePath:instancePath+"/organization/ref",schemaPath:"namespaced-reference.schema.json/properties/ref/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err21]}else{vErrors.push(err21)}errors++}if(func1(data5)<1){const err22={instancePath:instancePath+"/organization/ref",schemaPath:"namespaced-reference.schema.json/properties/ref/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err22]}else{vErrors.push(err22)}errors++}if(!pattern4.test(data5)){const err23={instancePath:instancePath+"/organization/ref",schemaPath:"namespaced-reference.schema.json/properties/ref/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err23]}else{vErrors.push(err23)}errors++}}else{const err24={instancePath:instancePath+"/organization/ref",schemaPath:"namespaced-reference.schema.json/properties/ref/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err24]}else{vErrors.push(err24)}errors++}}}else{const err25={instancePath:instancePath+"/organization",schemaPath:"namespaced-reference.schema.json/type",keyword:"type",params:{type:"object"},message:"must be object"};if(vErrors===null){vErrors=[err25]}else{vErrors.push(err25)}errors++}}if(data.project!==void 0){let data6=data.project;if(data6&&typeof data6=="object"&&!Array.isArray(data6)){if(data6.namespace===void 0){const err26={instancePath:instancePath+"/project",schemaPath:"namespaced-reference.schema.json/required",keyword:"required",params:{missingProperty:"namespace"},message:"must have required property 'namespace'"};if(vErrors===null){vErrors=[err26]}else{vErrors.push(err26)}errors++}if(data6.ref===void 0){const err27={instancePath:instancePath+"/project",schemaPath:"namespaced-reference.schema.json/required",keyword:"required",params:{missingProperty:"ref"},message:"must have required property 'ref'"};if(vErrors===null){vErrors=[err27]}else{vErrors.push(err27)}errors++}for(const key3 in data6){if(!(key3==="namespace"||key3==="ref")){const err28={instancePath:instancePath+"/project",schemaPath:"namespaced-reference.schema.json/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key3},message:"must NOT have additional properties"};if(vErrors===null){vErrors=[err28]}else{vErrors.push(err28)}errors++}}if(data6.namespace!==void 0){let data7=data6.namespace;if(typeof data7==="string"){if(func1(data7)>256){const err29={instancePath:instancePath+"/project/namespace",schemaPath:"namespaced-reference.schema.json/properties/namespace/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err29]}else{vErrors.push(err29)}errors++}if(func1(data7)<1){const err30={instancePath:instancePath+"/project/namespace",schemaPath:"namespaced-reference.schema.json/properties/namespace/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err30]}else{vErrors.push(err30)}errors++}if(!pattern4.test(data7)){const err31={instancePath:instancePath+"/project/namespace",schemaPath:"namespaced-reference.schema.json/properties/namespace/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err31]}else{vErrors.push(err31)}errors++}}else{const err32={instancePath:instancePath+"/project/namespace",schemaPath:"namespaced-reference.schema.json/properties/namespace/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err32]}else{vErrors.push(err32)}errors++}}if(data6.ref!==void 0){let data8=data6.ref;if(typeof data8==="string"){if(func1(data8)>256){const err33={instancePath:instancePath+"/project/ref",schemaPath:"namespaced-reference.schema.json/properties/ref/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err33]}else{vErrors.push(err33)}errors++}if(func1(data8)<1){const err34={instancePath:instancePath+"/project/ref",schemaPath:"namespaced-reference.schema.json/properties/ref/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err34]}else{vErrors.push(err34)}errors++}if(!pattern4.test(data8)){const err35={instancePath:instancePath+"/project/ref",schemaPath:"namespaced-reference.schema.json/properties/ref/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err35]}else{vErrors.push(err35)}errors++}}else{const err36={instancePath:instancePath+"/project/ref",schemaPath:"namespaced-reference.schema.json/properties/ref/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err36]}else{vErrors.push(err36)}errors++}}}else{const err37={instancePath:instancePath+"/project",schemaPath:"namespaced-reference.schema.json/type",keyword:"type",params:{type:"object"},message:"must be object"};if(vErrors===null){vErrors=[err37]}else{vErrors.push(err37)}errors++}}if(data.actorPrincipal!==void 0){let data9=data.actorPrincipal;if(data9&&typeof data9=="object"&&!Array.isArray(data9)){if(data9.namespace===void 0){const err38={instancePath:instancePath+"/actorPrincipal",schemaPath:"namespaced-reference.schema.json/required",keyword:"required",params:{missingProperty:"namespace"},message:"must have required property 'namespace'"};if(vErrors===null){vErrors=[err38]}else{vErrors.push(err38)}errors++}if(data9.ref===void 0){const err39={instancePath:instancePath+"/actorPrincipal",schemaPath:"namespaced-reference.schema.json/required",keyword:"required",params:{missingProperty:"ref"},message:"must have required property 'ref'"};if(vErrors===null){vErrors=[err39]}else{vErrors.push(err39)}errors++}for(const key4 in data9){if(!(key4==="namespace"||key4==="ref")){const err40={instancePath:instancePath+"/actorPrincipal",schemaPath:"namespaced-reference.schema.json/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key4},message:"must NOT have additional properties"};if(vErrors===null){vErrors=[err40]}else{vErrors.push(err40)}errors++}}if(data9.namespace!==void 0){let data10=data9.namespace;if(typeof data10==="string"){if(func1(data10)>256){const err41={instancePath:instancePath+"/actorPrincipal/namespace",schemaPath:"namespaced-reference.schema.json/properties/namespace/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err41]}else{vErrors.push(err41)}errors++}if(func1(data10)<1){const err42={instancePath:instancePath+"/actorPrincipal/namespace",schemaPath:"namespaced-reference.schema.json/properties/namespace/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err42]}else{vErrors.push(err42)}errors++}if(!pattern4.test(data10)){const err43={instancePath:instancePath+"/actorPrincipal/namespace",schemaPath:"namespaced-reference.schema.json/properties/namespace/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err43]}else{vErrors.push(err43)}errors++}}else{const err44={instancePath:instancePath+"/actorPrincipal/namespace",schemaPath:"namespaced-reference.schema.json/properties/namespace/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err44]}else{vErrors.push(err44)}errors++}}if(data9.ref!==void 0){let data11=data9.ref;if(typeof data11==="string"){if(func1(data11)>256){const err45={instancePath:instancePath+"/actorPrincipal/ref",schemaPath:"namespaced-reference.schema.json/properties/ref/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err45]}else{vErrors.push(err45)}errors++}if(func1(data11)<1){const err46={instancePath:instancePath+"/actorPrincipal/ref",schemaPath:"namespaced-reference.schema.json/properties/ref/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err46]}else{vErrors.push(err46)}errors++}if(!pattern4.test(data11)){const err47={instancePath:instancePath+"/actorPrincipal/ref",schemaPath:"namespaced-reference.schema.json/properties/ref/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err47]}else{vErrors.push(err47)}errors++}}else{const err48={instancePath:instancePath+"/actorPrincipal/ref",schemaPath:"namespaced-reference.schema.json/properties/ref/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err48]}else{vErrors.push(err48)}errors++}}}else{const err49={instancePath:instancePath+"/actorPrincipal",schemaPath:"namespaced-reference.schema.json/type",keyword:"type",params:{type:"object"},message:"must be object"};if(vErrors===null){vErrors=[err49]}else{vErrors.push(err49)}errors++}}if(data.resource!==void 0){let data12=data.resource;if(data12&&typeof data12=="object"&&!Array.isArray(data12)){if(data12.namespace===void 0){const err50={instancePath:instancePath+"/resource",schemaPath:"namespaced-reference.schema.json/required",keyword:"required",params:{missingProperty:"namespace"},message:"must have required property 'namespace'"};if(vErrors===null){vErrors=[err50]}else{vErrors.push(err50)}errors++}if(data12.ref===void 0){const err51={instancePath:instancePath+"/resource",schemaPath:"namespaced-reference.schema.json/required",keyword:"required",params:{missingProperty:"ref"},message:"must have required property 'ref'"};if(vErrors===null){vErrors=[err51]}else{vErrors.push(err51)}errors++}for(const key5 in data12){if(!(key5==="namespace"||key5==="ref")){const err52={instancePath:instancePath+"/resource",schemaPath:"namespaced-reference.schema.json/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key5},message:"must NOT have additional properties"};if(vErrors===null){vErrors=[err52]}else{vErrors.push(err52)}errors++}}if(data12.namespace!==void 0){let data13=data12.namespace;if(typeof data13==="string"){if(func1(data13)>256){const err53={instancePath:instancePath+"/resource/namespace",schemaPath:"namespaced-reference.schema.json/properties/namespace/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err53]}else{vErrors.push(err53)}errors++}if(func1(data13)<1){const err54={instancePath:instancePath+"/resource/namespace",schemaPath:"namespaced-reference.schema.json/properties/namespace/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err54]}else{vErrors.push(err54)}errors++}if(!pattern4.test(data13)){const err55={instancePath:instancePath+"/resource/namespace",schemaPath:"namespaced-reference.schema.json/properties/namespace/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err55]}else{vErrors.push(err55)}errors++}}else{const err56={instancePath:instancePath+"/resource/namespace",schemaPath:"namespaced-reference.schema.json/properties/namespace/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err56]}else{vErrors.push(err56)}errors++}}if(data12.ref!==void 0){let data14=data12.ref;if(typeof data14==="string"){if(func1(data14)>256){const err57={instancePath:instancePath+"/resource/ref",schemaPath:"namespaced-reference.schema.json/properties/ref/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err57]}else{vErrors.push(err57)}errors++}if(func1(data14)<1){const err58={instancePath:instancePath+"/resource/ref",schemaPath:"namespaced-reference.schema.json/properties/ref/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err58]}else{vErrors.push(err58)}errors++}if(!pattern4.test(data14)){const err59={instancePath:instancePath+"/resource/ref",schemaPath:"namespaced-reference.schema.json/properties/ref/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err59]}else{vErrors.push(err59)}errors++}}else{const err60={instancePath:instancePath+"/resource/ref",schemaPath:"namespaced-reference.schema.json/properties/ref/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err60]}else{vErrors.push(err60)}errors++}}}else{const err61={instancePath:instancePath+"/resource",schemaPath:"namespaced-reference.schema.json/type",keyword:"type",params:{type:"object"},message:"must be object"};if(vErrors===null){vErrors=[err61]}else{vErrors.push(err61)}errors++}}}else{const err62={instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};if(vErrors===null){vErrors=[err62]}else{vErrors.push(err62)}errors++}validate35.errors=vErrors;return errors===0}validate35.evaluated={props:true,dynamicProps:false,dynamicItems:false};var businessReceipt=validate36;var schema45={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://eventsdk.dev/schemas/v1/business-receipt.schema.json",title:"BusinessReceipt",type:"object",additionalProperties:false,properties:{receiptRef:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u001f\\u007f]+$"},originSource:{type:"string",minLength:1,maxLength:2048,pattern:"^[^\\u0000-\\u001f\\u007f]+$",format:"uri"},originEventId:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u001f\\u007f]+$"},deliveryRef:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u001f\\u007f]+$"},consumerRef:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u001f\\u007f]+$"},targetScope:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u001f\\u007f]+$"},disposition:{type:"string",enum:["RECEIVED","APPLIED","REJECTED","HOLD","UNKNOWN"]},recordedAt:{type:"string",format:"date-time",maxLength:64},revision:{type:"integer",minimum:1,maximum:9007199254740991},reasonCode:{type:"string",minLength:1,maxLength:128,pattern:"^[A-Z][A-Z0-9_]*$"},resultRef:{$ref:"result-ref.schema.json"}},required:["receiptRef","originSource","originEventId","deliveryRef","consumerRef","targetScope","disposition","recordedAt","revision"]};var pattern98=new RegExp("^[A-Z][A-Z0-9_]*$","u");function validate36(data,{instancePath="",parentData,parentDataProperty,rootData=data,dynamicAnchors={}}={}){let vErrors=null;let errors=0;const evaluated0=validate36.evaluated;if(evaluated0.dynamicProps){evaluated0.props=void 0}if(evaluated0.dynamicItems){evaluated0.items=void 0}if(data&&typeof data=="object"&&!Array.isArray(data)){if(data.receiptRef===void 0){const err0={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"receiptRef"},message:"must have required property 'receiptRef'"};if(vErrors===null){vErrors=[err0]}else{vErrors.push(err0)}errors++}if(data.originSource===void 0){const err1={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"originSource"},message:"must have required property 'originSource'"};if(vErrors===null){vErrors=[err1]}else{vErrors.push(err1)}errors++}if(data.originEventId===void 0){const err2={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"originEventId"},message:"must have required property 'originEventId'"};if(vErrors===null){vErrors=[err2]}else{vErrors.push(err2)}errors++}if(data.deliveryRef===void 0){const err3={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"deliveryRef"},message:"must have required property 'deliveryRef'"};if(vErrors===null){vErrors=[err3]}else{vErrors.push(err3)}errors++}if(data.consumerRef===void 0){const err4={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"consumerRef"},message:"must have required property 'consumerRef'"};if(vErrors===null){vErrors=[err4]}else{vErrors.push(err4)}errors++}if(data.targetScope===void 0){const err5={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"targetScope"},message:"must have required property 'targetScope'"};if(vErrors===null){vErrors=[err5]}else{vErrors.push(err5)}errors++}if(data.disposition===void 0){const err6={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"disposition"},message:"must have required property 'disposition'"};if(vErrors===null){vErrors=[err6]}else{vErrors.push(err6)}errors++}if(data.recordedAt===void 0){const err7={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"recordedAt"},message:"must have required property 'recordedAt'"};if(vErrors===null){vErrors=[err7]}else{vErrors.push(err7)}errors++}if(data.revision===void 0){const err8={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"revision"},message:"must have required property 'revision'"};if(vErrors===null){vErrors=[err8]}else{vErrors.push(err8)}errors++}for(const key0 in data){if(!func11.call(schema45.properties,key0)){const err9={instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key0},message:"must NOT have additional properties"};if(vErrors===null){vErrors=[err9]}else{vErrors.push(err9)}errors++}}if(data.receiptRef!==void 0){let data0=data.receiptRef;if(typeof data0==="string"){if(func1(data0)>256){const err10={instancePath:instancePath+"/receiptRef",schemaPath:"#/properties/receiptRef/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err10]}else{vErrors.push(err10)}errors++}if(func1(data0)<1){const err11={instancePath:instancePath+"/receiptRef",schemaPath:"#/properties/receiptRef/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err11]}else{vErrors.push(err11)}errors++}if(!pattern4.test(data0)){const err12={instancePath:instancePath+"/receiptRef",schemaPath:"#/properties/receiptRef/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err12]}else{vErrors.push(err12)}errors++}}else{const err13={instancePath:instancePath+"/receiptRef",schemaPath:"#/properties/receiptRef/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err13]}else{vErrors.push(err13)}errors++}}if(data.originSource!==void 0){let data1=data.originSource;if(typeof data1==="string"){if(func1(data1)>2048){const err14={instancePath:instancePath+"/originSource",schemaPath:"#/properties/originSource/maxLength",keyword:"maxLength",params:{limit:2048},message:"must NOT have more than 2048 characters"};if(vErrors===null){vErrors=[err14]}else{vErrors.push(err14)}errors++}if(func1(data1)<1){const err15={instancePath:instancePath+"/originSource",schemaPath:"#/properties/originSource/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err15]}else{vErrors.push(err15)}errors++}if(!pattern4.test(data1)){const err16={instancePath:instancePath+"/originSource",schemaPath:"#/properties/originSource/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err16]}else{vErrors.push(err16)}errors++}if(!formats0(data1)){const err17={instancePath:instancePath+"/originSource",schemaPath:"#/properties/originSource/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};if(vErrors===null){vErrors=[err17]}else{vErrors.push(err17)}errors++}}else{const err18={instancePath:instancePath+"/originSource",schemaPath:"#/properties/originSource/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err18]}else{vErrors.push(err18)}errors++}}if(data.originEventId!==void 0){let data2=data.originEventId;if(typeof data2==="string"){if(func1(data2)>256){const err19={instancePath:instancePath+"/originEventId",schemaPath:"#/properties/originEventId/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err19]}else{vErrors.push(err19)}errors++}if(func1(data2)<1){const err20={instancePath:instancePath+"/originEventId",schemaPath:"#/properties/originEventId/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err20]}else{vErrors.push(err20)}errors++}if(!pattern4.test(data2)){const err21={instancePath:instancePath+"/originEventId",schemaPath:"#/properties/originEventId/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err21]}else{vErrors.push(err21)}errors++}}else{const err22={instancePath:instancePath+"/originEventId",schemaPath:"#/properties/originEventId/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err22]}else{vErrors.push(err22)}errors++}}if(data.deliveryRef!==void 0){let data3=data.deliveryRef;if(typeof data3==="string"){if(func1(data3)>256){const err23={instancePath:instancePath+"/deliveryRef",schemaPath:"#/properties/deliveryRef/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err23]}else{vErrors.push(err23)}errors++}if(func1(data3)<1){const err24={instancePath:instancePath+"/deliveryRef",schemaPath:"#/properties/deliveryRef/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err24]}else{vErrors.push(err24)}errors++}if(!pattern4.test(data3)){const err25={instancePath:instancePath+"/deliveryRef",schemaPath:"#/properties/deliveryRef/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err25]}else{vErrors.push(err25)}errors++}}else{const err26={instancePath:instancePath+"/deliveryRef",schemaPath:"#/properties/deliveryRef/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err26]}else{vErrors.push(err26)}errors++}}if(data.consumerRef!==void 0){let data4=data.consumerRef;if(typeof data4==="string"){if(func1(data4)>256){const err27={instancePath:instancePath+"/consumerRef",schemaPath:"#/properties/consumerRef/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err27]}else{vErrors.push(err27)}errors++}if(func1(data4)<1){const err28={instancePath:instancePath+"/consumerRef",schemaPath:"#/properties/consumerRef/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err28]}else{vErrors.push(err28)}errors++}if(!pattern4.test(data4)){const err29={instancePath:instancePath+"/consumerRef",schemaPath:"#/properties/consumerRef/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err29]}else{vErrors.push(err29)}errors++}}else{const err30={instancePath:instancePath+"/consumerRef",schemaPath:"#/properties/consumerRef/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err30]}else{vErrors.push(err30)}errors++}}if(data.targetScope!==void 0){let data5=data.targetScope;if(typeof data5==="string"){if(func1(data5)>256){const err31={instancePath:instancePath+"/targetScope",schemaPath:"#/properties/targetScope/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err31]}else{vErrors.push(err31)}errors++}if(func1(data5)<1){const err32={instancePath:instancePath+"/targetScope",schemaPath:"#/properties/targetScope/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err32]}else{vErrors.push(err32)}errors++}if(!pattern4.test(data5)){const err33={instancePath:instancePath+"/targetScope",schemaPath:"#/properties/targetScope/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err33]}else{vErrors.push(err33)}errors++}}else{const err34={instancePath:instancePath+"/targetScope",schemaPath:"#/properties/targetScope/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err34]}else{vErrors.push(err34)}errors++}}if(data.disposition!==void 0){let data6=data.disposition;if(typeof data6!=="string"){const err35={instancePath:instancePath+"/disposition",schemaPath:"#/properties/disposition/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err35]}else{vErrors.push(err35)}errors++}if(!(data6==="RECEIVED"||data6==="APPLIED"||data6==="REJECTED"||data6==="HOLD"||data6==="UNKNOWN")){const err36={instancePath:instancePath+"/disposition",schemaPath:"#/properties/disposition/enum",keyword:"enum",params:{allowedValues:schema45.properties.disposition.enum},message:"must be equal to one of the allowed values"};if(vErrors===null){vErrors=[err36]}else{vErrors.push(err36)}errors++}}if(data.recordedAt!==void 0){let data7=data.recordedAt;if(typeof data7==="string"){if(func1(data7)>64){const err37={instancePath:instancePath+"/recordedAt",schemaPath:"#/properties/recordedAt/maxLength",keyword:"maxLength",params:{limit:64},message:"must NOT have more than 64 characters"};if(vErrors===null){vErrors=[err37]}else{vErrors.push(err37)}errors++}if(!formats2.validate(data7)){const err38={instancePath:instancePath+"/recordedAt",schemaPath:"#/properties/recordedAt/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};if(vErrors===null){vErrors=[err38]}else{vErrors.push(err38)}errors++}}else{const err39={instancePath:instancePath+"/recordedAt",schemaPath:"#/properties/recordedAt/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err39]}else{vErrors.push(err39)}errors++}}if(data.revision!==void 0){let data8=data.revision;if(!(typeof data8=="number"&&!(data8%1)&&!isNaN(data8)&&isFinite(data8))){const err40={instancePath:instancePath+"/revision",schemaPath:"#/properties/revision/type",keyword:"type",params:{type:"integer"},message:"must be integer"};if(vErrors===null){vErrors=[err40]}else{vErrors.push(err40)}errors++}if(typeof data8=="number"&&isFinite(data8)){if(data8>9007199254740991||isNaN(data8)){const err41={instancePath:instancePath+"/revision",schemaPath:"#/properties/revision/maximum",keyword:"maximum",params:{comparison:"<=",limit:9007199254740991},message:"must be <= 9007199254740991"};if(vErrors===null){vErrors=[err41]}else{vErrors.push(err41)}errors++}if(data8<1||isNaN(data8)){const err42={instancePath:instancePath+"/revision",schemaPath:"#/properties/revision/minimum",keyword:"minimum",params:{comparison:">=",limit:1},message:"must be >= 1"};if(vErrors===null){vErrors=[err42]}else{vErrors.push(err42)}errors++}}}if(data.reasonCode!==void 0){let data9=data.reasonCode;if(typeof data9==="string"){if(func1(data9)>128){const err43={instancePath:instancePath+"/reasonCode",schemaPath:"#/properties/reasonCode/maxLength",keyword:"maxLength",params:{limit:128},message:"must NOT have more than 128 characters"};if(vErrors===null){vErrors=[err43]}else{vErrors.push(err43)}errors++}if(func1(data9)<1){const err44={instancePath:instancePath+"/reasonCode",schemaPath:"#/properties/reasonCode/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err44]}else{vErrors.push(err44)}errors++}if(!pattern98.test(data9)){const err45={instancePath:instancePath+"/reasonCode",schemaPath:"#/properties/reasonCode/pattern",keyword:"pattern",params:{pattern:"^[A-Z][A-Z0-9_]*$"},message:'must match pattern "^[A-Z][A-Z0-9_]*$"'};if(vErrors===null){vErrors=[err45]}else{vErrors.push(err45)}errors++}}else{const err46={instancePath:instancePath+"/reasonCode",schemaPath:"#/properties/reasonCode/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err46]}else{vErrors.push(err46)}errors++}}if(data.resultRef!==void 0){let data10=data.resultRef;if(data10&&typeof data10=="object"&&!Array.isArray(data10)){if(data10.sourceSystem===void 0){const err47={instancePath:instancePath+"/resultRef",schemaPath:"result-ref.schema.json/required",keyword:"required",params:{missingProperty:"sourceSystem"},message:"must have required property 'sourceSystem'"};if(vErrors===null){vErrors=[err47]}else{vErrors.push(err47)}errors++}if(data10.resourceType===void 0){const err48={instancePath:instancePath+"/resultRef",schemaPath:"result-ref.schema.json/required",keyword:"required",params:{missingProperty:"resourceType"},message:"must have required property 'resourceType'"};if(vErrors===null){vErrors=[err48]}else{vErrors.push(err48)}errors++}if(data10.resourceId===void 0){const err49={instancePath:instancePath+"/resultRef",schemaPath:"result-ref.schema.json/required",keyword:"required",params:{missingProperty:"resourceId"},message:"must have required property 'resourceId'"};if(vErrors===null){vErrors=[err49]}else{vErrors.push(err49)}errors++}if(data10.revision===void 0){const err50={instancePath:instancePath+"/resultRef",schemaPath:"result-ref.schema.json/required",keyword:"required",params:{missingProperty:"revision"},message:"must have required property 'revision'"};if(vErrors===null){vErrors=[err50]}else{vErrors.push(err50)}errors++}if(data10.digest===void 0){const err51={instancePath:instancePath+"/resultRef",schemaPath:"result-ref.schema.json/required",keyword:"required",params:{missingProperty:"digest"},message:"must have required property 'digest'"};if(vErrors===null){vErrors=[err51]}else{vErrors.push(err51)}errors++}for(const key1 in data10){if(!(key1==="sourceSystem"||key1==="resourceType"||key1==="resourceId"||key1==="revision"||key1==="digest"||key1==="evidenceRef")){const err52={instancePath:instancePath+"/resultRef",schemaPath:"result-ref.schema.json/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key1},message:"must NOT have additional properties"};if(vErrors===null){vErrors=[err52]}else{vErrors.push(err52)}errors++}}if(data10.sourceSystem!==void 0){let data11=data10.sourceSystem;if(typeof data11==="string"){if(func1(data11)>256){const err53={instancePath:instancePath+"/resultRef/sourceSystem",schemaPath:"result-ref.schema.json/properties/sourceSystem/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err53]}else{vErrors.push(err53)}errors++}if(func1(data11)<1){const err54={instancePath:instancePath+"/resultRef/sourceSystem",schemaPath:"result-ref.schema.json/properties/sourceSystem/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err54]}else{vErrors.push(err54)}errors++}if(!pattern4.test(data11)){const err55={instancePath:instancePath+"/resultRef/sourceSystem",schemaPath:"result-ref.schema.json/properties/sourceSystem/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err55]}else{vErrors.push(err55)}errors++}}else{const err56={instancePath:instancePath+"/resultRef/sourceSystem",schemaPath:"result-ref.schema.json/properties/sourceSystem/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err56]}else{vErrors.push(err56)}errors++}}if(data10.resourceType!==void 0){let data12=data10.resourceType;if(typeof data12==="string"){if(func1(data12)>256){const err57={instancePath:instancePath+"/resultRef/resourceType",schemaPath:"result-ref.schema.json/properties/resourceType/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err57]}else{vErrors.push(err57)}errors++}if(func1(data12)<1){const err58={instancePath:instancePath+"/resultRef/resourceType",schemaPath:"result-ref.schema.json/properties/resourceType/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err58]}else{vErrors.push(err58)}errors++}if(!pattern4.test(data12)){const err59={instancePath:instancePath+"/resultRef/resourceType",schemaPath:"result-ref.schema.json/properties/resourceType/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err59]}else{vErrors.push(err59)}errors++}}else{const err60={instancePath:instancePath+"/resultRef/resourceType",schemaPath:"result-ref.schema.json/properties/resourceType/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err60]}else{vErrors.push(err60)}errors++}}if(data10.resourceId!==void 0){let data13=data10.resourceId;if(typeof data13==="string"){if(func1(data13)>256){const err61={instancePath:instancePath+"/resultRef/resourceId",schemaPath:"result-ref.schema.json/properties/resourceId/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err61]}else{vErrors.push(err61)}errors++}if(func1(data13)<1){const err62={instancePath:instancePath+"/resultRef/resourceId",schemaPath:"result-ref.schema.json/properties/resourceId/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err62]}else{vErrors.push(err62)}errors++}if(!pattern4.test(data13)){const err63={instancePath:instancePath+"/resultRef/resourceId",schemaPath:"result-ref.schema.json/properties/resourceId/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err63]}else{vErrors.push(err63)}errors++}}else{const err64={instancePath:instancePath+"/resultRef/resourceId",schemaPath:"result-ref.schema.json/properties/resourceId/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err64]}else{vErrors.push(err64)}errors++}}if(data10.revision!==void 0){let data14=data10.revision;if(typeof data14==="string"){if(func1(data14)>256){const err65={instancePath:instancePath+"/resultRef/revision",schemaPath:"result-ref.schema.json/properties/revision/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err65]}else{vErrors.push(err65)}errors++}if(func1(data14)<1){const err66={instancePath:instancePath+"/resultRef/revision",schemaPath:"result-ref.schema.json/properties/revision/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err66]}else{vErrors.push(err66)}errors++}if(!pattern4.test(data14)){const err67={instancePath:instancePath+"/resultRef/revision",schemaPath:"result-ref.schema.json/properties/revision/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err67]}else{vErrors.push(err67)}errors++}}else{const err68={instancePath:instancePath+"/resultRef/revision",schemaPath:"result-ref.schema.json/properties/revision/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err68]}else{vErrors.push(err68)}errors++}}if(data10.digest!==void 0){let data15=data10.digest;if(typeof data15==="string"){if(!pattern8.test(data15)){const err69={instancePath:instancePath+"/resultRef/digest",schemaPath:"result-ref.schema.json/properties/digest/pattern",keyword:"pattern",params:{pattern:"^sha256:[a-f0-9]{64}$"},message:'must match pattern "^sha256:[a-f0-9]{64}$"'};if(vErrors===null){vErrors=[err69]}else{vErrors.push(err69)}errors++}}else{const err70={instancePath:instancePath+"/resultRef/digest",schemaPath:"result-ref.schema.json/properties/digest/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err70]}else{vErrors.push(err70)}errors++}}if(data10.evidenceRef!==void 0){let data16=data10.evidenceRef;if(typeof data16==="string"){if(func1(data16)>256){const err71={instancePath:instancePath+"/resultRef/evidenceRef",schemaPath:"result-ref.schema.json/properties/evidenceRef/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err71]}else{vErrors.push(err71)}errors++}if(func1(data16)<1){const err72={instancePath:instancePath+"/resultRef/evidenceRef",schemaPath:"result-ref.schema.json/properties/evidenceRef/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err72]}else{vErrors.push(err72)}errors++}if(!pattern4.test(data16)){const err73={instancePath:instancePath+"/resultRef/evidenceRef",schemaPath:"result-ref.schema.json/properties/evidenceRef/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err73]}else{vErrors.push(err73)}errors++}}else{const err74={instancePath:instancePath+"/resultRef/evidenceRef",schemaPath:"result-ref.schema.json/properties/evidenceRef/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err74]}else{vErrors.push(err74)}errors++}}}else{const err75={instancePath:instancePath+"/resultRef",schemaPath:"result-ref.schema.json/type",keyword:"type",params:{type:"object"},message:"must be object"};if(vErrors===null){vErrors=[err75]}else{vErrors.push(err75)}errors++}}}else{const err76={instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};if(vErrors===null){vErrors=[err76]}else{vErrors.push(err76)}errors++}validate36.errors=vErrors;return errors===0}validate36.evaluated={props:true,dynamicProps:false,dynamicItems:false};var tenantContext=validate37;function validate37(data,{instancePath="",parentData,parentDataProperty,rootData=data,dynamicAnchors={}}={}){let vErrors=null;let errors=0;const evaluated0=validate37.evaluated;if(evaluated0.dynamicProps){evaluated0.props=void 0}if(evaluated0.dynamicItems){evaluated0.items=void 0}if(data&&typeof data=="object"&&!Array.isArray(data)){if(data.serviceRef===void 0){const err0={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"serviceRef"},message:"must have required property 'serviceRef'"};if(vErrors===null){vErrors=[err0]}else{vErrors.push(err0)}errors++}if(data.tenantRef===void 0){const err1={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"tenantRef"},message:"must have required property 'tenantRef'"};if(vErrors===null){vErrors=[err1]}else{vErrors.push(err1)}errors++}for(const key0 in data){if(!(key0==="serviceRef"||key0==="tenantRef")){const err2={instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key0},message:"must NOT have additional properties"};if(vErrors===null){vErrors=[err2]}else{vErrors.push(err2)}errors++}}if(data.serviceRef!==void 0){let data0=data.serviceRef;if(typeof data0==="string"){if(func1(data0)>256){const err3={instancePath:instancePath+"/serviceRef",schemaPath:"#/properties/serviceRef/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err3]}else{vErrors.push(err3)}errors++}if(func1(data0)<1){const err4={instancePath:instancePath+"/serviceRef",schemaPath:"#/properties/serviceRef/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err4]}else{vErrors.push(err4)}errors++}if(!pattern4.test(data0)){const err5={instancePath:instancePath+"/serviceRef",schemaPath:"#/properties/serviceRef/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err5]}else{vErrors.push(err5)}errors++}}else{const err6={instancePath:instancePath+"/serviceRef",schemaPath:"#/properties/serviceRef/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err6]}else{vErrors.push(err6)}errors++}}if(data.tenantRef!==void 0){let data1=data.tenantRef;if(typeof data1==="string"){if(func1(data1)>256){const err7={instancePath:instancePath+"/tenantRef",schemaPath:"#/properties/tenantRef/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err7]}else{vErrors.push(err7)}errors++}if(func1(data1)<1){const err8={instancePath:instancePath+"/tenantRef",schemaPath:"#/properties/tenantRef/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err8]}else{vErrors.push(err8)}errors++}if(!pattern4.test(data1)){const err9={instancePath:instancePath+"/tenantRef",schemaPath:"#/properties/tenantRef/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err9]}else{vErrors.push(err9)}errors++}}else{const err10={instancePath:instancePath+"/tenantRef",schemaPath:"#/properties/tenantRef/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err10]}else{vErrors.push(err10)}errors++}}}else{const err11={instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};if(vErrors===null){vErrors=[err11]}else{vErrors.push(err11)}errors++}validate37.errors=vErrors;return errors===0}validate37.evaluated={props:true,dynamicProps:false,dynamicItems:false};var tenantConnection=validate38;var schema48={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://eventsdk.dev/schemas/v1/tenant-connection.schema.json",title:"TenantConnection",type:"object",additionalProperties:false,properties:{connectionRef:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u001f\\u007f]+$"},version:{type:"integer",minimum:1,maximum:9007199254740991},local:{$ref:"tenant-context.schema.json"},remote:{$ref:"tenant-context.schema.json"},status:{type:"string",enum:["ACTIVE","SUSPENDED","REVOKED"]},updatedAt:{type:"string",format:"date-time",maxLength:64},organizationRef:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u001f\\u007f]+$"}},required:["connectionRef","version","local","remote","status","updatedAt"]};function validate38(data,{instancePath="",parentData,parentDataProperty,rootData=data,dynamicAnchors={}}={}){let vErrors=null;let errors=0;const evaluated0=validate38.evaluated;if(evaluated0.dynamicProps){evaluated0.props=void 0}if(evaluated0.dynamicItems){evaluated0.items=void 0}if(data&&typeof data=="object"&&!Array.isArray(data)){if(data.connectionRef===void 0){const err0={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"connectionRef"},message:"must have required property 'connectionRef'"};if(vErrors===null){vErrors=[err0]}else{vErrors.push(err0)}errors++}if(data.version===void 0){const err1={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"version"},message:"must have required property 'version'"};if(vErrors===null){vErrors=[err1]}else{vErrors.push(err1)}errors++}if(data.local===void 0){const err2={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"local"},message:"must have required property 'local'"};if(vErrors===null){vErrors=[err2]}else{vErrors.push(err2)}errors++}if(data.remote===void 0){const err3={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"remote"},message:"must have required property 'remote'"};if(vErrors===null){vErrors=[err3]}else{vErrors.push(err3)}errors++}if(data.status===void 0){const err4={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"status"},message:"must have required property 'status'"};if(vErrors===null){vErrors=[err4]}else{vErrors.push(err4)}errors++}if(data.updatedAt===void 0){const err5={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"updatedAt"},message:"must have required property 'updatedAt'"};if(vErrors===null){vErrors=[err5]}else{vErrors.push(err5)}errors++}for(const key0 in data){if(!(key0==="connectionRef"||key0==="version"||key0==="local"||key0==="remote"||key0==="status"||key0==="updatedAt"||key0==="organizationRef")){const err6={instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key0},message:"must NOT have additional properties"};if(vErrors===null){vErrors=[err6]}else{vErrors.push(err6)}errors++}}if(data.connectionRef!==void 0){let data0=data.connectionRef;if(typeof data0==="string"){if(func1(data0)>256){const err7={instancePath:instancePath+"/connectionRef",schemaPath:"#/properties/connectionRef/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err7]}else{vErrors.push(err7)}errors++}if(func1(data0)<1){const err8={instancePath:instancePath+"/connectionRef",schemaPath:"#/properties/connectionRef/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err8]}else{vErrors.push(err8)}errors++}if(!pattern4.test(data0)){const err9={instancePath:instancePath+"/connectionRef",schemaPath:"#/properties/connectionRef/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err9]}else{vErrors.push(err9)}errors++}}else{const err10={instancePath:instancePath+"/connectionRef",schemaPath:"#/properties/connectionRef/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err10]}else{vErrors.push(err10)}errors++}}if(data.version!==void 0){let data1=data.version;if(!(typeof data1=="number"&&!(data1%1)&&!isNaN(data1)&&isFinite(data1))){const err11={instancePath:instancePath+"/version",schemaPath:"#/properties/version/type",keyword:"type",params:{type:"integer"},message:"must be integer"};if(vErrors===null){vErrors=[err11]}else{vErrors.push(err11)}errors++}if(typeof data1=="number"&&isFinite(data1)){if(data1>9007199254740991||isNaN(data1)){const err12={instancePath:instancePath+"/version",schemaPath:"#/properties/version/maximum",keyword:"maximum",params:{comparison:"<=",limit:9007199254740991},message:"must be <= 9007199254740991"};if(vErrors===null){vErrors=[err12]}else{vErrors.push(err12)}errors++}if(data1<1||isNaN(data1)){const err13={instancePath:instancePath+"/version",schemaPath:"#/properties/version/minimum",keyword:"minimum",params:{comparison:">=",limit:1},message:"must be >= 1"};if(vErrors===null){vErrors=[err13]}else{vErrors.push(err13)}errors++}}}if(data.local!==void 0){let data2=data.local;if(data2&&typeof data2=="object"&&!Array.isArray(data2)){if(data2.serviceRef===void 0){const err14={instancePath:instancePath+"/local",schemaPath:"tenant-context.schema.json/required",keyword:"required",params:{missingProperty:"serviceRef"},message:"must have required property 'serviceRef'"};if(vErrors===null){vErrors=[err14]}else{vErrors.push(err14)}errors++}if(data2.tenantRef===void 0){const err15={instancePath:instancePath+"/local",schemaPath:"tenant-context.schema.json/required",keyword:"required",params:{missingProperty:"tenantRef"},message:"must have required property 'tenantRef'"};if(vErrors===null){vErrors=[err15]}else{vErrors.push(err15)}errors++}for(const key1 in data2){if(!(key1==="serviceRef"||key1==="tenantRef")){const err16={instancePath:instancePath+"/local",schemaPath:"tenant-context.schema.json/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key1},message:"must NOT have additional properties"};if(vErrors===null){vErrors=[err16]}else{vErrors.push(err16)}errors++}}if(data2.serviceRef!==void 0){let data3=data2.serviceRef;if(typeof data3==="string"){if(func1(data3)>256){const err17={instancePath:instancePath+"/local/serviceRef",schemaPath:"tenant-context.schema.json/properties/serviceRef/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err17]}else{vErrors.push(err17)}errors++}if(func1(data3)<1){const err18={instancePath:instancePath+"/local/serviceRef",schemaPath:"tenant-context.schema.json/properties/serviceRef/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err18]}else{vErrors.push(err18)}errors++}if(!pattern4.test(data3)){const err19={instancePath:instancePath+"/local/serviceRef",schemaPath:"tenant-context.schema.json/properties/serviceRef/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err19]}else{vErrors.push(err19)}errors++}}else{const err20={instancePath:instancePath+"/local/serviceRef",schemaPath:"tenant-context.schema.json/properties/serviceRef/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err20]}else{vErrors.push(err20)}errors++}}if(data2.tenantRef!==void 0){let data4=data2.tenantRef;if(typeof data4==="string"){if(func1(data4)>256){const err21={instancePath:instancePath+"/local/tenantRef",schemaPath:"tenant-context.schema.json/properties/tenantRef/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err21]}else{vErrors.push(err21)}errors++}if(func1(data4)<1){const err22={instancePath:instancePath+"/local/tenantRef",schemaPath:"tenant-context.schema.json/properties/tenantRef/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err22]}else{vErrors.push(err22)}errors++}if(!pattern4.test(data4)){const err23={instancePath:instancePath+"/local/tenantRef",schemaPath:"tenant-context.schema.json/properties/tenantRef/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err23]}else{vErrors.push(err23)}errors++}}else{const err24={instancePath:instancePath+"/local/tenantRef",schemaPath:"tenant-context.schema.json/properties/tenantRef/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err24]}else{vErrors.push(err24)}errors++}}}else{const err25={instancePath:instancePath+"/local",schemaPath:"tenant-context.schema.json/type",keyword:"type",params:{type:"object"},message:"must be object"};if(vErrors===null){vErrors=[err25]}else{vErrors.push(err25)}errors++}}if(data.remote!==void 0){let data5=data.remote;if(data5&&typeof data5=="object"&&!Array.isArray(data5)){if(data5.serviceRef===void 0){const err26={instancePath:instancePath+"/remote",schemaPath:"tenant-context.schema.json/required",keyword:"required",params:{missingProperty:"serviceRef"},message:"must have required property 'serviceRef'"};if(vErrors===null){vErrors=[err26]}else{vErrors.push(err26)}errors++}if(data5.tenantRef===void 0){const err27={instancePath:instancePath+"/remote",schemaPath:"tenant-context.schema.json/required",keyword:"required",params:{missingProperty:"tenantRef"},message:"must have required property 'tenantRef'"};if(vErrors===null){vErrors=[err27]}else{vErrors.push(err27)}errors++}for(const key2 in data5){if(!(key2==="serviceRef"||key2==="tenantRef")){const err28={instancePath:instancePath+"/remote",schemaPath:"tenant-context.schema.json/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key2},message:"must NOT have additional properties"};if(vErrors===null){vErrors=[err28]}else{vErrors.push(err28)}errors++}}if(data5.serviceRef!==void 0){let data6=data5.serviceRef;if(typeof data6==="string"){if(func1(data6)>256){const err29={instancePath:instancePath+"/remote/serviceRef",schemaPath:"tenant-context.schema.json/properties/serviceRef/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err29]}else{vErrors.push(err29)}errors++}if(func1(data6)<1){const err30={instancePath:instancePath+"/remote/serviceRef",schemaPath:"tenant-context.schema.json/properties/serviceRef/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err30]}else{vErrors.push(err30)}errors++}if(!pattern4.test(data6)){const err31={instancePath:instancePath+"/remote/serviceRef",schemaPath:"tenant-context.schema.json/properties/serviceRef/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err31]}else{vErrors.push(err31)}errors++}}else{const err32={instancePath:instancePath+"/remote/serviceRef",schemaPath:"tenant-context.schema.json/properties/serviceRef/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err32]}else{vErrors.push(err32)}errors++}}if(data5.tenantRef!==void 0){let data7=data5.tenantRef;if(typeof data7==="string"){if(func1(data7)>256){const err33={instancePath:instancePath+"/remote/tenantRef",schemaPath:"tenant-context.schema.json/properties/tenantRef/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err33]}else{vErrors.push(err33)}errors++}if(func1(data7)<1){const err34={instancePath:instancePath+"/remote/tenantRef",schemaPath:"tenant-context.schema.json/properties/tenantRef/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err34]}else{vErrors.push(err34)}errors++}if(!pattern4.test(data7)){const err35={instancePath:instancePath+"/remote/tenantRef",schemaPath:"tenant-context.schema.json/properties/tenantRef/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err35]}else{vErrors.push(err35)}errors++}}else{const err36={instancePath:instancePath+"/remote/tenantRef",schemaPath:"tenant-context.schema.json/properties/tenantRef/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err36]}else{vErrors.push(err36)}errors++}}}else{const err37={instancePath:instancePath+"/remote",schemaPath:"tenant-context.schema.json/type",keyword:"type",params:{type:"object"},message:"must be object"};if(vErrors===null){vErrors=[err37]}else{vErrors.push(err37)}errors++}}if(data.status!==void 0){let data8=data.status;if(typeof data8!=="string"){const err38={instancePath:instancePath+"/status",schemaPath:"#/properties/status/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err38]}else{vErrors.push(err38)}errors++}if(!(data8==="ACTIVE"||data8==="SUSPENDED"||data8==="REVOKED")){const err39={instancePath:instancePath+"/status",schemaPath:"#/properties/status/enum",keyword:"enum",params:{allowedValues:schema48.properties.status.enum},message:"must be equal to one of the allowed values"};if(vErrors===null){vErrors=[err39]}else{vErrors.push(err39)}errors++}}if(data.updatedAt!==void 0){let data9=data.updatedAt;if(typeof data9==="string"){if(func1(data9)>64){const err40={instancePath:instancePath+"/updatedAt",schemaPath:"#/properties/updatedAt/maxLength",keyword:"maxLength",params:{limit:64},message:"must NOT have more than 64 characters"};if(vErrors===null){vErrors=[err40]}else{vErrors.push(err40)}errors++}if(!formats2.validate(data9)){const err41={instancePath:instancePath+"/updatedAt",schemaPath:"#/properties/updatedAt/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};if(vErrors===null){vErrors=[err41]}else{vErrors.push(err41)}errors++}}else{const err42={instancePath:instancePath+"/updatedAt",schemaPath:"#/properties/updatedAt/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err42]}else{vErrors.push(err42)}errors++}}if(data.organizationRef!==void 0){let data10=data.organizationRef;if(typeof data10==="string"){if(func1(data10)>256){const err43={instancePath:instancePath+"/organizationRef",schemaPath:"#/properties/organizationRef/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err43]}else{vErrors.push(err43)}errors++}if(func1(data10)<1){const err44={instancePath:instancePath+"/organizationRef",schemaPath:"#/properties/organizationRef/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err44]}else{vErrors.push(err44)}errors++}if(!pattern4.test(data10)){const err45={instancePath:instancePath+"/organizationRef",schemaPath:"#/properties/organizationRef/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err45]}else{vErrors.push(err45)}errors++}}else{const err46={instancePath:instancePath+"/organizationRef",schemaPath:"#/properties/organizationRef/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err46]}else{vErrors.push(err46)}errors++}}}else{const err47={instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};if(vErrors===null){vErrors=[err47]}else{vErrors.push(err47)}errors++}validate38.errors=vErrors;return errors===0}validate38.evaluated={props:true,dynamicProps:false,dynamicItems:false};var exchangeGrant=validate39;var schema51={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://eventsdk.dev/schemas/v1/exchange-grant.schema.json",title:"ExchangeGrant",type:"object",additionalProperties:false,properties:{grantRef:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u001f\\u007f]+$"},version:{type:"integer",minimum:1,maximum:9007199254740991},connectionRef:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u001f\\u007f]+$"},direction:{type:"string",enum:["OUTBOUND","INBOUND"]},status:{type:"string",enum:["ACTIVE","SUSPENDED","REVOKED"]},eventTypes:{type:"array",items:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u001f\\u007f]+$"},minItems:1,maxItems:256,uniqueItems:true},audience:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u001f\\u007f]+$"},notBefore:{type:"string",format:"date-time",maxLength:64},expiresAt:{type:"string",format:"date-time",maxLength:64}},required:["grantRef","version","connectionRef","direction","status","eventTypes","audience","notBefore","expiresAt"]};function validate39(data,{instancePath="",parentData,parentDataProperty,rootData=data,dynamicAnchors={}}={}){let vErrors=null;let errors=0;const evaluated0=validate39.evaluated;if(evaluated0.dynamicProps){evaluated0.props=void 0}if(evaluated0.dynamicItems){evaluated0.items=void 0}if(data&&typeof data=="object"&&!Array.isArray(data)){if(data.grantRef===void 0){const err0={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"grantRef"},message:"must have required property 'grantRef'"};if(vErrors===null){vErrors=[err0]}else{vErrors.push(err0)}errors++}if(data.version===void 0){const err1={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"version"},message:"must have required property 'version'"};if(vErrors===null){vErrors=[err1]}else{vErrors.push(err1)}errors++}if(data.connectionRef===void 0){const err2={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"connectionRef"},message:"must have required property 'connectionRef'"};if(vErrors===null){vErrors=[err2]}else{vErrors.push(err2)}errors++}if(data.direction===void 0){const err3={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"direction"},message:"must have required property 'direction'"};if(vErrors===null){vErrors=[err3]}else{vErrors.push(err3)}errors++}if(data.status===void 0){const err4={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"status"},message:"must have required property 'status'"};if(vErrors===null){vErrors=[err4]}else{vErrors.push(err4)}errors++}if(data.eventTypes===void 0){const err5={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"eventTypes"},message:"must have required property 'eventTypes'"};if(vErrors===null){vErrors=[err5]}else{vErrors.push(err5)}errors++}if(data.audience===void 0){const err6={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"audience"},message:"must have required property 'audience'"};if(vErrors===null){vErrors=[err6]}else{vErrors.push(err6)}errors++}if(data.notBefore===void 0){const err7={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"notBefore"},message:"must have required property 'notBefore'"};if(vErrors===null){vErrors=[err7]}else{vErrors.push(err7)}errors++}if(data.expiresAt===void 0){const err8={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"expiresAt"},message:"must have required property 'expiresAt'"};if(vErrors===null){vErrors=[err8]}else{vErrors.push(err8)}errors++}for(const key0 in data){if(!func11.call(schema51.properties,key0)){const err9={instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key0},message:"must NOT have additional properties"};if(vErrors===null){vErrors=[err9]}else{vErrors.push(err9)}errors++}}if(data.grantRef!==void 0){let data0=data.grantRef;if(typeof data0==="string"){if(func1(data0)>256){const err10={instancePath:instancePath+"/grantRef",schemaPath:"#/properties/grantRef/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err10]}else{vErrors.push(err10)}errors++}if(func1(data0)<1){const err11={instancePath:instancePath+"/grantRef",schemaPath:"#/properties/grantRef/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err11]}else{vErrors.push(err11)}errors++}if(!pattern4.test(data0)){const err12={instancePath:instancePath+"/grantRef",schemaPath:"#/properties/grantRef/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err12]}else{vErrors.push(err12)}errors++}}else{const err13={instancePath:instancePath+"/grantRef",schemaPath:"#/properties/grantRef/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err13]}else{vErrors.push(err13)}errors++}}if(data.version!==void 0){let data1=data.version;if(!(typeof data1=="number"&&!(data1%1)&&!isNaN(data1)&&isFinite(data1))){const err14={instancePath:instancePath+"/version",schemaPath:"#/properties/version/type",keyword:"type",params:{type:"integer"},message:"must be integer"};if(vErrors===null){vErrors=[err14]}else{vErrors.push(err14)}errors++}if(typeof data1=="number"&&isFinite(data1)){if(data1>9007199254740991||isNaN(data1)){const err15={instancePath:instancePath+"/version",schemaPath:"#/properties/version/maximum",keyword:"maximum",params:{comparison:"<=",limit:9007199254740991},message:"must be <= 9007199254740991"};if(vErrors===null){vErrors=[err15]}else{vErrors.push(err15)}errors++}if(data1<1||isNaN(data1)){const err16={instancePath:instancePath+"/version",schemaPath:"#/properties/version/minimum",keyword:"minimum",params:{comparison:">=",limit:1},message:"must be >= 1"};if(vErrors===null){vErrors=[err16]}else{vErrors.push(err16)}errors++}}}if(data.connectionRef!==void 0){let data2=data.connectionRef;if(typeof data2==="string"){if(func1(data2)>256){const err17={instancePath:instancePath+"/connectionRef",schemaPath:"#/properties/connectionRef/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err17]}else{vErrors.push(err17)}errors++}if(func1(data2)<1){const err18={instancePath:instancePath+"/connectionRef",schemaPath:"#/properties/connectionRef/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err18]}else{vErrors.push(err18)}errors++}if(!pattern4.test(data2)){const err19={instancePath:instancePath+"/connectionRef",schemaPath:"#/properties/connectionRef/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err19]}else{vErrors.push(err19)}errors++}}else{const err20={instancePath:instancePath+"/connectionRef",schemaPath:"#/properties/connectionRef/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err20]}else{vErrors.push(err20)}errors++}}if(data.direction!==void 0){let data3=data.direction;if(typeof data3!=="string"){const err21={instancePath:instancePath+"/direction",schemaPath:"#/properties/direction/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err21]}else{vErrors.push(err21)}errors++}if(!(data3==="OUTBOUND"||data3==="INBOUND")){const err22={instancePath:instancePath+"/direction",schemaPath:"#/properties/direction/enum",keyword:"enum",params:{allowedValues:schema51.properties.direction.enum},message:"must be equal to one of the allowed values"};if(vErrors===null){vErrors=[err22]}else{vErrors.push(err22)}errors++}}if(data.status!==void 0){let data4=data.status;if(typeof data4!=="string"){const err23={instancePath:instancePath+"/status",schemaPath:"#/properties/status/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err23]}else{vErrors.push(err23)}errors++}if(!(data4==="ACTIVE"||data4==="SUSPENDED"||data4==="REVOKED")){const err24={instancePath:instancePath+"/status",schemaPath:"#/properties/status/enum",keyword:"enum",params:{allowedValues:schema51.properties.status.enum},message:"must be equal to one of the allowed values"};if(vErrors===null){vErrors=[err24]}else{vErrors.push(err24)}errors++}}if(data.eventTypes!==void 0){let data5=data.eventTypes;if(Array.isArray(data5)){if(data5.length>256){const err25={instancePath:instancePath+"/eventTypes",schemaPath:"#/properties/eventTypes/maxItems",keyword:"maxItems",params:{limit:256},message:"must NOT have more than 256 items"};if(vErrors===null){vErrors=[err25]}else{vErrors.push(err25)}errors++}if(data5.length<1){const err26={instancePath:instancePath+"/eventTypes",schemaPath:"#/properties/eventTypes/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};if(vErrors===null){vErrors=[err26]}else{vErrors.push(err26)}errors++}const len0=data5.length;for(let i0=0;i0<len0;i0++){let data6=data5[i0];if(typeof data6==="string"){if(func1(data6)>256){const err27={instancePath:instancePath+"/eventTypes/"+i0,schemaPath:"#/properties/eventTypes/items/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err27]}else{vErrors.push(err27)}errors++}if(func1(data6)<1){const err28={instancePath:instancePath+"/eventTypes/"+i0,schemaPath:"#/properties/eventTypes/items/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err28]}else{vErrors.push(err28)}errors++}if(!pattern4.test(data6)){const err29={instancePath:instancePath+"/eventTypes/"+i0,schemaPath:"#/properties/eventTypes/items/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err29]}else{vErrors.push(err29)}errors++}}else{const err30={instancePath:instancePath+"/eventTypes/"+i0,schemaPath:"#/properties/eventTypes/items/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err30]}else{vErrors.push(err30)}errors++}}let i1=data5.length;let j0;if(i1>1){const indices0={};for(;i1--;){let item0=data5[i1];if(typeof item0!=="string"){continue}if(typeof indices0[item0]=="number"){j0=indices0[item0];const err31={instancePath:instancePath+"/eventTypes",schemaPath:"#/properties/eventTypes/uniqueItems",keyword:"uniqueItems",params:{i:i1,j:j0},message:"must NOT have duplicate items (items ## "+j0+" and "+i1+" are identical)"};if(vErrors===null){vErrors=[err31]}else{vErrors.push(err31)}errors++;break}indices0[item0]=i1}}}else{const err32={instancePath:instancePath+"/eventTypes",schemaPath:"#/properties/eventTypes/type",keyword:"type",params:{type:"array"},message:"must be array"};if(vErrors===null){vErrors=[err32]}else{vErrors.push(err32)}errors++}}if(data.audience!==void 0){let data7=data.audience;if(typeof data7==="string"){if(func1(data7)>256){const err33={instancePath:instancePath+"/audience",schemaPath:"#/properties/audience/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err33]}else{vErrors.push(err33)}errors++}if(func1(data7)<1){const err34={instancePath:instancePath+"/audience",schemaPath:"#/properties/audience/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err34]}else{vErrors.push(err34)}errors++}if(!pattern4.test(data7)){const err35={instancePath:instancePath+"/audience",schemaPath:"#/properties/audience/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err35]}else{vErrors.push(err35)}errors++}}else{const err36={instancePath:instancePath+"/audience",schemaPath:"#/properties/audience/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err36]}else{vErrors.push(err36)}errors++}}if(data.notBefore!==void 0){let data8=data.notBefore;if(typeof data8==="string"){if(func1(data8)>64){const err37={instancePath:instancePath+"/notBefore",schemaPath:"#/properties/notBefore/maxLength",keyword:"maxLength",params:{limit:64},message:"must NOT have more than 64 characters"};if(vErrors===null){vErrors=[err37]}else{vErrors.push(err37)}errors++}if(!formats2.validate(data8)){const err38={instancePath:instancePath+"/notBefore",schemaPath:"#/properties/notBefore/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};if(vErrors===null){vErrors=[err38]}else{vErrors.push(err38)}errors++}}else{const err39={instancePath:instancePath+"/notBefore",schemaPath:"#/properties/notBefore/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err39]}else{vErrors.push(err39)}errors++}}if(data.expiresAt!==void 0){let data9=data.expiresAt;if(typeof data9==="string"){if(func1(data9)>64){const err40={instancePath:instancePath+"/expiresAt",schemaPath:"#/properties/expiresAt/maxLength",keyword:"maxLength",params:{limit:64},message:"must NOT have more than 64 characters"};if(vErrors===null){vErrors=[err40]}else{vErrors.push(err40)}errors++}if(!formats2.validate(data9)){const err41={instancePath:instancePath+"/expiresAt",schemaPath:"#/properties/expiresAt/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};if(vErrors===null){vErrors=[err41]}else{vErrors.push(err41)}errors++}}else{const err42={instancePath:instancePath+"/expiresAt",schemaPath:"#/properties/expiresAt/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err42]}else{vErrors.push(err42)}errors++}}}else{const err43={instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};if(vErrors===null){vErrors=[err43]}else{vErrors.push(err43)}errors++}validate39.errors=vErrors;return errors===0}validate39.evaluated={props:true,dynamicProps:false,dynamicItems:false};var eventOriginClaims=validate40;var schema52={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://eventsdk.dev/schemas/v1/event-origin-claims.schema.json",title:"EventOriginClaims",type:"object",additionalProperties:false,required:["schemaVersion","purpose","issuer","subject","serviceRef","audience","source","eventId","eventDigest","signedAt"],properties:{schemaVersion:{const:1},purpose:{const:"eventsdk-origin/1"},issuer:{type:"string",format:"uri",minLength:1,maxLength:2048},subject:{type:"string",minLength:1,maxLength:256},serviceRef:{type:"string",minLength:1,maxLength:256},audience:{type:"string",minLength:1,maxLength:256},source:{type:"string",format:"uri",minLength:1,maxLength:2048},eventId:{type:"string",minLength:1,maxLength:256},deliveryId:{type:"string",pattern:"^[a-f0-9]{64}$"},eventDigest:{type:"string",pattern:"^sha256:[a-f0-9]{64}$"},signedAt:{type:"string",format:"date-time",maxLength:64}}};var pattern117=new RegExp("^[a-f0-9]{64}$","u");function validate40(data,{instancePath="",parentData,parentDataProperty,rootData=data,dynamicAnchors={}}={}){let vErrors=null;let errors=0;const evaluated0=validate40.evaluated;if(evaluated0.dynamicProps){evaluated0.props=void 0}if(evaluated0.dynamicItems){evaluated0.items=void 0}if(data&&typeof data=="object"&&!Array.isArray(data)){if(data.schemaVersion===void 0){const err0={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"schemaVersion"},message:"must have required property 'schemaVersion'"};if(vErrors===null){vErrors=[err0]}else{vErrors.push(err0)}errors++}if(data.purpose===void 0){const err1={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"purpose"},message:"must have required property 'purpose'"};if(vErrors===null){vErrors=[err1]}else{vErrors.push(err1)}errors++}if(data.issuer===void 0){const err2={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"issuer"},message:"must have required property 'issuer'"};if(vErrors===null){vErrors=[err2]}else{vErrors.push(err2)}errors++}if(data.subject===void 0){const err3={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"subject"},message:"must have required property 'subject'"};if(vErrors===null){vErrors=[err3]}else{vErrors.push(err3)}errors++}if(data.serviceRef===void 0){const err4={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"serviceRef"},message:"must have required property 'serviceRef'"};if(vErrors===null){vErrors=[err4]}else{vErrors.push(err4)}errors++}if(data.audience===void 0){const err5={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"audience"},message:"must have required property 'audience'"};if(vErrors===null){vErrors=[err5]}else{vErrors.push(err5)}errors++}if(data.source===void 0){const err6={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"source"},message:"must have required property 'source'"};if(vErrors===null){vErrors=[err6]}else{vErrors.push(err6)}errors++}if(data.eventId===void 0){const err7={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"eventId"},message:"must have required property 'eventId'"};if(vErrors===null){vErrors=[err7]}else{vErrors.push(err7)}errors++}if(data.eventDigest===void 0){const err8={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"eventDigest"},message:"must have required property 'eventDigest'"};if(vErrors===null){vErrors=[err8]}else{vErrors.push(err8)}errors++}if(data.signedAt===void 0){const err9={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"signedAt"},message:"must have required property 'signedAt'"};if(vErrors===null){vErrors=[err9]}else{vErrors.push(err9)}errors++}for(const key0 in data){if(!func11.call(schema52.properties,key0)){const err10={instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key0},message:"must NOT have additional properties"};if(vErrors===null){vErrors=[err10]}else{vErrors.push(err10)}errors++}}if(data.schemaVersion!==void 0){if(1!==data.schemaVersion){const err11={instancePath:instancePath+"/schemaVersion",schemaPath:"#/properties/schemaVersion/const",keyword:"const",params:{allowedValue:1},message:"must be equal to constant"};if(vErrors===null){vErrors=[err11]}else{vErrors.push(err11)}errors++}}if(data.purpose!==void 0){if("eventsdk-origin/1"!==data.purpose){const err12={instancePath:instancePath+"/purpose",schemaPath:"#/properties/purpose/const",keyword:"const",params:{allowedValue:"eventsdk-origin/1"},message:"must be equal to constant"};if(vErrors===null){vErrors=[err12]}else{vErrors.push(err12)}errors++}}if(data.issuer!==void 0){let data2=data.issuer;if(typeof data2==="string"){if(func1(data2)>2048){const err13={instancePath:instancePath+"/issuer",schemaPath:"#/properties/issuer/maxLength",keyword:"maxLength",params:{limit:2048},message:"must NOT have more than 2048 characters"};if(vErrors===null){vErrors=[err13]}else{vErrors.push(err13)}errors++}if(func1(data2)<1){const err14={instancePath:instancePath+"/issuer",schemaPath:"#/properties/issuer/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err14]}else{vErrors.push(err14)}errors++}if(!formats0(data2)){const err15={instancePath:instancePath+"/issuer",schemaPath:"#/properties/issuer/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};if(vErrors===null){vErrors=[err15]}else{vErrors.push(err15)}errors++}}else{const err16={instancePath:instancePath+"/issuer",schemaPath:"#/properties/issuer/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err16]}else{vErrors.push(err16)}errors++}}if(data.subject!==void 0){let data3=data.subject;if(typeof data3==="string"){if(func1(data3)>256){const err17={instancePath:instancePath+"/subject",schemaPath:"#/properties/subject/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err17]}else{vErrors.push(err17)}errors++}if(func1(data3)<1){const err18={instancePath:instancePath+"/subject",schemaPath:"#/properties/subject/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err18]}else{vErrors.push(err18)}errors++}}else{const err19={instancePath:instancePath+"/subject",schemaPath:"#/properties/subject/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err19]}else{vErrors.push(err19)}errors++}}if(data.serviceRef!==void 0){let data4=data.serviceRef;if(typeof data4==="string"){if(func1(data4)>256){const err20={instancePath:instancePath+"/serviceRef",schemaPath:"#/properties/serviceRef/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err20]}else{vErrors.push(err20)}errors++}if(func1(data4)<1){const err21={instancePath:instancePath+"/serviceRef",schemaPath:"#/properties/serviceRef/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err21]}else{vErrors.push(err21)}errors++}}else{const err22={instancePath:instancePath+"/serviceRef",schemaPath:"#/properties/serviceRef/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err22]}else{vErrors.push(err22)}errors++}}if(data.audience!==void 0){let data5=data.audience;if(typeof data5==="string"){if(func1(data5)>256){const err23={instancePath:instancePath+"/audience",schemaPath:"#/properties/audience/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err23]}else{vErrors.push(err23)}errors++}if(func1(data5)<1){const err24={instancePath:instancePath+"/audience",schemaPath:"#/properties/audience/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err24]}else{vErrors.push(err24)}errors++}}else{const err25={instancePath:instancePath+"/audience",schemaPath:"#/properties/audience/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err25]}else{vErrors.push(err25)}errors++}}if(data.source!==void 0){let data6=data.source;if(typeof data6==="string"){if(func1(data6)>2048){const err26={instancePath:instancePath+"/source",schemaPath:"#/properties/source/maxLength",keyword:"maxLength",params:{limit:2048},message:"must NOT have more than 2048 characters"};if(vErrors===null){vErrors=[err26]}else{vErrors.push(err26)}errors++}if(func1(data6)<1){const err27={instancePath:instancePath+"/source",schemaPath:"#/properties/source/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err27]}else{vErrors.push(err27)}errors++}if(!formats0(data6)){const err28={instancePath:instancePath+"/source",schemaPath:"#/properties/source/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};if(vErrors===null){vErrors=[err28]}else{vErrors.push(err28)}errors++}}else{const err29={instancePath:instancePath+"/source",schemaPath:"#/properties/source/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err29]}else{vErrors.push(err29)}errors++}}if(data.eventId!==void 0){let data7=data.eventId;if(typeof data7==="string"){if(func1(data7)>256){const err30={instancePath:instancePath+"/eventId",schemaPath:"#/properties/eventId/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err30]}else{vErrors.push(err30)}errors++}if(func1(data7)<1){const err31={instancePath:instancePath+"/eventId",schemaPath:"#/properties/eventId/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err31]}else{vErrors.push(err31)}errors++}}else{const err32={instancePath:instancePath+"/eventId",schemaPath:"#/properties/eventId/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err32]}else{vErrors.push(err32)}errors++}}if(data.deliveryId!==void 0){let data8=data.deliveryId;if(typeof data8==="string"){if(!pattern117.test(data8)){const err33={instancePath:instancePath+"/deliveryId",schemaPath:"#/properties/deliveryId/pattern",keyword:"pattern",params:{pattern:"^[a-f0-9]{64}$"},message:'must match pattern "^[a-f0-9]{64}$"'};if(vErrors===null){vErrors=[err33]}else{vErrors.push(err33)}errors++}}else{const err34={instancePath:instancePath+"/deliveryId",schemaPath:"#/properties/deliveryId/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err34]}else{vErrors.push(err34)}errors++}}if(data.eventDigest!==void 0){let data9=data.eventDigest;if(typeof data9==="string"){if(!pattern8.test(data9)){const err35={instancePath:instancePath+"/eventDigest",schemaPath:"#/properties/eventDigest/pattern",keyword:"pattern",params:{pattern:"^sha256:[a-f0-9]{64}$"},message:'must match pattern "^sha256:[a-f0-9]{64}$"'};if(vErrors===null){vErrors=[err35]}else{vErrors.push(err35)}errors++}}else{const err36={instancePath:instancePath+"/eventDigest",schemaPath:"#/properties/eventDigest/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err36]}else{vErrors.push(err36)}errors++}}if(data.signedAt!==void 0){let data10=data.signedAt;if(typeof data10==="string"){if(func1(data10)>64){const err37={instancePath:instancePath+"/signedAt",schemaPath:"#/properties/signedAt/maxLength",keyword:"maxLength",params:{limit:64},message:"must NOT have more than 64 characters"};if(vErrors===null){vErrors=[err37]}else{vErrors.push(err37)}errors++}if(!formats2.validate(data10)){const err38={instancePath:instancePath+"/signedAt",schemaPath:"#/properties/signedAt/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};if(vErrors===null){vErrors=[err38]}else{vErrors.push(err38)}errors++}}else{const err39={instancePath:instancePath+"/signedAt",schemaPath:"#/properties/signedAt/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err39]}else{vErrors.push(err39)}errors++}}}else{const err40={instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};if(vErrors===null){vErrors=[err40]}else{vErrors.push(err40)}errors++}validate40.errors=vErrors;return errors===0}validate40.evaluated={props:true,dynamicProps:false,dynamicItems:false};var nodeConnectionProfile=validate41;var schema53={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://eventsdk.dev/schemas/v1/node-connection-profile.schema.json",title:"NodeConnectionProfile",type:"object",additionalProperties:false,required:["schemaVersion","profile","serviceRef","installationSource","mode","broker","identity","publisher","consumer"],properties:{schemaVersion:{const:1},profile:{const:"eventsdk-node/1"},serviceRef:{$ref:"#/$defs/ref"},installationSource:{type:"string",format:"uri",maxLength:2048},mode:{enum:["DISABLED","SHADOW","ACTIVE"]},broker:{type:"object",additionalProperties:false,required:["serverUrl","expectedDnsName","deploymentDomainRef","authentication","credentialsFile","timeoutMs","maxPayloadBytes"],properties:{serverUrl:{type:"string",format:"uri",maxLength:2048},expectedDnsName:{$ref:"#/$defs/ref"},deploymentDomainRef:{$ref:"#/$defs/ref"},credentialsFile:{$ref:"#/$defs/file"},authentication:{enum:["NATS_CREDS","NKEY_SEED"]},caFile:{$ref:"#/$defs/file"},timeoutMs:{type:"integer",minimum:100,maximum:3e4},maxPayloadBytes:{type:"integer",minimum:1024,maximum:1048576}}},identity:{type:"object",additionalProperties:false,required:["originProof","signer","trustedSources"],properties:{originProof:{const:"eventsdk-origin/1"},signer:{oneOf:[{type:"null"},{type:"object",additionalProperties:false,required:["issuer","subject","keyId","algorithm","privateKeyFile","publicSnapshotFile","audiences","jwksUri"],properties:{issuer:{$ref:"#/$defs/issuer"},subject:{$ref:"#/$defs/ref"},keyId:{$ref:"#/$defs/ref"},algorithm:{$ref:"#/$defs/algorithm"},privateKeyFile:{$ref:"#/$defs/file"},publicSnapshotFile:{$ref:"#/$defs/file"},audiences:{type:"array",minItems:1,maxItems:32,uniqueItems:true,items:{$ref:"#/$defs/ref"}},jwksUri:{$ref:"#/$defs/issuer"}}}]},trustedSources:{type:"array",maxItems:32,items:{type:"object",additionalProperties:false,required:["source","serviceRef","issuer","subject","audience","algorithms","jwksUri","publicSnapshotFile"],properties:{source:{type:"string",format:"uri",maxLength:2048},serviceRef:{$ref:"#/$defs/ref"},issuer:{$ref:"#/$defs/issuer"},subject:{$ref:"#/$defs/ref"},audience:{$ref:"#/$defs/ref"},algorithms:{type:"array",minItems:1,maxItems:4,uniqueItems:true,items:{$ref:"#/$defs/algorithm"}},jwksUri:{$ref:"#/$defs/issuer"},publicSnapshotFile:{$ref:"#/$defs/file"}}}}}},publisher:{oneOf:[{type:"null"},{type:"object",additionalProperties:false,required:["subject","expectedStream"],properties:{subject:{$ref:"#/$defs/ref"},expectedStream:{$ref:"#/$defs/name"},audienceRoutes:{type:"array",minItems:1,maxItems:32,items:{type:"object",additionalProperties:false,required:["audience","subject","expectedStream"],properties:{audience:{$ref:"#/$defs/ref"},subject:{$ref:"#/$defs/ref"},expectedStream:{$ref:"#/$defs/name"}}}}}}]},consumer:{oneOf:[{type:"null"},{type:"object",additionalProperties:false,required:["consumerRef","stream","durableName","subject","batchSize","fetchExpiresMs"],properties:{consumerRef:{$ref:"#/$defs/ref"},stream:{$ref:"#/$defs/name"},durableName:{$ref:"#/$defs/name"},subject:{$ref:"#/$defs/ref"},batchSize:{type:"integer",minimum:1,maximum:100},fetchExpiresMs:{type:"integer",minimum:1e3,maximum:3e4},additionalBindings:{type:"array",minItems:1,maxItems:7,items:{type:"object",additionalProperties:false,required:["stream","durableName","subject"],properties:{stream:{$ref:"#/$defs/name"},durableName:{$ref:"#/$defs/name"},subject:{$ref:"#/$defs/ref"}}}}}}]}},$defs:{ref:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u0020\\u007f]+$"},name:{type:"string",minLength:1,maxLength:128,pattern:"^[A-Za-z0-9_-]+$"},file:{type:"string",minLength:1,maxLength:4096},issuer:{type:"string",format:"uri",minLength:1,maxLength:2048},algorithm:{enum:["RS256","PS256","ES256","EdDSA"]}}};var schema62={enum:["RS256","PS256","ES256","EdDSA"]};var func0=runtime2.default;var pattern119=new RegExp("^[^\\u0000-\\u0020\\u007f]+$","u");var pattern129=new RegExp("^[A-Za-z0-9_-]+$","u");function validate41(data,{instancePath="",parentData,parentDataProperty,rootData=data,dynamicAnchors={}}={}){let vErrors=null;let errors=0;const evaluated0=validate41.evaluated;if(evaluated0.dynamicProps){evaluated0.props=void 0}if(evaluated0.dynamicItems){evaluated0.items=void 0}if(data&&typeof data=="object"&&!Array.isArray(data)){if(data.schemaVersion===void 0){const err0={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"schemaVersion"},message:"must have required property 'schemaVersion'"};if(vErrors===null){vErrors=[err0]}else{vErrors.push(err0)}errors++}if(data.profile===void 0){const err1={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"profile"},message:"must have required property 'profile'"};if(vErrors===null){vErrors=[err1]}else{vErrors.push(err1)}errors++}if(data.serviceRef===void 0){const err2={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"serviceRef"},message:"must have required property 'serviceRef'"};if(vErrors===null){vErrors=[err2]}else{vErrors.push(err2)}errors++}if(data.installationSource===void 0){const err3={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"installationSource"},message:"must have required property 'installationSource'"};if(vErrors===null){vErrors=[err3]}else{vErrors.push(err3)}errors++}if(data.mode===void 0){const err4={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"mode"},message:"must have required property 'mode'"};if(vErrors===null){vErrors=[err4]}else{vErrors.push(err4)}errors++}if(data.broker===void 0){const err5={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"broker"},message:"must have required property 'broker'"};if(vErrors===null){vErrors=[err5]}else{vErrors.push(err5)}errors++}if(data.identity===void 0){const err6={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"identity"},message:"must have required property 'identity'"};if(vErrors===null){vErrors=[err6]}else{vErrors.push(err6)}errors++}if(data.publisher===void 0){const err7={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"publisher"},message:"must have required property 'publisher'"};if(vErrors===null){vErrors=[err7]}else{vErrors.push(err7)}errors++}if(data.consumer===void 0){const err8={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"consumer"},message:"must have required property 'consumer'"};if(vErrors===null){vErrors=[err8]}else{vErrors.push(err8)}errors++}for(const key0 in data){if(!func11.call(schema53.properties,key0)){const err9={instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key0},message:"must NOT have additional properties"};if(vErrors===null){vErrors=[err9]}else{vErrors.push(err9)}errors++}}if(data.schemaVersion!==void 0){if(1!==data.schemaVersion){const err10={instancePath:instancePath+"/schemaVersion",schemaPath:"#/properties/schemaVersion/const",keyword:"const",params:{allowedValue:1},message:"must be equal to constant"};if(vErrors===null){vErrors=[err10]}else{vErrors.push(err10)}errors++}}if(data.profile!==void 0){if("eventsdk-node/1"!==data.profile){const err11={instancePath:instancePath+"/profile",schemaPath:"#/properties/profile/const",keyword:"const",params:{allowedValue:"eventsdk-node/1"},message:"must be equal to constant"};if(vErrors===null){vErrors=[err11]}else{vErrors.push(err11)}errors++}}if(data.serviceRef!==void 0){let data2=data.serviceRef;if(typeof data2==="string"){if(func1(data2)>256){const err12={instancePath:instancePath+"/serviceRef",schemaPath:"#/$defs/ref/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err12]}else{vErrors.push(err12)}errors++}if(func1(data2)<1){const err13={instancePath:instancePath+"/serviceRef",schemaPath:"#/$defs/ref/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err13]}else{vErrors.push(err13)}errors++}if(!pattern119.test(data2)){const err14={instancePath:instancePath+"/serviceRef",schemaPath:"#/$defs/ref/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u0020\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u0020\\u007f]+$"'};if(vErrors===null){vErrors=[err14]}else{vErrors.push(err14)}errors++}}else{const err15={instancePath:instancePath+"/serviceRef",schemaPath:"#/$defs/ref/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err15]}else{vErrors.push(err15)}errors++}}if(data.installationSource!==void 0){let data3=data.installationSource;if(typeof data3==="string"){if(func1(data3)>2048){const err16={instancePath:instancePath+"/installationSource",schemaPath:"#/properties/installationSource/maxLength",keyword:"maxLength",params:{limit:2048},message:"must NOT have more than 2048 characters"};if(vErrors===null){vErrors=[err16]}else{vErrors.push(err16)}errors++}if(!formats0(data3)){const err17={instancePath:instancePath+"/installationSource",schemaPath:"#/properties/installationSource/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};if(vErrors===null){vErrors=[err17]}else{vErrors.push(err17)}errors++}}else{const err18={instancePath:instancePath+"/installationSource",schemaPath:"#/properties/installationSource/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err18]}else{vErrors.push(err18)}errors++}}if(data.mode!==void 0){let data4=data.mode;if(!(data4==="DISABLED"||data4==="SHADOW"||data4==="ACTIVE")){const err19={instancePath:instancePath+"/mode",schemaPath:"#/properties/mode/enum",keyword:"enum",params:{allowedValues:schema53.properties.mode.enum},message:"must be equal to one of the allowed values"};if(vErrors===null){vErrors=[err19]}else{vErrors.push(err19)}errors++}}if(data.broker!==void 0){let data5=data.broker;if(data5&&typeof data5=="object"&&!Array.isArray(data5)){if(data5.serverUrl===void 0){const err20={instancePath:instancePath+"/broker",schemaPath:"#/properties/broker/required",keyword:"required",params:{missingProperty:"serverUrl"},message:"must have required property 'serverUrl'"};if(vErrors===null){vErrors=[err20]}else{vErrors.push(err20)}errors++}if(data5.expectedDnsName===void 0){const err21={instancePath:instancePath+"/broker",schemaPath:"#/properties/broker/required",keyword:"required",params:{missingProperty:"expectedDnsName"},message:"must have required property 'expectedDnsName'"};if(vErrors===null){vErrors=[err21]}else{vErrors.push(err21)}errors++}if(data5.deploymentDomainRef===void 0){const err22={instancePath:instancePath+"/broker",schemaPath:"#/properties/broker/required",keyword:"required",params:{missingProperty:"deploymentDomainRef"},message:"must have required property 'deploymentDomainRef'"};if(vErrors===null){vErrors=[err22]}else{vErrors.push(err22)}errors++}if(data5.authentication===void 0){const err23={instancePath:instancePath+"/broker",schemaPath:"#/properties/broker/required",keyword:"required",params:{missingProperty:"authentication"},message:"must have required property 'authentication'"};if(vErrors===null){vErrors=[err23]}else{vErrors.push(err23)}errors++}if(data5.credentialsFile===void 0){const err24={instancePath:instancePath+"/broker",schemaPath:"#/properties/broker/required",keyword:"required",params:{missingProperty:"credentialsFile"},message:"must have required property 'credentialsFile'"};if(vErrors===null){vErrors=[err24]}else{vErrors.push(err24)}errors++}if(data5.timeoutMs===void 0){const err25={instancePath:instancePath+"/broker",schemaPath:"#/properties/broker/required",keyword:"required",params:{missingProperty:"timeoutMs"},message:"must have required property 'timeoutMs'"};if(vErrors===null){vErrors=[err25]}else{vErrors.push(err25)}errors++}if(data5.maxPayloadBytes===void 0){const err26={instancePath:instancePath+"/broker",schemaPath:"#/properties/broker/required",keyword:"required",params:{missingProperty:"maxPayloadBytes"},message:"must have required property 'maxPayloadBytes'"};if(vErrors===null){vErrors=[err26]}else{vErrors.push(err26)}errors++}for(const key1 in data5){if(!(key1==="serverUrl"||key1==="expectedDnsName"||key1==="deploymentDomainRef"||key1==="credentialsFile"||key1==="authentication"||key1==="caFile"||key1==="timeoutMs"||key1==="maxPayloadBytes")){const err27={instancePath:instancePath+"/broker",schemaPath:"#/properties/broker/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key1},message:"must NOT have additional properties"};if(vErrors===null){vErrors=[err27]}else{vErrors.push(err27)}errors++}}if(data5.serverUrl!==void 0){let data6=data5.serverUrl;if(typeof data6==="string"){if(func1(data6)>2048){const err28={instancePath:instancePath+"/broker/serverUrl",schemaPath:"#/properties/broker/properties/serverUrl/maxLength",keyword:"maxLength",params:{limit:2048},message:"must NOT have more than 2048 characters"};if(vErrors===null){vErrors=[err28]}else{vErrors.push(err28)}errors++}if(!formats0(data6)){const err29={instancePath:instancePath+"/broker/serverUrl",schemaPath:"#/properties/broker/properties/serverUrl/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};if(vErrors===null){vErrors=[err29]}else{vErrors.push(err29)}errors++}}else{const err30={instancePath:instancePath+"/broker/serverUrl",schemaPath:"#/properties/broker/properties/serverUrl/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err30]}else{vErrors.push(err30)}errors++}}if(data5.expectedDnsName!==void 0){let data7=data5.expectedDnsName;if(typeof data7==="string"){if(func1(data7)>256){const err31={instancePath:instancePath+"/broker/expectedDnsName",schemaPath:"#/$defs/ref/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err31]}else{vErrors.push(err31)}errors++}if(func1(data7)<1){const err32={instancePath:instancePath+"/broker/expectedDnsName",schemaPath:"#/$defs/ref/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err32]}else{vErrors.push(err32)}errors++}if(!pattern119.test(data7)){const err33={instancePath:instancePath+"/broker/expectedDnsName",schemaPath:"#/$defs/ref/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u0020\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u0020\\u007f]+$"'};if(vErrors===null){vErrors=[err33]}else{vErrors.push(err33)}errors++}}else{const err34={instancePath:instancePath+"/broker/expectedDnsName",schemaPath:"#/$defs/ref/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err34]}else{vErrors.push(err34)}errors++}}if(data5.deploymentDomainRef!==void 0){let data8=data5.deploymentDomainRef;if(typeof data8==="string"){if(func1(data8)>256){const err35={instancePath:instancePath+"/broker/deploymentDomainRef",schemaPath:"#/$defs/ref/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err35]}else{vErrors.push(err35)}errors++}if(func1(data8)<1){const err36={instancePath:instancePath+"/broker/deploymentDomainRef",schemaPath:"#/$defs/ref/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err36]}else{vErrors.push(err36)}errors++}if(!pattern119.test(data8)){const err37={instancePath:instancePath+"/broker/deploymentDomainRef",schemaPath:"#/$defs/ref/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u0020\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u0020\\u007f]+$"'};if(vErrors===null){vErrors=[err37]}else{vErrors.push(err37)}errors++}}else{const err38={instancePath:instancePath+"/broker/deploymentDomainRef",schemaPath:"#/$defs/ref/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err38]}else{vErrors.push(err38)}errors++}}if(data5.credentialsFile!==void 0){let data9=data5.credentialsFile;if(typeof data9==="string"){if(func1(data9)>4096){const err39={instancePath:instancePath+"/broker/credentialsFile",schemaPath:"#/$defs/file/maxLength",keyword:"maxLength",params:{limit:4096},message:"must NOT have more than 4096 characters"};if(vErrors===null){vErrors=[err39]}else{vErrors.push(err39)}errors++}if(func1(data9)<1){const err40={instancePath:instancePath+"/broker/credentialsFile",schemaPath:"#/$defs/file/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err40]}else{vErrors.push(err40)}errors++}}else{const err41={instancePath:instancePath+"/broker/credentialsFile",schemaPath:"#/$defs/file/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err41]}else{vErrors.push(err41)}errors++}}if(data5.authentication!==void 0){let data10=data5.authentication;if(!(data10==="NATS_CREDS"||data10==="NKEY_SEED")){const err42={instancePath:instancePath+"/broker/authentication",schemaPath:"#/properties/broker/properties/authentication/enum",keyword:"enum",params:{allowedValues:schema53.properties.broker.properties.authentication.enum},message:"must be equal to one of the allowed values"};if(vErrors===null){vErrors=[err42]}else{vErrors.push(err42)}errors++}}if(data5.caFile!==void 0){let data11=data5.caFile;if(typeof data11==="string"){if(func1(data11)>4096){const err43={instancePath:instancePath+"/broker/caFile",schemaPath:"#/$defs/file/maxLength",keyword:"maxLength",params:{limit:4096},message:"must NOT have more than 4096 characters"};if(vErrors===null){vErrors=[err43]}else{vErrors.push(err43)}errors++}if(func1(data11)<1){const err44={instancePath:instancePath+"/broker/caFile",schemaPath:"#/$defs/file/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err44]}else{vErrors.push(err44)}errors++}}else{const err45={instancePath:instancePath+"/broker/caFile",schemaPath:"#/$defs/file/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err45]}else{vErrors.push(err45)}errors++}}if(data5.timeoutMs!==void 0){let data12=data5.timeoutMs;if(!(typeof data12=="number"&&!(data12%1)&&!isNaN(data12)&&isFinite(data12))){const err46={instancePath:instancePath+"/broker/timeoutMs",schemaPath:"#/properties/broker/properties/timeoutMs/type",keyword:"type",params:{type:"integer"},message:"must be integer"};if(vErrors===null){vErrors=[err46]}else{vErrors.push(err46)}errors++}if(typeof data12=="number"&&isFinite(data12)){if(data12>3e4||isNaN(data12)){const err47={instancePath:instancePath+"/broker/timeoutMs",schemaPath:"#/properties/broker/properties/timeoutMs/maximum",keyword:"maximum",params:{comparison:"<=",limit:3e4},message:"must be <= 30000"};if(vErrors===null){vErrors=[err47]}else{vErrors.push(err47)}errors++}if(data12<100||isNaN(data12)){const err48={instancePath:instancePath+"/broker/timeoutMs",schemaPath:"#/properties/broker/properties/timeoutMs/minimum",keyword:"minimum",params:{comparison:">=",limit:100},message:"must be >= 100"};if(vErrors===null){vErrors=[err48]}else{vErrors.push(err48)}errors++}}}if(data5.maxPayloadBytes!==void 0){let data13=data5.maxPayloadBytes;if(!(typeof data13=="number"&&!(data13%1)&&!isNaN(data13)&&isFinite(data13))){const err49={instancePath:instancePath+"/broker/maxPayloadBytes",schemaPath:"#/properties/broker/properties/maxPayloadBytes/type",keyword:"type",params:{type:"integer"},message:"must be integer"};if(vErrors===null){vErrors=[err49]}else{vErrors.push(err49)}errors++}if(typeof data13=="number"&&isFinite(data13)){if(data13>1048576||isNaN(data13)){const err50={instancePath:instancePath+"/broker/maxPayloadBytes",schemaPath:"#/properties/broker/properties/maxPayloadBytes/maximum",keyword:"maximum",params:{comparison:"<=",limit:1048576},message:"must be <= 1048576"};if(vErrors===null){vErrors=[err50]}else{vErrors.push(err50)}errors++}if(data13<1024||isNaN(data13)){const err51={instancePath:instancePath+"/broker/maxPayloadBytes",schemaPath:"#/properties/broker/properties/maxPayloadBytes/minimum",keyword:"minimum",params:{comparison:">=",limit:1024},message:"must be >= 1024"};if(vErrors===null){vErrors=[err51]}else{vErrors.push(err51)}errors++}}}}else{const err52={instancePath:instancePath+"/broker",schemaPath:"#/properties/broker/type",keyword:"type",params:{type:"object"},message:"must be object"};if(vErrors===null){vErrors=[err52]}else{vErrors.push(err52)}errors++}}if(data.identity!==void 0){let data14=data.identity;if(data14&&typeof data14=="object"&&!Array.isArray(data14)){if(data14.originProof===void 0){const err53={instancePath:instancePath+"/identity",schemaPath:"#/properties/identity/required",keyword:"required",params:{missingProperty:"originProof"},message:"must have required property 'originProof'"};if(vErrors===null){vErrors=[err53]}else{vErrors.push(err53)}errors++}if(data14.signer===void 0){const err54={instancePath:instancePath+"/identity",schemaPath:"#/properties/identity/required",keyword:"required",params:{missingProperty:"signer"},message:"must have required property 'signer'"};if(vErrors===null){vErrors=[err54]}else{vErrors.push(err54)}errors++}if(data14.trustedSources===void 0){const err55={instancePath:instancePath+"/identity",schemaPath:"#/properties/identity/required",keyword:"required",params:{missingProperty:"trustedSources"},message:"must have required property 'trustedSources'"};if(vErrors===null){vErrors=[err55]}else{vErrors.push(err55)}errors++}for(const key2 in data14){if(!(key2==="originProof"||key2==="signer"||key2==="trustedSources")){const err56={instancePath:instancePath+"/identity",schemaPath:"#/properties/identity/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key2},message:"must NOT have additional properties"};if(vErrors===null){vErrors=[err56]}else{vErrors.push(err56)}errors++}}if(data14.originProof!==void 0){if("eventsdk-origin/1"!==data14.originProof){const err57={instancePath:instancePath+"/identity/originProof",schemaPath:"#/properties/identity/properties/originProof/const",keyword:"const",params:{allowedValue:"eventsdk-origin/1"},message:"must be equal to constant"};if(vErrors===null){vErrors=[err57]}else{vErrors.push(err57)}errors++}}if(data14.signer!==void 0){let data16=data14.signer;const _errs37=errors;let valid8=false;let passing0=null;const _errs38=errors;if(data16!==null){const err58={instancePath:instancePath+"/identity/signer",schemaPath:"#/properties/identity/properties/signer/oneOf/0/type",keyword:"type",params:{type:"null"},message:"must be null"};if(vErrors===null){vErrors=[err58]}else{vErrors.push(err58)}errors++}var _valid0=_errs38===errors;if(_valid0){valid8=true;passing0=0}const _errs40=errors;if(data16&&typeof data16=="object"&&!Array.isArray(data16)){if(data16.issuer===void 0){const err59={instancePath:instancePath+"/identity/signer",schemaPath:"#/properties/identity/properties/signer/oneOf/1/required",keyword:"required",params:{missingProperty:"issuer"},message:"must have required property 'issuer'"};if(vErrors===null){vErrors=[err59]}else{vErrors.push(err59)}errors++}if(data16.subject===void 0){const err60={instancePath:instancePath+"/identity/signer",schemaPath:"#/properties/identity/properties/signer/oneOf/1/required",keyword:"required",params:{missingProperty:"subject"},message:"must have required property 'subject'"};if(vErrors===null){vErrors=[err60]}else{vErrors.push(err60)}errors++}if(data16.keyId===void 0){const err61={instancePath:instancePath+"/identity/signer",schemaPath:"#/properties/identity/properties/signer/oneOf/1/required",keyword:"required",params:{missingProperty:"keyId"},message:"must have required property 'keyId'"};if(vErrors===null){vErrors=[err61]}else{vErrors.push(err61)}errors++}if(data16.algorithm===void 0){const err62={instancePath:instancePath+"/identity/signer",schemaPath:"#/properties/identity/properties/signer/oneOf/1/required",keyword:"required",params:{missingProperty:"algorithm"},message:"must have required property 'algorithm'"};if(vErrors===null){vErrors=[err62]}else{vErrors.push(err62)}errors++}if(data16.privateKeyFile===void 0){const err63={instancePath:instancePath+"/identity/signer",schemaPath:"#/properties/identity/properties/signer/oneOf/1/required",keyword:"required",params:{missingProperty:"privateKeyFile"},message:"must have required property 'privateKeyFile'"};if(vErrors===null){vErrors=[err63]}else{vErrors.push(err63)}errors++}if(data16.publicSnapshotFile===void 0){const err64={instancePath:instancePath+"/identity/signer",schemaPath:"#/properties/identity/properties/signer/oneOf/1/required",keyword:"required",params:{missingProperty:"publicSnapshotFile"},message:"must have required property 'publicSnapshotFile'"};if(vErrors===null){vErrors=[err64]}else{vErrors.push(err64)}errors++}if(data16.audiences===void 0){const err65={instancePath:instancePath+"/identity/signer",schemaPath:"#/properties/identity/properties/signer/oneOf/1/required",keyword:"required",params:{missingProperty:"audiences"},message:"must have required property 'audiences'"};if(vErrors===null){vErrors=[err65]}else{vErrors.push(err65)}errors++}if(data16.jwksUri===void 0){const err66={instancePath:instancePath+"/identity/signer",schemaPath:"#/properties/identity/properties/signer/oneOf/1/required",keyword:"required",params:{missingProperty:"jwksUri"},message:"must have required property 'jwksUri'"};if(vErrors===null){vErrors=[err66]}else{vErrors.push(err66)}errors++}for(const key3 in data16){if(!(key3==="issuer"||key3==="subject"||key3==="keyId"||key3==="algorithm"||key3==="privateKeyFile"||key3==="publicSnapshotFile"||key3==="audiences"||key3==="jwksUri")){const err67={instancePath:instancePath+"/identity/signer",schemaPath:"#/properties/identity/properties/signer/oneOf/1/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key3},message:"must NOT have additional properties"};if(vErrors===null){vErrors=[err67]}else{vErrors.push(err67)}errors++}}if(data16.issuer!==void 0){let data17=data16.issuer;if(typeof data17==="string"){if(func1(data17)>2048){const err68={instancePath:instancePath+"/identity/signer/issuer",schemaPath:"#/$defs/issuer/maxLength",keyword:"maxLength",params:{limit:2048},message:"must NOT have more than 2048 characters"};if(vErrors===null){vErrors=[err68]}else{vErrors.push(err68)}errors++}if(func1(data17)<1){const err69={instancePath:instancePath+"/identity/signer/issuer",schemaPath:"#/$defs/issuer/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err69]}else{vErrors.push(err69)}errors++}if(!formats0(data17)){const err70={instancePath:instancePath+"/identity/signer/issuer",schemaPath:"#/$defs/issuer/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};if(vErrors===null){vErrors=[err70]}else{vErrors.push(err70)}errors++}}else{const err71={instancePath:instancePath+"/identity/signer/issuer",schemaPath:"#/$defs/issuer/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err71]}else{vErrors.push(err71)}errors++}}if(data16.subject!==void 0){let data18=data16.subject;if(typeof data18==="string"){if(func1(data18)>256){const err72={instancePath:instancePath+"/identity/signer/subject",schemaPath:"#/$defs/ref/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err72]}else{vErrors.push(err72)}errors++}if(func1(data18)<1){const err73={instancePath:instancePath+"/identity/signer/subject",schemaPath:"#/$defs/ref/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err73]}else{vErrors.push(err73)}errors++}if(!pattern119.test(data18)){const err74={instancePath:instancePath+"/identity/signer/subject",schemaPath:"#/$defs/ref/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u0020\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u0020\\u007f]+$"'};if(vErrors===null){vErrors=[err74]}else{vErrors.push(err74)}errors++}}else{const err75={instancePath:instancePath+"/identity/signer/subject",schemaPath:"#/$defs/ref/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err75]}else{vErrors.push(err75)}errors++}}if(data16.keyId!==void 0){let data19=data16.keyId;if(typeof data19==="string"){if(func1(data19)>256){const err76={instancePath:instancePath+"/identity/signer/keyId",schemaPath:"#/$defs/ref/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err76]}else{vErrors.push(err76)}errors++}if(func1(data19)<1){const err77={instancePath:instancePath+"/identity/signer/keyId",schemaPath:"#/$defs/ref/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err77]}else{vErrors.push(err77)}errors++}if(!pattern119.test(data19)){const err78={instancePath:instancePath+"/identity/signer/keyId",schemaPath:"#/$defs/ref/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u0020\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u0020\\u007f]+$"'};if(vErrors===null){vErrors=[err78]}else{vErrors.push(err78)}errors++}}else{const err79={instancePath:instancePath+"/identity/signer/keyId",schemaPath:"#/$defs/ref/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err79]}else{vErrors.push(err79)}errors++}}if(data16.algorithm!==void 0){let data20=data16.algorithm;if(!(data20==="RS256"||data20==="PS256"||data20==="ES256"||data20==="EdDSA")){const err80={instancePath:instancePath+"/identity/signer/algorithm",schemaPath:"#/$defs/algorithm/enum",keyword:"enum",params:{allowedValues:schema62.enum},message:"must be equal to one of the allowed values"};if(vErrors===null){vErrors=[err80]}else{vErrors.push(err80)}errors++}}if(data16.privateKeyFile!==void 0){let data21=data16.privateKeyFile;if(typeof data21==="string"){if(func1(data21)>4096){const err81={instancePath:instancePath+"/identity/signer/privateKeyFile",schemaPath:"#/$defs/file/maxLength",keyword:"maxLength",params:{limit:4096},message:"must NOT have more than 4096 characters"};if(vErrors===null){vErrors=[err81]}else{vErrors.push(err81)}errors++}if(func1(data21)<1){const err82={instancePath:instancePath+"/identity/signer/privateKeyFile",schemaPath:"#/$defs/file/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err82]}else{vErrors.push(err82)}errors++}}else{const err83={instancePath:instancePath+"/identity/signer/privateKeyFile",schemaPath:"#/$defs/file/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err83]}else{vErrors.push(err83)}errors++}}if(data16.publicSnapshotFile!==void 0){let data22=data16.publicSnapshotFile;if(typeof data22==="string"){if(func1(data22)>4096){const err84={instancePath:instancePath+"/identity/signer/publicSnapshotFile",schemaPath:"#/$defs/file/maxLength",keyword:"maxLength",params:{limit:4096},message:"must NOT have more than 4096 characters"};if(vErrors===null){vErrors=[err84]}else{vErrors.push(err84)}errors++}if(func1(data22)<1){const err85={instancePath:instancePath+"/identity/signer/publicSnapshotFile",schemaPath:"#/$defs/file/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err85]}else{vErrors.push(err85)}errors++}}else{const err86={instancePath:instancePath+"/identity/signer/publicSnapshotFile",schemaPath:"#/$defs/file/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err86]}else{vErrors.push(err86)}errors++}}if(data16.audiences!==void 0){let data23=data16.audiences;if(Array.isArray(data23)){if(data23.length>32){const err87={instancePath:instancePath+"/identity/signer/audiences",schemaPath:"#/properties/identity/properties/signer/oneOf/1/properties/audiences/maxItems",keyword:"maxItems",params:{limit:32},message:"must NOT have more than 32 items"};if(vErrors===null){vErrors=[err87]}else{vErrors.push(err87)}errors++}if(data23.length<1){const err88={instancePath:instancePath+"/identity/signer/audiences",schemaPath:"#/properties/identity/properties/signer/oneOf/1/properties/audiences/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};if(vErrors===null){vErrors=[err88]}else{vErrors.push(err88)}errors++}const len0=data23.length;for(let i0=0;i0<len0;i0++){let data24=data23[i0];if(typeof data24==="string"){if(func1(data24)>256){const err89={instancePath:instancePath+"/identity/signer/audiences/"+i0,schemaPath:"#/$defs/ref/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err89]}else{vErrors.push(err89)}errors++}if(func1(data24)<1){const err90={instancePath:instancePath+"/identity/signer/audiences/"+i0,schemaPath:"#/$defs/ref/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err90]}else{vErrors.push(err90)}errors++}if(!pattern119.test(data24)){const err91={instancePath:instancePath+"/identity/signer/audiences/"+i0,schemaPath:"#/$defs/ref/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u0020\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u0020\\u007f]+$"'};if(vErrors===null){vErrors=[err91]}else{vErrors.push(err91)}errors++}}else{const err92={instancePath:instancePath+"/identity/signer/audiences/"+i0,schemaPath:"#/$defs/ref/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err92]}else{vErrors.push(err92)}errors++}}let i1=data23.length;let j0;if(i1>1){outer0:for(;i1--;){for(j0=i1;j0--;){if(func0(data23[i1],data23[j0])){const err93={instancePath:instancePath+"/identity/signer/audiences",schemaPath:"#/properties/identity/properties/signer/oneOf/1/properties/audiences/uniqueItems",keyword:"uniqueItems",params:{i:i1,j:j0},message:"must NOT have duplicate items (items ## "+j0+" and "+i1+" are identical)"};if(vErrors===null){vErrors=[err93]}else{vErrors.push(err93)}errors++;break outer0}}}}}else{const err94={instancePath:instancePath+"/identity/signer/audiences",schemaPath:"#/properties/identity/properties/signer/oneOf/1/properties/audiences/type",keyword:"type",params:{type:"array"},message:"must be array"};if(vErrors===null){vErrors=[err94]}else{vErrors.push(err94)}errors++}}if(data16.jwksUri!==void 0){let data25=data16.jwksUri;if(typeof data25==="string"){if(func1(data25)>2048){const err95={instancePath:instancePath+"/identity/signer/jwksUri",schemaPath:"#/$defs/issuer/maxLength",keyword:"maxLength",params:{limit:2048},message:"must NOT have more than 2048 characters"};if(vErrors===null){vErrors=[err95]}else{vErrors.push(err95)}errors++}if(func1(data25)<1){const err96={instancePath:instancePath+"/identity/signer/jwksUri",schemaPath:"#/$defs/issuer/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err96]}else{vErrors.push(err96)}errors++}if(!formats0(data25)){const err97={instancePath:instancePath+"/identity/signer/jwksUri",schemaPath:"#/$defs/issuer/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};if(vErrors===null){vErrors=[err97]}else{vErrors.push(err97)}errors++}}else{const err98={instancePath:instancePath+"/identity/signer/jwksUri",schemaPath:"#/$defs/issuer/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err98]}else{vErrors.push(err98)}errors++}}}else{const err99={instancePath:instancePath+"/identity/signer",schemaPath:"#/properties/identity/properties/signer/oneOf/1/type",keyword:"type",params:{type:"object"},message:"must be object"};if(vErrors===null){vErrors=[err99]}else{vErrors.push(err99)}errors++}var _valid0=_errs40===errors;if(_valid0&&valid8){valid8=false;passing0=[passing0,1]}else{if(_valid0){valid8=true;passing0=1}}if(!valid8){const err100={instancePath:instancePath+"/identity/signer",schemaPath:"#/properties/identity/properties/signer/oneOf",keyword:"oneOf",params:{passingSchemas:passing0},message:"must match exactly one schema in oneOf"};if(vErrors===null){vErrors=[err100]}else{vErrors.push(err100)}errors++}else{errors=_errs37;if(vErrors!==null){if(_errs37){vErrors.length=_errs37}else{vErrors=null}}}}if(data14.trustedSources!==void 0){let data26=data14.trustedSources;if(Array.isArray(data26)){if(data26.length>32){const err101={instancePath:instancePath+"/identity/trustedSources",schemaPath:"#/properties/identity/properties/trustedSources/maxItems",keyword:"maxItems",params:{limit:32},message:"must NOT have more than 32 items"};if(vErrors===null){vErrors=[err101]}else{vErrors.push(err101)}errors++}const len1=data26.length;for(let i2=0;i2<len1;i2++){let data27=data26[i2];if(data27&&typeof data27=="object"&&!Array.isArray(data27)){if(data27.source===void 0){const err102={instancePath:instancePath+"/identity/trustedSources/"+i2,schemaPath:"#/properties/identity/properties/trustedSources/items/required",keyword:"required",params:{missingProperty:"source"},message:"must have required property 'source'"};if(vErrors===null){vErrors=[err102]}else{vErrors.push(err102)}errors++}if(data27.serviceRef===void 0){const err103={instancePath:instancePath+"/identity/trustedSources/"+i2,schemaPath:"#/properties/identity/properties/trustedSources/items/required",keyword:"required",params:{missingProperty:"serviceRef"},message:"must have required property 'serviceRef'"};if(vErrors===null){vErrors=[err103]}else{vErrors.push(err103)}errors++}if(data27.issuer===void 0){const err104={instancePath:instancePath+"/identity/trustedSources/"+i2,schemaPath:"#/properties/identity/properties/trustedSources/items/required",keyword:"required",params:{missingProperty:"issuer"},message:"must have required property 'issuer'"};if(vErrors===null){vErrors=[err104]}else{vErrors.push(err104)}errors++}if(data27.subject===void 0){const err105={instancePath:instancePath+"/identity/trustedSources/"+i2,schemaPath:"#/properties/identity/properties/trustedSources/items/required",keyword:"required",params:{missingProperty:"subject"},message:"must have required property 'subject'"};if(vErrors===null){vErrors=[err105]}else{vErrors.push(err105)}errors++}if(data27.audience===void 0){const err106={instancePath:instancePath+"/identity/trustedSources/"+i2,schemaPath:"#/properties/identity/properties/trustedSources/items/required",keyword:"required",params:{missingProperty:"audience"},message:"must have required property 'audience'"};if(vErrors===null){vErrors=[err106]}else{vErrors.push(err106)}errors++}if(data27.algorithms===void 0){const err107={instancePath:instancePath+"/identity/trustedSources/"+i2,schemaPath:"#/properties/identity/properties/trustedSources/items/required",keyword:"required",params:{missingProperty:"algorithms"},message:"must have required property 'algorithms'"};if(vErrors===null){vErrors=[err107]}else{vErrors.push(err107)}errors++}if(data27.jwksUri===void 0){const err108={instancePath:instancePath+"/identity/trustedSources/"+i2,schemaPath:"#/properties/identity/properties/trustedSources/items/required",keyword:"required",params:{missingProperty:"jwksUri"},message:"must have required property 'jwksUri'"};if(vErrors===null){vErrors=[err108]}else{vErrors.push(err108)}errors++}if(data27.publicSnapshotFile===void 0){const err109={instancePath:instancePath+"/identity/trustedSources/"+i2,schemaPath:"#/properties/identity/properties/trustedSources/items/required",keyword:"required",params:{missingProperty:"publicSnapshotFile"},message:"must have required property 'publicSnapshotFile'"};if(vErrors===null){vErrors=[err109]}else{vErrors.push(err109)}errors++}for(const key4 in data27){if(!(key4==="source"||key4==="serviceRef"||key4==="issuer"||key4==="subject"||key4==="audience"||key4==="algorithms"||key4==="jwksUri"||key4==="publicSnapshotFile")){const err110={instancePath:instancePath+"/identity/trustedSources/"+i2,schemaPath:"#/properties/identity/properties/trustedSources/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key4},message:"must NOT have additional properties"};if(vErrors===null){vErrors=[err110]}else{vErrors.push(err110)}errors++}}if(data27.source!==void 0){let data28=data27.source;if(typeof data28==="string"){if(func1(data28)>2048){const err111={instancePath:instancePath+"/identity/trustedSources/"+i2+"/source",schemaPath:"#/properties/identity/properties/trustedSources/items/properties/source/maxLength",keyword:"maxLength",params:{limit:2048},message:"must NOT have more than 2048 characters"};if(vErrors===null){vErrors=[err111]}else{vErrors.push(err111)}errors++}if(!formats0(data28)){const err112={instancePath:instancePath+"/identity/trustedSources/"+i2+"/source",schemaPath:"#/properties/identity/properties/trustedSources/items/properties/source/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};if(vErrors===null){vErrors=[err112]}else{vErrors.push(err112)}errors++}}else{const err113={instancePath:instancePath+"/identity/trustedSources/"+i2+"/source",schemaPath:"#/properties/identity/properties/trustedSources/items/properties/source/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err113]}else{vErrors.push(err113)}errors++}}if(data27.serviceRef!==void 0){let data29=data27.serviceRef;if(typeof data29==="string"){if(func1(data29)>256){const err114={instancePath:instancePath+"/identity/trustedSources/"+i2+"/serviceRef",schemaPath:"#/$defs/ref/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err114]}else{vErrors.push(err114)}errors++}if(func1(data29)<1){const err115={instancePath:instancePath+"/identity/trustedSources/"+i2+"/serviceRef",schemaPath:"#/$defs/ref/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err115]}else{vErrors.push(err115)}errors++}if(!pattern119.test(data29)){const err116={instancePath:instancePath+"/identity/trustedSources/"+i2+"/serviceRef",schemaPath:"#/$defs/ref/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u0020\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u0020\\u007f]+$"'};if(vErrors===null){vErrors=[err116]}else{vErrors.push(err116)}errors++}}else{const err117={instancePath:instancePath+"/identity/trustedSources/"+i2+"/serviceRef",schemaPath:"#/$defs/ref/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err117]}else{vErrors.push(err117)}errors++}}if(data27.issuer!==void 0){let data30=data27.issuer;if(typeof data30==="string"){if(func1(data30)>2048){const err118={instancePath:instancePath+"/identity/trustedSources/"+i2+"/issuer",schemaPath:"#/$defs/issuer/maxLength",keyword:"maxLength",params:{limit:2048},message:"must NOT have more than 2048 characters"};if(vErrors===null){vErrors=[err118]}else{vErrors.push(err118)}errors++}if(func1(data30)<1){const err119={instancePath:instancePath+"/identity/trustedSources/"+i2+"/issuer",schemaPath:"#/$defs/issuer/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err119]}else{vErrors.push(err119)}errors++}if(!formats0(data30)){const err120={instancePath:instancePath+"/identity/trustedSources/"+i2+"/issuer",schemaPath:"#/$defs/issuer/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};if(vErrors===null){vErrors=[err120]}else{vErrors.push(err120)}errors++}}else{const err121={instancePath:instancePath+"/identity/trustedSources/"+i2+"/issuer",schemaPath:"#/$defs/issuer/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err121]}else{vErrors.push(err121)}errors++}}if(data27.subject!==void 0){let data31=data27.subject;if(typeof data31==="string"){if(func1(data31)>256){const err122={instancePath:instancePath+"/identity/trustedSources/"+i2+"/subject",schemaPath:"#/$defs/ref/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err122]}else{vErrors.push(err122)}errors++}if(func1(data31)<1){const err123={instancePath:instancePath+"/identity/trustedSources/"+i2+"/subject",schemaPath:"#/$defs/ref/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err123]}else{vErrors.push(err123)}errors++}if(!pattern119.test(data31)){const err124={instancePath:instancePath+"/identity/trustedSources/"+i2+"/subject",schemaPath:"#/$defs/ref/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u0020\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u0020\\u007f]+$"'};if(vErrors===null){vErrors=[err124]}else{vErrors.push(err124)}errors++}}else{const err125={instancePath:instancePath+"/identity/trustedSources/"+i2+"/subject",schemaPath:"#/$defs/ref/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err125]}else{vErrors.push(err125)}errors++}}if(data27.audience!==void 0){let data32=data27.audience;if(typeof data32==="string"){if(func1(data32)>256){const err126={instancePath:instancePath+"/identity/trustedSources/"+i2+"/audience",schemaPath:"#/$defs/ref/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err126]}else{vErrors.push(err126)}errors++}if(func1(data32)<1){const err127={instancePath:instancePath+"/identity/trustedSources/"+i2+"/audience",schemaPath:"#/$defs/ref/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err127]}else{vErrors.push(err127)}errors++}if(!pattern119.test(data32)){const err128={instancePath:instancePath+"/identity/trustedSources/"+i2+"/audience",schemaPath:"#/$defs/ref/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u0020\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u0020\\u007f]+$"'};if(vErrors===null){vErrors=[err128]}else{vErrors.push(err128)}errors++}}else{const err129={instancePath:instancePath+"/identity/trustedSources/"+i2+"/audience",schemaPath:"#/$defs/ref/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err129]}else{vErrors.push(err129)}errors++}}if(data27.algorithms!==void 0){let data33=data27.algorithms;if(Array.isArray(data33)){if(data33.length>4){const err130={instancePath:instancePath+"/identity/trustedSources/"+i2+"/algorithms",schemaPath:"#/properties/identity/properties/trustedSources/items/properties/algorithms/maxItems",keyword:"maxItems",params:{limit:4},message:"must NOT have more than 4 items"};if(vErrors===null){vErrors=[err130]}else{vErrors.push(err130)}errors++}if(data33.length<1){const err131={instancePath:instancePath+"/identity/trustedSources/"+i2+"/algorithms",schemaPath:"#/properties/identity/properties/trustedSources/items/properties/algorithms/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};if(vErrors===null){vErrors=[err131]}else{vErrors.push(err131)}errors++}const len2=data33.length;for(let i3=0;i3<len2;i3++){let data34=data33[i3];if(!(data34==="RS256"||data34==="PS256"||data34==="ES256"||data34==="EdDSA")){const err132={instancePath:instancePath+"/identity/trustedSources/"+i2+"/algorithms/"+i3,schemaPath:"#/$defs/algorithm/enum",keyword:"enum",params:{allowedValues:schema62.enum},message:"must be equal to one of the allowed values"};if(vErrors===null){vErrors=[err132]}else{vErrors.push(err132)}errors++}}let i4=data33.length;let j1;if(i4>1){outer1:for(;i4--;){for(j1=i4;j1--;){if(func0(data33[i4],data33[j1])){const err133={instancePath:instancePath+"/identity/trustedSources/"+i2+"/algorithms",schemaPath:"#/properties/identity/properties/trustedSources/items/properties/algorithms/uniqueItems",keyword:"uniqueItems",params:{i:i4,j:j1},message:"must NOT have duplicate items (items ## "+j1+" and "+i4+" are identical)"};if(vErrors===null){vErrors=[err133]}else{vErrors.push(err133)}errors++;break outer1}}}}}else{const err134={instancePath:instancePath+"/identity/trustedSources/"+i2+"/algorithms",schemaPath:"#/properties/identity/properties/trustedSources/items/properties/algorithms/type",keyword:"type",params:{type:"array"},message:"must be array"};if(vErrors===null){vErrors=[err134]}else{vErrors.push(err134)}errors++}}if(data27.jwksUri!==void 0){let data35=data27.jwksUri;if(typeof data35==="string"){if(func1(data35)>2048){const err135={instancePath:instancePath+"/identity/trustedSources/"+i2+"/jwksUri",schemaPath:"#/$defs/issuer/maxLength",keyword:"maxLength",params:{limit:2048},message:"must NOT have more than 2048 characters"};if(vErrors===null){vErrors=[err135]}else{vErrors.push(err135)}errors++}if(func1(data35)<1){const err136={instancePath:instancePath+"/identity/trustedSources/"+i2+"/jwksUri",schemaPath:"#/$defs/issuer/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err136]}else{vErrors.push(err136)}errors++}if(!formats0(data35)){const err137={instancePath:instancePath+"/identity/trustedSources/"+i2+"/jwksUri",schemaPath:"#/$defs/issuer/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};if(vErrors===null){vErrors=[err137]}else{vErrors.push(err137)}errors++}}else{const err138={instancePath:instancePath+"/identity/trustedSources/"+i2+"/jwksUri",schemaPath:"#/$defs/issuer/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err138]}else{vErrors.push(err138)}errors++}}if(data27.publicSnapshotFile!==void 0){let data36=data27.publicSnapshotFile;if(typeof data36==="string"){if(func1(data36)>4096){const err139={instancePath:instancePath+"/identity/trustedSources/"+i2+"/publicSnapshotFile",schemaPath:"#/$defs/file/maxLength",keyword:"maxLength",params:{limit:4096},message:"must NOT have more than 4096 characters"};if(vErrors===null){vErrors=[err139]}else{vErrors.push(err139)}errors++}if(func1(data36)<1){const err140={instancePath:instancePath+"/identity/trustedSources/"+i2+"/publicSnapshotFile",schemaPath:"#/$defs/file/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err140]}else{vErrors.push(err140)}errors++}}else{const err141={instancePath:instancePath+"/identity/trustedSources/"+i2+"/publicSnapshotFile",schemaPath:"#/$defs/file/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err141]}else{vErrors.push(err141)}errors++}}}else{const err142={instancePath:instancePath+"/identity/trustedSources/"+i2,schemaPath:"#/properties/identity/properties/trustedSources/items/type",keyword:"type",params:{type:"object"},message:"must be object"};if(vErrors===null){vErrors=[err142]}else{vErrors.push(err142)}errors++}}}else{const err143={instancePath:instancePath+"/identity/trustedSources",schemaPath:"#/properties/identity/properties/trustedSources/type",keyword:"type",params:{type:"array"},message:"must be array"};if(vErrors===null){vErrors=[err143]}else{vErrors.push(err143)}errors++}}}else{const err144={instancePath:instancePath+"/identity",schemaPath:"#/properties/identity/type",keyword:"type",params:{type:"object"},message:"must be object"};if(vErrors===null){vErrors=[err144]}else{vErrors.push(err144)}errors++}}if(data.publisher!==void 0){let data37=data.publisher;const _errs98=errors;let valid34=false;let passing1=null;const _errs99=errors;if(data37!==null){const err145={instancePath:instancePath+"/publisher",schemaPath:"#/properties/publisher/oneOf/0/type",keyword:"type",params:{type:"null"},message:"must be null"};if(vErrors===null){vErrors=[err145]}else{vErrors.push(err145)}errors++}var _valid1=_errs99===errors;if(_valid1){valid34=true;passing1=0}const _errs101=errors;if(data37&&typeof data37=="object"&&!Array.isArray(data37)){if(data37.subject===void 0){const err146={instancePath:instancePath+"/publisher",schemaPath:"#/properties/publisher/oneOf/1/required",keyword:"required",params:{missingProperty:"subject"},message:"must have required property 'subject'"};if(vErrors===null){vErrors=[err146]}else{vErrors.push(err146)}errors++}if(data37.expectedStream===void 0){const err147={instancePath:instancePath+"/publisher",schemaPath:"#/properties/publisher/oneOf/1/required",keyword:"required",params:{missingProperty:"expectedStream"},message:"must have required property 'expectedStream'"};if(vErrors===null){vErrors=[err147]}else{vErrors.push(err147)}errors++}for(const key5 in data37){if(!(key5==="subject"||key5==="expectedStream"||key5==="audienceRoutes")){const err148={instancePath:instancePath+"/publisher",schemaPath:"#/properties/publisher/oneOf/1/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key5},message:"must NOT have additional properties"};if(vErrors===null){vErrors=[err148]}else{vErrors.push(err148)}errors++}}if(data37.subject!==void 0){let data38=data37.subject;if(typeof data38==="string"){if(func1(data38)>256){const err149={instancePath:instancePath+"/publisher/subject",schemaPath:"#/$defs/ref/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err149]}else{vErrors.push(err149)}errors++}if(func1(data38)<1){const err150={instancePath:instancePath+"/publisher/subject",schemaPath:"#/$defs/ref/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err150]}else{vErrors.push(err150)}errors++}if(!pattern119.test(data38)){const err151={instancePath:instancePath+"/publisher/subject",schemaPath:"#/$defs/ref/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u0020\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u0020\\u007f]+$"'};if(vErrors===null){vErrors=[err151]}else{vErrors.push(err151)}errors++}}else{const err152={instancePath:instancePath+"/publisher/subject",schemaPath:"#/$defs/ref/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err152]}else{vErrors.push(err152)}errors++}}if(data37.expectedStream!==void 0){let data39=data37.expectedStream;if(typeof data39==="string"){if(func1(data39)>128){const err153={instancePath:instancePath+"/publisher/expectedStream",schemaPath:"#/$defs/name/maxLength",keyword:"maxLength",params:{limit:128},message:"must NOT have more than 128 characters"};if(vErrors===null){vErrors=[err153]}else{vErrors.push(err153)}errors++}if(func1(data39)<1){const err154={instancePath:instancePath+"/publisher/expectedStream",schemaPath:"#/$defs/name/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err154]}else{vErrors.push(err154)}errors++}if(!pattern129.test(data39)){const err155={instancePath:instancePath+"/publisher/expectedStream",schemaPath:"#/$defs/name/pattern",keyword:"pattern",params:{pattern:"^[A-Za-z0-9_-]+$"},message:'must match pattern "^[A-Za-z0-9_-]+$"'};if(vErrors===null){vErrors=[err155]}else{vErrors.push(err155)}errors++}}else{const err156={instancePath:instancePath+"/publisher/expectedStream",schemaPath:"#/$defs/name/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err156]}else{vErrors.push(err156)}errors++}}if(data37.audienceRoutes!==void 0){let data40=data37.audienceRoutes;if(Array.isArray(data40)){if(data40.length>32){const err157={instancePath:instancePath+"/publisher/audienceRoutes",schemaPath:"#/properties/publisher/oneOf/1/properties/audienceRoutes/maxItems",keyword:"maxItems",params:{limit:32},message:"must NOT have more than 32 items"};if(vErrors===null){vErrors=[err157]}else{vErrors.push(err157)}errors++}if(data40.length<1){const err158={instancePath:instancePath+"/publisher/audienceRoutes",schemaPath:"#/properties/publisher/oneOf/1/properties/audienceRoutes/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};if(vErrors===null){vErrors=[err158]}else{vErrors.push(err158)}errors++}const len3=data40.length;for(let i5=0;i5<len3;i5++){let data41=data40[i5];if(data41&&typeof data41=="object"&&!Array.isArray(data41)){if(data41.audience===void 0){const err159={instancePath:instancePath+"/publisher/audienceRoutes/"+i5,schemaPath:"#/properties/publisher/oneOf/1/properties/audienceRoutes/items/required",keyword:"required",params:{missingProperty:"audience"},message:"must have required property 'audience'"};if(vErrors===null){vErrors=[err159]}else{vErrors.push(err159)}errors++}if(data41.subject===void 0){const err160={instancePath:instancePath+"/publisher/audienceRoutes/"+i5,schemaPath:"#/properties/publisher/oneOf/1/properties/audienceRoutes/items/required",keyword:"required",params:{missingProperty:"subject"},message:"must have required property 'subject'"};if(vErrors===null){vErrors=[err160]}else{vErrors.push(err160)}errors++}if(data41.expectedStream===void 0){const err161={instancePath:instancePath+"/publisher/audienceRoutes/"+i5,schemaPath:"#/properties/publisher/oneOf/1/properties/audienceRoutes/items/required",keyword:"required",params:{missingProperty:"expectedStream"},message:"must have required property 'expectedStream'"};if(vErrors===null){vErrors=[err161]}else{vErrors.push(err161)}errors++}for(const key6 in data41){if(!(key6==="audience"||key6==="subject"||key6==="expectedStream")){const err162={instancePath:instancePath+"/publisher/audienceRoutes/"+i5,schemaPath:"#/properties/publisher/oneOf/1/properties/audienceRoutes/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key6},message:"must NOT have additional properties"};if(vErrors===null){vErrors=[err162]}else{vErrors.push(err162)}errors++}}if(data41.audience!==void 0){let data42=data41.audience;if(typeof data42==="string"){if(func1(data42)>256){const err163={instancePath:instancePath+"/publisher/audienceRoutes/"+i5+"/audience",schemaPath:"#/$defs/ref/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err163]}else{vErrors.push(err163)}errors++}if(func1(data42)<1){const err164={instancePath:instancePath+"/publisher/audienceRoutes/"+i5+"/audience",schemaPath:"#/$defs/ref/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err164]}else{vErrors.push(err164)}errors++}if(!pattern119.test(data42)){const err165={instancePath:instancePath+"/publisher/audienceRoutes/"+i5+"/audience",schemaPath:"#/$defs/ref/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u0020\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u0020\\u007f]+$"'};if(vErrors===null){vErrors=[err165]}else{vErrors.push(err165)}errors++}}else{const err166={instancePath:instancePath+"/publisher/audienceRoutes/"+i5+"/audience",schemaPath:"#/$defs/ref/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err166]}else{vErrors.push(err166)}errors++}}if(data41.subject!==void 0){let data43=data41.subject;if(typeof data43==="string"){if(func1(data43)>256){const err167={instancePath:instancePath+"/publisher/audienceRoutes/"+i5+"/subject",schemaPath:"#/$defs/ref/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err167]}else{vErrors.push(err167)}errors++}if(func1(data43)<1){const err168={instancePath:instancePath+"/publisher/audienceRoutes/"+i5+"/subject",schemaPath:"#/$defs/ref/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err168]}else{vErrors.push(err168)}errors++}if(!pattern119.test(data43)){const err169={instancePath:instancePath+"/publisher/audienceRoutes/"+i5+"/subject",schemaPath:"#/$defs/ref/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u0020\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u0020\\u007f]+$"'};if(vErrors===null){vErrors=[err169]}else{vErrors.push(err169)}errors++}}else{const err170={instancePath:instancePath+"/publisher/audienceRoutes/"+i5+"/subject",schemaPath:"#/$defs/ref/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err170]}else{vErrors.push(err170)}errors++}}if(data41.expectedStream!==void 0){let data44=data41.expectedStream;if(typeof data44==="string"){if(func1(data44)>128){const err171={instancePath:instancePath+"/publisher/audienceRoutes/"+i5+"/expectedStream",schemaPath:"#/$defs/name/maxLength",keyword:"maxLength",params:{limit:128},message:"must NOT have more than 128 characters"};if(vErrors===null){vErrors=[err171]}else{vErrors.push(err171)}errors++}if(func1(data44)<1){const err172={instancePath:instancePath+"/publisher/audienceRoutes/"+i5+"/expectedStream",schemaPath:"#/$defs/name/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err172]}else{vErrors.push(err172)}errors++}if(!pattern129.test(data44)){const err173={instancePath:instancePath+"/publisher/audienceRoutes/"+i5+"/expectedStream",schemaPath:"#/$defs/name/pattern",keyword:"pattern",params:{pattern:"^[A-Za-z0-9_-]+$"},message:'must match pattern "^[A-Za-z0-9_-]+$"'};if(vErrors===null){vErrors=[err173]}else{vErrors.push(err173)}errors++}}else{const err174={instancePath:instancePath+"/publisher/audienceRoutes/"+i5+"/expectedStream",schemaPath:"#/$defs/name/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err174]}else{vErrors.push(err174)}errors++}}}else{const err175={instancePath:instancePath+"/publisher/audienceRoutes/"+i5,schemaPath:"#/properties/publisher/oneOf/1/properties/audienceRoutes/items/type",keyword:"type",params:{type:"object"},message:"must be object"};if(vErrors===null){vErrors=[err175]}else{vErrors.push(err175)}errors++}}}else{const err176={instancePath:instancePath+"/publisher/audienceRoutes",schemaPath:"#/properties/publisher/oneOf/1/properties/audienceRoutes/type",keyword:"type",params:{type:"array"},message:"must be array"};if(vErrors===null){vErrors=[err176]}else{vErrors.push(err176)}errors++}}}else{const err177={instancePath:instancePath+"/publisher",schemaPath:"#/properties/publisher/oneOf/1/type",keyword:"type",params:{type:"object"},message:"must be object"};if(vErrors===null){vErrors=[err177]}else{vErrors.push(err177)}errors++}var _valid1=_errs101===errors;if(_valid1&&valid34){valid34=false;passing1=[passing1,1]}else{if(_valid1){valid34=true;passing1=1}}if(!valid34){const err178={instancePath:instancePath+"/publisher",schemaPath:"#/properties/publisher/oneOf",keyword:"oneOf",params:{passingSchemas:passing1},message:"must match exactly one schema in oneOf"};if(vErrors===null){vErrors=[err178]}else{vErrors.push(err178)}errors++}else{errors=_errs98;if(vErrors!==null){if(_errs98){vErrors.length=_errs98}else{vErrors=null}}}}if(data.consumer!==void 0){let data45=data.consumer;const _errs125=errors;let valid44=false;let passing2=null;const _errs126=errors;if(data45!==null){const err179={instancePath:instancePath+"/consumer",schemaPath:"#/properties/consumer/oneOf/0/type",keyword:"type",params:{type:"null"},message:"must be null"};if(vErrors===null){vErrors=[err179]}else{vErrors.push(err179)}errors++}var _valid2=_errs126===errors;if(_valid2){valid44=true;passing2=0}const _errs128=errors;if(data45&&typeof data45=="object"&&!Array.isArray(data45)){if(data45.consumerRef===void 0){const err180={instancePath:instancePath+"/consumer",schemaPath:"#/properties/consumer/oneOf/1/required",keyword:"required",params:{missingProperty:"consumerRef"},message:"must have required property 'consumerRef'"};if(vErrors===null){vErrors=[err180]}else{vErrors.push(err180)}errors++}if(data45.stream===void 0){const err181={instancePath:instancePath+"/consumer",schemaPath:"#/properties/consumer/oneOf/1/required",keyword:"required",params:{missingProperty:"stream"},message:"must have required property 'stream'"};if(vErrors===null){vErrors=[err181]}else{vErrors.push(err181)}errors++}if(data45.durableName===void 0){const err182={instancePath:instancePath+"/consumer",schemaPath:"#/properties/consumer/oneOf/1/required",keyword:"required",params:{missingProperty:"durableName"},message:"must have required property 'durableName'"};if(vErrors===null){vErrors=[err182]}else{vErrors.push(err182)}errors++}if(data45.subject===void 0){const err183={instancePath:instancePath+"/consumer",schemaPath:"#/properties/consumer/oneOf/1/required",keyword:"required",params:{missingProperty:"subject"},message:"must have required property 'subject'"};if(vErrors===null){vErrors=[err183]}else{vErrors.push(err183)}errors++}if(data45.batchSize===void 0){const err184={instancePath:instancePath+"/consumer",schemaPath:"#/properties/consumer/oneOf/1/required",keyword:"required",params:{missingProperty:"batchSize"},message:"must have required property 'batchSize'"};if(vErrors===null){vErrors=[err184]}else{vErrors.push(err184)}errors++}if(data45.fetchExpiresMs===void 0){const err185={instancePath:instancePath+"/consumer",schemaPath:"#/properties/consumer/oneOf/1/required",keyword:"required",params:{missingProperty:"fetchExpiresMs"},message:"must have required property 'fetchExpiresMs'"};if(vErrors===null){vErrors=[err185]}else{vErrors.push(err185)}errors++}for(const key7 in data45){if(!(key7==="consumerRef"||key7==="stream"||key7==="durableName"||key7==="subject"||key7==="batchSize"||key7==="fetchExpiresMs"||key7==="additionalBindings")){const err186={instancePath:instancePath+"/consumer",schemaPath:"#/properties/consumer/oneOf/1/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key7},message:"must NOT have additional properties"};if(vErrors===null){vErrors=[err186]}else{vErrors.push(err186)}errors++}}if(data45.consumerRef!==void 0){let data46=data45.consumerRef;if(typeof data46==="string"){if(func1(data46)>256){const err187={instancePath:instancePath+"/consumer/consumerRef",schemaPath:"#/$defs/ref/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err187]}else{vErrors.push(err187)}errors++}if(func1(data46)<1){const err188={instancePath:instancePath+"/consumer/consumerRef",schemaPath:"#/$defs/ref/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err188]}else{vErrors.push(err188)}errors++}if(!pattern119.test(data46)){const err189={instancePath:instancePath+"/consumer/consumerRef",schemaPath:"#/$defs/ref/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u0020\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u0020\\u007f]+$"'};if(vErrors===null){vErrors=[err189]}else{vErrors.push(err189)}errors++}}else{const err190={instancePath:instancePath+"/consumer/consumerRef",schemaPath:"#/$defs/ref/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err190]}else{vErrors.push(err190)}errors++}}if(data45.stream!==void 0){let data47=data45.stream;if(typeof data47==="string"){if(func1(data47)>128){const err191={instancePath:instancePath+"/consumer/stream",schemaPath:"#/$defs/name/maxLength",keyword:"maxLength",params:{limit:128},message:"must NOT have more than 128 characters"};if(vErrors===null){vErrors=[err191]}else{vErrors.push(err191)}errors++}if(func1(data47)<1){const err192={instancePath:instancePath+"/consumer/stream",schemaPath:"#/$defs/name/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err192]}else{vErrors.push(err192)}errors++}if(!pattern129.test(data47)){const err193={instancePath:instancePath+"/consumer/stream",schemaPath:"#/$defs/name/pattern",keyword:"pattern",params:{pattern:"^[A-Za-z0-9_-]+$"},message:'must match pattern "^[A-Za-z0-9_-]+$"'};if(vErrors===null){vErrors=[err193]}else{vErrors.push(err193)}errors++}}else{const err194={instancePath:instancePath+"/consumer/stream",schemaPath:"#/$defs/name/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err194]}else{vErrors.push(err194)}errors++}}if(data45.durableName!==void 0){let data48=data45.durableName;if(typeof data48==="string"){if(func1(data48)>128){const err195={instancePath:instancePath+"/consumer/durableName",schemaPath:"#/$defs/name/maxLength",keyword:"maxLength",params:{limit:128},message:"must NOT have more than 128 characters"};if(vErrors===null){vErrors=[err195]}else{vErrors.push(err195)}errors++}if(func1(data48)<1){const err196={instancePath:instancePath+"/consumer/durableName",schemaPath:"#/$defs/name/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err196]}else{vErrors.push(err196)}errors++}if(!pattern129.test(data48)){const err197={instancePath:instancePath+"/consumer/durableName",schemaPath:"#/$defs/name/pattern",keyword:"pattern",params:{pattern:"^[A-Za-z0-9_-]+$"},message:'must match pattern "^[A-Za-z0-9_-]+$"'};if(vErrors===null){vErrors=[err197]}else{vErrors.push(err197)}errors++}}else{const err198={instancePath:instancePath+"/consumer/durableName",schemaPath:"#/$defs/name/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err198]}else{vErrors.push(err198)}errors++}}if(data45.subject!==void 0){let data49=data45.subject;if(typeof data49==="string"){if(func1(data49)>256){const err199={instancePath:instancePath+"/consumer/subject",schemaPath:"#/$defs/ref/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err199]}else{vErrors.push(err199)}errors++}if(func1(data49)<1){const err200={instancePath:instancePath+"/consumer/subject",schemaPath:"#/$defs/ref/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err200]}else{vErrors.push(err200)}errors++}if(!pattern119.test(data49)){const err201={instancePath:instancePath+"/consumer/subject",schemaPath:"#/$defs/ref/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u0020\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u0020\\u007f]+$"'};if(vErrors===null){vErrors=[err201]}else{vErrors.push(err201)}errors++}}else{const err202={instancePath:instancePath+"/consumer/subject",schemaPath:"#/$defs/ref/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err202]}else{vErrors.push(err202)}errors++}}if(data45.batchSize!==void 0){let data50=data45.batchSize;if(!(typeof data50=="number"&&!(data50%1)&&!isNaN(data50)&&isFinite(data50))){const err203={instancePath:instancePath+"/consumer/batchSize",schemaPath:"#/properties/consumer/oneOf/1/properties/batchSize/type",keyword:"type",params:{type:"integer"},message:"must be integer"};if(vErrors===null){vErrors=[err203]}else{vErrors.push(err203)}errors++}if(typeof data50=="number"&&isFinite(data50)){if(data50>100||isNaN(data50)){const err204={instancePath:instancePath+"/consumer/batchSize",schemaPath:"#/properties/consumer/oneOf/1/properties/batchSize/maximum",keyword:"maximum",params:{comparison:"<=",limit:100},message:"must be <= 100"};if(vErrors===null){vErrors=[err204]}else{vErrors.push(err204)}errors++}if(data50<1||isNaN(data50)){const err205={instancePath:instancePath+"/consumer/batchSize",schemaPath:"#/properties/consumer/oneOf/1/properties/batchSize/minimum",keyword:"minimum",params:{comparison:">=",limit:1},message:"must be >= 1"};if(vErrors===null){vErrors=[err205]}else{vErrors.push(err205)}errors++}}}if(data45.fetchExpiresMs!==void 0){let data51=data45.fetchExpiresMs;if(!(typeof data51=="number"&&!(data51%1)&&!isNaN(data51)&&isFinite(data51))){const err206={instancePath:instancePath+"/consumer/fetchExpiresMs",schemaPath:"#/properties/consumer/oneOf/1/properties/fetchExpiresMs/type",keyword:"type",params:{type:"integer"},message:"must be integer"};if(vErrors===null){vErrors=[err206]}else{vErrors.push(err206)}errors++}if(typeof data51=="number"&&isFinite(data51)){if(data51>3e4||isNaN(data51)){const err207={instancePath:instancePath+"/consumer/fetchExpiresMs",schemaPath:"#/properties/consumer/oneOf/1/properties/fetchExpiresMs/maximum",keyword:"maximum",params:{comparison:"<=",limit:3e4},message:"must be <= 30000"};if(vErrors===null){vErrors=[err207]}else{vErrors.push(err207)}errors++}if(data51<1e3||isNaN(data51)){const err208={instancePath:instancePath+"/consumer/fetchExpiresMs",schemaPath:"#/properties/consumer/oneOf/1/properties/fetchExpiresMs/minimum",keyword:"minimum",params:{comparison:">=",limit:1e3},message:"must be >= 1000"};if(vErrors===null){vErrors=[err208]}else{vErrors.push(err208)}errors++}}}if(data45.additionalBindings!==void 0){let data52=data45.additionalBindings;if(Array.isArray(data52)){if(data52.length>7){const err209={instancePath:instancePath+"/consumer/additionalBindings",schemaPath:"#/properties/consumer/oneOf/1/properties/additionalBindings/maxItems",keyword:"maxItems",params:{limit:7},message:"must NOT have more than 7 items"};if(vErrors===null){vErrors=[err209]}else{vErrors.push(err209)}errors++}if(data52.length<1){const err210={instancePath:instancePath+"/consumer/additionalBindings",schemaPath:"#/properties/consumer/oneOf/1/properties/additionalBindings/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};if(vErrors===null){vErrors=[err210]}else{vErrors.push(err210)}errors++}const len4=data52.length;for(let i6=0;i6<len4;i6++){let data53=data52[i6];if(data53&&typeof data53=="object"&&!Array.isArray(data53)){if(data53.stream===void 0){const err211={instancePath:instancePath+"/consumer/additionalBindings/"+i6,schemaPath:"#/properties/consumer/oneOf/1/properties/additionalBindings/items/required",keyword:"required",params:{missingProperty:"stream"},message:"must have required property 'stream'"};if(vErrors===null){vErrors=[err211]}else{vErrors.push(err211)}errors++}if(data53.durableName===void 0){const err212={instancePath:instancePath+"/consumer/additionalBindings/"+i6,schemaPath:"#/properties/consumer/oneOf/1/properties/additionalBindings/items/required",keyword:"required",params:{missingProperty:"durableName"},message:"must have required property 'durableName'"};if(vErrors===null){vErrors=[err212]}else{vErrors.push(err212)}errors++}if(data53.subject===void 0){const err213={instancePath:instancePath+"/consumer/additionalBindings/"+i6,schemaPath:"#/properties/consumer/oneOf/1/properties/additionalBindings/items/required",keyword:"required",params:{missingProperty:"subject"},message:"must have required property 'subject'"};if(vErrors===null){vErrors=[err213]}else{vErrors.push(err213)}errors++}for(const key8 in data53){if(!(key8==="stream"||key8==="durableName"||key8==="subject")){const err214={instancePath:instancePath+"/consumer/additionalBindings/"+i6,schemaPath:"#/properties/consumer/oneOf/1/properties/additionalBindings/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key8},message:"must NOT have additional properties"};if(vErrors===null){vErrors=[err214]}else{vErrors.push(err214)}errors++}}if(data53.stream!==void 0){let data54=data53.stream;if(typeof data54==="string"){if(func1(data54)>128){const err215={instancePath:instancePath+"/consumer/additionalBindings/"+i6+"/stream",schemaPath:"#/$defs/name/maxLength",keyword:"maxLength",params:{limit:128},message:"must NOT have more than 128 characters"};if(vErrors===null){vErrors=[err215]}else{vErrors.push(err215)}errors++}if(func1(data54)<1){const err216={instancePath:instancePath+"/consumer/additionalBindings/"+i6+"/stream",schemaPath:"#/$defs/name/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err216]}else{vErrors.push(err216)}errors++}if(!pattern129.test(data54)){const err217={instancePath:instancePath+"/consumer/additionalBindings/"+i6+"/stream",schemaPath:"#/$defs/name/pattern",keyword:"pattern",params:{pattern:"^[A-Za-z0-9_-]+$"},message:'must match pattern "^[A-Za-z0-9_-]+$"'};if(vErrors===null){vErrors=[err217]}else{vErrors.push(err217)}errors++}}else{const err218={instancePath:instancePath+"/consumer/additionalBindings/"+i6+"/stream",schemaPath:"#/$defs/name/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err218]}else{vErrors.push(err218)}errors++}}if(data53.durableName!==void 0){let data55=data53.durableName;if(typeof data55==="string"){if(func1(data55)>128){const err219={instancePath:instancePath+"/consumer/additionalBindings/"+i6+"/durableName",schemaPath:"#/$defs/name/maxLength",keyword:"maxLength",params:{limit:128},message:"must NOT have more than 128 characters"};if(vErrors===null){vErrors=[err219]}else{vErrors.push(err219)}errors++}if(func1(data55)<1){const err220={instancePath:instancePath+"/consumer/additionalBindings/"+i6+"/durableName",schemaPath:"#/$defs/name/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err220]}else{vErrors.push(err220)}errors++}if(!pattern129.test(data55)){const err221={instancePath:instancePath+"/consumer/additionalBindings/"+i6+"/durableName",schemaPath:"#/$defs/name/pattern",keyword:"pattern",params:{pattern:"^[A-Za-z0-9_-]+$"},message:'must match pattern "^[A-Za-z0-9_-]+$"'};if(vErrors===null){vErrors=[err221]}else{vErrors.push(err221)}errors++}}else{const err222={instancePath:instancePath+"/consumer/additionalBindings/"+i6+"/durableName",schemaPath:"#/$defs/name/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err222]}else{vErrors.push(err222)}errors++}}if(data53.subject!==void 0){let data56=data53.subject;if(typeof data56==="string"){if(func1(data56)>256){const err223={instancePath:instancePath+"/consumer/additionalBindings/"+i6+"/subject",schemaPath:"#/$defs/ref/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err223]}else{vErrors.push(err223)}errors++}if(func1(data56)<1){const err224={instancePath:instancePath+"/consumer/additionalBindings/"+i6+"/subject",schemaPath:"#/$defs/ref/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err224]}else{vErrors.push(err224)}errors++}if(!pattern119.test(data56)){const err225={instancePath:instancePath+"/consumer/additionalBindings/"+i6+"/subject",schemaPath:"#/$defs/ref/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u0020\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u0020\\u007f]+$"'};if(vErrors===null){vErrors=[err225]}else{vErrors.push(err225)}errors++}}else{const err226={instancePath:instancePath+"/consumer/additionalBindings/"+i6+"/subject",schemaPath:"#/$defs/ref/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err226]}else{vErrors.push(err226)}errors++}}}else{const err227={instancePath:instancePath+"/consumer/additionalBindings/"+i6,schemaPath:"#/properties/consumer/oneOf/1/properties/additionalBindings/items/type",keyword:"type",params:{type:"object"},message:"must be object"};if(vErrors===null){vErrors=[err227]}else{vErrors.push(err227)}errors++}}}else{const err228={instancePath:instancePath+"/consumer/additionalBindings",schemaPath:"#/properties/consumer/oneOf/1/properties/additionalBindings/type",keyword:"type",params:{type:"array"},message:"must be array"};if(vErrors===null){vErrors=[err228]}else{vErrors.push(err228)}errors++}}}else{const err229={instancePath:instancePath+"/consumer",schemaPath:"#/properties/consumer/oneOf/1/type",keyword:"type",params:{type:"object"},message:"must be object"};if(vErrors===null){vErrors=[err229]}else{vErrors.push(err229)}errors++}var _valid2=_errs128===errors;if(_valid2&&valid44){valid44=false;passing2=[passing2,1]}else{if(_valid2){valid44=true;passing2=1}}if(!valid44){const err230={instancePath:instancePath+"/consumer",schemaPath:"#/properties/consumer/oneOf",keyword:"oneOf",params:{passingSchemas:passing2},message:"must match exactly one schema in oneOf"};if(vErrors===null){vErrors=[err230]}else{vErrors.push(err230)}errors++}else{errors=_errs125;if(vErrors!==null){if(_errs125){vErrors.length=_errs125}else{vErrors=null}}}}}else{const err231={instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};if(vErrors===null){vErrors=[err231]}else{vErrors.push(err231)}errors++}validate41.errors=vErrors;return errors===0}validate41.evaluated={props:true,dynamicProps:false,dynamicItems:false};var publicJwksSnapshot=validate42;var schema86={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://eventsdk.dev/schemas/v1/public-jwks-snapshot.schema.json",title:"PublicJwksSnapshot",type:"object",additionalProperties:false,required:["schemaVersion","issuer","jwksUri","fetchedAt","validUntil","jwks"],properties:{schemaVersion:{const:1},issuer:{type:"string",format:"uri",maxLength:2048},jwksUri:{type:"string",format:"uri",maxLength:2048},fetchedAt:{type:"string",format:"date-time"},validUntil:{type:"string",format:"date-time"},jwks:{type:"object",additionalProperties:false,required:["keys"],properties:{keys:{type:"array",minItems:1,maxItems:32,items:{oneOf:[{type:"object",additionalProperties:false,properties:{kty:{const:"RSA"},kid:{type:"string",minLength:1,maxLength:256},alg:{enum:["RS256","PS256"]},use:{const:"sig"},key_ops:{type:"array",minItems:1,maxItems:1,items:{const:"verify"}},ext:{type:"boolean"},x5c:{type:"array",maxItems:8,items:{type:"string",maxLength:8192}},x5t:{type:"string",pattern:"^[A-Za-z0-9_-]+$",maxLength:8192},"x5t#S256":{type:"string",pattern:"^[A-Za-z0-9_-]+$",maxLength:8192},n:{type:"string",pattern:"^[A-Za-z0-9_-]+$",maxLength:8192},e:{type:"string",pattern:"^[A-Za-z0-9_-]+$",maxLength:8192}},required:["kty","kid","n","e"]},{type:"object",additionalProperties:false,properties:{kty:{const:"EC"},kid:{type:"string",minLength:1,maxLength:256},alg:{enum:["ES256"]},use:{const:"sig"},key_ops:{type:"array",minItems:1,maxItems:1,items:{const:"verify"}},ext:{type:"boolean"},x5c:{type:"array",maxItems:8,items:{type:"string",maxLength:8192}},x5t:{type:"string",pattern:"^[A-Za-z0-9_-]+$",maxLength:8192},"x5t#S256":{type:"string",pattern:"^[A-Za-z0-9_-]+$",maxLength:8192},crv:{const:"P-256"},x:{type:"string",pattern:"^[A-Za-z0-9_-]+$",maxLength:8192},y:{type:"string",pattern:"^[A-Za-z0-9_-]+$",maxLength:8192}},required:["kty","kid","crv","x","y"]},{type:"object",additionalProperties:false,properties:{kty:{const:"OKP"},kid:{type:"string",minLength:1,maxLength:256},alg:{enum:["EdDSA"]},use:{const:"sig"},key_ops:{type:"array",minItems:1,maxItems:1,items:{const:"verify"}},ext:{type:"boolean"},x5c:{type:"array",maxItems:8,items:{type:"string",maxLength:8192}},x5t:{type:"string",pattern:"^[A-Za-z0-9_-]+$",maxLength:8192},"x5t#S256":{type:"string",pattern:"^[A-Za-z0-9_-]+$",maxLength:8192},crv:{const:"Ed25519"},x:{type:"string",pattern:"^[A-Za-z0-9_-]+$",maxLength:8192}},required:["kty","kid","crv","x"]}]}}}}}};function validate42(data,{instancePath="",parentData,parentDataProperty,rootData=data,dynamicAnchors={}}={}){let vErrors=null;let errors=0;const evaluated0=validate42.evaluated;if(evaluated0.dynamicProps){evaluated0.props=void 0}if(evaluated0.dynamicItems){evaluated0.items=void 0}if(data&&typeof data=="object"&&!Array.isArray(data)){if(data.schemaVersion===void 0){const err0={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"schemaVersion"},message:"must have required property 'schemaVersion'"};if(vErrors===null){vErrors=[err0]}else{vErrors.push(err0)}errors++}if(data.issuer===void 0){const err1={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"issuer"},message:"must have required property 'issuer'"};if(vErrors===null){vErrors=[err1]}else{vErrors.push(err1)}errors++}if(data.jwksUri===void 0){const err2={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"jwksUri"},message:"must have required property 'jwksUri'"};if(vErrors===null){vErrors=[err2]}else{vErrors.push(err2)}errors++}if(data.fetchedAt===void 0){const err3={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"fetchedAt"},message:"must have required property 'fetchedAt'"};if(vErrors===null){vErrors=[err3]}else{vErrors.push(err3)}errors++}if(data.validUntil===void 0){const err4={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"validUntil"},message:"must have required property 'validUntil'"};if(vErrors===null){vErrors=[err4]}else{vErrors.push(err4)}errors++}if(data.jwks===void 0){const err5={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"jwks"},message:"must have required property 'jwks'"};if(vErrors===null){vErrors=[err5]}else{vErrors.push(err5)}errors++}for(const key0 in data){if(!(key0==="schemaVersion"||key0==="issuer"||key0==="jwksUri"||key0==="fetchedAt"||key0==="validUntil"||key0==="jwks")){const err6={instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key0},message:"must NOT have additional properties"};if(vErrors===null){vErrors=[err6]}else{vErrors.push(err6)}errors++}}if(data.schemaVersion!==void 0){if(1!==data.schemaVersion){const err7={instancePath:instancePath+"/schemaVersion",schemaPath:"#/properties/schemaVersion/const",keyword:"const",params:{allowedValue:1},message:"must be equal to constant"};if(vErrors===null){vErrors=[err7]}else{vErrors.push(err7)}errors++}}if(data.issuer!==void 0){let data1=data.issuer;if(typeof data1==="string"){if(func1(data1)>2048){const err8={instancePath:instancePath+"/issuer",schemaPath:"#/properties/issuer/maxLength",keyword:"maxLength",params:{limit:2048},message:"must NOT have more than 2048 characters"};if(vErrors===null){vErrors=[err8]}else{vErrors.push(err8)}errors++}if(!formats0(data1)){const err9={instancePath:instancePath+"/issuer",schemaPath:"#/properties/issuer/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};if(vErrors===null){vErrors=[err9]}else{vErrors.push(err9)}errors++}}else{const err10={instancePath:instancePath+"/issuer",schemaPath:"#/properties/issuer/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err10]}else{vErrors.push(err10)}errors++}}if(data.jwksUri!==void 0){let data2=data.jwksUri;if(typeof data2==="string"){if(func1(data2)>2048){const err11={instancePath:instancePath+"/jwksUri",schemaPath:"#/properties/jwksUri/maxLength",keyword:"maxLength",params:{limit:2048},message:"must NOT have more than 2048 characters"};if(vErrors===null){vErrors=[err11]}else{vErrors.push(err11)}errors++}if(!formats0(data2)){const err12={instancePath:instancePath+"/jwksUri",schemaPath:"#/properties/jwksUri/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};if(vErrors===null){vErrors=[err12]}else{vErrors.push(err12)}errors++}}else{const err13={instancePath:instancePath+"/jwksUri",schemaPath:"#/properties/jwksUri/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err13]}else{vErrors.push(err13)}errors++}}if(data.fetchedAt!==void 0){let data3=data.fetchedAt;if(typeof data3==="string"){if(!formats2.validate(data3)){const err14={instancePath:instancePath+"/fetchedAt",schemaPath:"#/properties/fetchedAt/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};if(vErrors===null){vErrors=[err14]}else{vErrors.push(err14)}errors++}}else{const err15={instancePath:instancePath+"/fetchedAt",schemaPath:"#/properties/fetchedAt/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err15]}else{vErrors.push(err15)}errors++}}if(data.validUntil!==void 0){let data4=data.validUntil;if(typeof data4==="string"){if(!formats2.validate(data4)){const err16={instancePath:instancePath+"/validUntil",schemaPath:"#/properties/validUntil/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};if(vErrors===null){vErrors=[err16]}else{vErrors.push(err16)}errors++}}else{const err17={instancePath:instancePath+"/validUntil",schemaPath:"#/properties/validUntil/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err17]}else{vErrors.push(err17)}errors++}}if(data.jwks!==void 0){let data5=data.jwks;if(data5&&typeof data5=="object"&&!Array.isArray(data5)){if(data5.keys===void 0){const err18={instancePath:instancePath+"/jwks",schemaPath:"#/properties/jwks/required",keyword:"required",params:{missingProperty:"keys"},message:"must have required property 'keys'"};if(vErrors===null){vErrors=[err18]}else{vErrors.push(err18)}errors++}for(const key1 in data5){if(!(key1==="keys")){const err19={instancePath:instancePath+"/jwks",schemaPath:"#/properties/jwks/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key1},message:"must NOT have additional properties"};if(vErrors===null){vErrors=[err19]}else{vErrors.push(err19)}errors++}}if(data5.keys!==void 0){let data6=data5.keys;if(Array.isArray(data6)){if(data6.length>32){const err20={instancePath:instancePath+"/jwks/keys",schemaPath:"#/properties/jwks/properties/keys/maxItems",keyword:"maxItems",params:{limit:32},message:"must NOT have more than 32 items"};if(vErrors===null){vErrors=[err20]}else{vErrors.push(err20)}errors++}if(data6.length<1){const err21={instancePath:instancePath+"/jwks/keys",schemaPath:"#/properties/jwks/properties/keys/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};if(vErrors===null){vErrors=[err21]}else{vErrors.push(err21)}errors++}const len0=data6.length;for(let i0=0;i0<len0;i0++){let data7=data6[i0];const _errs17=errors;let valid4=false;let passing0=null;const _errs18=errors;if(data7&&typeof data7=="object"&&!Array.isArray(data7)){if(data7.kty===void 0){const err22={instancePath:instancePath+"/jwks/keys/"+i0,schemaPath:"#/properties/jwks/properties/keys/items/oneOf/0/required",keyword:"required",params:{missingProperty:"kty"},message:"must have required property 'kty'"};if(vErrors===null){vErrors=[err22]}else{vErrors.push(err22)}errors++}if(data7.kid===void 0){const err23={instancePath:instancePath+"/jwks/keys/"+i0,schemaPath:"#/properties/jwks/properties/keys/items/oneOf/0/required",keyword:"required",params:{missingProperty:"kid"},message:"must have required property 'kid'"};if(vErrors===null){vErrors=[err23]}else{vErrors.push(err23)}errors++}if(data7.n===void 0){const err24={instancePath:instancePath+"/jwks/keys/"+i0,schemaPath:"#/properties/jwks/properties/keys/items/oneOf/0/required",keyword:"required",params:{missingProperty:"n"},message:"must have required property 'n'"};if(vErrors===null){vErrors=[err24]}else{vErrors.push(err24)}errors++}if(data7.e===void 0){const err25={instancePath:instancePath+"/jwks/keys/"+i0,schemaPath:"#/properties/jwks/properties/keys/items/oneOf/0/required",keyword:"required",params:{missingProperty:"e"},message:"must have required property 'e'"};if(vErrors===null){vErrors=[err25]}else{vErrors.push(err25)}errors++}for(const key2 in data7){if(!func11.call(schema86.properties.jwks.properties.keys.items.oneOf[0].properties,key2)){const err26={instancePath:instancePath+"/jwks/keys/"+i0,schemaPath:"#/properties/jwks/properties/keys/items/oneOf/0/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key2},message:"must NOT have additional properties"};if(vErrors===null){vErrors=[err26]}else{vErrors.push(err26)}errors++}}if(data7.kty!==void 0){if("RSA"!==data7.kty){const err27={instancePath:instancePath+"/jwks/keys/"+i0+"/kty",schemaPath:"#/properties/jwks/properties/keys/items/oneOf/0/properties/kty/const",keyword:"const",params:{allowedValue:"RSA"},message:"must be equal to constant"};if(vErrors===null){vErrors=[err27]}else{vErrors.push(err27)}errors++}}if(data7.kid!==void 0){let data9=data7.kid;if(typeof data9==="string"){if(func1(data9)>256){const err28={instancePath:instancePath+"/jwks/keys/"+i0+"/kid",schemaPath:"#/properties/jwks/properties/keys/items/oneOf/0/properties/kid/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err28]}else{vErrors.push(err28)}errors++}if(func1(data9)<1){const err29={instancePath:instancePath+"/jwks/keys/"+i0+"/kid",schemaPath:"#/properties/jwks/properties/keys/items/oneOf/0/properties/kid/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err29]}else{vErrors.push(err29)}errors++}}else{const err30={instancePath:instancePath+"/jwks/keys/"+i0+"/kid",schemaPath:"#/properties/jwks/properties/keys/items/oneOf/0/properties/kid/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err30]}else{vErrors.push(err30)}errors++}}if(data7.alg!==void 0){let data10=data7.alg;if(!(data10==="RS256"||data10==="PS256")){const err31={instancePath:instancePath+"/jwks/keys/"+i0+"/alg",schemaPath:"#/properties/jwks/properties/keys/items/oneOf/0/properties/alg/enum",keyword:"enum",params:{allowedValues:schema86.properties.jwks.properties.keys.items.oneOf[0].properties.alg.enum},message:"must be equal to one of the allowed values"};if(vErrors===null){vErrors=[err31]}else{vErrors.push(err31)}errors++}}if(data7.use!==void 0){if("sig"!==data7.use){const err32={instancePath:instancePath+"/jwks/keys/"+i0+"/use",schemaPath:"#/properties/jwks/properties/keys/items/oneOf/0/properties/use/const",keyword:"const",params:{allowedValue:"sig"},message:"must be equal to constant"};if(vErrors===null){vErrors=[err32]}else{vErrors.push(err32)}errors++}}if(data7.key_ops!==void 0){let data12=data7.key_ops;if(Array.isArray(data12)){if(data12.length>1){const err33={instancePath:instancePath+"/jwks/keys/"+i0+"/key_ops",schemaPath:"#/properties/jwks/properties/keys/items/oneOf/0/properties/key_ops/maxItems",keyword:"maxItems",params:{limit:1},message:"must NOT have more than 1 items"};if(vErrors===null){vErrors=[err33]}else{vErrors.push(err33)}errors++}if(data12.length<1){const err34={instancePath:instancePath+"/jwks/keys/"+i0+"/key_ops",schemaPath:"#/properties/jwks/properties/keys/items/oneOf/0/properties/key_ops/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};if(vErrors===null){vErrors=[err34]}else{vErrors.push(err34)}errors++}const len1=data12.length;for(let i1=0;i1<len1;i1++){if("verify"!==data12[i1]){const err35={instancePath:instancePath+"/jwks/keys/"+i0+"/key_ops/"+i1,schemaPath:"#/properties/jwks/properties/keys/items/oneOf/0/properties/key_ops/items/const",keyword:"const",params:{allowedValue:"verify"},message:"must be equal to constant"};if(vErrors===null){vErrors=[err35]}else{vErrors.push(err35)}errors++}}}else{const err36={instancePath:instancePath+"/jwks/keys/"+i0+"/key_ops",schemaPath:"#/properties/jwks/properties/keys/items/oneOf/0/properties/key_ops/type",keyword:"type",params:{type:"array"},message:"must be array"};if(vErrors===null){vErrors=[err36]}else{vErrors.push(err36)}errors++}}if(data7.ext!==void 0){if(typeof data7.ext!=="boolean"){const err37={instancePath:instancePath+"/jwks/keys/"+i0+"/ext",schemaPath:"#/properties/jwks/properties/keys/items/oneOf/0/properties/ext/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};if(vErrors===null){vErrors=[err37]}else{vErrors.push(err37)}errors++}}if(data7.x5c!==void 0){let data15=data7.x5c;if(Array.isArray(data15)){if(data15.length>8){const err38={instancePath:instancePath+"/jwks/keys/"+i0+"/x5c",schemaPath:"#/properties/jwks/properties/keys/items/oneOf/0/properties/x5c/maxItems",keyword:"maxItems",params:{limit:8},message:"must NOT have more than 8 items"};if(vErrors===null){vErrors=[err38]}else{vErrors.push(err38)}errors++}const len2=data15.length;for(let i2=0;i2<len2;i2++){let data16=data15[i2];if(typeof data16==="string"){if(func1(data16)>8192){const err39={instancePath:instancePath+"/jwks/keys/"+i0+"/x5c/"+i2,schemaPath:"#/properties/jwks/properties/keys/items/oneOf/0/properties/x5c/items/maxLength",keyword:"maxLength",params:{limit:8192},message:"must NOT have more than 8192 characters"};if(vErrors===null){vErrors=[err39]}else{vErrors.push(err39)}errors++}}else{const err40={instancePath:instancePath+"/jwks/keys/"+i0+"/x5c/"+i2,schemaPath:"#/properties/jwks/properties/keys/items/oneOf/0/properties/x5c/items/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err40]}else{vErrors.push(err40)}errors++}}}else{const err41={instancePath:instancePath+"/jwks/keys/"+i0+"/x5c",schemaPath:"#/properties/jwks/properties/keys/items/oneOf/0/properties/x5c/type",keyword:"type",params:{type:"array"},message:"must be array"};if(vErrors===null){vErrors=[err41]}else{vErrors.push(err41)}errors++}}if(data7.x5t!==void 0){let data17=data7.x5t;if(typeof data17==="string"){if(func1(data17)>8192){const err42={instancePath:instancePath+"/jwks/keys/"+i0+"/x5t",schemaPath:"#/properties/jwks/properties/keys/items/oneOf/0/properties/x5t/maxLength",keyword:"maxLength",params:{limit:8192},message:"must NOT have more than 8192 characters"};if(vErrors===null){vErrors=[err42]}else{vErrors.push(err42)}errors++}if(!pattern129.test(data17)){const err43={instancePath:instancePath+"/jwks/keys/"+i0+"/x5t",schemaPath:"#/properties/jwks/properties/keys/items/oneOf/0/properties/x5t/pattern",keyword:"pattern",params:{pattern:"^[A-Za-z0-9_-]+$"},message:'must match pattern "^[A-Za-z0-9_-]+$"'};if(vErrors===null){vErrors=[err43]}else{vErrors.push(err43)}errors++}}else{const err44={instancePath:instancePath+"/jwks/keys/"+i0+"/x5t",schemaPath:"#/properties/jwks/properties/keys/items/oneOf/0/properties/x5t/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err44]}else{vErrors.push(err44)}errors++}}if(data7["x5t#S256"]!==void 0){let data18=data7["x5t#S256"];if(typeof data18==="string"){if(func1(data18)>8192){const err45={instancePath:instancePath+"/jwks/keys/"+i0+"/x5t#S256",schemaPath:"#/properties/jwks/properties/keys/items/oneOf/0/properties/x5t%23S256/maxLength",keyword:"maxLength",params:{limit:8192},message:"must NOT have more than 8192 characters"};if(vErrors===null){vErrors=[err45]}else{vErrors.push(err45)}errors++}if(!pattern129.test(data18)){const err46={instancePath:instancePath+"/jwks/keys/"+i0+"/x5t#S256",schemaPath:"#/properties/jwks/properties/keys/items/oneOf/0/properties/x5t%23S256/pattern",keyword:"pattern",params:{pattern:"^[A-Za-z0-9_-]+$"},message:'must match pattern "^[A-Za-z0-9_-]+$"'};if(vErrors===null){vErrors=[err46]}else{vErrors.push(err46)}errors++}}else{const err47={instancePath:instancePath+"/jwks/keys/"+i0+"/x5t#S256",schemaPath:"#/properties/jwks/properties/keys/items/oneOf/0/properties/x5t%23S256/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err47]}else{vErrors.push(err47)}errors++}}if(data7.n!==void 0){let data19=data7.n;if(typeof data19==="string"){if(func1(data19)>8192){const err48={instancePath:instancePath+"/jwks/keys/"+i0+"/n",schemaPath:"#/properties/jwks/properties/keys/items/oneOf/0/properties/n/maxLength",keyword:"maxLength",params:{limit:8192},message:"must NOT have more than 8192 characters"};if(vErrors===null){vErrors=[err48]}else{vErrors.push(err48)}errors++}if(!pattern129.test(data19)){const err49={instancePath:instancePath+"/jwks/keys/"+i0+"/n",schemaPath:"#/properties/jwks/properties/keys/items/oneOf/0/properties/n/pattern",keyword:"pattern",params:{pattern:"^[A-Za-z0-9_-]+$"},message:'must match pattern "^[A-Za-z0-9_-]+$"'};if(vErrors===null){vErrors=[err49]}else{vErrors.push(err49)}errors++}}else{const err50={instancePath:instancePath+"/jwks/keys/"+i0+"/n",schemaPath:"#/properties/jwks/properties/keys/items/oneOf/0/properties/n/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err50]}else{vErrors.push(err50)}errors++}}if(data7.e!==void 0){let data20=data7.e;if(typeof data20==="string"){if(func1(data20)>8192){const err51={instancePath:instancePath+"/jwks/keys/"+i0+"/e",schemaPath:"#/properties/jwks/properties/keys/items/oneOf/0/properties/e/maxLength",keyword:"maxLength",params:{limit:8192},message:"must NOT have more than 8192 characters"};if(vErrors===null){vErrors=[err51]}else{vErrors.push(err51)}errors++}if(!pattern129.test(data20)){const err52={instancePath:instancePath+"/jwks/keys/"+i0+"/e",schemaPath:"#/properties/jwks/properties/keys/items/oneOf/0/properties/e/pattern",keyword:"pattern",params:{pattern:"^[A-Za-z0-9_-]+$"},message:'must match pattern "^[A-Za-z0-9_-]+$"'};if(vErrors===null){vErrors=[err52]}else{vErrors.push(err52)}errors++}}else{const err53={instancePath:instancePath+"/jwks/keys/"+i0+"/e",schemaPath:"#/properties/jwks/properties/keys/items/oneOf/0/properties/e/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err53]}else{vErrors.push(err53)}errors++}}}else{const err54={instancePath:instancePath+"/jwks/keys/"+i0,schemaPath:"#/properties/jwks/properties/keys/items/oneOf/0/type",keyword:"type",params:{type:"object"},message:"must be object"};if(vErrors===null){vErrors=[err54]}else{vErrors.push(err54)}errors++}var _valid0=_errs18===errors;if(_valid0){valid4=true;passing0=0;var props0=true}const _errs43=errors;if(data7&&typeof data7=="object"&&!Array.isArray(data7)){if(data7.kty===void 0){const err55={instancePath:instancePath+"/jwks/keys/"+i0,schemaPath:"#/properties/jwks/properties/keys/items/oneOf/1/required",keyword:"required",params:{missingProperty:"kty"},message:"must have required property 'kty'"};if(vErrors===null){vErrors=[err55]}else{vErrors.push(err55)}errors++}if(data7.kid===void 0){const err56={instancePath:instancePath+"/jwks/keys/"+i0,schemaPath:"#/properties/jwks/properties/keys/items/oneOf/1/required",keyword:"required",params:{missingProperty:"kid"},message:"must have required property 'kid'"};if(vErrors===null){vErrors=[err56]}else{vErrors.push(err56)}errors++}if(data7.crv===void 0){const err57={instancePath:instancePath+"/jwks/keys/"+i0,schemaPath:"#/properties/jwks/properties/keys/items/oneOf/1/required",keyword:"required",params:{missingProperty:"crv"},message:"must have required property 'crv'"};if(vErrors===null){vErrors=[err57]}else{vErrors.push(err57)}errors++}if(data7.x===void 0){const err58={instancePath:instancePath+"/jwks/keys/"+i0,schemaPath:"#/properties/jwks/properties/keys/items/oneOf/1/required",keyword:"required",params:{missingProperty:"x"},message:"must have required property 'x'"};if(vErrors===null){vErrors=[err58]}else{vErrors.push(err58)}errors++}if(data7.y===void 0){const err59={instancePath:instancePath+"/jwks/keys/"+i0,schemaPath:"#/properties/jwks/properties/keys/items/oneOf/1/required",keyword:"required",params:{missingProperty:"y"},message:"must have required property 'y'"};if(vErrors===null){vErrors=[err59]}else{vErrors.push(err59)}errors++}for(const key3 in data7){if(!func11.call(schema86.properties.jwks.properties.keys.items.oneOf[1].properties,key3)){const err60={instancePath:instancePath+"/jwks/keys/"+i0,schemaPath:"#/properties/jwks/properties/keys/items/oneOf/1/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key3},message:"must NOT have additional properties"};if(vErrors===null){vErrors=[err60]}else{vErrors.push(err60)}errors++}}if(data7.kty!==void 0){if("EC"!==data7.kty){const err61={instancePath:instancePath+"/jwks/keys/"+i0+"/kty",schemaPath:"#/properties/jwks/properties/keys/items/oneOf/1/properties/kty/const",keyword:"const",params:{allowedValue:"EC"},message:"must be equal to constant"};if(vErrors===null){vErrors=[err61]}else{vErrors.push(err61)}errors++}}if(data7.kid!==void 0){let data22=data7.kid;if(typeof data22==="string"){if(func1(data22)>256){const err62={instancePath:instancePath+"/jwks/keys/"+i0+"/kid",schemaPath:"#/properties/jwks/properties/keys/items/oneOf/1/properties/kid/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err62]}else{vErrors.push(err62)}errors++}if(func1(data22)<1){const err63={instancePath:instancePath+"/jwks/keys/"+i0+"/kid",schemaPath:"#/properties/jwks/properties/keys/items/oneOf/1/properties/kid/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err63]}else{vErrors.push(err63)}errors++}}else{const err64={instancePath:instancePath+"/jwks/keys/"+i0+"/kid",schemaPath:"#/properties/jwks/properties/keys/items/oneOf/1/properties/kid/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err64]}else{vErrors.push(err64)}errors++}}if(data7.alg!==void 0){if(!(data7.alg==="ES256")){const err65={instancePath:instancePath+"/jwks/keys/"+i0+"/alg",schemaPath:"#/properties/jwks/properties/keys/items/oneOf/1/properties/alg/enum",keyword:"enum",params:{allowedValues:schema86.properties.jwks.properties.keys.items.oneOf[1].properties.alg.enum},message:"must be equal to one of the allowed values"};if(vErrors===null){vErrors=[err65]}else{vErrors.push(err65)}errors++}}if(data7.use!==void 0){if("sig"!==data7.use){const err66={instancePath:instancePath+"/jwks/keys/"+i0+"/use",schemaPath:"#/properties/jwks/properties/keys/items/oneOf/1/properties/use/const",keyword:"const",params:{allowedValue:"sig"},message:"must be equal to constant"};if(vErrors===null){vErrors=[err66]}else{vErrors.push(err66)}errors++}}if(data7.key_ops!==void 0){let data25=data7.key_ops;if(Array.isArray(data25)){if(data25.length>1){const err67={instancePath:instancePath+"/jwks/keys/"+i0+"/key_ops",schemaPath:"#/properties/jwks/properties/keys/items/oneOf/1/properties/key_ops/maxItems",keyword:"maxItems",params:{limit:1},message:"must NOT have more than 1 items"};if(vErrors===null){vErrors=[err67]}else{vErrors.push(err67)}errors++}if(data25.length<1){const err68={instancePath:instancePath+"/jwks/keys/"+i0+"/key_ops",schemaPath:"#/properties/jwks/properties/keys/items/oneOf/1/properties/key_ops/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};if(vErrors===null){vErrors=[err68]}else{vErrors.push(err68)}errors++}const len3=data25.length;for(let i3=0;i3<len3;i3++){if("verify"!==data25[i3]){const err69={instancePath:instancePath+"/jwks/keys/"+i0+"/key_ops/"+i3,schemaPath:"#/properties/jwks/properties/keys/items/oneOf/1/properties/key_ops/items/const",keyword:"const",params:{allowedValue:"verify"},message:"must be equal to constant"};if(vErrors===null){vErrors=[err69]}else{vErrors.push(err69)}errors++}}}else{const err70={instancePath:instancePath+"/jwks/keys/"+i0+"/key_ops",schemaPath:"#/properties/jwks/properties/keys/items/oneOf/1/properties/key_ops/type",keyword:"type",params:{type:"array"},message:"must be array"};if(vErrors===null){vErrors=[err70]}else{vErrors.push(err70)}errors++}}if(data7.ext!==void 0){if(typeof data7.ext!=="boolean"){const err71={instancePath:instancePath+"/jwks/keys/"+i0+"/ext",schemaPath:"#/properties/jwks/properties/keys/items/oneOf/1/properties/ext/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};if(vErrors===null){vErrors=[err71]}else{vErrors.push(err71)}errors++}}if(data7.x5c!==void 0){let data28=data7.x5c;if(Array.isArray(data28)){if(data28.length>8){const err72={instancePath:instancePath+"/jwks/keys/"+i0+"/x5c",schemaPath:"#/properties/jwks/properties/keys/items/oneOf/1/properties/x5c/maxItems",keyword:"maxItems",params:{limit:8},message:"must NOT have more than 8 items"};if(vErrors===null){vErrors=[err72]}else{vErrors.push(err72)}errors++}const len4=data28.length;for(let i4=0;i4<len4;i4++){let data29=data28[i4];if(typeof data29==="string"){if(func1(data29)>8192){const err73={instancePath:instancePath+"/jwks/keys/"+i0+"/x5c/"+i4,schemaPath:"#/properties/jwks/properties/keys/items/oneOf/1/properties/x5c/items/maxLength",keyword:"maxLength",params:{limit:8192},message:"must NOT have more than 8192 characters"};if(vErrors===null){vErrors=[err73]}else{vErrors.push(err73)}errors++}}else{const err74={instancePath:instancePath+"/jwks/keys/"+i0+"/x5c/"+i4,schemaPath:"#/properties/jwks/properties/keys/items/oneOf/1/properties/x5c/items/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err74]}else{vErrors.push(err74)}errors++}}}else{const err75={instancePath:instancePath+"/jwks/keys/"+i0+"/x5c",schemaPath:"#/properties/jwks/properties/keys/items/oneOf/1/properties/x5c/type",keyword:"type",params:{type:"array"},message:"must be array"};if(vErrors===null){vErrors=[err75]}else{vErrors.push(err75)}errors++}}if(data7.x5t!==void 0){let data30=data7.x5t;if(typeof data30==="string"){if(func1(data30)>8192){const err76={instancePath:instancePath+"/jwks/keys/"+i0+"/x5t",schemaPath:"#/properties/jwks/properties/keys/items/oneOf/1/properties/x5t/maxLength",keyword:"maxLength",params:{limit:8192},message:"must NOT have more than 8192 characters"};if(vErrors===null){vErrors=[err76]}else{vErrors.push(err76)}errors++}if(!pattern129.test(data30)){const err77={instancePath:instancePath+"/jwks/keys/"+i0+"/x5t",schemaPath:"#/properties/jwks/properties/keys/items/oneOf/1/properties/x5t/pattern",keyword:"pattern",params:{pattern:"^[A-Za-z0-9_-]+$"},message:'must match pattern "^[A-Za-z0-9_-]+$"'};if(vErrors===null){vErrors=[err77]}else{vErrors.push(err77)}errors++}}else{const err78={instancePath:instancePath+"/jwks/keys/"+i0+"/x5t",schemaPath:"#/properties/jwks/properties/keys/items/oneOf/1/properties/x5t/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err78]}else{vErrors.push(err78)}errors++}}if(data7["x5t#S256"]!==void 0){let data31=data7["x5t#S256"];if(typeof data31==="string"){if(func1(data31)>8192){const err79={instancePath:instancePath+"/jwks/keys/"+i0+"/x5t#S256",schemaPath:"#/properties/jwks/properties/keys/items/oneOf/1/properties/x5t%23S256/maxLength",keyword:"maxLength",params:{limit:8192},message:"must NOT have more than 8192 characters"};if(vErrors===null){vErrors=[err79]}else{vErrors.push(err79)}errors++}if(!pattern129.test(data31)){const err80={instancePath:instancePath+"/jwks/keys/"+i0+"/x5t#S256",schemaPath:"#/properties/jwks/properties/keys/items/oneOf/1/properties/x5t%23S256/pattern",keyword:"pattern",params:{pattern:"^[A-Za-z0-9_-]+$"},message:'must match pattern "^[A-Za-z0-9_-]+$"'};if(vErrors===null){vErrors=[err80]}else{vErrors.push(err80)}errors++}}else{const err81={instancePath:instancePath+"/jwks/keys/"+i0+"/x5t#S256",schemaPath:"#/properties/jwks/properties/keys/items/oneOf/1/properties/x5t%23S256/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err81]}else{vErrors.push(err81)}errors++}}if(data7.crv!==void 0){if("P-256"!==data7.crv){const err82={instancePath:instancePath+"/jwks/keys/"+i0+"/crv",schemaPath:"#/properties/jwks/properties/keys/items/oneOf/1/properties/crv/const",keyword:"const",params:{allowedValue:"P-256"},message:"must be equal to constant"};if(vErrors===null){vErrors=[err82]}else{vErrors.push(err82)}errors++}}if(data7.x!==void 0){let data33=data7.x;if(typeof data33==="string"){if(func1(data33)>8192){const err83={instancePath:instancePath+"/jwks/keys/"+i0+"/x",schemaPath:"#/properties/jwks/properties/keys/items/oneOf/1/properties/x/maxLength",keyword:"maxLength",params:{limit:8192},message:"must NOT have more than 8192 characters"};if(vErrors===null){vErrors=[err83]}else{vErrors.push(err83)}errors++}if(!pattern129.test(data33)){const err84={instancePath:instancePath+"/jwks/keys/"+i0+"/x",schemaPath:"#/properties/jwks/properties/keys/items/oneOf/1/properties/x/pattern",keyword:"pattern",params:{pattern:"^[A-Za-z0-9_-]+$"},message:'must match pattern "^[A-Za-z0-9_-]+$"'};if(vErrors===null){vErrors=[err84]}else{vErrors.push(err84)}errors++}}else{const err85={instancePath:instancePath+"/jwks/keys/"+i0+"/x",schemaPath:"#/properties/jwks/properties/keys/items/oneOf/1/properties/x/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err85]}else{vErrors.push(err85)}errors++}}if(data7.y!==void 0){let data34=data7.y;if(typeof data34==="string"){if(func1(data34)>8192){const err86={instancePath:instancePath+"/jwks/keys/"+i0+"/y",schemaPath:"#/properties/jwks/properties/keys/items/oneOf/1/properties/y/maxLength",keyword:"maxLength",params:{limit:8192},message:"must NOT have more than 8192 characters"};if(vErrors===null){vErrors=[err86]}else{vErrors.push(err86)}errors++}if(!pattern129.test(data34)){const err87={instancePath:instancePath+"/jwks/keys/"+i0+"/y",schemaPath:"#/properties/jwks/properties/keys/items/oneOf/1/properties/y/pattern",keyword:"pattern",params:{pattern:"^[A-Za-z0-9_-]+$"},message:'must match pattern "^[A-Za-z0-9_-]+$"'};if(vErrors===null){vErrors=[err87]}else{vErrors.push(err87)}errors++}}else{const err88={instancePath:instancePath+"/jwks/keys/"+i0+"/y",schemaPath:"#/properties/jwks/properties/keys/items/oneOf/1/properties/y/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err88]}else{vErrors.push(err88)}errors++}}}else{const err89={instancePath:instancePath+"/jwks/keys/"+i0,schemaPath:"#/properties/jwks/properties/keys/items/oneOf/1/type",keyword:"type",params:{type:"object"},message:"must be object"};if(vErrors===null){vErrors=[err89]}else{vErrors.push(err89)}errors++}var _valid0=_errs43===errors;if(_valid0&&valid4){valid4=false;passing0=[passing0,1]}else{if(_valid0){valid4=true;passing0=1;if(props0!==true){props0=true}}const _errs69=errors;if(data7&&typeof data7=="object"&&!Array.isArray(data7)){if(data7.kty===void 0){const err90={instancePath:instancePath+"/jwks/keys/"+i0,schemaPath:"#/properties/jwks/properties/keys/items/oneOf/2/required",keyword:"required",params:{missingProperty:"kty"},message:"must have required property 'kty'"};if(vErrors===null){vErrors=[err90]}else{vErrors.push(err90)}errors++}if(data7.kid===void 0){const err91={instancePath:instancePath+"/jwks/keys/"+i0,schemaPath:"#/properties/jwks/properties/keys/items/oneOf/2/required",keyword:"required",params:{missingProperty:"kid"},message:"must have required property 'kid'"};if(vErrors===null){vErrors=[err91]}else{vErrors.push(err91)}errors++}if(data7.crv===void 0){const err92={instancePath:instancePath+"/jwks/keys/"+i0,schemaPath:"#/properties/jwks/properties/keys/items/oneOf/2/required",keyword:"required",params:{missingProperty:"crv"},message:"must have required property 'crv'"};if(vErrors===null){vErrors=[err92]}else{vErrors.push(err92)}errors++}if(data7.x===void 0){const err93={instancePath:instancePath+"/jwks/keys/"+i0,schemaPath:"#/properties/jwks/properties/keys/items/oneOf/2/required",keyword:"required",params:{missingProperty:"x"},message:"must have required property 'x'"};if(vErrors===null){vErrors=[err93]}else{vErrors.push(err93)}errors++}for(const key4 in data7){if(!func11.call(schema86.properties.jwks.properties.keys.items.oneOf[2].properties,key4)){const err94={instancePath:instancePath+"/jwks/keys/"+i0,schemaPath:"#/properties/jwks/properties/keys/items/oneOf/2/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key4},message:"must NOT have additional properties"};if(vErrors===null){vErrors=[err94]}else{vErrors.push(err94)}errors++}}if(data7.kty!==void 0){if("OKP"!==data7.kty){const err95={instancePath:instancePath+"/jwks/keys/"+i0+"/kty",schemaPath:"#/properties/jwks/properties/keys/items/oneOf/2/properties/kty/const",keyword:"const",params:{allowedValue:"OKP"},message:"must be equal to constant"};if(vErrors===null){vErrors=[err95]}else{vErrors.push(err95)}errors++}}if(data7.kid!==void 0){let data36=data7.kid;if(typeof data36==="string"){if(func1(data36)>256){const err96={instancePath:instancePath+"/jwks/keys/"+i0+"/kid",schemaPath:"#/properties/jwks/properties/keys/items/oneOf/2/properties/kid/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err96]}else{vErrors.push(err96)}errors++}if(func1(data36)<1){const err97={instancePath:instancePath+"/jwks/keys/"+i0+"/kid",schemaPath:"#/properties/jwks/properties/keys/items/oneOf/2/properties/kid/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err97]}else{vErrors.push(err97)}errors++}}else{const err98={instancePath:instancePath+"/jwks/keys/"+i0+"/kid",schemaPath:"#/properties/jwks/properties/keys/items/oneOf/2/properties/kid/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err98]}else{vErrors.push(err98)}errors++}}if(data7.alg!==void 0){if(!(data7.alg==="EdDSA")){const err99={instancePath:instancePath+"/jwks/keys/"+i0+"/alg",schemaPath:"#/properties/jwks/properties/keys/items/oneOf/2/properties/alg/enum",keyword:"enum",params:{allowedValues:schema86.properties.jwks.properties.keys.items.oneOf[2].properties.alg.enum},message:"must be equal to one of the allowed values"};if(vErrors===null){vErrors=[err99]}else{vErrors.push(err99)}errors++}}if(data7.use!==void 0){if("sig"!==data7.use){const err100={instancePath:instancePath+"/jwks/keys/"+i0+"/use",schemaPath:"#/properties/jwks/properties/keys/items/oneOf/2/properties/use/const",keyword:"const",params:{allowedValue:"sig"},message:"must be equal to constant"};if(vErrors===null){vErrors=[err100]}else{vErrors.push(err100)}errors++}}if(data7.key_ops!==void 0){let data39=data7.key_ops;if(Array.isArray(data39)){if(data39.length>1){const err101={instancePath:instancePath+"/jwks/keys/"+i0+"/key_ops",schemaPath:"#/properties/jwks/properties/keys/items/oneOf/2/properties/key_ops/maxItems",keyword:"maxItems",params:{limit:1},message:"must NOT have more than 1 items"};if(vErrors===null){vErrors=[err101]}else{vErrors.push(err101)}errors++}if(data39.length<1){const err102={instancePath:instancePath+"/jwks/keys/"+i0+"/key_ops",schemaPath:"#/properties/jwks/properties/keys/items/oneOf/2/properties/key_ops/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};if(vErrors===null){vErrors=[err102]}else{vErrors.push(err102)}errors++}const len5=data39.length;for(let i5=0;i5<len5;i5++){if("verify"!==data39[i5]){const err103={instancePath:instancePath+"/jwks/keys/"+i0+"/key_ops/"+i5,schemaPath:"#/properties/jwks/properties/keys/items/oneOf/2/properties/key_ops/items/const",keyword:"const",params:{allowedValue:"verify"},message:"must be equal to constant"};if(vErrors===null){vErrors=[err103]}else{vErrors.push(err103)}errors++}}}else{const err104={instancePath:instancePath+"/jwks/keys/"+i0+"/key_ops",schemaPath:"#/properties/jwks/properties/keys/items/oneOf/2/properties/key_ops/type",keyword:"type",params:{type:"array"},message:"must be array"};if(vErrors===null){vErrors=[err104]}else{vErrors.push(err104)}errors++}}if(data7.ext!==void 0){if(typeof data7.ext!=="boolean"){const err105={instancePath:instancePath+"/jwks/keys/"+i0+"/ext",schemaPath:"#/properties/jwks/properties/keys/items/oneOf/2/properties/ext/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};if(vErrors===null){vErrors=[err105]}else{vErrors.push(err105)}errors++}}if(data7.x5c!==void 0){let data42=data7.x5c;if(Array.isArray(data42)){if(data42.length>8){const err106={instancePath:instancePath+"/jwks/keys/"+i0+"/x5c",schemaPath:"#/properties/jwks/properties/keys/items/oneOf/2/properties/x5c/maxItems",keyword:"maxItems",params:{limit:8},message:"must NOT have more than 8 items"};if(vErrors===null){vErrors=[err106]}else{vErrors.push(err106)}errors++}const len6=data42.length;for(let i6=0;i6<len6;i6++){let data43=data42[i6];if(typeof data43==="string"){if(func1(data43)>8192){const err107={instancePath:instancePath+"/jwks/keys/"+i0+"/x5c/"+i6,schemaPath:"#/properties/jwks/properties/keys/items/oneOf/2/properties/x5c/items/maxLength",keyword:"maxLength",params:{limit:8192},message:"must NOT have more than 8192 characters"};if(vErrors===null){vErrors=[err107]}else{vErrors.push(err107)}errors++}}else{const err108={instancePath:instancePath+"/jwks/keys/"+i0+"/x5c/"+i6,schemaPath:"#/properties/jwks/properties/keys/items/oneOf/2/properties/x5c/items/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err108]}else{vErrors.push(err108)}errors++}}}else{const err109={instancePath:instancePath+"/jwks/keys/"+i0+"/x5c",schemaPath:"#/properties/jwks/properties/keys/items/oneOf/2/properties/x5c/type",keyword:"type",params:{type:"array"},message:"must be array"};if(vErrors===null){vErrors=[err109]}else{vErrors.push(err109)}errors++}}if(data7.x5t!==void 0){let data44=data7.x5t;if(typeof data44==="string"){if(func1(data44)>8192){const err110={instancePath:instancePath+"/jwks/keys/"+i0+"/x5t",schemaPath:"#/properties/jwks/properties/keys/items/oneOf/2/properties/x5t/maxLength",keyword:"maxLength",params:{limit:8192},message:"must NOT have more than 8192 characters"};if(vErrors===null){vErrors=[err110]}else{vErrors.push(err110)}errors++}if(!pattern129.test(data44)){const err111={instancePath:instancePath+"/jwks/keys/"+i0+"/x5t",schemaPath:"#/properties/jwks/properties/keys/items/oneOf/2/properties/x5t/pattern",keyword:"pattern",params:{pattern:"^[A-Za-z0-9_-]+$"},message:'must match pattern "^[A-Za-z0-9_-]+$"'};if(vErrors===null){vErrors=[err111]}else{vErrors.push(err111)}errors++}}else{const err112={instancePath:instancePath+"/jwks/keys/"+i0+"/x5t",schemaPath:"#/properties/jwks/properties/keys/items/oneOf/2/properties/x5t/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err112]}else{vErrors.push(err112)}errors++}}if(data7["x5t#S256"]!==void 0){let data45=data7["x5t#S256"];if(typeof data45==="string"){if(func1(data45)>8192){const err113={instancePath:instancePath+"/jwks/keys/"+i0+"/x5t#S256",schemaPath:"#/properties/jwks/properties/keys/items/oneOf/2/properties/x5t%23S256/maxLength",keyword:"maxLength",params:{limit:8192},message:"must NOT have more than 8192 characters"};if(vErrors===null){vErrors=[err113]}else{vErrors.push(err113)}errors++}if(!pattern129.test(data45)){const err114={instancePath:instancePath+"/jwks/keys/"+i0+"/x5t#S256",schemaPath:"#/properties/jwks/properties/keys/items/oneOf/2/properties/x5t%23S256/pattern",keyword:"pattern",params:{pattern:"^[A-Za-z0-9_-]+$"},message:'must match pattern "^[A-Za-z0-9_-]+$"'};if(vErrors===null){vErrors=[err114]}else{vErrors.push(err114)}errors++}}else{const err115={instancePath:instancePath+"/jwks/keys/"+i0+"/x5t#S256",schemaPath:"#/properties/jwks/properties/keys/items/oneOf/2/properties/x5t%23S256/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err115]}else{vErrors.push(err115)}errors++}}if(data7.crv!==void 0){if("Ed25519"!==data7.crv){const err116={instancePath:instancePath+"/jwks/keys/"+i0+"/crv",schemaPath:"#/properties/jwks/properties/keys/items/oneOf/2/properties/crv/const",keyword:"const",params:{allowedValue:"Ed25519"},message:"must be equal to constant"};if(vErrors===null){vErrors=[err116]}else{vErrors.push(err116)}errors++}}if(data7.x!==void 0){let data47=data7.x;if(typeof data47==="string"){if(func1(data47)>8192){const err117={instancePath:instancePath+"/jwks/keys/"+i0+"/x",schemaPath:"#/properties/jwks/properties/keys/items/oneOf/2/properties/x/maxLength",keyword:"maxLength",params:{limit:8192},message:"must NOT have more than 8192 characters"};if(vErrors===null){vErrors=[err117]}else{vErrors.push(err117)}errors++}if(!pattern129.test(data47)){const err118={instancePath:instancePath+"/jwks/keys/"+i0+"/x",schemaPath:"#/properties/jwks/properties/keys/items/oneOf/2/properties/x/pattern",keyword:"pattern",params:{pattern:"^[A-Za-z0-9_-]+$"},message:'must match pattern "^[A-Za-z0-9_-]+$"'};if(vErrors===null){vErrors=[err118]}else{vErrors.push(err118)}errors++}}else{const err119={instancePath:instancePath+"/jwks/keys/"+i0+"/x",schemaPath:"#/properties/jwks/properties/keys/items/oneOf/2/properties/x/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err119]}else{vErrors.push(err119)}errors++}}}else{const err120={instancePath:instancePath+"/jwks/keys/"+i0,schemaPath:"#/properties/jwks/properties/keys/items/oneOf/2/type",keyword:"type",params:{type:"object"},message:"must be object"};if(vErrors===null){vErrors=[err120]}else{vErrors.push(err120)}errors++}var _valid0=_errs69===errors;if(_valid0&&valid4){valid4=false;passing0=[passing0,2]}else{if(_valid0){valid4=true;passing0=2;if(props0!==true){props0=true}}}}if(!valid4){const err121={instancePath:instancePath+"/jwks/keys/"+i0,schemaPath:"#/properties/jwks/properties/keys/items/oneOf",keyword:"oneOf",params:{passingSchemas:passing0},message:"must match exactly one schema in oneOf"};if(vErrors===null){vErrors=[err121]}else{vErrors.push(err121)}errors++}else{errors=_errs17;if(vErrors!==null){if(_errs17){vErrors.length=_errs17}else{vErrors=null}}}}}else{const err122={instancePath:instancePath+"/jwks/keys",schemaPath:"#/properties/jwks/properties/keys/type",keyword:"type",params:{type:"array"},message:"must be array"};if(vErrors===null){vErrors=[err122]}else{vErrors.push(err122)}errors++}}}else{const err123={instancePath:instancePath+"/jwks",schemaPath:"#/properties/jwks/type",keyword:"type",params:{type:"object"},message:"must be object"};if(vErrors===null){vErrors=[err123]}else{vErrors.push(err123)}errors++}}}else{const err124={instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};if(vErrors===null){vErrors=[err124]}else{vErrors.push(err124)}errors++}validate42.errors=vErrors;return errors===0}validate42.evaluated={props:true,dynamicProps:false,dynamicItems:false};var exchangeRegistration=validate43;var schema87={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://eventsdk.dev/schemas/v1/exchange-registration.schema.json",title:"ExchangeRegistration",type:"object",additionalProperties:false,required:["schemaVersion","requestId","expectedRevision","source","target","grant","status"],properties:{schemaVersion:{const:1},requestId:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u0020\\u007f]+$"},expectedRevision:{type:["integer","null"],minimum:1,maximum:2147483647},source:{type:"object",additionalProperties:false,required:["source","serviceRef","tenantRef","issuer","subject"],properties:{source:{type:"string",format:"uri",maxLength:2048},serviceRef:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u0020\\u007f]+$"},tenantRef:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u0020\\u007f]+$"},issuer:{type:"string",format:"uri",maxLength:2048},subject:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u0020\\u007f]+$"}}},target:{$ref:"tenant-context.schema.json"},grant:{type:"object",additionalProperties:false,required:["grantRef","version","eventType","consumerRef"],properties:{grantRef:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u0020\\u007f]+$"},version:{type:"integer",minimum:1,maximum:2147483647},eventType:{type:"string",pattern:"^[A-Za-z0-9][A-Za-z0-9._-]*\\.v[1-9][0-9]*$",maxLength:256},consumerRef:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u0020\\u007f]+$"}}},status:{enum:["ACTIVE","REVOKED"]}}};var pattern158=new RegExp("^[A-Za-z0-9][A-Za-z0-9._-]*\\.v[1-9][0-9]*$","u");function validate43(data,{instancePath="",parentData,parentDataProperty,rootData=data,dynamicAnchors={}}={}){let vErrors=null;let errors=0;const evaluated0=validate43.evaluated;if(evaluated0.dynamicProps){evaluated0.props=void 0}if(evaluated0.dynamicItems){evaluated0.items=void 0}if(data&&typeof data=="object"&&!Array.isArray(data)){if(data.schemaVersion===void 0){const err0={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"schemaVersion"},message:"must have required property 'schemaVersion'"};if(vErrors===null){vErrors=[err0]}else{vErrors.push(err0)}errors++}if(data.requestId===void 0){const err1={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"requestId"},message:"must have required property 'requestId'"};if(vErrors===null){vErrors=[err1]}else{vErrors.push(err1)}errors++}if(data.expectedRevision===void 0){const err2={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"expectedRevision"},message:"must have required property 'expectedRevision'"};if(vErrors===null){vErrors=[err2]}else{vErrors.push(err2)}errors++}if(data.source===void 0){const err3={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"source"},message:"must have required property 'source'"};if(vErrors===null){vErrors=[err3]}else{vErrors.push(err3)}errors++}if(data.target===void 0){const err4={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"target"},message:"must have required property 'target'"};if(vErrors===null){vErrors=[err4]}else{vErrors.push(err4)}errors++}if(data.grant===void 0){const err5={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"grant"},message:"must have required property 'grant'"};if(vErrors===null){vErrors=[err5]}else{vErrors.push(err5)}errors++}if(data.status===void 0){const err6={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"status"},message:"must have required property 'status'"};if(vErrors===null){vErrors=[err6]}else{vErrors.push(err6)}errors++}for(const key0 in data){if(!(key0==="schemaVersion"||key0==="requestId"||key0==="expectedRevision"||key0==="source"||key0==="target"||key0==="grant"||key0==="status")){const err7={instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key0},message:"must NOT have additional properties"};if(vErrors===null){vErrors=[err7]}else{vErrors.push(err7)}errors++}}if(data.schemaVersion!==void 0){if(1!==data.schemaVersion){const err8={instancePath:instancePath+"/schemaVersion",schemaPath:"#/properties/schemaVersion/const",keyword:"const",params:{allowedValue:1},message:"must be equal to constant"};if(vErrors===null){vErrors=[err8]}else{vErrors.push(err8)}errors++}}if(data.requestId!==void 0){let data1=data.requestId;if(typeof data1==="string"){if(func1(data1)>256){const err9={instancePath:instancePath+"/requestId",schemaPath:"#/properties/requestId/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err9]}else{vErrors.push(err9)}errors++}if(func1(data1)<1){const err10={instancePath:instancePath+"/requestId",schemaPath:"#/properties/requestId/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err10]}else{vErrors.push(err10)}errors++}if(!pattern119.test(data1)){const err11={instancePath:instancePath+"/requestId",schemaPath:"#/properties/requestId/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u0020\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u0020\\u007f]+$"'};if(vErrors===null){vErrors=[err11]}else{vErrors.push(err11)}errors++}}else{const err12={instancePath:instancePath+"/requestId",schemaPath:"#/properties/requestId/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err12]}else{vErrors.push(err12)}errors++}}if(data.expectedRevision!==void 0){let data2=data.expectedRevision;if(!(typeof data2=="number"&&!(data2%1)&&!isNaN(data2)&&isFinite(data2))&&data2!==null){const err13={instancePath:instancePath+"/expectedRevision",schemaPath:"#/properties/expectedRevision/type",keyword:"type",params:{type:schema87.properties.expectedRevision.type},message:"must be integer,null"};if(vErrors===null){vErrors=[err13]}else{vErrors.push(err13)}errors++}if(typeof data2=="number"&&isFinite(data2)){if(data2>2147483647||isNaN(data2)){const err14={instancePath:instancePath+"/expectedRevision",schemaPath:"#/properties/expectedRevision/maximum",keyword:"maximum",params:{comparison:"<=",limit:2147483647},message:"must be <= 2147483647"};if(vErrors===null){vErrors=[err14]}else{vErrors.push(err14)}errors++}if(data2<1||isNaN(data2)){const err15={instancePath:instancePath+"/expectedRevision",schemaPath:"#/properties/expectedRevision/minimum",keyword:"minimum",params:{comparison:">=",limit:1},message:"must be >= 1"};if(vErrors===null){vErrors=[err15]}else{vErrors.push(err15)}errors++}}}if(data.source!==void 0){let data3=data.source;if(data3&&typeof data3=="object"&&!Array.isArray(data3)){if(data3.source===void 0){const err16={instancePath:instancePath+"/source",schemaPath:"#/properties/source/required",keyword:"required",params:{missingProperty:"source"},message:"must have required property 'source'"};if(vErrors===null){vErrors=[err16]}else{vErrors.push(err16)}errors++}if(data3.serviceRef===void 0){const err17={instancePath:instancePath+"/source",schemaPath:"#/properties/source/required",keyword:"required",params:{missingProperty:"serviceRef"},message:"must have required property 'serviceRef'"};if(vErrors===null){vErrors=[err17]}else{vErrors.push(err17)}errors++}if(data3.tenantRef===void 0){const err18={instancePath:instancePath+"/source",schemaPath:"#/properties/source/required",keyword:"required",params:{missingProperty:"tenantRef"},message:"must have required property 'tenantRef'"};if(vErrors===null){vErrors=[err18]}else{vErrors.push(err18)}errors++}if(data3.issuer===void 0){const err19={instancePath:instancePath+"/source",schemaPath:"#/properties/source/required",keyword:"required",params:{missingProperty:"issuer"},message:"must have required property 'issuer'"};if(vErrors===null){vErrors=[err19]}else{vErrors.push(err19)}errors++}if(data3.subject===void 0){const err20={instancePath:instancePath+"/source",schemaPath:"#/properties/source/required",keyword:"required",params:{missingProperty:"subject"},message:"must have required property 'subject'"};if(vErrors===null){vErrors=[err20]}else{vErrors.push(err20)}errors++}for(const key1 in data3){if(!(key1==="source"||key1==="serviceRef"||key1==="tenantRef"||key1==="issuer"||key1==="subject")){const err21={instancePath:instancePath+"/source",schemaPath:"#/properties/source/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key1},message:"must NOT have additional properties"};if(vErrors===null){vErrors=[err21]}else{vErrors.push(err21)}errors++}}if(data3.source!==void 0){let data4=data3.source;if(typeof data4==="string"){if(func1(data4)>2048){const err22={instancePath:instancePath+"/source/source",schemaPath:"#/properties/source/properties/source/maxLength",keyword:"maxLength",params:{limit:2048},message:"must NOT have more than 2048 characters"};if(vErrors===null){vErrors=[err22]}else{vErrors.push(err22)}errors++}if(!formats0(data4)){const err23={instancePath:instancePath+"/source/source",schemaPath:"#/properties/source/properties/source/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};if(vErrors===null){vErrors=[err23]}else{vErrors.push(err23)}errors++}}else{const err24={instancePath:instancePath+"/source/source",schemaPath:"#/properties/source/properties/source/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err24]}else{vErrors.push(err24)}errors++}}if(data3.serviceRef!==void 0){let data5=data3.serviceRef;if(typeof data5==="string"){if(func1(data5)>256){const err25={instancePath:instancePath+"/source/serviceRef",schemaPath:"#/properties/source/properties/serviceRef/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err25]}else{vErrors.push(err25)}errors++}if(func1(data5)<1){const err26={instancePath:instancePath+"/source/serviceRef",schemaPath:"#/properties/source/properties/serviceRef/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err26]}else{vErrors.push(err26)}errors++}if(!pattern119.test(data5)){const err27={instancePath:instancePath+"/source/serviceRef",schemaPath:"#/properties/source/properties/serviceRef/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u0020\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u0020\\u007f]+$"'};if(vErrors===null){vErrors=[err27]}else{vErrors.push(err27)}errors++}}else{const err28={instancePath:instancePath+"/source/serviceRef",schemaPath:"#/properties/source/properties/serviceRef/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err28]}else{vErrors.push(err28)}errors++}}if(data3.tenantRef!==void 0){let data6=data3.tenantRef;if(typeof data6==="string"){if(func1(data6)>256){const err29={instancePath:instancePath+"/source/tenantRef",schemaPath:"#/properties/source/properties/tenantRef/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err29]}else{vErrors.push(err29)}errors++}if(func1(data6)<1){const err30={instancePath:instancePath+"/source/tenantRef",schemaPath:"#/properties/source/properties/tenantRef/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err30]}else{vErrors.push(err30)}errors++}if(!pattern119.test(data6)){const err31={instancePath:instancePath+"/source/tenantRef",schemaPath:"#/properties/source/properties/tenantRef/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u0020\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u0020\\u007f]+$"'};if(vErrors===null){vErrors=[err31]}else{vErrors.push(err31)}errors++}}else{const err32={instancePath:instancePath+"/source/tenantRef",schemaPath:"#/properties/source/properties/tenantRef/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err32]}else{vErrors.push(err32)}errors++}}if(data3.issuer!==void 0){let data7=data3.issuer;if(typeof data7==="string"){if(func1(data7)>2048){const err33={instancePath:instancePath+"/source/issuer",schemaPath:"#/properties/source/properties/issuer/maxLength",keyword:"maxLength",params:{limit:2048},message:"must NOT have more than 2048 characters"};if(vErrors===null){vErrors=[err33]}else{vErrors.push(err33)}errors++}if(!formats0(data7)){const err34={instancePath:instancePath+"/source/issuer",schemaPath:"#/properties/source/properties/issuer/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};if(vErrors===null){vErrors=[err34]}else{vErrors.push(err34)}errors++}}else{const err35={instancePath:instancePath+"/source/issuer",schemaPath:"#/properties/source/properties/issuer/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err35]}else{vErrors.push(err35)}errors++}}if(data3.subject!==void 0){let data8=data3.subject;if(typeof data8==="string"){if(func1(data8)>256){const err36={instancePath:instancePath+"/source/subject",schemaPath:"#/properties/source/properties/subject/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err36]}else{vErrors.push(err36)}errors++}if(func1(data8)<1){const err37={instancePath:instancePath+"/source/subject",schemaPath:"#/properties/source/properties/subject/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err37]}else{vErrors.push(err37)}errors++}if(!pattern119.test(data8)){const err38={instancePath:instancePath+"/source/subject",schemaPath:"#/properties/source/properties/subject/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u0020\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u0020\\u007f]+$"'};if(vErrors===null){vErrors=[err38]}else{vErrors.push(err38)}errors++}}else{const err39={instancePath:instancePath+"/source/subject",schemaPath:"#/properties/source/properties/subject/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err39]}else{vErrors.push(err39)}errors++}}}else{const err40={instancePath:instancePath+"/source",schemaPath:"#/properties/source/type",keyword:"type",params:{type:"object"},message:"must be object"};if(vErrors===null){vErrors=[err40]}else{vErrors.push(err40)}errors++}}if(data.target!==void 0){let data9=data.target;if(data9&&typeof data9=="object"&&!Array.isArray(data9)){if(data9.serviceRef===void 0){const err41={instancePath:instancePath+"/target",schemaPath:"tenant-context.schema.json/required",keyword:"required",params:{missingProperty:"serviceRef"},message:"must have required property 'serviceRef'"};if(vErrors===null){vErrors=[err41]}else{vErrors.push(err41)}errors++}if(data9.tenantRef===void 0){const err42={instancePath:instancePath+"/target",schemaPath:"tenant-context.schema.json/required",keyword:"required",params:{missingProperty:"tenantRef"},message:"must have required property 'tenantRef'"};if(vErrors===null){vErrors=[err42]}else{vErrors.push(err42)}errors++}for(const key2 in data9){if(!(key2==="serviceRef"||key2==="tenantRef")){const err43={instancePath:instancePath+"/target",schemaPath:"tenant-context.schema.json/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key2},message:"must NOT have additional properties"};if(vErrors===null){vErrors=[err43]}else{vErrors.push(err43)}errors++}}if(data9.serviceRef!==void 0){let data10=data9.serviceRef;if(typeof data10==="string"){if(func1(data10)>256){const err44={instancePath:instancePath+"/target/serviceRef",schemaPath:"tenant-context.schema.json/properties/serviceRef/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err44]}else{vErrors.push(err44)}errors++}if(func1(data10)<1){const err45={instancePath:instancePath+"/target/serviceRef",schemaPath:"tenant-context.schema.json/properties/serviceRef/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err45]}else{vErrors.push(err45)}errors++}if(!pattern4.test(data10)){const err46={instancePath:instancePath+"/target/serviceRef",schemaPath:"tenant-context.schema.json/properties/serviceRef/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err46]}else{vErrors.push(err46)}errors++}}else{const err47={instancePath:instancePath+"/target/serviceRef",schemaPath:"tenant-context.schema.json/properties/serviceRef/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err47]}else{vErrors.push(err47)}errors++}}if(data9.tenantRef!==void 0){let data11=data9.tenantRef;if(typeof data11==="string"){if(func1(data11)>256){const err48={instancePath:instancePath+"/target/tenantRef",schemaPath:"tenant-context.schema.json/properties/tenantRef/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err48]}else{vErrors.push(err48)}errors++}if(func1(data11)<1){const err49={instancePath:instancePath+"/target/tenantRef",schemaPath:"tenant-context.schema.json/properties/tenantRef/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err49]}else{vErrors.push(err49)}errors++}if(!pattern4.test(data11)){const err50={instancePath:instancePath+"/target/tenantRef",schemaPath:"tenant-context.schema.json/properties/tenantRef/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err50]}else{vErrors.push(err50)}errors++}}else{const err51={instancePath:instancePath+"/target/tenantRef",schemaPath:"tenant-context.schema.json/properties/tenantRef/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err51]}else{vErrors.push(err51)}errors++}}}else{const err52={instancePath:instancePath+"/target",schemaPath:"tenant-context.schema.json/type",keyword:"type",params:{type:"object"},message:"must be object"};if(vErrors===null){vErrors=[err52]}else{vErrors.push(err52)}errors++}}if(data.grant!==void 0){let data12=data.grant;if(data12&&typeof data12=="object"&&!Array.isArray(data12)){if(data12.grantRef===void 0){const err53={instancePath:instancePath+"/grant",schemaPath:"#/properties/grant/required",keyword:"required",params:{missingProperty:"grantRef"},message:"must have required property 'grantRef'"};if(vErrors===null){vErrors=[err53]}else{vErrors.push(err53)}errors++}if(data12.version===void 0){const err54={instancePath:instancePath+"/grant",schemaPath:"#/properties/grant/required",keyword:"required",params:{missingProperty:"version"},message:"must have required property 'version'"};if(vErrors===null){vErrors=[err54]}else{vErrors.push(err54)}errors++}if(data12.eventType===void 0){const err55={instancePath:instancePath+"/grant",schemaPath:"#/properties/grant/required",keyword:"required",params:{missingProperty:"eventType"},message:"must have required property 'eventType'"};if(vErrors===null){vErrors=[err55]}else{vErrors.push(err55)}errors++}if(data12.consumerRef===void 0){const err56={instancePath:instancePath+"/grant",schemaPath:"#/properties/grant/required",keyword:"required",params:{missingProperty:"consumerRef"},message:"must have required property 'consumerRef'"};if(vErrors===null){vErrors=[err56]}else{vErrors.push(err56)}errors++}for(const key3 in data12){if(!(key3==="grantRef"||key3==="version"||key3==="eventType"||key3==="consumerRef")){const err57={instancePath:instancePath+"/grant",schemaPath:"#/properties/grant/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key3},message:"must NOT have additional properties"};if(vErrors===null){vErrors=[err57]}else{vErrors.push(err57)}errors++}}if(data12.grantRef!==void 0){let data13=data12.grantRef;if(typeof data13==="string"){if(func1(data13)>256){const err58={instancePath:instancePath+"/grant/grantRef",schemaPath:"#/properties/grant/properties/grantRef/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err58]}else{vErrors.push(err58)}errors++}if(func1(data13)<1){const err59={instancePath:instancePath+"/grant/grantRef",schemaPath:"#/properties/grant/properties/grantRef/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err59]}else{vErrors.push(err59)}errors++}if(!pattern119.test(data13)){const err60={instancePath:instancePath+"/grant/grantRef",schemaPath:"#/properties/grant/properties/grantRef/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u0020\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u0020\\u007f]+$"'};if(vErrors===null){vErrors=[err60]}else{vErrors.push(err60)}errors++}}else{const err61={instancePath:instancePath+"/grant/grantRef",schemaPath:"#/properties/grant/properties/grantRef/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err61]}else{vErrors.push(err61)}errors++}}if(data12.version!==void 0){let data14=data12.version;if(!(typeof data14=="number"&&!(data14%1)&&!isNaN(data14)&&isFinite(data14))){const err62={instancePath:instancePath+"/grant/version",schemaPath:"#/properties/grant/properties/version/type",keyword:"type",params:{type:"integer"},message:"must be integer"};if(vErrors===null){vErrors=[err62]}else{vErrors.push(err62)}errors++}if(typeof data14=="number"&&isFinite(data14)){if(data14>2147483647||isNaN(data14)){const err63={instancePath:instancePath+"/grant/version",schemaPath:"#/properties/grant/properties/version/maximum",keyword:"maximum",params:{comparison:"<=",limit:2147483647},message:"must be <= 2147483647"};if(vErrors===null){vErrors=[err63]}else{vErrors.push(err63)}errors++}if(data14<1||isNaN(data14)){const err64={instancePath:instancePath+"/grant/version",schemaPath:"#/properties/grant/properties/version/minimum",keyword:"minimum",params:{comparison:">=",limit:1},message:"must be >= 1"};if(vErrors===null){vErrors=[err64]}else{vErrors.push(err64)}errors++}}}if(data12.eventType!==void 0){let data15=data12.eventType;if(typeof data15==="string"){if(func1(data15)>256){const err65={instancePath:instancePath+"/grant/eventType",schemaPath:"#/properties/grant/properties/eventType/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err65]}else{vErrors.push(err65)}errors++}if(!pattern158.test(data15)){const err66={instancePath:instancePath+"/grant/eventType",schemaPath:"#/properties/grant/properties/eventType/pattern",keyword:"pattern",params:{pattern:"^[A-Za-z0-9][A-Za-z0-9._-]*\\.v[1-9][0-9]*$"},message:'must match pattern "^[A-Za-z0-9][A-Za-z0-9._-]*\\.v[1-9][0-9]*$"'};if(vErrors===null){vErrors=[err66]}else{vErrors.push(err66)}errors++}}else{const err67={instancePath:instancePath+"/grant/eventType",schemaPath:"#/properties/grant/properties/eventType/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err67]}else{vErrors.push(err67)}errors++}}if(data12.consumerRef!==void 0){let data16=data12.consumerRef;if(typeof data16==="string"){if(func1(data16)>256){const err68={instancePath:instancePath+"/grant/consumerRef",schemaPath:"#/properties/grant/properties/consumerRef/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err68]}else{vErrors.push(err68)}errors++}if(func1(data16)<1){const err69={instancePath:instancePath+"/grant/consumerRef",schemaPath:"#/properties/grant/properties/consumerRef/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err69]}else{vErrors.push(err69)}errors++}if(!pattern119.test(data16)){const err70={instancePath:instancePath+"/grant/consumerRef",schemaPath:"#/properties/grant/properties/consumerRef/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u0020\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u0020\\u007f]+$"'};if(vErrors===null){vErrors=[err70]}else{vErrors.push(err70)}errors++}}else{const err71={instancePath:instancePath+"/grant/consumerRef",schemaPath:"#/properties/grant/properties/consumerRef/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err71]}else{vErrors.push(err71)}errors++}}}else{const err72={instancePath:instancePath+"/grant",schemaPath:"#/properties/grant/type",keyword:"type",params:{type:"object"},message:"must be object"};if(vErrors===null){vErrors=[err72]}else{vErrors.push(err72)}errors++}}if(data.status!==void 0){let data17=data.status;if(!(data17==="ACTIVE"||data17==="REVOKED")){const err73={instancePath:instancePath+"/status",schemaPath:"#/properties/status/enum",keyword:"enum",params:{allowedValues:schema87.properties.status.enum},message:"must be equal to one of the allowed values"};if(vErrors===null){vErrors=[err73]}else{vErrors.push(err73)}errors++}}}else{const err74={instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};if(vErrors===null){vErrors=[err74]}else{vErrors.push(err74)}errors++}validate43.errors=vErrors;return errors===0}validate43.evaluated={props:true,dynamicProps:false,dynamicItems:false};var outboxRecoveryCommand=validate44;function validate44(data,{instancePath="",parentData,parentDataProperty,rootData=data,dynamicAnchors={}}={}){let vErrors=null;let errors=0;const evaluated0=validate44.evaluated;if(evaluated0.dynamicProps){evaluated0.props=void 0}if(evaluated0.dynamicItems){evaluated0.items=void 0}if(data&&typeof data=="object"&&!Array.isArray(data)){if(data.schemaVersion===void 0){const err0={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"schemaVersion"},message:"must have required property 'schemaVersion'"};if(vErrors===null){vErrors=[err0]}else{vErrors.push(err0)}errors++}if(data.requestId===void 0){const err1={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"requestId"},message:"must have required property 'requestId'"};if(vErrors===null){vErrors=[err1]}else{vErrors.push(err1)}errors++}if(data.source===void 0){const err2={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"source"},message:"must have required property 'source'"};if(vErrors===null){vErrors=[err2]}else{vErrors.push(err2)}errors++}if(data.id===void 0){const err3={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};if(vErrors===null){vErrors=[err3]}else{vErrors.push(err3)}errors++}if(data.deliveryid===void 0){const err4={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"deliveryid"},message:"must have required property 'deliveryid'"};if(vErrors===null){vErrors=[err4]}else{vErrors.push(err4)}errors++}if(data.expectedGeneration===void 0){const err5={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"expectedGeneration"},message:"must have required property 'expectedGeneration'"};if(vErrors===null){vErrors=[err5]}else{vErrors.push(err5)}errors++}for(const key0 in data){if(!(key0==="schemaVersion"||key0==="requestId"||key0==="source"||key0==="id"||key0==="deliveryid"||key0==="expectedGeneration")){const err6={instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key0},message:"must NOT have additional properties"};if(vErrors===null){vErrors=[err6]}else{vErrors.push(err6)}errors++}}if(data.schemaVersion!==void 0){if(1!==data.schemaVersion){const err7={instancePath:instancePath+"/schemaVersion",schemaPath:"#/properties/schemaVersion/const",keyword:"const",params:{allowedValue:1},message:"must be equal to constant"};if(vErrors===null){vErrors=[err7]}else{vErrors.push(err7)}errors++}}if(data.requestId!==void 0){let data1=data.requestId;if(typeof data1==="string"){if(func1(data1)>256){const err8={instancePath:instancePath+"/requestId",schemaPath:"#/properties/requestId/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err8]}else{vErrors.push(err8)}errors++}if(func1(data1)<1){const err9={instancePath:instancePath+"/requestId",schemaPath:"#/properties/requestId/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err9]}else{vErrors.push(err9)}errors++}if(!pattern119.test(data1)){const err10={instancePath:instancePath+"/requestId",schemaPath:"#/properties/requestId/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u0020\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u0020\\u007f]+$"'};if(vErrors===null){vErrors=[err10]}else{vErrors.push(err10)}errors++}}else{const err11={instancePath:instancePath+"/requestId",schemaPath:"#/properties/requestId/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err11]}else{vErrors.push(err11)}errors++}}if(data.source!==void 0){let data2=data.source;if(typeof data2==="string"){if(func1(data2)>2048){const err12={instancePath:instancePath+"/source",schemaPath:"#/properties/source/maxLength",keyword:"maxLength",params:{limit:2048},message:"must NOT have more than 2048 characters"};if(vErrors===null){vErrors=[err12]}else{vErrors.push(err12)}errors++}if(!formats0(data2)){const err13={instancePath:instancePath+"/source",schemaPath:"#/properties/source/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};if(vErrors===null){vErrors=[err13]}else{vErrors.push(err13)}errors++}}else{const err14={instancePath:instancePath+"/source",schemaPath:"#/properties/source/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err14]}else{vErrors.push(err14)}errors++}}if(data.id!==void 0){let data3=data.id;if(typeof data3==="string"){if(func1(data3)>256){const err15={instancePath:instancePath+"/id",schemaPath:"#/properties/id/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err15]}else{vErrors.push(err15)}errors++}if(func1(data3)<1){const err16={instancePath:instancePath+"/id",schemaPath:"#/properties/id/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err16]}else{vErrors.push(err16)}errors++}if(!pattern119.test(data3)){const err17={instancePath:instancePath+"/id",schemaPath:"#/properties/id/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u0020\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u0020\\u007f]+$"'};if(vErrors===null){vErrors=[err17]}else{vErrors.push(err17)}errors++}}else{const err18={instancePath:instancePath+"/id",schemaPath:"#/properties/id/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err18]}else{vErrors.push(err18)}errors++}}if(data.deliveryid!==void 0){let data4=data.deliveryid;if(typeof data4==="string"){if(!pattern117.test(data4)){const err19={instancePath:instancePath+"/deliveryid",schemaPath:"#/properties/deliveryid/pattern",keyword:"pattern",params:{pattern:"^[a-f0-9]{64}$"},message:'must match pattern "^[a-f0-9]{64}$"'};if(vErrors===null){vErrors=[err19]}else{vErrors.push(err19)}errors++}}else{const err20={instancePath:instancePath+"/deliveryid",schemaPath:"#/properties/deliveryid/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err20]}else{vErrors.push(err20)}errors++}}if(data.expectedGeneration!==void 0){let data5=data.expectedGeneration;if(!(typeof data5=="number"&&!(data5%1)&&!isNaN(data5)&&isFinite(data5))){const err21={instancePath:instancePath+"/expectedGeneration",schemaPath:"#/properties/expectedGeneration/type",keyword:"type",params:{type:"integer"},message:"must be integer"};if(vErrors===null){vErrors=[err21]}else{vErrors.push(err21)}errors++}if(typeof data5=="number"&&isFinite(data5)){if(data5>2147483647||isNaN(data5)){const err22={instancePath:instancePath+"/expectedGeneration",schemaPath:"#/properties/expectedGeneration/maximum",keyword:"maximum",params:{comparison:"<=",limit:2147483647},message:"must be <= 2147483647"};if(vErrors===null){vErrors=[err22]}else{vErrors.push(err22)}errors++}if(data5<0||isNaN(data5)){const err23={instancePath:instancePath+"/expectedGeneration",schemaPath:"#/properties/expectedGeneration/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};if(vErrors===null){vErrors=[err23]}else{vErrors.push(err23)}errors++}}}}else{const err24={instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};if(vErrors===null){vErrors=[err24]}else{vErrors.push(err24)}errors++}validate44.errors=vErrors;return errors===0}validate44.evaluated={props:true,dynamicProps:false,dynamicItems:false};var nodeWorkerObservation=validate45;var schema90={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://eventsdk.dev/schemas/v1/node-worker-observation.schema.json",title:"NodeWorkerObservation",type:"object",additionalProperties:false,required:["schemaVersion","status","connected","at"],properties:{schemaVersion:{const:1},status:{enum:["DISABLED","CONNECTED","RECONNECTING","STOPPED"]},connected:{type:"boolean"},at:{type:"string",format:"date-time"},revision:{type:"string",minLength:1,maxLength:256}}};function validate45(data,{instancePath="",parentData,parentDataProperty,rootData=data,dynamicAnchors={}}={}){let vErrors=null;let errors=0;const evaluated0=validate45.evaluated;if(evaluated0.dynamicProps){evaluated0.props=void 0}if(evaluated0.dynamicItems){evaluated0.items=void 0}if(data&&typeof data=="object"&&!Array.isArray(data)){if(data.schemaVersion===void 0){const err0={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"schemaVersion"},message:"must have required property 'schemaVersion'"};if(vErrors===null){vErrors=[err0]}else{vErrors.push(err0)}errors++}if(data.status===void 0){const err1={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"status"},message:"must have required property 'status'"};if(vErrors===null){vErrors=[err1]}else{vErrors.push(err1)}errors++}if(data.connected===void 0){const err2={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"connected"},message:"must have required property 'connected'"};if(vErrors===null){vErrors=[err2]}else{vErrors.push(err2)}errors++}if(data.at===void 0){const err3={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"at"},message:"must have required property 'at'"};if(vErrors===null){vErrors=[err3]}else{vErrors.push(err3)}errors++}for(const key0 in data){if(!(key0==="schemaVersion"||key0==="status"||key0==="connected"||key0==="at"||key0==="revision")){const err4={instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key0},message:"must NOT have additional properties"};if(vErrors===null){vErrors=[err4]}else{vErrors.push(err4)}errors++}}if(data.schemaVersion!==void 0){if(1!==data.schemaVersion){const err5={instancePath:instancePath+"/schemaVersion",schemaPath:"#/properties/schemaVersion/const",keyword:"const",params:{allowedValue:1},message:"must be equal to constant"};if(vErrors===null){vErrors=[err5]}else{vErrors.push(err5)}errors++}}if(data.status!==void 0){let data1=data.status;if(!(data1==="DISABLED"||data1==="CONNECTED"||data1==="RECONNECTING"||data1==="STOPPED")){const err6={instancePath:instancePath+"/status",schemaPath:"#/properties/status/enum",keyword:"enum",params:{allowedValues:schema90.properties.status.enum},message:"must be equal to one of the allowed values"};if(vErrors===null){vErrors=[err6]}else{vErrors.push(err6)}errors++}}if(data.connected!==void 0){if(typeof data.connected!=="boolean"){const err7={instancePath:instancePath+"/connected",schemaPath:"#/properties/connected/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};if(vErrors===null){vErrors=[err7]}else{vErrors.push(err7)}errors++}}if(data.at!==void 0){let data3=data.at;if(typeof data3==="string"){if(!formats2.validate(data3)){const err8={instancePath:instancePath+"/at",schemaPath:"#/properties/at/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};if(vErrors===null){vErrors=[err8]}else{vErrors.push(err8)}errors++}}else{const err9={instancePath:instancePath+"/at",schemaPath:"#/properties/at/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err9]}else{vErrors.push(err9)}errors++}}if(data.revision!==void 0){let data4=data.revision;if(typeof data4==="string"){if(func1(data4)>256){const err10={instancePath:instancePath+"/revision",schemaPath:"#/properties/revision/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err10]}else{vErrors.push(err10)}errors++}if(func1(data4)<1){const err11={instancePath:instancePath+"/revision",schemaPath:"#/properties/revision/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err11]}else{vErrors.push(err11)}errors++}}else{const err12={instancePath:instancePath+"/revision",schemaPath:"#/properties/revision/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err12]}else{vErrors.push(err12)}errors++}}}else{const err13={instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};if(vErrors===null){vErrors=[err13]}else{vErrors.push(err13)}errors++}validate45.errors=vErrors;return errors===0}validate45.evaluated={props:true,dynamicProps:false,dynamicItems:false};var nativeEventCatalog=validate46;var pattern163=new RegExp("^/","u");function validate46(data,{instancePath="",parentData,parentDataProperty,rootData=data,dynamicAnchors={}}={}){let vErrors=null;let errors=0;const evaluated0=validate46.evaluated;if(evaluated0.dynamicProps){evaluated0.props=void 0}if(evaluated0.dynamicItems){evaluated0.items=void 0}if(data&&typeof data=="object"&&!Array.isArray(data)){if(data.schemaVersion===void 0){const err0={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"schemaVersion"},message:"must have required property 'schemaVersion'"};if(vErrors===null){vErrors=[err0]}else{vErrors.push(err0)}errors++}if(data.serviceRef===void 0){const err1={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"serviceRef"},message:"must have required property 'serviceRef'"};if(vErrors===null){vErrors=[err1]}else{vErrors.push(err1)}errors++}if(data.events===void 0){const err2={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"events"},message:"must have required property 'events'"};if(vErrors===null){vErrors=[err2]}else{vErrors.push(err2)}errors++}for(const key0 in data){if(!(key0==="schemaVersion"||key0==="serviceRef"||key0==="events")){const err3={instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key0},message:"must NOT have additional properties"};if(vErrors===null){vErrors=[err3]}else{vErrors.push(err3)}errors++}}if(data.schemaVersion!==void 0){if(1!==data.schemaVersion){const err4={instancePath:instancePath+"/schemaVersion",schemaPath:"#/properties/schemaVersion/const",keyword:"const",params:{allowedValue:1},message:"must be equal to constant"};if(vErrors===null){vErrors=[err4]}else{vErrors.push(err4)}errors++}}if(data.serviceRef!==void 0){let data1=data.serviceRef;if(typeof data1==="string"){if(func1(data1)>256){const err5={instancePath:instancePath+"/serviceRef",schemaPath:"#/properties/serviceRef/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err5]}else{vErrors.push(err5)}errors++}if(func1(data1)<1){const err6={instancePath:instancePath+"/serviceRef",schemaPath:"#/properties/serviceRef/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err6]}else{vErrors.push(err6)}errors++}}else{const err7={instancePath:instancePath+"/serviceRef",schemaPath:"#/properties/serviceRef/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err7]}else{vErrors.push(err7)}errors++}}if(data.events!==void 0){let data2=data.events;if(Array.isArray(data2)){if(data2.length>100){const err8={instancePath:instancePath+"/events",schemaPath:"#/properties/events/maxItems",keyword:"maxItems",params:{limit:100},message:"must NOT have more than 100 items"};if(vErrors===null){vErrors=[err8]}else{vErrors.push(err8)}errors++}const len0=data2.length;for(let i0=0;i0<len0;i0++){let data3=data2[i0];if(data3&&typeof data3=="object"&&!Array.isArray(data3)){if(data3.type===void 0){const err9={instancePath:instancePath+"/events/"+i0,schemaPath:"#/properties/events/items/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};if(vErrors===null){vErrors=[err9]}else{vErrors.push(err9)}errors++}if(data3.dataschema===void 0){const err10={instancePath:instancePath+"/events/"+i0,schemaPath:"#/properties/events/items/required",keyword:"required",params:{missingProperty:"dataschema"},message:"must have required property 'dataschema'"};if(vErrors===null){vErrors=[err10]}else{vErrors.push(err10)}errors++}if(data3.description===void 0){const err11={instancePath:instancePath+"/events/"+i0,schemaPath:"#/properties/events/items/required",keyword:"required",params:{missingProperty:"description"},message:"must have required property 'description'"};if(vErrors===null){vErrors=[err11]}else{vErrors.push(err11)}errors++}if(data3.dataSchema===void 0){const err12={instancePath:instancePath+"/events/"+i0,schemaPath:"#/properties/events/items/required",keyword:"required",params:{missingProperty:"dataSchema"},message:"must have required property 'dataSchema'"};if(vErrors===null){vErrors=[err12]}else{vErrors.push(err12)}errors++}if(data3.resourceAccess===void 0){const err13={instancePath:instancePath+"/events/"+i0,schemaPath:"#/properties/events/items/required",keyword:"required",params:{missingProperty:"resourceAccess"},message:"must have required property 'resourceAccess'"};if(vErrors===null){vErrors=[err13]}else{vErrors.push(err13)}errors++}for(const key1 in data3){if(!(key1==="type"||key1==="dataschema"||key1==="description"||key1==="dataSchema"||key1==="resourceAccess")){const err14={instancePath:instancePath+"/events/"+i0,schemaPath:"#/properties/events/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key1},message:"must NOT have additional properties"};if(vErrors===null){vErrors=[err14]}else{vErrors.push(err14)}errors++}}if(data3.type!==void 0){let data4=data3.type;if(typeof data4==="string"){if(func1(data4)>256){const err15={instancePath:instancePath+"/events/"+i0+"/type",schemaPath:"#/properties/events/items/properties/type/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err15]}else{vErrors.push(err15)}errors++}if(func1(data4)<1){const err16={instancePath:instancePath+"/events/"+i0+"/type",schemaPath:"#/properties/events/items/properties/type/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err16]}else{vErrors.push(err16)}errors++}}else{const err17={instancePath:instancePath+"/events/"+i0+"/type",schemaPath:"#/properties/events/items/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err17]}else{vErrors.push(err17)}errors++}}if(data3.dataschema!==void 0){let data5=data3.dataschema;if(typeof data5==="string"){if(func1(data5)>2048){const err18={instancePath:instancePath+"/events/"+i0+"/dataschema",schemaPath:"#/properties/events/items/properties/dataschema/maxLength",keyword:"maxLength",params:{limit:2048},message:"must NOT have more than 2048 characters"};if(vErrors===null){vErrors=[err18]}else{vErrors.push(err18)}errors++}if(!formats0(data5)){const err19={instancePath:instancePath+"/events/"+i0+"/dataschema",schemaPath:"#/properties/events/items/properties/dataschema/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};if(vErrors===null){vErrors=[err19]}else{vErrors.push(err19)}errors++}}else{const err20={instancePath:instancePath+"/events/"+i0+"/dataschema",schemaPath:"#/properties/events/items/properties/dataschema/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err20]}else{vErrors.push(err20)}errors++}}if(data3.description!==void 0){let data6=data3.description;if(typeof data6==="string"){if(func1(data6)>2048){const err21={instancePath:instancePath+"/events/"+i0+"/description",schemaPath:"#/properties/events/items/properties/description/maxLength",keyword:"maxLength",params:{limit:2048},message:"must NOT have more than 2048 characters"};if(vErrors===null){vErrors=[err21]}else{vErrors.push(err21)}errors++}if(func1(data6)<1){const err22={instancePath:instancePath+"/events/"+i0+"/description",schemaPath:"#/properties/events/items/properties/description/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err22]}else{vErrors.push(err22)}errors++}}else{const err23={instancePath:instancePath+"/events/"+i0+"/description",schemaPath:"#/properties/events/items/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err23]}else{vErrors.push(err23)}errors++}}if(data3.dataSchema!==void 0){let data7=data3.dataSchema;if(data7&&typeof data7=="object"&&!Array.isArray(data7)){for(const key2 in data7){if(!validate20(data7[key2],{instancePath:instancePath+"/events/"+i0+"/dataSchema/"+key2.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:data7,parentDataProperty:key2,rootData,dynamicAnchors})){vErrors=vErrors===null?validate20.errors:vErrors.concat(validate20.errors);errors=vErrors.length}}}else{const err24={instancePath:instancePath+"/events/"+i0+"/dataSchema",schemaPath:"#/properties/events/items/properties/dataSchema/type",keyword:"type",params:{type:"object"},message:"must be object"};if(vErrors===null){vErrors=[err24]}else{vErrors.push(err24)}errors++}}if(data3.resourceAccess!==void 0){let data9=data3.resourceAccess;if(data9&&typeof data9=="object"&&!Array.isArray(data9)){if(data9.providerPath===void 0){const err25={instancePath:instancePath+"/events/"+i0+"/resourceAccess",schemaPath:"#/properties/events/items/properties/resourceAccess/required",keyword:"required",params:{missingProperty:"providerPath"},message:"must have required property 'providerPath'"};if(vErrors===null){vErrors=[err25]}else{vErrors.push(err25)}errors++}if(data9.tools===void 0){const err26={instancePath:instancePath+"/events/"+i0+"/resourceAccess",schemaPath:"#/properties/events/items/properties/resourceAccess/required",keyword:"required",params:{missingProperty:"tools"},message:"must have required property 'tools'"};if(vErrors===null){vErrors=[err26]}else{vErrors.push(err26)}errors++}for(const key3 in data9){if(!(key3==="providerPath"||key3==="tools")){const err27={instancePath:instancePath+"/events/"+i0+"/resourceAccess",schemaPath:"#/properties/events/items/properties/resourceAccess/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key3},message:"must NOT have additional properties"};if(vErrors===null){vErrors=[err27]}else{vErrors.push(err27)}errors++}}if(data9.providerPath!==void 0){let data10=data9.providerPath;if(typeof data10==="string"){if(func1(data10)>2048){const err28={instancePath:instancePath+"/events/"+i0+"/resourceAccess/providerPath",schemaPath:"#/properties/events/items/properties/resourceAccess/properties/providerPath/maxLength",keyword:"maxLength",params:{limit:2048},message:"must NOT have more than 2048 characters"};if(vErrors===null){vErrors=[err28]}else{vErrors.push(err28)}errors++}if(!pattern163.test(data10)){const err29={instancePath:instancePath+"/events/"+i0+"/resourceAccess/providerPath",schemaPath:"#/properties/events/items/properties/resourceAccess/properties/providerPath/pattern",keyword:"pattern",params:{pattern:"^/"},message:'must match pattern "^/"'};if(vErrors===null){vErrors=[err29]}else{vErrors.push(err29)}errors++}}else{const err30={instancePath:instancePath+"/events/"+i0+"/resourceAccess/providerPath",schemaPath:"#/properties/events/items/properties/resourceAccess/properties/providerPath/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err30]}else{vErrors.push(err30)}errors++}}if(data9.tools!==void 0){let data11=data9.tools;if(Array.isArray(data11)){if(data11.length>32){const err31={instancePath:instancePath+"/events/"+i0+"/resourceAccess/tools",schemaPath:"#/properties/events/items/properties/resourceAccess/properties/tools/maxItems",keyword:"maxItems",params:{limit:32},message:"must NOT have more than 32 items"};if(vErrors===null){vErrors=[err31]}else{vErrors.push(err31)}errors++}if(data11.length<1){const err32={instancePath:instancePath+"/events/"+i0+"/resourceAccess/tools",schemaPath:"#/properties/events/items/properties/resourceAccess/properties/tools/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};if(vErrors===null){vErrors=[err32]}else{vErrors.push(err32)}errors++}const len1=data11.length;for(let i1=0;i1<len1;i1++){let data12=data11[i1];if(typeof data12==="string"){if(func1(data12)>256){const err33={instancePath:instancePath+"/events/"+i0+"/resourceAccess/tools/"+i1,schemaPath:"#/properties/events/items/properties/resourceAccess/properties/tools/items/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err33]}else{vErrors.push(err33)}errors++}if(func1(data12)<1){const err34={instancePath:instancePath+"/events/"+i0+"/resourceAccess/tools/"+i1,schemaPath:"#/properties/events/items/properties/resourceAccess/properties/tools/items/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err34]}else{vErrors.push(err34)}errors++}}else{const err35={instancePath:instancePath+"/events/"+i0+"/resourceAccess/tools/"+i1,schemaPath:"#/properties/events/items/properties/resourceAccess/properties/tools/items/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err35]}else{vErrors.push(err35)}errors++}}let i2=data11.length;let j0;if(i2>1){const indices0={};for(;i2--;){let item0=data11[i2];if(typeof item0!=="string"){continue}if(typeof indices0[item0]=="number"){j0=indices0[item0];const err36={instancePath:instancePath+"/events/"+i0+"/resourceAccess/tools",schemaPath:"#/properties/events/items/properties/resourceAccess/properties/tools/uniqueItems",keyword:"uniqueItems",params:{i:i2,j:j0},message:"must NOT have duplicate items (items ## "+j0+" and "+i2+" are identical)"};if(vErrors===null){vErrors=[err36]}else{vErrors.push(err36)}errors++;break}indices0[item0]=i2}}}else{const err37={instancePath:instancePath+"/events/"+i0+"/resourceAccess/tools",schemaPath:"#/properties/events/items/properties/resourceAccess/properties/tools/type",keyword:"type",params:{type:"array"},message:"must be array"};if(vErrors===null){vErrors=[err37]}else{vErrors.push(err37)}errors++}}}else{const err38={instancePath:instancePath+"/events/"+i0+"/resourceAccess",schemaPath:"#/properties/events/items/properties/resourceAccess/type",keyword:"type",params:{type:"object"},message:"must be object"};if(vErrors===null){vErrors=[err38]}else{vErrors.push(err38)}errors++}}}else{const err39={instancePath:instancePath+"/events/"+i0,schemaPath:"#/properties/events/items/type",keyword:"type",params:{type:"object"},message:"must be object"};if(vErrors===null){vErrors=[err39]}else{vErrors.push(err39)}errors++}}}else{const err40={instancePath:instancePath+"/events",schemaPath:"#/properties/events/type",keyword:"type",params:{type:"array"},message:"must be array"};if(vErrors===null){vErrors=[err40]}else{vErrors.push(err40)}errors++}}}else{const err41={instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};if(vErrors===null){vErrors=[err41]}else{vErrors.push(err41)}errors++}validate46.errors=vErrors;return errors===0}validate46.evaluated={props:true,dynamicProps:false,dynamicItems:false};var gapBaseline=validate48;var schema92={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://eventsdk.dev/schemas/v1/gap-baseline.schema.json",title:"GapBaseline",type:"object",additionalProperties:false,required:["schemaVersion","baselineRef","source","sourceTenant","targetService","targetTenant","connectionRef","grantRef","grantVersion","previousWatermark","retainedThrough","watermark","sourceRevision","createdAt","readModel","directoryRef"],properties:{schemaVersion:{const:1},baselineRef:{type:"string",format:"uri",maxLength:2048},source:{type:"string",format:"uri",maxLength:2048},sourceTenant:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u0020\\u007f]+$"},targetService:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u0020\\u007f]+$"},targetTenant:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u0020\\u007f]+$"},connectionRef:{type:"string",minLength:1,maxLength:128,pattern:"^[^\\u0000-\\u0020\\u007f]+$"},grantRef:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u0020\\u007f]+$"},grantVersion:{type:"integer",minimum:1,maximum:2147483647},previousWatermark:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u0020\\u007f]+$"},retainedThrough:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u0020\\u007f]+$"},watermark:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u0020\\u007f]+$"},sourceRevision:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u0020\\u007f]+$"},createdAt:{type:"string",format:"date-time",maxLength:64},readModel:{const:"AUTHORITATIVE_ON_DEMAND"},directoryRef:{type:"string",format:"uri",maxLength:2048}}};function validate48(data,{instancePath="",parentData,parentDataProperty,rootData=data,dynamicAnchors={}}={}){let vErrors=null;let errors=0;const evaluated0=validate48.evaluated;if(evaluated0.dynamicProps){evaluated0.props=void 0}if(evaluated0.dynamicItems){evaluated0.items=void 0}if(data&&typeof data=="object"&&!Array.isArray(data)){if(data.schemaVersion===void 0){const err0={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"schemaVersion"},message:"must have required property 'schemaVersion'"};if(vErrors===null){vErrors=[err0]}else{vErrors.push(err0)}errors++}if(data.baselineRef===void 0){const err1={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"baselineRef"},message:"must have required property 'baselineRef'"};if(vErrors===null){vErrors=[err1]}else{vErrors.push(err1)}errors++}if(data.source===void 0){const err2={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"source"},message:"must have required property 'source'"};if(vErrors===null){vErrors=[err2]}else{vErrors.push(err2)}errors++}if(data.sourceTenant===void 0){const err3={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"sourceTenant"},message:"must have required property 'sourceTenant'"};if(vErrors===null){vErrors=[err3]}else{vErrors.push(err3)}errors++}if(data.targetService===void 0){const err4={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"targetService"},message:"must have required property 'targetService'"};if(vErrors===null){vErrors=[err4]}else{vErrors.push(err4)}errors++}if(data.targetTenant===void 0){const err5={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"targetTenant"},message:"must have required property 'targetTenant'"};if(vErrors===null){vErrors=[err5]}else{vErrors.push(err5)}errors++}if(data.connectionRef===void 0){const err6={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"connectionRef"},message:"must have required property 'connectionRef'"};if(vErrors===null){vErrors=[err6]}else{vErrors.push(err6)}errors++}if(data.grantRef===void 0){const err7={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"grantRef"},message:"must have required property 'grantRef'"};if(vErrors===null){vErrors=[err7]}else{vErrors.push(err7)}errors++}if(data.grantVersion===void 0){const err8={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"grantVersion"},message:"must have required property 'grantVersion'"};if(vErrors===null){vErrors=[err8]}else{vErrors.push(err8)}errors++}if(data.previousWatermark===void 0){const err9={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"previousWatermark"},message:"must have required property 'previousWatermark'"};if(vErrors===null){vErrors=[err9]}else{vErrors.push(err9)}errors++}if(data.retainedThrough===void 0){const err10={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"retainedThrough"},message:"must have required property 'retainedThrough'"};if(vErrors===null){vErrors=[err10]}else{vErrors.push(err10)}errors++}if(data.watermark===void 0){const err11={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"watermark"},message:"must have required property 'watermark'"};if(vErrors===null){vErrors=[err11]}else{vErrors.push(err11)}errors++}if(data.sourceRevision===void 0){const err12={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"sourceRevision"},message:"must have required property 'sourceRevision'"};if(vErrors===null){vErrors=[err12]}else{vErrors.push(err12)}errors++}if(data.createdAt===void 0){const err13={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"createdAt"},message:"must have required property 'createdAt'"};if(vErrors===null){vErrors=[err13]}else{vErrors.push(err13)}errors++}if(data.readModel===void 0){const err14={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"readModel"},message:"must have required property 'readModel'"};if(vErrors===null){vErrors=[err14]}else{vErrors.push(err14)}errors++}if(data.directoryRef===void 0){const err15={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"directoryRef"},message:"must have required property 'directoryRef'"};if(vErrors===null){vErrors=[err15]}else{vErrors.push(err15)}errors++}for(const key0 in data){if(!func11.call(schema92.properties,key0)){const err16={instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key0},message:"must NOT have additional properties"};if(vErrors===null){vErrors=[err16]}else{vErrors.push(err16)}errors++}}if(data.schemaVersion!==void 0){if(1!==data.schemaVersion){const err17={instancePath:instancePath+"/schemaVersion",schemaPath:"#/properties/schemaVersion/const",keyword:"const",params:{allowedValue:1},message:"must be equal to constant"};if(vErrors===null){vErrors=[err17]}else{vErrors.push(err17)}errors++}}if(data.baselineRef!==void 0){let data1=data.baselineRef;if(typeof data1==="string"){if(func1(data1)>2048){const err18={instancePath:instancePath+"/baselineRef",schemaPath:"#/properties/baselineRef/maxLength",keyword:"maxLength",params:{limit:2048},message:"must NOT have more than 2048 characters"};if(vErrors===null){vErrors=[err18]}else{vErrors.push(err18)}errors++}if(!formats0(data1)){const err19={instancePath:instancePath+"/baselineRef",schemaPath:"#/properties/baselineRef/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};if(vErrors===null){vErrors=[err19]}else{vErrors.push(err19)}errors++}}else{const err20={instancePath:instancePath+"/baselineRef",schemaPath:"#/properties/baselineRef/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err20]}else{vErrors.push(err20)}errors++}}if(data.source!==void 0){let data2=data.source;if(typeof data2==="string"){if(func1(data2)>2048){const err21={instancePath:instancePath+"/source",schemaPath:"#/properties/source/maxLength",keyword:"maxLength",params:{limit:2048},message:"must NOT have more than 2048 characters"};if(vErrors===null){vErrors=[err21]}else{vErrors.push(err21)}errors++}if(!formats0(data2)){const err22={instancePath:instancePath+"/source",schemaPath:"#/properties/source/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};if(vErrors===null){vErrors=[err22]}else{vErrors.push(err22)}errors++}}else{const err23={instancePath:instancePath+"/source",schemaPath:"#/properties/source/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err23]}else{vErrors.push(err23)}errors++}}if(data.sourceTenant!==void 0){let data3=data.sourceTenant;if(typeof data3==="string"){if(func1(data3)>256){const err24={instancePath:instancePath+"/sourceTenant",schemaPath:"#/properties/sourceTenant/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err24]}else{vErrors.push(err24)}errors++}if(func1(data3)<1){const err25={instancePath:instancePath+"/sourceTenant",schemaPath:"#/properties/sourceTenant/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err25]}else{vErrors.push(err25)}errors++}if(!pattern119.test(data3)){const err26={instancePath:instancePath+"/sourceTenant",schemaPath:"#/properties/sourceTenant/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u0020\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u0020\\u007f]+$"'};if(vErrors===null){vErrors=[err26]}else{vErrors.push(err26)}errors++}}else{const err27={instancePath:instancePath+"/sourceTenant",schemaPath:"#/properties/sourceTenant/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err27]}else{vErrors.push(err27)}errors++}}if(data.targetService!==void 0){let data4=data.targetService;if(typeof data4==="string"){if(func1(data4)>256){const err28={instancePath:instancePath+"/targetService",schemaPath:"#/properties/targetService/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err28]}else{vErrors.push(err28)}errors++}if(func1(data4)<1){const err29={instancePath:instancePath+"/targetService",schemaPath:"#/properties/targetService/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err29]}else{vErrors.push(err29)}errors++}if(!pattern119.test(data4)){const err30={instancePath:instancePath+"/targetService",schemaPath:"#/properties/targetService/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u0020\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u0020\\u007f]+$"'};if(vErrors===null){vErrors=[err30]}else{vErrors.push(err30)}errors++}}else{const err31={instancePath:instancePath+"/targetService",schemaPath:"#/properties/targetService/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err31]}else{vErrors.push(err31)}errors++}}if(data.targetTenant!==void 0){let data5=data.targetTenant;if(typeof data5==="string"){if(func1(data5)>256){const err32={instancePath:instancePath+"/targetTenant",schemaPath:"#/properties/targetTenant/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err32]}else{vErrors.push(err32)}errors++}if(func1(data5)<1){const err33={instancePath:instancePath+"/targetTenant",schemaPath:"#/properties/targetTenant/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err33]}else{vErrors.push(err33)}errors++}if(!pattern119.test(data5)){const err34={instancePath:instancePath+"/targetTenant",schemaPath:"#/properties/targetTenant/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u0020\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u0020\\u007f]+$"'};if(vErrors===null){vErrors=[err34]}else{vErrors.push(err34)}errors++}}else{const err35={instancePath:instancePath+"/targetTenant",schemaPath:"#/properties/targetTenant/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err35]}else{vErrors.push(err35)}errors++}}if(data.connectionRef!==void 0){let data6=data.connectionRef;if(typeof data6==="string"){if(func1(data6)>128){const err36={instancePath:instancePath+"/connectionRef",schemaPath:"#/properties/connectionRef/maxLength",keyword:"maxLength",params:{limit:128},message:"must NOT have more than 128 characters"};if(vErrors===null){vErrors=[err36]}else{vErrors.push(err36)}errors++}if(func1(data6)<1){const err37={instancePath:instancePath+"/connectionRef",schemaPath:"#/properties/connectionRef/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err37]}else{vErrors.push(err37)}errors++}if(!pattern119.test(data6)){const err38={instancePath:instancePath+"/connectionRef",schemaPath:"#/properties/connectionRef/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u0020\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u0020\\u007f]+$"'};if(vErrors===null){vErrors=[err38]}else{vErrors.push(err38)}errors++}}else{const err39={instancePath:instancePath+"/connectionRef",schemaPath:"#/properties/connectionRef/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err39]}else{vErrors.push(err39)}errors++}}if(data.grantRef!==void 0){let data7=data.grantRef;if(typeof data7==="string"){if(func1(data7)>256){const err40={instancePath:instancePath+"/grantRef",schemaPath:"#/properties/grantRef/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err40]}else{vErrors.push(err40)}errors++}if(func1(data7)<1){const err41={instancePath:instancePath+"/grantRef",schemaPath:"#/properties/grantRef/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err41]}else{vErrors.push(err41)}errors++}if(!pattern119.test(data7)){const err42={instancePath:instancePath+"/grantRef",schemaPath:"#/properties/grantRef/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u0020\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u0020\\u007f]+$"'};if(vErrors===null){vErrors=[err42]}else{vErrors.push(err42)}errors++}}else{const err43={instancePath:instancePath+"/grantRef",schemaPath:"#/properties/grantRef/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err43]}else{vErrors.push(err43)}errors++}}if(data.grantVersion!==void 0){let data8=data.grantVersion;if(!(typeof data8=="number"&&!(data8%1)&&!isNaN(data8)&&isFinite(data8))){const err44={instancePath:instancePath+"/grantVersion",schemaPath:"#/properties/grantVersion/type",keyword:"type",params:{type:"integer"},message:"must be integer"};if(vErrors===null){vErrors=[err44]}else{vErrors.push(err44)}errors++}if(typeof data8=="number"&&isFinite(data8)){if(data8>2147483647||isNaN(data8)){const err45={instancePath:instancePath+"/grantVersion",schemaPath:"#/properties/grantVersion/maximum",keyword:"maximum",params:{comparison:"<=",limit:2147483647},message:"must be <= 2147483647"};if(vErrors===null){vErrors=[err45]}else{vErrors.push(err45)}errors++}if(data8<1||isNaN(data8)){const err46={instancePath:instancePath+"/grantVersion",schemaPath:"#/properties/grantVersion/minimum",keyword:"minimum",params:{comparison:">=",limit:1},message:"must be >= 1"};if(vErrors===null){vErrors=[err46]}else{vErrors.push(err46)}errors++}}}if(data.previousWatermark!==void 0){let data9=data.previousWatermark;if(typeof data9==="string"){if(func1(data9)>256){const err47={instancePath:instancePath+"/previousWatermark",schemaPath:"#/properties/previousWatermark/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err47]}else{vErrors.push(err47)}errors++}if(func1(data9)<1){const err48={instancePath:instancePath+"/previousWatermark",schemaPath:"#/properties/previousWatermark/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err48]}else{vErrors.push(err48)}errors++}if(!pattern119.test(data9)){const err49={instancePath:instancePath+"/previousWatermark",schemaPath:"#/properties/previousWatermark/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u0020\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u0020\\u007f]+$"'};if(vErrors===null){vErrors=[err49]}else{vErrors.push(err49)}errors++}}else{const err50={instancePath:instancePath+"/previousWatermark",schemaPath:"#/properties/previousWatermark/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err50]}else{vErrors.push(err50)}errors++}}if(data.retainedThrough!==void 0){let data10=data.retainedThrough;if(typeof data10==="string"){if(func1(data10)>256){const err51={instancePath:instancePath+"/retainedThrough",schemaPath:"#/properties/retainedThrough/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err51]}else{vErrors.push(err51)}errors++}if(func1(data10)<1){const err52={instancePath:instancePath+"/retainedThrough",schemaPath:"#/properties/retainedThrough/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err52]}else{vErrors.push(err52)}errors++}if(!pattern119.test(data10)){const err53={instancePath:instancePath+"/retainedThrough",schemaPath:"#/properties/retainedThrough/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u0020\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u0020\\u007f]+$"'};if(vErrors===null){vErrors=[err53]}else{vErrors.push(err53)}errors++}}else{const err54={instancePath:instancePath+"/retainedThrough",schemaPath:"#/properties/retainedThrough/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err54]}else{vErrors.push(err54)}errors++}}if(data.watermark!==void 0){let data11=data.watermark;if(typeof data11==="string"){if(func1(data11)>256){const err55={instancePath:instancePath+"/watermark",schemaPath:"#/properties/watermark/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err55]}else{vErrors.push(err55)}errors++}if(func1(data11)<1){const err56={instancePath:instancePath+"/watermark",schemaPath:"#/properties/watermark/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err56]}else{vErrors.push(err56)}errors++}if(!pattern119.test(data11)){const err57={instancePath:instancePath+"/watermark",schemaPath:"#/properties/watermark/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u0020\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u0020\\u007f]+$"'};if(vErrors===null){vErrors=[err57]}else{vErrors.push(err57)}errors++}}else{const err58={instancePath:instancePath+"/watermark",schemaPath:"#/properties/watermark/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err58]}else{vErrors.push(err58)}errors++}}if(data.sourceRevision!==void 0){let data12=data.sourceRevision;if(typeof data12==="string"){if(func1(data12)>256){const err59={instancePath:instancePath+"/sourceRevision",schemaPath:"#/properties/sourceRevision/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err59]}else{vErrors.push(err59)}errors++}if(func1(data12)<1){const err60={instancePath:instancePath+"/sourceRevision",schemaPath:"#/properties/sourceRevision/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err60]}else{vErrors.push(err60)}errors++}if(!pattern119.test(data12)){const err61={instancePath:instancePath+"/sourceRevision",schemaPath:"#/properties/sourceRevision/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u0020\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u0020\\u007f]+$"'};if(vErrors===null){vErrors=[err61]}else{vErrors.push(err61)}errors++}}else{const err62={instancePath:instancePath+"/sourceRevision",schemaPath:"#/properties/sourceRevision/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err62]}else{vErrors.push(err62)}errors++}}if(data.createdAt!==void 0){let data13=data.createdAt;if(typeof data13==="string"){if(func1(data13)>64){const err63={instancePath:instancePath+"/createdAt",schemaPath:"#/properties/createdAt/maxLength",keyword:"maxLength",params:{limit:64},message:"must NOT have more than 64 characters"};if(vErrors===null){vErrors=[err63]}else{vErrors.push(err63)}errors++}if(!formats2.validate(data13)){const err64={instancePath:instancePath+"/createdAt",schemaPath:"#/properties/createdAt/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};if(vErrors===null){vErrors=[err64]}else{vErrors.push(err64)}errors++}}else{const err65={instancePath:instancePath+"/createdAt",schemaPath:"#/properties/createdAt/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err65]}else{vErrors.push(err65)}errors++}}if(data.readModel!==void 0){if("AUTHORITATIVE_ON_DEMAND"!==data.readModel){const err66={instancePath:instancePath+"/readModel",schemaPath:"#/properties/readModel/const",keyword:"const",params:{allowedValue:"AUTHORITATIVE_ON_DEMAND"},message:"must be equal to constant"};if(vErrors===null){vErrors=[err66]}else{vErrors.push(err66)}errors++}}if(data.directoryRef!==void 0){let data15=data.directoryRef;if(typeof data15==="string"){if(func1(data15)>2048){const err67={instancePath:instancePath+"/directoryRef",schemaPath:"#/properties/directoryRef/maxLength",keyword:"maxLength",params:{limit:2048},message:"must NOT have more than 2048 characters"};if(vErrors===null){vErrors=[err67]}else{vErrors.push(err67)}errors++}if(!formats0(data15)){const err68={instancePath:instancePath+"/directoryRef",schemaPath:"#/properties/directoryRef/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};if(vErrors===null){vErrors=[err68]}else{vErrors.push(err68)}errors++}}else{const err69={instancePath:instancePath+"/directoryRef",schemaPath:"#/properties/directoryRef/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err69]}else{vErrors.push(err69)}errors++}}}else{const err70={instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};if(vErrors===null){vErrors=[err70]}else{vErrors.push(err70)}errors++}validate48.errors=vErrors;return errors===0}validate48.evaluated={props:true,dynamicProps:false,dynamicItems:false};var gapRecoveryCommand=validate49;function validate49(data,{instancePath="",parentData,parentDataProperty,rootData=data,dynamicAnchors={}}={}){let vErrors=null;let errors=0;const evaluated0=validate49.evaluated;if(evaluated0.dynamicProps){evaluated0.props=void 0}if(evaluated0.dynamicItems){evaluated0.items=void 0}if(data&&typeof data=="object"&&!Array.isArray(data)){if(data.schemaVersion===void 0){const err0={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"schemaVersion"},message:"must have required property 'schemaVersion'"};if(vErrors===null){vErrors=[err0]}else{vErrors.push(err0)}errors++}if(data.requestId===void 0){const err1={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"requestId"},message:"must have required property 'requestId'"};if(vErrors===null){vErrors=[err1]}else{vErrors.push(err1)}errors++}if(data.connectionRef===void 0){const err2={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"connectionRef"},message:"must have required property 'connectionRef'"};if(vErrors===null){vErrors=[err2]}else{vErrors.push(err2)}errors++}if(data.expectedCursor===void 0){const err3={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"expectedCursor"},message:"must have required property 'expectedCursor'"};if(vErrors===null){vErrors=[err3]}else{vErrors.push(err3)}errors++}if(data.expectedOldestAvailableCursor===void 0){const err4={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"expectedOldestAvailableCursor"},message:"must have required property 'expectedOldestAvailableCursor'"};if(vErrors===null){vErrors=[err4]}else{vErrors.push(err4)}errors++}for(const key0 in data){if(!(key0==="schemaVersion"||key0==="requestId"||key0==="connectionRef"||key0==="expectedCursor"||key0==="expectedOldestAvailableCursor")){const err5={instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key0},message:"must NOT have additional properties"};if(vErrors===null){vErrors=[err5]}else{vErrors.push(err5)}errors++}}if(data.schemaVersion!==void 0){if(1!==data.schemaVersion){const err6={instancePath:instancePath+"/schemaVersion",schemaPath:"#/properties/schemaVersion/const",keyword:"const",params:{allowedValue:1},message:"must be equal to constant"};if(vErrors===null){vErrors=[err6]}else{vErrors.push(err6)}errors++}}if(data.requestId!==void 0){let data1=data.requestId;if(typeof data1==="string"){if(func1(data1)>256){const err7={instancePath:instancePath+"/requestId",schemaPath:"#/properties/requestId/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err7]}else{vErrors.push(err7)}errors++}if(func1(data1)<1){const err8={instancePath:instancePath+"/requestId",schemaPath:"#/properties/requestId/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err8]}else{vErrors.push(err8)}errors++}if(!pattern119.test(data1)){const err9={instancePath:instancePath+"/requestId",schemaPath:"#/properties/requestId/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u0020\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u0020\\u007f]+$"'};if(vErrors===null){vErrors=[err9]}else{vErrors.push(err9)}errors++}}else{const err10={instancePath:instancePath+"/requestId",schemaPath:"#/properties/requestId/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err10]}else{vErrors.push(err10)}errors++}}if(data.connectionRef!==void 0){let data2=data.connectionRef;if(typeof data2==="string"){if(func1(data2)>128){const err11={instancePath:instancePath+"/connectionRef",schemaPath:"#/properties/connectionRef/maxLength",keyword:"maxLength",params:{limit:128},message:"must NOT have more than 128 characters"};if(vErrors===null){vErrors=[err11]}else{vErrors.push(err11)}errors++}if(func1(data2)<1){const err12={instancePath:instancePath+"/connectionRef",schemaPath:"#/properties/connectionRef/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err12]}else{vErrors.push(err12)}errors++}if(!pattern119.test(data2)){const err13={instancePath:instancePath+"/connectionRef",schemaPath:"#/properties/connectionRef/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u0020\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u0020\\u007f]+$"'};if(vErrors===null){vErrors=[err13]}else{vErrors.push(err13)}errors++}}else{const err14={instancePath:instancePath+"/connectionRef",schemaPath:"#/properties/connectionRef/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err14]}else{vErrors.push(err14)}errors++}}if(data.expectedCursor!==void 0){let data3=data.expectedCursor;if(typeof data3==="string"){if(func1(data3)>256){const err15={instancePath:instancePath+"/expectedCursor",schemaPath:"#/properties/expectedCursor/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err15]}else{vErrors.push(err15)}errors++}if(func1(data3)<1){const err16={instancePath:instancePath+"/expectedCursor",schemaPath:"#/properties/expectedCursor/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err16]}else{vErrors.push(err16)}errors++}if(!pattern119.test(data3)){const err17={instancePath:instancePath+"/expectedCursor",schemaPath:"#/properties/expectedCursor/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u0020\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u0020\\u007f]+$"'};if(vErrors===null){vErrors=[err17]}else{vErrors.push(err17)}errors++}}else{const err18={instancePath:instancePath+"/expectedCursor",schemaPath:"#/properties/expectedCursor/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err18]}else{vErrors.push(err18)}errors++}}if(data.expectedOldestAvailableCursor!==void 0){let data4=data.expectedOldestAvailableCursor;if(typeof data4==="string"){if(func1(data4)>256){const err19={instancePath:instancePath+"/expectedOldestAvailableCursor",schemaPath:"#/properties/expectedOldestAvailableCursor/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err19]}else{vErrors.push(err19)}errors++}if(func1(data4)<1){const err20={instancePath:instancePath+"/expectedOldestAvailableCursor",schemaPath:"#/properties/expectedOldestAvailableCursor/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err20]}else{vErrors.push(err20)}errors++}if(!pattern119.test(data4)){const err21={instancePath:instancePath+"/expectedOldestAvailableCursor",schemaPath:"#/properties/expectedOldestAvailableCursor/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u0020\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u0020\\u007f]+$"'};if(vErrors===null){vErrors=[err21]}else{vErrors.push(err21)}errors++}}else{const err22={instancePath:instancePath+"/expectedOldestAvailableCursor",schemaPath:"#/properties/expectedOldestAvailableCursor/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err22]}else{vErrors.push(err22)}errors++}}}else{const err23={instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};if(vErrors===null){vErrors=[err23]}else{vErrors.push(err23)}errors++}validate49.errors=vErrors;return errors===0}validate49.evaluated={props:true,dynamicProps:false,dynamicItems:false};function validateContract(validator,value){try{canonicalJson(value)}catch{return{valid:false,issues:[{path:"",keyword:"jsonValue"}]}}if(validator(value))return{valid:true,value};return{valid:false,issues:(validator.errors??[]).map(({instancePath,keyword})=>({path:instancePath,keyword}))}}function parseContract(result){if(!result.valid)throw new ContractError(result.issues);return result.value}var parseNativeEventCatalog=value=>parseContract(validateContract(nativeEventCatalog,value));var parseNodeWorkerObservation=value=>parseContract(validateContract(nodeWorkerObservation,value));var validateOutboxRecoveryCommand=value=>validateContract(outboxRecoveryCommand,value);var parseOutboxRecoveryCommand=value=>parseContract(validateOutboxRecoveryCommand(value));var validateCloudEvent=value=>validateContract(cloudEventSupported,value);var validateCloudEventV1=value=>validateContract(cloudEvent,value);var validateCloudEventV11=value=>validateContract(cloudEventContext,value);var validateNamespacedReference=value=>validateContract(namespacedReference,value);var validateIdentityContext=value=>validateContract(identityContext,value);var validateBusinessReceipt=value=>validateContract(businessReceipt,value);var validateResultRef=value=>validateContract(resultRef,value);var validateTenantContext=value=>validateContract(tenantContext,value);var validateTenantConnection=value=>validateContract(tenantConnection,value);var validateExchangeGrant=value=>validateContract(exchangeGrant,value);var parseCloudEvent=value=>parseContract(validateCloudEvent(value));var parseBusinessReceipt=value=>parseContract(validateBusinessReceipt(value));var parseResultRef=value=>parseContract(validateResultRef(value));var parseTenantContext=value=>parseContract(validateTenantContext(value));var parseTenantConnection=value=>parseContract(validateTenantConnection(value));var parseExchangeGrant=value=>parseContract(validateExchangeGrant(value));var parseNamespacedReference=value=>parseContract(validateNamespacedReference(value));var parseIdentityContext=value=>parseContract(validateIdentityContext(value));var validateCloudEventV12=value=>validateContract(cloudEventFanout,value);var validateFanoutEventDraft=value=>validateContract(fanoutEventDraft,value);var parseFanoutEventDraft=value=>parseContract(validateFanoutEventDraft(value));var validateEventOriginClaims=value=>validateContract(eventOriginClaims,value);var parseEventOriginClaims=value=>parseContract(validateEventOriginClaims(value));var validateNodeConnectionProfile=value=>validateContract(nodeConnectionProfile,value);var parseNodeConnectionProfile=value=>parseContract(validateNodeConnectionProfile(value));var validatePublicJwksSnapshot=value=>validateContract(publicJwksSnapshot,value);var parsePublicJwksSnapshot=value=>parseContract(validatePublicJwksSnapshot(value));var validateExchangeRegistration=value=>validateContract(exchangeRegistration,value);var parseExchangeRegistration=value=>parseContract(validateExchangeRegistration(value));var parseGapBaseline=value=>parseContract(validateContract(gapBaseline,value));var parseGapRecoveryCommand=value=>parseContract(validateContract(gapRecoveryCommand,value));var MAX_BYTES=1048576;var MAX_DEPTH2=64;var MAX_NODES2=1e5;function parseJsonStrict(input){try{if(typeof input==="string"&&(input.length>MAX_BYTES||new TextEncoder().encode(input).byteLength>MAX_BYTES))throw new Error;if(typeof input!=="string"&&input.byteLength>MAX_BYTES)throw new Error;const text=typeof input==="string"?input:new TextDecoder("utf-8",{fatal:true,ignoreBOM:true}).decode(input);const cursor={text,index:0,nodes:0};const value=readValue(cursor,0);whitespace(cursor);if(cursor.index!==text.length)throw new Error;canonicalJson(value);return value}catch{throw new ContractError([{path:"",keyword:"jsonSyntax"}])}}function whitespace(cursor){while(/[\t\n\r ]/.test(cursor.text[cursor.index]??"x"))cursor.index++}function readValue(cursor,depth){if(++cursor.nodes>MAX_NODES2||depth>MAX_DEPTH2)throw new Error;whitespace(cursor);const char=cursor.text[cursor.index];if(char==='"')return readString(cursor);if(char==="{")return readObject(cursor,depth);if(char==="[")return readArray(cursor,depth);const token=/^(?:true|false|null|-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)/.exec(cursor.text.slice(cursor.index))?.[0];if(token===void 0)throw new Error;cursor.index+=token.length;return JSON.parse(token)}function readString(cursor){const start=cursor.index++;while(cursor.index<cursor.text.length){const char=cursor.text[cursor.index++];if(char==="\\")cursor.index++;else if(char==='"')return JSON.parse(cursor.text.slice(start,cursor.index))}throw new Error}function separator(cursor,expected){whitespace(cursor);if(cursor.text[cursor.index++]!==expected)throw new Error}function readObject(cursor,depth){const result={};const names=new Set;cursor.index++;whitespace(cursor);if(cursor.text[cursor.index]==="}"){cursor.index++;return result}while(cursor.index<cursor.text.length){whitespace(cursor);if(cursor.text[cursor.index]!=='"')throw new Error;const key=readString(cursor);if(names.has(key))throw new Error;names.add(key);separator(cursor,":");Object.defineProperty(result,key,{value:readValue(cursor,depth+1),writable:true,enumerable:true,configurable:true});whitespace(cursor);if(cursor.text[cursor.index]==="}"){cursor.index++;return result}separator(cursor,",")}throw new Error}function readArray(cursor,depth){const result=[];cursor.index++;whitespace(cursor);if(cursor.text[cursor.index]==="]"){cursor.index++;return result}while(cursor.index<cursor.text.length){result.push(readValue(cursor,depth+1));whitespace(cursor);if(cursor.text[cursor.index]==="]"){cursor.index++;return result}separator(cursor,",")}throw new Error}function decodeCloudEvent(input){return parseCloudEvent(parseJsonStrict(input))}function reference(namespace,ref){return namespace!==void 0&&ref!==void 0?{namespace,ref}:void 0}function extractIdentityContext(input){const event=parseCloudEvent(input);const sourceTenant={serviceRef:event.serviceorigin,tenantRef:event.sourcetenant};if(event.profile==="eventsdk/1.0")return{sourceTenant};const organization=reference(event.orgnamespace,event.orgref);const project=reference(event.projectnamespace,event.projectref);const actorPrincipal=reference(event.principalnamespace,event.principalref);const resource=reference(event.resourcenamespace,event.resourceref);return parseIdentityContext({sourceTenant,...organization?{organization}:{},...project?{project}:{},...actorPrincipal?{actorPrincipal}:{},...resource?{resource}:{}})}function assertWireGrantVersion(version){if(!Number.isSafeInteger(version)||version<1||version>2147483647)throw new ContractError([{path:"/grantversion",keyword:"wireIntegerRange"}])}var supportedMessagingProfiles=Object.freeze(["eventsdk/1.0","eventsdk/1.1","eventsdk/1.2"]);function isSupportedMessagingProfile(value){return supportedMessagingProfiles.some(profile=>profile===value)}var exchangeRegistrationJsonSchema={title:"ExchangeRegistration",type:"object",additionalProperties:false,required:["schemaVersion","requestId","expectedRevision","source","target","grant","status"],properties:{schemaVersion:{const:1},requestId:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u0020\\u007f]+$"},expectedRevision:{type:["integer","null"],minimum:1,maximum:2147483647},source:{type:"object",additionalProperties:false,required:["source","serviceRef","tenantRef","issuer","subject"],properties:{source:{type:"string",format:"uri",maxLength:2048},serviceRef:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u0020\\u007f]+$"},tenantRef:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u0020\\u007f]+$"},issuer:{type:"string",format:"uri",maxLength:2048},subject:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u0020\\u007f]+$"}}},target:{title:"TenantContext",type:"object",additionalProperties:false,properties:{serviceRef:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u001f\\u007f]+$"},tenantRef:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u001f\\u007f]+$"}},required:["serviceRef","tenantRef"]},grant:{type:"object",additionalProperties:false,required:["grantRef","version","eventType","consumerRef"],properties:{grantRef:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u0020\\u007f]+$"},version:{type:"integer",minimum:1,maximum:2147483647},eventType:{type:"string",pattern:"^[A-Za-z0-9][A-Za-z0-9._-]*\\.v[1-9][0-9]*$",maxLength:256},consumerRef:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u0020\\u007f]+$"}}},status:{enum:["ACTIVE","REVOKED"]}}};var outboxRecoveryCommandJsonSchema={title:"OutboxRecoveryCommand",type:"object",additionalProperties:false,required:["schemaVersion","requestId","source","id","deliveryid","expectedGeneration"],properties:{schemaVersion:{const:1},requestId:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u0020\\u007f]+$"},source:{type:"string",format:"uri",maxLength:2048},id:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u0020\\u007f]+$"},deliveryid:{type:"string",pattern:"^[a-f0-9]{64}$"},expectedGeneration:{type:"integer",minimum:0,maximum:2147483647}}};var gapBaselineJsonSchema={title:"GapBaseline",type:"object",additionalProperties:false,required:["schemaVersion","baselineRef","source","sourceTenant","targetService","targetTenant","connectionRef","grantRef","grantVersion","previousWatermark","retainedThrough","watermark","sourceRevision","createdAt","readModel","directoryRef"],properties:{schemaVersion:{const:1},baselineRef:{type:"string",format:"uri",maxLength:2048},source:{type:"string",format:"uri",maxLength:2048},sourceTenant:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u0020\\u007f]+$"},targetService:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u0020\\u007f]+$"},targetTenant:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u0020\\u007f]+$"},connectionRef:{type:"string",minLength:1,maxLength:128,pattern:"^[^\\u0000-\\u0020\\u007f]+$"},grantRef:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u0020\\u007f]+$"},grantVersion:{type:"integer",minimum:1,maximum:2147483647},previousWatermark:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u0020\\u007f]+$"},retainedThrough:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u0020\\u007f]+$"},watermark:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u0020\\u007f]+$"},sourceRevision:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u0020\\u007f]+$"},createdAt:{type:"string",format:"date-time",maxLength:64},readModel:{const:"AUTHORITATIVE_ON_DEMAND"},directoryRef:{type:"string",format:"uri",maxLength:2048}}};var gapRecoveryCommandJsonSchema={title:"GapRecoveryCommand",type:"object",additionalProperties:false,required:["schemaVersion","requestId","connectionRef","expectedCursor","expectedOldestAvailableCursor"],properties:{schemaVersion:{const:1},requestId:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u0020\\u007f]+$"},connectionRef:{type:"string",minLength:1,maxLength:128,pattern:"^[^\\u0000-\\u0020\\u007f]+$"},expectedCursor:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u0020\\u007f]+$"},expectedOldestAvailableCursor:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u0020\\u007f]+$"}}};export{ContractError,EVENTSDK_ORIGIN_PROOF_HEADER,EVENTSDK_ORIGIN_PROOF_TYPE,assertWireGrantVersion,canonicalJson,decodeCloudEvent,exchangeRegistrationJsonSchema,extractIdentityContext,gapBaselineJsonSchema,gapRecoveryCommandJsonSchema,isEventOriginProofWireForm,isSupportedMessagingProfile,outboxRecoveryCommandJsonSchema,parseBusinessReceipt,parseCloudEvent,parseEventOriginClaims,parseExchangeGrant,parseExchangeRegistration,parseFanoutEventDraft,parseGapBaseline,parseGapRecoveryCommand,parseIdentityContext,parseJsonStrict,parseNamespacedReference,parseNativeEventCatalog,parseNodeConnectionProfile,parseNodeWorkerObservation,parseOutboxRecoveryCommand,parsePublicJwksSnapshot,parseResultRef,parseTenantConnection,parseTenantContext,supportedMessagingProfiles,validateBusinessReceipt,validateCloudEvent,validateCloudEventV1,validateCloudEventV11,validateCloudEventV12,validateEventOriginClaims,validateExchangeGrant,validateExchangeRegistration,validateFanoutEventDraft,validateIdentityContext,validateNamespacedReference,validateNodeConnectionProfile,validateOutboxRecoveryCommand,validatePublicJwksSnapshot,validateResultRef,validateTenantConnection,validateTenantContext};
|
|
1
|
+
var MAX_DEPTH=64;var MAX_NODES=1e5;var MAX_LENGTH=1048576;function canonicalJson(value){const seen=new Set;return encode(value,seen,{nodes:0,bytes:0},0)}function reserve(bytes,budget){budget.bytes+=bytes;if(budget.bytes>MAX_LENGTH)throw new TypeError("JSON_SIZE_EXCEEDED")}function scalar(text,budget){reserve(new TextEncoder().encode(text).byteLength,budget);return text}function validString(value,budget){if(value.length>MAX_LENGTH)throw new TypeError("JSON_SIZE_EXCEEDED");if(/[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?<![\uD800-\uDBFF])[\uDC00-\uDFFF]/u.test(value))throw new TypeError("INVALID_UNICODE");return scalar(JSON.stringify(value),budget)}function encode(value,seen,budget,depth){if(++budget.nodes>MAX_NODES||depth>MAX_DEPTH)throw new TypeError("JSON_LIMIT_EXCEEDED");if(value===null)return scalar("null",budget);if(typeof value==="string")return validString(value,budget);if(typeof value==="boolean")return scalar(String(value),budget);if(typeof value==="number"){if(!Number.isFinite(value))throw new TypeError("INVALID_JSON_NUMBER");return scalar(JSON.stringify(value),budget)}if(typeof value!=="object")throw new TypeError("INVALID_JSON_VALUE");if(seen.has(value))throw new TypeError("CYCLIC_JSON");seen.add(value);try{return Array.isArray(value)?encodeArray(value,seen,budget,depth):encodeObject(value,seen,budget,depth)}finally{seen.delete(value)}}function encodeArray(value,seen,budget,depth){if(value.length>MAX_NODES)throw new TypeError("JSON_LIMIT_EXCEEDED");if(Reflect.ownKeys(value).length!==value.length+1)throw new TypeError("INVALID_JSON_ARRAY");reserve(value.length===0?2:value.length+1,budget);const values=[];for(let index=0;index<value.length;index++){const property=Object.getOwnPropertyDescriptor(value,String(index));if(!property||!("value"in property))throw new TypeError("INVALID_JSON_ARRAY");values.push(encode(property.value,seen,budget,depth+1))}return`[${values.join(",")}]`}function encodeObject(value,seen,budget,depth){const prototype=Object.getPrototypeOf(value);if(prototype!==Object.prototype&&prototype!==null)throw new TypeError("INVALID_JSON_OBJECT");if(Object.getOwnPropertySymbols(value).length>0)throw new TypeError("INVALID_JSON_OBJECT");const values=[];const keys=Object.keys(value);if(keys.length>MAX_NODES-budget.nodes)throw new TypeError("JSON_LIMIT_EXCEEDED");reserve(keys.length===0?2:keys.length*2+1,budget);for(const key of keys.sort()){const property=Object.getOwnPropertyDescriptor(value,key);if(!property||!("value"in property))throw new TypeError("INVALID_JSON_PROPERTY");values.push(`${validString(key,budget)}:${encode(property.value,seen,budget,depth+1)}`)}return`{${values.join(",")}}`}var EVENTSDK_ORIGIN_PROOF_HEADER="EventSDK-Origin-Proof";var EVENTSDK_ORIGIN_PROOF_TYPE="eventsdk-origin+jws";function isEventOriginProofWireForm(value){if(typeof value!=="string"||value.length>8192||!/^[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+$/.test(value))return false;try{const first=value.split(".")[0]??"";if(first.length>2048)return false;const normalized=first.replace(/-/g,"+").replace(/_/g,"/");const header=JSON.parse(atob(normalized));return!!header&&typeof header==="object"&&"typ"in header&&header.typ===EVENTSDK_ORIGIN_PROOF_TYPE}catch{return false}}var ContractError=class extends Error{constructor(issues){super("The value does not match the EventSDK contract");this.issues=issues;this.name="ContractError"}issues;code="INVALID_CONTRACT"};import runtime0 from"ajv/dist/runtime/ucs2length.js";import runtime1 from"ajv-formats/dist/formats.js";import runtime2 from"ajv/dist/runtime/equal.js";function validate20(data,{instancePath="",parentData,parentDataProperty,rootData=data,dynamicAnchors={}}={}){let vErrors=null;let errors=0;const evaluated0=validate20.evaluated;if(evaluated0.dynamicProps){evaluated0.props=void 0}if(evaluated0.dynamicItems){evaluated0.items=void 0}const _errs0=errors;let valid0=false;const _errs1=errors;if(data!==null){const err0={instancePath,schemaPath:"#/anyOf/0/type",keyword:"type",params:{type:"null"},message:"must be null"};if(vErrors===null){vErrors=[err0]}else{vErrors.push(err0)}errors++}var _valid0=_errs1===errors;valid0=valid0||_valid0;const _errs3=errors;if(typeof data!=="boolean"){const err1={instancePath,schemaPath:"#/anyOf/1/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};if(vErrors===null){vErrors=[err1]}else{vErrors.push(err1)}errors++}var _valid0=_errs3===errors;valid0=valid0||_valid0;const _errs5=errors;if(!(typeof data=="number"&&isFinite(data))){const err2={instancePath,schemaPath:"#/anyOf/2/type",keyword:"type",params:{type:"number"},message:"must be number"};if(vErrors===null){vErrors=[err2]}else{vErrors.push(err2)}errors++}var _valid0=_errs5===errors;valid0=valid0||_valid0;const _errs7=errors;if(typeof data!=="string"){const err3={instancePath,schemaPath:"#/anyOf/3/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err3]}else{vErrors.push(err3)}errors++}var _valid0=_errs7===errors;valid0=valid0||_valid0;const _errs9=errors;if(Array.isArray(data)){const len0=data.length;for(let i0=0;i0<len0;i0++){if(!validate20(data[i0],{instancePath:instancePath+"/"+i0,parentData:data,parentDataProperty:i0,rootData,dynamicAnchors})){vErrors=vErrors===null?validate20.errors:vErrors.concat(validate20.errors);errors=vErrors.length}}}else{const err4={instancePath,schemaPath:"#/anyOf/4/type",keyword:"type",params:{type:"array"},message:"must be array"};if(vErrors===null){vErrors=[err4]}else{vErrors.push(err4)}errors++}var _valid0=_errs9===errors;valid0=valid0||_valid0;if(_valid0){var items1=true}const _errs12=errors;if(data&&typeof data=="object"&&!Array.isArray(data)){for(const key0 in data){if(!validate20(data[key0],{instancePath:instancePath+"/"+key0.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:data,parentDataProperty:key0,rootData,dynamicAnchors})){vErrors=vErrors===null?validate20.errors:vErrors.concat(validate20.errors);errors=vErrors.length}}}else{const err5={instancePath,schemaPath:"#/anyOf/5/type",keyword:"type",params:{type:"object"},message:"must be object"};if(vErrors===null){vErrors=[err5]}else{vErrors.push(err5)}errors++}var _valid0=_errs12===errors;valid0=valid0||_valid0;if(_valid0){var props2=true}if(!valid0){const err6={instancePath,schemaPath:"#/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors===null){vErrors=[err6]}else{vErrors.push(err6)}errors++}else{errors=_errs0;if(vErrors!==null){if(_errs0){vErrors.length=_errs0}else{vErrors=null}}}validate20.errors=vErrors;evaluated0.props=props2;evaluated0.items=items1;return errors===0}validate20.evaluated={dynamicProps:true,dynamicItems:true};var resultRef=validate21;var func1=runtime0.default;var pattern4=new RegExp("^[^\\u0000-\\u001f\\u007f]+$","u");var pattern8=new RegExp("^sha256:[a-f0-9]{64}$","u");function validate21(data,{instancePath="",parentData,parentDataProperty,rootData=data,dynamicAnchors={}}={}){let vErrors=null;let errors=0;const evaluated0=validate21.evaluated;if(evaluated0.dynamicProps){evaluated0.props=void 0}if(evaluated0.dynamicItems){evaluated0.items=void 0}if(data&&typeof data=="object"&&!Array.isArray(data)){if(data.sourceSystem===void 0){const err0={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"sourceSystem"},message:"must have required property 'sourceSystem'"};if(vErrors===null){vErrors=[err0]}else{vErrors.push(err0)}errors++}if(data.resourceType===void 0){const err1={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"resourceType"},message:"must have required property 'resourceType'"};if(vErrors===null){vErrors=[err1]}else{vErrors.push(err1)}errors++}if(data.resourceId===void 0){const err2={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"resourceId"},message:"must have required property 'resourceId'"};if(vErrors===null){vErrors=[err2]}else{vErrors.push(err2)}errors++}if(data.revision===void 0){const err3={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"revision"},message:"must have required property 'revision'"};if(vErrors===null){vErrors=[err3]}else{vErrors.push(err3)}errors++}if(data.digest===void 0){const err4={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"digest"},message:"must have required property 'digest'"};if(vErrors===null){vErrors=[err4]}else{vErrors.push(err4)}errors++}for(const key0 in data){if(!(key0==="sourceSystem"||key0==="resourceType"||key0==="resourceId"||key0==="revision"||key0==="digest"||key0==="evidenceRef")){const err5={instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key0},message:"must NOT have additional properties"};if(vErrors===null){vErrors=[err5]}else{vErrors.push(err5)}errors++}}if(data.sourceSystem!==void 0){let data0=data.sourceSystem;if(typeof data0==="string"){if(func1(data0)>256){const err6={instancePath:instancePath+"/sourceSystem",schemaPath:"#/properties/sourceSystem/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err6]}else{vErrors.push(err6)}errors++}if(func1(data0)<1){const err7={instancePath:instancePath+"/sourceSystem",schemaPath:"#/properties/sourceSystem/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err7]}else{vErrors.push(err7)}errors++}if(!pattern4.test(data0)){const err8={instancePath:instancePath+"/sourceSystem",schemaPath:"#/properties/sourceSystem/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err8]}else{vErrors.push(err8)}errors++}}else{const err9={instancePath:instancePath+"/sourceSystem",schemaPath:"#/properties/sourceSystem/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err9]}else{vErrors.push(err9)}errors++}}if(data.resourceType!==void 0){let data1=data.resourceType;if(typeof data1==="string"){if(func1(data1)>256){const err10={instancePath:instancePath+"/resourceType",schemaPath:"#/properties/resourceType/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err10]}else{vErrors.push(err10)}errors++}if(func1(data1)<1){const err11={instancePath:instancePath+"/resourceType",schemaPath:"#/properties/resourceType/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err11]}else{vErrors.push(err11)}errors++}if(!pattern4.test(data1)){const err12={instancePath:instancePath+"/resourceType",schemaPath:"#/properties/resourceType/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err12]}else{vErrors.push(err12)}errors++}}else{const err13={instancePath:instancePath+"/resourceType",schemaPath:"#/properties/resourceType/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err13]}else{vErrors.push(err13)}errors++}}if(data.resourceId!==void 0){let data2=data.resourceId;if(typeof data2==="string"){if(func1(data2)>256){const err14={instancePath:instancePath+"/resourceId",schemaPath:"#/properties/resourceId/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err14]}else{vErrors.push(err14)}errors++}if(func1(data2)<1){const err15={instancePath:instancePath+"/resourceId",schemaPath:"#/properties/resourceId/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err15]}else{vErrors.push(err15)}errors++}if(!pattern4.test(data2)){const err16={instancePath:instancePath+"/resourceId",schemaPath:"#/properties/resourceId/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err16]}else{vErrors.push(err16)}errors++}}else{const err17={instancePath:instancePath+"/resourceId",schemaPath:"#/properties/resourceId/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err17]}else{vErrors.push(err17)}errors++}}if(data.revision!==void 0){let data3=data.revision;if(typeof data3==="string"){if(func1(data3)>256){const err18={instancePath:instancePath+"/revision",schemaPath:"#/properties/revision/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err18]}else{vErrors.push(err18)}errors++}if(func1(data3)<1){const err19={instancePath:instancePath+"/revision",schemaPath:"#/properties/revision/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err19]}else{vErrors.push(err19)}errors++}if(!pattern4.test(data3)){const err20={instancePath:instancePath+"/revision",schemaPath:"#/properties/revision/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err20]}else{vErrors.push(err20)}errors++}}else{const err21={instancePath:instancePath+"/revision",schemaPath:"#/properties/revision/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err21]}else{vErrors.push(err21)}errors++}}if(data.digest!==void 0){let data4=data.digest;if(typeof data4==="string"){if(!pattern8.test(data4)){const err22={instancePath:instancePath+"/digest",schemaPath:"#/properties/digest/pattern",keyword:"pattern",params:{pattern:"^sha256:[a-f0-9]{64}$"},message:'must match pattern "^sha256:[a-f0-9]{64}$"'};if(vErrors===null){vErrors=[err22]}else{vErrors.push(err22)}errors++}}else{const err23={instancePath:instancePath+"/digest",schemaPath:"#/properties/digest/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err23]}else{vErrors.push(err23)}errors++}}if(data.evidenceRef!==void 0){let data5=data.evidenceRef;if(typeof data5==="string"){if(func1(data5)>256){const err24={instancePath:instancePath+"/evidenceRef",schemaPath:"#/properties/evidenceRef/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err24]}else{vErrors.push(err24)}errors++}if(func1(data5)<1){const err25={instancePath:instancePath+"/evidenceRef",schemaPath:"#/properties/evidenceRef/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err25]}else{vErrors.push(err25)}errors++}if(!pattern4.test(data5)){const err26={instancePath:instancePath+"/evidenceRef",schemaPath:"#/properties/evidenceRef/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err26]}else{vErrors.push(err26)}errors++}}else{const err27={instancePath:instancePath+"/evidenceRef",schemaPath:"#/properties/evidenceRef/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err27]}else{vErrors.push(err27)}errors++}}}else{const err28={instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};if(vErrors===null){vErrors=[err28]}else{vErrors.push(err28)}errors++}validate21.errors=vErrors;return errors===0}validate21.evaluated={props:true,dynamicProps:false,dynamicItems:false};var cloudEvent=validate22;var schema33={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://eventsdk.dev/schemas/v1/cloud-event.schema.json",title:"CloudEvent",type:"object",additionalProperties:false,properties:{specversion:{const:"1.0",type:"string"},id:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u001f\\u007f]+$"},source:{type:"string",minLength:1,maxLength:2048,pattern:"^[^\\u0000-\\u001f\\u007f]+$",format:"uri"},type:{type:"string",minLength:1,maxLength:256,pattern:"^[a-zA-Z0-9][a-zA-Z0-9._-]*\\.v[1-9][0-9]*$"},time:{type:"string",format:"date-time",maxLength:64},dataschema:{type:"string",minLength:1,maxLength:2048,pattern:"^[^\\u0000-\\u001f\\u007f]+$",format:"uri"},datacontenttype:{const:"application/json",type:"string"},profile:{const:"eventsdk/1.0",type:"string"},kind:{enum:["EVENT","HANDOFF","RECEIPT"],type:"string"},serviceorigin:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u001f\\u007f]+$"},sourcetenant:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u001f\\u007f]+$",description:"Opaque tenant reference scoped by the required serviceorigin. The namespace is the ordered pair (serviceorigin, sourcetenant)."},audience:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u001f\\u007f]+$"},connectionref:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u001f\\u007f]+$"},grantref:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u001f\\u007f]+$"},grantversion:{type:"integer",minimum:1,maximum:2147483647},correlationid:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u001f\\u007f]+$"},causationid:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u001f\\u007f]+$"},subject:{type:"string",minLength:1,maxLength:1024,pattern:"^[^\\u0000-\\u001f\\u007f]+$"},data:{$ref:"json-value.schema.json"}},required:["specversion","id","source","type","time","dataschema","datacontenttype","profile","kind","serviceorigin","sourcetenant","audience","connectionref","grantref","grantversion","correlationid","data"]};var func11=Object.prototype.hasOwnProperty;var pattern12=new RegExp("^[a-zA-Z0-9][a-zA-Z0-9._-]*\\.v[1-9][0-9]*$","u");var formats0=runtime1.fullFormats.uri;var formats2=runtime1.fullFormats["date-time"];function validate22(data,{instancePath="",parentData,parentDataProperty,rootData=data,dynamicAnchors={}}={}){let vErrors=null;let errors=0;const evaluated0=validate22.evaluated;if(evaluated0.dynamicProps){evaluated0.props=void 0}if(evaluated0.dynamicItems){evaluated0.items=void 0}if(data&&typeof data=="object"&&!Array.isArray(data)){if(data.specversion===void 0){const err0={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"specversion"},message:"must have required property 'specversion'"};if(vErrors===null){vErrors=[err0]}else{vErrors.push(err0)}errors++}if(data.id===void 0){const err1={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};if(vErrors===null){vErrors=[err1]}else{vErrors.push(err1)}errors++}if(data.source===void 0){const err2={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"source"},message:"must have required property 'source'"};if(vErrors===null){vErrors=[err2]}else{vErrors.push(err2)}errors++}if(data.type===void 0){const err3={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};if(vErrors===null){vErrors=[err3]}else{vErrors.push(err3)}errors++}if(data.time===void 0){const err4={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"time"},message:"must have required property 'time'"};if(vErrors===null){vErrors=[err4]}else{vErrors.push(err4)}errors++}if(data.dataschema===void 0){const err5={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"dataschema"},message:"must have required property 'dataschema'"};if(vErrors===null){vErrors=[err5]}else{vErrors.push(err5)}errors++}if(data.datacontenttype===void 0){const err6={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"datacontenttype"},message:"must have required property 'datacontenttype'"};if(vErrors===null){vErrors=[err6]}else{vErrors.push(err6)}errors++}if(data.profile===void 0){const err7={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"profile"},message:"must have required property 'profile'"};if(vErrors===null){vErrors=[err7]}else{vErrors.push(err7)}errors++}if(data.kind===void 0){const err8={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"kind"},message:"must have required property 'kind'"};if(vErrors===null){vErrors=[err8]}else{vErrors.push(err8)}errors++}if(data.serviceorigin===void 0){const err9={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"serviceorigin"},message:"must have required property 'serviceorigin'"};if(vErrors===null){vErrors=[err9]}else{vErrors.push(err9)}errors++}if(data.sourcetenant===void 0){const err10={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"sourcetenant"},message:"must have required property 'sourcetenant'"};if(vErrors===null){vErrors=[err10]}else{vErrors.push(err10)}errors++}if(data.audience===void 0){const err11={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"audience"},message:"must have required property 'audience'"};if(vErrors===null){vErrors=[err11]}else{vErrors.push(err11)}errors++}if(data.connectionref===void 0){const err12={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"connectionref"},message:"must have required property 'connectionref'"};if(vErrors===null){vErrors=[err12]}else{vErrors.push(err12)}errors++}if(data.grantref===void 0){const err13={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"grantref"},message:"must have required property 'grantref'"};if(vErrors===null){vErrors=[err13]}else{vErrors.push(err13)}errors++}if(data.grantversion===void 0){const err14={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"grantversion"},message:"must have required property 'grantversion'"};if(vErrors===null){vErrors=[err14]}else{vErrors.push(err14)}errors++}if(data.correlationid===void 0){const err15={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"correlationid"},message:"must have required property 'correlationid'"};if(vErrors===null){vErrors=[err15]}else{vErrors.push(err15)}errors++}if(data.data===void 0){const err16={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"data"},message:"must have required property 'data'"};if(vErrors===null){vErrors=[err16]}else{vErrors.push(err16)}errors++}for(const key0 in data){if(!func11.call(schema33.properties,key0)){const err17={instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key0},message:"must NOT have additional properties"};if(vErrors===null){vErrors=[err17]}else{vErrors.push(err17)}errors++}}if(data.specversion!==void 0){let data0=data.specversion;if(typeof data0!=="string"){const err18={instancePath:instancePath+"/specversion",schemaPath:"#/properties/specversion/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err18]}else{vErrors.push(err18)}errors++}if("1.0"!==data0){const err19={instancePath:instancePath+"/specversion",schemaPath:"#/properties/specversion/const",keyword:"const",params:{allowedValue:"1.0"},message:"must be equal to constant"};if(vErrors===null){vErrors=[err19]}else{vErrors.push(err19)}errors++}}if(data.id!==void 0){let data1=data.id;if(typeof data1==="string"){if(func1(data1)>256){const err20={instancePath:instancePath+"/id",schemaPath:"#/properties/id/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err20]}else{vErrors.push(err20)}errors++}if(func1(data1)<1){const err21={instancePath:instancePath+"/id",schemaPath:"#/properties/id/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err21]}else{vErrors.push(err21)}errors++}if(!pattern4.test(data1)){const err22={instancePath:instancePath+"/id",schemaPath:"#/properties/id/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err22]}else{vErrors.push(err22)}errors++}}else{const err23={instancePath:instancePath+"/id",schemaPath:"#/properties/id/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err23]}else{vErrors.push(err23)}errors++}}if(data.source!==void 0){let data2=data.source;if(typeof data2==="string"){if(func1(data2)>2048){const err24={instancePath:instancePath+"/source",schemaPath:"#/properties/source/maxLength",keyword:"maxLength",params:{limit:2048},message:"must NOT have more than 2048 characters"};if(vErrors===null){vErrors=[err24]}else{vErrors.push(err24)}errors++}if(func1(data2)<1){const err25={instancePath:instancePath+"/source",schemaPath:"#/properties/source/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err25]}else{vErrors.push(err25)}errors++}if(!pattern4.test(data2)){const err26={instancePath:instancePath+"/source",schemaPath:"#/properties/source/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err26]}else{vErrors.push(err26)}errors++}if(!formats0(data2)){const err27={instancePath:instancePath+"/source",schemaPath:"#/properties/source/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};if(vErrors===null){vErrors=[err27]}else{vErrors.push(err27)}errors++}}else{const err28={instancePath:instancePath+"/source",schemaPath:"#/properties/source/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err28]}else{vErrors.push(err28)}errors++}}if(data.type!==void 0){let data3=data.type;if(typeof data3==="string"){if(func1(data3)>256){const err29={instancePath:instancePath+"/type",schemaPath:"#/properties/type/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err29]}else{vErrors.push(err29)}errors++}if(func1(data3)<1){const err30={instancePath:instancePath+"/type",schemaPath:"#/properties/type/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err30]}else{vErrors.push(err30)}errors++}if(!pattern12.test(data3)){const err31={instancePath:instancePath+"/type",schemaPath:"#/properties/type/pattern",keyword:"pattern",params:{pattern:"^[a-zA-Z0-9][a-zA-Z0-9._-]*\\.v[1-9][0-9]*$"},message:'must match pattern "^[a-zA-Z0-9][a-zA-Z0-9._-]*\\.v[1-9][0-9]*$"'};if(vErrors===null){vErrors=[err31]}else{vErrors.push(err31)}errors++}}else{const err32={instancePath:instancePath+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err32]}else{vErrors.push(err32)}errors++}}if(data.time!==void 0){let data4=data.time;if(typeof data4==="string"){if(func1(data4)>64){const err33={instancePath:instancePath+"/time",schemaPath:"#/properties/time/maxLength",keyword:"maxLength",params:{limit:64},message:"must NOT have more than 64 characters"};if(vErrors===null){vErrors=[err33]}else{vErrors.push(err33)}errors++}if(!formats2.validate(data4)){const err34={instancePath:instancePath+"/time",schemaPath:"#/properties/time/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};if(vErrors===null){vErrors=[err34]}else{vErrors.push(err34)}errors++}}else{const err35={instancePath:instancePath+"/time",schemaPath:"#/properties/time/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err35]}else{vErrors.push(err35)}errors++}}if(data.dataschema!==void 0){let data5=data.dataschema;if(typeof data5==="string"){if(func1(data5)>2048){const err36={instancePath:instancePath+"/dataschema",schemaPath:"#/properties/dataschema/maxLength",keyword:"maxLength",params:{limit:2048},message:"must NOT have more than 2048 characters"};if(vErrors===null){vErrors=[err36]}else{vErrors.push(err36)}errors++}if(func1(data5)<1){const err37={instancePath:instancePath+"/dataschema",schemaPath:"#/properties/dataschema/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err37]}else{vErrors.push(err37)}errors++}if(!pattern4.test(data5)){const err38={instancePath:instancePath+"/dataschema",schemaPath:"#/properties/dataschema/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err38]}else{vErrors.push(err38)}errors++}if(!formats0(data5)){const err39={instancePath:instancePath+"/dataschema",schemaPath:"#/properties/dataschema/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};if(vErrors===null){vErrors=[err39]}else{vErrors.push(err39)}errors++}}else{const err40={instancePath:instancePath+"/dataschema",schemaPath:"#/properties/dataschema/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err40]}else{vErrors.push(err40)}errors++}}if(data.datacontenttype!==void 0){let data6=data.datacontenttype;if(typeof data6!=="string"){const err41={instancePath:instancePath+"/datacontenttype",schemaPath:"#/properties/datacontenttype/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err41]}else{vErrors.push(err41)}errors++}if("application/json"!==data6){const err42={instancePath:instancePath+"/datacontenttype",schemaPath:"#/properties/datacontenttype/const",keyword:"const",params:{allowedValue:"application/json"},message:"must be equal to constant"};if(vErrors===null){vErrors=[err42]}else{vErrors.push(err42)}errors++}}if(data.profile!==void 0){let data7=data.profile;if(typeof data7!=="string"){const err43={instancePath:instancePath+"/profile",schemaPath:"#/properties/profile/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err43]}else{vErrors.push(err43)}errors++}if("eventsdk/1.0"!==data7){const err44={instancePath:instancePath+"/profile",schemaPath:"#/properties/profile/const",keyword:"const",params:{allowedValue:"eventsdk/1.0"},message:"must be equal to constant"};if(vErrors===null){vErrors=[err44]}else{vErrors.push(err44)}errors++}}if(data.kind!==void 0){let data8=data.kind;if(typeof data8!=="string"){const err45={instancePath:instancePath+"/kind",schemaPath:"#/properties/kind/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err45]}else{vErrors.push(err45)}errors++}if(!(data8==="EVENT"||data8==="HANDOFF"||data8==="RECEIPT")){const err46={instancePath:instancePath+"/kind",schemaPath:"#/properties/kind/enum",keyword:"enum",params:{allowedValues:schema33.properties.kind.enum},message:"must be equal to one of the allowed values"};if(vErrors===null){vErrors=[err46]}else{vErrors.push(err46)}errors++}}if(data.serviceorigin!==void 0){let data9=data.serviceorigin;if(typeof data9==="string"){if(func1(data9)>256){const err47={instancePath:instancePath+"/serviceorigin",schemaPath:"#/properties/serviceorigin/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err47]}else{vErrors.push(err47)}errors++}if(func1(data9)<1){const err48={instancePath:instancePath+"/serviceorigin",schemaPath:"#/properties/serviceorigin/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err48]}else{vErrors.push(err48)}errors++}if(!pattern4.test(data9)){const err49={instancePath:instancePath+"/serviceorigin",schemaPath:"#/properties/serviceorigin/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err49]}else{vErrors.push(err49)}errors++}}else{const err50={instancePath:instancePath+"/serviceorigin",schemaPath:"#/properties/serviceorigin/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err50]}else{vErrors.push(err50)}errors++}}if(data.sourcetenant!==void 0){let data10=data.sourcetenant;if(typeof data10==="string"){if(func1(data10)>256){const err51={instancePath:instancePath+"/sourcetenant",schemaPath:"#/properties/sourcetenant/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err51]}else{vErrors.push(err51)}errors++}if(func1(data10)<1){const err52={instancePath:instancePath+"/sourcetenant",schemaPath:"#/properties/sourcetenant/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err52]}else{vErrors.push(err52)}errors++}if(!pattern4.test(data10)){const err53={instancePath:instancePath+"/sourcetenant",schemaPath:"#/properties/sourcetenant/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err53]}else{vErrors.push(err53)}errors++}}else{const err54={instancePath:instancePath+"/sourcetenant",schemaPath:"#/properties/sourcetenant/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err54]}else{vErrors.push(err54)}errors++}}if(data.audience!==void 0){let data11=data.audience;if(typeof data11==="string"){if(func1(data11)>256){const err55={instancePath:instancePath+"/audience",schemaPath:"#/properties/audience/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err55]}else{vErrors.push(err55)}errors++}if(func1(data11)<1){const err56={instancePath:instancePath+"/audience",schemaPath:"#/properties/audience/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err56]}else{vErrors.push(err56)}errors++}if(!pattern4.test(data11)){const err57={instancePath:instancePath+"/audience",schemaPath:"#/properties/audience/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err57]}else{vErrors.push(err57)}errors++}}else{const err58={instancePath:instancePath+"/audience",schemaPath:"#/properties/audience/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err58]}else{vErrors.push(err58)}errors++}}if(data.connectionref!==void 0){let data12=data.connectionref;if(typeof data12==="string"){if(func1(data12)>256){const err59={instancePath:instancePath+"/connectionref",schemaPath:"#/properties/connectionref/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err59]}else{vErrors.push(err59)}errors++}if(func1(data12)<1){const err60={instancePath:instancePath+"/connectionref",schemaPath:"#/properties/connectionref/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err60]}else{vErrors.push(err60)}errors++}if(!pattern4.test(data12)){const err61={instancePath:instancePath+"/connectionref",schemaPath:"#/properties/connectionref/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err61]}else{vErrors.push(err61)}errors++}}else{const err62={instancePath:instancePath+"/connectionref",schemaPath:"#/properties/connectionref/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err62]}else{vErrors.push(err62)}errors++}}if(data.grantref!==void 0){let data13=data.grantref;if(typeof data13==="string"){if(func1(data13)>256){const err63={instancePath:instancePath+"/grantref",schemaPath:"#/properties/grantref/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err63]}else{vErrors.push(err63)}errors++}if(func1(data13)<1){const err64={instancePath:instancePath+"/grantref",schemaPath:"#/properties/grantref/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err64]}else{vErrors.push(err64)}errors++}if(!pattern4.test(data13)){const err65={instancePath:instancePath+"/grantref",schemaPath:"#/properties/grantref/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err65]}else{vErrors.push(err65)}errors++}}else{const err66={instancePath:instancePath+"/grantref",schemaPath:"#/properties/grantref/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err66]}else{vErrors.push(err66)}errors++}}if(data.grantversion!==void 0){let data14=data.grantversion;if(!(typeof data14=="number"&&!(data14%1)&&!isNaN(data14)&&isFinite(data14))){const err67={instancePath:instancePath+"/grantversion",schemaPath:"#/properties/grantversion/type",keyword:"type",params:{type:"integer"},message:"must be integer"};if(vErrors===null){vErrors=[err67]}else{vErrors.push(err67)}errors++}if(typeof data14=="number"&&isFinite(data14)){if(data14>2147483647||isNaN(data14)){const err68={instancePath:instancePath+"/grantversion",schemaPath:"#/properties/grantversion/maximum",keyword:"maximum",params:{comparison:"<=",limit:2147483647},message:"must be <= 2147483647"};if(vErrors===null){vErrors=[err68]}else{vErrors.push(err68)}errors++}if(data14<1||isNaN(data14)){const err69={instancePath:instancePath+"/grantversion",schemaPath:"#/properties/grantversion/minimum",keyword:"minimum",params:{comparison:">=",limit:1},message:"must be >= 1"};if(vErrors===null){vErrors=[err69]}else{vErrors.push(err69)}errors++}}}if(data.correlationid!==void 0){let data15=data.correlationid;if(typeof data15==="string"){if(func1(data15)>256){const err70={instancePath:instancePath+"/correlationid",schemaPath:"#/properties/correlationid/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err70]}else{vErrors.push(err70)}errors++}if(func1(data15)<1){const err71={instancePath:instancePath+"/correlationid",schemaPath:"#/properties/correlationid/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err71]}else{vErrors.push(err71)}errors++}if(!pattern4.test(data15)){const err72={instancePath:instancePath+"/correlationid",schemaPath:"#/properties/correlationid/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err72]}else{vErrors.push(err72)}errors++}}else{const err73={instancePath:instancePath+"/correlationid",schemaPath:"#/properties/correlationid/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err73]}else{vErrors.push(err73)}errors++}}if(data.causationid!==void 0){let data16=data.causationid;if(typeof data16==="string"){if(func1(data16)>256){const err74={instancePath:instancePath+"/causationid",schemaPath:"#/properties/causationid/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err74]}else{vErrors.push(err74)}errors++}if(func1(data16)<1){const err75={instancePath:instancePath+"/causationid",schemaPath:"#/properties/causationid/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err75]}else{vErrors.push(err75)}errors++}if(!pattern4.test(data16)){const err76={instancePath:instancePath+"/causationid",schemaPath:"#/properties/causationid/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err76]}else{vErrors.push(err76)}errors++}}else{const err77={instancePath:instancePath+"/causationid",schemaPath:"#/properties/causationid/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err77]}else{vErrors.push(err77)}errors++}}if(data.subject!==void 0){let data17=data.subject;if(typeof data17==="string"){if(func1(data17)>1024){const err78={instancePath:instancePath+"/subject",schemaPath:"#/properties/subject/maxLength",keyword:"maxLength",params:{limit:1024},message:"must NOT have more than 1024 characters"};if(vErrors===null){vErrors=[err78]}else{vErrors.push(err78)}errors++}if(func1(data17)<1){const err79={instancePath:instancePath+"/subject",schemaPath:"#/properties/subject/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err79]}else{vErrors.push(err79)}errors++}if(!pattern4.test(data17)){const err80={instancePath:instancePath+"/subject",schemaPath:"#/properties/subject/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err80]}else{vErrors.push(err80)}errors++}}else{const err81={instancePath:instancePath+"/subject",schemaPath:"#/properties/subject/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err81]}else{vErrors.push(err81)}errors++}}if(data.data!==void 0){if(!validate20(data.data,{instancePath:instancePath+"/data",parentData:data,parentDataProperty:"data",rootData,dynamicAnchors})){vErrors=vErrors===null?validate20.errors:vErrors.concat(validate20.errors);errors=vErrors.length}}}else{const err82={instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};if(vErrors===null){vErrors=[err82]}else{vErrors.push(err82)}errors++}validate22.errors=vErrors;return errors===0}validate22.evaluated={props:true,dynamicProps:false,dynamicItems:false};var cloudEventContext=validate24;var schema34={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://eventsdk.dev/schemas/v1/cloud-event-context.schema.json",title:"CloudEventContext",type:"object",additionalProperties:false,properties:{specversion:{const:"1.0",type:"string"},id:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u001f\\u007f]+$"},source:{type:"string",minLength:1,maxLength:2048,pattern:"^[^\\u0000-\\u001f\\u007f]+$",format:"uri"},type:{type:"string",minLength:1,maxLength:256,pattern:"^[a-zA-Z0-9][a-zA-Z0-9._-]*\\.v[1-9][0-9]*$"},time:{type:"string",format:"date-time",maxLength:64},dataschema:{type:"string",minLength:1,maxLength:2048,pattern:"^[^\\u0000-\\u001f\\u007f]+$",format:"uri"},datacontenttype:{const:"application/json",type:"string"},profile:{const:"eventsdk/1.1",type:"string"},kind:{enum:["EVENT","HANDOFF","RECEIPT"],type:"string"},serviceorigin:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u001f\\u007f]+$"},sourcetenant:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u001f\\u007f]+$",description:"Opaque tenant reference scoped by the required serviceorigin. The namespace is the ordered pair (serviceorigin, sourcetenant)."},audience:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u001f\\u007f]+$"},connectionref:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u001f\\u007f]+$"},grantref:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u001f\\u007f]+$"},grantversion:{type:"integer",minimum:1,maximum:2147483647},correlationid:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u001f\\u007f]+$"},causationid:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u001f\\u007f]+$"},subject:{type:"string",minLength:1,maxLength:1024,pattern:"^[^\\u0000-\\u001f\\u007f]+$"},data:{$ref:"json-value.schema.json"},orgnamespace:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u001f\\u007f]+$"},orgref:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u001f\\u007f]+$"},projectnamespace:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u001f\\u007f]+$"},projectref:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u001f\\u007f]+$"},principalnamespace:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u001f\\u007f]+$"},principalref:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u001f\\u007f]+$"},resourcenamespace:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u001f\\u007f]+$"},resourceref:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u001f\\u007f]+$"}},required:["specversion","id","source","type","time","dataschema","datacontenttype","profile","kind","serviceorigin","sourcetenant","audience","connectionref","grantref","grantversion","correlationid","data"],dependentRequired:{orgnamespace:["orgref"],orgref:["orgnamespace"],projectnamespace:["projectref"],projectref:["projectnamespace"],principalnamespace:["principalref"],principalref:["principalnamespace"],resourcenamespace:["resourceref"],resourceref:["resourcenamespace"]}};function validate24(data,{instancePath="",parentData,parentDataProperty,rootData=data,dynamicAnchors={}}={}){let vErrors=null;let errors=0;const evaluated0=validate24.evaluated;if(evaluated0.dynamicProps){evaluated0.props=void 0}if(evaluated0.dynamicItems){evaluated0.items=void 0}if(data&&typeof data=="object"&&!Array.isArray(data)){if(data.specversion===void 0){const err0={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"specversion"},message:"must have required property 'specversion'"};if(vErrors===null){vErrors=[err0]}else{vErrors.push(err0)}errors++}if(data.id===void 0){const err1={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};if(vErrors===null){vErrors=[err1]}else{vErrors.push(err1)}errors++}if(data.source===void 0){const err2={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"source"},message:"must have required property 'source'"};if(vErrors===null){vErrors=[err2]}else{vErrors.push(err2)}errors++}if(data.type===void 0){const err3={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};if(vErrors===null){vErrors=[err3]}else{vErrors.push(err3)}errors++}if(data.time===void 0){const err4={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"time"},message:"must have required property 'time'"};if(vErrors===null){vErrors=[err4]}else{vErrors.push(err4)}errors++}if(data.dataschema===void 0){const err5={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"dataschema"},message:"must have required property 'dataschema'"};if(vErrors===null){vErrors=[err5]}else{vErrors.push(err5)}errors++}if(data.datacontenttype===void 0){const err6={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"datacontenttype"},message:"must have required property 'datacontenttype'"};if(vErrors===null){vErrors=[err6]}else{vErrors.push(err6)}errors++}if(data.profile===void 0){const err7={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"profile"},message:"must have required property 'profile'"};if(vErrors===null){vErrors=[err7]}else{vErrors.push(err7)}errors++}if(data.kind===void 0){const err8={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"kind"},message:"must have required property 'kind'"};if(vErrors===null){vErrors=[err8]}else{vErrors.push(err8)}errors++}if(data.serviceorigin===void 0){const err9={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"serviceorigin"},message:"must have required property 'serviceorigin'"};if(vErrors===null){vErrors=[err9]}else{vErrors.push(err9)}errors++}if(data.sourcetenant===void 0){const err10={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"sourcetenant"},message:"must have required property 'sourcetenant'"};if(vErrors===null){vErrors=[err10]}else{vErrors.push(err10)}errors++}if(data.audience===void 0){const err11={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"audience"},message:"must have required property 'audience'"};if(vErrors===null){vErrors=[err11]}else{vErrors.push(err11)}errors++}if(data.connectionref===void 0){const err12={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"connectionref"},message:"must have required property 'connectionref'"};if(vErrors===null){vErrors=[err12]}else{vErrors.push(err12)}errors++}if(data.grantref===void 0){const err13={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"grantref"},message:"must have required property 'grantref'"};if(vErrors===null){vErrors=[err13]}else{vErrors.push(err13)}errors++}if(data.grantversion===void 0){const err14={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"grantversion"},message:"must have required property 'grantversion'"};if(vErrors===null){vErrors=[err14]}else{vErrors.push(err14)}errors++}if(data.correlationid===void 0){const err15={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"correlationid"},message:"must have required property 'correlationid'"};if(vErrors===null){vErrors=[err15]}else{vErrors.push(err15)}errors++}if(data.data===void 0){const err16={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"data"},message:"must have required property 'data'"};if(vErrors===null){vErrors=[err16]}else{vErrors.push(err16)}errors++}for(const key0 in data){if(!func11.call(schema34.properties,key0)){const err17={instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key0},message:"must NOT have additional properties"};if(vErrors===null){vErrors=[err17]}else{vErrors.push(err17)}errors++}}if(data.specversion!==void 0){let data0=data.specversion;if(typeof data0!=="string"){const err18={instancePath:instancePath+"/specversion",schemaPath:"#/properties/specversion/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err18]}else{vErrors.push(err18)}errors++}if("1.0"!==data0){const err19={instancePath:instancePath+"/specversion",schemaPath:"#/properties/specversion/const",keyword:"const",params:{allowedValue:"1.0"},message:"must be equal to constant"};if(vErrors===null){vErrors=[err19]}else{vErrors.push(err19)}errors++}}if(data.id!==void 0){let data1=data.id;if(typeof data1==="string"){if(func1(data1)>256){const err20={instancePath:instancePath+"/id",schemaPath:"#/properties/id/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err20]}else{vErrors.push(err20)}errors++}if(func1(data1)<1){const err21={instancePath:instancePath+"/id",schemaPath:"#/properties/id/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err21]}else{vErrors.push(err21)}errors++}if(!pattern4.test(data1)){const err22={instancePath:instancePath+"/id",schemaPath:"#/properties/id/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err22]}else{vErrors.push(err22)}errors++}}else{const err23={instancePath:instancePath+"/id",schemaPath:"#/properties/id/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err23]}else{vErrors.push(err23)}errors++}}if(data.source!==void 0){let data2=data.source;if(typeof data2==="string"){if(func1(data2)>2048){const err24={instancePath:instancePath+"/source",schemaPath:"#/properties/source/maxLength",keyword:"maxLength",params:{limit:2048},message:"must NOT have more than 2048 characters"};if(vErrors===null){vErrors=[err24]}else{vErrors.push(err24)}errors++}if(func1(data2)<1){const err25={instancePath:instancePath+"/source",schemaPath:"#/properties/source/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err25]}else{vErrors.push(err25)}errors++}if(!pattern4.test(data2)){const err26={instancePath:instancePath+"/source",schemaPath:"#/properties/source/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err26]}else{vErrors.push(err26)}errors++}if(!formats0(data2)){const err27={instancePath:instancePath+"/source",schemaPath:"#/properties/source/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};if(vErrors===null){vErrors=[err27]}else{vErrors.push(err27)}errors++}}else{const err28={instancePath:instancePath+"/source",schemaPath:"#/properties/source/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err28]}else{vErrors.push(err28)}errors++}}if(data.type!==void 0){let data3=data.type;if(typeof data3==="string"){if(func1(data3)>256){const err29={instancePath:instancePath+"/type",schemaPath:"#/properties/type/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err29]}else{vErrors.push(err29)}errors++}if(func1(data3)<1){const err30={instancePath:instancePath+"/type",schemaPath:"#/properties/type/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err30]}else{vErrors.push(err30)}errors++}if(!pattern12.test(data3)){const err31={instancePath:instancePath+"/type",schemaPath:"#/properties/type/pattern",keyword:"pattern",params:{pattern:"^[a-zA-Z0-9][a-zA-Z0-9._-]*\\.v[1-9][0-9]*$"},message:'must match pattern "^[a-zA-Z0-9][a-zA-Z0-9._-]*\\.v[1-9][0-9]*$"'};if(vErrors===null){vErrors=[err31]}else{vErrors.push(err31)}errors++}}else{const err32={instancePath:instancePath+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err32]}else{vErrors.push(err32)}errors++}}if(data.time!==void 0){let data4=data.time;if(typeof data4==="string"){if(func1(data4)>64){const err33={instancePath:instancePath+"/time",schemaPath:"#/properties/time/maxLength",keyword:"maxLength",params:{limit:64},message:"must NOT have more than 64 characters"};if(vErrors===null){vErrors=[err33]}else{vErrors.push(err33)}errors++}if(!formats2.validate(data4)){const err34={instancePath:instancePath+"/time",schemaPath:"#/properties/time/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};if(vErrors===null){vErrors=[err34]}else{vErrors.push(err34)}errors++}}else{const err35={instancePath:instancePath+"/time",schemaPath:"#/properties/time/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err35]}else{vErrors.push(err35)}errors++}}if(data.dataschema!==void 0){let data5=data.dataschema;if(typeof data5==="string"){if(func1(data5)>2048){const err36={instancePath:instancePath+"/dataschema",schemaPath:"#/properties/dataschema/maxLength",keyword:"maxLength",params:{limit:2048},message:"must NOT have more than 2048 characters"};if(vErrors===null){vErrors=[err36]}else{vErrors.push(err36)}errors++}if(func1(data5)<1){const err37={instancePath:instancePath+"/dataschema",schemaPath:"#/properties/dataschema/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err37]}else{vErrors.push(err37)}errors++}if(!pattern4.test(data5)){const err38={instancePath:instancePath+"/dataschema",schemaPath:"#/properties/dataschema/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err38]}else{vErrors.push(err38)}errors++}if(!formats0(data5)){const err39={instancePath:instancePath+"/dataschema",schemaPath:"#/properties/dataschema/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};if(vErrors===null){vErrors=[err39]}else{vErrors.push(err39)}errors++}}else{const err40={instancePath:instancePath+"/dataschema",schemaPath:"#/properties/dataschema/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err40]}else{vErrors.push(err40)}errors++}}if(data.datacontenttype!==void 0){let data6=data.datacontenttype;if(typeof data6!=="string"){const err41={instancePath:instancePath+"/datacontenttype",schemaPath:"#/properties/datacontenttype/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err41]}else{vErrors.push(err41)}errors++}if("application/json"!==data6){const err42={instancePath:instancePath+"/datacontenttype",schemaPath:"#/properties/datacontenttype/const",keyword:"const",params:{allowedValue:"application/json"},message:"must be equal to constant"};if(vErrors===null){vErrors=[err42]}else{vErrors.push(err42)}errors++}}if(data.profile!==void 0){let data7=data.profile;if(typeof data7!=="string"){const err43={instancePath:instancePath+"/profile",schemaPath:"#/properties/profile/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err43]}else{vErrors.push(err43)}errors++}if("eventsdk/1.1"!==data7){const err44={instancePath:instancePath+"/profile",schemaPath:"#/properties/profile/const",keyword:"const",params:{allowedValue:"eventsdk/1.1"},message:"must be equal to constant"};if(vErrors===null){vErrors=[err44]}else{vErrors.push(err44)}errors++}}if(data.kind!==void 0){let data8=data.kind;if(typeof data8!=="string"){const err45={instancePath:instancePath+"/kind",schemaPath:"#/properties/kind/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err45]}else{vErrors.push(err45)}errors++}if(!(data8==="EVENT"||data8==="HANDOFF"||data8==="RECEIPT")){const err46={instancePath:instancePath+"/kind",schemaPath:"#/properties/kind/enum",keyword:"enum",params:{allowedValues:schema34.properties.kind.enum},message:"must be equal to one of the allowed values"};if(vErrors===null){vErrors=[err46]}else{vErrors.push(err46)}errors++}}if(data.serviceorigin!==void 0){let data9=data.serviceorigin;if(typeof data9==="string"){if(func1(data9)>256){const err47={instancePath:instancePath+"/serviceorigin",schemaPath:"#/properties/serviceorigin/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err47]}else{vErrors.push(err47)}errors++}if(func1(data9)<1){const err48={instancePath:instancePath+"/serviceorigin",schemaPath:"#/properties/serviceorigin/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err48]}else{vErrors.push(err48)}errors++}if(!pattern4.test(data9)){const err49={instancePath:instancePath+"/serviceorigin",schemaPath:"#/properties/serviceorigin/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err49]}else{vErrors.push(err49)}errors++}}else{const err50={instancePath:instancePath+"/serviceorigin",schemaPath:"#/properties/serviceorigin/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err50]}else{vErrors.push(err50)}errors++}}if(data.sourcetenant!==void 0){let data10=data.sourcetenant;if(typeof data10==="string"){if(func1(data10)>256){const err51={instancePath:instancePath+"/sourcetenant",schemaPath:"#/properties/sourcetenant/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err51]}else{vErrors.push(err51)}errors++}if(func1(data10)<1){const err52={instancePath:instancePath+"/sourcetenant",schemaPath:"#/properties/sourcetenant/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err52]}else{vErrors.push(err52)}errors++}if(!pattern4.test(data10)){const err53={instancePath:instancePath+"/sourcetenant",schemaPath:"#/properties/sourcetenant/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err53]}else{vErrors.push(err53)}errors++}}else{const err54={instancePath:instancePath+"/sourcetenant",schemaPath:"#/properties/sourcetenant/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err54]}else{vErrors.push(err54)}errors++}}if(data.audience!==void 0){let data11=data.audience;if(typeof data11==="string"){if(func1(data11)>256){const err55={instancePath:instancePath+"/audience",schemaPath:"#/properties/audience/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err55]}else{vErrors.push(err55)}errors++}if(func1(data11)<1){const err56={instancePath:instancePath+"/audience",schemaPath:"#/properties/audience/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err56]}else{vErrors.push(err56)}errors++}if(!pattern4.test(data11)){const err57={instancePath:instancePath+"/audience",schemaPath:"#/properties/audience/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err57]}else{vErrors.push(err57)}errors++}}else{const err58={instancePath:instancePath+"/audience",schemaPath:"#/properties/audience/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err58]}else{vErrors.push(err58)}errors++}}if(data.connectionref!==void 0){let data12=data.connectionref;if(typeof data12==="string"){if(func1(data12)>256){const err59={instancePath:instancePath+"/connectionref",schemaPath:"#/properties/connectionref/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err59]}else{vErrors.push(err59)}errors++}if(func1(data12)<1){const err60={instancePath:instancePath+"/connectionref",schemaPath:"#/properties/connectionref/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err60]}else{vErrors.push(err60)}errors++}if(!pattern4.test(data12)){const err61={instancePath:instancePath+"/connectionref",schemaPath:"#/properties/connectionref/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err61]}else{vErrors.push(err61)}errors++}}else{const err62={instancePath:instancePath+"/connectionref",schemaPath:"#/properties/connectionref/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err62]}else{vErrors.push(err62)}errors++}}if(data.grantref!==void 0){let data13=data.grantref;if(typeof data13==="string"){if(func1(data13)>256){const err63={instancePath:instancePath+"/grantref",schemaPath:"#/properties/grantref/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err63]}else{vErrors.push(err63)}errors++}if(func1(data13)<1){const err64={instancePath:instancePath+"/grantref",schemaPath:"#/properties/grantref/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err64]}else{vErrors.push(err64)}errors++}if(!pattern4.test(data13)){const err65={instancePath:instancePath+"/grantref",schemaPath:"#/properties/grantref/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err65]}else{vErrors.push(err65)}errors++}}else{const err66={instancePath:instancePath+"/grantref",schemaPath:"#/properties/grantref/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err66]}else{vErrors.push(err66)}errors++}}if(data.grantversion!==void 0){let data14=data.grantversion;if(!(typeof data14=="number"&&!(data14%1)&&!isNaN(data14)&&isFinite(data14))){const err67={instancePath:instancePath+"/grantversion",schemaPath:"#/properties/grantversion/type",keyword:"type",params:{type:"integer"},message:"must be integer"};if(vErrors===null){vErrors=[err67]}else{vErrors.push(err67)}errors++}if(typeof data14=="number"&&isFinite(data14)){if(data14>2147483647||isNaN(data14)){const err68={instancePath:instancePath+"/grantversion",schemaPath:"#/properties/grantversion/maximum",keyword:"maximum",params:{comparison:"<=",limit:2147483647},message:"must be <= 2147483647"};if(vErrors===null){vErrors=[err68]}else{vErrors.push(err68)}errors++}if(data14<1||isNaN(data14)){const err69={instancePath:instancePath+"/grantversion",schemaPath:"#/properties/grantversion/minimum",keyword:"minimum",params:{comparison:">=",limit:1},message:"must be >= 1"};if(vErrors===null){vErrors=[err69]}else{vErrors.push(err69)}errors++}}}if(data.correlationid!==void 0){let data15=data.correlationid;if(typeof data15==="string"){if(func1(data15)>256){const err70={instancePath:instancePath+"/correlationid",schemaPath:"#/properties/correlationid/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err70]}else{vErrors.push(err70)}errors++}if(func1(data15)<1){const err71={instancePath:instancePath+"/correlationid",schemaPath:"#/properties/correlationid/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err71]}else{vErrors.push(err71)}errors++}if(!pattern4.test(data15)){const err72={instancePath:instancePath+"/correlationid",schemaPath:"#/properties/correlationid/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err72]}else{vErrors.push(err72)}errors++}}else{const err73={instancePath:instancePath+"/correlationid",schemaPath:"#/properties/correlationid/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err73]}else{vErrors.push(err73)}errors++}}if(data.causationid!==void 0){let data16=data.causationid;if(typeof data16==="string"){if(func1(data16)>256){const err74={instancePath:instancePath+"/causationid",schemaPath:"#/properties/causationid/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err74]}else{vErrors.push(err74)}errors++}if(func1(data16)<1){const err75={instancePath:instancePath+"/causationid",schemaPath:"#/properties/causationid/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err75]}else{vErrors.push(err75)}errors++}if(!pattern4.test(data16)){const err76={instancePath:instancePath+"/causationid",schemaPath:"#/properties/causationid/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err76]}else{vErrors.push(err76)}errors++}}else{const err77={instancePath:instancePath+"/causationid",schemaPath:"#/properties/causationid/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err77]}else{vErrors.push(err77)}errors++}}if(data.subject!==void 0){let data17=data.subject;if(typeof data17==="string"){if(func1(data17)>1024){const err78={instancePath:instancePath+"/subject",schemaPath:"#/properties/subject/maxLength",keyword:"maxLength",params:{limit:1024},message:"must NOT have more than 1024 characters"};if(vErrors===null){vErrors=[err78]}else{vErrors.push(err78)}errors++}if(func1(data17)<1){const err79={instancePath:instancePath+"/subject",schemaPath:"#/properties/subject/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err79]}else{vErrors.push(err79)}errors++}if(!pattern4.test(data17)){const err80={instancePath:instancePath+"/subject",schemaPath:"#/properties/subject/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err80]}else{vErrors.push(err80)}errors++}}else{const err81={instancePath:instancePath+"/subject",schemaPath:"#/properties/subject/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err81]}else{vErrors.push(err81)}errors++}}if(data.data!==void 0){if(!validate20(data.data,{instancePath:instancePath+"/data",parentData:data,parentDataProperty:"data",rootData,dynamicAnchors})){vErrors=vErrors===null?validate20.errors:vErrors.concat(validate20.errors);errors=vErrors.length}}if(data.orgnamespace!==void 0){let data19=data.orgnamespace;if(typeof data19==="string"){if(func1(data19)>256){const err82={instancePath:instancePath+"/orgnamespace",schemaPath:"#/properties/orgnamespace/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err82]}else{vErrors.push(err82)}errors++}if(func1(data19)<1){const err83={instancePath:instancePath+"/orgnamespace",schemaPath:"#/properties/orgnamespace/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err83]}else{vErrors.push(err83)}errors++}if(!pattern4.test(data19)){const err84={instancePath:instancePath+"/orgnamespace",schemaPath:"#/properties/orgnamespace/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err84]}else{vErrors.push(err84)}errors++}}else{const err85={instancePath:instancePath+"/orgnamespace",schemaPath:"#/properties/orgnamespace/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err85]}else{vErrors.push(err85)}errors++}}if(data.orgref!==void 0){let data20=data.orgref;if(typeof data20==="string"){if(func1(data20)>256){const err86={instancePath:instancePath+"/orgref",schemaPath:"#/properties/orgref/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err86]}else{vErrors.push(err86)}errors++}if(func1(data20)<1){const err87={instancePath:instancePath+"/orgref",schemaPath:"#/properties/orgref/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err87]}else{vErrors.push(err87)}errors++}if(!pattern4.test(data20)){const err88={instancePath:instancePath+"/orgref",schemaPath:"#/properties/orgref/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err88]}else{vErrors.push(err88)}errors++}}else{const err89={instancePath:instancePath+"/orgref",schemaPath:"#/properties/orgref/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err89]}else{vErrors.push(err89)}errors++}}if(data.projectnamespace!==void 0){let data21=data.projectnamespace;if(typeof data21==="string"){if(func1(data21)>256){const err90={instancePath:instancePath+"/projectnamespace",schemaPath:"#/properties/projectnamespace/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err90]}else{vErrors.push(err90)}errors++}if(func1(data21)<1){const err91={instancePath:instancePath+"/projectnamespace",schemaPath:"#/properties/projectnamespace/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err91]}else{vErrors.push(err91)}errors++}if(!pattern4.test(data21)){const err92={instancePath:instancePath+"/projectnamespace",schemaPath:"#/properties/projectnamespace/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err92]}else{vErrors.push(err92)}errors++}}else{const err93={instancePath:instancePath+"/projectnamespace",schemaPath:"#/properties/projectnamespace/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err93]}else{vErrors.push(err93)}errors++}}if(data.projectref!==void 0){let data22=data.projectref;if(typeof data22==="string"){if(func1(data22)>256){const err94={instancePath:instancePath+"/projectref",schemaPath:"#/properties/projectref/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err94]}else{vErrors.push(err94)}errors++}if(func1(data22)<1){const err95={instancePath:instancePath+"/projectref",schemaPath:"#/properties/projectref/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err95]}else{vErrors.push(err95)}errors++}if(!pattern4.test(data22)){const err96={instancePath:instancePath+"/projectref",schemaPath:"#/properties/projectref/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err96]}else{vErrors.push(err96)}errors++}}else{const err97={instancePath:instancePath+"/projectref",schemaPath:"#/properties/projectref/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err97]}else{vErrors.push(err97)}errors++}}if(data.principalnamespace!==void 0){let data23=data.principalnamespace;if(typeof data23==="string"){if(func1(data23)>256){const err98={instancePath:instancePath+"/principalnamespace",schemaPath:"#/properties/principalnamespace/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err98]}else{vErrors.push(err98)}errors++}if(func1(data23)<1){const err99={instancePath:instancePath+"/principalnamespace",schemaPath:"#/properties/principalnamespace/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err99]}else{vErrors.push(err99)}errors++}if(!pattern4.test(data23)){const err100={instancePath:instancePath+"/principalnamespace",schemaPath:"#/properties/principalnamespace/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err100]}else{vErrors.push(err100)}errors++}}else{const err101={instancePath:instancePath+"/principalnamespace",schemaPath:"#/properties/principalnamespace/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err101]}else{vErrors.push(err101)}errors++}}if(data.principalref!==void 0){let data24=data.principalref;if(typeof data24==="string"){if(func1(data24)>256){const err102={instancePath:instancePath+"/principalref",schemaPath:"#/properties/principalref/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err102]}else{vErrors.push(err102)}errors++}if(func1(data24)<1){const err103={instancePath:instancePath+"/principalref",schemaPath:"#/properties/principalref/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err103]}else{vErrors.push(err103)}errors++}if(!pattern4.test(data24)){const err104={instancePath:instancePath+"/principalref",schemaPath:"#/properties/principalref/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err104]}else{vErrors.push(err104)}errors++}}else{const err105={instancePath:instancePath+"/principalref",schemaPath:"#/properties/principalref/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err105]}else{vErrors.push(err105)}errors++}}if(data.resourcenamespace!==void 0){let data25=data.resourcenamespace;if(typeof data25==="string"){if(func1(data25)>256){const err106={instancePath:instancePath+"/resourcenamespace",schemaPath:"#/properties/resourcenamespace/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err106]}else{vErrors.push(err106)}errors++}if(func1(data25)<1){const err107={instancePath:instancePath+"/resourcenamespace",schemaPath:"#/properties/resourcenamespace/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err107]}else{vErrors.push(err107)}errors++}if(!pattern4.test(data25)){const err108={instancePath:instancePath+"/resourcenamespace",schemaPath:"#/properties/resourcenamespace/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err108]}else{vErrors.push(err108)}errors++}}else{const err109={instancePath:instancePath+"/resourcenamespace",schemaPath:"#/properties/resourcenamespace/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err109]}else{vErrors.push(err109)}errors++}}if(data.resourceref!==void 0){let data26=data.resourceref;if(typeof data26==="string"){if(func1(data26)>256){const err110={instancePath:instancePath+"/resourceref",schemaPath:"#/properties/resourceref/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err110]}else{vErrors.push(err110)}errors++}if(func1(data26)<1){const err111={instancePath:instancePath+"/resourceref",schemaPath:"#/properties/resourceref/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err111]}else{vErrors.push(err111)}errors++}if(!pattern4.test(data26)){const err112={instancePath:instancePath+"/resourceref",schemaPath:"#/properties/resourceref/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err112]}else{vErrors.push(err112)}errors++}}else{const err113={instancePath:instancePath+"/resourceref",schemaPath:"#/properties/resourceref/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err113]}else{vErrors.push(err113)}errors++}}if(data.orgnamespace!==void 0){if(data.orgref===void 0){const err114={instancePath,schemaPath:"#/dependentRequired",keyword:"dependentRequired",params:{property:"orgnamespace",missingProperty:"orgref",depsCount:1,deps:"orgref"},message:"must have property orgref when property orgnamespace is present"};if(vErrors===null){vErrors=[err114]}else{vErrors.push(err114)}errors++}}if(data.orgref!==void 0){if(data.orgnamespace===void 0){const err115={instancePath,schemaPath:"#/dependentRequired",keyword:"dependentRequired",params:{property:"orgref",missingProperty:"orgnamespace",depsCount:1,deps:"orgnamespace"},message:"must have property orgnamespace when property orgref is present"};if(vErrors===null){vErrors=[err115]}else{vErrors.push(err115)}errors++}}if(data.projectnamespace!==void 0){if(data.projectref===void 0){const err116={instancePath,schemaPath:"#/dependentRequired",keyword:"dependentRequired",params:{property:"projectnamespace",missingProperty:"projectref",depsCount:1,deps:"projectref"},message:"must have property projectref when property projectnamespace is present"};if(vErrors===null){vErrors=[err116]}else{vErrors.push(err116)}errors++}}if(data.projectref!==void 0){if(data.projectnamespace===void 0){const err117={instancePath,schemaPath:"#/dependentRequired",keyword:"dependentRequired",params:{property:"projectref",missingProperty:"projectnamespace",depsCount:1,deps:"projectnamespace"},message:"must have property projectnamespace when property projectref is present"};if(vErrors===null){vErrors=[err117]}else{vErrors.push(err117)}errors++}}if(data.principalnamespace!==void 0){if(data.principalref===void 0){const err118={instancePath,schemaPath:"#/dependentRequired",keyword:"dependentRequired",params:{property:"principalnamespace",missingProperty:"principalref",depsCount:1,deps:"principalref"},message:"must have property principalref when property principalnamespace is present"};if(vErrors===null){vErrors=[err118]}else{vErrors.push(err118)}errors++}}if(data.principalref!==void 0){if(data.principalnamespace===void 0){const err119={instancePath,schemaPath:"#/dependentRequired",keyword:"dependentRequired",params:{property:"principalref",missingProperty:"principalnamespace",depsCount:1,deps:"principalnamespace"},message:"must have property principalnamespace when property principalref is present"};if(vErrors===null){vErrors=[err119]}else{vErrors.push(err119)}errors++}}if(data.resourcenamespace!==void 0){if(data.resourceref===void 0){const err120={instancePath,schemaPath:"#/dependentRequired",keyword:"dependentRequired",params:{property:"resourcenamespace",missingProperty:"resourceref",depsCount:1,deps:"resourceref"},message:"must have property resourceref when property resourcenamespace is present"};if(vErrors===null){vErrors=[err120]}else{vErrors.push(err120)}errors++}}if(data.resourceref!==void 0){if(data.resourcenamespace===void 0){const err121={instancePath,schemaPath:"#/dependentRequired",keyword:"dependentRequired",params:{property:"resourceref",missingProperty:"resourcenamespace",depsCount:1,deps:"resourcenamespace"},message:"must have property resourcenamespace when property resourceref is present"};if(vErrors===null){vErrors=[err121]}else{vErrors.push(err121)}errors++}}}else{const err122={instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};if(vErrors===null){vErrors=[err122]}else{vErrors.push(err122)}errors++}validate24.errors=vErrors;return errors===0}validate24.evaluated={props:true,dynamicProps:false,dynamicItems:false};var cloudEventFanout=validate26;var schema35={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://eventsdk.dev/schemas/v1/cloud-event-fanout.schema.json",title:"CloudEventFanout",type:"object",additionalProperties:false,properties:{specversion:{const:"1.0",type:"string"},id:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u001f\\u007f]+$"},source:{type:"string",minLength:1,maxLength:2048,pattern:"^[^\\u0000-\\u001f\\u007f]+$",format:"uri"},type:{type:"string",minLength:1,maxLength:256,pattern:"^[a-zA-Z0-9][a-zA-Z0-9._-]*\\.v[1-9][0-9]*$"},time:{type:"string",format:"date-time",maxLength:64},dataschema:{type:"string",minLength:1,maxLength:2048,pattern:"^[^\\u0000-\\u001f\\u007f]+$",format:"uri"},datacontenttype:{const:"application/json",type:"string"},profile:{const:"eventsdk/1.2",type:"string"},kind:{type:"string",const:"EVENT"},serviceorigin:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u001f\\u007f]+$"},sourcetenant:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u001f\\u007f]+$",description:"Opaque tenant reference scoped by the required serviceorigin. The namespace is the ordered pair (serviceorigin, sourcetenant)."},audience:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u001f\\u007f]+$"},connectionref:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u001f\\u007f]+$"},grantref:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u001f\\u007f]+$"},grantversion:{type:"integer",minimum:1,maximum:2147483647},correlationid:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u001f\\u007f]+$"},causationid:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u001f\\u007f]+$"},subject:{type:"string",minLength:1,maxLength:1024,pattern:"^[^\\u0000-\\u001f\\u007f]+$"},data:{$ref:"json-value.schema.json"},orgnamespace:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u001f\\u007f]+$"},orgref:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u001f\\u007f]+$"},projectnamespace:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u001f\\u007f]+$"},projectref:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u001f\\u007f]+$"},principalnamespace:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u001f\\u007f]+$"},principalref:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u001f\\u007f]+$"},resourcenamespace:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u001f\\u007f]+$"},resourceref:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u001f\\u007f]+$"},deliveryid:{type:"string",pattern:"^[0-9a-f]{64}$"}},required:["specversion","id","source","type","time","dataschema","datacontenttype","profile","kind","serviceorigin","sourcetenant","audience","connectionref","grantref","grantversion","correlationid","data","deliveryid"],dependentRequired:{orgnamespace:["orgref"],orgref:["orgnamespace"],projectnamespace:["projectref"],projectref:["projectnamespace"],principalnamespace:["principalref"],principalref:["principalnamespace"],resourcenamespace:["resourceref"],resourceref:["resourcenamespace"]}};var pattern62=new RegExp("^[0-9a-f]{64}$","u");function validate26(data,{instancePath="",parentData,parentDataProperty,rootData=data,dynamicAnchors={}}={}){let vErrors=null;let errors=0;const evaluated0=validate26.evaluated;if(evaluated0.dynamicProps){evaluated0.props=void 0}if(evaluated0.dynamicItems){evaluated0.items=void 0}if(data&&typeof data=="object"&&!Array.isArray(data)){if(data.specversion===void 0){const err0={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"specversion"},message:"must have required property 'specversion'"};if(vErrors===null){vErrors=[err0]}else{vErrors.push(err0)}errors++}if(data.id===void 0){const err1={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};if(vErrors===null){vErrors=[err1]}else{vErrors.push(err1)}errors++}if(data.source===void 0){const err2={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"source"},message:"must have required property 'source'"};if(vErrors===null){vErrors=[err2]}else{vErrors.push(err2)}errors++}if(data.type===void 0){const err3={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};if(vErrors===null){vErrors=[err3]}else{vErrors.push(err3)}errors++}if(data.time===void 0){const err4={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"time"},message:"must have required property 'time'"};if(vErrors===null){vErrors=[err4]}else{vErrors.push(err4)}errors++}if(data.dataschema===void 0){const err5={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"dataschema"},message:"must have required property 'dataschema'"};if(vErrors===null){vErrors=[err5]}else{vErrors.push(err5)}errors++}if(data.datacontenttype===void 0){const err6={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"datacontenttype"},message:"must have required property 'datacontenttype'"};if(vErrors===null){vErrors=[err6]}else{vErrors.push(err6)}errors++}if(data.profile===void 0){const err7={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"profile"},message:"must have required property 'profile'"};if(vErrors===null){vErrors=[err7]}else{vErrors.push(err7)}errors++}if(data.kind===void 0){const err8={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"kind"},message:"must have required property 'kind'"};if(vErrors===null){vErrors=[err8]}else{vErrors.push(err8)}errors++}if(data.serviceorigin===void 0){const err9={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"serviceorigin"},message:"must have required property 'serviceorigin'"};if(vErrors===null){vErrors=[err9]}else{vErrors.push(err9)}errors++}if(data.sourcetenant===void 0){const err10={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"sourcetenant"},message:"must have required property 'sourcetenant'"};if(vErrors===null){vErrors=[err10]}else{vErrors.push(err10)}errors++}if(data.audience===void 0){const err11={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"audience"},message:"must have required property 'audience'"};if(vErrors===null){vErrors=[err11]}else{vErrors.push(err11)}errors++}if(data.connectionref===void 0){const err12={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"connectionref"},message:"must have required property 'connectionref'"};if(vErrors===null){vErrors=[err12]}else{vErrors.push(err12)}errors++}if(data.grantref===void 0){const err13={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"grantref"},message:"must have required property 'grantref'"};if(vErrors===null){vErrors=[err13]}else{vErrors.push(err13)}errors++}if(data.grantversion===void 0){const err14={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"grantversion"},message:"must have required property 'grantversion'"};if(vErrors===null){vErrors=[err14]}else{vErrors.push(err14)}errors++}if(data.correlationid===void 0){const err15={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"correlationid"},message:"must have required property 'correlationid'"};if(vErrors===null){vErrors=[err15]}else{vErrors.push(err15)}errors++}if(data.data===void 0){const err16={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"data"},message:"must have required property 'data'"};if(vErrors===null){vErrors=[err16]}else{vErrors.push(err16)}errors++}if(data.deliveryid===void 0){const err17={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"deliveryid"},message:"must have required property 'deliveryid'"};if(vErrors===null){vErrors=[err17]}else{vErrors.push(err17)}errors++}for(const key0 in data){if(!func11.call(schema35.properties,key0)){const err18={instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key0},message:"must NOT have additional properties"};if(vErrors===null){vErrors=[err18]}else{vErrors.push(err18)}errors++}}if(data.specversion!==void 0){let data0=data.specversion;if(typeof data0!=="string"){const err19={instancePath:instancePath+"/specversion",schemaPath:"#/properties/specversion/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err19]}else{vErrors.push(err19)}errors++}if("1.0"!==data0){const err20={instancePath:instancePath+"/specversion",schemaPath:"#/properties/specversion/const",keyword:"const",params:{allowedValue:"1.0"},message:"must be equal to constant"};if(vErrors===null){vErrors=[err20]}else{vErrors.push(err20)}errors++}}if(data.id!==void 0){let data1=data.id;if(typeof data1==="string"){if(func1(data1)>256){const err21={instancePath:instancePath+"/id",schemaPath:"#/properties/id/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err21]}else{vErrors.push(err21)}errors++}if(func1(data1)<1){const err22={instancePath:instancePath+"/id",schemaPath:"#/properties/id/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err22]}else{vErrors.push(err22)}errors++}if(!pattern4.test(data1)){const err23={instancePath:instancePath+"/id",schemaPath:"#/properties/id/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err23]}else{vErrors.push(err23)}errors++}}else{const err24={instancePath:instancePath+"/id",schemaPath:"#/properties/id/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err24]}else{vErrors.push(err24)}errors++}}if(data.source!==void 0){let data2=data.source;if(typeof data2==="string"){if(func1(data2)>2048){const err25={instancePath:instancePath+"/source",schemaPath:"#/properties/source/maxLength",keyword:"maxLength",params:{limit:2048},message:"must NOT have more than 2048 characters"};if(vErrors===null){vErrors=[err25]}else{vErrors.push(err25)}errors++}if(func1(data2)<1){const err26={instancePath:instancePath+"/source",schemaPath:"#/properties/source/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err26]}else{vErrors.push(err26)}errors++}if(!pattern4.test(data2)){const err27={instancePath:instancePath+"/source",schemaPath:"#/properties/source/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err27]}else{vErrors.push(err27)}errors++}if(!formats0(data2)){const err28={instancePath:instancePath+"/source",schemaPath:"#/properties/source/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};if(vErrors===null){vErrors=[err28]}else{vErrors.push(err28)}errors++}}else{const err29={instancePath:instancePath+"/source",schemaPath:"#/properties/source/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err29]}else{vErrors.push(err29)}errors++}}if(data.type!==void 0){let data3=data.type;if(typeof data3==="string"){if(func1(data3)>256){const err30={instancePath:instancePath+"/type",schemaPath:"#/properties/type/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err30]}else{vErrors.push(err30)}errors++}if(func1(data3)<1){const err31={instancePath:instancePath+"/type",schemaPath:"#/properties/type/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err31]}else{vErrors.push(err31)}errors++}if(!pattern12.test(data3)){const err32={instancePath:instancePath+"/type",schemaPath:"#/properties/type/pattern",keyword:"pattern",params:{pattern:"^[a-zA-Z0-9][a-zA-Z0-9._-]*\\.v[1-9][0-9]*$"},message:'must match pattern "^[a-zA-Z0-9][a-zA-Z0-9._-]*\\.v[1-9][0-9]*$"'};if(vErrors===null){vErrors=[err32]}else{vErrors.push(err32)}errors++}}else{const err33={instancePath:instancePath+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err33]}else{vErrors.push(err33)}errors++}}if(data.time!==void 0){let data4=data.time;if(typeof data4==="string"){if(func1(data4)>64){const err34={instancePath:instancePath+"/time",schemaPath:"#/properties/time/maxLength",keyword:"maxLength",params:{limit:64},message:"must NOT have more than 64 characters"};if(vErrors===null){vErrors=[err34]}else{vErrors.push(err34)}errors++}if(!formats2.validate(data4)){const err35={instancePath:instancePath+"/time",schemaPath:"#/properties/time/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};if(vErrors===null){vErrors=[err35]}else{vErrors.push(err35)}errors++}}else{const err36={instancePath:instancePath+"/time",schemaPath:"#/properties/time/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err36]}else{vErrors.push(err36)}errors++}}if(data.dataschema!==void 0){let data5=data.dataschema;if(typeof data5==="string"){if(func1(data5)>2048){const err37={instancePath:instancePath+"/dataschema",schemaPath:"#/properties/dataschema/maxLength",keyword:"maxLength",params:{limit:2048},message:"must NOT have more than 2048 characters"};if(vErrors===null){vErrors=[err37]}else{vErrors.push(err37)}errors++}if(func1(data5)<1){const err38={instancePath:instancePath+"/dataschema",schemaPath:"#/properties/dataschema/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err38]}else{vErrors.push(err38)}errors++}if(!pattern4.test(data5)){const err39={instancePath:instancePath+"/dataschema",schemaPath:"#/properties/dataschema/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err39]}else{vErrors.push(err39)}errors++}if(!formats0(data5)){const err40={instancePath:instancePath+"/dataschema",schemaPath:"#/properties/dataschema/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};if(vErrors===null){vErrors=[err40]}else{vErrors.push(err40)}errors++}}else{const err41={instancePath:instancePath+"/dataschema",schemaPath:"#/properties/dataschema/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err41]}else{vErrors.push(err41)}errors++}}if(data.datacontenttype!==void 0){let data6=data.datacontenttype;if(typeof data6!=="string"){const err42={instancePath:instancePath+"/datacontenttype",schemaPath:"#/properties/datacontenttype/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err42]}else{vErrors.push(err42)}errors++}if("application/json"!==data6){const err43={instancePath:instancePath+"/datacontenttype",schemaPath:"#/properties/datacontenttype/const",keyword:"const",params:{allowedValue:"application/json"},message:"must be equal to constant"};if(vErrors===null){vErrors=[err43]}else{vErrors.push(err43)}errors++}}if(data.profile!==void 0){let data7=data.profile;if(typeof data7!=="string"){const err44={instancePath:instancePath+"/profile",schemaPath:"#/properties/profile/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err44]}else{vErrors.push(err44)}errors++}if("eventsdk/1.2"!==data7){const err45={instancePath:instancePath+"/profile",schemaPath:"#/properties/profile/const",keyword:"const",params:{allowedValue:"eventsdk/1.2"},message:"must be equal to constant"};if(vErrors===null){vErrors=[err45]}else{vErrors.push(err45)}errors++}}if(data.kind!==void 0){let data8=data.kind;if(typeof data8!=="string"){const err46={instancePath:instancePath+"/kind",schemaPath:"#/properties/kind/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err46]}else{vErrors.push(err46)}errors++}if("EVENT"!==data8){const err47={instancePath:instancePath+"/kind",schemaPath:"#/properties/kind/const",keyword:"const",params:{allowedValue:"EVENT"},message:"must be equal to constant"};if(vErrors===null){vErrors=[err47]}else{vErrors.push(err47)}errors++}}if(data.serviceorigin!==void 0){let data9=data.serviceorigin;if(typeof data9==="string"){if(func1(data9)>256){const err48={instancePath:instancePath+"/serviceorigin",schemaPath:"#/properties/serviceorigin/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err48]}else{vErrors.push(err48)}errors++}if(func1(data9)<1){const err49={instancePath:instancePath+"/serviceorigin",schemaPath:"#/properties/serviceorigin/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err49]}else{vErrors.push(err49)}errors++}if(!pattern4.test(data9)){const err50={instancePath:instancePath+"/serviceorigin",schemaPath:"#/properties/serviceorigin/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err50]}else{vErrors.push(err50)}errors++}}else{const err51={instancePath:instancePath+"/serviceorigin",schemaPath:"#/properties/serviceorigin/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err51]}else{vErrors.push(err51)}errors++}}if(data.sourcetenant!==void 0){let data10=data.sourcetenant;if(typeof data10==="string"){if(func1(data10)>256){const err52={instancePath:instancePath+"/sourcetenant",schemaPath:"#/properties/sourcetenant/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err52]}else{vErrors.push(err52)}errors++}if(func1(data10)<1){const err53={instancePath:instancePath+"/sourcetenant",schemaPath:"#/properties/sourcetenant/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err53]}else{vErrors.push(err53)}errors++}if(!pattern4.test(data10)){const err54={instancePath:instancePath+"/sourcetenant",schemaPath:"#/properties/sourcetenant/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err54]}else{vErrors.push(err54)}errors++}}else{const err55={instancePath:instancePath+"/sourcetenant",schemaPath:"#/properties/sourcetenant/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err55]}else{vErrors.push(err55)}errors++}}if(data.audience!==void 0){let data11=data.audience;if(typeof data11==="string"){if(func1(data11)>256){const err56={instancePath:instancePath+"/audience",schemaPath:"#/properties/audience/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err56]}else{vErrors.push(err56)}errors++}if(func1(data11)<1){const err57={instancePath:instancePath+"/audience",schemaPath:"#/properties/audience/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err57]}else{vErrors.push(err57)}errors++}if(!pattern4.test(data11)){const err58={instancePath:instancePath+"/audience",schemaPath:"#/properties/audience/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err58]}else{vErrors.push(err58)}errors++}}else{const err59={instancePath:instancePath+"/audience",schemaPath:"#/properties/audience/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err59]}else{vErrors.push(err59)}errors++}}if(data.connectionref!==void 0){let data12=data.connectionref;if(typeof data12==="string"){if(func1(data12)>256){const err60={instancePath:instancePath+"/connectionref",schemaPath:"#/properties/connectionref/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err60]}else{vErrors.push(err60)}errors++}if(func1(data12)<1){const err61={instancePath:instancePath+"/connectionref",schemaPath:"#/properties/connectionref/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err61]}else{vErrors.push(err61)}errors++}if(!pattern4.test(data12)){const err62={instancePath:instancePath+"/connectionref",schemaPath:"#/properties/connectionref/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err62]}else{vErrors.push(err62)}errors++}}else{const err63={instancePath:instancePath+"/connectionref",schemaPath:"#/properties/connectionref/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err63]}else{vErrors.push(err63)}errors++}}if(data.grantref!==void 0){let data13=data.grantref;if(typeof data13==="string"){if(func1(data13)>256){const err64={instancePath:instancePath+"/grantref",schemaPath:"#/properties/grantref/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err64]}else{vErrors.push(err64)}errors++}if(func1(data13)<1){const err65={instancePath:instancePath+"/grantref",schemaPath:"#/properties/grantref/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err65]}else{vErrors.push(err65)}errors++}if(!pattern4.test(data13)){const err66={instancePath:instancePath+"/grantref",schemaPath:"#/properties/grantref/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err66]}else{vErrors.push(err66)}errors++}}else{const err67={instancePath:instancePath+"/grantref",schemaPath:"#/properties/grantref/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err67]}else{vErrors.push(err67)}errors++}}if(data.grantversion!==void 0){let data14=data.grantversion;if(!(typeof data14=="number"&&!(data14%1)&&!isNaN(data14)&&isFinite(data14))){const err68={instancePath:instancePath+"/grantversion",schemaPath:"#/properties/grantversion/type",keyword:"type",params:{type:"integer"},message:"must be integer"};if(vErrors===null){vErrors=[err68]}else{vErrors.push(err68)}errors++}if(typeof data14=="number"&&isFinite(data14)){if(data14>2147483647||isNaN(data14)){const err69={instancePath:instancePath+"/grantversion",schemaPath:"#/properties/grantversion/maximum",keyword:"maximum",params:{comparison:"<=",limit:2147483647},message:"must be <= 2147483647"};if(vErrors===null){vErrors=[err69]}else{vErrors.push(err69)}errors++}if(data14<1||isNaN(data14)){const err70={instancePath:instancePath+"/grantversion",schemaPath:"#/properties/grantversion/minimum",keyword:"minimum",params:{comparison:">=",limit:1},message:"must be >= 1"};if(vErrors===null){vErrors=[err70]}else{vErrors.push(err70)}errors++}}}if(data.correlationid!==void 0){let data15=data.correlationid;if(typeof data15==="string"){if(func1(data15)>256){const err71={instancePath:instancePath+"/correlationid",schemaPath:"#/properties/correlationid/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err71]}else{vErrors.push(err71)}errors++}if(func1(data15)<1){const err72={instancePath:instancePath+"/correlationid",schemaPath:"#/properties/correlationid/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err72]}else{vErrors.push(err72)}errors++}if(!pattern4.test(data15)){const err73={instancePath:instancePath+"/correlationid",schemaPath:"#/properties/correlationid/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err73]}else{vErrors.push(err73)}errors++}}else{const err74={instancePath:instancePath+"/correlationid",schemaPath:"#/properties/correlationid/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err74]}else{vErrors.push(err74)}errors++}}if(data.causationid!==void 0){let data16=data.causationid;if(typeof data16==="string"){if(func1(data16)>256){const err75={instancePath:instancePath+"/causationid",schemaPath:"#/properties/causationid/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err75]}else{vErrors.push(err75)}errors++}if(func1(data16)<1){const err76={instancePath:instancePath+"/causationid",schemaPath:"#/properties/causationid/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err76]}else{vErrors.push(err76)}errors++}if(!pattern4.test(data16)){const err77={instancePath:instancePath+"/causationid",schemaPath:"#/properties/causationid/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err77]}else{vErrors.push(err77)}errors++}}else{const err78={instancePath:instancePath+"/causationid",schemaPath:"#/properties/causationid/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err78]}else{vErrors.push(err78)}errors++}}if(data.subject!==void 0){let data17=data.subject;if(typeof data17==="string"){if(func1(data17)>1024){const err79={instancePath:instancePath+"/subject",schemaPath:"#/properties/subject/maxLength",keyword:"maxLength",params:{limit:1024},message:"must NOT have more than 1024 characters"};if(vErrors===null){vErrors=[err79]}else{vErrors.push(err79)}errors++}if(func1(data17)<1){const err80={instancePath:instancePath+"/subject",schemaPath:"#/properties/subject/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err80]}else{vErrors.push(err80)}errors++}if(!pattern4.test(data17)){const err81={instancePath:instancePath+"/subject",schemaPath:"#/properties/subject/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err81]}else{vErrors.push(err81)}errors++}}else{const err82={instancePath:instancePath+"/subject",schemaPath:"#/properties/subject/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err82]}else{vErrors.push(err82)}errors++}}if(data.data!==void 0){if(!validate20(data.data,{instancePath:instancePath+"/data",parentData:data,parentDataProperty:"data",rootData,dynamicAnchors})){vErrors=vErrors===null?validate20.errors:vErrors.concat(validate20.errors);errors=vErrors.length}}if(data.orgnamespace!==void 0){let data19=data.orgnamespace;if(typeof data19==="string"){if(func1(data19)>256){const err83={instancePath:instancePath+"/orgnamespace",schemaPath:"#/properties/orgnamespace/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err83]}else{vErrors.push(err83)}errors++}if(func1(data19)<1){const err84={instancePath:instancePath+"/orgnamespace",schemaPath:"#/properties/orgnamespace/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err84]}else{vErrors.push(err84)}errors++}if(!pattern4.test(data19)){const err85={instancePath:instancePath+"/orgnamespace",schemaPath:"#/properties/orgnamespace/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err85]}else{vErrors.push(err85)}errors++}}else{const err86={instancePath:instancePath+"/orgnamespace",schemaPath:"#/properties/orgnamespace/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err86]}else{vErrors.push(err86)}errors++}}if(data.orgref!==void 0){let data20=data.orgref;if(typeof data20==="string"){if(func1(data20)>256){const err87={instancePath:instancePath+"/orgref",schemaPath:"#/properties/orgref/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err87]}else{vErrors.push(err87)}errors++}if(func1(data20)<1){const err88={instancePath:instancePath+"/orgref",schemaPath:"#/properties/orgref/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err88]}else{vErrors.push(err88)}errors++}if(!pattern4.test(data20)){const err89={instancePath:instancePath+"/orgref",schemaPath:"#/properties/orgref/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err89]}else{vErrors.push(err89)}errors++}}else{const err90={instancePath:instancePath+"/orgref",schemaPath:"#/properties/orgref/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err90]}else{vErrors.push(err90)}errors++}}if(data.projectnamespace!==void 0){let data21=data.projectnamespace;if(typeof data21==="string"){if(func1(data21)>256){const err91={instancePath:instancePath+"/projectnamespace",schemaPath:"#/properties/projectnamespace/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err91]}else{vErrors.push(err91)}errors++}if(func1(data21)<1){const err92={instancePath:instancePath+"/projectnamespace",schemaPath:"#/properties/projectnamespace/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err92]}else{vErrors.push(err92)}errors++}if(!pattern4.test(data21)){const err93={instancePath:instancePath+"/projectnamespace",schemaPath:"#/properties/projectnamespace/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err93]}else{vErrors.push(err93)}errors++}}else{const err94={instancePath:instancePath+"/projectnamespace",schemaPath:"#/properties/projectnamespace/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err94]}else{vErrors.push(err94)}errors++}}if(data.projectref!==void 0){let data22=data.projectref;if(typeof data22==="string"){if(func1(data22)>256){const err95={instancePath:instancePath+"/projectref",schemaPath:"#/properties/projectref/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err95]}else{vErrors.push(err95)}errors++}if(func1(data22)<1){const err96={instancePath:instancePath+"/projectref",schemaPath:"#/properties/projectref/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err96]}else{vErrors.push(err96)}errors++}if(!pattern4.test(data22)){const err97={instancePath:instancePath+"/projectref",schemaPath:"#/properties/projectref/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err97]}else{vErrors.push(err97)}errors++}}else{const err98={instancePath:instancePath+"/projectref",schemaPath:"#/properties/projectref/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err98]}else{vErrors.push(err98)}errors++}}if(data.principalnamespace!==void 0){let data23=data.principalnamespace;if(typeof data23==="string"){if(func1(data23)>256){const err99={instancePath:instancePath+"/principalnamespace",schemaPath:"#/properties/principalnamespace/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err99]}else{vErrors.push(err99)}errors++}if(func1(data23)<1){const err100={instancePath:instancePath+"/principalnamespace",schemaPath:"#/properties/principalnamespace/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err100]}else{vErrors.push(err100)}errors++}if(!pattern4.test(data23)){const err101={instancePath:instancePath+"/principalnamespace",schemaPath:"#/properties/principalnamespace/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err101]}else{vErrors.push(err101)}errors++}}else{const err102={instancePath:instancePath+"/principalnamespace",schemaPath:"#/properties/principalnamespace/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err102]}else{vErrors.push(err102)}errors++}}if(data.principalref!==void 0){let data24=data.principalref;if(typeof data24==="string"){if(func1(data24)>256){const err103={instancePath:instancePath+"/principalref",schemaPath:"#/properties/principalref/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err103]}else{vErrors.push(err103)}errors++}if(func1(data24)<1){const err104={instancePath:instancePath+"/principalref",schemaPath:"#/properties/principalref/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err104]}else{vErrors.push(err104)}errors++}if(!pattern4.test(data24)){const err105={instancePath:instancePath+"/principalref",schemaPath:"#/properties/principalref/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err105]}else{vErrors.push(err105)}errors++}}else{const err106={instancePath:instancePath+"/principalref",schemaPath:"#/properties/principalref/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err106]}else{vErrors.push(err106)}errors++}}if(data.resourcenamespace!==void 0){let data25=data.resourcenamespace;if(typeof data25==="string"){if(func1(data25)>256){const err107={instancePath:instancePath+"/resourcenamespace",schemaPath:"#/properties/resourcenamespace/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err107]}else{vErrors.push(err107)}errors++}if(func1(data25)<1){const err108={instancePath:instancePath+"/resourcenamespace",schemaPath:"#/properties/resourcenamespace/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err108]}else{vErrors.push(err108)}errors++}if(!pattern4.test(data25)){const err109={instancePath:instancePath+"/resourcenamespace",schemaPath:"#/properties/resourcenamespace/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err109]}else{vErrors.push(err109)}errors++}}else{const err110={instancePath:instancePath+"/resourcenamespace",schemaPath:"#/properties/resourcenamespace/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err110]}else{vErrors.push(err110)}errors++}}if(data.resourceref!==void 0){let data26=data.resourceref;if(typeof data26==="string"){if(func1(data26)>256){const err111={instancePath:instancePath+"/resourceref",schemaPath:"#/properties/resourceref/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err111]}else{vErrors.push(err111)}errors++}if(func1(data26)<1){const err112={instancePath:instancePath+"/resourceref",schemaPath:"#/properties/resourceref/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err112]}else{vErrors.push(err112)}errors++}if(!pattern4.test(data26)){const err113={instancePath:instancePath+"/resourceref",schemaPath:"#/properties/resourceref/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err113]}else{vErrors.push(err113)}errors++}}else{const err114={instancePath:instancePath+"/resourceref",schemaPath:"#/properties/resourceref/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err114]}else{vErrors.push(err114)}errors++}}if(data.deliveryid!==void 0){let data27=data.deliveryid;if(typeof data27==="string"){if(!pattern62.test(data27)){const err115={instancePath:instancePath+"/deliveryid",schemaPath:"#/properties/deliveryid/pattern",keyword:"pattern",params:{pattern:"^[0-9a-f]{64}$"},message:'must match pattern "^[0-9a-f]{64}$"'};if(vErrors===null){vErrors=[err115]}else{vErrors.push(err115)}errors++}}else{const err116={instancePath:instancePath+"/deliveryid",schemaPath:"#/properties/deliveryid/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err116]}else{vErrors.push(err116)}errors++}}if(data.orgnamespace!==void 0){if(data.orgref===void 0){const err117={instancePath,schemaPath:"#/dependentRequired",keyword:"dependentRequired",params:{property:"orgnamespace",missingProperty:"orgref",depsCount:1,deps:"orgref"},message:"must have property orgref when property orgnamespace is present"};if(vErrors===null){vErrors=[err117]}else{vErrors.push(err117)}errors++}}if(data.orgref!==void 0){if(data.orgnamespace===void 0){const err118={instancePath,schemaPath:"#/dependentRequired",keyword:"dependentRequired",params:{property:"orgref",missingProperty:"orgnamespace",depsCount:1,deps:"orgnamespace"},message:"must have property orgnamespace when property orgref is present"};if(vErrors===null){vErrors=[err118]}else{vErrors.push(err118)}errors++}}if(data.projectnamespace!==void 0){if(data.projectref===void 0){const err119={instancePath,schemaPath:"#/dependentRequired",keyword:"dependentRequired",params:{property:"projectnamespace",missingProperty:"projectref",depsCount:1,deps:"projectref"},message:"must have property projectref when property projectnamespace is present"};if(vErrors===null){vErrors=[err119]}else{vErrors.push(err119)}errors++}}if(data.projectref!==void 0){if(data.projectnamespace===void 0){const err120={instancePath,schemaPath:"#/dependentRequired",keyword:"dependentRequired",params:{property:"projectref",missingProperty:"projectnamespace",depsCount:1,deps:"projectnamespace"},message:"must have property projectnamespace when property projectref is present"};if(vErrors===null){vErrors=[err120]}else{vErrors.push(err120)}errors++}}if(data.principalnamespace!==void 0){if(data.principalref===void 0){const err121={instancePath,schemaPath:"#/dependentRequired",keyword:"dependentRequired",params:{property:"principalnamespace",missingProperty:"principalref",depsCount:1,deps:"principalref"},message:"must have property principalref when property principalnamespace is present"};if(vErrors===null){vErrors=[err121]}else{vErrors.push(err121)}errors++}}if(data.principalref!==void 0){if(data.principalnamespace===void 0){const err122={instancePath,schemaPath:"#/dependentRequired",keyword:"dependentRequired",params:{property:"principalref",missingProperty:"principalnamespace",depsCount:1,deps:"principalnamespace"},message:"must have property principalnamespace when property principalref is present"};if(vErrors===null){vErrors=[err122]}else{vErrors.push(err122)}errors++}}if(data.resourcenamespace!==void 0){if(data.resourceref===void 0){const err123={instancePath,schemaPath:"#/dependentRequired",keyword:"dependentRequired",params:{property:"resourcenamespace",missingProperty:"resourceref",depsCount:1,deps:"resourceref"},message:"must have property resourceref when property resourcenamespace is present"};if(vErrors===null){vErrors=[err123]}else{vErrors.push(err123)}errors++}}if(data.resourceref!==void 0){if(data.resourcenamespace===void 0){const err124={instancePath,schemaPath:"#/dependentRequired",keyword:"dependentRequired",params:{property:"resourceref",missingProperty:"resourcenamespace",depsCount:1,deps:"resourcenamespace"},message:"must have property resourcenamespace when property resourceref is present"};if(vErrors===null){vErrors=[err124]}else{vErrors.push(err124)}errors++}}}else{const err125={instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};if(vErrors===null){vErrors=[err125]}else{vErrors.push(err125)}errors++}validate26.errors=vErrors;return errors===0}validate26.evaluated={props:true,dynamicProps:false,dynamicItems:false};var fanoutEventDraft=validate28;var schema36={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://eventsdk.dev/schemas/v1/fanout-event-draft.schema.json",title:"FanoutEventDraft",type:"object",additionalProperties:false,properties:{specversion:{const:"1.0",type:"string"},id:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u001f\\u007f]+$"},source:{type:"string",minLength:1,maxLength:2048,pattern:"^[^\\u0000-\\u001f\\u007f]+$",format:"uri"},type:{type:"string",minLength:1,maxLength:256,pattern:"^[a-zA-Z0-9][a-zA-Z0-9._-]*\\.v[1-9][0-9]*$"},time:{type:"string",format:"date-time",maxLength:64},dataschema:{type:"string",minLength:1,maxLength:2048,pattern:"^[^\\u0000-\\u001f\\u007f]+$",format:"uri"},datacontenttype:{const:"application/json",type:"string"},profile:{const:"eventsdk/1.2",type:"string"},kind:{type:"string",const:"EVENT"},serviceorigin:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u001f\\u007f]+$"},sourcetenant:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u001f\\u007f]+$",description:"Opaque tenant reference scoped by the required serviceorigin. The namespace is the ordered pair (serviceorigin, sourcetenant)."},correlationid:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u001f\\u007f]+$"},causationid:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u001f\\u007f]+$"},subject:{type:"string",minLength:1,maxLength:1024,pattern:"^[^\\u0000-\\u001f\\u007f]+$"},data:{$ref:"json-value.schema.json"},orgnamespace:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u001f\\u007f]+$"},orgref:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u001f\\u007f]+$"},projectnamespace:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u001f\\u007f]+$"},projectref:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u001f\\u007f]+$"},principalnamespace:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u001f\\u007f]+$"},principalref:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u001f\\u007f]+$"},resourcenamespace:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u001f\\u007f]+$"},resourceref:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u001f\\u007f]+$"}},required:["specversion","id","source","type","time","dataschema","datacontenttype","profile","kind","serviceorigin","sourcetenant","correlationid","data"],dependentRequired:{orgnamespace:["orgref"],orgref:["orgnamespace"],projectnamespace:["projectref"],projectref:["projectnamespace"],principalnamespace:["principalref"],principalref:["principalnamespace"],resourcenamespace:["resourceref"],resourceref:["resourcenamespace"]}};function validate28(data,{instancePath="",parentData,parentDataProperty,rootData=data,dynamicAnchors={}}={}){let vErrors=null;let errors=0;const evaluated0=validate28.evaluated;if(evaluated0.dynamicProps){evaluated0.props=void 0}if(evaluated0.dynamicItems){evaluated0.items=void 0}if(data&&typeof data=="object"&&!Array.isArray(data)){if(data.specversion===void 0){const err0={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"specversion"},message:"must have required property 'specversion'"};if(vErrors===null){vErrors=[err0]}else{vErrors.push(err0)}errors++}if(data.id===void 0){const err1={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};if(vErrors===null){vErrors=[err1]}else{vErrors.push(err1)}errors++}if(data.source===void 0){const err2={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"source"},message:"must have required property 'source'"};if(vErrors===null){vErrors=[err2]}else{vErrors.push(err2)}errors++}if(data.type===void 0){const err3={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};if(vErrors===null){vErrors=[err3]}else{vErrors.push(err3)}errors++}if(data.time===void 0){const err4={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"time"},message:"must have required property 'time'"};if(vErrors===null){vErrors=[err4]}else{vErrors.push(err4)}errors++}if(data.dataschema===void 0){const err5={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"dataschema"},message:"must have required property 'dataschema'"};if(vErrors===null){vErrors=[err5]}else{vErrors.push(err5)}errors++}if(data.datacontenttype===void 0){const err6={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"datacontenttype"},message:"must have required property 'datacontenttype'"};if(vErrors===null){vErrors=[err6]}else{vErrors.push(err6)}errors++}if(data.profile===void 0){const err7={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"profile"},message:"must have required property 'profile'"};if(vErrors===null){vErrors=[err7]}else{vErrors.push(err7)}errors++}if(data.kind===void 0){const err8={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"kind"},message:"must have required property 'kind'"};if(vErrors===null){vErrors=[err8]}else{vErrors.push(err8)}errors++}if(data.serviceorigin===void 0){const err9={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"serviceorigin"},message:"must have required property 'serviceorigin'"};if(vErrors===null){vErrors=[err9]}else{vErrors.push(err9)}errors++}if(data.sourcetenant===void 0){const err10={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"sourcetenant"},message:"must have required property 'sourcetenant'"};if(vErrors===null){vErrors=[err10]}else{vErrors.push(err10)}errors++}if(data.correlationid===void 0){const err11={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"correlationid"},message:"must have required property 'correlationid'"};if(vErrors===null){vErrors=[err11]}else{vErrors.push(err11)}errors++}if(data.data===void 0){const err12={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"data"},message:"must have required property 'data'"};if(vErrors===null){vErrors=[err12]}else{vErrors.push(err12)}errors++}for(const key0 in data){if(!func11.call(schema36.properties,key0)){const err13={instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key0},message:"must NOT have additional properties"};if(vErrors===null){vErrors=[err13]}else{vErrors.push(err13)}errors++}}if(data.specversion!==void 0){let data0=data.specversion;if(typeof data0!=="string"){const err14={instancePath:instancePath+"/specversion",schemaPath:"#/properties/specversion/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err14]}else{vErrors.push(err14)}errors++}if("1.0"!==data0){const err15={instancePath:instancePath+"/specversion",schemaPath:"#/properties/specversion/const",keyword:"const",params:{allowedValue:"1.0"},message:"must be equal to constant"};if(vErrors===null){vErrors=[err15]}else{vErrors.push(err15)}errors++}}if(data.id!==void 0){let data1=data.id;if(typeof data1==="string"){if(func1(data1)>256){const err16={instancePath:instancePath+"/id",schemaPath:"#/properties/id/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err16]}else{vErrors.push(err16)}errors++}if(func1(data1)<1){const err17={instancePath:instancePath+"/id",schemaPath:"#/properties/id/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err17]}else{vErrors.push(err17)}errors++}if(!pattern4.test(data1)){const err18={instancePath:instancePath+"/id",schemaPath:"#/properties/id/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err18]}else{vErrors.push(err18)}errors++}}else{const err19={instancePath:instancePath+"/id",schemaPath:"#/properties/id/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err19]}else{vErrors.push(err19)}errors++}}if(data.source!==void 0){let data2=data.source;if(typeof data2==="string"){if(func1(data2)>2048){const err20={instancePath:instancePath+"/source",schemaPath:"#/properties/source/maxLength",keyword:"maxLength",params:{limit:2048},message:"must NOT have more than 2048 characters"};if(vErrors===null){vErrors=[err20]}else{vErrors.push(err20)}errors++}if(func1(data2)<1){const err21={instancePath:instancePath+"/source",schemaPath:"#/properties/source/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err21]}else{vErrors.push(err21)}errors++}if(!pattern4.test(data2)){const err22={instancePath:instancePath+"/source",schemaPath:"#/properties/source/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err22]}else{vErrors.push(err22)}errors++}if(!formats0(data2)){const err23={instancePath:instancePath+"/source",schemaPath:"#/properties/source/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};if(vErrors===null){vErrors=[err23]}else{vErrors.push(err23)}errors++}}else{const err24={instancePath:instancePath+"/source",schemaPath:"#/properties/source/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err24]}else{vErrors.push(err24)}errors++}}if(data.type!==void 0){let data3=data.type;if(typeof data3==="string"){if(func1(data3)>256){const err25={instancePath:instancePath+"/type",schemaPath:"#/properties/type/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err25]}else{vErrors.push(err25)}errors++}if(func1(data3)<1){const err26={instancePath:instancePath+"/type",schemaPath:"#/properties/type/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err26]}else{vErrors.push(err26)}errors++}if(!pattern12.test(data3)){const err27={instancePath:instancePath+"/type",schemaPath:"#/properties/type/pattern",keyword:"pattern",params:{pattern:"^[a-zA-Z0-9][a-zA-Z0-9._-]*\\.v[1-9][0-9]*$"},message:'must match pattern "^[a-zA-Z0-9][a-zA-Z0-9._-]*\\.v[1-9][0-9]*$"'};if(vErrors===null){vErrors=[err27]}else{vErrors.push(err27)}errors++}}else{const err28={instancePath:instancePath+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err28]}else{vErrors.push(err28)}errors++}}if(data.time!==void 0){let data4=data.time;if(typeof data4==="string"){if(func1(data4)>64){const err29={instancePath:instancePath+"/time",schemaPath:"#/properties/time/maxLength",keyword:"maxLength",params:{limit:64},message:"must NOT have more than 64 characters"};if(vErrors===null){vErrors=[err29]}else{vErrors.push(err29)}errors++}if(!formats2.validate(data4)){const err30={instancePath:instancePath+"/time",schemaPath:"#/properties/time/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};if(vErrors===null){vErrors=[err30]}else{vErrors.push(err30)}errors++}}else{const err31={instancePath:instancePath+"/time",schemaPath:"#/properties/time/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err31]}else{vErrors.push(err31)}errors++}}if(data.dataschema!==void 0){let data5=data.dataschema;if(typeof data5==="string"){if(func1(data5)>2048){const err32={instancePath:instancePath+"/dataschema",schemaPath:"#/properties/dataschema/maxLength",keyword:"maxLength",params:{limit:2048},message:"must NOT have more than 2048 characters"};if(vErrors===null){vErrors=[err32]}else{vErrors.push(err32)}errors++}if(func1(data5)<1){const err33={instancePath:instancePath+"/dataschema",schemaPath:"#/properties/dataschema/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err33]}else{vErrors.push(err33)}errors++}if(!pattern4.test(data5)){const err34={instancePath:instancePath+"/dataschema",schemaPath:"#/properties/dataschema/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err34]}else{vErrors.push(err34)}errors++}if(!formats0(data5)){const err35={instancePath:instancePath+"/dataschema",schemaPath:"#/properties/dataschema/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};if(vErrors===null){vErrors=[err35]}else{vErrors.push(err35)}errors++}}else{const err36={instancePath:instancePath+"/dataschema",schemaPath:"#/properties/dataschema/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err36]}else{vErrors.push(err36)}errors++}}if(data.datacontenttype!==void 0){let data6=data.datacontenttype;if(typeof data6!=="string"){const err37={instancePath:instancePath+"/datacontenttype",schemaPath:"#/properties/datacontenttype/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err37]}else{vErrors.push(err37)}errors++}if("application/json"!==data6){const err38={instancePath:instancePath+"/datacontenttype",schemaPath:"#/properties/datacontenttype/const",keyword:"const",params:{allowedValue:"application/json"},message:"must be equal to constant"};if(vErrors===null){vErrors=[err38]}else{vErrors.push(err38)}errors++}}if(data.profile!==void 0){let data7=data.profile;if(typeof data7!=="string"){const err39={instancePath:instancePath+"/profile",schemaPath:"#/properties/profile/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err39]}else{vErrors.push(err39)}errors++}if("eventsdk/1.2"!==data7){const err40={instancePath:instancePath+"/profile",schemaPath:"#/properties/profile/const",keyword:"const",params:{allowedValue:"eventsdk/1.2"},message:"must be equal to constant"};if(vErrors===null){vErrors=[err40]}else{vErrors.push(err40)}errors++}}if(data.kind!==void 0){let data8=data.kind;if(typeof data8!=="string"){const err41={instancePath:instancePath+"/kind",schemaPath:"#/properties/kind/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err41]}else{vErrors.push(err41)}errors++}if("EVENT"!==data8){const err42={instancePath:instancePath+"/kind",schemaPath:"#/properties/kind/const",keyword:"const",params:{allowedValue:"EVENT"},message:"must be equal to constant"};if(vErrors===null){vErrors=[err42]}else{vErrors.push(err42)}errors++}}if(data.serviceorigin!==void 0){let data9=data.serviceorigin;if(typeof data9==="string"){if(func1(data9)>256){const err43={instancePath:instancePath+"/serviceorigin",schemaPath:"#/properties/serviceorigin/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err43]}else{vErrors.push(err43)}errors++}if(func1(data9)<1){const err44={instancePath:instancePath+"/serviceorigin",schemaPath:"#/properties/serviceorigin/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err44]}else{vErrors.push(err44)}errors++}if(!pattern4.test(data9)){const err45={instancePath:instancePath+"/serviceorigin",schemaPath:"#/properties/serviceorigin/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err45]}else{vErrors.push(err45)}errors++}}else{const err46={instancePath:instancePath+"/serviceorigin",schemaPath:"#/properties/serviceorigin/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err46]}else{vErrors.push(err46)}errors++}}if(data.sourcetenant!==void 0){let data10=data.sourcetenant;if(typeof data10==="string"){if(func1(data10)>256){const err47={instancePath:instancePath+"/sourcetenant",schemaPath:"#/properties/sourcetenant/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err47]}else{vErrors.push(err47)}errors++}if(func1(data10)<1){const err48={instancePath:instancePath+"/sourcetenant",schemaPath:"#/properties/sourcetenant/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err48]}else{vErrors.push(err48)}errors++}if(!pattern4.test(data10)){const err49={instancePath:instancePath+"/sourcetenant",schemaPath:"#/properties/sourcetenant/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err49]}else{vErrors.push(err49)}errors++}}else{const err50={instancePath:instancePath+"/sourcetenant",schemaPath:"#/properties/sourcetenant/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err50]}else{vErrors.push(err50)}errors++}}if(data.correlationid!==void 0){let data11=data.correlationid;if(typeof data11==="string"){if(func1(data11)>256){const err51={instancePath:instancePath+"/correlationid",schemaPath:"#/properties/correlationid/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err51]}else{vErrors.push(err51)}errors++}if(func1(data11)<1){const err52={instancePath:instancePath+"/correlationid",schemaPath:"#/properties/correlationid/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err52]}else{vErrors.push(err52)}errors++}if(!pattern4.test(data11)){const err53={instancePath:instancePath+"/correlationid",schemaPath:"#/properties/correlationid/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err53]}else{vErrors.push(err53)}errors++}}else{const err54={instancePath:instancePath+"/correlationid",schemaPath:"#/properties/correlationid/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err54]}else{vErrors.push(err54)}errors++}}if(data.causationid!==void 0){let data12=data.causationid;if(typeof data12==="string"){if(func1(data12)>256){const err55={instancePath:instancePath+"/causationid",schemaPath:"#/properties/causationid/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err55]}else{vErrors.push(err55)}errors++}if(func1(data12)<1){const err56={instancePath:instancePath+"/causationid",schemaPath:"#/properties/causationid/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err56]}else{vErrors.push(err56)}errors++}if(!pattern4.test(data12)){const err57={instancePath:instancePath+"/causationid",schemaPath:"#/properties/causationid/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err57]}else{vErrors.push(err57)}errors++}}else{const err58={instancePath:instancePath+"/causationid",schemaPath:"#/properties/causationid/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err58]}else{vErrors.push(err58)}errors++}}if(data.subject!==void 0){let data13=data.subject;if(typeof data13==="string"){if(func1(data13)>1024){const err59={instancePath:instancePath+"/subject",schemaPath:"#/properties/subject/maxLength",keyword:"maxLength",params:{limit:1024},message:"must NOT have more than 1024 characters"};if(vErrors===null){vErrors=[err59]}else{vErrors.push(err59)}errors++}if(func1(data13)<1){const err60={instancePath:instancePath+"/subject",schemaPath:"#/properties/subject/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err60]}else{vErrors.push(err60)}errors++}if(!pattern4.test(data13)){const err61={instancePath:instancePath+"/subject",schemaPath:"#/properties/subject/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err61]}else{vErrors.push(err61)}errors++}}else{const err62={instancePath:instancePath+"/subject",schemaPath:"#/properties/subject/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err62]}else{vErrors.push(err62)}errors++}}if(data.data!==void 0){if(!validate20(data.data,{instancePath:instancePath+"/data",parentData:data,parentDataProperty:"data",rootData,dynamicAnchors})){vErrors=vErrors===null?validate20.errors:vErrors.concat(validate20.errors);errors=vErrors.length}}if(data.orgnamespace!==void 0){let data15=data.orgnamespace;if(typeof data15==="string"){if(func1(data15)>256){const err63={instancePath:instancePath+"/orgnamespace",schemaPath:"#/properties/orgnamespace/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err63]}else{vErrors.push(err63)}errors++}if(func1(data15)<1){const err64={instancePath:instancePath+"/orgnamespace",schemaPath:"#/properties/orgnamespace/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err64]}else{vErrors.push(err64)}errors++}if(!pattern4.test(data15)){const err65={instancePath:instancePath+"/orgnamespace",schemaPath:"#/properties/orgnamespace/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err65]}else{vErrors.push(err65)}errors++}}else{const err66={instancePath:instancePath+"/orgnamespace",schemaPath:"#/properties/orgnamespace/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err66]}else{vErrors.push(err66)}errors++}}if(data.orgref!==void 0){let data16=data.orgref;if(typeof data16==="string"){if(func1(data16)>256){const err67={instancePath:instancePath+"/orgref",schemaPath:"#/properties/orgref/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err67]}else{vErrors.push(err67)}errors++}if(func1(data16)<1){const err68={instancePath:instancePath+"/orgref",schemaPath:"#/properties/orgref/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err68]}else{vErrors.push(err68)}errors++}if(!pattern4.test(data16)){const err69={instancePath:instancePath+"/orgref",schemaPath:"#/properties/orgref/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err69]}else{vErrors.push(err69)}errors++}}else{const err70={instancePath:instancePath+"/orgref",schemaPath:"#/properties/orgref/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err70]}else{vErrors.push(err70)}errors++}}if(data.projectnamespace!==void 0){let data17=data.projectnamespace;if(typeof data17==="string"){if(func1(data17)>256){const err71={instancePath:instancePath+"/projectnamespace",schemaPath:"#/properties/projectnamespace/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err71]}else{vErrors.push(err71)}errors++}if(func1(data17)<1){const err72={instancePath:instancePath+"/projectnamespace",schemaPath:"#/properties/projectnamespace/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err72]}else{vErrors.push(err72)}errors++}if(!pattern4.test(data17)){const err73={instancePath:instancePath+"/projectnamespace",schemaPath:"#/properties/projectnamespace/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err73]}else{vErrors.push(err73)}errors++}}else{const err74={instancePath:instancePath+"/projectnamespace",schemaPath:"#/properties/projectnamespace/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err74]}else{vErrors.push(err74)}errors++}}if(data.projectref!==void 0){let data18=data.projectref;if(typeof data18==="string"){if(func1(data18)>256){const err75={instancePath:instancePath+"/projectref",schemaPath:"#/properties/projectref/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err75]}else{vErrors.push(err75)}errors++}if(func1(data18)<1){const err76={instancePath:instancePath+"/projectref",schemaPath:"#/properties/projectref/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err76]}else{vErrors.push(err76)}errors++}if(!pattern4.test(data18)){const err77={instancePath:instancePath+"/projectref",schemaPath:"#/properties/projectref/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err77]}else{vErrors.push(err77)}errors++}}else{const err78={instancePath:instancePath+"/projectref",schemaPath:"#/properties/projectref/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err78]}else{vErrors.push(err78)}errors++}}if(data.principalnamespace!==void 0){let data19=data.principalnamespace;if(typeof data19==="string"){if(func1(data19)>256){const err79={instancePath:instancePath+"/principalnamespace",schemaPath:"#/properties/principalnamespace/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err79]}else{vErrors.push(err79)}errors++}if(func1(data19)<1){const err80={instancePath:instancePath+"/principalnamespace",schemaPath:"#/properties/principalnamespace/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err80]}else{vErrors.push(err80)}errors++}if(!pattern4.test(data19)){const err81={instancePath:instancePath+"/principalnamespace",schemaPath:"#/properties/principalnamespace/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err81]}else{vErrors.push(err81)}errors++}}else{const err82={instancePath:instancePath+"/principalnamespace",schemaPath:"#/properties/principalnamespace/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err82]}else{vErrors.push(err82)}errors++}}if(data.principalref!==void 0){let data20=data.principalref;if(typeof data20==="string"){if(func1(data20)>256){const err83={instancePath:instancePath+"/principalref",schemaPath:"#/properties/principalref/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err83]}else{vErrors.push(err83)}errors++}if(func1(data20)<1){const err84={instancePath:instancePath+"/principalref",schemaPath:"#/properties/principalref/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err84]}else{vErrors.push(err84)}errors++}if(!pattern4.test(data20)){const err85={instancePath:instancePath+"/principalref",schemaPath:"#/properties/principalref/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err85]}else{vErrors.push(err85)}errors++}}else{const err86={instancePath:instancePath+"/principalref",schemaPath:"#/properties/principalref/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err86]}else{vErrors.push(err86)}errors++}}if(data.resourcenamespace!==void 0){let data21=data.resourcenamespace;if(typeof data21==="string"){if(func1(data21)>256){const err87={instancePath:instancePath+"/resourcenamespace",schemaPath:"#/properties/resourcenamespace/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err87]}else{vErrors.push(err87)}errors++}if(func1(data21)<1){const err88={instancePath:instancePath+"/resourcenamespace",schemaPath:"#/properties/resourcenamespace/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err88]}else{vErrors.push(err88)}errors++}if(!pattern4.test(data21)){const err89={instancePath:instancePath+"/resourcenamespace",schemaPath:"#/properties/resourcenamespace/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err89]}else{vErrors.push(err89)}errors++}}else{const err90={instancePath:instancePath+"/resourcenamespace",schemaPath:"#/properties/resourcenamespace/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err90]}else{vErrors.push(err90)}errors++}}if(data.resourceref!==void 0){let data22=data.resourceref;if(typeof data22==="string"){if(func1(data22)>256){const err91={instancePath:instancePath+"/resourceref",schemaPath:"#/properties/resourceref/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err91]}else{vErrors.push(err91)}errors++}if(func1(data22)<1){const err92={instancePath:instancePath+"/resourceref",schemaPath:"#/properties/resourceref/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err92]}else{vErrors.push(err92)}errors++}if(!pattern4.test(data22)){const err93={instancePath:instancePath+"/resourceref",schemaPath:"#/properties/resourceref/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err93]}else{vErrors.push(err93)}errors++}}else{const err94={instancePath:instancePath+"/resourceref",schemaPath:"#/properties/resourceref/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err94]}else{vErrors.push(err94)}errors++}}if(data.orgnamespace!==void 0){if(data.orgref===void 0){const err95={instancePath,schemaPath:"#/dependentRequired",keyword:"dependentRequired",params:{property:"orgnamespace",missingProperty:"orgref",depsCount:1,deps:"orgref"},message:"must have property orgref when property orgnamespace is present"};if(vErrors===null){vErrors=[err95]}else{vErrors.push(err95)}errors++}}if(data.orgref!==void 0){if(data.orgnamespace===void 0){const err96={instancePath,schemaPath:"#/dependentRequired",keyword:"dependentRequired",params:{property:"orgref",missingProperty:"orgnamespace",depsCount:1,deps:"orgnamespace"},message:"must have property orgnamespace when property orgref is present"};if(vErrors===null){vErrors=[err96]}else{vErrors.push(err96)}errors++}}if(data.projectnamespace!==void 0){if(data.projectref===void 0){const err97={instancePath,schemaPath:"#/dependentRequired",keyword:"dependentRequired",params:{property:"projectnamespace",missingProperty:"projectref",depsCount:1,deps:"projectref"},message:"must have property projectref when property projectnamespace is present"};if(vErrors===null){vErrors=[err97]}else{vErrors.push(err97)}errors++}}if(data.projectref!==void 0){if(data.projectnamespace===void 0){const err98={instancePath,schemaPath:"#/dependentRequired",keyword:"dependentRequired",params:{property:"projectref",missingProperty:"projectnamespace",depsCount:1,deps:"projectnamespace"},message:"must have property projectnamespace when property projectref is present"};if(vErrors===null){vErrors=[err98]}else{vErrors.push(err98)}errors++}}if(data.principalnamespace!==void 0){if(data.principalref===void 0){const err99={instancePath,schemaPath:"#/dependentRequired",keyword:"dependentRequired",params:{property:"principalnamespace",missingProperty:"principalref",depsCount:1,deps:"principalref"},message:"must have property principalref when property principalnamespace is present"};if(vErrors===null){vErrors=[err99]}else{vErrors.push(err99)}errors++}}if(data.principalref!==void 0){if(data.principalnamespace===void 0){const err100={instancePath,schemaPath:"#/dependentRequired",keyword:"dependentRequired",params:{property:"principalref",missingProperty:"principalnamespace",depsCount:1,deps:"principalnamespace"},message:"must have property principalnamespace when property principalref is present"};if(vErrors===null){vErrors=[err100]}else{vErrors.push(err100)}errors++}}if(data.resourcenamespace!==void 0){if(data.resourceref===void 0){const err101={instancePath,schemaPath:"#/dependentRequired",keyword:"dependentRequired",params:{property:"resourcenamespace",missingProperty:"resourceref",depsCount:1,deps:"resourceref"},message:"must have property resourceref when property resourcenamespace is present"};if(vErrors===null){vErrors=[err101]}else{vErrors.push(err101)}errors++}}if(data.resourceref!==void 0){if(data.resourcenamespace===void 0){const err102={instancePath,schemaPath:"#/dependentRequired",keyword:"dependentRequired",params:{property:"resourceref",missingProperty:"resourcenamespace",depsCount:1,deps:"resourcenamespace"},message:"must have property resourcenamespace when property resourceref is present"};if(vErrors===null){vErrors=[err102]}else{vErrors.push(err102)}errors++}}}else{const err103={instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};if(vErrors===null){vErrors=[err103]}else{vErrors.push(err103)}errors++}validate28.errors=vErrors;return errors===0}validate28.evaluated={props:true,dynamicProps:false,dynamicItems:false};var cloudEventSupported=validate30;function validate30(data,{instancePath="",parentData,parentDataProperty,rootData=data,dynamicAnchors={}}={}){let vErrors=null;let errors=0;const evaluated0=validate30.evaluated;if(evaluated0.dynamicProps){evaluated0.props=void 0}if(evaluated0.dynamicItems){evaluated0.items=void 0}const _errs0=errors;let valid0=false;let passing0=null;const _errs1=errors;if(!validate22(data,{instancePath,parentData,parentDataProperty,rootData,dynamicAnchors})){vErrors=vErrors===null?validate22.errors:vErrors.concat(validate22.errors);errors=vErrors.length}var _valid0=_errs1===errors;if(_valid0){valid0=true;passing0=0;var props0=true}const _errs2=errors;if(!validate24(data,{instancePath,parentData,parentDataProperty,rootData,dynamicAnchors})){vErrors=vErrors===null?validate24.errors:vErrors.concat(validate24.errors);errors=vErrors.length}var _valid0=_errs2===errors;if(_valid0&&valid0){valid0=false;passing0=[passing0,1]}else{if(_valid0){valid0=true;passing0=1;if(props0!==true){props0=true}}const _errs3=errors;if(!validate26(data,{instancePath,parentData,parentDataProperty,rootData,dynamicAnchors})){vErrors=vErrors===null?validate26.errors:vErrors.concat(validate26.errors);errors=vErrors.length}var _valid0=_errs3===errors;if(_valid0&&valid0){valid0=false;passing0=[passing0,2]}else{if(_valid0){valid0=true;passing0=2;if(props0!==true){props0=true}}}}if(!valid0){const err0={instancePath,schemaPath:"#/oneOf",keyword:"oneOf",params:{passingSchemas:passing0},message:"must match exactly one schema in oneOf"};if(vErrors===null){vErrors=[err0]}else{vErrors.push(err0)}errors++}else{errors=_errs0;if(vErrors!==null){if(_errs0){vErrors.length=_errs0}else{vErrors=null}}}validate30.errors=vErrors;evaluated0.props=props0;return errors===0}validate30.evaluated={dynamicProps:true,dynamicItems:false};var namespacedReference=validate34;function validate34(data,{instancePath="",parentData,parentDataProperty,rootData=data,dynamicAnchors={}}={}){let vErrors=null;let errors=0;const evaluated0=validate34.evaluated;if(evaluated0.dynamicProps){evaluated0.props=void 0}if(evaluated0.dynamicItems){evaluated0.items=void 0}if(data&&typeof data=="object"&&!Array.isArray(data)){if(data.namespace===void 0){const err0={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"namespace"},message:"must have required property 'namespace'"};if(vErrors===null){vErrors=[err0]}else{vErrors.push(err0)}errors++}if(data.ref===void 0){const err1={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"ref"},message:"must have required property 'ref'"};if(vErrors===null){vErrors=[err1]}else{vErrors.push(err1)}errors++}for(const key0 in data){if(!(key0==="namespace"||key0==="ref")){const err2={instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key0},message:"must NOT have additional properties"};if(vErrors===null){vErrors=[err2]}else{vErrors.push(err2)}errors++}}if(data.namespace!==void 0){let data0=data.namespace;if(typeof data0==="string"){if(func1(data0)>256){const err3={instancePath:instancePath+"/namespace",schemaPath:"#/properties/namespace/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err3]}else{vErrors.push(err3)}errors++}if(func1(data0)<1){const err4={instancePath:instancePath+"/namespace",schemaPath:"#/properties/namespace/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err4]}else{vErrors.push(err4)}errors++}if(!pattern4.test(data0)){const err5={instancePath:instancePath+"/namespace",schemaPath:"#/properties/namespace/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err5]}else{vErrors.push(err5)}errors++}}else{const err6={instancePath:instancePath+"/namespace",schemaPath:"#/properties/namespace/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err6]}else{vErrors.push(err6)}errors++}}if(data.ref!==void 0){let data1=data.ref;if(typeof data1==="string"){if(func1(data1)>256){const err7={instancePath:instancePath+"/ref",schemaPath:"#/properties/ref/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err7]}else{vErrors.push(err7)}errors++}if(func1(data1)<1){const err8={instancePath:instancePath+"/ref",schemaPath:"#/properties/ref/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err8]}else{vErrors.push(err8)}errors++}if(!pattern4.test(data1)){const err9={instancePath:instancePath+"/ref",schemaPath:"#/properties/ref/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err9]}else{vErrors.push(err9)}errors++}}else{const err10={instancePath:instancePath+"/ref",schemaPath:"#/properties/ref/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err10]}else{vErrors.push(err10)}errors++}}}else{const err11={instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};if(vErrors===null){vErrors=[err11]}else{vErrors.push(err11)}errors++}validate34.errors=vErrors;return errors===0}validate34.evaluated={props:true,dynamicProps:false,dynamicItems:false};var identityContext=validate35;function validate35(data,{instancePath="",parentData,parentDataProperty,rootData=data,dynamicAnchors={}}={}){let vErrors=null;let errors=0;const evaluated0=validate35.evaluated;if(evaluated0.dynamicProps){evaluated0.props=void 0}if(evaluated0.dynamicItems){evaluated0.items=void 0}if(data&&typeof data=="object"&&!Array.isArray(data)){if(data.sourceTenant===void 0){const err0={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"sourceTenant"},message:"must have required property 'sourceTenant'"};if(vErrors===null){vErrors=[err0]}else{vErrors.push(err0)}errors++}for(const key0 in data){if(!(key0==="sourceTenant"||key0==="organization"||key0==="project"||key0==="actorPrincipal"||key0==="resource")){const err1={instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key0},message:"must NOT have additional properties"};if(vErrors===null){vErrors=[err1]}else{vErrors.push(err1)}errors++}}if(data.sourceTenant!==void 0){let data0=data.sourceTenant;if(data0&&typeof data0=="object"&&!Array.isArray(data0)){if(data0.serviceRef===void 0){const err2={instancePath:instancePath+"/sourceTenant",schemaPath:"tenant-context.schema.json/required",keyword:"required",params:{missingProperty:"serviceRef"},message:"must have required property 'serviceRef'"};if(vErrors===null){vErrors=[err2]}else{vErrors.push(err2)}errors++}if(data0.tenantRef===void 0){const err3={instancePath:instancePath+"/sourceTenant",schemaPath:"tenant-context.schema.json/required",keyword:"required",params:{missingProperty:"tenantRef"},message:"must have required property 'tenantRef'"};if(vErrors===null){vErrors=[err3]}else{vErrors.push(err3)}errors++}for(const key1 in data0){if(!(key1==="serviceRef"||key1==="tenantRef")){const err4={instancePath:instancePath+"/sourceTenant",schemaPath:"tenant-context.schema.json/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key1},message:"must NOT have additional properties"};if(vErrors===null){vErrors=[err4]}else{vErrors.push(err4)}errors++}}if(data0.serviceRef!==void 0){let data1=data0.serviceRef;if(typeof data1==="string"){if(func1(data1)>256){const err5={instancePath:instancePath+"/sourceTenant/serviceRef",schemaPath:"tenant-context.schema.json/properties/serviceRef/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err5]}else{vErrors.push(err5)}errors++}if(func1(data1)<1){const err6={instancePath:instancePath+"/sourceTenant/serviceRef",schemaPath:"tenant-context.schema.json/properties/serviceRef/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err6]}else{vErrors.push(err6)}errors++}if(!pattern4.test(data1)){const err7={instancePath:instancePath+"/sourceTenant/serviceRef",schemaPath:"tenant-context.schema.json/properties/serviceRef/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err7]}else{vErrors.push(err7)}errors++}}else{const err8={instancePath:instancePath+"/sourceTenant/serviceRef",schemaPath:"tenant-context.schema.json/properties/serviceRef/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err8]}else{vErrors.push(err8)}errors++}}if(data0.tenantRef!==void 0){let data2=data0.tenantRef;if(typeof data2==="string"){if(func1(data2)>256){const err9={instancePath:instancePath+"/sourceTenant/tenantRef",schemaPath:"tenant-context.schema.json/properties/tenantRef/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err9]}else{vErrors.push(err9)}errors++}if(func1(data2)<1){const err10={instancePath:instancePath+"/sourceTenant/tenantRef",schemaPath:"tenant-context.schema.json/properties/tenantRef/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err10]}else{vErrors.push(err10)}errors++}if(!pattern4.test(data2)){const err11={instancePath:instancePath+"/sourceTenant/tenantRef",schemaPath:"tenant-context.schema.json/properties/tenantRef/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err11]}else{vErrors.push(err11)}errors++}}else{const err12={instancePath:instancePath+"/sourceTenant/tenantRef",schemaPath:"tenant-context.schema.json/properties/tenantRef/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err12]}else{vErrors.push(err12)}errors++}}}else{const err13={instancePath:instancePath+"/sourceTenant",schemaPath:"tenant-context.schema.json/type",keyword:"type",params:{type:"object"},message:"must be object"};if(vErrors===null){vErrors=[err13]}else{vErrors.push(err13)}errors++}}if(data.organization!==void 0){let data3=data.organization;if(data3&&typeof data3=="object"&&!Array.isArray(data3)){if(data3.namespace===void 0){const err14={instancePath:instancePath+"/organization",schemaPath:"namespaced-reference.schema.json/required",keyword:"required",params:{missingProperty:"namespace"},message:"must have required property 'namespace'"};if(vErrors===null){vErrors=[err14]}else{vErrors.push(err14)}errors++}if(data3.ref===void 0){const err15={instancePath:instancePath+"/organization",schemaPath:"namespaced-reference.schema.json/required",keyword:"required",params:{missingProperty:"ref"},message:"must have required property 'ref'"};if(vErrors===null){vErrors=[err15]}else{vErrors.push(err15)}errors++}for(const key2 in data3){if(!(key2==="namespace"||key2==="ref")){const err16={instancePath:instancePath+"/organization",schemaPath:"namespaced-reference.schema.json/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key2},message:"must NOT have additional properties"};if(vErrors===null){vErrors=[err16]}else{vErrors.push(err16)}errors++}}if(data3.namespace!==void 0){let data4=data3.namespace;if(typeof data4==="string"){if(func1(data4)>256){const err17={instancePath:instancePath+"/organization/namespace",schemaPath:"namespaced-reference.schema.json/properties/namespace/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err17]}else{vErrors.push(err17)}errors++}if(func1(data4)<1){const err18={instancePath:instancePath+"/organization/namespace",schemaPath:"namespaced-reference.schema.json/properties/namespace/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err18]}else{vErrors.push(err18)}errors++}if(!pattern4.test(data4)){const err19={instancePath:instancePath+"/organization/namespace",schemaPath:"namespaced-reference.schema.json/properties/namespace/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err19]}else{vErrors.push(err19)}errors++}}else{const err20={instancePath:instancePath+"/organization/namespace",schemaPath:"namespaced-reference.schema.json/properties/namespace/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err20]}else{vErrors.push(err20)}errors++}}if(data3.ref!==void 0){let data5=data3.ref;if(typeof data5==="string"){if(func1(data5)>256){const err21={instancePath:instancePath+"/organization/ref",schemaPath:"namespaced-reference.schema.json/properties/ref/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err21]}else{vErrors.push(err21)}errors++}if(func1(data5)<1){const err22={instancePath:instancePath+"/organization/ref",schemaPath:"namespaced-reference.schema.json/properties/ref/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err22]}else{vErrors.push(err22)}errors++}if(!pattern4.test(data5)){const err23={instancePath:instancePath+"/organization/ref",schemaPath:"namespaced-reference.schema.json/properties/ref/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err23]}else{vErrors.push(err23)}errors++}}else{const err24={instancePath:instancePath+"/organization/ref",schemaPath:"namespaced-reference.schema.json/properties/ref/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err24]}else{vErrors.push(err24)}errors++}}}else{const err25={instancePath:instancePath+"/organization",schemaPath:"namespaced-reference.schema.json/type",keyword:"type",params:{type:"object"},message:"must be object"};if(vErrors===null){vErrors=[err25]}else{vErrors.push(err25)}errors++}}if(data.project!==void 0){let data6=data.project;if(data6&&typeof data6=="object"&&!Array.isArray(data6)){if(data6.namespace===void 0){const err26={instancePath:instancePath+"/project",schemaPath:"namespaced-reference.schema.json/required",keyword:"required",params:{missingProperty:"namespace"},message:"must have required property 'namespace'"};if(vErrors===null){vErrors=[err26]}else{vErrors.push(err26)}errors++}if(data6.ref===void 0){const err27={instancePath:instancePath+"/project",schemaPath:"namespaced-reference.schema.json/required",keyword:"required",params:{missingProperty:"ref"},message:"must have required property 'ref'"};if(vErrors===null){vErrors=[err27]}else{vErrors.push(err27)}errors++}for(const key3 in data6){if(!(key3==="namespace"||key3==="ref")){const err28={instancePath:instancePath+"/project",schemaPath:"namespaced-reference.schema.json/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key3},message:"must NOT have additional properties"};if(vErrors===null){vErrors=[err28]}else{vErrors.push(err28)}errors++}}if(data6.namespace!==void 0){let data7=data6.namespace;if(typeof data7==="string"){if(func1(data7)>256){const err29={instancePath:instancePath+"/project/namespace",schemaPath:"namespaced-reference.schema.json/properties/namespace/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err29]}else{vErrors.push(err29)}errors++}if(func1(data7)<1){const err30={instancePath:instancePath+"/project/namespace",schemaPath:"namespaced-reference.schema.json/properties/namespace/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err30]}else{vErrors.push(err30)}errors++}if(!pattern4.test(data7)){const err31={instancePath:instancePath+"/project/namespace",schemaPath:"namespaced-reference.schema.json/properties/namespace/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err31]}else{vErrors.push(err31)}errors++}}else{const err32={instancePath:instancePath+"/project/namespace",schemaPath:"namespaced-reference.schema.json/properties/namespace/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err32]}else{vErrors.push(err32)}errors++}}if(data6.ref!==void 0){let data8=data6.ref;if(typeof data8==="string"){if(func1(data8)>256){const err33={instancePath:instancePath+"/project/ref",schemaPath:"namespaced-reference.schema.json/properties/ref/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err33]}else{vErrors.push(err33)}errors++}if(func1(data8)<1){const err34={instancePath:instancePath+"/project/ref",schemaPath:"namespaced-reference.schema.json/properties/ref/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err34]}else{vErrors.push(err34)}errors++}if(!pattern4.test(data8)){const err35={instancePath:instancePath+"/project/ref",schemaPath:"namespaced-reference.schema.json/properties/ref/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err35]}else{vErrors.push(err35)}errors++}}else{const err36={instancePath:instancePath+"/project/ref",schemaPath:"namespaced-reference.schema.json/properties/ref/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err36]}else{vErrors.push(err36)}errors++}}}else{const err37={instancePath:instancePath+"/project",schemaPath:"namespaced-reference.schema.json/type",keyword:"type",params:{type:"object"},message:"must be object"};if(vErrors===null){vErrors=[err37]}else{vErrors.push(err37)}errors++}}if(data.actorPrincipal!==void 0){let data9=data.actorPrincipal;if(data9&&typeof data9=="object"&&!Array.isArray(data9)){if(data9.namespace===void 0){const err38={instancePath:instancePath+"/actorPrincipal",schemaPath:"namespaced-reference.schema.json/required",keyword:"required",params:{missingProperty:"namespace"},message:"must have required property 'namespace'"};if(vErrors===null){vErrors=[err38]}else{vErrors.push(err38)}errors++}if(data9.ref===void 0){const err39={instancePath:instancePath+"/actorPrincipal",schemaPath:"namespaced-reference.schema.json/required",keyword:"required",params:{missingProperty:"ref"},message:"must have required property 'ref'"};if(vErrors===null){vErrors=[err39]}else{vErrors.push(err39)}errors++}for(const key4 in data9){if(!(key4==="namespace"||key4==="ref")){const err40={instancePath:instancePath+"/actorPrincipal",schemaPath:"namespaced-reference.schema.json/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key4},message:"must NOT have additional properties"};if(vErrors===null){vErrors=[err40]}else{vErrors.push(err40)}errors++}}if(data9.namespace!==void 0){let data10=data9.namespace;if(typeof data10==="string"){if(func1(data10)>256){const err41={instancePath:instancePath+"/actorPrincipal/namespace",schemaPath:"namespaced-reference.schema.json/properties/namespace/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err41]}else{vErrors.push(err41)}errors++}if(func1(data10)<1){const err42={instancePath:instancePath+"/actorPrincipal/namespace",schemaPath:"namespaced-reference.schema.json/properties/namespace/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err42]}else{vErrors.push(err42)}errors++}if(!pattern4.test(data10)){const err43={instancePath:instancePath+"/actorPrincipal/namespace",schemaPath:"namespaced-reference.schema.json/properties/namespace/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err43]}else{vErrors.push(err43)}errors++}}else{const err44={instancePath:instancePath+"/actorPrincipal/namespace",schemaPath:"namespaced-reference.schema.json/properties/namespace/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err44]}else{vErrors.push(err44)}errors++}}if(data9.ref!==void 0){let data11=data9.ref;if(typeof data11==="string"){if(func1(data11)>256){const err45={instancePath:instancePath+"/actorPrincipal/ref",schemaPath:"namespaced-reference.schema.json/properties/ref/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err45]}else{vErrors.push(err45)}errors++}if(func1(data11)<1){const err46={instancePath:instancePath+"/actorPrincipal/ref",schemaPath:"namespaced-reference.schema.json/properties/ref/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err46]}else{vErrors.push(err46)}errors++}if(!pattern4.test(data11)){const err47={instancePath:instancePath+"/actorPrincipal/ref",schemaPath:"namespaced-reference.schema.json/properties/ref/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err47]}else{vErrors.push(err47)}errors++}}else{const err48={instancePath:instancePath+"/actorPrincipal/ref",schemaPath:"namespaced-reference.schema.json/properties/ref/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err48]}else{vErrors.push(err48)}errors++}}}else{const err49={instancePath:instancePath+"/actorPrincipal",schemaPath:"namespaced-reference.schema.json/type",keyword:"type",params:{type:"object"},message:"must be object"};if(vErrors===null){vErrors=[err49]}else{vErrors.push(err49)}errors++}}if(data.resource!==void 0){let data12=data.resource;if(data12&&typeof data12=="object"&&!Array.isArray(data12)){if(data12.namespace===void 0){const err50={instancePath:instancePath+"/resource",schemaPath:"namespaced-reference.schema.json/required",keyword:"required",params:{missingProperty:"namespace"},message:"must have required property 'namespace'"};if(vErrors===null){vErrors=[err50]}else{vErrors.push(err50)}errors++}if(data12.ref===void 0){const err51={instancePath:instancePath+"/resource",schemaPath:"namespaced-reference.schema.json/required",keyword:"required",params:{missingProperty:"ref"},message:"must have required property 'ref'"};if(vErrors===null){vErrors=[err51]}else{vErrors.push(err51)}errors++}for(const key5 in data12){if(!(key5==="namespace"||key5==="ref")){const err52={instancePath:instancePath+"/resource",schemaPath:"namespaced-reference.schema.json/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key5},message:"must NOT have additional properties"};if(vErrors===null){vErrors=[err52]}else{vErrors.push(err52)}errors++}}if(data12.namespace!==void 0){let data13=data12.namespace;if(typeof data13==="string"){if(func1(data13)>256){const err53={instancePath:instancePath+"/resource/namespace",schemaPath:"namespaced-reference.schema.json/properties/namespace/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err53]}else{vErrors.push(err53)}errors++}if(func1(data13)<1){const err54={instancePath:instancePath+"/resource/namespace",schemaPath:"namespaced-reference.schema.json/properties/namespace/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err54]}else{vErrors.push(err54)}errors++}if(!pattern4.test(data13)){const err55={instancePath:instancePath+"/resource/namespace",schemaPath:"namespaced-reference.schema.json/properties/namespace/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err55]}else{vErrors.push(err55)}errors++}}else{const err56={instancePath:instancePath+"/resource/namespace",schemaPath:"namespaced-reference.schema.json/properties/namespace/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err56]}else{vErrors.push(err56)}errors++}}if(data12.ref!==void 0){let data14=data12.ref;if(typeof data14==="string"){if(func1(data14)>256){const err57={instancePath:instancePath+"/resource/ref",schemaPath:"namespaced-reference.schema.json/properties/ref/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err57]}else{vErrors.push(err57)}errors++}if(func1(data14)<1){const err58={instancePath:instancePath+"/resource/ref",schemaPath:"namespaced-reference.schema.json/properties/ref/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err58]}else{vErrors.push(err58)}errors++}if(!pattern4.test(data14)){const err59={instancePath:instancePath+"/resource/ref",schemaPath:"namespaced-reference.schema.json/properties/ref/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err59]}else{vErrors.push(err59)}errors++}}else{const err60={instancePath:instancePath+"/resource/ref",schemaPath:"namespaced-reference.schema.json/properties/ref/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err60]}else{vErrors.push(err60)}errors++}}}else{const err61={instancePath:instancePath+"/resource",schemaPath:"namespaced-reference.schema.json/type",keyword:"type",params:{type:"object"},message:"must be object"};if(vErrors===null){vErrors=[err61]}else{vErrors.push(err61)}errors++}}}else{const err62={instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};if(vErrors===null){vErrors=[err62]}else{vErrors.push(err62)}errors++}validate35.errors=vErrors;return errors===0}validate35.evaluated={props:true,dynamicProps:false,dynamicItems:false};var businessReceipt=validate36;var schema45={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://eventsdk.dev/schemas/v1/business-receipt.schema.json",title:"BusinessReceipt",type:"object",additionalProperties:false,properties:{receiptRef:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u001f\\u007f]+$"},originSource:{type:"string",minLength:1,maxLength:2048,pattern:"^[^\\u0000-\\u001f\\u007f]+$",format:"uri"},originEventId:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u001f\\u007f]+$"},deliveryRef:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u001f\\u007f]+$"},consumerRef:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u001f\\u007f]+$"},targetScope:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u001f\\u007f]+$"},disposition:{type:"string",enum:["RECEIVED","APPLIED","REJECTED","HOLD","UNKNOWN"]},recordedAt:{type:"string",format:"date-time",maxLength:64},revision:{type:"integer",minimum:1,maximum:9007199254740991},reasonCode:{type:"string",minLength:1,maxLength:128,pattern:"^[A-Z][A-Z0-9_]*$"},resultRef:{$ref:"result-ref.schema.json"}},required:["receiptRef","originSource","originEventId","deliveryRef","consumerRef","targetScope","disposition","recordedAt","revision"]};var pattern98=new RegExp("^[A-Z][A-Z0-9_]*$","u");function validate36(data,{instancePath="",parentData,parentDataProperty,rootData=data,dynamicAnchors={}}={}){let vErrors=null;let errors=0;const evaluated0=validate36.evaluated;if(evaluated0.dynamicProps){evaluated0.props=void 0}if(evaluated0.dynamicItems){evaluated0.items=void 0}if(data&&typeof data=="object"&&!Array.isArray(data)){if(data.receiptRef===void 0){const err0={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"receiptRef"},message:"must have required property 'receiptRef'"};if(vErrors===null){vErrors=[err0]}else{vErrors.push(err0)}errors++}if(data.originSource===void 0){const err1={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"originSource"},message:"must have required property 'originSource'"};if(vErrors===null){vErrors=[err1]}else{vErrors.push(err1)}errors++}if(data.originEventId===void 0){const err2={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"originEventId"},message:"must have required property 'originEventId'"};if(vErrors===null){vErrors=[err2]}else{vErrors.push(err2)}errors++}if(data.deliveryRef===void 0){const err3={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"deliveryRef"},message:"must have required property 'deliveryRef'"};if(vErrors===null){vErrors=[err3]}else{vErrors.push(err3)}errors++}if(data.consumerRef===void 0){const err4={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"consumerRef"},message:"must have required property 'consumerRef'"};if(vErrors===null){vErrors=[err4]}else{vErrors.push(err4)}errors++}if(data.targetScope===void 0){const err5={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"targetScope"},message:"must have required property 'targetScope'"};if(vErrors===null){vErrors=[err5]}else{vErrors.push(err5)}errors++}if(data.disposition===void 0){const err6={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"disposition"},message:"must have required property 'disposition'"};if(vErrors===null){vErrors=[err6]}else{vErrors.push(err6)}errors++}if(data.recordedAt===void 0){const err7={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"recordedAt"},message:"must have required property 'recordedAt'"};if(vErrors===null){vErrors=[err7]}else{vErrors.push(err7)}errors++}if(data.revision===void 0){const err8={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"revision"},message:"must have required property 'revision'"};if(vErrors===null){vErrors=[err8]}else{vErrors.push(err8)}errors++}for(const key0 in data){if(!func11.call(schema45.properties,key0)){const err9={instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key0},message:"must NOT have additional properties"};if(vErrors===null){vErrors=[err9]}else{vErrors.push(err9)}errors++}}if(data.receiptRef!==void 0){let data0=data.receiptRef;if(typeof data0==="string"){if(func1(data0)>256){const err10={instancePath:instancePath+"/receiptRef",schemaPath:"#/properties/receiptRef/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err10]}else{vErrors.push(err10)}errors++}if(func1(data0)<1){const err11={instancePath:instancePath+"/receiptRef",schemaPath:"#/properties/receiptRef/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err11]}else{vErrors.push(err11)}errors++}if(!pattern4.test(data0)){const err12={instancePath:instancePath+"/receiptRef",schemaPath:"#/properties/receiptRef/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err12]}else{vErrors.push(err12)}errors++}}else{const err13={instancePath:instancePath+"/receiptRef",schemaPath:"#/properties/receiptRef/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err13]}else{vErrors.push(err13)}errors++}}if(data.originSource!==void 0){let data1=data.originSource;if(typeof data1==="string"){if(func1(data1)>2048){const err14={instancePath:instancePath+"/originSource",schemaPath:"#/properties/originSource/maxLength",keyword:"maxLength",params:{limit:2048},message:"must NOT have more than 2048 characters"};if(vErrors===null){vErrors=[err14]}else{vErrors.push(err14)}errors++}if(func1(data1)<1){const err15={instancePath:instancePath+"/originSource",schemaPath:"#/properties/originSource/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err15]}else{vErrors.push(err15)}errors++}if(!pattern4.test(data1)){const err16={instancePath:instancePath+"/originSource",schemaPath:"#/properties/originSource/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err16]}else{vErrors.push(err16)}errors++}if(!formats0(data1)){const err17={instancePath:instancePath+"/originSource",schemaPath:"#/properties/originSource/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};if(vErrors===null){vErrors=[err17]}else{vErrors.push(err17)}errors++}}else{const err18={instancePath:instancePath+"/originSource",schemaPath:"#/properties/originSource/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err18]}else{vErrors.push(err18)}errors++}}if(data.originEventId!==void 0){let data2=data.originEventId;if(typeof data2==="string"){if(func1(data2)>256){const err19={instancePath:instancePath+"/originEventId",schemaPath:"#/properties/originEventId/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err19]}else{vErrors.push(err19)}errors++}if(func1(data2)<1){const err20={instancePath:instancePath+"/originEventId",schemaPath:"#/properties/originEventId/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err20]}else{vErrors.push(err20)}errors++}if(!pattern4.test(data2)){const err21={instancePath:instancePath+"/originEventId",schemaPath:"#/properties/originEventId/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err21]}else{vErrors.push(err21)}errors++}}else{const err22={instancePath:instancePath+"/originEventId",schemaPath:"#/properties/originEventId/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err22]}else{vErrors.push(err22)}errors++}}if(data.deliveryRef!==void 0){let data3=data.deliveryRef;if(typeof data3==="string"){if(func1(data3)>256){const err23={instancePath:instancePath+"/deliveryRef",schemaPath:"#/properties/deliveryRef/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err23]}else{vErrors.push(err23)}errors++}if(func1(data3)<1){const err24={instancePath:instancePath+"/deliveryRef",schemaPath:"#/properties/deliveryRef/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err24]}else{vErrors.push(err24)}errors++}if(!pattern4.test(data3)){const err25={instancePath:instancePath+"/deliveryRef",schemaPath:"#/properties/deliveryRef/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err25]}else{vErrors.push(err25)}errors++}}else{const err26={instancePath:instancePath+"/deliveryRef",schemaPath:"#/properties/deliveryRef/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err26]}else{vErrors.push(err26)}errors++}}if(data.consumerRef!==void 0){let data4=data.consumerRef;if(typeof data4==="string"){if(func1(data4)>256){const err27={instancePath:instancePath+"/consumerRef",schemaPath:"#/properties/consumerRef/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err27]}else{vErrors.push(err27)}errors++}if(func1(data4)<1){const err28={instancePath:instancePath+"/consumerRef",schemaPath:"#/properties/consumerRef/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err28]}else{vErrors.push(err28)}errors++}if(!pattern4.test(data4)){const err29={instancePath:instancePath+"/consumerRef",schemaPath:"#/properties/consumerRef/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err29]}else{vErrors.push(err29)}errors++}}else{const err30={instancePath:instancePath+"/consumerRef",schemaPath:"#/properties/consumerRef/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err30]}else{vErrors.push(err30)}errors++}}if(data.targetScope!==void 0){let data5=data.targetScope;if(typeof data5==="string"){if(func1(data5)>256){const err31={instancePath:instancePath+"/targetScope",schemaPath:"#/properties/targetScope/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err31]}else{vErrors.push(err31)}errors++}if(func1(data5)<1){const err32={instancePath:instancePath+"/targetScope",schemaPath:"#/properties/targetScope/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err32]}else{vErrors.push(err32)}errors++}if(!pattern4.test(data5)){const err33={instancePath:instancePath+"/targetScope",schemaPath:"#/properties/targetScope/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err33]}else{vErrors.push(err33)}errors++}}else{const err34={instancePath:instancePath+"/targetScope",schemaPath:"#/properties/targetScope/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err34]}else{vErrors.push(err34)}errors++}}if(data.disposition!==void 0){let data6=data.disposition;if(typeof data6!=="string"){const err35={instancePath:instancePath+"/disposition",schemaPath:"#/properties/disposition/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err35]}else{vErrors.push(err35)}errors++}if(!(data6==="RECEIVED"||data6==="APPLIED"||data6==="REJECTED"||data6==="HOLD"||data6==="UNKNOWN")){const err36={instancePath:instancePath+"/disposition",schemaPath:"#/properties/disposition/enum",keyword:"enum",params:{allowedValues:schema45.properties.disposition.enum},message:"must be equal to one of the allowed values"};if(vErrors===null){vErrors=[err36]}else{vErrors.push(err36)}errors++}}if(data.recordedAt!==void 0){let data7=data.recordedAt;if(typeof data7==="string"){if(func1(data7)>64){const err37={instancePath:instancePath+"/recordedAt",schemaPath:"#/properties/recordedAt/maxLength",keyword:"maxLength",params:{limit:64},message:"must NOT have more than 64 characters"};if(vErrors===null){vErrors=[err37]}else{vErrors.push(err37)}errors++}if(!formats2.validate(data7)){const err38={instancePath:instancePath+"/recordedAt",schemaPath:"#/properties/recordedAt/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};if(vErrors===null){vErrors=[err38]}else{vErrors.push(err38)}errors++}}else{const err39={instancePath:instancePath+"/recordedAt",schemaPath:"#/properties/recordedAt/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err39]}else{vErrors.push(err39)}errors++}}if(data.revision!==void 0){let data8=data.revision;if(!(typeof data8=="number"&&!(data8%1)&&!isNaN(data8)&&isFinite(data8))){const err40={instancePath:instancePath+"/revision",schemaPath:"#/properties/revision/type",keyword:"type",params:{type:"integer"},message:"must be integer"};if(vErrors===null){vErrors=[err40]}else{vErrors.push(err40)}errors++}if(typeof data8=="number"&&isFinite(data8)){if(data8>9007199254740991||isNaN(data8)){const err41={instancePath:instancePath+"/revision",schemaPath:"#/properties/revision/maximum",keyword:"maximum",params:{comparison:"<=",limit:9007199254740991},message:"must be <= 9007199254740991"};if(vErrors===null){vErrors=[err41]}else{vErrors.push(err41)}errors++}if(data8<1||isNaN(data8)){const err42={instancePath:instancePath+"/revision",schemaPath:"#/properties/revision/minimum",keyword:"minimum",params:{comparison:">=",limit:1},message:"must be >= 1"};if(vErrors===null){vErrors=[err42]}else{vErrors.push(err42)}errors++}}}if(data.reasonCode!==void 0){let data9=data.reasonCode;if(typeof data9==="string"){if(func1(data9)>128){const err43={instancePath:instancePath+"/reasonCode",schemaPath:"#/properties/reasonCode/maxLength",keyword:"maxLength",params:{limit:128},message:"must NOT have more than 128 characters"};if(vErrors===null){vErrors=[err43]}else{vErrors.push(err43)}errors++}if(func1(data9)<1){const err44={instancePath:instancePath+"/reasonCode",schemaPath:"#/properties/reasonCode/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err44]}else{vErrors.push(err44)}errors++}if(!pattern98.test(data9)){const err45={instancePath:instancePath+"/reasonCode",schemaPath:"#/properties/reasonCode/pattern",keyword:"pattern",params:{pattern:"^[A-Z][A-Z0-9_]*$"},message:'must match pattern "^[A-Z][A-Z0-9_]*$"'};if(vErrors===null){vErrors=[err45]}else{vErrors.push(err45)}errors++}}else{const err46={instancePath:instancePath+"/reasonCode",schemaPath:"#/properties/reasonCode/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err46]}else{vErrors.push(err46)}errors++}}if(data.resultRef!==void 0){let data10=data.resultRef;if(data10&&typeof data10=="object"&&!Array.isArray(data10)){if(data10.sourceSystem===void 0){const err47={instancePath:instancePath+"/resultRef",schemaPath:"result-ref.schema.json/required",keyword:"required",params:{missingProperty:"sourceSystem"},message:"must have required property 'sourceSystem'"};if(vErrors===null){vErrors=[err47]}else{vErrors.push(err47)}errors++}if(data10.resourceType===void 0){const err48={instancePath:instancePath+"/resultRef",schemaPath:"result-ref.schema.json/required",keyword:"required",params:{missingProperty:"resourceType"},message:"must have required property 'resourceType'"};if(vErrors===null){vErrors=[err48]}else{vErrors.push(err48)}errors++}if(data10.resourceId===void 0){const err49={instancePath:instancePath+"/resultRef",schemaPath:"result-ref.schema.json/required",keyword:"required",params:{missingProperty:"resourceId"},message:"must have required property 'resourceId'"};if(vErrors===null){vErrors=[err49]}else{vErrors.push(err49)}errors++}if(data10.revision===void 0){const err50={instancePath:instancePath+"/resultRef",schemaPath:"result-ref.schema.json/required",keyword:"required",params:{missingProperty:"revision"},message:"must have required property 'revision'"};if(vErrors===null){vErrors=[err50]}else{vErrors.push(err50)}errors++}if(data10.digest===void 0){const err51={instancePath:instancePath+"/resultRef",schemaPath:"result-ref.schema.json/required",keyword:"required",params:{missingProperty:"digest"},message:"must have required property 'digest'"};if(vErrors===null){vErrors=[err51]}else{vErrors.push(err51)}errors++}for(const key1 in data10){if(!(key1==="sourceSystem"||key1==="resourceType"||key1==="resourceId"||key1==="revision"||key1==="digest"||key1==="evidenceRef")){const err52={instancePath:instancePath+"/resultRef",schemaPath:"result-ref.schema.json/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key1},message:"must NOT have additional properties"};if(vErrors===null){vErrors=[err52]}else{vErrors.push(err52)}errors++}}if(data10.sourceSystem!==void 0){let data11=data10.sourceSystem;if(typeof data11==="string"){if(func1(data11)>256){const err53={instancePath:instancePath+"/resultRef/sourceSystem",schemaPath:"result-ref.schema.json/properties/sourceSystem/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err53]}else{vErrors.push(err53)}errors++}if(func1(data11)<1){const err54={instancePath:instancePath+"/resultRef/sourceSystem",schemaPath:"result-ref.schema.json/properties/sourceSystem/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err54]}else{vErrors.push(err54)}errors++}if(!pattern4.test(data11)){const err55={instancePath:instancePath+"/resultRef/sourceSystem",schemaPath:"result-ref.schema.json/properties/sourceSystem/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err55]}else{vErrors.push(err55)}errors++}}else{const err56={instancePath:instancePath+"/resultRef/sourceSystem",schemaPath:"result-ref.schema.json/properties/sourceSystem/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err56]}else{vErrors.push(err56)}errors++}}if(data10.resourceType!==void 0){let data12=data10.resourceType;if(typeof data12==="string"){if(func1(data12)>256){const err57={instancePath:instancePath+"/resultRef/resourceType",schemaPath:"result-ref.schema.json/properties/resourceType/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err57]}else{vErrors.push(err57)}errors++}if(func1(data12)<1){const err58={instancePath:instancePath+"/resultRef/resourceType",schemaPath:"result-ref.schema.json/properties/resourceType/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err58]}else{vErrors.push(err58)}errors++}if(!pattern4.test(data12)){const err59={instancePath:instancePath+"/resultRef/resourceType",schemaPath:"result-ref.schema.json/properties/resourceType/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err59]}else{vErrors.push(err59)}errors++}}else{const err60={instancePath:instancePath+"/resultRef/resourceType",schemaPath:"result-ref.schema.json/properties/resourceType/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err60]}else{vErrors.push(err60)}errors++}}if(data10.resourceId!==void 0){let data13=data10.resourceId;if(typeof data13==="string"){if(func1(data13)>256){const err61={instancePath:instancePath+"/resultRef/resourceId",schemaPath:"result-ref.schema.json/properties/resourceId/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err61]}else{vErrors.push(err61)}errors++}if(func1(data13)<1){const err62={instancePath:instancePath+"/resultRef/resourceId",schemaPath:"result-ref.schema.json/properties/resourceId/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err62]}else{vErrors.push(err62)}errors++}if(!pattern4.test(data13)){const err63={instancePath:instancePath+"/resultRef/resourceId",schemaPath:"result-ref.schema.json/properties/resourceId/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err63]}else{vErrors.push(err63)}errors++}}else{const err64={instancePath:instancePath+"/resultRef/resourceId",schemaPath:"result-ref.schema.json/properties/resourceId/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err64]}else{vErrors.push(err64)}errors++}}if(data10.revision!==void 0){let data14=data10.revision;if(typeof data14==="string"){if(func1(data14)>256){const err65={instancePath:instancePath+"/resultRef/revision",schemaPath:"result-ref.schema.json/properties/revision/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err65]}else{vErrors.push(err65)}errors++}if(func1(data14)<1){const err66={instancePath:instancePath+"/resultRef/revision",schemaPath:"result-ref.schema.json/properties/revision/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err66]}else{vErrors.push(err66)}errors++}if(!pattern4.test(data14)){const err67={instancePath:instancePath+"/resultRef/revision",schemaPath:"result-ref.schema.json/properties/revision/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err67]}else{vErrors.push(err67)}errors++}}else{const err68={instancePath:instancePath+"/resultRef/revision",schemaPath:"result-ref.schema.json/properties/revision/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err68]}else{vErrors.push(err68)}errors++}}if(data10.digest!==void 0){let data15=data10.digest;if(typeof data15==="string"){if(!pattern8.test(data15)){const err69={instancePath:instancePath+"/resultRef/digest",schemaPath:"result-ref.schema.json/properties/digest/pattern",keyword:"pattern",params:{pattern:"^sha256:[a-f0-9]{64}$"},message:'must match pattern "^sha256:[a-f0-9]{64}$"'};if(vErrors===null){vErrors=[err69]}else{vErrors.push(err69)}errors++}}else{const err70={instancePath:instancePath+"/resultRef/digest",schemaPath:"result-ref.schema.json/properties/digest/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err70]}else{vErrors.push(err70)}errors++}}if(data10.evidenceRef!==void 0){let data16=data10.evidenceRef;if(typeof data16==="string"){if(func1(data16)>256){const err71={instancePath:instancePath+"/resultRef/evidenceRef",schemaPath:"result-ref.schema.json/properties/evidenceRef/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err71]}else{vErrors.push(err71)}errors++}if(func1(data16)<1){const err72={instancePath:instancePath+"/resultRef/evidenceRef",schemaPath:"result-ref.schema.json/properties/evidenceRef/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err72]}else{vErrors.push(err72)}errors++}if(!pattern4.test(data16)){const err73={instancePath:instancePath+"/resultRef/evidenceRef",schemaPath:"result-ref.schema.json/properties/evidenceRef/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err73]}else{vErrors.push(err73)}errors++}}else{const err74={instancePath:instancePath+"/resultRef/evidenceRef",schemaPath:"result-ref.schema.json/properties/evidenceRef/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err74]}else{vErrors.push(err74)}errors++}}}else{const err75={instancePath:instancePath+"/resultRef",schemaPath:"result-ref.schema.json/type",keyword:"type",params:{type:"object"},message:"must be object"};if(vErrors===null){vErrors=[err75]}else{vErrors.push(err75)}errors++}}}else{const err76={instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};if(vErrors===null){vErrors=[err76]}else{vErrors.push(err76)}errors++}validate36.errors=vErrors;return errors===0}validate36.evaluated={props:true,dynamicProps:false,dynamicItems:false};var tenantContext=validate37;function validate37(data,{instancePath="",parentData,parentDataProperty,rootData=data,dynamicAnchors={}}={}){let vErrors=null;let errors=0;const evaluated0=validate37.evaluated;if(evaluated0.dynamicProps){evaluated0.props=void 0}if(evaluated0.dynamicItems){evaluated0.items=void 0}if(data&&typeof data=="object"&&!Array.isArray(data)){if(data.serviceRef===void 0){const err0={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"serviceRef"},message:"must have required property 'serviceRef'"};if(vErrors===null){vErrors=[err0]}else{vErrors.push(err0)}errors++}if(data.tenantRef===void 0){const err1={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"tenantRef"},message:"must have required property 'tenantRef'"};if(vErrors===null){vErrors=[err1]}else{vErrors.push(err1)}errors++}for(const key0 in data){if(!(key0==="serviceRef"||key0==="tenantRef")){const err2={instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key0},message:"must NOT have additional properties"};if(vErrors===null){vErrors=[err2]}else{vErrors.push(err2)}errors++}}if(data.serviceRef!==void 0){let data0=data.serviceRef;if(typeof data0==="string"){if(func1(data0)>256){const err3={instancePath:instancePath+"/serviceRef",schemaPath:"#/properties/serviceRef/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err3]}else{vErrors.push(err3)}errors++}if(func1(data0)<1){const err4={instancePath:instancePath+"/serviceRef",schemaPath:"#/properties/serviceRef/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err4]}else{vErrors.push(err4)}errors++}if(!pattern4.test(data0)){const err5={instancePath:instancePath+"/serviceRef",schemaPath:"#/properties/serviceRef/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err5]}else{vErrors.push(err5)}errors++}}else{const err6={instancePath:instancePath+"/serviceRef",schemaPath:"#/properties/serviceRef/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err6]}else{vErrors.push(err6)}errors++}}if(data.tenantRef!==void 0){let data1=data.tenantRef;if(typeof data1==="string"){if(func1(data1)>256){const err7={instancePath:instancePath+"/tenantRef",schemaPath:"#/properties/tenantRef/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err7]}else{vErrors.push(err7)}errors++}if(func1(data1)<1){const err8={instancePath:instancePath+"/tenantRef",schemaPath:"#/properties/tenantRef/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err8]}else{vErrors.push(err8)}errors++}if(!pattern4.test(data1)){const err9={instancePath:instancePath+"/tenantRef",schemaPath:"#/properties/tenantRef/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err9]}else{vErrors.push(err9)}errors++}}else{const err10={instancePath:instancePath+"/tenantRef",schemaPath:"#/properties/tenantRef/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err10]}else{vErrors.push(err10)}errors++}}}else{const err11={instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};if(vErrors===null){vErrors=[err11]}else{vErrors.push(err11)}errors++}validate37.errors=vErrors;return errors===0}validate37.evaluated={props:true,dynamicProps:false,dynamicItems:false};var tenantConnection=validate38;var schema48={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://eventsdk.dev/schemas/v1/tenant-connection.schema.json",title:"TenantConnection",type:"object",additionalProperties:false,properties:{connectionRef:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u001f\\u007f]+$"},version:{type:"integer",minimum:1,maximum:9007199254740991},local:{$ref:"tenant-context.schema.json"},remote:{$ref:"tenant-context.schema.json"},status:{type:"string",enum:["ACTIVE","SUSPENDED","REVOKED"]},updatedAt:{type:"string",format:"date-time",maxLength:64},organizationRef:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u001f\\u007f]+$"}},required:["connectionRef","version","local","remote","status","updatedAt"]};function validate38(data,{instancePath="",parentData,parentDataProperty,rootData=data,dynamicAnchors={}}={}){let vErrors=null;let errors=0;const evaluated0=validate38.evaluated;if(evaluated0.dynamicProps){evaluated0.props=void 0}if(evaluated0.dynamicItems){evaluated0.items=void 0}if(data&&typeof data=="object"&&!Array.isArray(data)){if(data.connectionRef===void 0){const err0={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"connectionRef"},message:"must have required property 'connectionRef'"};if(vErrors===null){vErrors=[err0]}else{vErrors.push(err0)}errors++}if(data.version===void 0){const err1={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"version"},message:"must have required property 'version'"};if(vErrors===null){vErrors=[err1]}else{vErrors.push(err1)}errors++}if(data.local===void 0){const err2={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"local"},message:"must have required property 'local'"};if(vErrors===null){vErrors=[err2]}else{vErrors.push(err2)}errors++}if(data.remote===void 0){const err3={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"remote"},message:"must have required property 'remote'"};if(vErrors===null){vErrors=[err3]}else{vErrors.push(err3)}errors++}if(data.status===void 0){const err4={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"status"},message:"must have required property 'status'"};if(vErrors===null){vErrors=[err4]}else{vErrors.push(err4)}errors++}if(data.updatedAt===void 0){const err5={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"updatedAt"},message:"must have required property 'updatedAt'"};if(vErrors===null){vErrors=[err5]}else{vErrors.push(err5)}errors++}for(const key0 in data){if(!(key0==="connectionRef"||key0==="version"||key0==="local"||key0==="remote"||key0==="status"||key0==="updatedAt"||key0==="organizationRef")){const err6={instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key0},message:"must NOT have additional properties"};if(vErrors===null){vErrors=[err6]}else{vErrors.push(err6)}errors++}}if(data.connectionRef!==void 0){let data0=data.connectionRef;if(typeof data0==="string"){if(func1(data0)>256){const err7={instancePath:instancePath+"/connectionRef",schemaPath:"#/properties/connectionRef/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err7]}else{vErrors.push(err7)}errors++}if(func1(data0)<1){const err8={instancePath:instancePath+"/connectionRef",schemaPath:"#/properties/connectionRef/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err8]}else{vErrors.push(err8)}errors++}if(!pattern4.test(data0)){const err9={instancePath:instancePath+"/connectionRef",schemaPath:"#/properties/connectionRef/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err9]}else{vErrors.push(err9)}errors++}}else{const err10={instancePath:instancePath+"/connectionRef",schemaPath:"#/properties/connectionRef/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err10]}else{vErrors.push(err10)}errors++}}if(data.version!==void 0){let data1=data.version;if(!(typeof data1=="number"&&!(data1%1)&&!isNaN(data1)&&isFinite(data1))){const err11={instancePath:instancePath+"/version",schemaPath:"#/properties/version/type",keyword:"type",params:{type:"integer"},message:"must be integer"};if(vErrors===null){vErrors=[err11]}else{vErrors.push(err11)}errors++}if(typeof data1=="number"&&isFinite(data1)){if(data1>9007199254740991||isNaN(data1)){const err12={instancePath:instancePath+"/version",schemaPath:"#/properties/version/maximum",keyword:"maximum",params:{comparison:"<=",limit:9007199254740991},message:"must be <= 9007199254740991"};if(vErrors===null){vErrors=[err12]}else{vErrors.push(err12)}errors++}if(data1<1||isNaN(data1)){const err13={instancePath:instancePath+"/version",schemaPath:"#/properties/version/minimum",keyword:"minimum",params:{comparison:">=",limit:1},message:"must be >= 1"};if(vErrors===null){vErrors=[err13]}else{vErrors.push(err13)}errors++}}}if(data.local!==void 0){let data2=data.local;if(data2&&typeof data2=="object"&&!Array.isArray(data2)){if(data2.serviceRef===void 0){const err14={instancePath:instancePath+"/local",schemaPath:"tenant-context.schema.json/required",keyword:"required",params:{missingProperty:"serviceRef"},message:"must have required property 'serviceRef'"};if(vErrors===null){vErrors=[err14]}else{vErrors.push(err14)}errors++}if(data2.tenantRef===void 0){const err15={instancePath:instancePath+"/local",schemaPath:"tenant-context.schema.json/required",keyword:"required",params:{missingProperty:"tenantRef"},message:"must have required property 'tenantRef'"};if(vErrors===null){vErrors=[err15]}else{vErrors.push(err15)}errors++}for(const key1 in data2){if(!(key1==="serviceRef"||key1==="tenantRef")){const err16={instancePath:instancePath+"/local",schemaPath:"tenant-context.schema.json/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key1},message:"must NOT have additional properties"};if(vErrors===null){vErrors=[err16]}else{vErrors.push(err16)}errors++}}if(data2.serviceRef!==void 0){let data3=data2.serviceRef;if(typeof data3==="string"){if(func1(data3)>256){const err17={instancePath:instancePath+"/local/serviceRef",schemaPath:"tenant-context.schema.json/properties/serviceRef/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err17]}else{vErrors.push(err17)}errors++}if(func1(data3)<1){const err18={instancePath:instancePath+"/local/serviceRef",schemaPath:"tenant-context.schema.json/properties/serviceRef/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err18]}else{vErrors.push(err18)}errors++}if(!pattern4.test(data3)){const err19={instancePath:instancePath+"/local/serviceRef",schemaPath:"tenant-context.schema.json/properties/serviceRef/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err19]}else{vErrors.push(err19)}errors++}}else{const err20={instancePath:instancePath+"/local/serviceRef",schemaPath:"tenant-context.schema.json/properties/serviceRef/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err20]}else{vErrors.push(err20)}errors++}}if(data2.tenantRef!==void 0){let data4=data2.tenantRef;if(typeof data4==="string"){if(func1(data4)>256){const err21={instancePath:instancePath+"/local/tenantRef",schemaPath:"tenant-context.schema.json/properties/tenantRef/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err21]}else{vErrors.push(err21)}errors++}if(func1(data4)<1){const err22={instancePath:instancePath+"/local/tenantRef",schemaPath:"tenant-context.schema.json/properties/tenantRef/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err22]}else{vErrors.push(err22)}errors++}if(!pattern4.test(data4)){const err23={instancePath:instancePath+"/local/tenantRef",schemaPath:"tenant-context.schema.json/properties/tenantRef/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err23]}else{vErrors.push(err23)}errors++}}else{const err24={instancePath:instancePath+"/local/tenantRef",schemaPath:"tenant-context.schema.json/properties/tenantRef/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err24]}else{vErrors.push(err24)}errors++}}}else{const err25={instancePath:instancePath+"/local",schemaPath:"tenant-context.schema.json/type",keyword:"type",params:{type:"object"},message:"must be object"};if(vErrors===null){vErrors=[err25]}else{vErrors.push(err25)}errors++}}if(data.remote!==void 0){let data5=data.remote;if(data5&&typeof data5=="object"&&!Array.isArray(data5)){if(data5.serviceRef===void 0){const err26={instancePath:instancePath+"/remote",schemaPath:"tenant-context.schema.json/required",keyword:"required",params:{missingProperty:"serviceRef"},message:"must have required property 'serviceRef'"};if(vErrors===null){vErrors=[err26]}else{vErrors.push(err26)}errors++}if(data5.tenantRef===void 0){const err27={instancePath:instancePath+"/remote",schemaPath:"tenant-context.schema.json/required",keyword:"required",params:{missingProperty:"tenantRef"},message:"must have required property 'tenantRef'"};if(vErrors===null){vErrors=[err27]}else{vErrors.push(err27)}errors++}for(const key2 in data5){if(!(key2==="serviceRef"||key2==="tenantRef")){const err28={instancePath:instancePath+"/remote",schemaPath:"tenant-context.schema.json/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key2},message:"must NOT have additional properties"};if(vErrors===null){vErrors=[err28]}else{vErrors.push(err28)}errors++}}if(data5.serviceRef!==void 0){let data6=data5.serviceRef;if(typeof data6==="string"){if(func1(data6)>256){const err29={instancePath:instancePath+"/remote/serviceRef",schemaPath:"tenant-context.schema.json/properties/serviceRef/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err29]}else{vErrors.push(err29)}errors++}if(func1(data6)<1){const err30={instancePath:instancePath+"/remote/serviceRef",schemaPath:"tenant-context.schema.json/properties/serviceRef/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err30]}else{vErrors.push(err30)}errors++}if(!pattern4.test(data6)){const err31={instancePath:instancePath+"/remote/serviceRef",schemaPath:"tenant-context.schema.json/properties/serviceRef/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err31]}else{vErrors.push(err31)}errors++}}else{const err32={instancePath:instancePath+"/remote/serviceRef",schemaPath:"tenant-context.schema.json/properties/serviceRef/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err32]}else{vErrors.push(err32)}errors++}}if(data5.tenantRef!==void 0){let data7=data5.tenantRef;if(typeof data7==="string"){if(func1(data7)>256){const err33={instancePath:instancePath+"/remote/tenantRef",schemaPath:"tenant-context.schema.json/properties/tenantRef/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err33]}else{vErrors.push(err33)}errors++}if(func1(data7)<1){const err34={instancePath:instancePath+"/remote/tenantRef",schemaPath:"tenant-context.schema.json/properties/tenantRef/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err34]}else{vErrors.push(err34)}errors++}if(!pattern4.test(data7)){const err35={instancePath:instancePath+"/remote/tenantRef",schemaPath:"tenant-context.schema.json/properties/tenantRef/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err35]}else{vErrors.push(err35)}errors++}}else{const err36={instancePath:instancePath+"/remote/tenantRef",schemaPath:"tenant-context.schema.json/properties/tenantRef/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err36]}else{vErrors.push(err36)}errors++}}}else{const err37={instancePath:instancePath+"/remote",schemaPath:"tenant-context.schema.json/type",keyword:"type",params:{type:"object"},message:"must be object"};if(vErrors===null){vErrors=[err37]}else{vErrors.push(err37)}errors++}}if(data.status!==void 0){let data8=data.status;if(typeof data8!=="string"){const err38={instancePath:instancePath+"/status",schemaPath:"#/properties/status/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err38]}else{vErrors.push(err38)}errors++}if(!(data8==="ACTIVE"||data8==="SUSPENDED"||data8==="REVOKED")){const err39={instancePath:instancePath+"/status",schemaPath:"#/properties/status/enum",keyword:"enum",params:{allowedValues:schema48.properties.status.enum},message:"must be equal to one of the allowed values"};if(vErrors===null){vErrors=[err39]}else{vErrors.push(err39)}errors++}}if(data.updatedAt!==void 0){let data9=data.updatedAt;if(typeof data9==="string"){if(func1(data9)>64){const err40={instancePath:instancePath+"/updatedAt",schemaPath:"#/properties/updatedAt/maxLength",keyword:"maxLength",params:{limit:64},message:"must NOT have more than 64 characters"};if(vErrors===null){vErrors=[err40]}else{vErrors.push(err40)}errors++}if(!formats2.validate(data9)){const err41={instancePath:instancePath+"/updatedAt",schemaPath:"#/properties/updatedAt/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};if(vErrors===null){vErrors=[err41]}else{vErrors.push(err41)}errors++}}else{const err42={instancePath:instancePath+"/updatedAt",schemaPath:"#/properties/updatedAt/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err42]}else{vErrors.push(err42)}errors++}}if(data.organizationRef!==void 0){let data10=data.organizationRef;if(typeof data10==="string"){if(func1(data10)>256){const err43={instancePath:instancePath+"/organizationRef",schemaPath:"#/properties/organizationRef/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err43]}else{vErrors.push(err43)}errors++}if(func1(data10)<1){const err44={instancePath:instancePath+"/organizationRef",schemaPath:"#/properties/organizationRef/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err44]}else{vErrors.push(err44)}errors++}if(!pattern4.test(data10)){const err45={instancePath:instancePath+"/organizationRef",schemaPath:"#/properties/organizationRef/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err45]}else{vErrors.push(err45)}errors++}}else{const err46={instancePath:instancePath+"/organizationRef",schemaPath:"#/properties/organizationRef/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err46]}else{vErrors.push(err46)}errors++}}}else{const err47={instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};if(vErrors===null){vErrors=[err47]}else{vErrors.push(err47)}errors++}validate38.errors=vErrors;return errors===0}validate38.evaluated={props:true,dynamicProps:false,dynamicItems:false};var exchangeGrant=validate39;var schema51={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://eventsdk.dev/schemas/v1/exchange-grant.schema.json",title:"ExchangeGrant",type:"object",additionalProperties:false,properties:{grantRef:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u001f\\u007f]+$"},version:{type:"integer",minimum:1,maximum:9007199254740991},connectionRef:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u001f\\u007f]+$"},direction:{type:"string",enum:["OUTBOUND","INBOUND"]},status:{type:"string",enum:["ACTIVE","SUSPENDED","REVOKED"]},eventTypes:{type:"array",items:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u001f\\u007f]+$"},minItems:1,maxItems:256,uniqueItems:true},audience:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u001f\\u007f]+$"},notBefore:{type:"string",format:"date-time",maxLength:64},expiresAt:{type:"string",format:"date-time",maxLength:64}},required:["grantRef","version","connectionRef","direction","status","eventTypes","audience","notBefore","expiresAt"]};function validate39(data,{instancePath="",parentData,parentDataProperty,rootData=data,dynamicAnchors={}}={}){let vErrors=null;let errors=0;const evaluated0=validate39.evaluated;if(evaluated0.dynamicProps){evaluated0.props=void 0}if(evaluated0.dynamicItems){evaluated0.items=void 0}if(data&&typeof data=="object"&&!Array.isArray(data)){if(data.grantRef===void 0){const err0={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"grantRef"},message:"must have required property 'grantRef'"};if(vErrors===null){vErrors=[err0]}else{vErrors.push(err0)}errors++}if(data.version===void 0){const err1={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"version"},message:"must have required property 'version'"};if(vErrors===null){vErrors=[err1]}else{vErrors.push(err1)}errors++}if(data.connectionRef===void 0){const err2={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"connectionRef"},message:"must have required property 'connectionRef'"};if(vErrors===null){vErrors=[err2]}else{vErrors.push(err2)}errors++}if(data.direction===void 0){const err3={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"direction"},message:"must have required property 'direction'"};if(vErrors===null){vErrors=[err3]}else{vErrors.push(err3)}errors++}if(data.status===void 0){const err4={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"status"},message:"must have required property 'status'"};if(vErrors===null){vErrors=[err4]}else{vErrors.push(err4)}errors++}if(data.eventTypes===void 0){const err5={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"eventTypes"},message:"must have required property 'eventTypes'"};if(vErrors===null){vErrors=[err5]}else{vErrors.push(err5)}errors++}if(data.audience===void 0){const err6={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"audience"},message:"must have required property 'audience'"};if(vErrors===null){vErrors=[err6]}else{vErrors.push(err6)}errors++}if(data.notBefore===void 0){const err7={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"notBefore"},message:"must have required property 'notBefore'"};if(vErrors===null){vErrors=[err7]}else{vErrors.push(err7)}errors++}if(data.expiresAt===void 0){const err8={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"expiresAt"},message:"must have required property 'expiresAt'"};if(vErrors===null){vErrors=[err8]}else{vErrors.push(err8)}errors++}for(const key0 in data){if(!func11.call(schema51.properties,key0)){const err9={instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key0},message:"must NOT have additional properties"};if(vErrors===null){vErrors=[err9]}else{vErrors.push(err9)}errors++}}if(data.grantRef!==void 0){let data0=data.grantRef;if(typeof data0==="string"){if(func1(data0)>256){const err10={instancePath:instancePath+"/grantRef",schemaPath:"#/properties/grantRef/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err10]}else{vErrors.push(err10)}errors++}if(func1(data0)<1){const err11={instancePath:instancePath+"/grantRef",schemaPath:"#/properties/grantRef/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err11]}else{vErrors.push(err11)}errors++}if(!pattern4.test(data0)){const err12={instancePath:instancePath+"/grantRef",schemaPath:"#/properties/grantRef/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err12]}else{vErrors.push(err12)}errors++}}else{const err13={instancePath:instancePath+"/grantRef",schemaPath:"#/properties/grantRef/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err13]}else{vErrors.push(err13)}errors++}}if(data.version!==void 0){let data1=data.version;if(!(typeof data1=="number"&&!(data1%1)&&!isNaN(data1)&&isFinite(data1))){const err14={instancePath:instancePath+"/version",schemaPath:"#/properties/version/type",keyword:"type",params:{type:"integer"},message:"must be integer"};if(vErrors===null){vErrors=[err14]}else{vErrors.push(err14)}errors++}if(typeof data1=="number"&&isFinite(data1)){if(data1>9007199254740991||isNaN(data1)){const err15={instancePath:instancePath+"/version",schemaPath:"#/properties/version/maximum",keyword:"maximum",params:{comparison:"<=",limit:9007199254740991},message:"must be <= 9007199254740991"};if(vErrors===null){vErrors=[err15]}else{vErrors.push(err15)}errors++}if(data1<1||isNaN(data1)){const err16={instancePath:instancePath+"/version",schemaPath:"#/properties/version/minimum",keyword:"minimum",params:{comparison:">=",limit:1},message:"must be >= 1"};if(vErrors===null){vErrors=[err16]}else{vErrors.push(err16)}errors++}}}if(data.connectionRef!==void 0){let data2=data.connectionRef;if(typeof data2==="string"){if(func1(data2)>256){const err17={instancePath:instancePath+"/connectionRef",schemaPath:"#/properties/connectionRef/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err17]}else{vErrors.push(err17)}errors++}if(func1(data2)<1){const err18={instancePath:instancePath+"/connectionRef",schemaPath:"#/properties/connectionRef/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err18]}else{vErrors.push(err18)}errors++}if(!pattern4.test(data2)){const err19={instancePath:instancePath+"/connectionRef",schemaPath:"#/properties/connectionRef/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err19]}else{vErrors.push(err19)}errors++}}else{const err20={instancePath:instancePath+"/connectionRef",schemaPath:"#/properties/connectionRef/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err20]}else{vErrors.push(err20)}errors++}}if(data.direction!==void 0){let data3=data.direction;if(typeof data3!=="string"){const err21={instancePath:instancePath+"/direction",schemaPath:"#/properties/direction/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err21]}else{vErrors.push(err21)}errors++}if(!(data3==="OUTBOUND"||data3==="INBOUND")){const err22={instancePath:instancePath+"/direction",schemaPath:"#/properties/direction/enum",keyword:"enum",params:{allowedValues:schema51.properties.direction.enum},message:"must be equal to one of the allowed values"};if(vErrors===null){vErrors=[err22]}else{vErrors.push(err22)}errors++}}if(data.status!==void 0){let data4=data.status;if(typeof data4!=="string"){const err23={instancePath:instancePath+"/status",schemaPath:"#/properties/status/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err23]}else{vErrors.push(err23)}errors++}if(!(data4==="ACTIVE"||data4==="SUSPENDED"||data4==="REVOKED")){const err24={instancePath:instancePath+"/status",schemaPath:"#/properties/status/enum",keyword:"enum",params:{allowedValues:schema51.properties.status.enum},message:"must be equal to one of the allowed values"};if(vErrors===null){vErrors=[err24]}else{vErrors.push(err24)}errors++}}if(data.eventTypes!==void 0){let data5=data.eventTypes;if(Array.isArray(data5)){if(data5.length>256){const err25={instancePath:instancePath+"/eventTypes",schemaPath:"#/properties/eventTypes/maxItems",keyword:"maxItems",params:{limit:256},message:"must NOT have more than 256 items"};if(vErrors===null){vErrors=[err25]}else{vErrors.push(err25)}errors++}if(data5.length<1){const err26={instancePath:instancePath+"/eventTypes",schemaPath:"#/properties/eventTypes/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};if(vErrors===null){vErrors=[err26]}else{vErrors.push(err26)}errors++}const len0=data5.length;for(let i0=0;i0<len0;i0++){let data6=data5[i0];if(typeof data6==="string"){if(func1(data6)>256){const err27={instancePath:instancePath+"/eventTypes/"+i0,schemaPath:"#/properties/eventTypes/items/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err27]}else{vErrors.push(err27)}errors++}if(func1(data6)<1){const err28={instancePath:instancePath+"/eventTypes/"+i0,schemaPath:"#/properties/eventTypes/items/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err28]}else{vErrors.push(err28)}errors++}if(!pattern4.test(data6)){const err29={instancePath:instancePath+"/eventTypes/"+i0,schemaPath:"#/properties/eventTypes/items/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err29]}else{vErrors.push(err29)}errors++}}else{const err30={instancePath:instancePath+"/eventTypes/"+i0,schemaPath:"#/properties/eventTypes/items/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err30]}else{vErrors.push(err30)}errors++}}let i1=data5.length;let j0;if(i1>1){const indices0={};for(;i1--;){let item0=data5[i1];if(typeof item0!=="string"){continue}if(typeof indices0[item0]=="number"){j0=indices0[item0];const err31={instancePath:instancePath+"/eventTypes",schemaPath:"#/properties/eventTypes/uniqueItems",keyword:"uniqueItems",params:{i:i1,j:j0},message:"must NOT have duplicate items (items ## "+j0+" and "+i1+" are identical)"};if(vErrors===null){vErrors=[err31]}else{vErrors.push(err31)}errors++;break}indices0[item0]=i1}}}else{const err32={instancePath:instancePath+"/eventTypes",schemaPath:"#/properties/eventTypes/type",keyword:"type",params:{type:"array"},message:"must be array"};if(vErrors===null){vErrors=[err32]}else{vErrors.push(err32)}errors++}}if(data.audience!==void 0){let data7=data.audience;if(typeof data7==="string"){if(func1(data7)>256){const err33={instancePath:instancePath+"/audience",schemaPath:"#/properties/audience/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err33]}else{vErrors.push(err33)}errors++}if(func1(data7)<1){const err34={instancePath:instancePath+"/audience",schemaPath:"#/properties/audience/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err34]}else{vErrors.push(err34)}errors++}if(!pattern4.test(data7)){const err35={instancePath:instancePath+"/audience",schemaPath:"#/properties/audience/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err35]}else{vErrors.push(err35)}errors++}}else{const err36={instancePath:instancePath+"/audience",schemaPath:"#/properties/audience/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err36]}else{vErrors.push(err36)}errors++}}if(data.notBefore!==void 0){let data8=data.notBefore;if(typeof data8==="string"){if(func1(data8)>64){const err37={instancePath:instancePath+"/notBefore",schemaPath:"#/properties/notBefore/maxLength",keyword:"maxLength",params:{limit:64},message:"must NOT have more than 64 characters"};if(vErrors===null){vErrors=[err37]}else{vErrors.push(err37)}errors++}if(!formats2.validate(data8)){const err38={instancePath:instancePath+"/notBefore",schemaPath:"#/properties/notBefore/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};if(vErrors===null){vErrors=[err38]}else{vErrors.push(err38)}errors++}}else{const err39={instancePath:instancePath+"/notBefore",schemaPath:"#/properties/notBefore/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err39]}else{vErrors.push(err39)}errors++}}if(data.expiresAt!==void 0){let data9=data.expiresAt;if(typeof data9==="string"){if(func1(data9)>64){const err40={instancePath:instancePath+"/expiresAt",schemaPath:"#/properties/expiresAt/maxLength",keyword:"maxLength",params:{limit:64},message:"must NOT have more than 64 characters"};if(vErrors===null){vErrors=[err40]}else{vErrors.push(err40)}errors++}if(!formats2.validate(data9)){const err41={instancePath:instancePath+"/expiresAt",schemaPath:"#/properties/expiresAt/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};if(vErrors===null){vErrors=[err41]}else{vErrors.push(err41)}errors++}}else{const err42={instancePath:instancePath+"/expiresAt",schemaPath:"#/properties/expiresAt/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err42]}else{vErrors.push(err42)}errors++}}}else{const err43={instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};if(vErrors===null){vErrors=[err43]}else{vErrors.push(err43)}errors++}validate39.errors=vErrors;return errors===0}validate39.evaluated={props:true,dynamicProps:false,dynamicItems:false};var eventOriginClaims=validate40;var schema52={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://eventsdk.dev/schemas/v1/event-origin-claims.schema.json",title:"EventOriginClaims",type:"object",additionalProperties:false,required:["schemaVersion","purpose","issuer","subject","serviceRef","audience","source","eventId","eventDigest","signedAt"],properties:{schemaVersion:{const:1},purpose:{const:"eventsdk-origin/1"},issuer:{type:"string",format:"uri",minLength:1,maxLength:2048},subject:{type:"string",minLength:1,maxLength:256},serviceRef:{type:"string",minLength:1,maxLength:256},audience:{type:"string",minLength:1,maxLength:256},source:{type:"string",format:"uri",minLength:1,maxLength:2048},eventId:{type:"string",minLength:1,maxLength:256},deliveryId:{type:"string",pattern:"^[a-f0-9]{64}$"},eventDigest:{type:"string",pattern:"^sha256:[a-f0-9]{64}$"},signedAt:{type:"string",format:"date-time",maxLength:64}}};var pattern117=new RegExp("^[a-f0-9]{64}$","u");function validate40(data,{instancePath="",parentData,parentDataProperty,rootData=data,dynamicAnchors={}}={}){let vErrors=null;let errors=0;const evaluated0=validate40.evaluated;if(evaluated0.dynamicProps){evaluated0.props=void 0}if(evaluated0.dynamicItems){evaluated0.items=void 0}if(data&&typeof data=="object"&&!Array.isArray(data)){if(data.schemaVersion===void 0){const err0={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"schemaVersion"},message:"must have required property 'schemaVersion'"};if(vErrors===null){vErrors=[err0]}else{vErrors.push(err0)}errors++}if(data.purpose===void 0){const err1={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"purpose"},message:"must have required property 'purpose'"};if(vErrors===null){vErrors=[err1]}else{vErrors.push(err1)}errors++}if(data.issuer===void 0){const err2={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"issuer"},message:"must have required property 'issuer'"};if(vErrors===null){vErrors=[err2]}else{vErrors.push(err2)}errors++}if(data.subject===void 0){const err3={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"subject"},message:"must have required property 'subject'"};if(vErrors===null){vErrors=[err3]}else{vErrors.push(err3)}errors++}if(data.serviceRef===void 0){const err4={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"serviceRef"},message:"must have required property 'serviceRef'"};if(vErrors===null){vErrors=[err4]}else{vErrors.push(err4)}errors++}if(data.audience===void 0){const err5={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"audience"},message:"must have required property 'audience'"};if(vErrors===null){vErrors=[err5]}else{vErrors.push(err5)}errors++}if(data.source===void 0){const err6={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"source"},message:"must have required property 'source'"};if(vErrors===null){vErrors=[err6]}else{vErrors.push(err6)}errors++}if(data.eventId===void 0){const err7={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"eventId"},message:"must have required property 'eventId'"};if(vErrors===null){vErrors=[err7]}else{vErrors.push(err7)}errors++}if(data.eventDigest===void 0){const err8={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"eventDigest"},message:"must have required property 'eventDigest'"};if(vErrors===null){vErrors=[err8]}else{vErrors.push(err8)}errors++}if(data.signedAt===void 0){const err9={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"signedAt"},message:"must have required property 'signedAt'"};if(vErrors===null){vErrors=[err9]}else{vErrors.push(err9)}errors++}for(const key0 in data){if(!func11.call(schema52.properties,key0)){const err10={instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key0},message:"must NOT have additional properties"};if(vErrors===null){vErrors=[err10]}else{vErrors.push(err10)}errors++}}if(data.schemaVersion!==void 0){if(1!==data.schemaVersion){const err11={instancePath:instancePath+"/schemaVersion",schemaPath:"#/properties/schemaVersion/const",keyword:"const",params:{allowedValue:1},message:"must be equal to constant"};if(vErrors===null){vErrors=[err11]}else{vErrors.push(err11)}errors++}}if(data.purpose!==void 0){if("eventsdk-origin/1"!==data.purpose){const err12={instancePath:instancePath+"/purpose",schemaPath:"#/properties/purpose/const",keyword:"const",params:{allowedValue:"eventsdk-origin/1"},message:"must be equal to constant"};if(vErrors===null){vErrors=[err12]}else{vErrors.push(err12)}errors++}}if(data.issuer!==void 0){let data2=data.issuer;if(typeof data2==="string"){if(func1(data2)>2048){const err13={instancePath:instancePath+"/issuer",schemaPath:"#/properties/issuer/maxLength",keyword:"maxLength",params:{limit:2048},message:"must NOT have more than 2048 characters"};if(vErrors===null){vErrors=[err13]}else{vErrors.push(err13)}errors++}if(func1(data2)<1){const err14={instancePath:instancePath+"/issuer",schemaPath:"#/properties/issuer/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err14]}else{vErrors.push(err14)}errors++}if(!formats0(data2)){const err15={instancePath:instancePath+"/issuer",schemaPath:"#/properties/issuer/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};if(vErrors===null){vErrors=[err15]}else{vErrors.push(err15)}errors++}}else{const err16={instancePath:instancePath+"/issuer",schemaPath:"#/properties/issuer/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err16]}else{vErrors.push(err16)}errors++}}if(data.subject!==void 0){let data3=data.subject;if(typeof data3==="string"){if(func1(data3)>256){const err17={instancePath:instancePath+"/subject",schemaPath:"#/properties/subject/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err17]}else{vErrors.push(err17)}errors++}if(func1(data3)<1){const err18={instancePath:instancePath+"/subject",schemaPath:"#/properties/subject/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err18]}else{vErrors.push(err18)}errors++}}else{const err19={instancePath:instancePath+"/subject",schemaPath:"#/properties/subject/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err19]}else{vErrors.push(err19)}errors++}}if(data.serviceRef!==void 0){let data4=data.serviceRef;if(typeof data4==="string"){if(func1(data4)>256){const err20={instancePath:instancePath+"/serviceRef",schemaPath:"#/properties/serviceRef/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err20]}else{vErrors.push(err20)}errors++}if(func1(data4)<1){const err21={instancePath:instancePath+"/serviceRef",schemaPath:"#/properties/serviceRef/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err21]}else{vErrors.push(err21)}errors++}}else{const err22={instancePath:instancePath+"/serviceRef",schemaPath:"#/properties/serviceRef/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err22]}else{vErrors.push(err22)}errors++}}if(data.audience!==void 0){let data5=data.audience;if(typeof data5==="string"){if(func1(data5)>256){const err23={instancePath:instancePath+"/audience",schemaPath:"#/properties/audience/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err23]}else{vErrors.push(err23)}errors++}if(func1(data5)<1){const err24={instancePath:instancePath+"/audience",schemaPath:"#/properties/audience/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err24]}else{vErrors.push(err24)}errors++}}else{const err25={instancePath:instancePath+"/audience",schemaPath:"#/properties/audience/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err25]}else{vErrors.push(err25)}errors++}}if(data.source!==void 0){let data6=data.source;if(typeof data6==="string"){if(func1(data6)>2048){const err26={instancePath:instancePath+"/source",schemaPath:"#/properties/source/maxLength",keyword:"maxLength",params:{limit:2048},message:"must NOT have more than 2048 characters"};if(vErrors===null){vErrors=[err26]}else{vErrors.push(err26)}errors++}if(func1(data6)<1){const err27={instancePath:instancePath+"/source",schemaPath:"#/properties/source/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err27]}else{vErrors.push(err27)}errors++}if(!formats0(data6)){const err28={instancePath:instancePath+"/source",schemaPath:"#/properties/source/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};if(vErrors===null){vErrors=[err28]}else{vErrors.push(err28)}errors++}}else{const err29={instancePath:instancePath+"/source",schemaPath:"#/properties/source/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err29]}else{vErrors.push(err29)}errors++}}if(data.eventId!==void 0){let data7=data.eventId;if(typeof data7==="string"){if(func1(data7)>256){const err30={instancePath:instancePath+"/eventId",schemaPath:"#/properties/eventId/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err30]}else{vErrors.push(err30)}errors++}if(func1(data7)<1){const err31={instancePath:instancePath+"/eventId",schemaPath:"#/properties/eventId/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err31]}else{vErrors.push(err31)}errors++}}else{const err32={instancePath:instancePath+"/eventId",schemaPath:"#/properties/eventId/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err32]}else{vErrors.push(err32)}errors++}}if(data.deliveryId!==void 0){let data8=data.deliveryId;if(typeof data8==="string"){if(!pattern117.test(data8)){const err33={instancePath:instancePath+"/deliveryId",schemaPath:"#/properties/deliveryId/pattern",keyword:"pattern",params:{pattern:"^[a-f0-9]{64}$"},message:'must match pattern "^[a-f0-9]{64}$"'};if(vErrors===null){vErrors=[err33]}else{vErrors.push(err33)}errors++}}else{const err34={instancePath:instancePath+"/deliveryId",schemaPath:"#/properties/deliveryId/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err34]}else{vErrors.push(err34)}errors++}}if(data.eventDigest!==void 0){let data9=data.eventDigest;if(typeof data9==="string"){if(!pattern8.test(data9)){const err35={instancePath:instancePath+"/eventDigest",schemaPath:"#/properties/eventDigest/pattern",keyword:"pattern",params:{pattern:"^sha256:[a-f0-9]{64}$"},message:'must match pattern "^sha256:[a-f0-9]{64}$"'};if(vErrors===null){vErrors=[err35]}else{vErrors.push(err35)}errors++}}else{const err36={instancePath:instancePath+"/eventDigest",schemaPath:"#/properties/eventDigest/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err36]}else{vErrors.push(err36)}errors++}}if(data.signedAt!==void 0){let data10=data.signedAt;if(typeof data10==="string"){if(func1(data10)>64){const err37={instancePath:instancePath+"/signedAt",schemaPath:"#/properties/signedAt/maxLength",keyword:"maxLength",params:{limit:64},message:"must NOT have more than 64 characters"};if(vErrors===null){vErrors=[err37]}else{vErrors.push(err37)}errors++}if(!formats2.validate(data10)){const err38={instancePath:instancePath+"/signedAt",schemaPath:"#/properties/signedAt/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};if(vErrors===null){vErrors=[err38]}else{vErrors.push(err38)}errors++}}else{const err39={instancePath:instancePath+"/signedAt",schemaPath:"#/properties/signedAt/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err39]}else{vErrors.push(err39)}errors++}}}else{const err40={instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};if(vErrors===null){vErrors=[err40]}else{vErrors.push(err40)}errors++}validate40.errors=vErrors;return errors===0}validate40.evaluated={props:true,dynamicProps:false,dynamicItems:false};var nodeConnectionProfile=validate41;var schema53={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://eventsdk.dev/schemas/v1/node-connection-profile.schema.json",title:"NodeConnectionProfile",type:"object",additionalProperties:false,required:["schemaVersion","profile","serviceRef","installationSource","mode","broker","identity","publisher","consumer"],properties:{schemaVersion:{const:1},profile:{const:"eventsdk-node/1"},serviceRef:{$ref:"#/$defs/ref"},installationSource:{type:"string",format:"uri",maxLength:2048},mode:{enum:["DISABLED","SHADOW","ACTIVE"]},broker:{type:"object",additionalProperties:false,required:["serverUrl","expectedDnsName","deploymentDomainRef","authentication","credentialsFile","timeoutMs","maxPayloadBytes"],properties:{serverUrl:{type:"string",format:"uri",maxLength:2048},expectedDnsName:{$ref:"#/$defs/ref"},deploymentDomainRef:{$ref:"#/$defs/ref"},credentialsFile:{$ref:"#/$defs/file"},authentication:{enum:["NATS_CREDS","NKEY_SEED"]},caFile:{$ref:"#/$defs/file"},timeoutMs:{type:"integer",minimum:100,maximum:3e4},maxPayloadBytes:{type:"integer",minimum:1024,maximum:1048576}}},identity:{type:"object",additionalProperties:false,required:["originProof","signer","trustedSources"],properties:{originProof:{const:"eventsdk-origin/1"},signer:{oneOf:[{type:"null"},{type:"object",additionalProperties:false,required:["issuer","subject","keyId","algorithm","privateKeyFile","publicSnapshotFile","audiences","jwksUri"],properties:{issuer:{$ref:"#/$defs/issuer"},subject:{$ref:"#/$defs/ref"},keyId:{$ref:"#/$defs/ref"},algorithm:{$ref:"#/$defs/algorithm"},privateKeyFile:{$ref:"#/$defs/file"},publicSnapshotFile:{$ref:"#/$defs/file"},audiences:{type:"array",minItems:1,maxItems:32,uniqueItems:true,items:{$ref:"#/$defs/ref"}},jwksUri:{$ref:"#/$defs/issuer"}}}]},trustedSources:{type:"array",maxItems:32,items:{type:"object",additionalProperties:false,required:["source","serviceRef","issuer","subject","audience","algorithms","jwksUri","publicSnapshotFile"],properties:{source:{type:"string",format:"uri",maxLength:2048},serviceRef:{$ref:"#/$defs/ref"},issuer:{$ref:"#/$defs/issuer"},subject:{$ref:"#/$defs/ref"},audience:{$ref:"#/$defs/ref"},algorithms:{type:"array",minItems:1,maxItems:4,uniqueItems:true,items:{$ref:"#/$defs/algorithm"}},jwksUri:{$ref:"#/$defs/issuer"},publicSnapshotFile:{$ref:"#/$defs/file"}}}}}},publisher:{oneOf:[{type:"null"},{type:"object",additionalProperties:false,required:["subject","expectedStream"],properties:{subject:{$ref:"#/$defs/ref"},expectedStream:{$ref:"#/$defs/name"},audienceRoutes:{type:"array",minItems:1,maxItems:32,items:{type:"object",additionalProperties:false,required:["audience","subject","expectedStream"],properties:{audience:{$ref:"#/$defs/ref"},subject:{$ref:"#/$defs/ref"},expectedStream:{$ref:"#/$defs/name"}}}}}}]},consumer:{oneOf:[{type:"null"},{type:"object",additionalProperties:false,required:["consumerRef","stream","durableName","subject","batchSize","fetchExpiresMs"],properties:{consumerRef:{$ref:"#/$defs/ref"},stream:{$ref:"#/$defs/name"},durableName:{$ref:"#/$defs/name"},subject:{$ref:"#/$defs/ref"},batchSize:{type:"integer",minimum:1,maximum:100},fetchExpiresMs:{type:"integer",minimum:1e3,maximum:3e4},additionalBindings:{type:"array",minItems:1,maxItems:7,items:{type:"object",additionalProperties:false,required:["stream","durableName","subject"],properties:{stream:{$ref:"#/$defs/name"},durableName:{$ref:"#/$defs/name"},subject:{$ref:"#/$defs/ref"}}}}}}]}},$defs:{ref:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u0020\\u007f]+$"},name:{type:"string",minLength:1,maxLength:128,pattern:"^[A-Za-z0-9_-]+$"},file:{type:"string",minLength:1,maxLength:4096},issuer:{type:"string",format:"uri",minLength:1,maxLength:2048},algorithm:{enum:["RS256","PS256","ES256","EdDSA"]}}};var schema62={enum:["RS256","PS256","ES256","EdDSA"]};var func0=runtime2.default;var pattern119=new RegExp("^[^\\u0000-\\u0020\\u007f]+$","u");var pattern129=new RegExp("^[A-Za-z0-9_-]+$","u");function validate41(data,{instancePath="",parentData,parentDataProperty,rootData=data,dynamicAnchors={}}={}){let vErrors=null;let errors=0;const evaluated0=validate41.evaluated;if(evaluated0.dynamicProps){evaluated0.props=void 0}if(evaluated0.dynamicItems){evaluated0.items=void 0}if(data&&typeof data=="object"&&!Array.isArray(data)){if(data.schemaVersion===void 0){const err0={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"schemaVersion"},message:"must have required property 'schemaVersion'"};if(vErrors===null){vErrors=[err0]}else{vErrors.push(err0)}errors++}if(data.profile===void 0){const err1={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"profile"},message:"must have required property 'profile'"};if(vErrors===null){vErrors=[err1]}else{vErrors.push(err1)}errors++}if(data.serviceRef===void 0){const err2={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"serviceRef"},message:"must have required property 'serviceRef'"};if(vErrors===null){vErrors=[err2]}else{vErrors.push(err2)}errors++}if(data.installationSource===void 0){const err3={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"installationSource"},message:"must have required property 'installationSource'"};if(vErrors===null){vErrors=[err3]}else{vErrors.push(err3)}errors++}if(data.mode===void 0){const err4={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"mode"},message:"must have required property 'mode'"};if(vErrors===null){vErrors=[err4]}else{vErrors.push(err4)}errors++}if(data.broker===void 0){const err5={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"broker"},message:"must have required property 'broker'"};if(vErrors===null){vErrors=[err5]}else{vErrors.push(err5)}errors++}if(data.identity===void 0){const err6={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"identity"},message:"must have required property 'identity'"};if(vErrors===null){vErrors=[err6]}else{vErrors.push(err6)}errors++}if(data.publisher===void 0){const err7={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"publisher"},message:"must have required property 'publisher'"};if(vErrors===null){vErrors=[err7]}else{vErrors.push(err7)}errors++}if(data.consumer===void 0){const err8={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"consumer"},message:"must have required property 'consumer'"};if(vErrors===null){vErrors=[err8]}else{vErrors.push(err8)}errors++}for(const key0 in data){if(!func11.call(schema53.properties,key0)){const err9={instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key0},message:"must NOT have additional properties"};if(vErrors===null){vErrors=[err9]}else{vErrors.push(err9)}errors++}}if(data.schemaVersion!==void 0){if(1!==data.schemaVersion){const err10={instancePath:instancePath+"/schemaVersion",schemaPath:"#/properties/schemaVersion/const",keyword:"const",params:{allowedValue:1},message:"must be equal to constant"};if(vErrors===null){vErrors=[err10]}else{vErrors.push(err10)}errors++}}if(data.profile!==void 0){if("eventsdk-node/1"!==data.profile){const err11={instancePath:instancePath+"/profile",schemaPath:"#/properties/profile/const",keyword:"const",params:{allowedValue:"eventsdk-node/1"},message:"must be equal to constant"};if(vErrors===null){vErrors=[err11]}else{vErrors.push(err11)}errors++}}if(data.serviceRef!==void 0){let data2=data.serviceRef;if(typeof data2==="string"){if(func1(data2)>256){const err12={instancePath:instancePath+"/serviceRef",schemaPath:"#/$defs/ref/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err12]}else{vErrors.push(err12)}errors++}if(func1(data2)<1){const err13={instancePath:instancePath+"/serviceRef",schemaPath:"#/$defs/ref/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err13]}else{vErrors.push(err13)}errors++}if(!pattern119.test(data2)){const err14={instancePath:instancePath+"/serviceRef",schemaPath:"#/$defs/ref/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u0020\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u0020\\u007f]+$"'};if(vErrors===null){vErrors=[err14]}else{vErrors.push(err14)}errors++}}else{const err15={instancePath:instancePath+"/serviceRef",schemaPath:"#/$defs/ref/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err15]}else{vErrors.push(err15)}errors++}}if(data.installationSource!==void 0){let data3=data.installationSource;if(typeof data3==="string"){if(func1(data3)>2048){const err16={instancePath:instancePath+"/installationSource",schemaPath:"#/properties/installationSource/maxLength",keyword:"maxLength",params:{limit:2048},message:"must NOT have more than 2048 characters"};if(vErrors===null){vErrors=[err16]}else{vErrors.push(err16)}errors++}if(!formats0(data3)){const err17={instancePath:instancePath+"/installationSource",schemaPath:"#/properties/installationSource/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};if(vErrors===null){vErrors=[err17]}else{vErrors.push(err17)}errors++}}else{const err18={instancePath:instancePath+"/installationSource",schemaPath:"#/properties/installationSource/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err18]}else{vErrors.push(err18)}errors++}}if(data.mode!==void 0){let data4=data.mode;if(!(data4==="DISABLED"||data4==="SHADOW"||data4==="ACTIVE")){const err19={instancePath:instancePath+"/mode",schemaPath:"#/properties/mode/enum",keyword:"enum",params:{allowedValues:schema53.properties.mode.enum},message:"must be equal to one of the allowed values"};if(vErrors===null){vErrors=[err19]}else{vErrors.push(err19)}errors++}}if(data.broker!==void 0){let data5=data.broker;if(data5&&typeof data5=="object"&&!Array.isArray(data5)){if(data5.serverUrl===void 0){const err20={instancePath:instancePath+"/broker",schemaPath:"#/properties/broker/required",keyword:"required",params:{missingProperty:"serverUrl"},message:"must have required property 'serverUrl'"};if(vErrors===null){vErrors=[err20]}else{vErrors.push(err20)}errors++}if(data5.expectedDnsName===void 0){const err21={instancePath:instancePath+"/broker",schemaPath:"#/properties/broker/required",keyword:"required",params:{missingProperty:"expectedDnsName"},message:"must have required property 'expectedDnsName'"};if(vErrors===null){vErrors=[err21]}else{vErrors.push(err21)}errors++}if(data5.deploymentDomainRef===void 0){const err22={instancePath:instancePath+"/broker",schemaPath:"#/properties/broker/required",keyword:"required",params:{missingProperty:"deploymentDomainRef"},message:"must have required property 'deploymentDomainRef'"};if(vErrors===null){vErrors=[err22]}else{vErrors.push(err22)}errors++}if(data5.authentication===void 0){const err23={instancePath:instancePath+"/broker",schemaPath:"#/properties/broker/required",keyword:"required",params:{missingProperty:"authentication"},message:"must have required property 'authentication'"};if(vErrors===null){vErrors=[err23]}else{vErrors.push(err23)}errors++}if(data5.credentialsFile===void 0){const err24={instancePath:instancePath+"/broker",schemaPath:"#/properties/broker/required",keyword:"required",params:{missingProperty:"credentialsFile"},message:"must have required property 'credentialsFile'"};if(vErrors===null){vErrors=[err24]}else{vErrors.push(err24)}errors++}if(data5.timeoutMs===void 0){const err25={instancePath:instancePath+"/broker",schemaPath:"#/properties/broker/required",keyword:"required",params:{missingProperty:"timeoutMs"},message:"must have required property 'timeoutMs'"};if(vErrors===null){vErrors=[err25]}else{vErrors.push(err25)}errors++}if(data5.maxPayloadBytes===void 0){const err26={instancePath:instancePath+"/broker",schemaPath:"#/properties/broker/required",keyword:"required",params:{missingProperty:"maxPayloadBytes"},message:"must have required property 'maxPayloadBytes'"};if(vErrors===null){vErrors=[err26]}else{vErrors.push(err26)}errors++}for(const key1 in data5){if(!(key1==="serverUrl"||key1==="expectedDnsName"||key1==="deploymentDomainRef"||key1==="credentialsFile"||key1==="authentication"||key1==="caFile"||key1==="timeoutMs"||key1==="maxPayloadBytes")){const err27={instancePath:instancePath+"/broker",schemaPath:"#/properties/broker/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key1},message:"must NOT have additional properties"};if(vErrors===null){vErrors=[err27]}else{vErrors.push(err27)}errors++}}if(data5.serverUrl!==void 0){let data6=data5.serverUrl;if(typeof data6==="string"){if(func1(data6)>2048){const err28={instancePath:instancePath+"/broker/serverUrl",schemaPath:"#/properties/broker/properties/serverUrl/maxLength",keyword:"maxLength",params:{limit:2048},message:"must NOT have more than 2048 characters"};if(vErrors===null){vErrors=[err28]}else{vErrors.push(err28)}errors++}if(!formats0(data6)){const err29={instancePath:instancePath+"/broker/serverUrl",schemaPath:"#/properties/broker/properties/serverUrl/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};if(vErrors===null){vErrors=[err29]}else{vErrors.push(err29)}errors++}}else{const err30={instancePath:instancePath+"/broker/serverUrl",schemaPath:"#/properties/broker/properties/serverUrl/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err30]}else{vErrors.push(err30)}errors++}}if(data5.expectedDnsName!==void 0){let data7=data5.expectedDnsName;if(typeof data7==="string"){if(func1(data7)>256){const err31={instancePath:instancePath+"/broker/expectedDnsName",schemaPath:"#/$defs/ref/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err31]}else{vErrors.push(err31)}errors++}if(func1(data7)<1){const err32={instancePath:instancePath+"/broker/expectedDnsName",schemaPath:"#/$defs/ref/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err32]}else{vErrors.push(err32)}errors++}if(!pattern119.test(data7)){const err33={instancePath:instancePath+"/broker/expectedDnsName",schemaPath:"#/$defs/ref/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u0020\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u0020\\u007f]+$"'};if(vErrors===null){vErrors=[err33]}else{vErrors.push(err33)}errors++}}else{const err34={instancePath:instancePath+"/broker/expectedDnsName",schemaPath:"#/$defs/ref/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err34]}else{vErrors.push(err34)}errors++}}if(data5.deploymentDomainRef!==void 0){let data8=data5.deploymentDomainRef;if(typeof data8==="string"){if(func1(data8)>256){const err35={instancePath:instancePath+"/broker/deploymentDomainRef",schemaPath:"#/$defs/ref/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err35]}else{vErrors.push(err35)}errors++}if(func1(data8)<1){const err36={instancePath:instancePath+"/broker/deploymentDomainRef",schemaPath:"#/$defs/ref/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err36]}else{vErrors.push(err36)}errors++}if(!pattern119.test(data8)){const err37={instancePath:instancePath+"/broker/deploymentDomainRef",schemaPath:"#/$defs/ref/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u0020\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u0020\\u007f]+$"'};if(vErrors===null){vErrors=[err37]}else{vErrors.push(err37)}errors++}}else{const err38={instancePath:instancePath+"/broker/deploymentDomainRef",schemaPath:"#/$defs/ref/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err38]}else{vErrors.push(err38)}errors++}}if(data5.credentialsFile!==void 0){let data9=data5.credentialsFile;if(typeof data9==="string"){if(func1(data9)>4096){const err39={instancePath:instancePath+"/broker/credentialsFile",schemaPath:"#/$defs/file/maxLength",keyword:"maxLength",params:{limit:4096},message:"must NOT have more than 4096 characters"};if(vErrors===null){vErrors=[err39]}else{vErrors.push(err39)}errors++}if(func1(data9)<1){const err40={instancePath:instancePath+"/broker/credentialsFile",schemaPath:"#/$defs/file/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err40]}else{vErrors.push(err40)}errors++}}else{const err41={instancePath:instancePath+"/broker/credentialsFile",schemaPath:"#/$defs/file/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err41]}else{vErrors.push(err41)}errors++}}if(data5.authentication!==void 0){let data10=data5.authentication;if(!(data10==="NATS_CREDS"||data10==="NKEY_SEED")){const err42={instancePath:instancePath+"/broker/authentication",schemaPath:"#/properties/broker/properties/authentication/enum",keyword:"enum",params:{allowedValues:schema53.properties.broker.properties.authentication.enum},message:"must be equal to one of the allowed values"};if(vErrors===null){vErrors=[err42]}else{vErrors.push(err42)}errors++}}if(data5.caFile!==void 0){let data11=data5.caFile;if(typeof data11==="string"){if(func1(data11)>4096){const err43={instancePath:instancePath+"/broker/caFile",schemaPath:"#/$defs/file/maxLength",keyword:"maxLength",params:{limit:4096},message:"must NOT have more than 4096 characters"};if(vErrors===null){vErrors=[err43]}else{vErrors.push(err43)}errors++}if(func1(data11)<1){const err44={instancePath:instancePath+"/broker/caFile",schemaPath:"#/$defs/file/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err44]}else{vErrors.push(err44)}errors++}}else{const err45={instancePath:instancePath+"/broker/caFile",schemaPath:"#/$defs/file/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err45]}else{vErrors.push(err45)}errors++}}if(data5.timeoutMs!==void 0){let data12=data5.timeoutMs;if(!(typeof data12=="number"&&!(data12%1)&&!isNaN(data12)&&isFinite(data12))){const err46={instancePath:instancePath+"/broker/timeoutMs",schemaPath:"#/properties/broker/properties/timeoutMs/type",keyword:"type",params:{type:"integer"},message:"must be integer"};if(vErrors===null){vErrors=[err46]}else{vErrors.push(err46)}errors++}if(typeof data12=="number"&&isFinite(data12)){if(data12>3e4||isNaN(data12)){const err47={instancePath:instancePath+"/broker/timeoutMs",schemaPath:"#/properties/broker/properties/timeoutMs/maximum",keyword:"maximum",params:{comparison:"<=",limit:3e4},message:"must be <= 30000"};if(vErrors===null){vErrors=[err47]}else{vErrors.push(err47)}errors++}if(data12<100||isNaN(data12)){const err48={instancePath:instancePath+"/broker/timeoutMs",schemaPath:"#/properties/broker/properties/timeoutMs/minimum",keyword:"minimum",params:{comparison:">=",limit:100},message:"must be >= 100"};if(vErrors===null){vErrors=[err48]}else{vErrors.push(err48)}errors++}}}if(data5.maxPayloadBytes!==void 0){let data13=data5.maxPayloadBytes;if(!(typeof data13=="number"&&!(data13%1)&&!isNaN(data13)&&isFinite(data13))){const err49={instancePath:instancePath+"/broker/maxPayloadBytes",schemaPath:"#/properties/broker/properties/maxPayloadBytes/type",keyword:"type",params:{type:"integer"},message:"must be integer"};if(vErrors===null){vErrors=[err49]}else{vErrors.push(err49)}errors++}if(typeof data13=="number"&&isFinite(data13)){if(data13>1048576||isNaN(data13)){const err50={instancePath:instancePath+"/broker/maxPayloadBytes",schemaPath:"#/properties/broker/properties/maxPayloadBytes/maximum",keyword:"maximum",params:{comparison:"<=",limit:1048576},message:"must be <= 1048576"};if(vErrors===null){vErrors=[err50]}else{vErrors.push(err50)}errors++}if(data13<1024||isNaN(data13)){const err51={instancePath:instancePath+"/broker/maxPayloadBytes",schemaPath:"#/properties/broker/properties/maxPayloadBytes/minimum",keyword:"minimum",params:{comparison:">=",limit:1024},message:"must be >= 1024"};if(vErrors===null){vErrors=[err51]}else{vErrors.push(err51)}errors++}}}}else{const err52={instancePath:instancePath+"/broker",schemaPath:"#/properties/broker/type",keyword:"type",params:{type:"object"},message:"must be object"};if(vErrors===null){vErrors=[err52]}else{vErrors.push(err52)}errors++}}if(data.identity!==void 0){let data14=data.identity;if(data14&&typeof data14=="object"&&!Array.isArray(data14)){if(data14.originProof===void 0){const err53={instancePath:instancePath+"/identity",schemaPath:"#/properties/identity/required",keyword:"required",params:{missingProperty:"originProof"},message:"must have required property 'originProof'"};if(vErrors===null){vErrors=[err53]}else{vErrors.push(err53)}errors++}if(data14.signer===void 0){const err54={instancePath:instancePath+"/identity",schemaPath:"#/properties/identity/required",keyword:"required",params:{missingProperty:"signer"},message:"must have required property 'signer'"};if(vErrors===null){vErrors=[err54]}else{vErrors.push(err54)}errors++}if(data14.trustedSources===void 0){const err55={instancePath:instancePath+"/identity",schemaPath:"#/properties/identity/required",keyword:"required",params:{missingProperty:"trustedSources"},message:"must have required property 'trustedSources'"};if(vErrors===null){vErrors=[err55]}else{vErrors.push(err55)}errors++}for(const key2 in data14){if(!(key2==="originProof"||key2==="signer"||key2==="trustedSources")){const err56={instancePath:instancePath+"/identity",schemaPath:"#/properties/identity/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key2},message:"must NOT have additional properties"};if(vErrors===null){vErrors=[err56]}else{vErrors.push(err56)}errors++}}if(data14.originProof!==void 0){if("eventsdk-origin/1"!==data14.originProof){const err57={instancePath:instancePath+"/identity/originProof",schemaPath:"#/properties/identity/properties/originProof/const",keyword:"const",params:{allowedValue:"eventsdk-origin/1"},message:"must be equal to constant"};if(vErrors===null){vErrors=[err57]}else{vErrors.push(err57)}errors++}}if(data14.signer!==void 0){let data16=data14.signer;const _errs37=errors;let valid8=false;let passing0=null;const _errs38=errors;if(data16!==null){const err58={instancePath:instancePath+"/identity/signer",schemaPath:"#/properties/identity/properties/signer/oneOf/0/type",keyword:"type",params:{type:"null"},message:"must be null"};if(vErrors===null){vErrors=[err58]}else{vErrors.push(err58)}errors++}var _valid0=_errs38===errors;if(_valid0){valid8=true;passing0=0}const _errs40=errors;if(data16&&typeof data16=="object"&&!Array.isArray(data16)){if(data16.issuer===void 0){const err59={instancePath:instancePath+"/identity/signer",schemaPath:"#/properties/identity/properties/signer/oneOf/1/required",keyword:"required",params:{missingProperty:"issuer"},message:"must have required property 'issuer'"};if(vErrors===null){vErrors=[err59]}else{vErrors.push(err59)}errors++}if(data16.subject===void 0){const err60={instancePath:instancePath+"/identity/signer",schemaPath:"#/properties/identity/properties/signer/oneOf/1/required",keyword:"required",params:{missingProperty:"subject"},message:"must have required property 'subject'"};if(vErrors===null){vErrors=[err60]}else{vErrors.push(err60)}errors++}if(data16.keyId===void 0){const err61={instancePath:instancePath+"/identity/signer",schemaPath:"#/properties/identity/properties/signer/oneOf/1/required",keyword:"required",params:{missingProperty:"keyId"},message:"must have required property 'keyId'"};if(vErrors===null){vErrors=[err61]}else{vErrors.push(err61)}errors++}if(data16.algorithm===void 0){const err62={instancePath:instancePath+"/identity/signer",schemaPath:"#/properties/identity/properties/signer/oneOf/1/required",keyword:"required",params:{missingProperty:"algorithm"},message:"must have required property 'algorithm'"};if(vErrors===null){vErrors=[err62]}else{vErrors.push(err62)}errors++}if(data16.privateKeyFile===void 0){const err63={instancePath:instancePath+"/identity/signer",schemaPath:"#/properties/identity/properties/signer/oneOf/1/required",keyword:"required",params:{missingProperty:"privateKeyFile"},message:"must have required property 'privateKeyFile'"};if(vErrors===null){vErrors=[err63]}else{vErrors.push(err63)}errors++}if(data16.publicSnapshotFile===void 0){const err64={instancePath:instancePath+"/identity/signer",schemaPath:"#/properties/identity/properties/signer/oneOf/1/required",keyword:"required",params:{missingProperty:"publicSnapshotFile"},message:"must have required property 'publicSnapshotFile'"};if(vErrors===null){vErrors=[err64]}else{vErrors.push(err64)}errors++}if(data16.audiences===void 0){const err65={instancePath:instancePath+"/identity/signer",schemaPath:"#/properties/identity/properties/signer/oneOf/1/required",keyword:"required",params:{missingProperty:"audiences"},message:"must have required property 'audiences'"};if(vErrors===null){vErrors=[err65]}else{vErrors.push(err65)}errors++}if(data16.jwksUri===void 0){const err66={instancePath:instancePath+"/identity/signer",schemaPath:"#/properties/identity/properties/signer/oneOf/1/required",keyword:"required",params:{missingProperty:"jwksUri"},message:"must have required property 'jwksUri'"};if(vErrors===null){vErrors=[err66]}else{vErrors.push(err66)}errors++}for(const key3 in data16){if(!(key3==="issuer"||key3==="subject"||key3==="keyId"||key3==="algorithm"||key3==="privateKeyFile"||key3==="publicSnapshotFile"||key3==="audiences"||key3==="jwksUri")){const err67={instancePath:instancePath+"/identity/signer",schemaPath:"#/properties/identity/properties/signer/oneOf/1/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key3},message:"must NOT have additional properties"};if(vErrors===null){vErrors=[err67]}else{vErrors.push(err67)}errors++}}if(data16.issuer!==void 0){let data17=data16.issuer;if(typeof data17==="string"){if(func1(data17)>2048){const err68={instancePath:instancePath+"/identity/signer/issuer",schemaPath:"#/$defs/issuer/maxLength",keyword:"maxLength",params:{limit:2048},message:"must NOT have more than 2048 characters"};if(vErrors===null){vErrors=[err68]}else{vErrors.push(err68)}errors++}if(func1(data17)<1){const err69={instancePath:instancePath+"/identity/signer/issuer",schemaPath:"#/$defs/issuer/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err69]}else{vErrors.push(err69)}errors++}if(!formats0(data17)){const err70={instancePath:instancePath+"/identity/signer/issuer",schemaPath:"#/$defs/issuer/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};if(vErrors===null){vErrors=[err70]}else{vErrors.push(err70)}errors++}}else{const err71={instancePath:instancePath+"/identity/signer/issuer",schemaPath:"#/$defs/issuer/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err71]}else{vErrors.push(err71)}errors++}}if(data16.subject!==void 0){let data18=data16.subject;if(typeof data18==="string"){if(func1(data18)>256){const err72={instancePath:instancePath+"/identity/signer/subject",schemaPath:"#/$defs/ref/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err72]}else{vErrors.push(err72)}errors++}if(func1(data18)<1){const err73={instancePath:instancePath+"/identity/signer/subject",schemaPath:"#/$defs/ref/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err73]}else{vErrors.push(err73)}errors++}if(!pattern119.test(data18)){const err74={instancePath:instancePath+"/identity/signer/subject",schemaPath:"#/$defs/ref/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u0020\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u0020\\u007f]+$"'};if(vErrors===null){vErrors=[err74]}else{vErrors.push(err74)}errors++}}else{const err75={instancePath:instancePath+"/identity/signer/subject",schemaPath:"#/$defs/ref/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err75]}else{vErrors.push(err75)}errors++}}if(data16.keyId!==void 0){let data19=data16.keyId;if(typeof data19==="string"){if(func1(data19)>256){const err76={instancePath:instancePath+"/identity/signer/keyId",schemaPath:"#/$defs/ref/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err76]}else{vErrors.push(err76)}errors++}if(func1(data19)<1){const err77={instancePath:instancePath+"/identity/signer/keyId",schemaPath:"#/$defs/ref/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err77]}else{vErrors.push(err77)}errors++}if(!pattern119.test(data19)){const err78={instancePath:instancePath+"/identity/signer/keyId",schemaPath:"#/$defs/ref/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u0020\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u0020\\u007f]+$"'};if(vErrors===null){vErrors=[err78]}else{vErrors.push(err78)}errors++}}else{const err79={instancePath:instancePath+"/identity/signer/keyId",schemaPath:"#/$defs/ref/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err79]}else{vErrors.push(err79)}errors++}}if(data16.algorithm!==void 0){let data20=data16.algorithm;if(!(data20==="RS256"||data20==="PS256"||data20==="ES256"||data20==="EdDSA")){const err80={instancePath:instancePath+"/identity/signer/algorithm",schemaPath:"#/$defs/algorithm/enum",keyword:"enum",params:{allowedValues:schema62.enum},message:"must be equal to one of the allowed values"};if(vErrors===null){vErrors=[err80]}else{vErrors.push(err80)}errors++}}if(data16.privateKeyFile!==void 0){let data21=data16.privateKeyFile;if(typeof data21==="string"){if(func1(data21)>4096){const err81={instancePath:instancePath+"/identity/signer/privateKeyFile",schemaPath:"#/$defs/file/maxLength",keyword:"maxLength",params:{limit:4096},message:"must NOT have more than 4096 characters"};if(vErrors===null){vErrors=[err81]}else{vErrors.push(err81)}errors++}if(func1(data21)<1){const err82={instancePath:instancePath+"/identity/signer/privateKeyFile",schemaPath:"#/$defs/file/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err82]}else{vErrors.push(err82)}errors++}}else{const err83={instancePath:instancePath+"/identity/signer/privateKeyFile",schemaPath:"#/$defs/file/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err83]}else{vErrors.push(err83)}errors++}}if(data16.publicSnapshotFile!==void 0){let data22=data16.publicSnapshotFile;if(typeof data22==="string"){if(func1(data22)>4096){const err84={instancePath:instancePath+"/identity/signer/publicSnapshotFile",schemaPath:"#/$defs/file/maxLength",keyword:"maxLength",params:{limit:4096},message:"must NOT have more than 4096 characters"};if(vErrors===null){vErrors=[err84]}else{vErrors.push(err84)}errors++}if(func1(data22)<1){const err85={instancePath:instancePath+"/identity/signer/publicSnapshotFile",schemaPath:"#/$defs/file/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err85]}else{vErrors.push(err85)}errors++}}else{const err86={instancePath:instancePath+"/identity/signer/publicSnapshotFile",schemaPath:"#/$defs/file/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err86]}else{vErrors.push(err86)}errors++}}if(data16.audiences!==void 0){let data23=data16.audiences;if(Array.isArray(data23)){if(data23.length>32){const err87={instancePath:instancePath+"/identity/signer/audiences",schemaPath:"#/properties/identity/properties/signer/oneOf/1/properties/audiences/maxItems",keyword:"maxItems",params:{limit:32},message:"must NOT have more than 32 items"};if(vErrors===null){vErrors=[err87]}else{vErrors.push(err87)}errors++}if(data23.length<1){const err88={instancePath:instancePath+"/identity/signer/audiences",schemaPath:"#/properties/identity/properties/signer/oneOf/1/properties/audiences/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};if(vErrors===null){vErrors=[err88]}else{vErrors.push(err88)}errors++}const len0=data23.length;for(let i0=0;i0<len0;i0++){let data24=data23[i0];if(typeof data24==="string"){if(func1(data24)>256){const err89={instancePath:instancePath+"/identity/signer/audiences/"+i0,schemaPath:"#/$defs/ref/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err89]}else{vErrors.push(err89)}errors++}if(func1(data24)<1){const err90={instancePath:instancePath+"/identity/signer/audiences/"+i0,schemaPath:"#/$defs/ref/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err90]}else{vErrors.push(err90)}errors++}if(!pattern119.test(data24)){const err91={instancePath:instancePath+"/identity/signer/audiences/"+i0,schemaPath:"#/$defs/ref/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u0020\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u0020\\u007f]+$"'};if(vErrors===null){vErrors=[err91]}else{vErrors.push(err91)}errors++}}else{const err92={instancePath:instancePath+"/identity/signer/audiences/"+i0,schemaPath:"#/$defs/ref/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err92]}else{vErrors.push(err92)}errors++}}let i1=data23.length;let j0;if(i1>1){outer0:for(;i1--;){for(j0=i1;j0--;){if(func0(data23[i1],data23[j0])){const err93={instancePath:instancePath+"/identity/signer/audiences",schemaPath:"#/properties/identity/properties/signer/oneOf/1/properties/audiences/uniqueItems",keyword:"uniqueItems",params:{i:i1,j:j0},message:"must NOT have duplicate items (items ## "+j0+" and "+i1+" are identical)"};if(vErrors===null){vErrors=[err93]}else{vErrors.push(err93)}errors++;break outer0}}}}}else{const err94={instancePath:instancePath+"/identity/signer/audiences",schemaPath:"#/properties/identity/properties/signer/oneOf/1/properties/audiences/type",keyword:"type",params:{type:"array"},message:"must be array"};if(vErrors===null){vErrors=[err94]}else{vErrors.push(err94)}errors++}}if(data16.jwksUri!==void 0){let data25=data16.jwksUri;if(typeof data25==="string"){if(func1(data25)>2048){const err95={instancePath:instancePath+"/identity/signer/jwksUri",schemaPath:"#/$defs/issuer/maxLength",keyword:"maxLength",params:{limit:2048},message:"must NOT have more than 2048 characters"};if(vErrors===null){vErrors=[err95]}else{vErrors.push(err95)}errors++}if(func1(data25)<1){const err96={instancePath:instancePath+"/identity/signer/jwksUri",schemaPath:"#/$defs/issuer/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err96]}else{vErrors.push(err96)}errors++}if(!formats0(data25)){const err97={instancePath:instancePath+"/identity/signer/jwksUri",schemaPath:"#/$defs/issuer/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};if(vErrors===null){vErrors=[err97]}else{vErrors.push(err97)}errors++}}else{const err98={instancePath:instancePath+"/identity/signer/jwksUri",schemaPath:"#/$defs/issuer/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err98]}else{vErrors.push(err98)}errors++}}}else{const err99={instancePath:instancePath+"/identity/signer",schemaPath:"#/properties/identity/properties/signer/oneOf/1/type",keyword:"type",params:{type:"object"},message:"must be object"};if(vErrors===null){vErrors=[err99]}else{vErrors.push(err99)}errors++}var _valid0=_errs40===errors;if(_valid0&&valid8){valid8=false;passing0=[passing0,1]}else{if(_valid0){valid8=true;passing0=1}}if(!valid8){const err100={instancePath:instancePath+"/identity/signer",schemaPath:"#/properties/identity/properties/signer/oneOf",keyword:"oneOf",params:{passingSchemas:passing0},message:"must match exactly one schema in oneOf"};if(vErrors===null){vErrors=[err100]}else{vErrors.push(err100)}errors++}else{errors=_errs37;if(vErrors!==null){if(_errs37){vErrors.length=_errs37}else{vErrors=null}}}}if(data14.trustedSources!==void 0){let data26=data14.trustedSources;if(Array.isArray(data26)){if(data26.length>32){const err101={instancePath:instancePath+"/identity/trustedSources",schemaPath:"#/properties/identity/properties/trustedSources/maxItems",keyword:"maxItems",params:{limit:32},message:"must NOT have more than 32 items"};if(vErrors===null){vErrors=[err101]}else{vErrors.push(err101)}errors++}const len1=data26.length;for(let i2=0;i2<len1;i2++){let data27=data26[i2];if(data27&&typeof data27=="object"&&!Array.isArray(data27)){if(data27.source===void 0){const err102={instancePath:instancePath+"/identity/trustedSources/"+i2,schemaPath:"#/properties/identity/properties/trustedSources/items/required",keyword:"required",params:{missingProperty:"source"},message:"must have required property 'source'"};if(vErrors===null){vErrors=[err102]}else{vErrors.push(err102)}errors++}if(data27.serviceRef===void 0){const err103={instancePath:instancePath+"/identity/trustedSources/"+i2,schemaPath:"#/properties/identity/properties/trustedSources/items/required",keyword:"required",params:{missingProperty:"serviceRef"},message:"must have required property 'serviceRef'"};if(vErrors===null){vErrors=[err103]}else{vErrors.push(err103)}errors++}if(data27.issuer===void 0){const err104={instancePath:instancePath+"/identity/trustedSources/"+i2,schemaPath:"#/properties/identity/properties/trustedSources/items/required",keyword:"required",params:{missingProperty:"issuer"},message:"must have required property 'issuer'"};if(vErrors===null){vErrors=[err104]}else{vErrors.push(err104)}errors++}if(data27.subject===void 0){const err105={instancePath:instancePath+"/identity/trustedSources/"+i2,schemaPath:"#/properties/identity/properties/trustedSources/items/required",keyword:"required",params:{missingProperty:"subject"},message:"must have required property 'subject'"};if(vErrors===null){vErrors=[err105]}else{vErrors.push(err105)}errors++}if(data27.audience===void 0){const err106={instancePath:instancePath+"/identity/trustedSources/"+i2,schemaPath:"#/properties/identity/properties/trustedSources/items/required",keyword:"required",params:{missingProperty:"audience"},message:"must have required property 'audience'"};if(vErrors===null){vErrors=[err106]}else{vErrors.push(err106)}errors++}if(data27.algorithms===void 0){const err107={instancePath:instancePath+"/identity/trustedSources/"+i2,schemaPath:"#/properties/identity/properties/trustedSources/items/required",keyword:"required",params:{missingProperty:"algorithms"},message:"must have required property 'algorithms'"};if(vErrors===null){vErrors=[err107]}else{vErrors.push(err107)}errors++}if(data27.jwksUri===void 0){const err108={instancePath:instancePath+"/identity/trustedSources/"+i2,schemaPath:"#/properties/identity/properties/trustedSources/items/required",keyword:"required",params:{missingProperty:"jwksUri"},message:"must have required property 'jwksUri'"};if(vErrors===null){vErrors=[err108]}else{vErrors.push(err108)}errors++}if(data27.publicSnapshotFile===void 0){const err109={instancePath:instancePath+"/identity/trustedSources/"+i2,schemaPath:"#/properties/identity/properties/trustedSources/items/required",keyword:"required",params:{missingProperty:"publicSnapshotFile"},message:"must have required property 'publicSnapshotFile'"};if(vErrors===null){vErrors=[err109]}else{vErrors.push(err109)}errors++}for(const key4 in data27){if(!(key4==="source"||key4==="serviceRef"||key4==="issuer"||key4==="subject"||key4==="audience"||key4==="algorithms"||key4==="jwksUri"||key4==="publicSnapshotFile")){const err110={instancePath:instancePath+"/identity/trustedSources/"+i2,schemaPath:"#/properties/identity/properties/trustedSources/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key4},message:"must NOT have additional properties"};if(vErrors===null){vErrors=[err110]}else{vErrors.push(err110)}errors++}}if(data27.source!==void 0){let data28=data27.source;if(typeof data28==="string"){if(func1(data28)>2048){const err111={instancePath:instancePath+"/identity/trustedSources/"+i2+"/source",schemaPath:"#/properties/identity/properties/trustedSources/items/properties/source/maxLength",keyword:"maxLength",params:{limit:2048},message:"must NOT have more than 2048 characters"};if(vErrors===null){vErrors=[err111]}else{vErrors.push(err111)}errors++}if(!formats0(data28)){const err112={instancePath:instancePath+"/identity/trustedSources/"+i2+"/source",schemaPath:"#/properties/identity/properties/trustedSources/items/properties/source/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};if(vErrors===null){vErrors=[err112]}else{vErrors.push(err112)}errors++}}else{const err113={instancePath:instancePath+"/identity/trustedSources/"+i2+"/source",schemaPath:"#/properties/identity/properties/trustedSources/items/properties/source/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err113]}else{vErrors.push(err113)}errors++}}if(data27.serviceRef!==void 0){let data29=data27.serviceRef;if(typeof data29==="string"){if(func1(data29)>256){const err114={instancePath:instancePath+"/identity/trustedSources/"+i2+"/serviceRef",schemaPath:"#/$defs/ref/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err114]}else{vErrors.push(err114)}errors++}if(func1(data29)<1){const err115={instancePath:instancePath+"/identity/trustedSources/"+i2+"/serviceRef",schemaPath:"#/$defs/ref/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err115]}else{vErrors.push(err115)}errors++}if(!pattern119.test(data29)){const err116={instancePath:instancePath+"/identity/trustedSources/"+i2+"/serviceRef",schemaPath:"#/$defs/ref/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u0020\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u0020\\u007f]+$"'};if(vErrors===null){vErrors=[err116]}else{vErrors.push(err116)}errors++}}else{const err117={instancePath:instancePath+"/identity/trustedSources/"+i2+"/serviceRef",schemaPath:"#/$defs/ref/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err117]}else{vErrors.push(err117)}errors++}}if(data27.issuer!==void 0){let data30=data27.issuer;if(typeof data30==="string"){if(func1(data30)>2048){const err118={instancePath:instancePath+"/identity/trustedSources/"+i2+"/issuer",schemaPath:"#/$defs/issuer/maxLength",keyword:"maxLength",params:{limit:2048},message:"must NOT have more than 2048 characters"};if(vErrors===null){vErrors=[err118]}else{vErrors.push(err118)}errors++}if(func1(data30)<1){const err119={instancePath:instancePath+"/identity/trustedSources/"+i2+"/issuer",schemaPath:"#/$defs/issuer/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err119]}else{vErrors.push(err119)}errors++}if(!formats0(data30)){const err120={instancePath:instancePath+"/identity/trustedSources/"+i2+"/issuer",schemaPath:"#/$defs/issuer/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};if(vErrors===null){vErrors=[err120]}else{vErrors.push(err120)}errors++}}else{const err121={instancePath:instancePath+"/identity/trustedSources/"+i2+"/issuer",schemaPath:"#/$defs/issuer/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err121]}else{vErrors.push(err121)}errors++}}if(data27.subject!==void 0){let data31=data27.subject;if(typeof data31==="string"){if(func1(data31)>256){const err122={instancePath:instancePath+"/identity/trustedSources/"+i2+"/subject",schemaPath:"#/$defs/ref/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err122]}else{vErrors.push(err122)}errors++}if(func1(data31)<1){const err123={instancePath:instancePath+"/identity/trustedSources/"+i2+"/subject",schemaPath:"#/$defs/ref/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err123]}else{vErrors.push(err123)}errors++}if(!pattern119.test(data31)){const err124={instancePath:instancePath+"/identity/trustedSources/"+i2+"/subject",schemaPath:"#/$defs/ref/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u0020\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u0020\\u007f]+$"'};if(vErrors===null){vErrors=[err124]}else{vErrors.push(err124)}errors++}}else{const err125={instancePath:instancePath+"/identity/trustedSources/"+i2+"/subject",schemaPath:"#/$defs/ref/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err125]}else{vErrors.push(err125)}errors++}}if(data27.audience!==void 0){let data32=data27.audience;if(typeof data32==="string"){if(func1(data32)>256){const err126={instancePath:instancePath+"/identity/trustedSources/"+i2+"/audience",schemaPath:"#/$defs/ref/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err126]}else{vErrors.push(err126)}errors++}if(func1(data32)<1){const err127={instancePath:instancePath+"/identity/trustedSources/"+i2+"/audience",schemaPath:"#/$defs/ref/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err127]}else{vErrors.push(err127)}errors++}if(!pattern119.test(data32)){const err128={instancePath:instancePath+"/identity/trustedSources/"+i2+"/audience",schemaPath:"#/$defs/ref/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u0020\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u0020\\u007f]+$"'};if(vErrors===null){vErrors=[err128]}else{vErrors.push(err128)}errors++}}else{const err129={instancePath:instancePath+"/identity/trustedSources/"+i2+"/audience",schemaPath:"#/$defs/ref/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err129]}else{vErrors.push(err129)}errors++}}if(data27.algorithms!==void 0){let data33=data27.algorithms;if(Array.isArray(data33)){if(data33.length>4){const err130={instancePath:instancePath+"/identity/trustedSources/"+i2+"/algorithms",schemaPath:"#/properties/identity/properties/trustedSources/items/properties/algorithms/maxItems",keyword:"maxItems",params:{limit:4},message:"must NOT have more than 4 items"};if(vErrors===null){vErrors=[err130]}else{vErrors.push(err130)}errors++}if(data33.length<1){const err131={instancePath:instancePath+"/identity/trustedSources/"+i2+"/algorithms",schemaPath:"#/properties/identity/properties/trustedSources/items/properties/algorithms/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};if(vErrors===null){vErrors=[err131]}else{vErrors.push(err131)}errors++}const len2=data33.length;for(let i3=0;i3<len2;i3++){let data34=data33[i3];if(!(data34==="RS256"||data34==="PS256"||data34==="ES256"||data34==="EdDSA")){const err132={instancePath:instancePath+"/identity/trustedSources/"+i2+"/algorithms/"+i3,schemaPath:"#/$defs/algorithm/enum",keyword:"enum",params:{allowedValues:schema62.enum},message:"must be equal to one of the allowed values"};if(vErrors===null){vErrors=[err132]}else{vErrors.push(err132)}errors++}}let i4=data33.length;let j1;if(i4>1){outer1:for(;i4--;){for(j1=i4;j1--;){if(func0(data33[i4],data33[j1])){const err133={instancePath:instancePath+"/identity/trustedSources/"+i2+"/algorithms",schemaPath:"#/properties/identity/properties/trustedSources/items/properties/algorithms/uniqueItems",keyword:"uniqueItems",params:{i:i4,j:j1},message:"must NOT have duplicate items (items ## "+j1+" and "+i4+" are identical)"};if(vErrors===null){vErrors=[err133]}else{vErrors.push(err133)}errors++;break outer1}}}}}else{const err134={instancePath:instancePath+"/identity/trustedSources/"+i2+"/algorithms",schemaPath:"#/properties/identity/properties/trustedSources/items/properties/algorithms/type",keyword:"type",params:{type:"array"},message:"must be array"};if(vErrors===null){vErrors=[err134]}else{vErrors.push(err134)}errors++}}if(data27.jwksUri!==void 0){let data35=data27.jwksUri;if(typeof data35==="string"){if(func1(data35)>2048){const err135={instancePath:instancePath+"/identity/trustedSources/"+i2+"/jwksUri",schemaPath:"#/$defs/issuer/maxLength",keyword:"maxLength",params:{limit:2048},message:"must NOT have more than 2048 characters"};if(vErrors===null){vErrors=[err135]}else{vErrors.push(err135)}errors++}if(func1(data35)<1){const err136={instancePath:instancePath+"/identity/trustedSources/"+i2+"/jwksUri",schemaPath:"#/$defs/issuer/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err136]}else{vErrors.push(err136)}errors++}if(!formats0(data35)){const err137={instancePath:instancePath+"/identity/trustedSources/"+i2+"/jwksUri",schemaPath:"#/$defs/issuer/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};if(vErrors===null){vErrors=[err137]}else{vErrors.push(err137)}errors++}}else{const err138={instancePath:instancePath+"/identity/trustedSources/"+i2+"/jwksUri",schemaPath:"#/$defs/issuer/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err138]}else{vErrors.push(err138)}errors++}}if(data27.publicSnapshotFile!==void 0){let data36=data27.publicSnapshotFile;if(typeof data36==="string"){if(func1(data36)>4096){const err139={instancePath:instancePath+"/identity/trustedSources/"+i2+"/publicSnapshotFile",schemaPath:"#/$defs/file/maxLength",keyword:"maxLength",params:{limit:4096},message:"must NOT have more than 4096 characters"};if(vErrors===null){vErrors=[err139]}else{vErrors.push(err139)}errors++}if(func1(data36)<1){const err140={instancePath:instancePath+"/identity/trustedSources/"+i2+"/publicSnapshotFile",schemaPath:"#/$defs/file/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err140]}else{vErrors.push(err140)}errors++}}else{const err141={instancePath:instancePath+"/identity/trustedSources/"+i2+"/publicSnapshotFile",schemaPath:"#/$defs/file/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err141]}else{vErrors.push(err141)}errors++}}}else{const err142={instancePath:instancePath+"/identity/trustedSources/"+i2,schemaPath:"#/properties/identity/properties/trustedSources/items/type",keyword:"type",params:{type:"object"},message:"must be object"};if(vErrors===null){vErrors=[err142]}else{vErrors.push(err142)}errors++}}}else{const err143={instancePath:instancePath+"/identity/trustedSources",schemaPath:"#/properties/identity/properties/trustedSources/type",keyword:"type",params:{type:"array"},message:"must be array"};if(vErrors===null){vErrors=[err143]}else{vErrors.push(err143)}errors++}}}else{const err144={instancePath:instancePath+"/identity",schemaPath:"#/properties/identity/type",keyword:"type",params:{type:"object"},message:"must be object"};if(vErrors===null){vErrors=[err144]}else{vErrors.push(err144)}errors++}}if(data.publisher!==void 0){let data37=data.publisher;const _errs98=errors;let valid34=false;let passing1=null;const _errs99=errors;if(data37!==null){const err145={instancePath:instancePath+"/publisher",schemaPath:"#/properties/publisher/oneOf/0/type",keyword:"type",params:{type:"null"},message:"must be null"};if(vErrors===null){vErrors=[err145]}else{vErrors.push(err145)}errors++}var _valid1=_errs99===errors;if(_valid1){valid34=true;passing1=0}const _errs101=errors;if(data37&&typeof data37=="object"&&!Array.isArray(data37)){if(data37.subject===void 0){const err146={instancePath:instancePath+"/publisher",schemaPath:"#/properties/publisher/oneOf/1/required",keyword:"required",params:{missingProperty:"subject"},message:"must have required property 'subject'"};if(vErrors===null){vErrors=[err146]}else{vErrors.push(err146)}errors++}if(data37.expectedStream===void 0){const err147={instancePath:instancePath+"/publisher",schemaPath:"#/properties/publisher/oneOf/1/required",keyword:"required",params:{missingProperty:"expectedStream"},message:"must have required property 'expectedStream'"};if(vErrors===null){vErrors=[err147]}else{vErrors.push(err147)}errors++}for(const key5 in data37){if(!(key5==="subject"||key5==="expectedStream"||key5==="audienceRoutes")){const err148={instancePath:instancePath+"/publisher",schemaPath:"#/properties/publisher/oneOf/1/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key5},message:"must NOT have additional properties"};if(vErrors===null){vErrors=[err148]}else{vErrors.push(err148)}errors++}}if(data37.subject!==void 0){let data38=data37.subject;if(typeof data38==="string"){if(func1(data38)>256){const err149={instancePath:instancePath+"/publisher/subject",schemaPath:"#/$defs/ref/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err149]}else{vErrors.push(err149)}errors++}if(func1(data38)<1){const err150={instancePath:instancePath+"/publisher/subject",schemaPath:"#/$defs/ref/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err150]}else{vErrors.push(err150)}errors++}if(!pattern119.test(data38)){const err151={instancePath:instancePath+"/publisher/subject",schemaPath:"#/$defs/ref/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u0020\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u0020\\u007f]+$"'};if(vErrors===null){vErrors=[err151]}else{vErrors.push(err151)}errors++}}else{const err152={instancePath:instancePath+"/publisher/subject",schemaPath:"#/$defs/ref/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err152]}else{vErrors.push(err152)}errors++}}if(data37.expectedStream!==void 0){let data39=data37.expectedStream;if(typeof data39==="string"){if(func1(data39)>128){const err153={instancePath:instancePath+"/publisher/expectedStream",schemaPath:"#/$defs/name/maxLength",keyword:"maxLength",params:{limit:128},message:"must NOT have more than 128 characters"};if(vErrors===null){vErrors=[err153]}else{vErrors.push(err153)}errors++}if(func1(data39)<1){const err154={instancePath:instancePath+"/publisher/expectedStream",schemaPath:"#/$defs/name/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err154]}else{vErrors.push(err154)}errors++}if(!pattern129.test(data39)){const err155={instancePath:instancePath+"/publisher/expectedStream",schemaPath:"#/$defs/name/pattern",keyword:"pattern",params:{pattern:"^[A-Za-z0-9_-]+$"},message:'must match pattern "^[A-Za-z0-9_-]+$"'};if(vErrors===null){vErrors=[err155]}else{vErrors.push(err155)}errors++}}else{const err156={instancePath:instancePath+"/publisher/expectedStream",schemaPath:"#/$defs/name/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err156]}else{vErrors.push(err156)}errors++}}if(data37.audienceRoutes!==void 0){let data40=data37.audienceRoutes;if(Array.isArray(data40)){if(data40.length>32){const err157={instancePath:instancePath+"/publisher/audienceRoutes",schemaPath:"#/properties/publisher/oneOf/1/properties/audienceRoutes/maxItems",keyword:"maxItems",params:{limit:32},message:"must NOT have more than 32 items"};if(vErrors===null){vErrors=[err157]}else{vErrors.push(err157)}errors++}if(data40.length<1){const err158={instancePath:instancePath+"/publisher/audienceRoutes",schemaPath:"#/properties/publisher/oneOf/1/properties/audienceRoutes/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};if(vErrors===null){vErrors=[err158]}else{vErrors.push(err158)}errors++}const len3=data40.length;for(let i5=0;i5<len3;i5++){let data41=data40[i5];if(data41&&typeof data41=="object"&&!Array.isArray(data41)){if(data41.audience===void 0){const err159={instancePath:instancePath+"/publisher/audienceRoutes/"+i5,schemaPath:"#/properties/publisher/oneOf/1/properties/audienceRoutes/items/required",keyword:"required",params:{missingProperty:"audience"},message:"must have required property 'audience'"};if(vErrors===null){vErrors=[err159]}else{vErrors.push(err159)}errors++}if(data41.subject===void 0){const err160={instancePath:instancePath+"/publisher/audienceRoutes/"+i5,schemaPath:"#/properties/publisher/oneOf/1/properties/audienceRoutes/items/required",keyword:"required",params:{missingProperty:"subject"},message:"must have required property 'subject'"};if(vErrors===null){vErrors=[err160]}else{vErrors.push(err160)}errors++}if(data41.expectedStream===void 0){const err161={instancePath:instancePath+"/publisher/audienceRoutes/"+i5,schemaPath:"#/properties/publisher/oneOf/1/properties/audienceRoutes/items/required",keyword:"required",params:{missingProperty:"expectedStream"},message:"must have required property 'expectedStream'"};if(vErrors===null){vErrors=[err161]}else{vErrors.push(err161)}errors++}for(const key6 in data41){if(!(key6==="audience"||key6==="subject"||key6==="expectedStream")){const err162={instancePath:instancePath+"/publisher/audienceRoutes/"+i5,schemaPath:"#/properties/publisher/oneOf/1/properties/audienceRoutes/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key6},message:"must NOT have additional properties"};if(vErrors===null){vErrors=[err162]}else{vErrors.push(err162)}errors++}}if(data41.audience!==void 0){let data42=data41.audience;if(typeof data42==="string"){if(func1(data42)>256){const err163={instancePath:instancePath+"/publisher/audienceRoutes/"+i5+"/audience",schemaPath:"#/$defs/ref/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err163]}else{vErrors.push(err163)}errors++}if(func1(data42)<1){const err164={instancePath:instancePath+"/publisher/audienceRoutes/"+i5+"/audience",schemaPath:"#/$defs/ref/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err164]}else{vErrors.push(err164)}errors++}if(!pattern119.test(data42)){const err165={instancePath:instancePath+"/publisher/audienceRoutes/"+i5+"/audience",schemaPath:"#/$defs/ref/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u0020\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u0020\\u007f]+$"'};if(vErrors===null){vErrors=[err165]}else{vErrors.push(err165)}errors++}}else{const err166={instancePath:instancePath+"/publisher/audienceRoutes/"+i5+"/audience",schemaPath:"#/$defs/ref/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err166]}else{vErrors.push(err166)}errors++}}if(data41.subject!==void 0){let data43=data41.subject;if(typeof data43==="string"){if(func1(data43)>256){const err167={instancePath:instancePath+"/publisher/audienceRoutes/"+i5+"/subject",schemaPath:"#/$defs/ref/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err167]}else{vErrors.push(err167)}errors++}if(func1(data43)<1){const err168={instancePath:instancePath+"/publisher/audienceRoutes/"+i5+"/subject",schemaPath:"#/$defs/ref/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err168]}else{vErrors.push(err168)}errors++}if(!pattern119.test(data43)){const err169={instancePath:instancePath+"/publisher/audienceRoutes/"+i5+"/subject",schemaPath:"#/$defs/ref/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u0020\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u0020\\u007f]+$"'};if(vErrors===null){vErrors=[err169]}else{vErrors.push(err169)}errors++}}else{const err170={instancePath:instancePath+"/publisher/audienceRoutes/"+i5+"/subject",schemaPath:"#/$defs/ref/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err170]}else{vErrors.push(err170)}errors++}}if(data41.expectedStream!==void 0){let data44=data41.expectedStream;if(typeof data44==="string"){if(func1(data44)>128){const err171={instancePath:instancePath+"/publisher/audienceRoutes/"+i5+"/expectedStream",schemaPath:"#/$defs/name/maxLength",keyword:"maxLength",params:{limit:128},message:"must NOT have more than 128 characters"};if(vErrors===null){vErrors=[err171]}else{vErrors.push(err171)}errors++}if(func1(data44)<1){const err172={instancePath:instancePath+"/publisher/audienceRoutes/"+i5+"/expectedStream",schemaPath:"#/$defs/name/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err172]}else{vErrors.push(err172)}errors++}if(!pattern129.test(data44)){const err173={instancePath:instancePath+"/publisher/audienceRoutes/"+i5+"/expectedStream",schemaPath:"#/$defs/name/pattern",keyword:"pattern",params:{pattern:"^[A-Za-z0-9_-]+$"},message:'must match pattern "^[A-Za-z0-9_-]+$"'};if(vErrors===null){vErrors=[err173]}else{vErrors.push(err173)}errors++}}else{const err174={instancePath:instancePath+"/publisher/audienceRoutes/"+i5+"/expectedStream",schemaPath:"#/$defs/name/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err174]}else{vErrors.push(err174)}errors++}}}else{const err175={instancePath:instancePath+"/publisher/audienceRoutes/"+i5,schemaPath:"#/properties/publisher/oneOf/1/properties/audienceRoutes/items/type",keyword:"type",params:{type:"object"},message:"must be object"};if(vErrors===null){vErrors=[err175]}else{vErrors.push(err175)}errors++}}}else{const err176={instancePath:instancePath+"/publisher/audienceRoutes",schemaPath:"#/properties/publisher/oneOf/1/properties/audienceRoutes/type",keyword:"type",params:{type:"array"},message:"must be array"};if(vErrors===null){vErrors=[err176]}else{vErrors.push(err176)}errors++}}}else{const err177={instancePath:instancePath+"/publisher",schemaPath:"#/properties/publisher/oneOf/1/type",keyword:"type",params:{type:"object"},message:"must be object"};if(vErrors===null){vErrors=[err177]}else{vErrors.push(err177)}errors++}var _valid1=_errs101===errors;if(_valid1&&valid34){valid34=false;passing1=[passing1,1]}else{if(_valid1){valid34=true;passing1=1}}if(!valid34){const err178={instancePath:instancePath+"/publisher",schemaPath:"#/properties/publisher/oneOf",keyword:"oneOf",params:{passingSchemas:passing1},message:"must match exactly one schema in oneOf"};if(vErrors===null){vErrors=[err178]}else{vErrors.push(err178)}errors++}else{errors=_errs98;if(vErrors!==null){if(_errs98){vErrors.length=_errs98}else{vErrors=null}}}}if(data.consumer!==void 0){let data45=data.consumer;const _errs125=errors;let valid44=false;let passing2=null;const _errs126=errors;if(data45!==null){const err179={instancePath:instancePath+"/consumer",schemaPath:"#/properties/consumer/oneOf/0/type",keyword:"type",params:{type:"null"},message:"must be null"};if(vErrors===null){vErrors=[err179]}else{vErrors.push(err179)}errors++}var _valid2=_errs126===errors;if(_valid2){valid44=true;passing2=0}const _errs128=errors;if(data45&&typeof data45=="object"&&!Array.isArray(data45)){if(data45.consumerRef===void 0){const err180={instancePath:instancePath+"/consumer",schemaPath:"#/properties/consumer/oneOf/1/required",keyword:"required",params:{missingProperty:"consumerRef"},message:"must have required property 'consumerRef'"};if(vErrors===null){vErrors=[err180]}else{vErrors.push(err180)}errors++}if(data45.stream===void 0){const err181={instancePath:instancePath+"/consumer",schemaPath:"#/properties/consumer/oneOf/1/required",keyword:"required",params:{missingProperty:"stream"},message:"must have required property 'stream'"};if(vErrors===null){vErrors=[err181]}else{vErrors.push(err181)}errors++}if(data45.durableName===void 0){const err182={instancePath:instancePath+"/consumer",schemaPath:"#/properties/consumer/oneOf/1/required",keyword:"required",params:{missingProperty:"durableName"},message:"must have required property 'durableName'"};if(vErrors===null){vErrors=[err182]}else{vErrors.push(err182)}errors++}if(data45.subject===void 0){const err183={instancePath:instancePath+"/consumer",schemaPath:"#/properties/consumer/oneOf/1/required",keyword:"required",params:{missingProperty:"subject"},message:"must have required property 'subject'"};if(vErrors===null){vErrors=[err183]}else{vErrors.push(err183)}errors++}if(data45.batchSize===void 0){const err184={instancePath:instancePath+"/consumer",schemaPath:"#/properties/consumer/oneOf/1/required",keyword:"required",params:{missingProperty:"batchSize"},message:"must have required property 'batchSize'"};if(vErrors===null){vErrors=[err184]}else{vErrors.push(err184)}errors++}if(data45.fetchExpiresMs===void 0){const err185={instancePath:instancePath+"/consumer",schemaPath:"#/properties/consumer/oneOf/1/required",keyword:"required",params:{missingProperty:"fetchExpiresMs"},message:"must have required property 'fetchExpiresMs'"};if(vErrors===null){vErrors=[err185]}else{vErrors.push(err185)}errors++}for(const key7 in data45){if(!(key7==="consumerRef"||key7==="stream"||key7==="durableName"||key7==="subject"||key7==="batchSize"||key7==="fetchExpiresMs"||key7==="additionalBindings")){const err186={instancePath:instancePath+"/consumer",schemaPath:"#/properties/consumer/oneOf/1/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key7},message:"must NOT have additional properties"};if(vErrors===null){vErrors=[err186]}else{vErrors.push(err186)}errors++}}if(data45.consumerRef!==void 0){let data46=data45.consumerRef;if(typeof data46==="string"){if(func1(data46)>256){const err187={instancePath:instancePath+"/consumer/consumerRef",schemaPath:"#/$defs/ref/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err187]}else{vErrors.push(err187)}errors++}if(func1(data46)<1){const err188={instancePath:instancePath+"/consumer/consumerRef",schemaPath:"#/$defs/ref/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err188]}else{vErrors.push(err188)}errors++}if(!pattern119.test(data46)){const err189={instancePath:instancePath+"/consumer/consumerRef",schemaPath:"#/$defs/ref/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u0020\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u0020\\u007f]+$"'};if(vErrors===null){vErrors=[err189]}else{vErrors.push(err189)}errors++}}else{const err190={instancePath:instancePath+"/consumer/consumerRef",schemaPath:"#/$defs/ref/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err190]}else{vErrors.push(err190)}errors++}}if(data45.stream!==void 0){let data47=data45.stream;if(typeof data47==="string"){if(func1(data47)>128){const err191={instancePath:instancePath+"/consumer/stream",schemaPath:"#/$defs/name/maxLength",keyword:"maxLength",params:{limit:128},message:"must NOT have more than 128 characters"};if(vErrors===null){vErrors=[err191]}else{vErrors.push(err191)}errors++}if(func1(data47)<1){const err192={instancePath:instancePath+"/consumer/stream",schemaPath:"#/$defs/name/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err192]}else{vErrors.push(err192)}errors++}if(!pattern129.test(data47)){const err193={instancePath:instancePath+"/consumer/stream",schemaPath:"#/$defs/name/pattern",keyword:"pattern",params:{pattern:"^[A-Za-z0-9_-]+$"},message:'must match pattern "^[A-Za-z0-9_-]+$"'};if(vErrors===null){vErrors=[err193]}else{vErrors.push(err193)}errors++}}else{const err194={instancePath:instancePath+"/consumer/stream",schemaPath:"#/$defs/name/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err194]}else{vErrors.push(err194)}errors++}}if(data45.durableName!==void 0){let data48=data45.durableName;if(typeof data48==="string"){if(func1(data48)>128){const err195={instancePath:instancePath+"/consumer/durableName",schemaPath:"#/$defs/name/maxLength",keyword:"maxLength",params:{limit:128},message:"must NOT have more than 128 characters"};if(vErrors===null){vErrors=[err195]}else{vErrors.push(err195)}errors++}if(func1(data48)<1){const err196={instancePath:instancePath+"/consumer/durableName",schemaPath:"#/$defs/name/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err196]}else{vErrors.push(err196)}errors++}if(!pattern129.test(data48)){const err197={instancePath:instancePath+"/consumer/durableName",schemaPath:"#/$defs/name/pattern",keyword:"pattern",params:{pattern:"^[A-Za-z0-9_-]+$"},message:'must match pattern "^[A-Za-z0-9_-]+$"'};if(vErrors===null){vErrors=[err197]}else{vErrors.push(err197)}errors++}}else{const err198={instancePath:instancePath+"/consumer/durableName",schemaPath:"#/$defs/name/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err198]}else{vErrors.push(err198)}errors++}}if(data45.subject!==void 0){let data49=data45.subject;if(typeof data49==="string"){if(func1(data49)>256){const err199={instancePath:instancePath+"/consumer/subject",schemaPath:"#/$defs/ref/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err199]}else{vErrors.push(err199)}errors++}if(func1(data49)<1){const err200={instancePath:instancePath+"/consumer/subject",schemaPath:"#/$defs/ref/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err200]}else{vErrors.push(err200)}errors++}if(!pattern119.test(data49)){const err201={instancePath:instancePath+"/consumer/subject",schemaPath:"#/$defs/ref/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u0020\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u0020\\u007f]+$"'};if(vErrors===null){vErrors=[err201]}else{vErrors.push(err201)}errors++}}else{const err202={instancePath:instancePath+"/consumer/subject",schemaPath:"#/$defs/ref/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err202]}else{vErrors.push(err202)}errors++}}if(data45.batchSize!==void 0){let data50=data45.batchSize;if(!(typeof data50=="number"&&!(data50%1)&&!isNaN(data50)&&isFinite(data50))){const err203={instancePath:instancePath+"/consumer/batchSize",schemaPath:"#/properties/consumer/oneOf/1/properties/batchSize/type",keyword:"type",params:{type:"integer"},message:"must be integer"};if(vErrors===null){vErrors=[err203]}else{vErrors.push(err203)}errors++}if(typeof data50=="number"&&isFinite(data50)){if(data50>100||isNaN(data50)){const err204={instancePath:instancePath+"/consumer/batchSize",schemaPath:"#/properties/consumer/oneOf/1/properties/batchSize/maximum",keyword:"maximum",params:{comparison:"<=",limit:100},message:"must be <= 100"};if(vErrors===null){vErrors=[err204]}else{vErrors.push(err204)}errors++}if(data50<1||isNaN(data50)){const err205={instancePath:instancePath+"/consumer/batchSize",schemaPath:"#/properties/consumer/oneOf/1/properties/batchSize/minimum",keyword:"minimum",params:{comparison:">=",limit:1},message:"must be >= 1"};if(vErrors===null){vErrors=[err205]}else{vErrors.push(err205)}errors++}}}if(data45.fetchExpiresMs!==void 0){let data51=data45.fetchExpiresMs;if(!(typeof data51=="number"&&!(data51%1)&&!isNaN(data51)&&isFinite(data51))){const err206={instancePath:instancePath+"/consumer/fetchExpiresMs",schemaPath:"#/properties/consumer/oneOf/1/properties/fetchExpiresMs/type",keyword:"type",params:{type:"integer"},message:"must be integer"};if(vErrors===null){vErrors=[err206]}else{vErrors.push(err206)}errors++}if(typeof data51=="number"&&isFinite(data51)){if(data51>3e4||isNaN(data51)){const err207={instancePath:instancePath+"/consumer/fetchExpiresMs",schemaPath:"#/properties/consumer/oneOf/1/properties/fetchExpiresMs/maximum",keyword:"maximum",params:{comparison:"<=",limit:3e4},message:"must be <= 30000"};if(vErrors===null){vErrors=[err207]}else{vErrors.push(err207)}errors++}if(data51<1e3||isNaN(data51)){const err208={instancePath:instancePath+"/consumer/fetchExpiresMs",schemaPath:"#/properties/consumer/oneOf/1/properties/fetchExpiresMs/minimum",keyword:"minimum",params:{comparison:">=",limit:1e3},message:"must be >= 1000"};if(vErrors===null){vErrors=[err208]}else{vErrors.push(err208)}errors++}}}if(data45.additionalBindings!==void 0){let data52=data45.additionalBindings;if(Array.isArray(data52)){if(data52.length>7){const err209={instancePath:instancePath+"/consumer/additionalBindings",schemaPath:"#/properties/consumer/oneOf/1/properties/additionalBindings/maxItems",keyword:"maxItems",params:{limit:7},message:"must NOT have more than 7 items"};if(vErrors===null){vErrors=[err209]}else{vErrors.push(err209)}errors++}if(data52.length<1){const err210={instancePath:instancePath+"/consumer/additionalBindings",schemaPath:"#/properties/consumer/oneOf/1/properties/additionalBindings/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};if(vErrors===null){vErrors=[err210]}else{vErrors.push(err210)}errors++}const len4=data52.length;for(let i6=0;i6<len4;i6++){let data53=data52[i6];if(data53&&typeof data53=="object"&&!Array.isArray(data53)){if(data53.stream===void 0){const err211={instancePath:instancePath+"/consumer/additionalBindings/"+i6,schemaPath:"#/properties/consumer/oneOf/1/properties/additionalBindings/items/required",keyword:"required",params:{missingProperty:"stream"},message:"must have required property 'stream'"};if(vErrors===null){vErrors=[err211]}else{vErrors.push(err211)}errors++}if(data53.durableName===void 0){const err212={instancePath:instancePath+"/consumer/additionalBindings/"+i6,schemaPath:"#/properties/consumer/oneOf/1/properties/additionalBindings/items/required",keyword:"required",params:{missingProperty:"durableName"},message:"must have required property 'durableName'"};if(vErrors===null){vErrors=[err212]}else{vErrors.push(err212)}errors++}if(data53.subject===void 0){const err213={instancePath:instancePath+"/consumer/additionalBindings/"+i6,schemaPath:"#/properties/consumer/oneOf/1/properties/additionalBindings/items/required",keyword:"required",params:{missingProperty:"subject"},message:"must have required property 'subject'"};if(vErrors===null){vErrors=[err213]}else{vErrors.push(err213)}errors++}for(const key8 in data53){if(!(key8==="stream"||key8==="durableName"||key8==="subject")){const err214={instancePath:instancePath+"/consumer/additionalBindings/"+i6,schemaPath:"#/properties/consumer/oneOf/1/properties/additionalBindings/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key8},message:"must NOT have additional properties"};if(vErrors===null){vErrors=[err214]}else{vErrors.push(err214)}errors++}}if(data53.stream!==void 0){let data54=data53.stream;if(typeof data54==="string"){if(func1(data54)>128){const err215={instancePath:instancePath+"/consumer/additionalBindings/"+i6+"/stream",schemaPath:"#/$defs/name/maxLength",keyword:"maxLength",params:{limit:128},message:"must NOT have more than 128 characters"};if(vErrors===null){vErrors=[err215]}else{vErrors.push(err215)}errors++}if(func1(data54)<1){const err216={instancePath:instancePath+"/consumer/additionalBindings/"+i6+"/stream",schemaPath:"#/$defs/name/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err216]}else{vErrors.push(err216)}errors++}if(!pattern129.test(data54)){const err217={instancePath:instancePath+"/consumer/additionalBindings/"+i6+"/stream",schemaPath:"#/$defs/name/pattern",keyword:"pattern",params:{pattern:"^[A-Za-z0-9_-]+$"},message:'must match pattern "^[A-Za-z0-9_-]+$"'};if(vErrors===null){vErrors=[err217]}else{vErrors.push(err217)}errors++}}else{const err218={instancePath:instancePath+"/consumer/additionalBindings/"+i6+"/stream",schemaPath:"#/$defs/name/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err218]}else{vErrors.push(err218)}errors++}}if(data53.durableName!==void 0){let data55=data53.durableName;if(typeof data55==="string"){if(func1(data55)>128){const err219={instancePath:instancePath+"/consumer/additionalBindings/"+i6+"/durableName",schemaPath:"#/$defs/name/maxLength",keyword:"maxLength",params:{limit:128},message:"must NOT have more than 128 characters"};if(vErrors===null){vErrors=[err219]}else{vErrors.push(err219)}errors++}if(func1(data55)<1){const err220={instancePath:instancePath+"/consumer/additionalBindings/"+i6+"/durableName",schemaPath:"#/$defs/name/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err220]}else{vErrors.push(err220)}errors++}if(!pattern129.test(data55)){const err221={instancePath:instancePath+"/consumer/additionalBindings/"+i6+"/durableName",schemaPath:"#/$defs/name/pattern",keyword:"pattern",params:{pattern:"^[A-Za-z0-9_-]+$"},message:'must match pattern "^[A-Za-z0-9_-]+$"'};if(vErrors===null){vErrors=[err221]}else{vErrors.push(err221)}errors++}}else{const err222={instancePath:instancePath+"/consumer/additionalBindings/"+i6+"/durableName",schemaPath:"#/$defs/name/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err222]}else{vErrors.push(err222)}errors++}}if(data53.subject!==void 0){let data56=data53.subject;if(typeof data56==="string"){if(func1(data56)>256){const err223={instancePath:instancePath+"/consumer/additionalBindings/"+i6+"/subject",schemaPath:"#/$defs/ref/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err223]}else{vErrors.push(err223)}errors++}if(func1(data56)<1){const err224={instancePath:instancePath+"/consumer/additionalBindings/"+i6+"/subject",schemaPath:"#/$defs/ref/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err224]}else{vErrors.push(err224)}errors++}if(!pattern119.test(data56)){const err225={instancePath:instancePath+"/consumer/additionalBindings/"+i6+"/subject",schemaPath:"#/$defs/ref/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u0020\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u0020\\u007f]+$"'};if(vErrors===null){vErrors=[err225]}else{vErrors.push(err225)}errors++}}else{const err226={instancePath:instancePath+"/consumer/additionalBindings/"+i6+"/subject",schemaPath:"#/$defs/ref/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err226]}else{vErrors.push(err226)}errors++}}}else{const err227={instancePath:instancePath+"/consumer/additionalBindings/"+i6,schemaPath:"#/properties/consumer/oneOf/1/properties/additionalBindings/items/type",keyword:"type",params:{type:"object"},message:"must be object"};if(vErrors===null){vErrors=[err227]}else{vErrors.push(err227)}errors++}}}else{const err228={instancePath:instancePath+"/consumer/additionalBindings",schemaPath:"#/properties/consumer/oneOf/1/properties/additionalBindings/type",keyword:"type",params:{type:"array"},message:"must be array"};if(vErrors===null){vErrors=[err228]}else{vErrors.push(err228)}errors++}}}else{const err229={instancePath:instancePath+"/consumer",schemaPath:"#/properties/consumer/oneOf/1/type",keyword:"type",params:{type:"object"},message:"must be object"};if(vErrors===null){vErrors=[err229]}else{vErrors.push(err229)}errors++}var _valid2=_errs128===errors;if(_valid2&&valid44){valid44=false;passing2=[passing2,1]}else{if(_valid2){valid44=true;passing2=1}}if(!valid44){const err230={instancePath:instancePath+"/consumer",schemaPath:"#/properties/consumer/oneOf",keyword:"oneOf",params:{passingSchemas:passing2},message:"must match exactly one schema in oneOf"};if(vErrors===null){vErrors=[err230]}else{vErrors.push(err230)}errors++}else{errors=_errs125;if(vErrors!==null){if(_errs125){vErrors.length=_errs125}else{vErrors=null}}}}}else{const err231={instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};if(vErrors===null){vErrors=[err231]}else{vErrors.push(err231)}errors++}validate41.errors=vErrors;return errors===0}validate41.evaluated={props:true,dynamicProps:false,dynamicItems:false};var publicJwksSnapshot=validate42;var schema86={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://eventsdk.dev/schemas/v1/public-jwks-snapshot.schema.json",title:"PublicJwksSnapshot",type:"object",additionalProperties:false,required:["schemaVersion","issuer","jwksUri","fetchedAt","validUntil","jwks"],properties:{schemaVersion:{const:1},issuer:{type:"string",format:"uri",maxLength:2048},jwksUri:{type:"string",format:"uri",maxLength:2048},fetchedAt:{type:"string",format:"date-time"},validUntil:{type:"string",format:"date-time"},jwks:{type:"object",additionalProperties:false,required:["keys"],properties:{keys:{type:"array",minItems:1,maxItems:32,items:{oneOf:[{type:"object",additionalProperties:false,properties:{kty:{const:"RSA"},kid:{type:"string",minLength:1,maxLength:256},alg:{enum:["RS256","PS256"]},use:{const:"sig"},key_ops:{type:"array",minItems:1,maxItems:1,items:{const:"verify"}},ext:{type:"boolean"},x5c:{type:"array",maxItems:8,items:{type:"string",maxLength:8192}},x5t:{type:"string",pattern:"^[A-Za-z0-9_-]+$",maxLength:8192},"x5t#S256":{type:"string",pattern:"^[A-Za-z0-9_-]+$",maxLength:8192},n:{type:"string",pattern:"^[A-Za-z0-9_-]+$",maxLength:8192},e:{type:"string",pattern:"^[A-Za-z0-9_-]+$",maxLength:8192}},required:["kty","kid","n","e"]},{type:"object",additionalProperties:false,properties:{kty:{const:"EC"},kid:{type:"string",minLength:1,maxLength:256},alg:{enum:["ES256"]},use:{const:"sig"},key_ops:{type:"array",minItems:1,maxItems:1,items:{const:"verify"}},ext:{type:"boolean"},x5c:{type:"array",maxItems:8,items:{type:"string",maxLength:8192}},x5t:{type:"string",pattern:"^[A-Za-z0-9_-]+$",maxLength:8192},"x5t#S256":{type:"string",pattern:"^[A-Za-z0-9_-]+$",maxLength:8192},crv:{const:"P-256"},x:{type:"string",pattern:"^[A-Za-z0-9_-]+$",maxLength:8192},y:{type:"string",pattern:"^[A-Za-z0-9_-]+$",maxLength:8192}},required:["kty","kid","crv","x","y"]},{type:"object",additionalProperties:false,properties:{kty:{const:"OKP"},kid:{type:"string",minLength:1,maxLength:256},alg:{enum:["EdDSA"]},use:{const:"sig"},key_ops:{type:"array",minItems:1,maxItems:1,items:{const:"verify"}},ext:{type:"boolean"},x5c:{type:"array",maxItems:8,items:{type:"string",maxLength:8192}},x5t:{type:"string",pattern:"^[A-Za-z0-9_-]+$",maxLength:8192},"x5t#S256":{type:"string",pattern:"^[A-Za-z0-9_-]+$",maxLength:8192},crv:{const:"Ed25519"},x:{type:"string",pattern:"^[A-Za-z0-9_-]+$",maxLength:8192}},required:["kty","kid","crv","x"]}]}}}}}};function validate42(data,{instancePath="",parentData,parentDataProperty,rootData=data,dynamicAnchors={}}={}){let vErrors=null;let errors=0;const evaluated0=validate42.evaluated;if(evaluated0.dynamicProps){evaluated0.props=void 0}if(evaluated0.dynamicItems){evaluated0.items=void 0}if(data&&typeof data=="object"&&!Array.isArray(data)){if(data.schemaVersion===void 0){const err0={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"schemaVersion"},message:"must have required property 'schemaVersion'"};if(vErrors===null){vErrors=[err0]}else{vErrors.push(err0)}errors++}if(data.issuer===void 0){const err1={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"issuer"},message:"must have required property 'issuer'"};if(vErrors===null){vErrors=[err1]}else{vErrors.push(err1)}errors++}if(data.jwksUri===void 0){const err2={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"jwksUri"},message:"must have required property 'jwksUri'"};if(vErrors===null){vErrors=[err2]}else{vErrors.push(err2)}errors++}if(data.fetchedAt===void 0){const err3={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"fetchedAt"},message:"must have required property 'fetchedAt'"};if(vErrors===null){vErrors=[err3]}else{vErrors.push(err3)}errors++}if(data.validUntil===void 0){const err4={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"validUntil"},message:"must have required property 'validUntil'"};if(vErrors===null){vErrors=[err4]}else{vErrors.push(err4)}errors++}if(data.jwks===void 0){const err5={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"jwks"},message:"must have required property 'jwks'"};if(vErrors===null){vErrors=[err5]}else{vErrors.push(err5)}errors++}for(const key0 in data){if(!(key0==="schemaVersion"||key0==="issuer"||key0==="jwksUri"||key0==="fetchedAt"||key0==="validUntil"||key0==="jwks")){const err6={instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key0},message:"must NOT have additional properties"};if(vErrors===null){vErrors=[err6]}else{vErrors.push(err6)}errors++}}if(data.schemaVersion!==void 0){if(1!==data.schemaVersion){const err7={instancePath:instancePath+"/schemaVersion",schemaPath:"#/properties/schemaVersion/const",keyword:"const",params:{allowedValue:1},message:"must be equal to constant"};if(vErrors===null){vErrors=[err7]}else{vErrors.push(err7)}errors++}}if(data.issuer!==void 0){let data1=data.issuer;if(typeof data1==="string"){if(func1(data1)>2048){const err8={instancePath:instancePath+"/issuer",schemaPath:"#/properties/issuer/maxLength",keyword:"maxLength",params:{limit:2048},message:"must NOT have more than 2048 characters"};if(vErrors===null){vErrors=[err8]}else{vErrors.push(err8)}errors++}if(!formats0(data1)){const err9={instancePath:instancePath+"/issuer",schemaPath:"#/properties/issuer/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};if(vErrors===null){vErrors=[err9]}else{vErrors.push(err9)}errors++}}else{const err10={instancePath:instancePath+"/issuer",schemaPath:"#/properties/issuer/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err10]}else{vErrors.push(err10)}errors++}}if(data.jwksUri!==void 0){let data2=data.jwksUri;if(typeof data2==="string"){if(func1(data2)>2048){const err11={instancePath:instancePath+"/jwksUri",schemaPath:"#/properties/jwksUri/maxLength",keyword:"maxLength",params:{limit:2048},message:"must NOT have more than 2048 characters"};if(vErrors===null){vErrors=[err11]}else{vErrors.push(err11)}errors++}if(!formats0(data2)){const err12={instancePath:instancePath+"/jwksUri",schemaPath:"#/properties/jwksUri/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};if(vErrors===null){vErrors=[err12]}else{vErrors.push(err12)}errors++}}else{const err13={instancePath:instancePath+"/jwksUri",schemaPath:"#/properties/jwksUri/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err13]}else{vErrors.push(err13)}errors++}}if(data.fetchedAt!==void 0){let data3=data.fetchedAt;if(typeof data3==="string"){if(!formats2.validate(data3)){const err14={instancePath:instancePath+"/fetchedAt",schemaPath:"#/properties/fetchedAt/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};if(vErrors===null){vErrors=[err14]}else{vErrors.push(err14)}errors++}}else{const err15={instancePath:instancePath+"/fetchedAt",schemaPath:"#/properties/fetchedAt/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err15]}else{vErrors.push(err15)}errors++}}if(data.validUntil!==void 0){let data4=data.validUntil;if(typeof data4==="string"){if(!formats2.validate(data4)){const err16={instancePath:instancePath+"/validUntil",schemaPath:"#/properties/validUntil/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};if(vErrors===null){vErrors=[err16]}else{vErrors.push(err16)}errors++}}else{const err17={instancePath:instancePath+"/validUntil",schemaPath:"#/properties/validUntil/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err17]}else{vErrors.push(err17)}errors++}}if(data.jwks!==void 0){let data5=data.jwks;if(data5&&typeof data5=="object"&&!Array.isArray(data5)){if(data5.keys===void 0){const err18={instancePath:instancePath+"/jwks",schemaPath:"#/properties/jwks/required",keyword:"required",params:{missingProperty:"keys"},message:"must have required property 'keys'"};if(vErrors===null){vErrors=[err18]}else{vErrors.push(err18)}errors++}for(const key1 in data5){if(!(key1==="keys")){const err19={instancePath:instancePath+"/jwks",schemaPath:"#/properties/jwks/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key1},message:"must NOT have additional properties"};if(vErrors===null){vErrors=[err19]}else{vErrors.push(err19)}errors++}}if(data5.keys!==void 0){let data6=data5.keys;if(Array.isArray(data6)){if(data6.length>32){const err20={instancePath:instancePath+"/jwks/keys",schemaPath:"#/properties/jwks/properties/keys/maxItems",keyword:"maxItems",params:{limit:32},message:"must NOT have more than 32 items"};if(vErrors===null){vErrors=[err20]}else{vErrors.push(err20)}errors++}if(data6.length<1){const err21={instancePath:instancePath+"/jwks/keys",schemaPath:"#/properties/jwks/properties/keys/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};if(vErrors===null){vErrors=[err21]}else{vErrors.push(err21)}errors++}const len0=data6.length;for(let i0=0;i0<len0;i0++){let data7=data6[i0];const _errs17=errors;let valid4=false;let passing0=null;const _errs18=errors;if(data7&&typeof data7=="object"&&!Array.isArray(data7)){if(data7.kty===void 0){const err22={instancePath:instancePath+"/jwks/keys/"+i0,schemaPath:"#/properties/jwks/properties/keys/items/oneOf/0/required",keyword:"required",params:{missingProperty:"kty"},message:"must have required property 'kty'"};if(vErrors===null){vErrors=[err22]}else{vErrors.push(err22)}errors++}if(data7.kid===void 0){const err23={instancePath:instancePath+"/jwks/keys/"+i0,schemaPath:"#/properties/jwks/properties/keys/items/oneOf/0/required",keyword:"required",params:{missingProperty:"kid"},message:"must have required property 'kid'"};if(vErrors===null){vErrors=[err23]}else{vErrors.push(err23)}errors++}if(data7.n===void 0){const err24={instancePath:instancePath+"/jwks/keys/"+i0,schemaPath:"#/properties/jwks/properties/keys/items/oneOf/0/required",keyword:"required",params:{missingProperty:"n"},message:"must have required property 'n'"};if(vErrors===null){vErrors=[err24]}else{vErrors.push(err24)}errors++}if(data7.e===void 0){const err25={instancePath:instancePath+"/jwks/keys/"+i0,schemaPath:"#/properties/jwks/properties/keys/items/oneOf/0/required",keyword:"required",params:{missingProperty:"e"},message:"must have required property 'e'"};if(vErrors===null){vErrors=[err25]}else{vErrors.push(err25)}errors++}for(const key2 in data7){if(!func11.call(schema86.properties.jwks.properties.keys.items.oneOf[0].properties,key2)){const err26={instancePath:instancePath+"/jwks/keys/"+i0,schemaPath:"#/properties/jwks/properties/keys/items/oneOf/0/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key2},message:"must NOT have additional properties"};if(vErrors===null){vErrors=[err26]}else{vErrors.push(err26)}errors++}}if(data7.kty!==void 0){if("RSA"!==data7.kty){const err27={instancePath:instancePath+"/jwks/keys/"+i0+"/kty",schemaPath:"#/properties/jwks/properties/keys/items/oneOf/0/properties/kty/const",keyword:"const",params:{allowedValue:"RSA"},message:"must be equal to constant"};if(vErrors===null){vErrors=[err27]}else{vErrors.push(err27)}errors++}}if(data7.kid!==void 0){let data9=data7.kid;if(typeof data9==="string"){if(func1(data9)>256){const err28={instancePath:instancePath+"/jwks/keys/"+i0+"/kid",schemaPath:"#/properties/jwks/properties/keys/items/oneOf/0/properties/kid/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err28]}else{vErrors.push(err28)}errors++}if(func1(data9)<1){const err29={instancePath:instancePath+"/jwks/keys/"+i0+"/kid",schemaPath:"#/properties/jwks/properties/keys/items/oneOf/0/properties/kid/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err29]}else{vErrors.push(err29)}errors++}}else{const err30={instancePath:instancePath+"/jwks/keys/"+i0+"/kid",schemaPath:"#/properties/jwks/properties/keys/items/oneOf/0/properties/kid/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err30]}else{vErrors.push(err30)}errors++}}if(data7.alg!==void 0){let data10=data7.alg;if(!(data10==="RS256"||data10==="PS256")){const err31={instancePath:instancePath+"/jwks/keys/"+i0+"/alg",schemaPath:"#/properties/jwks/properties/keys/items/oneOf/0/properties/alg/enum",keyword:"enum",params:{allowedValues:schema86.properties.jwks.properties.keys.items.oneOf[0].properties.alg.enum},message:"must be equal to one of the allowed values"};if(vErrors===null){vErrors=[err31]}else{vErrors.push(err31)}errors++}}if(data7.use!==void 0){if("sig"!==data7.use){const err32={instancePath:instancePath+"/jwks/keys/"+i0+"/use",schemaPath:"#/properties/jwks/properties/keys/items/oneOf/0/properties/use/const",keyword:"const",params:{allowedValue:"sig"},message:"must be equal to constant"};if(vErrors===null){vErrors=[err32]}else{vErrors.push(err32)}errors++}}if(data7.key_ops!==void 0){let data12=data7.key_ops;if(Array.isArray(data12)){if(data12.length>1){const err33={instancePath:instancePath+"/jwks/keys/"+i0+"/key_ops",schemaPath:"#/properties/jwks/properties/keys/items/oneOf/0/properties/key_ops/maxItems",keyword:"maxItems",params:{limit:1},message:"must NOT have more than 1 items"};if(vErrors===null){vErrors=[err33]}else{vErrors.push(err33)}errors++}if(data12.length<1){const err34={instancePath:instancePath+"/jwks/keys/"+i0+"/key_ops",schemaPath:"#/properties/jwks/properties/keys/items/oneOf/0/properties/key_ops/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};if(vErrors===null){vErrors=[err34]}else{vErrors.push(err34)}errors++}const len1=data12.length;for(let i1=0;i1<len1;i1++){if("verify"!==data12[i1]){const err35={instancePath:instancePath+"/jwks/keys/"+i0+"/key_ops/"+i1,schemaPath:"#/properties/jwks/properties/keys/items/oneOf/0/properties/key_ops/items/const",keyword:"const",params:{allowedValue:"verify"},message:"must be equal to constant"};if(vErrors===null){vErrors=[err35]}else{vErrors.push(err35)}errors++}}}else{const err36={instancePath:instancePath+"/jwks/keys/"+i0+"/key_ops",schemaPath:"#/properties/jwks/properties/keys/items/oneOf/0/properties/key_ops/type",keyword:"type",params:{type:"array"},message:"must be array"};if(vErrors===null){vErrors=[err36]}else{vErrors.push(err36)}errors++}}if(data7.ext!==void 0){if(typeof data7.ext!=="boolean"){const err37={instancePath:instancePath+"/jwks/keys/"+i0+"/ext",schemaPath:"#/properties/jwks/properties/keys/items/oneOf/0/properties/ext/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};if(vErrors===null){vErrors=[err37]}else{vErrors.push(err37)}errors++}}if(data7.x5c!==void 0){let data15=data7.x5c;if(Array.isArray(data15)){if(data15.length>8){const err38={instancePath:instancePath+"/jwks/keys/"+i0+"/x5c",schemaPath:"#/properties/jwks/properties/keys/items/oneOf/0/properties/x5c/maxItems",keyword:"maxItems",params:{limit:8},message:"must NOT have more than 8 items"};if(vErrors===null){vErrors=[err38]}else{vErrors.push(err38)}errors++}const len2=data15.length;for(let i2=0;i2<len2;i2++){let data16=data15[i2];if(typeof data16==="string"){if(func1(data16)>8192){const err39={instancePath:instancePath+"/jwks/keys/"+i0+"/x5c/"+i2,schemaPath:"#/properties/jwks/properties/keys/items/oneOf/0/properties/x5c/items/maxLength",keyword:"maxLength",params:{limit:8192},message:"must NOT have more than 8192 characters"};if(vErrors===null){vErrors=[err39]}else{vErrors.push(err39)}errors++}}else{const err40={instancePath:instancePath+"/jwks/keys/"+i0+"/x5c/"+i2,schemaPath:"#/properties/jwks/properties/keys/items/oneOf/0/properties/x5c/items/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err40]}else{vErrors.push(err40)}errors++}}}else{const err41={instancePath:instancePath+"/jwks/keys/"+i0+"/x5c",schemaPath:"#/properties/jwks/properties/keys/items/oneOf/0/properties/x5c/type",keyword:"type",params:{type:"array"},message:"must be array"};if(vErrors===null){vErrors=[err41]}else{vErrors.push(err41)}errors++}}if(data7.x5t!==void 0){let data17=data7.x5t;if(typeof data17==="string"){if(func1(data17)>8192){const err42={instancePath:instancePath+"/jwks/keys/"+i0+"/x5t",schemaPath:"#/properties/jwks/properties/keys/items/oneOf/0/properties/x5t/maxLength",keyword:"maxLength",params:{limit:8192},message:"must NOT have more than 8192 characters"};if(vErrors===null){vErrors=[err42]}else{vErrors.push(err42)}errors++}if(!pattern129.test(data17)){const err43={instancePath:instancePath+"/jwks/keys/"+i0+"/x5t",schemaPath:"#/properties/jwks/properties/keys/items/oneOf/0/properties/x5t/pattern",keyword:"pattern",params:{pattern:"^[A-Za-z0-9_-]+$"},message:'must match pattern "^[A-Za-z0-9_-]+$"'};if(vErrors===null){vErrors=[err43]}else{vErrors.push(err43)}errors++}}else{const err44={instancePath:instancePath+"/jwks/keys/"+i0+"/x5t",schemaPath:"#/properties/jwks/properties/keys/items/oneOf/0/properties/x5t/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err44]}else{vErrors.push(err44)}errors++}}if(data7["x5t#S256"]!==void 0){let data18=data7["x5t#S256"];if(typeof data18==="string"){if(func1(data18)>8192){const err45={instancePath:instancePath+"/jwks/keys/"+i0+"/x5t#S256",schemaPath:"#/properties/jwks/properties/keys/items/oneOf/0/properties/x5t%23S256/maxLength",keyword:"maxLength",params:{limit:8192},message:"must NOT have more than 8192 characters"};if(vErrors===null){vErrors=[err45]}else{vErrors.push(err45)}errors++}if(!pattern129.test(data18)){const err46={instancePath:instancePath+"/jwks/keys/"+i0+"/x5t#S256",schemaPath:"#/properties/jwks/properties/keys/items/oneOf/0/properties/x5t%23S256/pattern",keyword:"pattern",params:{pattern:"^[A-Za-z0-9_-]+$"},message:'must match pattern "^[A-Za-z0-9_-]+$"'};if(vErrors===null){vErrors=[err46]}else{vErrors.push(err46)}errors++}}else{const err47={instancePath:instancePath+"/jwks/keys/"+i0+"/x5t#S256",schemaPath:"#/properties/jwks/properties/keys/items/oneOf/0/properties/x5t%23S256/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err47]}else{vErrors.push(err47)}errors++}}if(data7.n!==void 0){let data19=data7.n;if(typeof data19==="string"){if(func1(data19)>8192){const err48={instancePath:instancePath+"/jwks/keys/"+i0+"/n",schemaPath:"#/properties/jwks/properties/keys/items/oneOf/0/properties/n/maxLength",keyword:"maxLength",params:{limit:8192},message:"must NOT have more than 8192 characters"};if(vErrors===null){vErrors=[err48]}else{vErrors.push(err48)}errors++}if(!pattern129.test(data19)){const err49={instancePath:instancePath+"/jwks/keys/"+i0+"/n",schemaPath:"#/properties/jwks/properties/keys/items/oneOf/0/properties/n/pattern",keyword:"pattern",params:{pattern:"^[A-Za-z0-9_-]+$"},message:'must match pattern "^[A-Za-z0-9_-]+$"'};if(vErrors===null){vErrors=[err49]}else{vErrors.push(err49)}errors++}}else{const err50={instancePath:instancePath+"/jwks/keys/"+i0+"/n",schemaPath:"#/properties/jwks/properties/keys/items/oneOf/0/properties/n/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err50]}else{vErrors.push(err50)}errors++}}if(data7.e!==void 0){let data20=data7.e;if(typeof data20==="string"){if(func1(data20)>8192){const err51={instancePath:instancePath+"/jwks/keys/"+i0+"/e",schemaPath:"#/properties/jwks/properties/keys/items/oneOf/0/properties/e/maxLength",keyword:"maxLength",params:{limit:8192},message:"must NOT have more than 8192 characters"};if(vErrors===null){vErrors=[err51]}else{vErrors.push(err51)}errors++}if(!pattern129.test(data20)){const err52={instancePath:instancePath+"/jwks/keys/"+i0+"/e",schemaPath:"#/properties/jwks/properties/keys/items/oneOf/0/properties/e/pattern",keyword:"pattern",params:{pattern:"^[A-Za-z0-9_-]+$"},message:'must match pattern "^[A-Za-z0-9_-]+$"'};if(vErrors===null){vErrors=[err52]}else{vErrors.push(err52)}errors++}}else{const err53={instancePath:instancePath+"/jwks/keys/"+i0+"/e",schemaPath:"#/properties/jwks/properties/keys/items/oneOf/0/properties/e/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err53]}else{vErrors.push(err53)}errors++}}}else{const err54={instancePath:instancePath+"/jwks/keys/"+i0,schemaPath:"#/properties/jwks/properties/keys/items/oneOf/0/type",keyword:"type",params:{type:"object"},message:"must be object"};if(vErrors===null){vErrors=[err54]}else{vErrors.push(err54)}errors++}var _valid0=_errs18===errors;if(_valid0){valid4=true;passing0=0;var props0=true}const _errs43=errors;if(data7&&typeof data7=="object"&&!Array.isArray(data7)){if(data7.kty===void 0){const err55={instancePath:instancePath+"/jwks/keys/"+i0,schemaPath:"#/properties/jwks/properties/keys/items/oneOf/1/required",keyword:"required",params:{missingProperty:"kty"},message:"must have required property 'kty'"};if(vErrors===null){vErrors=[err55]}else{vErrors.push(err55)}errors++}if(data7.kid===void 0){const err56={instancePath:instancePath+"/jwks/keys/"+i0,schemaPath:"#/properties/jwks/properties/keys/items/oneOf/1/required",keyword:"required",params:{missingProperty:"kid"},message:"must have required property 'kid'"};if(vErrors===null){vErrors=[err56]}else{vErrors.push(err56)}errors++}if(data7.crv===void 0){const err57={instancePath:instancePath+"/jwks/keys/"+i0,schemaPath:"#/properties/jwks/properties/keys/items/oneOf/1/required",keyword:"required",params:{missingProperty:"crv"},message:"must have required property 'crv'"};if(vErrors===null){vErrors=[err57]}else{vErrors.push(err57)}errors++}if(data7.x===void 0){const err58={instancePath:instancePath+"/jwks/keys/"+i0,schemaPath:"#/properties/jwks/properties/keys/items/oneOf/1/required",keyword:"required",params:{missingProperty:"x"},message:"must have required property 'x'"};if(vErrors===null){vErrors=[err58]}else{vErrors.push(err58)}errors++}if(data7.y===void 0){const err59={instancePath:instancePath+"/jwks/keys/"+i0,schemaPath:"#/properties/jwks/properties/keys/items/oneOf/1/required",keyword:"required",params:{missingProperty:"y"},message:"must have required property 'y'"};if(vErrors===null){vErrors=[err59]}else{vErrors.push(err59)}errors++}for(const key3 in data7){if(!func11.call(schema86.properties.jwks.properties.keys.items.oneOf[1].properties,key3)){const err60={instancePath:instancePath+"/jwks/keys/"+i0,schemaPath:"#/properties/jwks/properties/keys/items/oneOf/1/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key3},message:"must NOT have additional properties"};if(vErrors===null){vErrors=[err60]}else{vErrors.push(err60)}errors++}}if(data7.kty!==void 0){if("EC"!==data7.kty){const err61={instancePath:instancePath+"/jwks/keys/"+i0+"/kty",schemaPath:"#/properties/jwks/properties/keys/items/oneOf/1/properties/kty/const",keyword:"const",params:{allowedValue:"EC"},message:"must be equal to constant"};if(vErrors===null){vErrors=[err61]}else{vErrors.push(err61)}errors++}}if(data7.kid!==void 0){let data22=data7.kid;if(typeof data22==="string"){if(func1(data22)>256){const err62={instancePath:instancePath+"/jwks/keys/"+i0+"/kid",schemaPath:"#/properties/jwks/properties/keys/items/oneOf/1/properties/kid/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err62]}else{vErrors.push(err62)}errors++}if(func1(data22)<1){const err63={instancePath:instancePath+"/jwks/keys/"+i0+"/kid",schemaPath:"#/properties/jwks/properties/keys/items/oneOf/1/properties/kid/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err63]}else{vErrors.push(err63)}errors++}}else{const err64={instancePath:instancePath+"/jwks/keys/"+i0+"/kid",schemaPath:"#/properties/jwks/properties/keys/items/oneOf/1/properties/kid/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err64]}else{vErrors.push(err64)}errors++}}if(data7.alg!==void 0){if(!(data7.alg==="ES256")){const err65={instancePath:instancePath+"/jwks/keys/"+i0+"/alg",schemaPath:"#/properties/jwks/properties/keys/items/oneOf/1/properties/alg/enum",keyword:"enum",params:{allowedValues:schema86.properties.jwks.properties.keys.items.oneOf[1].properties.alg.enum},message:"must be equal to one of the allowed values"};if(vErrors===null){vErrors=[err65]}else{vErrors.push(err65)}errors++}}if(data7.use!==void 0){if("sig"!==data7.use){const err66={instancePath:instancePath+"/jwks/keys/"+i0+"/use",schemaPath:"#/properties/jwks/properties/keys/items/oneOf/1/properties/use/const",keyword:"const",params:{allowedValue:"sig"},message:"must be equal to constant"};if(vErrors===null){vErrors=[err66]}else{vErrors.push(err66)}errors++}}if(data7.key_ops!==void 0){let data25=data7.key_ops;if(Array.isArray(data25)){if(data25.length>1){const err67={instancePath:instancePath+"/jwks/keys/"+i0+"/key_ops",schemaPath:"#/properties/jwks/properties/keys/items/oneOf/1/properties/key_ops/maxItems",keyword:"maxItems",params:{limit:1},message:"must NOT have more than 1 items"};if(vErrors===null){vErrors=[err67]}else{vErrors.push(err67)}errors++}if(data25.length<1){const err68={instancePath:instancePath+"/jwks/keys/"+i0+"/key_ops",schemaPath:"#/properties/jwks/properties/keys/items/oneOf/1/properties/key_ops/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};if(vErrors===null){vErrors=[err68]}else{vErrors.push(err68)}errors++}const len3=data25.length;for(let i3=0;i3<len3;i3++){if("verify"!==data25[i3]){const err69={instancePath:instancePath+"/jwks/keys/"+i0+"/key_ops/"+i3,schemaPath:"#/properties/jwks/properties/keys/items/oneOf/1/properties/key_ops/items/const",keyword:"const",params:{allowedValue:"verify"},message:"must be equal to constant"};if(vErrors===null){vErrors=[err69]}else{vErrors.push(err69)}errors++}}}else{const err70={instancePath:instancePath+"/jwks/keys/"+i0+"/key_ops",schemaPath:"#/properties/jwks/properties/keys/items/oneOf/1/properties/key_ops/type",keyword:"type",params:{type:"array"},message:"must be array"};if(vErrors===null){vErrors=[err70]}else{vErrors.push(err70)}errors++}}if(data7.ext!==void 0){if(typeof data7.ext!=="boolean"){const err71={instancePath:instancePath+"/jwks/keys/"+i0+"/ext",schemaPath:"#/properties/jwks/properties/keys/items/oneOf/1/properties/ext/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};if(vErrors===null){vErrors=[err71]}else{vErrors.push(err71)}errors++}}if(data7.x5c!==void 0){let data28=data7.x5c;if(Array.isArray(data28)){if(data28.length>8){const err72={instancePath:instancePath+"/jwks/keys/"+i0+"/x5c",schemaPath:"#/properties/jwks/properties/keys/items/oneOf/1/properties/x5c/maxItems",keyword:"maxItems",params:{limit:8},message:"must NOT have more than 8 items"};if(vErrors===null){vErrors=[err72]}else{vErrors.push(err72)}errors++}const len4=data28.length;for(let i4=0;i4<len4;i4++){let data29=data28[i4];if(typeof data29==="string"){if(func1(data29)>8192){const err73={instancePath:instancePath+"/jwks/keys/"+i0+"/x5c/"+i4,schemaPath:"#/properties/jwks/properties/keys/items/oneOf/1/properties/x5c/items/maxLength",keyword:"maxLength",params:{limit:8192},message:"must NOT have more than 8192 characters"};if(vErrors===null){vErrors=[err73]}else{vErrors.push(err73)}errors++}}else{const err74={instancePath:instancePath+"/jwks/keys/"+i0+"/x5c/"+i4,schemaPath:"#/properties/jwks/properties/keys/items/oneOf/1/properties/x5c/items/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err74]}else{vErrors.push(err74)}errors++}}}else{const err75={instancePath:instancePath+"/jwks/keys/"+i0+"/x5c",schemaPath:"#/properties/jwks/properties/keys/items/oneOf/1/properties/x5c/type",keyword:"type",params:{type:"array"},message:"must be array"};if(vErrors===null){vErrors=[err75]}else{vErrors.push(err75)}errors++}}if(data7.x5t!==void 0){let data30=data7.x5t;if(typeof data30==="string"){if(func1(data30)>8192){const err76={instancePath:instancePath+"/jwks/keys/"+i0+"/x5t",schemaPath:"#/properties/jwks/properties/keys/items/oneOf/1/properties/x5t/maxLength",keyword:"maxLength",params:{limit:8192},message:"must NOT have more than 8192 characters"};if(vErrors===null){vErrors=[err76]}else{vErrors.push(err76)}errors++}if(!pattern129.test(data30)){const err77={instancePath:instancePath+"/jwks/keys/"+i0+"/x5t",schemaPath:"#/properties/jwks/properties/keys/items/oneOf/1/properties/x5t/pattern",keyword:"pattern",params:{pattern:"^[A-Za-z0-9_-]+$"},message:'must match pattern "^[A-Za-z0-9_-]+$"'};if(vErrors===null){vErrors=[err77]}else{vErrors.push(err77)}errors++}}else{const err78={instancePath:instancePath+"/jwks/keys/"+i0+"/x5t",schemaPath:"#/properties/jwks/properties/keys/items/oneOf/1/properties/x5t/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err78]}else{vErrors.push(err78)}errors++}}if(data7["x5t#S256"]!==void 0){let data31=data7["x5t#S256"];if(typeof data31==="string"){if(func1(data31)>8192){const err79={instancePath:instancePath+"/jwks/keys/"+i0+"/x5t#S256",schemaPath:"#/properties/jwks/properties/keys/items/oneOf/1/properties/x5t%23S256/maxLength",keyword:"maxLength",params:{limit:8192},message:"must NOT have more than 8192 characters"};if(vErrors===null){vErrors=[err79]}else{vErrors.push(err79)}errors++}if(!pattern129.test(data31)){const err80={instancePath:instancePath+"/jwks/keys/"+i0+"/x5t#S256",schemaPath:"#/properties/jwks/properties/keys/items/oneOf/1/properties/x5t%23S256/pattern",keyword:"pattern",params:{pattern:"^[A-Za-z0-9_-]+$"},message:'must match pattern "^[A-Za-z0-9_-]+$"'};if(vErrors===null){vErrors=[err80]}else{vErrors.push(err80)}errors++}}else{const err81={instancePath:instancePath+"/jwks/keys/"+i0+"/x5t#S256",schemaPath:"#/properties/jwks/properties/keys/items/oneOf/1/properties/x5t%23S256/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err81]}else{vErrors.push(err81)}errors++}}if(data7.crv!==void 0){if("P-256"!==data7.crv){const err82={instancePath:instancePath+"/jwks/keys/"+i0+"/crv",schemaPath:"#/properties/jwks/properties/keys/items/oneOf/1/properties/crv/const",keyword:"const",params:{allowedValue:"P-256"},message:"must be equal to constant"};if(vErrors===null){vErrors=[err82]}else{vErrors.push(err82)}errors++}}if(data7.x!==void 0){let data33=data7.x;if(typeof data33==="string"){if(func1(data33)>8192){const err83={instancePath:instancePath+"/jwks/keys/"+i0+"/x",schemaPath:"#/properties/jwks/properties/keys/items/oneOf/1/properties/x/maxLength",keyword:"maxLength",params:{limit:8192},message:"must NOT have more than 8192 characters"};if(vErrors===null){vErrors=[err83]}else{vErrors.push(err83)}errors++}if(!pattern129.test(data33)){const err84={instancePath:instancePath+"/jwks/keys/"+i0+"/x",schemaPath:"#/properties/jwks/properties/keys/items/oneOf/1/properties/x/pattern",keyword:"pattern",params:{pattern:"^[A-Za-z0-9_-]+$"},message:'must match pattern "^[A-Za-z0-9_-]+$"'};if(vErrors===null){vErrors=[err84]}else{vErrors.push(err84)}errors++}}else{const err85={instancePath:instancePath+"/jwks/keys/"+i0+"/x",schemaPath:"#/properties/jwks/properties/keys/items/oneOf/1/properties/x/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err85]}else{vErrors.push(err85)}errors++}}if(data7.y!==void 0){let data34=data7.y;if(typeof data34==="string"){if(func1(data34)>8192){const err86={instancePath:instancePath+"/jwks/keys/"+i0+"/y",schemaPath:"#/properties/jwks/properties/keys/items/oneOf/1/properties/y/maxLength",keyword:"maxLength",params:{limit:8192},message:"must NOT have more than 8192 characters"};if(vErrors===null){vErrors=[err86]}else{vErrors.push(err86)}errors++}if(!pattern129.test(data34)){const err87={instancePath:instancePath+"/jwks/keys/"+i0+"/y",schemaPath:"#/properties/jwks/properties/keys/items/oneOf/1/properties/y/pattern",keyword:"pattern",params:{pattern:"^[A-Za-z0-9_-]+$"},message:'must match pattern "^[A-Za-z0-9_-]+$"'};if(vErrors===null){vErrors=[err87]}else{vErrors.push(err87)}errors++}}else{const err88={instancePath:instancePath+"/jwks/keys/"+i0+"/y",schemaPath:"#/properties/jwks/properties/keys/items/oneOf/1/properties/y/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err88]}else{vErrors.push(err88)}errors++}}}else{const err89={instancePath:instancePath+"/jwks/keys/"+i0,schemaPath:"#/properties/jwks/properties/keys/items/oneOf/1/type",keyword:"type",params:{type:"object"},message:"must be object"};if(vErrors===null){vErrors=[err89]}else{vErrors.push(err89)}errors++}var _valid0=_errs43===errors;if(_valid0&&valid4){valid4=false;passing0=[passing0,1]}else{if(_valid0){valid4=true;passing0=1;if(props0!==true){props0=true}}const _errs69=errors;if(data7&&typeof data7=="object"&&!Array.isArray(data7)){if(data7.kty===void 0){const err90={instancePath:instancePath+"/jwks/keys/"+i0,schemaPath:"#/properties/jwks/properties/keys/items/oneOf/2/required",keyword:"required",params:{missingProperty:"kty"},message:"must have required property 'kty'"};if(vErrors===null){vErrors=[err90]}else{vErrors.push(err90)}errors++}if(data7.kid===void 0){const err91={instancePath:instancePath+"/jwks/keys/"+i0,schemaPath:"#/properties/jwks/properties/keys/items/oneOf/2/required",keyword:"required",params:{missingProperty:"kid"},message:"must have required property 'kid'"};if(vErrors===null){vErrors=[err91]}else{vErrors.push(err91)}errors++}if(data7.crv===void 0){const err92={instancePath:instancePath+"/jwks/keys/"+i0,schemaPath:"#/properties/jwks/properties/keys/items/oneOf/2/required",keyword:"required",params:{missingProperty:"crv"},message:"must have required property 'crv'"};if(vErrors===null){vErrors=[err92]}else{vErrors.push(err92)}errors++}if(data7.x===void 0){const err93={instancePath:instancePath+"/jwks/keys/"+i0,schemaPath:"#/properties/jwks/properties/keys/items/oneOf/2/required",keyword:"required",params:{missingProperty:"x"},message:"must have required property 'x'"};if(vErrors===null){vErrors=[err93]}else{vErrors.push(err93)}errors++}for(const key4 in data7){if(!func11.call(schema86.properties.jwks.properties.keys.items.oneOf[2].properties,key4)){const err94={instancePath:instancePath+"/jwks/keys/"+i0,schemaPath:"#/properties/jwks/properties/keys/items/oneOf/2/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key4},message:"must NOT have additional properties"};if(vErrors===null){vErrors=[err94]}else{vErrors.push(err94)}errors++}}if(data7.kty!==void 0){if("OKP"!==data7.kty){const err95={instancePath:instancePath+"/jwks/keys/"+i0+"/kty",schemaPath:"#/properties/jwks/properties/keys/items/oneOf/2/properties/kty/const",keyword:"const",params:{allowedValue:"OKP"},message:"must be equal to constant"};if(vErrors===null){vErrors=[err95]}else{vErrors.push(err95)}errors++}}if(data7.kid!==void 0){let data36=data7.kid;if(typeof data36==="string"){if(func1(data36)>256){const err96={instancePath:instancePath+"/jwks/keys/"+i0+"/kid",schemaPath:"#/properties/jwks/properties/keys/items/oneOf/2/properties/kid/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err96]}else{vErrors.push(err96)}errors++}if(func1(data36)<1){const err97={instancePath:instancePath+"/jwks/keys/"+i0+"/kid",schemaPath:"#/properties/jwks/properties/keys/items/oneOf/2/properties/kid/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err97]}else{vErrors.push(err97)}errors++}}else{const err98={instancePath:instancePath+"/jwks/keys/"+i0+"/kid",schemaPath:"#/properties/jwks/properties/keys/items/oneOf/2/properties/kid/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err98]}else{vErrors.push(err98)}errors++}}if(data7.alg!==void 0){if(!(data7.alg==="EdDSA")){const err99={instancePath:instancePath+"/jwks/keys/"+i0+"/alg",schemaPath:"#/properties/jwks/properties/keys/items/oneOf/2/properties/alg/enum",keyword:"enum",params:{allowedValues:schema86.properties.jwks.properties.keys.items.oneOf[2].properties.alg.enum},message:"must be equal to one of the allowed values"};if(vErrors===null){vErrors=[err99]}else{vErrors.push(err99)}errors++}}if(data7.use!==void 0){if("sig"!==data7.use){const err100={instancePath:instancePath+"/jwks/keys/"+i0+"/use",schemaPath:"#/properties/jwks/properties/keys/items/oneOf/2/properties/use/const",keyword:"const",params:{allowedValue:"sig"},message:"must be equal to constant"};if(vErrors===null){vErrors=[err100]}else{vErrors.push(err100)}errors++}}if(data7.key_ops!==void 0){let data39=data7.key_ops;if(Array.isArray(data39)){if(data39.length>1){const err101={instancePath:instancePath+"/jwks/keys/"+i0+"/key_ops",schemaPath:"#/properties/jwks/properties/keys/items/oneOf/2/properties/key_ops/maxItems",keyword:"maxItems",params:{limit:1},message:"must NOT have more than 1 items"};if(vErrors===null){vErrors=[err101]}else{vErrors.push(err101)}errors++}if(data39.length<1){const err102={instancePath:instancePath+"/jwks/keys/"+i0+"/key_ops",schemaPath:"#/properties/jwks/properties/keys/items/oneOf/2/properties/key_ops/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};if(vErrors===null){vErrors=[err102]}else{vErrors.push(err102)}errors++}const len5=data39.length;for(let i5=0;i5<len5;i5++){if("verify"!==data39[i5]){const err103={instancePath:instancePath+"/jwks/keys/"+i0+"/key_ops/"+i5,schemaPath:"#/properties/jwks/properties/keys/items/oneOf/2/properties/key_ops/items/const",keyword:"const",params:{allowedValue:"verify"},message:"must be equal to constant"};if(vErrors===null){vErrors=[err103]}else{vErrors.push(err103)}errors++}}}else{const err104={instancePath:instancePath+"/jwks/keys/"+i0+"/key_ops",schemaPath:"#/properties/jwks/properties/keys/items/oneOf/2/properties/key_ops/type",keyword:"type",params:{type:"array"},message:"must be array"};if(vErrors===null){vErrors=[err104]}else{vErrors.push(err104)}errors++}}if(data7.ext!==void 0){if(typeof data7.ext!=="boolean"){const err105={instancePath:instancePath+"/jwks/keys/"+i0+"/ext",schemaPath:"#/properties/jwks/properties/keys/items/oneOf/2/properties/ext/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};if(vErrors===null){vErrors=[err105]}else{vErrors.push(err105)}errors++}}if(data7.x5c!==void 0){let data42=data7.x5c;if(Array.isArray(data42)){if(data42.length>8){const err106={instancePath:instancePath+"/jwks/keys/"+i0+"/x5c",schemaPath:"#/properties/jwks/properties/keys/items/oneOf/2/properties/x5c/maxItems",keyword:"maxItems",params:{limit:8},message:"must NOT have more than 8 items"};if(vErrors===null){vErrors=[err106]}else{vErrors.push(err106)}errors++}const len6=data42.length;for(let i6=0;i6<len6;i6++){let data43=data42[i6];if(typeof data43==="string"){if(func1(data43)>8192){const err107={instancePath:instancePath+"/jwks/keys/"+i0+"/x5c/"+i6,schemaPath:"#/properties/jwks/properties/keys/items/oneOf/2/properties/x5c/items/maxLength",keyword:"maxLength",params:{limit:8192},message:"must NOT have more than 8192 characters"};if(vErrors===null){vErrors=[err107]}else{vErrors.push(err107)}errors++}}else{const err108={instancePath:instancePath+"/jwks/keys/"+i0+"/x5c/"+i6,schemaPath:"#/properties/jwks/properties/keys/items/oneOf/2/properties/x5c/items/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err108]}else{vErrors.push(err108)}errors++}}}else{const err109={instancePath:instancePath+"/jwks/keys/"+i0+"/x5c",schemaPath:"#/properties/jwks/properties/keys/items/oneOf/2/properties/x5c/type",keyword:"type",params:{type:"array"},message:"must be array"};if(vErrors===null){vErrors=[err109]}else{vErrors.push(err109)}errors++}}if(data7.x5t!==void 0){let data44=data7.x5t;if(typeof data44==="string"){if(func1(data44)>8192){const err110={instancePath:instancePath+"/jwks/keys/"+i0+"/x5t",schemaPath:"#/properties/jwks/properties/keys/items/oneOf/2/properties/x5t/maxLength",keyword:"maxLength",params:{limit:8192},message:"must NOT have more than 8192 characters"};if(vErrors===null){vErrors=[err110]}else{vErrors.push(err110)}errors++}if(!pattern129.test(data44)){const err111={instancePath:instancePath+"/jwks/keys/"+i0+"/x5t",schemaPath:"#/properties/jwks/properties/keys/items/oneOf/2/properties/x5t/pattern",keyword:"pattern",params:{pattern:"^[A-Za-z0-9_-]+$"},message:'must match pattern "^[A-Za-z0-9_-]+$"'};if(vErrors===null){vErrors=[err111]}else{vErrors.push(err111)}errors++}}else{const err112={instancePath:instancePath+"/jwks/keys/"+i0+"/x5t",schemaPath:"#/properties/jwks/properties/keys/items/oneOf/2/properties/x5t/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err112]}else{vErrors.push(err112)}errors++}}if(data7["x5t#S256"]!==void 0){let data45=data7["x5t#S256"];if(typeof data45==="string"){if(func1(data45)>8192){const err113={instancePath:instancePath+"/jwks/keys/"+i0+"/x5t#S256",schemaPath:"#/properties/jwks/properties/keys/items/oneOf/2/properties/x5t%23S256/maxLength",keyword:"maxLength",params:{limit:8192},message:"must NOT have more than 8192 characters"};if(vErrors===null){vErrors=[err113]}else{vErrors.push(err113)}errors++}if(!pattern129.test(data45)){const err114={instancePath:instancePath+"/jwks/keys/"+i0+"/x5t#S256",schemaPath:"#/properties/jwks/properties/keys/items/oneOf/2/properties/x5t%23S256/pattern",keyword:"pattern",params:{pattern:"^[A-Za-z0-9_-]+$"},message:'must match pattern "^[A-Za-z0-9_-]+$"'};if(vErrors===null){vErrors=[err114]}else{vErrors.push(err114)}errors++}}else{const err115={instancePath:instancePath+"/jwks/keys/"+i0+"/x5t#S256",schemaPath:"#/properties/jwks/properties/keys/items/oneOf/2/properties/x5t%23S256/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err115]}else{vErrors.push(err115)}errors++}}if(data7.crv!==void 0){if("Ed25519"!==data7.crv){const err116={instancePath:instancePath+"/jwks/keys/"+i0+"/crv",schemaPath:"#/properties/jwks/properties/keys/items/oneOf/2/properties/crv/const",keyword:"const",params:{allowedValue:"Ed25519"},message:"must be equal to constant"};if(vErrors===null){vErrors=[err116]}else{vErrors.push(err116)}errors++}}if(data7.x!==void 0){let data47=data7.x;if(typeof data47==="string"){if(func1(data47)>8192){const err117={instancePath:instancePath+"/jwks/keys/"+i0+"/x",schemaPath:"#/properties/jwks/properties/keys/items/oneOf/2/properties/x/maxLength",keyword:"maxLength",params:{limit:8192},message:"must NOT have more than 8192 characters"};if(vErrors===null){vErrors=[err117]}else{vErrors.push(err117)}errors++}if(!pattern129.test(data47)){const err118={instancePath:instancePath+"/jwks/keys/"+i0+"/x",schemaPath:"#/properties/jwks/properties/keys/items/oneOf/2/properties/x/pattern",keyword:"pattern",params:{pattern:"^[A-Za-z0-9_-]+$"},message:'must match pattern "^[A-Za-z0-9_-]+$"'};if(vErrors===null){vErrors=[err118]}else{vErrors.push(err118)}errors++}}else{const err119={instancePath:instancePath+"/jwks/keys/"+i0+"/x",schemaPath:"#/properties/jwks/properties/keys/items/oneOf/2/properties/x/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err119]}else{vErrors.push(err119)}errors++}}}else{const err120={instancePath:instancePath+"/jwks/keys/"+i0,schemaPath:"#/properties/jwks/properties/keys/items/oneOf/2/type",keyword:"type",params:{type:"object"},message:"must be object"};if(vErrors===null){vErrors=[err120]}else{vErrors.push(err120)}errors++}var _valid0=_errs69===errors;if(_valid0&&valid4){valid4=false;passing0=[passing0,2]}else{if(_valid0){valid4=true;passing0=2;if(props0!==true){props0=true}}}}if(!valid4){const err121={instancePath:instancePath+"/jwks/keys/"+i0,schemaPath:"#/properties/jwks/properties/keys/items/oneOf",keyword:"oneOf",params:{passingSchemas:passing0},message:"must match exactly one schema in oneOf"};if(vErrors===null){vErrors=[err121]}else{vErrors.push(err121)}errors++}else{errors=_errs17;if(vErrors!==null){if(_errs17){vErrors.length=_errs17}else{vErrors=null}}}}}else{const err122={instancePath:instancePath+"/jwks/keys",schemaPath:"#/properties/jwks/properties/keys/type",keyword:"type",params:{type:"array"},message:"must be array"};if(vErrors===null){vErrors=[err122]}else{vErrors.push(err122)}errors++}}}else{const err123={instancePath:instancePath+"/jwks",schemaPath:"#/properties/jwks/type",keyword:"type",params:{type:"object"},message:"must be object"};if(vErrors===null){vErrors=[err123]}else{vErrors.push(err123)}errors++}}}else{const err124={instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};if(vErrors===null){vErrors=[err124]}else{vErrors.push(err124)}errors++}validate42.errors=vErrors;return errors===0}validate42.evaluated={props:true,dynamicProps:false,dynamicItems:false};var exchangeRegistration=validate43;var schema87={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://eventsdk.dev/schemas/v1/exchange-registration.schema.json",title:"ExchangeRegistration",type:"object",additionalProperties:false,required:["schemaVersion","requestId","expectedRevision","source","target","grant","status"],properties:{schemaVersion:{const:1},requestId:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u0020\\u007f]+$"},expectedRevision:{type:["integer","null"],minimum:1,maximum:2147483647},source:{type:"object",additionalProperties:false,required:["source","serviceRef","tenantRef","issuer","subject"],properties:{source:{type:"string",format:"uri",maxLength:2048},serviceRef:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u0020\\u007f]+$"},tenantRef:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u0020\\u007f]+$"},issuer:{type:"string",format:"uri",maxLength:2048},subject:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u0020\\u007f]+$"}}},target:{$ref:"tenant-context.schema.json"},grant:{type:"object",additionalProperties:false,required:["grantRef","version","eventType","consumerRef"],properties:{grantRef:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u0020\\u007f]+$"},version:{type:"integer",minimum:1,maximum:2147483647},eventType:{type:"string",pattern:"^[A-Za-z0-9][A-Za-z0-9._-]*\\.v[1-9][0-9]*$",maxLength:256},consumerRef:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u0020\\u007f]+$"}}},status:{enum:["ACTIVE","REVOKED"]}}};var pattern158=new RegExp("^[A-Za-z0-9][A-Za-z0-9._-]*\\.v[1-9][0-9]*$","u");function validate43(data,{instancePath="",parentData,parentDataProperty,rootData=data,dynamicAnchors={}}={}){let vErrors=null;let errors=0;const evaluated0=validate43.evaluated;if(evaluated0.dynamicProps){evaluated0.props=void 0}if(evaluated0.dynamicItems){evaluated0.items=void 0}if(data&&typeof data=="object"&&!Array.isArray(data)){if(data.schemaVersion===void 0){const err0={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"schemaVersion"},message:"must have required property 'schemaVersion'"};if(vErrors===null){vErrors=[err0]}else{vErrors.push(err0)}errors++}if(data.requestId===void 0){const err1={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"requestId"},message:"must have required property 'requestId'"};if(vErrors===null){vErrors=[err1]}else{vErrors.push(err1)}errors++}if(data.expectedRevision===void 0){const err2={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"expectedRevision"},message:"must have required property 'expectedRevision'"};if(vErrors===null){vErrors=[err2]}else{vErrors.push(err2)}errors++}if(data.source===void 0){const err3={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"source"},message:"must have required property 'source'"};if(vErrors===null){vErrors=[err3]}else{vErrors.push(err3)}errors++}if(data.target===void 0){const err4={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"target"},message:"must have required property 'target'"};if(vErrors===null){vErrors=[err4]}else{vErrors.push(err4)}errors++}if(data.grant===void 0){const err5={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"grant"},message:"must have required property 'grant'"};if(vErrors===null){vErrors=[err5]}else{vErrors.push(err5)}errors++}if(data.status===void 0){const err6={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"status"},message:"must have required property 'status'"};if(vErrors===null){vErrors=[err6]}else{vErrors.push(err6)}errors++}for(const key0 in data){if(!(key0==="schemaVersion"||key0==="requestId"||key0==="expectedRevision"||key0==="source"||key0==="target"||key0==="grant"||key0==="status")){const err7={instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key0},message:"must NOT have additional properties"};if(vErrors===null){vErrors=[err7]}else{vErrors.push(err7)}errors++}}if(data.schemaVersion!==void 0){if(1!==data.schemaVersion){const err8={instancePath:instancePath+"/schemaVersion",schemaPath:"#/properties/schemaVersion/const",keyword:"const",params:{allowedValue:1},message:"must be equal to constant"};if(vErrors===null){vErrors=[err8]}else{vErrors.push(err8)}errors++}}if(data.requestId!==void 0){let data1=data.requestId;if(typeof data1==="string"){if(func1(data1)>256){const err9={instancePath:instancePath+"/requestId",schemaPath:"#/properties/requestId/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err9]}else{vErrors.push(err9)}errors++}if(func1(data1)<1){const err10={instancePath:instancePath+"/requestId",schemaPath:"#/properties/requestId/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err10]}else{vErrors.push(err10)}errors++}if(!pattern119.test(data1)){const err11={instancePath:instancePath+"/requestId",schemaPath:"#/properties/requestId/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u0020\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u0020\\u007f]+$"'};if(vErrors===null){vErrors=[err11]}else{vErrors.push(err11)}errors++}}else{const err12={instancePath:instancePath+"/requestId",schemaPath:"#/properties/requestId/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err12]}else{vErrors.push(err12)}errors++}}if(data.expectedRevision!==void 0){let data2=data.expectedRevision;if(!(typeof data2=="number"&&!(data2%1)&&!isNaN(data2)&&isFinite(data2))&&data2!==null){const err13={instancePath:instancePath+"/expectedRevision",schemaPath:"#/properties/expectedRevision/type",keyword:"type",params:{type:schema87.properties.expectedRevision.type},message:"must be integer,null"};if(vErrors===null){vErrors=[err13]}else{vErrors.push(err13)}errors++}if(typeof data2=="number"&&isFinite(data2)){if(data2>2147483647||isNaN(data2)){const err14={instancePath:instancePath+"/expectedRevision",schemaPath:"#/properties/expectedRevision/maximum",keyword:"maximum",params:{comparison:"<=",limit:2147483647},message:"must be <= 2147483647"};if(vErrors===null){vErrors=[err14]}else{vErrors.push(err14)}errors++}if(data2<1||isNaN(data2)){const err15={instancePath:instancePath+"/expectedRevision",schemaPath:"#/properties/expectedRevision/minimum",keyword:"minimum",params:{comparison:">=",limit:1},message:"must be >= 1"};if(vErrors===null){vErrors=[err15]}else{vErrors.push(err15)}errors++}}}if(data.source!==void 0){let data3=data.source;if(data3&&typeof data3=="object"&&!Array.isArray(data3)){if(data3.source===void 0){const err16={instancePath:instancePath+"/source",schemaPath:"#/properties/source/required",keyword:"required",params:{missingProperty:"source"},message:"must have required property 'source'"};if(vErrors===null){vErrors=[err16]}else{vErrors.push(err16)}errors++}if(data3.serviceRef===void 0){const err17={instancePath:instancePath+"/source",schemaPath:"#/properties/source/required",keyword:"required",params:{missingProperty:"serviceRef"},message:"must have required property 'serviceRef'"};if(vErrors===null){vErrors=[err17]}else{vErrors.push(err17)}errors++}if(data3.tenantRef===void 0){const err18={instancePath:instancePath+"/source",schemaPath:"#/properties/source/required",keyword:"required",params:{missingProperty:"tenantRef"},message:"must have required property 'tenantRef'"};if(vErrors===null){vErrors=[err18]}else{vErrors.push(err18)}errors++}if(data3.issuer===void 0){const err19={instancePath:instancePath+"/source",schemaPath:"#/properties/source/required",keyword:"required",params:{missingProperty:"issuer"},message:"must have required property 'issuer'"};if(vErrors===null){vErrors=[err19]}else{vErrors.push(err19)}errors++}if(data3.subject===void 0){const err20={instancePath:instancePath+"/source",schemaPath:"#/properties/source/required",keyword:"required",params:{missingProperty:"subject"},message:"must have required property 'subject'"};if(vErrors===null){vErrors=[err20]}else{vErrors.push(err20)}errors++}for(const key1 in data3){if(!(key1==="source"||key1==="serviceRef"||key1==="tenantRef"||key1==="issuer"||key1==="subject")){const err21={instancePath:instancePath+"/source",schemaPath:"#/properties/source/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key1},message:"must NOT have additional properties"};if(vErrors===null){vErrors=[err21]}else{vErrors.push(err21)}errors++}}if(data3.source!==void 0){let data4=data3.source;if(typeof data4==="string"){if(func1(data4)>2048){const err22={instancePath:instancePath+"/source/source",schemaPath:"#/properties/source/properties/source/maxLength",keyword:"maxLength",params:{limit:2048},message:"must NOT have more than 2048 characters"};if(vErrors===null){vErrors=[err22]}else{vErrors.push(err22)}errors++}if(!formats0(data4)){const err23={instancePath:instancePath+"/source/source",schemaPath:"#/properties/source/properties/source/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};if(vErrors===null){vErrors=[err23]}else{vErrors.push(err23)}errors++}}else{const err24={instancePath:instancePath+"/source/source",schemaPath:"#/properties/source/properties/source/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err24]}else{vErrors.push(err24)}errors++}}if(data3.serviceRef!==void 0){let data5=data3.serviceRef;if(typeof data5==="string"){if(func1(data5)>256){const err25={instancePath:instancePath+"/source/serviceRef",schemaPath:"#/properties/source/properties/serviceRef/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err25]}else{vErrors.push(err25)}errors++}if(func1(data5)<1){const err26={instancePath:instancePath+"/source/serviceRef",schemaPath:"#/properties/source/properties/serviceRef/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err26]}else{vErrors.push(err26)}errors++}if(!pattern119.test(data5)){const err27={instancePath:instancePath+"/source/serviceRef",schemaPath:"#/properties/source/properties/serviceRef/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u0020\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u0020\\u007f]+$"'};if(vErrors===null){vErrors=[err27]}else{vErrors.push(err27)}errors++}}else{const err28={instancePath:instancePath+"/source/serviceRef",schemaPath:"#/properties/source/properties/serviceRef/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err28]}else{vErrors.push(err28)}errors++}}if(data3.tenantRef!==void 0){let data6=data3.tenantRef;if(typeof data6==="string"){if(func1(data6)>256){const err29={instancePath:instancePath+"/source/tenantRef",schemaPath:"#/properties/source/properties/tenantRef/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err29]}else{vErrors.push(err29)}errors++}if(func1(data6)<1){const err30={instancePath:instancePath+"/source/tenantRef",schemaPath:"#/properties/source/properties/tenantRef/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err30]}else{vErrors.push(err30)}errors++}if(!pattern119.test(data6)){const err31={instancePath:instancePath+"/source/tenantRef",schemaPath:"#/properties/source/properties/tenantRef/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u0020\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u0020\\u007f]+$"'};if(vErrors===null){vErrors=[err31]}else{vErrors.push(err31)}errors++}}else{const err32={instancePath:instancePath+"/source/tenantRef",schemaPath:"#/properties/source/properties/tenantRef/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err32]}else{vErrors.push(err32)}errors++}}if(data3.issuer!==void 0){let data7=data3.issuer;if(typeof data7==="string"){if(func1(data7)>2048){const err33={instancePath:instancePath+"/source/issuer",schemaPath:"#/properties/source/properties/issuer/maxLength",keyword:"maxLength",params:{limit:2048},message:"must NOT have more than 2048 characters"};if(vErrors===null){vErrors=[err33]}else{vErrors.push(err33)}errors++}if(!formats0(data7)){const err34={instancePath:instancePath+"/source/issuer",schemaPath:"#/properties/source/properties/issuer/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};if(vErrors===null){vErrors=[err34]}else{vErrors.push(err34)}errors++}}else{const err35={instancePath:instancePath+"/source/issuer",schemaPath:"#/properties/source/properties/issuer/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err35]}else{vErrors.push(err35)}errors++}}if(data3.subject!==void 0){let data8=data3.subject;if(typeof data8==="string"){if(func1(data8)>256){const err36={instancePath:instancePath+"/source/subject",schemaPath:"#/properties/source/properties/subject/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err36]}else{vErrors.push(err36)}errors++}if(func1(data8)<1){const err37={instancePath:instancePath+"/source/subject",schemaPath:"#/properties/source/properties/subject/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err37]}else{vErrors.push(err37)}errors++}if(!pattern119.test(data8)){const err38={instancePath:instancePath+"/source/subject",schemaPath:"#/properties/source/properties/subject/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u0020\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u0020\\u007f]+$"'};if(vErrors===null){vErrors=[err38]}else{vErrors.push(err38)}errors++}}else{const err39={instancePath:instancePath+"/source/subject",schemaPath:"#/properties/source/properties/subject/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err39]}else{vErrors.push(err39)}errors++}}}else{const err40={instancePath:instancePath+"/source",schemaPath:"#/properties/source/type",keyword:"type",params:{type:"object"},message:"must be object"};if(vErrors===null){vErrors=[err40]}else{vErrors.push(err40)}errors++}}if(data.target!==void 0){let data9=data.target;if(data9&&typeof data9=="object"&&!Array.isArray(data9)){if(data9.serviceRef===void 0){const err41={instancePath:instancePath+"/target",schemaPath:"tenant-context.schema.json/required",keyword:"required",params:{missingProperty:"serviceRef"},message:"must have required property 'serviceRef'"};if(vErrors===null){vErrors=[err41]}else{vErrors.push(err41)}errors++}if(data9.tenantRef===void 0){const err42={instancePath:instancePath+"/target",schemaPath:"tenant-context.schema.json/required",keyword:"required",params:{missingProperty:"tenantRef"},message:"must have required property 'tenantRef'"};if(vErrors===null){vErrors=[err42]}else{vErrors.push(err42)}errors++}for(const key2 in data9){if(!(key2==="serviceRef"||key2==="tenantRef")){const err43={instancePath:instancePath+"/target",schemaPath:"tenant-context.schema.json/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key2},message:"must NOT have additional properties"};if(vErrors===null){vErrors=[err43]}else{vErrors.push(err43)}errors++}}if(data9.serviceRef!==void 0){let data10=data9.serviceRef;if(typeof data10==="string"){if(func1(data10)>256){const err44={instancePath:instancePath+"/target/serviceRef",schemaPath:"tenant-context.schema.json/properties/serviceRef/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err44]}else{vErrors.push(err44)}errors++}if(func1(data10)<1){const err45={instancePath:instancePath+"/target/serviceRef",schemaPath:"tenant-context.schema.json/properties/serviceRef/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err45]}else{vErrors.push(err45)}errors++}if(!pattern4.test(data10)){const err46={instancePath:instancePath+"/target/serviceRef",schemaPath:"tenant-context.schema.json/properties/serviceRef/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err46]}else{vErrors.push(err46)}errors++}}else{const err47={instancePath:instancePath+"/target/serviceRef",schemaPath:"tenant-context.schema.json/properties/serviceRef/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err47]}else{vErrors.push(err47)}errors++}}if(data9.tenantRef!==void 0){let data11=data9.tenantRef;if(typeof data11==="string"){if(func1(data11)>256){const err48={instancePath:instancePath+"/target/tenantRef",schemaPath:"tenant-context.schema.json/properties/tenantRef/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err48]}else{vErrors.push(err48)}errors++}if(func1(data11)<1){const err49={instancePath:instancePath+"/target/tenantRef",schemaPath:"tenant-context.schema.json/properties/tenantRef/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err49]}else{vErrors.push(err49)}errors++}if(!pattern4.test(data11)){const err50={instancePath:instancePath+"/target/tenantRef",schemaPath:"tenant-context.schema.json/properties/tenantRef/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err50]}else{vErrors.push(err50)}errors++}}else{const err51={instancePath:instancePath+"/target/tenantRef",schemaPath:"tenant-context.schema.json/properties/tenantRef/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err51]}else{vErrors.push(err51)}errors++}}}else{const err52={instancePath:instancePath+"/target",schemaPath:"tenant-context.schema.json/type",keyword:"type",params:{type:"object"},message:"must be object"};if(vErrors===null){vErrors=[err52]}else{vErrors.push(err52)}errors++}}if(data.grant!==void 0){let data12=data.grant;if(data12&&typeof data12=="object"&&!Array.isArray(data12)){if(data12.grantRef===void 0){const err53={instancePath:instancePath+"/grant",schemaPath:"#/properties/grant/required",keyword:"required",params:{missingProperty:"grantRef"},message:"must have required property 'grantRef'"};if(vErrors===null){vErrors=[err53]}else{vErrors.push(err53)}errors++}if(data12.version===void 0){const err54={instancePath:instancePath+"/grant",schemaPath:"#/properties/grant/required",keyword:"required",params:{missingProperty:"version"},message:"must have required property 'version'"};if(vErrors===null){vErrors=[err54]}else{vErrors.push(err54)}errors++}if(data12.eventType===void 0){const err55={instancePath:instancePath+"/grant",schemaPath:"#/properties/grant/required",keyword:"required",params:{missingProperty:"eventType"},message:"must have required property 'eventType'"};if(vErrors===null){vErrors=[err55]}else{vErrors.push(err55)}errors++}if(data12.consumerRef===void 0){const err56={instancePath:instancePath+"/grant",schemaPath:"#/properties/grant/required",keyword:"required",params:{missingProperty:"consumerRef"},message:"must have required property 'consumerRef'"};if(vErrors===null){vErrors=[err56]}else{vErrors.push(err56)}errors++}for(const key3 in data12){if(!(key3==="grantRef"||key3==="version"||key3==="eventType"||key3==="consumerRef")){const err57={instancePath:instancePath+"/grant",schemaPath:"#/properties/grant/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key3},message:"must NOT have additional properties"};if(vErrors===null){vErrors=[err57]}else{vErrors.push(err57)}errors++}}if(data12.grantRef!==void 0){let data13=data12.grantRef;if(typeof data13==="string"){if(func1(data13)>256){const err58={instancePath:instancePath+"/grant/grantRef",schemaPath:"#/properties/grant/properties/grantRef/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err58]}else{vErrors.push(err58)}errors++}if(func1(data13)<1){const err59={instancePath:instancePath+"/grant/grantRef",schemaPath:"#/properties/grant/properties/grantRef/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err59]}else{vErrors.push(err59)}errors++}if(!pattern119.test(data13)){const err60={instancePath:instancePath+"/grant/grantRef",schemaPath:"#/properties/grant/properties/grantRef/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u0020\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u0020\\u007f]+$"'};if(vErrors===null){vErrors=[err60]}else{vErrors.push(err60)}errors++}}else{const err61={instancePath:instancePath+"/grant/grantRef",schemaPath:"#/properties/grant/properties/grantRef/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err61]}else{vErrors.push(err61)}errors++}}if(data12.version!==void 0){let data14=data12.version;if(!(typeof data14=="number"&&!(data14%1)&&!isNaN(data14)&&isFinite(data14))){const err62={instancePath:instancePath+"/grant/version",schemaPath:"#/properties/grant/properties/version/type",keyword:"type",params:{type:"integer"},message:"must be integer"};if(vErrors===null){vErrors=[err62]}else{vErrors.push(err62)}errors++}if(typeof data14=="number"&&isFinite(data14)){if(data14>2147483647||isNaN(data14)){const err63={instancePath:instancePath+"/grant/version",schemaPath:"#/properties/grant/properties/version/maximum",keyword:"maximum",params:{comparison:"<=",limit:2147483647},message:"must be <= 2147483647"};if(vErrors===null){vErrors=[err63]}else{vErrors.push(err63)}errors++}if(data14<1||isNaN(data14)){const err64={instancePath:instancePath+"/grant/version",schemaPath:"#/properties/grant/properties/version/minimum",keyword:"minimum",params:{comparison:">=",limit:1},message:"must be >= 1"};if(vErrors===null){vErrors=[err64]}else{vErrors.push(err64)}errors++}}}if(data12.eventType!==void 0){let data15=data12.eventType;if(typeof data15==="string"){if(func1(data15)>256){const err65={instancePath:instancePath+"/grant/eventType",schemaPath:"#/properties/grant/properties/eventType/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err65]}else{vErrors.push(err65)}errors++}if(!pattern158.test(data15)){const err66={instancePath:instancePath+"/grant/eventType",schemaPath:"#/properties/grant/properties/eventType/pattern",keyword:"pattern",params:{pattern:"^[A-Za-z0-9][A-Za-z0-9._-]*\\.v[1-9][0-9]*$"},message:'must match pattern "^[A-Za-z0-9][A-Za-z0-9._-]*\\.v[1-9][0-9]*$"'};if(vErrors===null){vErrors=[err66]}else{vErrors.push(err66)}errors++}}else{const err67={instancePath:instancePath+"/grant/eventType",schemaPath:"#/properties/grant/properties/eventType/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err67]}else{vErrors.push(err67)}errors++}}if(data12.consumerRef!==void 0){let data16=data12.consumerRef;if(typeof data16==="string"){if(func1(data16)>256){const err68={instancePath:instancePath+"/grant/consumerRef",schemaPath:"#/properties/grant/properties/consumerRef/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err68]}else{vErrors.push(err68)}errors++}if(func1(data16)<1){const err69={instancePath:instancePath+"/grant/consumerRef",schemaPath:"#/properties/grant/properties/consumerRef/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err69]}else{vErrors.push(err69)}errors++}if(!pattern119.test(data16)){const err70={instancePath:instancePath+"/grant/consumerRef",schemaPath:"#/properties/grant/properties/consumerRef/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u0020\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u0020\\u007f]+$"'};if(vErrors===null){vErrors=[err70]}else{vErrors.push(err70)}errors++}}else{const err71={instancePath:instancePath+"/grant/consumerRef",schemaPath:"#/properties/grant/properties/consumerRef/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err71]}else{vErrors.push(err71)}errors++}}}else{const err72={instancePath:instancePath+"/grant",schemaPath:"#/properties/grant/type",keyword:"type",params:{type:"object"},message:"must be object"};if(vErrors===null){vErrors=[err72]}else{vErrors.push(err72)}errors++}}if(data.status!==void 0){let data17=data.status;if(!(data17==="ACTIVE"||data17==="REVOKED")){const err73={instancePath:instancePath+"/status",schemaPath:"#/properties/status/enum",keyword:"enum",params:{allowedValues:schema87.properties.status.enum},message:"must be equal to one of the allowed values"};if(vErrors===null){vErrors=[err73]}else{vErrors.push(err73)}errors++}}}else{const err74={instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};if(vErrors===null){vErrors=[err74]}else{vErrors.push(err74)}errors++}validate43.errors=vErrors;return errors===0}validate43.evaluated={props:true,dynamicProps:false,dynamicItems:false};var eventLinkAuthorizationRequest=validate44;var schema89={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://eventsdk.dev/schemas/v1/event-link-authorization-request.schema.json",title:"EventLinkAuthorizationRequest",type:"object",additionalProperties:false,required:["profile","response_type","client_id","redirect_uri","scope","state","code_challenge","code_challenge_method","request_id","source","event_type","grant_ref","grant_version"],properties:{profile:{const:"event-link/1"},response_type:{const:"code"},client_id:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u0020\\u007f]+$"},redirect_uri:{type:"string",format:"uri",maxLength:2048},scope:{const:"eventsdk.connection.authorize"},state:{type:"string",minLength:32,maxLength:512,pattern:"^[A-Za-z0-9_-]+$"},code_challenge:{type:"string",minLength:43,maxLength:43,pattern:"^[A-Za-z0-9_-]+$"},code_challenge_method:{const:"S256"},request_id:{$ref:"exchange-registration.schema.json#/properties/requestId"},source:{$ref:"exchange-registration.schema.json#/properties/source"},event_type:{$ref:"exchange-registration.schema.json#/properties/grant/properties/eventType"},grant_ref:{$ref:"exchange-registration.schema.json#/properties/grant/properties/grantRef"},grant_version:{const:"1"}}};function validate44(data,{instancePath="",parentData,parentDataProperty,rootData=data,dynamicAnchors={}}={}){let vErrors=null;let errors=0;const evaluated0=validate44.evaluated;if(evaluated0.dynamicProps){evaluated0.props=void 0}if(evaluated0.dynamicItems){evaluated0.items=void 0}if(data&&typeof data=="object"&&!Array.isArray(data)){if(data.profile===void 0){const err0={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"profile"},message:"must have required property 'profile'"};if(vErrors===null){vErrors=[err0]}else{vErrors.push(err0)}errors++}if(data.response_type===void 0){const err1={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"response_type"},message:"must have required property 'response_type'"};if(vErrors===null){vErrors=[err1]}else{vErrors.push(err1)}errors++}if(data.client_id===void 0){const err2={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"client_id"},message:"must have required property 'client_id'"};if(vErrors===null){vErrors=[err2]}else{vErrors.push(err2)}errors++}if(data.redirect_uri===void 0){const err3={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"redirect_uri"},message:"must have required property 'redirect_uri'"};if(vErrors===null){vErrors=[err3]}else{vErrors.push(err3)}errors++}if(data.scope===void 0){const err4={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"scope"},message:"must have required property 'scope'"};if(vErrors===null){vErrors=[err4]}else{vErrors.push(err4)}errors++}if(data.state===void 0){const err5={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"state"},message:"must have required property 'state'"};if(vErrors===null){vErrors=[err5]}else{vErrors.push(err5)}errors++}if(data.code_challenge===void 0){const err6={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"code_challenge"},message:"must have required property 'code_challenge'"};if(vErrors===null){vErrors=[err6]}else{vErrors.push(err6)}errors++}if(data.code_challenge_method===void 0){const err7={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"code_challenge_method"},message:"must have required property 'code_challenge_method'"};if(vErrors===null){vErrors=[err7]}else{vErrors.push(err7)}errors++}if(data.request_id===void 0){const err8={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"request_id"},message:"must have required property 'request_id'"};if(vErrors===null){vErrors=[err8]}else{vErrors.push(err8)}errors++}if(data.source===void 0){const err9={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"source"},message:"must have required property 'source'"};if(vErrors===null){vErrors=[err9]}else{vErrors.push(err9)}errors++}if(data.event_type===void 0){const err10={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"event_type"},message:"must have required property 'event_type'"};if(vErrors===null){vErrors=[err10]}else{vErrors.push(err10)}errors++}if(data.grant_ref===void 0){const err11={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"grant_ref"},message:"must have required property 'grant_ref'"};if(vErrors===null){vErrors=[err11]}else{vErrors.push(err11)}errors++}if(data.grant_version===void 0){const err12={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"grant_version"},message:"must have required property 'grant_version'"};if(vErrors===null){vErrors=[err12]}else{vErrors.push(err12)}errors++}for(const key0 in data){if(!func11.call(schema89.properties,key0)){const err13={instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key0},message:"must NOT have additional properties"};if(vErrors===null){vErrors=[err13]}else{vErrors.push(err13)}errors++}}if(data.profile!==void 0){if("event-link/1"!==data.profile){const err14={instancePath:instancePath+"/profile",schemaPath:"#/properties/profile/const",keyword:"const",params:{allowedValue:"event-link/1"},message:"must be equal to constant"};if(vErrors===null){vErrors=[err14]}else{vErrors.push(err14)}errors++}}if(data.response_type!==void 0){if("code"!==data.response_type){const err15={instancePath:instancePath+"/response_type",schemaPath:"#/properties/response_type/const",keyword:"const",params:{allowedValue:"code"},message:"must be equal to constant"};if(vErrors===null){vErrors=[err15]}else{vErrors.push(err15)}errors++}}if(data.client_id!==void 0){let data2=data.client_id;if(typeof data2==="string"){if(func1(data2)>256){const err16={instancePath:instancePath+"/client_id",schemaPath:"#/properties/client_id/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err16]}else{vErrors.push(err16)}errors++}if(func1(data2)<1){const err17={instancePath:instancePath+"/client_id",schemaPath:"#/properties/client_id/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err17]}else{vErrors.push(err17)}errors++}if(!pattern119.test(data2)){const err18={instancePath:instancePath+"/client_id",schemaPath:"#/properties/client_id/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u0020\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u0020\\u007f]+$"'};if(vErrors===null){vErrors=[err18]}else{vErrors.push(err18)}errors++}}else{const err19={instancePath:instancePath+"/client_id",schemaPath:"#/properties/client_id/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err19]}else{vErrors.push(err19)}errors++}}if(data.redirect_uri!==void 0){let data3=data.redirect_uri;if(typeof data3==="string"){if(func1(data3)>2048){const err20={instancePath:instancePath+"/redirect_uri",schemaPath:"#/properties/redirect_uri/maxLength",keyword:"maxLength",params:{limit:2048},message:"must NOT have more than 2048 characters"};if(vErrors===null){vErrors=[err20]}else{vErrors.push(err20)}errors++}if(!formats0(data3)){const err21={instancePath:instancePath+"/redirect_uri",schemaPath:"#/properties/redirect_uri/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};if(vErrors===null){vErrors=[err21]}else{vErrors.push(err21)}errors++}}else{const err22={instancePath:instancePath+"/redirect_uri",schemaPath:"#/properties/redirect_uri/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err22]}else{vErrors.push(err22)}errors++}}if(data.scope!==void 0){if("eventsdk.connection.authorize"!==data.scope){const err23={instancePath:instancePath+"/scope",schemaPath:"#/properties/scope/const",keyword:"const",params:{allowedValue:"eventsdk.connection.authorize"},message:"must be equal to constant"};if(vErrors===null){vErrors=[err23]}else{vErrors.push(err23)}errors++}}if(data.state!==void 0){let data5=data.state;if(typeof data5==="string"){if(func1(data5)>512){const err24={instancePath:instancePath+"/state",schemaPath:"#/properties/state/maxLength",keyword:"maxLength",params:{limit:512},message:"must NOT have more than 512 characters"};if(vErrors===null){vErrors=[err24]}else{vErrors.push(err24)}errors++}if(func1(data5)<32){const err25={instancePath:instancePath+"/state",schemaPath:"#/properties/state/minLength",keyword:"minLength",params:{limit:32},message:"must NOT have fewer than 32 characters"};if(vErrors===null){vErrors=[err25]}else{vErrors.push(err25)}errors++}if(!pattern129.test(data5)){const err26={instancePath:instancePath+"/state",schemaPath:"#/properties/state/pattern",keyword:"pattern",params:{pattern:"^[A-Za-z0-9_-]+$"},message:'must match pattern "^[A-Za-z0-9_-]+$"'};if(vErrors===null){vErrors=[err26]}else{vErrors.push(err26)}errors++}}else{const err27={instancePath:instancePath+"/state",schemaPath:"#/properties/state/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err27]}else{vErrors.push(err27)}errors++}}if(data.code_challenge!==void 0){let data6=data.code_challenge;if(typeof data6==="string"){if(func1(data6)>43){const err28={instancePath:instancePath+"/code_challenge",schemaPath:"#/properties/code_challenge/maxLength",keyword:"maxLength",params:{limit:43},message:"must NOT have more than 43 characters"};if(vErrors===null){vErrors=[err28]}else{vErrors.push(err28)}errors++}if(func1(data6)<43){const err29={instancePath:instancePath+"/code_challenge",schemaPath:"#/properties/code_challenge/minLength",keyword:"minLength",params:{limit:43},message:"must NOT have fewer than 43 characters"};if(vErrors===null){vErrors=[err29]}else{vErrors.push(err29)}errors++}if(!pattern129.test(data6)){const err30={instancePath:instancePath+"/code_challenge",schemaPath:"#/properties/code_challenge/pattern",keyword:"pattern",params:{pattern:"^[A-Za-z0-9_-]+$"},message:'must match pattern "^[A-Za-z0-9_-]+$"'};if(vErrors===null){vErrors=[err30]}else{vErrors.push(err30)}errors++}}else{const err31={instancePath:instancePath+"/code_challenge",schemaPath:"#/properties/code_challenge/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err31]}else{vErrors.push(err31)}errors++}}if(data.code_challenge_method!==void 0){if("S256"!==data.code_challenge_method){const err32={instancePath:instancePath+"/code_challenge_method",schemaPath:"#/properties/code_challenge_method/const",keyword:"const",params:{allowedValue:"S256"},message:"must be equal to constant"};if(vErrors===null){vErrors=[err32]}else{vErrors.push(err32)}errors++}}if(data.request_id!==void 0){let data8=data.request_id;if(typeof data8==="string"){if(func1(data8)>256){const err33={instancePath:instancePath+"/request_id",schemaPath:"exchange-registration.schema.json#/properties/requestId/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err33]}else{vErrors.push(err33)}errors++}if(func1(data8)<1){const err34={instancePath:instancePath+"/request_id",schemaPath:"exchange-registration.schema.json#/properties/requestId/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err34]}else{vErrors.push(err34)}errors++}if(!pattern119.test(data8)){const err35={instancePath:instancePath+"/request_id",schemaPath:"exchange-registration.schema.json#/properties/requestId/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u0020\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u0020\\u007f]+$"'};if(vErrors===null){vErrors=[err35]}else{vErrors.push(err35)}errors++}}else{const err36={instancePath:instancePath+"/request_id",schemaPath:"exchange-registration.schema.json#/properties/requestId/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err36]}else{vErrors.push(err36)}errors++}}if(data.source!==void 0){let data9=data.source;if(data9&&typeof data9=="object"&&!Array.isArray(data9)){if(data9.source===void 0){const err37={instancePath:instancePath+"/source",schemaPath:"exchange-registration.schema.json#/properties/source/required",keyword:"required",params:{missingProperty:"source"},message:"must have required property 'source'"};if(vErrors===null){vErrors=[err37]}else{vErrors.push(err37)}errors++}if(data9.serviceRef===void 0){const err38={instancePath:instancePath+"/source",schemaPath:"exchange-registration.schema.json#/properties/source/required",keyword:"required",params:{missingProperty:"serviceRef"},message:"must have required property 'serviceRef'"};if(vErrors===null){vErrors=[err38]}else{vErrors.push(err38)}errors++}if(data9.tenantRef===void 0){const err39={instancePath:instancePath+"/source",schemaPath:"exchange-registration.schema.json#/properties/source/required",keyword:"required",params:{missingProperty:"tenantRef"},message:"must have required property 'tenantRef'"};if(vErrors===null){vErrors=[err39]}else{vErrors.push(err39)}errors++}if(data9.issuer===void 0){const err40={instancePath:instancePath+"/source",schemaPath:"exchange-registration.schema.json#/properties/source/required",keyword:"required",params:{missingProperty:"issuer"},message:"must have required property 'issuer'"};if(vErrors===null){vErrors=[err40]}else{vErrors.push(err40)}errors++}if(data9.subject===void 0){const err41={instancePath:instancePath+"/source",schemaPath:"exchange-registration.schema.json#/properties/source/required",keyword:"required",params:{missingProperty:"subject"},message:"must have required property 'subject'"};if(vErrors===null){vErrors=[err41]}else{vErrors.push(err41)}errors++}for(const key1 in data9){if(!(key1==="source"||key1==="serviceRef"||key1==="tenantRef"||key1==="issuer"||key1==="subject")){const err42={instancePath:instancePath+"/source",schemaPath:"exchange-registration.schema.json#/properties/source/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key1},message:"must NOT have additional properties"};if(vErrors===null){vErrors=[err42]}else{vErrors.push(err42)}errors++}}if(data9.source!==void 0){let data10=data9.source;if(typeof data10==="string"){if(func1(data10)>2048){const err43={instancePath:instancePath+"/source/source",schemaPath:"exchange-registration.schema.json#/properties/source/properties/source/maxLength",keyword:"maxLength",params:{limit:2048},message:"must NOT have more than 2048 characters"};if(vErrors===null){vErrors=[err43]}else{vErrors.push(err43)}errors++}if(!formats0(data10)){const err44={instancePath:instancePath+"/source/source",schemaPath:"exchange-registration.schema.json#/properties/source/properties/source/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};if(vErrors===null){vErrors=[err44]}else{vErrors.push(err44)}errors++}}else{const err45={instancePath:instancePath+"/source/source",schemaPath:"exchange-registration.schema.json#/properties/source/properties/source/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err45]}else{vErrors.push(err45)}errors++}}if(data9.serviceRef!==void 0){let data11=data9.serviceRef;if(typeof data11==="string"){if(func1(data11)>256){const err46={instancePath:instancePath+"/source/serviceRef",schemaPath:"exchange-registration.schema.json#/properties/source/properties/serviceRef/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err46]}else{vErrors.push(err46)}errors++}if(func1(data11)<1){const err47={instancePath:instancePath+"/source/serviceRef",schemaPath:"exchange-registration.schema.json#/properties/source/properties/serviceRef/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err47]}else{vErrors.push(err47)}errors++}if(!pattern119.test(data11)){const err48={instancePath:instancePath+"/source/serviceRef",schemaPath:"exchange-registration.schema.json#/properties/source/properties/serviceRef/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u0020\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u0020\\u007f]+$"'};if(vErrors===null){vErrors=[err48]}else{vErrors.push(err48)}errors++}}else{const err49={instancePath:instancePath+"/source/serviceRef",schemaPath:"exchange-registration.schema.json#/properties/source/properties/serviceRef/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err49]}else{vErrors.push(err49)}errors++}}if(data9.tenantRef!==void 0){let data12=data9.tenantRef;if(typeof data12==="string"){if(func1(data12)>256){const err50={instancePath:instancePath+"/source/tenantRef",schemaPath:"exchange-registration.schema.json#/properties/source/properties/tenantRef/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err50]}else{vErrors.push(err50)}errors++}if(func1(data12)<1){const err51={instancePath:instancePath+"/source/tenantRef",schemaPath:"exchange-registration.schema.json#/properties/source/properties/tenantRef/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err51]}else{vErrors.push(err51)}errors++}if(!pattern119.test(data12)){const err52={instancePath:instancePath+"/source/tenantRef",schemaPath:"exchange-registration.schema.json#/properties/source/properties/tenantRef/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u0020\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u0020\\u007f]+$"'};if(vErrors===null){vErrors=[err52]}else{vErrors.push(err52)}errors++}}else{const err53={instancePath:instancePath+"/source/tenantRef",schemaPath:"exchange-registration.schema.json#/properties/source/properties/tenantRef/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err53]}else{vErrors.push(err53)}errors++}}if(data9.issuer!==void 0){let data13=data9.issuer;if(typeof data13==="string"){if(func1(data13)>2048){const err54={instancePath:instancePath+"/source/issuer",schemaPath:"exchange-registration.schema.json#/properties/source/properties/issuer/maxLength",keyword:"maxLength",params:{limit:2048},message:"must NOT have more than 2048 characters"};if(vErrors===null){vErrors=[err54]}else{vErrors.push(err54)}errors++}if(!formats0(data13)){const err55={instancePath:instancePath+"/source/issuer",schemaPath:"exchange-registration.schema.json#/properties/source/properties/issuer/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};if(vErrors===null){vErrors=[err55]}else{vErrors.push(err55)}errors++}}else{const err56={instancePath:instancePath+"/source/issuer",schemaPath:"exchange-registration.schema.json#/properties/source/properties/issuer/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err56]}else{vErrors.push(err56)}errors++}}if(data9.subject!==void 0){let data14=data9.subject;if(typeof data14==="string"){if(func1(data14)>256){const err57={instancePath:instancePath+"/source/subject",schemaPath:"exchange-registration.schema.json#/properties/source/properties/subject/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err57]}else{vErrors.push(err57)}errors++}if(func1(data14)<1){const err58={instancePath:instancePath+"/source/subject",schemaPath:"exchange-registration.schema.json#/properties/source/properties/subject/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err58]}else{vErrors.push(err58)}errors++}if(!pattern119.test(data14)){const err59={instancePath:instancePath+"/source/subject",schemaPath:"exchange-registration.schema.json#/properties/source/properties/subject/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u0020\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u0020\\u007f]+$"'};if(vErrors===null){vErrors=[err59]}else{vErrors.push(err59)}errors++}}else{const err60={instancePath:instancePath+"/source/subject",schemaPath:"exchange-registration.schema.json#/properties/source/properties/subject/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err60]}else{vErrors.push(err60)}errors++}}}else{const err61={instancePath:instancePath+"/source",schemaPath:"exchange-registration.schema.json#/properties/source/type",keyword:"type",params:{type:"object"},message:"must be object"};if(vErrors===null){vErrors=[err61]}else{vErrors.push(err61)}errors++}}if(data.event_type!==void 0){let data15=data.event_type;if(typeof data15==="string"){if(func1(data15)>256){const err62={instancePath:instancePath+"/event_type",schemaPath:"exchange-registration.schema.json#/properties/grant/properties/eventType/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err62]}else{vErrors.push(err62)}errors++}if(!pattern158.test(data15)){const err63={instancePath:instancePath+"/event_type",schemaPath:"exchange-registration.schema.json#/properties/grant/properties/eventType/pattern",keyword:"pattern",params:{pattern:"^[A-Za-z0-9][A-Za-z0-9._-]*\\.v[1-9][0-9]*$"},message:'must match pattern "^[A-Za-z0-9][A-Za-z0-9._-]*\\.v[1-9][0-9]*$"'};if(vErrors===null){vErrors=[err63]}else{vErrors.push(err63)}errors++}}else{const err64={instancePath:instancePath+"/event_type",schemaPath:"exchange-registration.schema.json#/properties/grant/properties/eventType/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err64]}else{vErrors.push(err64)}errors++}}if(data.grant_ref!==void 0){let data16=data.grant_ref;if(typeof data16==="string"){if(func1(data16)>256){const err65={instancePath:instancePath+"/grant_ref",schemaPath:"exchange-registration.schema.json#/properties/grant/properties/grantRef/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err65]}else{vErrors.push(err65)}errors++}if(func1(data16)<1){const err66={instancePath:instancePath+"/grant_ref",schemaPath:"exchange-registration.schema.json#/properties/grant/properties/grantRef/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err66]}else{vErrors.push(err66)}errors++}if(!pattern119.test(data16)){const err67={instancePath:instancePath+"/grant_ref",schemaPath:"exchange-registration.schema.json#/properties/grant/properties/grantRef/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u0020\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u0020\\u007f]+$"'};if(vErrors===null){vErrors=[err67]}else{vErrors.push(err67)}errors++}}else{const err68={instancePath:instancePath+"/grant_ref",schemaPath:"exchange-registration.schema.json#/properties/grant/properties/grantRef/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err68]}else{vErrors.push(err68)}errors++}}if(data.grant_version!==void 0){if("1"!==data.grant_version){const err69={instancePath:instancePath+"/grant_version",schemaPath:"#/properties/grant_version/const",keyword:"const",params:{allowedValue:"1"},message:"must be equal to constant"};if(vErrors===null){vErrors=[err69]}else{vErrors.push(err69)}errors++}}}else{const err70={instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};if(vErrors===null){vErrors=[err70]}else{vErrors.push(err70)}errors++}validate44.errors=vErrors;return errors===0}validate44.evaluated={props:true,dynamicProps:false,dynamicItems:false};var eventLinkTokenRequest=validate45;var pattern171=new RegExp("^[A-Za-z0-9._~-]+$","u");function validate45(data,{instancePath="",parentData,parentDataProperty,rootData=data,dynamicAnchors={}}={}){let vErrors=null;let errors=0;const evaluated0=validate45.evaluated;if(evaluated0.dynamicProps){evaluated0.props=void 0}if(evaluated0.dynamicItems){evaluated0.items=void 0}if(data&&typeof data=="object"&&!Array.isArray(data)){if(data.grant_type===void 0){const err0={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"grant_type"},message:"must have required property 'grant_type'"};if(vErrors===null){vErrors=[err0]}else{vErrors.push(err0)}errors++}if(data.client_id===void 0){const err1={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"client_id"},message:"must have required property 'client_id'"};if(vErrors===null){vErrors=[err1]}else{vErrors.push(err1)}errors++}if(data.redirect_uri===void 0){const err2={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"redirect_uri"},message:"must have required property 'redirect_uri'"};if(vErrors===null){vErrors=[err2]}else{vErrors.push(err2)}errors++}if(data.code===void 0){const err3={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"code"},message:"must have required property 'code'"};if(vErrors===null){vErrors=[err3]}else{vErrors.push(err3)}errors++}if(data.code_verifier===void 0){const err4={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"code_verifier"},message:"must have required property 'code_verifier'"};if(vErrors===null){vErrors=[err4]}else{vErrors.push(err4)}errors++}for(const key0 in data){if(!(key0==="grant_type"||key0==="client_id"||key0==="redirect_uri"||key0==="code"||key0==="code_verifier")){const err5={instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key0},message:"must NOT have additional properties"};if(vErrors===null){vErrors=[err5]}else{vErrors.push(err5)}errors++}}if(data.grant_type!==void 0){if("authorization_code"!==data.grant_type){const err6={instancePath:instancePath+"/grant_type",schemaPath:"#/properties/grant_type/const",keyword:"const",params:{allowedValue:"authorization_code"},message:"must be equal to constant"};if(vErrors===null){vErrors=[err6]}else{vErrors.push(err6)}errors++}}if(data.client_id!==void 0){let data1=data.client_id;if(typeof data1==="string"){if(func1(data1)>256){const err7={instancePath:instancePath+"/client_id",schemaPath:"#/properties/client_id/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err7]}else{vErrors.push(err7)}errors++}if(func1(data1)<1){const err8={instancePath:instancePath+"/client_id",schemaPath:"#/properties/client_id/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err8]}else{vErrors.push(err8)}errors++}if(!pattern119.test(data1)){const err9={instancePath:instancePath+"/client_id",schemaPath:"#/properties/client_id/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u0020\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u0020\\u007f]+$"'};if(vErrors===null){vErrors=[err9]}else{vErrors.push(err9)}errors++}}else{const err10={instancePath:instancePath+"/client_id",schemaPath:"#/properties/client_id/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err10]}else{vErrors.push(err10)}errors++}}if(data.redirect_uri!==void 0){let data2=data.redirect_uri;if(typeof data2==="string"){if(func1(data2)>2048){const err11={instancePath:instancePath+"/redirect_uri",schemaPath:"#/properties/redirect_uri/maxLength",keyword:"maxLength",params:{limit:2048},message:"must NOT have more than 2048 characters"};if(vErrors===null){vErrors=[err11]}else{vErrors.push(err11)}errors++}if(!formats0(data2)){const err12={instancePath:instancePath+"/redirect_uri",schemaPath:"#/properties/redirect_uri/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};if(vErrors===null){vErrors=[err12]}else{vErrors.push(err12)}errors++}}else{const err13={instancePath:instancePath+"/redirect_uri",schemaPath:"#/properties/redirect_uri/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err13]}else{vErrors.push(err13)}errors++}}if(data.code!==void 0){let data3=data.code;if(typeof data3==="string"){if(func1(data3)>256){const err14={instancePath:instancePath+"/code",schemaPath:"#/properties/code/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err14]}else{vErrors.push(err14)}errors++}if(func1(data3)<32){const err15={instancePath:instancePath+"/code",schemaPath:"#/properties/code/minLength",keyword:"minLength",params:{limit:32},message:"must NOT have fewer than 32 characters"};if(vErrors===null){vErrors=[err15]}else{vErrors.push(err15)}errors++}if(!pattern129.test(data3)){const err16={instancePath:instancePath+"/code",schemaPath:"#/properties/code/pattern",keyword:"pattern",params:{pattern:"^[A-Za-z0-9_-]+$"},message:'must match pattern "^[A-Za-z0-9_-]+$"'};if(vErrors===null){vErrors=[err16]}else{vErrors.push(err16)}errors++}}else{const err17={instancePath:instancePath+"/code",schemaPath:"#/properties/code/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err17]}else{vErrors.push(err17)}errors++}}if(data.code_verifier!==void 0){let data4=data.code_verifier;if(typeof data4==="string"){if(func1(data4)>128){const err18={instancePath:instancePath+"/code_verifier",schemaPath:"#/properties/code_verifier/maxLength",keyword:"maxLength",params:{limit:128},message:"must NOT have more than 128 characters"};if(vErrors===null){vErrors=[err18]}else{vErrors.push(err18)}errors++}if(func1(data4)<43){const err19={instancePath:instancePath+"/code_verifier",schemaPath:"#/properties/code_verifier/minLength",keyword:"minLength",params:{limit:43},message:"must NOT have fewer than 43 characters"};if(vErrors===null){vErrors=[err19]}else{vErrors.push(err19)}errors++}if(!pattern171.test(data4)){const err20={instancePath:instancePath+"/code_verifier",schemaPath:"#/properties/code_verifier/pattern",keyword:"pattern",params:{pattern:"^[A-Za-z0-9._~-]+$"},message:'must match pattern "^[A-Za-z0-9._~-]+$"'};if(vErrors===null){vErrors=[err20]}else{vErrors.push(err20)}errors++}}else{const err21={instancePath:instancePath+"/code_verifier",schemaPath:"#/properties/code_verifier/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err21]}else{vErrors.push(err21)}errors++}}}else{const err22={instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};if(vErrors===null){vErrors=[err22]}else{vErrors.push(err22)}errors++}validate45.errors=vErrors;return errors===0}validate45.evaluated={props:true,dynamicProps:false,dynamicItems:false};var eventLinkProposal=validate46;var schema95={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://eventsdk.dev/schemas/v1/event-link-proposal.schema.json",title:"EventLinkProposal",type:"object",additionalProperties:false,required:["schemaVersion","requestId","source","target","grant","connectionRef","targetDisplayName","approvalRef","expiresAt"],properties:{schemaVersion:{const:1},requestId:{$ref:"exchange-registration.schema.json#/properties/requestId"},source:{$ref:"exchange-registration.schema.json#/properties/source"},target:{$ref:"exchange-registration.schema.json#/properties/target"},grant:{type:"object",additionalProperties:false,required:["grantRef","version","eventType","consumerRef"],properties:{grantRef:{$ref:"exchange-registration.schema.json#/properties/grant/properties/grantRef"},version:{const:1},eventType:{$ref:"exchange-registration.schema.json#/properties/grant/properties/eventType"},consumerRef:{$ref:"exchange-registration.schema.json#/properties/grant/properties/consumerRef"}}},connectionRef:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u0020\\u007f]+$"},targetDisplayName:{type:"string",minLength:1,maxLength:160,pattern:"\\S"},approvalRef:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u0020\\u007f]+$"},expiresAt:{type:"string",format:"date-time"}}};var pattern182=new RegExp("\\S","u");function validate46(data,{instancePath="",parentData,parentDataProperty,rootData=data,dynamicAnchors={}}={}){let vErrors=null;let errors=0;const evaluated0=validate46.evaluated;if(evaluated0.dynamicProps){evaluated0.props=void 0}if(evaluated0.dynamicItems){evaluated0.items=void 0}if(data&&typeof data=="object"&&!Array.isArray(data)){if(data.schemaVersion===void 0){const err0={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"schemaVersion"},message:"must have required property 'schemaVersion'"};if(vErrors===null){vErrors=[err0]}else{vErrors.push(err0)}errors++}if(data.requestId===void 0){const err1={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"requestId"},message:"must have required property 'requestId'"};if(vErrors===null){vErrors=[err1]}else{vErrors.push(err1)}errors++}if(data.source===void 0){const err2={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"source"},message:"must have required property 'source'"};if(vErrors===null){vErrors=[err2]}else{vErrors.push(err2)}errors++}if(data.target===void 0){const err3={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"target"},message:"must have required property 'target'"};if(vErrors===null){vErrors=[err3]}else{vErrors.push(err3)}errors++}if(data.grant===void 0){const err4={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"grant"},message:"must have required property 'grant'"};if(vErrors===null){vErrors=[err4]}else{vErrors.push(err4)}errors++}if(data.connectionRef===void 0){const err5={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"connectionRef"},message:"must have required property 'connectionRef'"};if(vErrors===null){vErrors=[err5]}else{vErrors.push(err5)}errors++}if(data.targetDisplayName===void 0){const err6={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"targetDisplayName"},message:"must have required property 'targetDisplayName'"};if(vErrors===null){vErrors=[err6]}else{vErrors.push(err6)}errors++}if(data.approvalRef===void 0){const err7={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"approvalRef"},message:"must have required property 'approvalRef'"};if(vErrors===null){vErrors=[err7]}else{vErrors.push(err7)}errors++}if(data.expiresAt===void 0){const err8={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"expiresAt"},message:"must have required property 'expiresAt'"};if(vErrors===null){vErrors=[err8]}else{vErrors.push(err8)}errors++}for(const key0 in data){if(!func11.call(schema95.properties,key0)){const err9={instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key0},message:"must NOT have additional properties"};if(vErrors===null){vErrors=[err9]}else{vErrors.push(err9)}errors++}}if(data.schemaVersion!==void 0){if(1!==data.schemaVersion){const err10={instancePath:instancePath+"/schemaVersion",schemaPath:"#/properties/schemaVersion/const",keyword:"const",params:{allowedValue:1},message:"must be equal to constant"};if(vErrors===null){vErrors=[err10]}else{vErrors.push(err10)}errors++}}if(data.requestId!==void 0){let data1=data.requestId;if(typeof data1==="string"){if(func1(data1)>256){const err11={instancePath:instancePath+"/requestId",schemaPath:"exchange-registration.schema.json#/properties/requestId/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err11]}else{vErrors.push(err11)}errors++}if(func1(data1)<1){const err12={instancePath:instancePath+"/requestId",schemaPath:"exchange-registration.schema.json#/properties/requestId/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err12]}else{vErrors.push(err12)}errors++}if(!pattern119.test(data1)){const err13={instancePath:instancePath+"/requestId",schemaPath:"exchange-registration.schema.json#/properties/requestId/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u0020\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u0020\\u007f]+$"'};if(vErrors===null){vErrors=[err13]}else{vErrors.push(err13)}errors++}}else{const err14={instancePath:instancePath+"/requestId",schemaPath:"exchange-registration.schema.json#/properties/requestId/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err14]}else{vErrors.push(err14)}errors++}}if(data.source!==void 0){let data2=data.source;if(data2&&typeof data2=="object"&&!Array.isArray(data2)){if(data2.source===void 0){const err15={instancePath:instancePath+"/source",schemaPath:"exchange-registration.schema.json#/properties/source/required",keyword:"required",params:{missingProperty:"source"},message:"must have required property 'source'"};if(vErrors===null){vErrors=[err15]}else{vErrors.push(err15)}errors++}if(data2.serviceRef===void 0){const err16={instancePath:instancePath+"/source",schemaPath:"exchange-registration.schema.json#/properties/source/required",keyword:"required",params:{missingProperty:"serviceRef"},message:"must have required property 'serviceRef'"};if(vErrors===null){vErrors=[err16]}else{vErrors.push(err16)}errors++}if(data2.tenantRef===void 0){const err17={instancePath:instancePath+"/source",schemaPath:"exchange-registration.schema.json#/properties/source/required",keyword:"required",params:{missingProperty:"tenantRef"},message:"must have required property 'tenantRef'"};if(vErrors===null){vErrors=[err17]}else{vErrors.push(err17)}errors++}if(data2.issuer===void 0){const err18={instancePath:instancePath+"/source",schemaPath:"exchange-registration.schema.json#/properties/source/required",keyword:"required",params:{missingProperty:"issuer"},message:"must have required property 'issuer'"};if(vErrors===null){vErrors=[err18]}else{vErrors.push(err18)}errors++}if(data2.subject===void 0){const err19={instancePath:instancePath+"/source",schemaPath:"exchange-registration.schema.json#/properties/source/required",keyword:"required",params:{missingProperty:"subject"},message:"must have required property 'subject'"};if(vErrors===null){vErrors=[err19]}else{vErrors.push(err19)}errors++}for(const key1 in data2){if(!(key1==="source"||key1==="serviceRef"||key1==="tenantRef"||key1==="issuer"||key1==="subject")){const err20={instancePath:instancePath+"/source",schemaPath:"exchange-registration.schema.json#/properties/source/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key1},message:"must NOT have additional properties"};if(vErrors===null){vErrors=[err20]}else{vErrors.push(err20)}errors++}}if(data2.source!==void 0){let data3=data2.source;if(typeof data3==="string"){if(func1(data3)>2048){const err21={instancePath:instancePath+"/source/source",schemaPath:"exchange-registration.schema.json#/properties/source/properties/source/maxLength",keyword:"maxLength",params:{limit:2048},message:"must NOT have more than 2048 characters"};if(vErrors===null){vErrors=[err21]}else{vErrors.push(err21)}errors++}if(!formats0(data3)){const err22={instancePath:instancePath+"/source/source",schemaPath:"exchange-registration.schema.json#/properties/source/properties/source/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};if(vErrors===null){vErrors=[err22]}else{vErrors.push(err22)}errors++}}else{const err23={instancePath:instancePath+"/source/source",schemaPath:"exchange-registration.schema.json#/properties/source/properties/source/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err23]}else{vErrors.push(err23)}errors++}}if(data2.serviceRef!==void 0){let data4=data2.serviceRef;if(typeof data4==="string"){if(func1(data4)>256){const err24={instancePath:instancePath+"/source/serviceRef",schemaPath:"exchange-registration.schema.json#/properties/source/properties/serviceRef/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err24]}else{vErrors.push(err24)}errors++}if(func1(data4)<1){const err25={instancePath:instancePath+"/source/serviceRef",schemaPath:"exchange-registration.schema.json#/properties/source/properties/serviceRef/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err25]}else{vErrors.push(err25)}errors++}if(!pattern119.test(data4)){const err26={instancePath:instancePath+"/source/serviceRef",schemaPath:"exchange-registration.schema.json#/properties/source/properties/serviceRef/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u0020\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u0020\\u007f]+$"'};if(vErrors===null){vErrors=[err26]}else{vErrors.push(err26)}errors++}}else{const err27={instancePath:instancePath+"/source/serviceRef",schemaPath:"exchange-registration.schema.json#/properties/source/properties/serviceRef/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err27]}else{vErrors.push(err27)}errors++}}if(data2.tenantRef!==void 0){let data5=data2.tenantRef;if(typeof data5==="string"){if(func1(data5)>256){const err28={instancePath:instancePath+"/source/tenantRef",schemaPath:"exchange-registration.schema.json#/properties/source/properties/tenantRef/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err28]}else{vErrors.push(err28)}errors++}if(func1(data5)<1){const err29={instancePath:instancePath+"/source/tenantRef",schemaPath:"exchange-registration.schema.json#/properties/source/properties/tenantRef/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err29]}else{vErrors.push(err29)}errors++}if(!pattern119.test(data5)){const err30={instancePath:instancePath+"/source/tenantRef",schemaPath:"exchange-registration.schema.json#/properties/source/properties/tenantRef/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u0020\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u0020\\u007f]+$"'};if(vErrors===null){vErrors=[err30]}else{vErrors.push(err30)}errors++}}else{const err31={instancePath:instancePath+"/source/tenantRef",schemaPath:"exchange-registration.schema.json#/properties/source/properties/tenantRef/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err31]}else{vErrors.push(err31)}errors++}}if(data2.issuer!==void 0){let data6=data2.issuer;if(typeof data6==="string"){if(func1(data6)>2048){const err32={instancePath:instancePath+"/source/issuer",schemaPath:"exchange-registration.schema.json#/properties/source/properties/issuer/maxLength",keyword:"maxLength",params:{limit:2048},message:"must NOT have more than 2048 characters"};if(vErrors===null){vErrors=[err32]}else{vErrors.push(err32)}errors++}if(!formats0(data6)){const err33={instancePath:instancePath+"/source/issuer",schemaPath:"exchange-registration.schema.json#/properties/source/properties/issuer/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};if(vErrors===null){vErrors=[err33]}else{vErrors.push(err33)}errors++}}else{const err34={instancePath:instancePath+"/source/issuer",schemaPath:"exchange-registration.schema.json#/properties/source/properties/issuer/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err34]}else{vErrors.push(err34)}errors++}}if(data2.subject!==void 0){let data7=data2.subject;if(typeof data7==="string"){if(func1(data7)>256){const err35={instancePath:instancePath+"/source/subject",schemaPath:"exchange-registration.schema.json#/properties/source/properties/subject/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err35]}else{vErrors.push(err35)}errors++}if(func1(data7)<1){const err36={instancePath:instancePath+"/source/subject",schemaPath:"exchange-registration.schema.json#/properties/source/properties/subject/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err36]}else{vErrors.push(err36)}errors++}if(!pattern119.test(data7)){const err37={instancePath:instancePath+"/source/subject",schemaPath:"exchange-registration.schema.json#/properties/source/properties/subject/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u0020\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u0020\\u007f]+$"'};if(vErrors===null){vErrors=[err37]}else{vErrors.push(err37)}errors++}}else{const err38={instancePath:instancePath+"/source/subject",schemaPath:"exchange-registration.schema.json#/properties/source/properties/subject/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err38]}else{vErrors.push(err38)}errors++}}}else{const err39={instancePath:instancePath+"/source",schemaPath:"exchange-registration.schema.json#/properties/source/type",keyword:"type",params:{type:"object"},message:"must be object"};if(vErrors===null){vErrors=[err39]}else{vErrors.push(err39)}errors++}}if(data.target!==void 0){let data8=data.target;if(data8&&typeof data8=="object"&&!Array.isArray(data8)){if(data8.serviceRef===void 0){const err40={instancePath:instancePath+"/target",schemaPath:"exchange-registration.schema.json#/properties/target/required",keyword:"required",params:{missingProperty:"serviceRef"},message:"must have required property 'serviceRef'"};if(vErrors===null){vErrors=[err40]}else{vErrors.push(err40)}errors++}if(data8.tenantRef===void 0){const err41={instancePath:instancePath+"/target",schemaPath:"exchange-registration.schema.json#/properties/target/required",keyword:"required",params:{missingProperty:"tenantRef"},message:"must have required property 'tenantRef'"};if(vErrors===null){vErrors=[err41]}else{vErrors.push(err41)}errors++}for(const key2 in data8){if(!(key2==="serviceRef"||key2==="tenantRef")){const err42={instancePath:instancePath+"/target",schemaPath:"exchange-registration.schema.json#/properties/target/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key2},message:"must NOT have additional properties"};if(vErrors===null){vErrors=[err42]}else{vErrors.push(err42)}errors++}}if(data8.serviceRef!==void 0){let data9=data8.serviceRef;if(typeof data9==="string"){if(func1(data9)>256){const err43={instancePath:instancePath+"/target/serviceRef",schemaPath:"exchange-registration.schema.json#/properties/target/properties/serviceRef/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err43]}else{vErrors.push(err43)}errors++}if(func1(data9)<1){const err44={instancePath:instancePath+"/target/serviceRef",schemaPath:"exchange-registration.schema.json#/properties/target/properties/serviceRef/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err44]}else{vErrors.push(err44)}errors++}if(!pattern4.test(data9)){const err45={instancePath:instancePath+"/target/serviceRef",schemaPath:"exchange-registration.schema.json#/properties/target/properties/serviceRef/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err45]}else{vErrors.push(err45)}errors++}}else{const err46={instancePath:instancePath+"/target/serviceRef",schemaPath:"exchange-registration.schema.json#/properties/target/properties/serviceRef/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err46]}else{vErrors.push(err46)}errors++}}if(data8.tenantRef!==void 0){let data10=data8.tenantRef;if(typeof data10==="string"){if(func1(data10)>256){const err47={instancePath:instancePath+"/target/tenantRef",schemaPath:"exchange-registration.schema.json#/properties/target/properties/tenantRef/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err47]}else{vErrors.push(err47)}errors++}if(func1(data10)<1){const err48={instancePath:instancePath+"/target/tenantRef",schemaPath:"exchange-registration.schema.json#/properties/target/properties/tenantRef/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err48]}else{vErrors.push(err48)}errors++}if(!pattern4.test(data10)){const err49={instancePath:instancePath+"/target/tenantRef",schemaPath:"exchange-registration.schema.json#/properties/target/properties/tenantRef/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u001f\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u001f\\u007f]+$"'};if(vErrors===null){vErrors=[err49]}else{vErrors.push(err49)}errors++}}else{const err50={instancePath:instancePath+"/target/tenantRef",schemaPath:"exchange-registration.schema.json#/properties/target/properties/tenantRef/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err50]}else{vErrors.push(err50)}errors++}}}else{const err51={instancePath:instancePath+"/target",schemaPath:"exchange-registration.schema.json#/properties/target/type",keyword:"type",params:{type:"object"},message:"must be object"};if(vErrors===null){vErrors=[err51]}else{vErrors.push(err51)}errors++}}if(data.grant!==void 0){let data11=data.grant;if(data11&&typeof data11=="object"&&!Array.isArray(data11)){if(data11.grantRef===void 0){const err52={instancePath:instancePath+"/grant",schemaPath:"#/properties/grant/required",keyword:"required",params:{missingProperty:"grantRef"},message:"must have required property 'grantRef'"};if(vErrors===null){vErrors=[err52]}else{vErrors.push(err52)}errors++}if(data11.version===void 0){const err53={instancePath:instancePath+"/grant",schemaPath:"#/properties/grant/required",keyword:"required",params:{missingProperty:"version"},message:"must have required property 'version'"};if(vErrors===null){vErrors=[err53]}else{vErrors.push(err53)}errors++}if(data11.eventType===void 0){const err54={instancePath:instancePath+"/grant",schemaPath:"#/properties/grant/required",keyword:"required",params:{missingProperty:"eventType"},message:"must have required property 'eventType'"};if(vErrors===null){vErrors=[err54]}else{vErrors.push(err54)}errors++}if(data11.consumerRef===void 0){const err55={instancePath:instancePath+"/grant",schemaPath:"#/properties/grant/required",keyword:"required",params:{missingProperty:"consumerRef"},message:"must have required property 'consumerRef'"};if(vErrors===null){vErrors=[err55]}else{vErrors.push(err55)}errors++}for(const key3 in data11){if(!(key3==="grantRef"||key3==="version"||key3==="eventType"||key3==="consumerRef")){const err56={instancePath:instancePath+"/grant",schemaPath:"#/properties/grant/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key3},message:"must NOT have additional properties"};if(vErrors===null){vErrors=[err56]}else{vErrors.push(err56)}errors++}}if(data11.grantRef!==void 0){let data12=data11.grantRef;if(typeof data12==="string"){if(func1(data12)>256){const err57={instancePath:instancePath+"/grant/grantRef",schemaPath:"exchange-registration.schema.json#/properties/grant/properties/grantRef/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err57]}else{vErrors.push(err57)}errors++}if(func1(data12)<1){const err58={instancePath:instancePath+"/grant/grantRef",schemaPath:"exchange-registration.schema.json#/properties/grant/properties/grantRef/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err58]}else{vErrors.push(err58)}errors++}if(!pattern119.test(data12)){const err59={instancePath:instancePath+"/grant/grantRef",schemaPath:"exchange-registration.schema.json#/properties/grant/properties/grantRef/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u0020\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u0020\\u007f]+$"'};if(vErrors===null){vErrors=[err59]}else{vErrors.push(err59)}errors++}}else{const err60={instancePath:instancePath+"/grant/grantRef",schemaPath:"exchange-registration.schema.json#/properties/grant/properties/grantRef/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err60]}else{vErrors.push(err60)}errors++}}if(data11.version!==void 0){if(1!==data11.version){const err61={instancePath:instancePath+"/grant/version",schemaPath:"#/properties/grant/properties/version/const",keyword:"const",params:{allowedValue:1},message:"must be equal to constant"};if(vErrors===null){vErrors=[err61]}else{vErrors.push(err61)}errors++}}if(data11.eventType!==void 0){let data14=data11.eventType;if(typeof data14==="string"){if(func1(data14)>256){const err62={instancePath:instancePath+"/grant/eventType",schemaPath:"exchange-registration.schema.json#/properties/grant/properties/eventType/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err62]}else{vErrors.push(err62)}errors++}if(!pattern158.test(data14)){const err63={instancePath:instancePath+"/grant/eventType",schemaPath:"exchange-registration.schema.json#/properties/grant/properties/eventType/pattern",keyword:"pattern",params:{pattern:"^[A-Za-z0-9][A-Za-z0-9._-]*\\.v[1-9][0-9]*$"},message:'must match pattern "^[A-Za-z0-9][A-Za-z0-9._-]*\\.v[1-9][0-9]*$"'};if(vErrors===null){vErrors=[err63]}else{vErrors.push(err63)}errors++}}else{const err64={instancePath:instancePath+"/grant/eventType",schemaPath:"exchange-registration.schema.json#/properties/grant/properties/eventType/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err64]}else{vErrors.push(err64)}errors++}}if(data11.consumerRef!==void 0){let data15=data11.consumerRef;if(typeof data15==="string"){if(func1(data15)>256){const err65={instancePath:instancePath+"/grant/consumerRef",schemaPath:"exchange-registration.schema.json#/properties/grant/properties/consumerRef/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err65]}else{vErrors.push(err65)}errors++}if(func1(data15)<1){const err66={instancePath:instancePath+"/grant/consumerRef",schemaPath:"exchange-registration.schema.json#/properties/grant/properties/consumerRef/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err66]}else{vErrors.push(err66)}errors++}if(!pattern119.test(data15)){const err67={instancePath:instancePath+"/grant/consumerRef",schemaPath:"exchange-registration.schema.json#/properties/grant/properties/consumerRef/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u0020\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u0020\\u007f]+$"'};if(vErrors===null){vErrors=[err67]}else{vErrors.push(err67)}errors++}}else{const err68={instancePath:instancePath+"/grant/consumerRef",schemaPath:"exchange-registration.schema.json#/properties/grant/properties/consumerRef/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err68]}else{vErrors.push(err68)}errors++}}}else{const err69={instancePath:instancePath+"/grant",schemaPath:"#/properties/grant/type",keyword:"type",params:{type:"object"},message:"must be object"};if(vErrors===null){vErrors=[err69]}else{vErrors.push(err69)}errors++}}if(data.connectionRef!==void 0){let data16=data.connectionRef;if(typeof data16==="string"){if(func1(data16)>256){const err70={instancePath:instancePath+"/connectionRef",schemaPath:"#/properties/connectionRef/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err70]}else{vErrors.push(err70)}errors++}if(func1(data16)<1){const err71={instancePath:instancePath+"/connectionRef",schemaPath:"#/properties/connectionRef/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err71]}else{vErrors.push(err71)}errors++}if(!pattern119.test(data16)){const err72={instancePath:instancePath+"/connectionRef",schemaPath:"#/properties/connectionRef/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u0020\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u0020\\u007f]+$"'};if(vErrors===null){vErrors=[err72]}else{vErrors.push(err72)}errors++}}else{const err73={instancePath:instancePath+"/connectionRef",schemaPath:"#/properties/connectionRef/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err73]}else{vErrors.push(err73)}errors++}}if(data.targetDisplayName!==void 0){let data17=data.targetDisplayName;if(typeof data17==="string"){if(func1(data17)>160){const err74={instancePath:instancePath+"/targetDisplayName",schemaPath:"#/properties/targetDisplayName/maxLength",keyword:"maxLength",params:{limit:160},message:"must NOT have more than 160 characters"};if(vErrors===null){vErrors=[err74]}else{vErrors.push(err74)}errors++}if(func1(data17)<1){const err75={instancePath:instancePath+"/targetDisplayName",schemaPath:"#/properties/targetDisplayName/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err75]}else{vErrors.push(err75)}errors++}if(!pattern182.test(data17)){const err76={instancePath:instancePath+"/targetDisplayName",schemaPath:"#/properties/targetDisplayName/pattern",keyword:"pattern",params:{pattern:"\\S"},message:'must match pattern "\\S"'};if(vErrors===null){vErrors=[err76]}else{vErrors.push(err76)}errors++}}else{const err77={instancePath:instancePath+"/targetDisplayName",schemaPath:"#/properties/targetDisplayName/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err77]}else{vErrors.push(err77)}errors++}}if(data.approvalRef!==void 0){let data18=data.approvalRef;if(typeof data18==="string"){if(func1(data18)>256){const err78={instancePath:instancePath+"/approvalRef",schemaPath:"#/properties/approvalRef/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err78]}else{vErrors.push(err78)}errors++}if(func1(data18)<1){const err79={instancePath:instancePath+"/approvalRef",schemaPath:"#/properties/approvalRef/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err79]}else{vErrors.push(err79)}errors++}if(!pattern119.test(data18)){const err80={instancePath:instancePath+"/approvalRef",schemaPath:"#/properties/approvalRef/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u0020\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u0020\\u007f]+$"'};if(vErrors===null){vErrors=[err80]}else{vErrors.push(err80)}errors++}}else{const err81={instancePath:instancePath+"/approvalRef",schemaPath:"#/properties/approvalRef/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err81]}else{vErrors.push(err81)}errors++}}if(data.expiresAt!==void 0){let data19=data.expiresAt;if(typeof data19==="string"){if(!formats2.validate(data19)){const err82={instancePath:instancePath+"/expiresAt",schemaPath:"#/properties/expiresAt/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};if(vErrors===null){vErrors=[err82]}else{vErrors.push(err82)}errors++}}else{const err83={instancePath:instancePath+"/expiresAt",schemaPath:"#/properties/expiresAt/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err83]}else{vErrors.push(err83)}errors++}}}else{const err84={instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};if(vErrors===null){vErrors=[err84]}else{vErrors.push(err84)}errors++}validate46.errors=vErrors;return errors===0}validate46.evaluated={props:true,dynamicProps:false,dynamicItems:false};var outboxRecoveryCommand=validate47;function validate47(data,{instancePath="",parentData,parentDataProperty,rootData=data,dynamicAnchors={}}={}){let vErrors=null;let errors=0;const evaluated0=validate47.evaluated;if(evaluated0.dynamicProps){evaluated0.props=void 0}if(evaluated0.dynamicItems){evaluated0.items=void 0}if(data&&typeof data=="object"&&!Array.isArray(data)){if(data.schemaVersion===void 0){const err0={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"schemaVersion"},message:"must have required property 'schemaVersion'"};if(vErrors===null){vErrors=[err0]}else{vErrors.push(err0)}errors++}if(data.requestId===void 0){const err1={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"requestId"},message:"must have required property 'requestId'"};if(vErrors===null){vErrors=[err1]}else{vErrors.push(err1)}errors++}if(data.source===void 0){const err2={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"source"},message:"must have required property 'source'"};if(vErrors===null){vErrors=[err2]}else{vErrors.push(err2)}errors++}if(data.id===void 0){const err3={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};if(vErrors===null){vErrors=[err3]}else{vErrors.push(err3)}errors++}if(data.deliveryid===void 0){const err4={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"deliveryid"},message:"must have required property 'deliveryid'"};if(vErrors===null){vErrors=[err4]}else{vErrors.push(err4)}errors++}if(data.expectedGeneration===void 0){const err5={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"expectedGeneration"},message:"must have required property 'expectedGeneration'"};if(vErrors===null){vErrors=[err5]}else{vErrors.push(err5)}errors++}for(const key0 in data){if(!(key0==="schemaVersion"||key0==="requestId"||key0==="source"||key0==="id"||key0==="deliveryid"||key0==="expectedGeneration")){const err6={instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key0},message:"must NOT have additional properties"};if(vErrors===null){vErrors=[err6]}else{vErrors.push(err6)}errors++}}if(data.schemaVersion!==void 0){if(1!==data.schemaVersion){const err7={instancePath:instancePath+"/schemaVersion",schemaPath:"#/properties/schemaVersion/const",keyword:"const",params:{allowedValue:1},message:"must be equal to constant"};if(vErrors===null){vErrors=[err7]}else{vErrors.push(err7)}errors++}}if(data.requestId!==void 0){let data1=data.requestId;if(typeof data1==="string"){if(func1(data1)>256){const err8={instancePath:instancePath+"/requestId",schemaPath:"#/properties/requestId/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err8]}else{vErrors.push(err8)}errors++}if(func1(data1)<1){const err9={instancePath:instancePath+"/requestId",schemaPath:"#/properties/requestId/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err9]}else{vErrors.push(err9)}errors++}if(!pattern119.test(data1)){const err10={instancePath:instancePath+"/requestId",schemaPath:"#/properties/requestId/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u0020\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u0020\\u007f]+$"'};if(vErrors===null){vErrors=[err10]}else{vErrors.push(err10)}errors++}}else{const err11={instancePath:instancePath+"/requestId",schemaPath:"#/properties/requestId/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err11]}else{vErrors.push(err11)}errors++}}if(data.source!==void 0){let data2=data.source;if(typeof data2==="string"){if(func1(data2)>2048){const err12={instancePath:instancePath+"/source",schemaPath:"#/properties/source/maxLength",keyword:"maxLength",params:{limit:2048},message:"must NOT have more than 2048 characters"};if(vErrors===null){vErrors=[err12]}else{vErrors.push(err12)}errors++}if(!formats0(data2)){const err13={instancePath:instancePath+"/source",schemaPath:"#/properties/source/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};if(vErrors===null){vErrors=[err13]}else{vErrors.push(err13)}errors++}}else{const err14={instancePath:instancePath+"/source",schemaPath:"#/properties/source/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err14]}else{vErrors.push(err14)}errors++}}if(data.id!==void 0){let data3=data.id;if(typeof data3==="string"){if(func1(data3)>256){const err15={instancePath:instancePath+"/id",schemaPath:"#/properties/id/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err15]}else{vErrors.push(err15)}errors++}if(func1(data3)<1){const err16={instancePath:instancePath+"/id",schemaPath:"#/properties/id/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err16]}else{vErrors.push(err16)}errors++}if(!pattern119.test(data3)){const err17={instancePath:instancePath+"/id",schemaPath:"#/properties/id/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u0020\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u0020\\u007f]+$"'};if(vErrors===null){vErrors=[err17]}else{vErrors.push(err17)}errors++}}else{const err18={instancePath:instancePath+"/id",schemaPath:"#/properties/id/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err18]}else{vErrors.push(err18)}errors++}}if(data.deliveryid!==void 0){let data4=data.deliveryid;if(typeof data4==="string"){if(!pattern117.test(data4)){const err19={instancePath:instancePath+"/deliveryid",schemaPath:"#/properties/deliveryid/pattern",keyword:"pattern",params:{pattern:"^[a-f0-9]{64}$"},message:'must match pattern "^[a-f0-9]{64}$"'};if(vErrors===null){vErrors=[err19]}else{vErrors.push(err19)}errors++}}else{const err20={instancePath:instancePath+"/deliveryid",schemaPath:"#/properties/deliveryid/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err20]}else{vErrors.push(err20)}errors++}}if(data.expectedGeneration!==void 0){let data5=data.expectedGeneration;if(!(typeof data5=="number"&&!(data5%1)&&!isNaN(data5)&&isFinite(data5))){const err21={instancePath:instancePath+"/expectedGeneration",schemaPath:"#/properties/expectedGeneration/type",keyword:"type",params:{type:"integer"},message:"must be integer"};if(vErrors===null){vErrors=[err21]}else{vErrors.push(err21)}errors++}if(typeof data5=="number"&&isFinite(data5)){if(data5>2147483647||isNaN(data5)){const err22={instancePath:instancePath+"/expectedGeneration",schemaPath:"#/properties/expectedGeneration/maximum",keyword:"maximum",params:{comparison:"<=",limit:2147483647},message:"must be <= 2147483647"};if(vErrors===null){vErrors=[err22]}else{vErrors.push(err22)}errors++}if(data5<0||isNaN(data5)){const err23={instancePath:instancePath+"/expectedGeneration",schemaPath:"#/properties/expectedGeneration/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};if(vErrors===null){vErrors=[err23]}else{vErrors.push(err23)}errors++}}}}else{const err24={instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};if(vErrors===null){vErrors=[err24]}else{vErrors.push(err24)}errors++}validate47.errors=vErrors;return errors===0}validate47.evaluated={props:true,dynamicProps:false,dynamicItems:false};var nodeWorkerObservation=validate48;var schema103={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://eventsdk.dev/schemas/v1/node-worker-observation.schema.json",title:"NodeWorkerObservation",type:"object",additionalProperties:false,required:["schemaVersion","status","connected","at"],properties:{schemaVersion:{const:1},status:{enum:["DISABLED","CONNECTED","RECONNECTING","STOPPED"]},connected:{type:"boolean"},at:{type:"string",format:"date-time"},revision:{type:"string",minLength:1,maxLength:256}}};function validate48(data,{instancePath="",parentData,parentDataProperty,rootData=data,dynamicAnchors={}}={}){let vErrors=null;let errors=0;const evaluated0=validate48.evaluated;if(evaluated0.dynamicProps){evaluated0.props=void 0}if(evaluated0.dynamicItems){evaluated0.items=void 0}if(data&&typeof data=="object"&&!Array.isArray(data)){if(data.schemaVersion===void 0){const err0={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"schemaVersion"},message:"must have required property 'schemaVersion'"};if(vErrors===null){vErrors=[err0]}else{vErrors.push(err0)}errors++}if(data.status===void 0){const err1={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"status"},message:"must have required property 'status'"};if(vErrors===null){vErrors=[err1]}else{vErrors.push(err1)}errors++}if(data.connected===void 0){const err2={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"connected"},message:"must have required property 'connected'"};if(vErrors===null){vErrors=[err2]}else{vErrors.push(err2)}errors++}if(data.at===void 0){const err3={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"at"},message:"must have required property 'at'"};if(vErrors===null){vErrors=[err3]}else{vErrors.push(err3)}errors++}for(const key0 in data){if(!(key0==="schemaVersion"||key0==="status"||key0==="connected"||key0==="at"||key0==="revision")){const err4={instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key0},message:"must NOT have additional properties"};if(vErrors===null){vErrors=[err4]}else{vErrors.push(err4)}errors++}}if(data.schemaVersion!==void 0){if(1!==data.schemaVersion){const err5={instancePath:instancePath+"/schemaVersion",schemaPath:"#/properties/schemaVersion/const",keyword:"const",params:{allowedValue:1},message:"must be equal to constant"};if(vErrors===null){vErrors=[err5]}else{vErrors.push(err5)}errors++}}if(data.status!==void 0){let data1=data.status;if(!(data1==="DISABLED"||data1==="CONNECTED"||data1==="RECONNECTING"||data1==="STOPPED")){const err6={instancePath:instancePath+"/status",schemaPath:"#/properties/status/enum",keyword:"enum",params:{allowedValues:schema103.properties.status.enum},message:"must be equal to one of the allowed values"};if(vErrors===null){vErrors=[err6]}else{vErrors.push(err6)}errors++}}if(data.connected!==void 0){if(typeof data.connected!=="boolean"){const err7={instancePath:instancePath+"/connected",schemaPath:"#/properties/connected/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};if(vErrors===null){vErrors=[err7]}else{vErrors.push(err7)}errors++}}if(data.at!==void 0){let data3=data.at;if(typeof data3==="string"){if(!formats2.validate(data3)){const err8={instancePath:instancePath+"/at",schemaPath:"#/properties/at/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};if(vErrors===null){vErrors=[err8]}else{vErrors.push(err8)}errors++}}else{const err9={instancePath:instancePath+"/at",schemaPath:"#/properties/at/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err9]}else{vErrors.push(err9)}errors++}}if(data.revision!==void 0){let data4=data.revision;if(typeof data4==="string"){if(func1(data4)>256){const err10={instancePath:instancePath+"/revision",schemaPath:"#/properties/revision/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err10]}else{vErrors.push(err10)}errors++}if(func1(data4)<1){const err11={instancePath:instancePath+"/revision",schemaPath:"#/properties/revision/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err11]}else{vErrors.push(err11)}errors++}}else{const err12={instancePath:instancePath+"/revision",schemaPath:"#/properties/revision/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err12]}else{vErrors.push(err12)}errors++}}}else{const err13={instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};if(vErrors===null){vErrors=[err13]}else{vErrors.push(err13)}errors++}validate48.errors=vErrors;return errors===0}validate48.evaluated={props:true,dynamicProps:false,dynamicItems:false};var nativeEventCatalog=validate49;var pattern187=new RegExp("^/","u");function validate49(data,{instancePath="",parentData,parentDataProperty,rootData=data,dynamicAnchors={}}={}){let vErrors=null;let errors=0;const evaluated0=validate49.evaluated;if(evaluated0.dynamicProps){evaluated0.props=void 0}if(evaluated0.dynamicItems){evaluated0.items=void 0}if(data&&typeof data=="object"&&!Array.isArray(data)){if(data.schemaVersion===void 0){const err0={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"schemaVersion"},message:"must have required property 'schemaVersion'"};if(vErrors===null){vErrors=[err0]}else{vErrors.push(err0)}errors++}if(data.serviceRef===void 0){const err1={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"serviceRef"},message:"must have required property 'serviceRef'"};if(vErrors===null){vErrors=[err1]}else{vErrors.push(err1)}errors++}if(data.events===void 0){const err2={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"events"},message:"must have required property 'events'"};if(vErrors===null){vErrors=[err2]}else{vErrors.push(err2)}errors++}for(const key0 in data){if(!(key0==="schemaVersion"||key0==="serviceRef"||key0==="events")){const err3={instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key0},message:"must NOT have additional properties"};if(vErrors===null){vErrors=[err3]}else{vErrors.push(err3)}errors++}}if(data.schemaVersion!==void 0){if(1!==data.schemaVersion){const err4={instancePath:instancePath+"/schemaVersion",schemaPath:"#/properties/schemaVersion/const",keyword:"const",params:{allowedValue:1},message:"must be equal to constant"};if(vErrors===null){vErrors=[err4]}else{vErrors.push(err4)}errors++}}if(data.serviceRef!==void 0){let data1=data.serviceRef;if(typeof data1==="string"){if(func1(data1)>256){const err5={instancePath:instancePath+"/serviceRef",schemaPath:"#/properties/serviceRef/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err5]}else{vErrors.push(err5)}errors++}if(func1(data1)<1){const err6={instancePath:instancePath+"/serviceRef",schemaPath:"#/properties/serviceRef/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err6]}else{vErrors.push(err6)}errors++}}else{const err7={instancePath:instancePath+"/serviceRef",schemaPath:"#/properties/serviceRef/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err7]}else{vErrors.push(err7)}errors++}}if(data.events!==void 0){let data2=data.events;if(Array.isArray(data2)){if(data2.length>100){const err8={instancePath:instancePath+"/events",schemaPath:"#/properties/events/maxItems",keyword:"maxItems",params:{limit:100},message:"must NOT have more than 100 items"};if(vErrors===null){vErrors=[err8]}else{vErrors.push(err8)}errors++}const len0=data2.length;for(let i0=0;i0<len0;i0++){let data3=data2[i0];if(data3&&typeof data3=="object"&&!Array.isArray(data3)){if(data3.type===void 0){const err9={instancePath:instancePath+"/events/"+i0,schemaPath:"#/properties/events/items/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};if(vErrors===null){vErrors=[err9]}else{vErrors.push(err9)}errors++}if(data3.dataschema===void 0){const err10={instancePath:instancePath+"/events/"+i0,schemaPath:"#/properties/events/items/required",keyword:"required",params:{missingProperty:"dataschema"},message:"must have required property 'dataschema'"};if(vErrors===null){vErrors=[err10]}else{vErrors.push(err10)}errors++}if(data3.description===void 0){const err11={instancePath:instancePath+"/events/"+i0,schemaPath:"#/properties/events/items/required",keyword:"required",params:{missingProperty:"description"},message:"must have required property 'description'"};if(vErrors===null){vErrors=[err11]}else{vErrors.push(err11)}errors++}if(data3.dataSchema===void 0){const err12={instancePath:instancePath+"/events/"+i0,schemaPath:"#/properties/events/items/required",keyword:"required",params:{missingProperty:"dataSchema"},message:"must have required property 'dataSchema'"};if(vErrors===null){vErrors=[err12]}else{vErrors.push(err12)}errors++}if(data3.resourceAccess===void 0){const err13={instancePath:instancePath+"/events/"+i0,schemaPath:"#/properties/events/items/required",keyword:"required",params:{missingProperty:"resourceAccess"},message:"must have required property 'resourceAccess'"};if(vErrors===null){vErrors=[err13]}else{vErrors.push(err13)}errors++}for(const key1 in data3){if(!(key1==="type"||key1==="dataschema"||key1==="description"||key1==="dataSchema"||key1==="resourceAccess")){const err14={instancePath:instancePath+"/events/"+i0,schemaPath:"#/properties/events/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key1},message:"must NOT have additional properties"};if(vErrors===null){vErrors=[err14]}else{vErrors.push(err14)}errors++}}if(data3.type!==void 0){let data4=data3.type;if(typeof data4==="string"){if(func1(data4)>256){const err15={instancePath:instancePath+"/events/"+i0+"/type",schemaPath:"#/properties/events/items/properties/type/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err15]}else{vErrors.push(err15)}errors++}if(func1(data4)<1){const err16={instancePath:instancePath+"/events/"+i0+"/type",schemaPath:"#/properties/events/items/properties/type/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err16]}else{vErrors.push(err16)}errors++}}else{const err17={instancePath:instancePath+"/events/"+i0+"/type",schemaPath:"#/properties/events/items/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err17]}else{vErrors.push(err17)}errors++}}if(data3.dataschema!==void 0){let data5=data3.dataschema;if(typeof data5==="string"){if(func1(data5)>2048){const err18={instancePath:instancePath+"/events/"+i0+"/dataschema",schemaPath:"#/properties/events/items/properties/dataschema/maxLength",keyword:"maxLength",params:{limit:2048},message:"must NOT have more than 2048 characters"};if(vErrors===null){vErrors=[err18]}else{vErrors.push(err18)}errors++}if(!formats0(data5)){const err19={instancePath:instancePath+"/events/"+i0+"/dataschema",schemaPath:"#/properties/events/items/properties/dataschema/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};if(vErrors===null){vErrors=[err19]}else{vErrors.push(err19)}errors++}}else{const err20={instancePath:instancePath+"/events/"+i0+"/dataschema",schemaPath:"#/properties/events/items/properties/dataschema/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err20]}else{vErrors.push(err20)}errors++}}if(data3.description!==void 0){let data6=data3.description;if(typeof data6==="string"){if(func1(data6)>2048){const err21={instancePath:instancePath+"/events/"+i0+"/description",schemaPath:"#/properties/events/items/properties/description/maxLength",keyword:"maxLength",params:{limit:2048},message:"must NOT have more than 2048 characters"};if(vErrors===null){vErrors=[err21]}else{vErrors.push(err21)}errors++}if(func1(data6)<1){const err22={instancePath:instancePath+"/events/"+i0+"/description",schemaPath:"#/properties/events/items/properties/description/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err22]}else{vErrors.push(err22)}errors++}}else{const err23={instancePath:instancePath+"/events/"+i0+"/description",schemaPath:"#/properties/events/items/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err23]}else{vErrors.push(err23)}errors++}}if(data3.dataSchema!==void 0){let data7=data3.dataSchema;if(data7&&typeof data7=="object"&&!Array.isArray(data7)){for(const key2 in data7){if(!validate20(data7[key2],{instancePath:instancePath+"/events/"+i0+"/dataSchema/"+key2.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:data7,parentDataProperty:key2,rootData,dynamicAnchors})){vErrors=vErrors===null?validate20.errors:vErrors.concat(validate20.errors);errors=vErrors.length}}}else{const err24={instancePath:instancePath+"/events/"+i0+"/dataSchema",schemaPath:"#/properties/events/items/properties/dataSchema/type",keyword:"type",params:{type:"object"},message:"must be object"};if(vErrors===null){vErrors=[err24]}else{vErrors.push(err24)}errors++}}if(data3.resourceAccess!==void 0){let data9=data3.resourceAccess;if(data9&&typeof data9=="object"&&!Array.isArray(data9)){if(data9.providerPath===void 0){const err25={instancePath:instancePath+"/events/"+i0+"/resourceAccess",schemaPath:"#/properties/events/items/properties/resourceAccess/required",keyword:"required",params:{missingProperty:"providerPath"},message:"must have required property 'providerPath'"};if(vErrors===null){vErrors=[err25]}else{vErrors.push(err25)}errors++}if(data9.tools===void 0){const err26={instancePath:instancePath+"/events/"+i0+"/resourceAccess",schemaPath:"#/properties/events/items/properties/resourceAccess/required",keyword:"required",params:{missingProperty:"tools"},message:"must have required property 'tools'"};if(vErrors===null){vErrors=[err26]}else{vErrors.push(err26)}errors++}for(const key3 in data9){if(!(key3==="providerPath"||key3==="tools")){const err27={instancePath:instancePath+"/events/"+i0+"/resourceAccess",schemaPath:"#/properties/events/items/properties/resourceAccess/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key3},message:"must NOT have additional properties"};if(vErrors===null){vErrors=[err27]}else{vErrors.push(err27)}errors++}}if(data9.providerPath!==void 0){let data10=data9.providerPath;if(typeof data10==="string"){if(func1(data10)>2048){const err28={instancePath:instancePath+"/events/"+i0+"/resourceAccess/providerPath",schemaPath:"#/properties/events/items/properties/resourceAccess/properties/providerPath/maxLength",keyword:"maxLength",params:{limit:2048},message:"must NOT have more than 2048 characters"};if(vErrors===null){vErrors=[err28]}else{vErrors.push(err28)}errors++}if(!pattern187.test(data10)){const err29={instancePath:instancePath+"/events/"+i0+"/resourceAccess/providerPath",schemaPath:"#/properties/events/items/properties/resourceAccess/properties/providerPath/pattern",keyword:"pattern",params:{pattern:"^/"},message:'must match pattern "^/"'};if(vErrors===null){vErrors=[err29]}else{vErrors.push(err29)}errors++}}else{const err30={instancePath:instancePath+"/events/"+i0+"/resourceAccess/providerPath",schemaPath:"#/properties/events/items/properties/resourceAccess/properties/providerPath/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err30]}else{vErrors.push(err30)}errors++}}if(data9.tools!==void 0){let data11=data9.tools;if(Array.isArray(data11)){if(data11.length>32){const err31={instancePath:instancePath+"/events/"+i0+"/resourceAccess/tools",schemaPath:"#/properties/events/items/properties/resourceAccess/properties/tools/maxItems",keyword:"maxItems",params:{limit:32},message:"must NOT have more than 32 items"};if(vErrors===null){vErrors=[err31]}else{vErrors.push(err31)}errors++}if(data11.length<1){const err32={instancePath:instancePath+"/events/"+i0+"/resourceAccess/tools",schemaPath:"#/properties/events/items/properties/resourceAccess/properties/tools/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};if(vErrors===null){vErrors=[err32]}else{vErrors.push(err32)}errors++}const len1=data11.length;for(let i1=0;i1<len1;i1++){let data12=data11[i1];if(typeof data12==="string"){if(func1(data12)>256){const err33={instancePath:instancePath+"/events/"+i0+"/resourceAccess/tools/"+i1,schemaPath:"#/properties/events/items/properties/resourceAccess/properties/tools/items/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err33]}else{vErrors.push(err33)}errors++}if(func1(data12)<1){const err34={instancePath:instancePath+"/events/"+i0+"/resourceAccess/tools/"+i1,schemaPath:"#/properties/events/items/properties/resourceAccess/properties/tools/items/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err34]}else{vErrors.push(err34)}errors++}}else{const err35={instancePath:instancePath+"/events/"+i0+"/resourceAccess/tools/"+i1,schemaPath:"#/properties/events/items/properties/resourceAccess/properties/tools/items/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err35]}else{vErrors.push(err35)}errors++}}let i2=data11.length;let j0;if(i2>1){const indices0={};for(;i2--;){let item0=data11[i2];if(typeof item0!=="string"){continue}if(typeof indices0[item0]=="number"){j0=indices0[item0];const err36={instancePath:instancePath+"/events/"+i0+"/resourceAccess/tools",schemaPath:"#/properties/events/items/properties/resourceAccess/properties/tools/uniqueItems",keyword:"uniqueItems",params:{i:i2,j:j0},message:"must NOT have duplicate items (items ## "+j0+" and "+i2+" are identical)"};if(vErrors===null){vErrors=[err36]}else{vErrors.push(err36)}errors++;break}indices0[item0]=i2}}}else{const err37={instancePath:instancePath+"/events/"+i0+"/resourceAccess/tools",schemaPath:"#/properties/events/items/properties/resourceAccess/properties/tools/type",keyword:"type",params:{type:"array"},message:"must be array"};if(vErrors===null){vErrors=[err37]}else{vErrors.push(err37)}errors++}}}else{const err38={instancePath:instancePath+"/events/"+i0+"/resourceAccess",schemaPath:"#/properties/events/items/properties/resourceAccess/type",keyword:"type",params:{type:"object"},message:"must be object"};if(vErrors===null){vErrors=[err38]}else{vErrors.push(err38)}errors++}}}else{const err39={instancePath:instancePath+"/events/"+i0,schemaPath:"#/properties/events/items/type",keyword:"type",params:{type:"object"},message:"must be object"};if(vErrors===null){vErrors=[err39]}else{vErrors.push(err39)}errors++}}}else{const err40={instancePath:instancePath+"/events",schemaPath:"#/properties/events/type",keyword:"type",params:{type:"array"},message:"must be array"};if(vErrors===null){vErrors=[err40]}else{vErrors.push(err40)}errors++}}}else{const err41={instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};if(vErrors===null){vErrors=[err41]}else{vErrors.push(err41)}errors++}validate49.errors=vErrors;return errors===0}validate49.evaluated={props:true,dynamicProps:false,dynamicItems:false};var gapBaseline=validate51;var schema105={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://eventsdk.dev/schemas/v1/gap-baseline.schema.json",title:"GapBaseline",type:"object",additionalProperties:false,required:["schemaVersion","baselineRef","source","sourceTenant","targetService","targetTenant","connectionRef","grantRef","grantVersion","previousWatermark","retainedThrough","watermark","sourceRevision","createdAt","readModel","directoryRef"],properties:{schemaVersion:{const:1},baselineRef:{type:"string",format:"uri",maxLength:2048},source:{type:"string",format:"uri",maxLength:2048},sourceTenant:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u0020\\u007f]+$"},targetService:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u0020\\u007f]+$"},targetTenant:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u0020\\u007f]+$"},connectionRef:{type:"string",minLength:1,maxLength:128,pattern:"^[^\\u0000-\\u0020\\u007f]+$"},grantRef:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u0020\\u007f]+$"},grantVersion:{type:"integer",minimum:1,maximum:2147483647},previousWatermark:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u0020\\u007f]+$"},retainedThrough:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u0020\\u007f]+$"},watermark:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u0020\\u007f]+$"},sourceRevision:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u0020\\u007f]+$"},createdAt:{type:"string",format:"date-time",maxLength:64},readModel:{const:"AUTHORITATIVE_ON_DEMAND"},directoryRef:{type:"string",format:"uri",maxLength:2048}}};function validate51(data,{instancePath="",parentData,parentDataProperty,rootData=data,dynamicAnchors={}}={}){let vErrors=null;let errors=0;const evaluated0=validate51.evaluated;if(evaluated0.dynamicProps){evaluated0.props=void 0}if(evaluated0.dynamicItems){evaluated0.items=void 0}if(data&&typeof data=="object"&&!Array.isArray(data)){if(data.schemaVersion===void 0){const err0={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"schemaVersion"},message:"must have required property 'schemaVersion'"};if(vErrors===null){vErrors=[err0]}else{vErrors.push(err0)}errors++}if(data.baselineRef===void 0){const err1={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"baselineRef"},message:"must have required property 'baselineRef'"};if(vErrors===null){vErrors=[err1]}else{vErrors.push(err1)}errors++}if(data.source===void 0){const err2={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"source"},message:"must have required property 'source'"};if(vErrors===null){vErrors=[err2]}else{vErrors.push(err2)}errors++}if(data.sourceTenant===void 0){const err3={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"sourceTenant"},message:"must have required property 'sourceTenant'"};if(vErrors===null){vErrors=[err3]}else{vErrors.push(err3)}errors++}if(data.targetService===void 0){const err4={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"targetService"},message:"must have required property 'targetService'"};if(vErrors===null){vErrors=[err4]}else{vErrors.push(err4)}errors++}if(data.targetTenant===void 0){const err5={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"targetTenant"},message:"must have required property 'targetTenant'"};if(vErrors===null){vErrors=[err5]}else{vErrors.push(err5)}errors++}if(data.connectionRef===void 0){const err6={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"connectionRef"},message:"must have required property 'connectionRef'"};if(vErrors===null){vErrors=[err6]}else{vErrors.push(err6)}errors++}if(data.grantRef===void 0){const err7={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"grantRef"},message:"must have required property 'grantRef'"};if(vErrors===null){vErrors=[err7]}else{vErrors.push(err7)}errors++}if(data.grantVersion===void 0){const err8={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"grantVersion"},message:"must have required property 'grantVersion'"};if(vErrors===null){vErrors=[err8]}else{vErrors.push(err8)}errors++}if(data.previousWatermark===void 0){const err9={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"previousWatermark"},message:"must have required property 'previousWatermark'"};if(vErrors===null){vErrors=[err9]}else{vErrors.push(err9)}errors++}if(data.retainedThrough===void 0){const err10={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"retainedThrough"},message:"must have required property 'retainedThrough'"};if(vErrors===null){vErrors=[err10]}else{vErrors.push(err10)}errors++}if(data.watermark===void 0){const err11={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"watermark"},message:"must have required property 'watermark'"};if(vErrors===null){vErrors=[err11]}else{vErrors.push(err11)}errors++}if(data.sourceRevision===void 0){const err12={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"sourceRevision"},message:"must have required property 'sourceRevision'"};if(vErrors===null){vErrors=[err12]}else{vErrors.push(err12)}errors++}if(data.createdAt===void 0){const err13={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"createdAt"},message:"must have required property 'createdAt'"};if(vErrors===null){vErrors=[err13]}else{vErrors.push(err13)}errors++}if(data.readModel===void 0){const err14={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"readModel"},message:"must have required property 'readModel'"};if(vErrors===null){vErrors=[err14]}else{vErrors.push(err14)}errors++}if(data.directoryRef===void 0){const err15={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"directoryRef"},message:"must have required property 'directoryRef'"};if(vErrors===null){vErrors=[err15]}else{vErrors.push(err15)}errors++}for(const key0 in data){if(!func11.call(schema105.properties,key0)){const err16={instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key0},message:"must NOT have additional properties"};if(vErrors===null){vErrors=[err16]}else{vErrors.push(err16)}errors++}}if(data.schemaVersion!==void 0){if(1!==data.schemaVersion){const err17={instancePath:instancePath+"/schemaVersion",schemaPath:"#/properties/schemaVersion/const",keyword:"const",params:{allowedValue:1},message:"must be equal to constant"};if(vErrors===null){vErrors=[err17]}else{vErrors.push(err17)}errors++}}if(data.baselineRef!==void 0){let data1=data.baselineRef;if(typeof data1==="string"){if(func1(data1)>2048){const err18={instancePath:instancePath+"/baselineRef",schemaPath:"#/properties/baselineRef/maxLength",keyword:"maxLength",params:{limit:2048},message:"must NOT have more than 2048 characters"};if(vErrors===null){vErrors=[err18]}else{vErrors.push(err18)}errors++}if(!formats0(data1)){const err19={instancePath:instancePath+"/baselineRef",schemaPath:"#/properties/baselineRef/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};if(vErrors===null){vErrors=[err19]}else{vErrors.push(err19)}errors++}}else{const err20={instancePath:instancePath+"/baselineRef",schemaPath:"#/properties/baselineRef/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err20]}else{vErrors.push(err20)}errors++}}if(data.source!==void 0){let data2=data.source;if(typeof data2==="string"){if(func1(data2)>2048){const err21={instancePath:instancePath+"/source",schemaPath:"#/properties/source/maxLength",keyword:"maxLength",params:{limit:2048},message:"must NOT have more than 2048 characters"};if(vErrors===null){vErrors=[err21]}else{vErrors.push(err21)}errors++}if(!formats0(data2)){const err22={instancePath:instancePath+"/source",schemaPath:"#/properties/source/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};if(vErrors===null){vErrors=[err22]}else{vErrors.push(err22)}errors++}}else{const err23={instancePath:instancePath+"/source",schemaPath:"#/properties/source/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err23]}else{vErrors.push(err23)}errors++}}if(data.sourceTenant!==void 0){let data3=data.sourceTenant;if(typeof data3==="string"){if(func1(data3)>256){const err24={instancePath:instancePath+"/sourceTenant",schemaPath:"#/properties/sourceTenant/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err24]}else{vErrors.push(err24)}errors++}if(func1(data3)<1){const err25={instancePath:instancePath+"/sourceTenant",schemaPath:"#/properties/sourceTenant/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err25]}else{vErrors.push(err25)}errors++}if(!pattern119.test(data3)){const err26={instancePath:instancePath+"/sourceTenant",schemaPath:"#/properties/sourceTenant/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u0020\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u0020\\u007f]+$"'};if(vErrors===null){vErrors=[err26]}else{vErrors.push(err26)}errors++}}else{const err27={instancePath:instancePath+"/sourceTenant",schemaPath:"#/properties/sourceTenant/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err27]}else{vErrors.push(err27)}errors++}}if(data.targetService!==void 0){let data4=data.targetService;if(typeof data4==="string"){if(func1(data4)>256){const err28={instancePath:instancePath+"/targetService",schemaPath:"#/properties/targetService/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err28]}else{vErrors.push(err28)}errors++}if(func1(data4)<1){const err29={instancePath:instancePath+"/targetService",schemaPath:"#/properties/targetService/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err29]}else{vErrors.push(err29)}errors++}if(!pattern119.test(data4)){const err30={instancePath:instancePath+"/targetService",schemaPath:"#/properties/targetService/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u0020\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u0020\\u007f]+$"'};if(vErrors===null){vErrors=[err30]}else{vErrors.push(err30)}errors++}}else{const err31={instancePath:instancePath+"/targetService",schemaPath:"#/properties/targetService/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err31]}else{vErrors.push(err31)}errors++}}if(data.targetTenant!==void 0){let data5=data.targetTenant;if(typeof data5==="string"){if(func1(data5)>256){const err32={instancePath:instancePath+"/targetTenant",schemaPath:"#/properties/targetTenant/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err32]}else{vErrors.push(err32)}errors++}if(func1(data5)<1){const err33={instancePath:instancePath+"/targetTenant",schemaPath:"#/properties/targetTenant/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err33]}else{vErrors.push(err33)}errors++}if(!pattern119.test(data5)){const err34={instancePath:instancePath+"/targetTenant",schemaPath:"#/properties/targetTenant/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u0020\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u0020\\u007f]+$"'};if(vErrors===null){vErrors=[err34]}else{vErrors.push(err34)}errors++}}else{const err35={instancePath:instancePath+"/targetTenant",schemaPath:"#/properties/targetTenant/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err35]}else{vErrors.push(err35)}errors++}}if(data.connectionRef!==void 0){let data6=data.connectionRef;if(typeof data6==="string"){if(func1(data6)>128){const err36={instancePath:instancePath+"/connectionRef",schemaPath:"#/properties/connectionRef/maxLength",keyword:"maxLength",params:{limit:128},message:"must NOT have more than 128 characters"};if(vErrors===null){vErrors=[err36]}else{vErrors.push(err36)}errors++}if(func1(data6)<1){const err37={instancePath:instancePath+"/connectionRef",schemaPath:"#/properties/connectionRef/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err37]}else{vErrors.push(err37)}errors++}if(!pattern119.test(data6)){const err38={instancePath:instancePath+"/connectionRef",schemaPath:"#/properties/connectionRef/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u0020\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u0020\\u007f]+$"'};if(vErrors===null){vErrors=[err38]}else{vErrors.push(err38)}errors++}}else{const err39={instancePath:instancePath+"/connectionRef",schemaPath:"#/properties/connectionRef/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err39]}else{vErrors.push(err39)}errors++}}if(data.grantRef!==void 0){let data7=data.grantRef;if(typeof data7==="string"){if(func1(data7)>256){const err40={instancePath:instancePath+"/grantRef",schemaPath:"#/properties/grantRef/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err40]}else{vErrors.push(err40)}errors++}if(func1(data7)<1){const err41={instancePath:instancePath+"/grantRef",schemaPath:"#/properties/grantRef/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err41]}else{vErrors.push(err41)}errors++}if(!pattern119.test(data7)){const err42={instancePath:instancePath+"/grantRef",schemaPath:"#/properties/grantRef/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u0020\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u0020\\u007f]+$"'};if(vErrors===null){vErrors=[err42]}else{vErrors.push(err42)}errors++}}else{const err43={instancePath:instancePath+"/grantRef",schemaPath:"#/properties/grantRef/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err43]}else{vErrors.push(err43)}errors++}}if(data.grantVersion!==void 0){let data8=data.grantVersion;if(!(typeof data8=="number"&&!(data8%1)&&!isNaN(data8)&&isFinite(data8))){const err44={instancePath:instancePath+"/grantVersion",schemaPath:"#/properties/grantVersion/type",keyword:"type",params:{type:"integer"},message:"must be integer"};if(vErrors===null){vErrors=[err44]}else{vErrors.push(err44)}errors++}if(typeof data8=="number"&&isFinite(data8)){if(data8>2147483647||isNaN(data8)){const err45={instancePath:instancePath+"/grantVersion",schemaPath:"#/properties/grantVersion/maximum",keyword:"maximum",params:{comparison:"<=",limit:2147483647},message:"must be <= 2147483647"};if(vErrors===null){vErrors=[err45]}else{vErrors.push(err45)}errors++}if(data8<1||isNaN(data8)){const err46={instancePath:instancePath+"/grantVersion",schemaPath:"#/properties/grantVersion/minimum",keyword:"minimum",params:{comparison:">=",limit:1},message:"must be >= 1"};if(vErrors===null){vErrors=[err46]}else{vErrors.push(err46)}errors++}}}if(data.previousWatermark!==void 0){let data9=data.previousWatermark;if(typeof data9==="string"){if(func1(data9)>256){const err47={instancePath:instancePath+"/previousWatermark",schemaPath:"#/properties/previousWatermark/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err47]}else{vErrors.push(err47)}errors++}if(func1(data9)<1){const err48={instancePath:instancePath+"/previousWatermark",schemaPath:"#/properties/previousWatermark/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err48]}else{vErrors.push(err48)}errors++}if(!pattern119.test(data9)){const err49={instancePath:instancePath+"/previousWatermark",schemaPath:"#/properties/previousWatermark/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u0020\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u0020\\u007f]+$"'};if(vErrors===null){vErrors=[err49]}else{vErrors.push(err49)}errors++}}else{const err50={instancePath:instancePath+"/previousWatermark",schemaPath:"#/properties/previousWatermark/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err50]}else{vErrors.push(err50)}errors++}}if(data.retainedThrough!==void 0){let data10=data.retainedThrough;if(typeof data10==="string"){if(func1(data10)>256){const err51={instancePath:instancePath+"/retainedThrough",schemaPath:"#/properties/retainedThrough/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err51]}else{vErrors.push(err51)}errors++}if(func1(data10)<1){const err52={instancePath:instancePath+"/retainedThrough",schemaPath:"#/properties/retainedThrough/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err52]}else{vErrors.push(err52)}errors++}if(!pattern119.test(data10)){const err53={instancePath:instancePath+"/retainedThrough",schemaPath:"#/properties/retainedThrough/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u0020\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u0020\\u007f]+$"'};if(vErrors===null){vErrors=[err53]}else{vErrors.push(err53)}errors++}}else{const err54={instancePath:instancePath+"/retainedThrough",schemaPath:"#/properties/retainedThrough/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err54]}else{vErrors.push(err54)}errors++}}if(data.watermark!==void 0){let data11=data.watermark;if(typeof data11==="string"){if(func1(data11)>256){const err55={instancePath:instancePath+"/watermark",schemaPath:"#/properties/watermark/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err55]}else{vErrors.push(err55)}errors++}if(func1(data11)<1){const err56={instancePath:instancePath+"/watermark",schemaPath:"#/properties/watermark/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err56]}else{vErrors.push(err56)}errors++}if(!pattern119.test(data11)){const err57={instancePath:instancePath+"/watermark",schemaPath:"#/properties/watermark/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u0020\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u0020\\u007f]+$"'};if(vErrors===null){vErrors=[err57]}else{vErrors.push(err57)}errors++}}else{const err58={instancePath:instancePath+"/watermark",schemaPath:"#/properties/watermark/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err58]}else{vErrors.push(err58)}errors++}}if(data.sourceRevision!==void 0){let data12=data.sourceRevision;if(typeof data12==="string"){if(func1(data12)>256){const err59={instancePath:instancePath+"/sourceRevision",schemaPath:"#/properties/sourceRevision/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err59]}else{vErrors.push(err59)}errors++}if(func1(data12)<1){const err60={instancePath:instancePath+"/sourceRevision",schemaPath:"#/properties/sourceRevision/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err60]}else{vErrors.push(err60)}errors++}if(!pattern119.test(data12)){const err61={instancePath:instancePath+"/sourceRevision",schemaPath:"#/properties/sourceRevision/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u0020\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u0020\\u007f]+$"'};if(vErrors===null){vErrors=[err61]}else{vErrors.push(err61)}errors++}}else{const err62={instancePath:instancePath+"/sourceRevision",schemaPath:"#/properties/sourceRevision/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err62]}else{vErrors.push(err62)}errors++}}if(data.createdAt!==void 0){let data13=data.createdAt;if(typeof data13==="string"){if(func1(data13)>64){const err63={instancePath:instancePath+"/createdAt",schemaPath:"#/properties/createdAt/maxLength",keyword:"maxLength",params:{limit:64},message:"must NOT have more than 64 characters"};if(vErrors===null){vErrors=[err63]}else{vErrors.push(err63)}errors++}if(!formats2.validate(data13)){const err64={instancePath:instancePath+"/createdAt",schemaPath:"#/properties/createdAt/format",keyword:"format",params:{format:"date-time"},message:'must match format "date-time"'};if(vErrors===null){vErrors=[err64]}else{vErrors.push(err64)}errors++}}else{const err65={instancePath:instancePath+"/createdAt",schemaPath:"#/properties/createdAt/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err65]}else{vErrors.push(err65)}errors++}}if(data.readModel!==void 0){if("AUTHORITATIVE_ON_DEMAND"!==data.readModel){const err66={instancePath:instancePath+"/readModel",schemaPath:"#/properties/readModel/const",keyword:"const",params:{allowedValue:"AUTHORITATIVE_ON_DEMAND"},message:"must be equal to constant"};if(vErrors===null){vErrors=[err66]}else{vErrors.push(err66)}errors++}}if(data.directoryRef!==void 0){let data15=data.directoryRef;if(typeof data15==="string"){if(func1(data15)>2048){const err67={instancePath:instancePath+"/directoryRef",schemaPath:"#/properties/directoryRef/maxLength",keyword:"maxLength",params:{limit:2048},message:"must NOT have more than 2048 characters"};if(vErrors===null){vErrors=[err67]}else{vErrors.push(err67)}errors++}if(!formats0(data15)){const err68={instancePath:instancePath+"/directoryRef",schemaPath:"#/properties/directoryRef/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};if(vErrors===null){vErrors=[err68]}else{vErrors.push(err68)}errors++}}else{const err69={instancePath:instancePath+"/directoryRef",schemaPath:"#/properties/directoryRef/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err69]}else{vErrors.push(err69)}errors++}}}else{const err70={instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};if(vErrors===null){vErrors=[err70]}else{vErrors.push(err70)}errors++}validate51.errors=vErrors;return errors===0}validate51.evaluated={props:true,dynamicProps:false,dynamicItems:false};var gapRecoveryCommand=validate52;function validate52(data,{instancePath="",parentData,parentDataProperty,rootData=data,dynamicAnchors={}}={}){let vErrors=null;let errors=0;const evaluated0=validate52.evaluated;if(evaluated0.dynamicProps){evaluated0.props=void 0}if(evaluated0.dynamicItems){evaluated0.items=void 0}if(data&&typeof data=="object"&&!Array.isArray(data)){if(data.schemaVersion===void 0){const err0={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"schemaVersion"},message:"must have required property 'schemaVersion'"};if(vErrors===null){vErrors=[err0]}else{vErrors.push(err0)}errors++}if(data.requestId===void 0){const err1={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"requestId"},message:"must have required property 'requestId'"};if(vErrors===null){vErrors=[err1]}else{vErrors.push(err1)}errors++}if(data.connectionRef===void 0){const err2={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"connectionRef"},message:"must have required property 'connectionRef'"};if(vErrors===null){vErrors=[err2]}else{vErrors.push(err2)}errors++}if(data.expectedCursor===void 0){const err3={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"expectedCursor"},message:"must have required property 'expectedCursor'"};if(vErrors===null){vErrors=[err3]}else{vErrors.push(err3)}errors++}if(data.expectedOldestAvailableCursor===void 0){const err4={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"expectedOldestAvailableCursor"},message:"must have required property 'expectedOldestAvailableCursor'"};if(vErrors===null){vErrors=[err4]}else{vErrors.push(err4)}errors++}for(const key0 in data){if(!(key0==="schemaVersion"||key0==="requestId"||key0==="connectionRef"||key0==="expectedCursor"||key0==="expectedOldestAvailableCursor")){const err5={instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:key0},message:"must NOT have additional properties"};if(vErrors===null){vErrors=[err5]}else{vErrors.push(err5)}errors++}}if(data.schemaVersion!==void 0){if(1!==data.schemaVersion){const err6={instancePath:instancePath+"/schemaVersion",schemaPath:"#/properties/schemaVersion/const",keyword:"const",params:{allowedValue:1},message:"must be equal to constant"};if(vErrors===null){vErrors=[err6]}else{vErrors.push(err6)}errors++}}if(data.requestId!==void 0){let data1=data.requestId;if(typeof data1==="string"){if(func1(data1)>256){const err7={instancePath:instancePath+"/requestId",schemaPath:"#/properties/requestId/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err7]}else{vErrors.push(err7)}errors++}if(func1(data1)<1){const err8={instancePath:instancePath+"/requestId",schemaPath:"#/properties/requestId/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err8]}else{vErrors.push(err8)}errors++}if(!pattern119.test(data1)){const err9={instancePath:instancePath+"/requestId",schemaPath:"#/properties/requestId/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u0020\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u0020\\u007f]+$"'};if(vErrors===null){vErrors=[err9]}else{vErrors.push(err9)}errors++}}else{const err10={instancePath:instancePath+"/requestId",schemaPath:"#/properties/requestId/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err10]}else{vErrors.push(err10)}errors++}}if(data.connectionRef!==void 0){let data2=data.connectionRef;if(typeof data2==="string"){if(func1(data2)>128){const err11={instancePath:instancePath+"/connectionRef",schemaPath:"#/properties/connectionRef/maxLength",keyword:"maxLength",params:{limit:128},message:"must NOT have more than 128 characters"};if(vErrors===null){vErrors=[err11]}else{vErrors.push(err11)}errors++}if(func1(data2)<1){const err12={instancePath:instancePath+"/connectionRef",schemaPath:"#/properties/connectionRef/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err12]}else{vErrors.push(err12)}errors++}if(!pattern119.test(data2)){const err13={instancePath:instancePath+"/connectionRef",schemaPath:"#/properties/connectionRef/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u0020\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u0020\\u007f]+$"'};if(vErrors===null){vErrors=[err13]}else{vErrors.push(err13)}errors++}}else{const err14={instancePath:instancePath+"/connectionRef",schemaPath:"#/properties/connectionRef/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err14]}else{vErrors.push(err14)}errors++}}if(data.expectedCursor!==void 0){let data3=data.expectedCursor;if(typeof data3==="string"){if(func1(data3)>256){const err15={instancePath:instancePath+"/expectedCursor",schemaPath:"#/properties/expectedCursor/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err15]}else{vErrors.push(err15)}errors++}if(func1(data3)<1){const err16={instancePath:instancePath+"/expectedCursor",schemaPath:"#/properties/expectedCursor/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err16]}else{vErrors.push(err16)}errors++}if(!pattern119.test(data3)){const err17={instancePath:instancePath+"/expectedCursor",schemaPath:"#/properties/expectedCursor/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u0020\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u0020\\u007f]+$"'};if(vErrors===null){vErrors=[err17]}else{vErrors.push(err17)}errors++}}else{const err18={instancePath:instancePath+"/expectedCursor",schemaPath:"#/properties/expectedCursor/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err18]}else{vErrors.push(err18)}errors++}}if(data.expectedOldestAvailableCursor!==void 0){let data4=data.expectedOldestAvailableCursor;if(typeof data4==="string"){if(func1(data4)>256){const err19={instancePath:instancePath+"/expectedOldestAvailableCursor",schemaPath:"#/properties/expectedOldestAvailableCursor/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};if(vErrors===null){vErrors=[err19]}else{vErrors.push(err19)}errors++}if(func1(data4)<1){const err20={instancePath:instancePath+"/expectedOldestAvailableCursor",schemaPath:"#/properties/expectedOldestAvailableCursor/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};if(vErrors===null){vErrors=[err20]}else{vErrors.push(err20)}errors++}if(!pattern119.test(data4)){const err21={instancePath:instancePath+"/expectedOldestAvailableCursor",schemaPath:"#/properties/expectedOldestAvailableCursor/pattern",keyword:"pattern",params:{pattern:"^[^\\u0000-\\u0020\\u007f]+$"},message:'must match pattern "^[^\\u0000-\\u0020\\u007f]+$"'};if(vErrors===null){vErrors=[err21]}else{vErrors.push(err21)}errors++}}else{const err22={instancePath:instancePath+"/expectedOldestAvailableCursor",schemaPath:"#/properties/expectedOldestAvailableCursor/type",keyword:"type",params:{type:"string"},message:"must be string"};if(vErrors===null){vErrors=[err22]}else{vErrors.push(err22)}errors++}}}else{const err23={instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};if(vErrors===null){vErrors=[err23]}else{vErrors.push(err23)}errors++}validate52.errors=vErrors;return errors===0}validate52.evaluated={props:true,dynamicProps:false,dynamicItems:false};function validateContract(validator,value){try{canonicalJson(value)}catch{return{valid:false,issues:[{path:"",keyword:"jsonValue"}]}}if(validator(value))return{valid:true,value};return{valid:false,issues:(validator.errors??[]).map(({instancePath,keyword})=>({path:instancePath,keyword}))}}function parseContract(result){if(!result.valid)throw new ContractError(result.issues);return result.value}var parseNativeEventCatalog=value=>parseContract(validateContract(nativeEventCatalog,value));var parseNodeWorkerObservation=value=>parseContract(validateContract(nodeWorkerObservation,value));var validateOutboxRecoveryCommand=value=>validateContract(outboxRecoveryCommand,value);var parseOutboxRecoveryCommand=value=>parseContract(validateOutboxRecoveryCommand(value));var validateCloudEvent=value=>validateContract(cloudEventSupported,value);var validateCloudEventV1=value=>validateContract(cloudEvent,value);var validateCloudEventV11=value=>validateContract(cloudEventContext,value);var validateNamespacedReference=value=>validateContract(namespacedReference,value);var validateIdentityContext=value=>validateContract(identityContext,value);var validateBusinessReceipt=value=>validateContract(businessReceipt,value);var validateResultRef=value=>validateContract(resultRef,value);var validateTenantContext=value=>validateContract(tenantContext,value);var validateTenantConnection=value=>validateContract(tenantConnection,value);var validateExchangeGrant=value=>validateContract(exchangeGrant,value);var parseCloudEvent=value=>parseContract(validateCloudEvent(value));var parseBusinessReceipt=value=>parseContract(validateBusinessReceipt(value));var parseResultRef=value=>parseContract(validateResultRef(value));var parseTenantContext=value=>parseContract(validateTenantContext(value));var parseTenantConnection=value=>parseContract(validateTenantConnection(value));var parseExchangeGrant=value=>parseContract(validateExchangeGrant(value));var parseNamespacedReference=value=>parseContract(validateNamespacedReference(value));var parseIdentityContext=value=>parseContract(validateIdentityContext(value));var validateCloudEventV12=value=>validateContract(cloudEventFanout,value);var validateFanoutEventDraft=value=>validateContract(fanoutEventDraft,value);var parseFanoutEventDraft=value=>parseContract(validateFanoutEventDraft(value));var validateEventOriginClaims=value=>validateContract(eventOriginClaims,value);var parseEventOriginClaims=value=>parseContract(validateEventOriginClaims(value));var validateNodeConnectionProfile=value=>validateContract(nodeConnectionProfile,value);var parseNodeConnectionProfile=value=>parseContract(validateNodeConnectionProfile(value));var validatePublicJwksSnapshot=value=>validateContract(publicJwksSnapshot,value);var parsePublicJwksSnapshot=value=>parseContract(validatePublicJwksSnapshot(value));var validateExchangeRegistration=value=>validateContract(exchangeRegistration,value);var parseExchangeRegistration=value=>parseContract(validateExchangeRegistration(value));var parseGapBaseline=value=>parseContract(validateContract(gapBaseline,value));var parseGapRecoveryCommand=value=>parseContract(validateContract(gapRecoveryCommand,value));var MAX_BYTES=1048576;var MAX_DEPTH2=64;var MAX_NODES2=1e5;function parseJsonStrict(input){try{if(typeof input==="string"&&(input.length>MAX_BYTES||new TextEncoder().encode(input).byteLength>MAX_BYTES))throw new Error;if(typeof input!=="string"&&input.byteLength>MAX_BYTES)throw new Error;const text=typeof input==="string"?input:new TextDecoder("utf-8",{fatal:true,ignoreBOM:true}).decode(input);const cursor={text,index:0,nodes:0};const value=readValue(cursor,0);whitespace(cursor);if(cursor.index!==text.length)throw new Error;canonicalJson(value);return value}catch{throw new ContractError([{path:"",keyword:"jsonSyntax"}])}}function whitespace(cursor){while(/[\t\n\r ]/.test(cursor.text[cursor.index]??"x"))cursor.index++}function readValue(cursor,depth){if(++cursor.nodes>MAX_NODES2||depth>MAX_DEPTH2)throw new Error;whitespace(cursor);const char=cursor.text[cursor.index];if(char==='"')return readString(cursor);if(char==="{")return readObject(cursor,depth);if(char==="[")return readArray(cursor,depth);const token=/^(?:true|false|null|-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)/.exec(cursor.text.slice(cursor.index))?.[0];if(token===void 0)throw new Error;cursor.index+=token.length;return JSON.parse(token)}function readString(cursor){const start=cursor.index++;while(cursor.index<cursor.text.length){const char=cursor.text[cursor.index++];if(char==="\\")cursor.index++;else if(char==='"')return JSON.parse(cursor.text.slice(start,cursor.index))}throw new Error}function separator(cursor,expected){whitespace(cursor);if(cursor.text[cursor.index++]!==expected)throw new Error}function readObject(cursor,depth){const result={};const names=new Set;cursor.index++;whitespace(cursor);if(cursor.text[cursor.index]==="}"){cursor.index++;return result}while(cursor.index<cursor.text.length){whitespace(cursor);if(cursor.text[cursor.index]!=='"')throw new Error;const key=readString(cursor);if(names.has(key))throw new Error;names.add(key);separator(cursor,":");Object.defineProperty(result,key,{value:readValue(cursor,depth+1),writable:true,enumerable:true,configurable:true});whitespace(cursor);if(cursor.text[cursor.index]==="}"){cursor.index++;return result}separator(cursor,",")}throw new Error}function readArray(cursor,depth){const result=[];cursor.index++;whitespace(cursor);if(cursor.text[cursor.index]==="]"){cursor.index++;return result}while(cursor.index<cursor.text.length){result.push(readValue(cursor,depth+1));whitespace(cursor);if(cursor.text[cursor.index]==="]"){cursor.index++;return result}separator(cursor,",")}throw new Error}function decodeCloudEvent(input){return parseCloudEvent(parseJsonStrict(input))}function reference(namespace,ref){return namespace!==void 0&&ref!==void 0?{namespace,ref}:void 0}function extractIdentityContext(input){const event=parseCloudEvent(input);const sourceTenant={serviceRef:event.serviceorigin,tenantRef:event.sourcetenant};if(event.profile==="eventsdk/1.0")return{sourceTenant};const organization=reference(event.orgnamespace,event.orgref);const project=reference(event.projectnamespace,event.projectref);const actorPrincipal=reference(event.principalnamespace,event.principalref);const resource=reference(event.resourcenamespace,event.resourceref);return parseIdentityContext({sourceTenant,...organization?{organization}:{},...project?{project}:{},...actorPrincipal?{actorPrincipal}:{},...resource?{resource}:{}})}function assertWireGrantVersion(version){if(!Number.isSafeInteger(version)||version<1||version>2147483647)throw new ContractError([{path:"/grantversion",keyword:"wireIntegerRange"}])}var supportedMessagingProfiles=Object.freeze(["eventsdk/1.0","eventsdk/1.1","eventsdk/1.2"]);function isSupportedMessagingProfile(value){return supportedMessagingProfiles.some(profile=>profile===value)}var exchangeRegistrationJsonSchema={title:"ExchangeRegistration",type:"object",additionalProperties:false,required:["schemaVersion","requestId","expectedRevision","source","target","grant","status"],properties:{schemaVersion:{const:1},requestId:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u0020\\u007f]+$"},expectedRevision:{type:["integer","null"],minimum:1,maximum:2147483647},source:{type:"object",additionalProperties:false,required:["source","serviceRef","tenantRef","issuer","subject"],properties:{source:{type:"string",format:"uri",maxLength:2048},serviceRef:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u0020\\u007f]+$"},tenantRef:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u0020\\u007f]+$"},issuer:{type:"string",format:"uri",maxLength:2048},subject:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u0020\\u007f]+$"}}},target:{title:"TenantContext",type:"object",additionalProperties:false,properties:{serviceRef:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u001f\\u007f]+$"},tenantRef:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u001f\\u007f]+$"}},required:["serviceRef","tenantRef"]},grant:{type:"object",additionalProperties:false,required:["grantRef","version","eventType","consumerRef"],properties:{grantRef:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u0020\\u007f]+$"},version:{type:"integer",minimum:1,maximum:2147483647},eventType:{type:"string",pattern:"^[A-Za-z0-9][A-Za-z0-9._-]*\\.v[1-9][0-9]*$",maxLength:256},consumerRef:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u0020\\u007f]+$"}}},status:{enum:["ACTIVE","REVOKED"]}}};var outboxRecoveryCommandJsonSchema={title:"OutboxRecoveryCommand",type:"object",additionalProperties:false,required:["schemaVersion","requestId","source","id","deliveryid","expectedGeneration"],properties:{schemaVersion:{const:1},requestId:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u0020\\u007f]+$"},source:{type:"string",format:"uri",maxLength:2048},id:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u0020\\u007f]+$"},deliveryid:{type:"string",pattern:"^[a-f0-9]{64}$"},expectedGeneration:{type:"integer",minimum:0,maximum:2147483647}}};var gapBaselineJsonSchema={title:"GapBaseline",type:"object",additionalProperties:false,required:["schemaVersion","baselineRef","source","sourceTenant","targetService","targetTenant","connectionRef","grantRef","grantVersion","previousWatermark","retainedThrough","watermark","sourceRevision","createdAt","readModel","directoryRef"],properties:{schemaVersion:{const:1},baselineRef:{type:"string",format:"uri",maxLength:2048},source:{type:"string",format:"uri",maxLength:2048},sourceTenant:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u0020\\u007f]+$"},targetService:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u0020\\u007f]+$"},targetTenant:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u0020\\u007f]+$"},connectionRef:{type:"string",minLength:1,maxLength:128,pattern:"^[^\\u0000-\\u0020\\u007f]+$"},grantRef:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u0020\\u007f]+$"},grantVersion:{type:"integer",minimum:1,maximum:2147483647},previousWatermark:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u0020\\u007f]+$"},retainedThrough:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u0020\\u007f]+$"},watermark:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u0020\\u007f]+$"},sourceRevision:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u0020\\u007f]+$"},createdAt:{type:"string",format:"date-time",maxLength:64},readModel:{const:"AUTHORITATIVE_ON_DEMAND"},directoryRef:{type:"string",format:"uri",maxLength:2048}}};var gapRecoveryCommandJsonSchema={title:"GapRecoveryCommand",type:"object",additionalProperties:false,required:["schemaVersion","requestId","connectionRef","expectedCursor","expectedOldestAvailableCursor"],properties:{schemaVersion:{const:1},requestId:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u0020\\u007f]+$"},connectionRef:{type:"string",minLength:1,maxLength:128,pattern:"^[^\\u0000-\\u0020\\u007f]+$"},expectedCursor:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u0020\\u007f]+$"},expectedOldestAvailableCursor:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u0020\\u007f]+$"}}};var eventLinkAuthorizationRequestJsonSchema={title:"EventLinkAuthorizationRequest",type:"object",additionalProperties:false,required:["profile","response_type","client_id","redirect_uri","scope","state","code_challenge","code_challenge_method","request_id","source","event_type","grant_ref","grant_version"],properties:{profile:{const:"event-link/1"},response_type:{const:"code"},client_id:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u0020\\u007f]+$"},redirect_uri:{type:"string",format:"uri",maxLength:2048},scope:{const:"eventsdk.connection.authorize"},state:{type:"string",minLength:32,maxLength:512,pattern:"^[A-Za-z0-9_-]+$"},code_challenge:{type:"string",minLength:43,maxLength:43,pattern:"^[A-Za-z0-9_-]+$"},code_challenge_method:{const:"S256"},request_id:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u0020\\u007f]+$"},source:{type:"object",additionalProperties:false,required:["source","serviceRef","tenantRef","issuer","subject"],properties:{source:{type:"string",format:"uri",maxLength:2048},serviceRef:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u0020\\u007f]+$"},tenantRef:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u0020\\u007f]+$"},issuer:{type:"string",format:"uri",maxLength:2048},subject:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u0020\\u007f]+$"}}},event_type:{type:"string",pattern:"^[A-Za-z0-9][A-Za-z0-9._-]*\\.v[1-9][0-9]*$",maxLength:256},grant_ref:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u0020\\u007f]+$"},grant_version:{const:"1"}}};var eventLinkTokenRequestJsonSchema={title:"EventLinkTokenRequest",type:"object",additionalProperties:false,required:["grant_type","client_id","redirect_uri","code","code_verifier"],properties:{grant_type:{const:"authorization_code"},client_id:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u0020\\u007f]+$"},redirect_uri:{type:"string",format:"uri",maxLength:2048},code:{type:"string",minLength:32,maxLength:256,pattern:"^[A-Za-z0-9_-]+$"},code_verifier:{type:"string",minLength:43,maxLength:128,pattern:"^[A-Za-z0-9._~-]+$"}}};var eventLinkProposalJsonSchema={title:"EventLinkProposal",type:"object",additionalProperties:false,required:["schemaVersion","requestId","source","target","grant","connectionRef","targetDisplayName","approvalRef","expiresAt"],properties:{schemaVersion:{const:1},requestId:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u0020\\u007f]+$"},source:{type:"object",additionalProperties:false,required:["source","serviceRef","tenantRef","issuer","subject"],properties:{source:{type:"string",format:"uri",maxLength:2048},serviceRef:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u0020\\u007f]+$"},tenantRef:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u0020\\u007f]+$"},issuer:{type:"string",format:"uri",maxLength:2048},subject:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u0020\\u007f]+$"}}},target:{title:"TenantContext",type:"object",additionalProperties:false,properties:{serviceRef:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u001f\\u007f]+$"},tenantRef:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u001f\\u007f]+$"}},required:["serviceRef","tenantRef"]},grant:{type:"object",additionalProperties:false,required:["grantRef","version","eventType","consumerRef"],properties:{grantRef:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u0020\\u007f]+$"},version:{const:1},eventType:{type:"string",pattern:"^[A-Za-z0-9][A-Za-z0-9._-]*\\.v[1-9][0-9]*$",maxLength:256},consumerRef:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u0020\\u007f]+$"}}},connectionRef:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u0020\\u007f]+$"},targetDisplayName:{type:"string",minLength:1,maxLength:160,pattern:"\\S"},approvalRef:{type:"string",minLength:1,maxLength:256,pattern:"^[^\\u0000-\\u0020\\u007f]+$"},expiresAt:{type:"string",format:"date-time"}}};var validateEventLinkAuthorizationRequest=value=>validateContract(eventLinkAuthorizationRequest,value);var validateEventLinkTokenRequest=value=>validateContract(eventLinkTokenRequest,value);var validateEventLinkProposal=value=>validateContract(eventLinkProposal,value);var parseEventLinkAuthorizationRequest=value=>parseContract(validateEventLinkAuthorizationRequest(value));var parseEventLinkTokenRequest=value=>parseContract(validateEventLinkTokenRequest(value));var parseEventLinkProposal=value=>parseContract(validateEventLinkProposal(value));export{ContractError,EVENTSDK_ORIGIN_PROOF_HEADER,EVENTSDK_ORIGIN_PROOF_TYPE,assertWireGrantVersion,canonicalJson,decodeCloudEvent,eventLinkAuthorizationRequestJsonSchema,eventLinkProposalJsonSchema,eventLinkTokenRequestJsonSchema,exchangeRegistrationJsonSchema,extractIdentityContext,gapBaselineJsonSchema,gapRecoveryCommandJsonSchema,isEventOriginProofWireForm,isSupportedMessagingProfile,outboxRecoveryCommandJsonSchema,parseBusinessReceipt,parseCloudEvent,parseEventLinkAuthorizationRequest,parseEventLinkProposal,parseEventLinkTokenRequest,parseEventOriginClaims,parseExchangeGrant,parseExchangeRegistration,parseFanoutEventDraft,parseGapBaseline,parseGapRecoveryCommand,parseIdentityContext,parseJsonStrict,parseNamespacedReference,parseNativeEventCatalog,parseNodeConnectionProfile,parseNodeWorkerObservation,parseOutboxRecoveryCommand,parsePublicJwksSnapshot,parseResultRef,parseTenantConnection,parseTenantContext,supportedMessagingProfiles,validateBusinessReceipt,validateCloudEvent,validateCloudEventV1,validateCloudEventV11,validateCloudEventV12,validateEventLinkAuthorizationRequest,validateEventLinkProposal,validateEventLinkTokenRequest,validateEventOriginClaims,validateExchangeGrant,validateExchangeRegistration,validateFanoutEventDraft,validateIdentityContext,validateNamespacedReference,validateNodeConnectionProfile,validateOutboxRecoveryCommand,validatePublicJwksSnapshot,validateResultRef,validateTenantConnection,validateTenantContext};
|