json-schema-library 11.4.0 → 11.4.1
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/README.md +29 -56
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/dist/jlib.js +1 -1
- package/package.json +11 -1
- package/src/keywords/type.test.ts +13 -0
- package/src/utils/mergeSchema.test.ts +37 -0
- package/src/utils/mergeSchema.ts +24 -3
package/dist/jlib.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
var jlib=(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=Object.create,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,a=Object.getPrototypeOf,o=Object.prototype.hasOwnProperty,s=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),c=(e,t,a,s)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var c=i(t),l=0,u=c.length,d;l<u;l++)d=c[l],!o.call(e,d)&&d!==a&&n(e,d,{get:(e=>t[e]).bind(null,d),enumerable:!(s=r(t,d))||s.enumerable});return e},l=(e,r,i)=>(i=e==null?{}:t(a(e)),c(r||!e||!e.__esModule?n(i,`default`,{value:e,enumerable:!0}):i,e));let u=Function.prototype.toString,d=Object.prototype.toString;function f(e){if(!e)return Object.create(null);let t=e.constructor;if(t===Object)return e===Object.prototype?{}:Object.create(e);if(t&&~u.call(t).indexOf(`[native code]`))try{return new t}catch{}return Object.create(e)}function p(e){let t=e[Symbol.toStringTag];if(t)return t;let n=d.call(e);return n.substring(8,n.length-1)}let{hasOwnProperty:m,propertyIsEnumerable:h}=Object.prototype;function g(e,t,n,r){let i=Object.getOwnPropertyDescriptor(e,n)||{configurable:!0,enumerable:!0,value:e[n],writable:!0},a=i.get||i.set?i:{configurable:i.configurable,enumerable:i.enumerable,value:r.copier(i.value,r),writable:i.writable};try{Object.defineProperty(t,n,a)}catch{t[n]=a.get?a.get():a.value}}function _(e,t,n){let r=Object.getOwnPropertyNames(e);for(let i=0;i<r.length;++i)g(e,t,r[i],n);let i=Object.getOwnPropertySymbols(e);for(let r=0;r<i.length;++r)g(e,t,i[r],n);return t}function v(e,t){let n=new t.Constructor;t.cache.set(e,n);for(let r=0;r<e.length;++r)n[r]=t.copier(e[r],t);return n}function ee(e,t){let n=new t.Constructor;return t.cache.set(e,n),_(e,n,t)}function te(e,t){return e.slice(0)}function ne(e,t){return e.slice(0,e.size,e.type)}function re(e,t){return new t.Constructor(te(e.buffer))}function ie(e,t){return new t.Constructor(e.getTime())}function ae(e,t){let n=new t.Constructor;return t.cache.set(e,n),e.forEach((e,r)=>{n.set(r,t.copier(e,t))}),n}function y(e,t){return _(e,ae(e,t),t)}function b(e,t){let n=f(t.prototype);t.cache.set(e,n);for(let r in e)m.call(e,r)&&(n[r]=t.copier(e[r],t));let r=Object.getOwnPropertySymbols(e);for(let i=0;i<r.length;++i){let a=r[i];h.call(e,a)&&(n[a]=t.copier(e[a],t))}return n}function oe(e,t){let n=f(t.prototype);return t.cache.set(e,n),_(e,n,t)}function x(e,t){return new t.Constructor(e.valueOf())}function se(e,t){let n=new t.Constructor(e.source,e.flags);return n.lastIndex=e.lastIndex,n}function S(e,t){return e}function ce(e,t){let n=new t.Constructor;return t.cache.set(e,n),e.forEach(e=>{n.add(t.copier(e,t))}),n}function C(e,t){return _(e,ce(e,t),t)}function w(){return new WeakMap}function le({createCache:e,methods:t,strict:n}){let r={array:n?ee:v,arrayBuffer:te,asyncGenerator:S,blob:ne,dataView:re,date:ie,error:S,generator:S,map:n?y:ae,object:n?oe:b,regExp:se,set:n?C:ce},i=t?Object.assign(r,t):r,a=ue(i),o=e||w;if(!a.Object||!a.Array)throw Error(`An object and array copier must be provided.`);return{createCache:o,copiers:a,methods:i,strict:!!n}}function ue(e){return{Arguments:e.object,Array:e.array,ArrayBuffer:e.arrayBuffer,AsyncGenerator:e.asyncGenerator,BigInt64Array:e.arrayBuffer,BigUint64Array:e.arrayBuffer,Blob:e.blob,Boolean:x,DataView:e.dataView,Date:e.date,Error:e.error,Float32Array:e.arrayBuffer,Float64Array:e.arrayBuffer,Generator:e.generator,Int8Array:e.arrayBuffer,Int16Array:e.arrayBuffer,Int32Array:e.arrayBuffer,Map:e.map,Number:x,Object:e.object,Promise:S,RegExp:e.regExp,Set:e.set,String:x,WeakMap:S,WeakSet:S,Uint8Array:e.arrayBuffer,Uint8ClampedArray:e.arrayBuffer,Uint16Array:e.arrayBuffer,Uint32Array:e.arrayBuffer}}function T(e={}){let{createCache:t,copiers:n}=le(e),{Array:r,Object:i}=n;function a(e,t){if(t.prototype=t.Constructor=void 0,!e||typeof e!=`object`)return e;if(t.cache.has(e))return t.cache.get(e);if(t.prototype=Object.getPrototypeOf(e),t.Constructor=t.prototype&&t.prototype.constructor,!t.Constructor||t.Constructor===Object)return i(e,t);if(Array.isArray(e))return r(e,t);let a=n[p(e)];return a?a(e,t):typeof e.then==`function`?e:i(e,t)}return function(e){return a(e,{Constructor:void 0,cache:t(),copier:a,prototype:void 0})}}T({strict:!0});let E=T();function D(e,t=[]){if(!Array.isArray(e))return e===void 0?[]:[e];for(let n of e)Array.isArray(n)?D(n,t):($e(n)||n instanceof Promise)&&t.push(n);return t}var O={DECLARATOR_ONEOF:`oneOfProperty`,propertyBlacklist:[`_id`],DYNAMIC_PROPERTIES:[`$ref`,`$defs`,`if`,`then`,`else`,`allOf`,`anyOf`,`oneOf`,`dependentSchemas`,`dependentRequired`,`definitions`,`dependencies`,`patternProperties`,`propertyDependencies`],REGEX_FLAGS:`u`,PROPERTIES_TO_MERGE:[`title`,`description`,`options`,`x-options`,`readOnly`,`writeOnly`]};let k=Object.prototype.toString;function A(e){let t=k.call(e).slice(8,-1).toLowerCase();return t===`file`?`object`:t}function j(e){return A(e)===`object`}function M(e){let t=e===void 0?{}:{type:A(e)};return t.type===`object`&&j(e)&&(t.properties={},Object.keys(e).forEach(n=>t.properties[n]=M(e[n]))),t.type===`array`&&Array.isArray(e)&&(e.length===1?t.items=M(e[0]):(t.items=e.map(M),t.items.find(e=>e.type!==t.items[0].type)??(t.items=t.items[0]))),t}function de(e,t){t!=null&&Object.values(t).forEach(t=>N(t,e))}function fe(e,t){t?.forEach(t=>N(t,e))}function N(e,t=[]){return V(e)?(t.push(e),de(t,e.$defs),e.additionalProperties&&N(e.additionalProperties,t),fe(t,e.allOf),fe(t,e.anyOf),e.contains&&N(e.contains,t),de(t,e.dependentSchemas),e.if&&N(e.if,t),e.else&&N(e.else,t),e.then&&N(e.then,t),e.items&&N(e.items,t),fe(t,e.prefixItems),e.not&&N(e.not,t),fe(t,e.oneOf),e.patternProperties&&Object.values(e.patternProperties).forEach(({node:e})=>N(e,t)),de(t,e.properties),e.propertyNames&&N(e.propertyNames,t),e.unevaluatedProperties&&N(e.unevaluatedProperties,t),e.unevaluatedItems&&N(e.unevaluatedItems,t),t):t}function pe(e){return e===`#`||e===``||Array.isArray(e)&&e.length===0||!1}let me=/~1/g,he=/~0/g,ge=/(^#?\/?)/g;function _e(e){return e.replace(me,`/`).replace(he,`~`)}function ve(e){return _e(decodeURIComponent(e))}function ye(e){if(e==null||typeof e!=`string`||pe(e))return Array.isArray(e)?e.slice():[];let t=e.indexOf(`#`)>=0?ve:_e;e=e.replace(ge,``);let n=e.split(`/`);for(let e=0,r=n.length;e<r;e+=1)n[e]=t(n[e]);return n}function be(e,t,n=void 0){if(t==null||e==null)return n;if(pe(t))return e;let r=P(e,ye(t));return r===void 0?n:r}function P(e,t){let n=t.shift();if(e!==void 0)return n===void 0?e:e==null?void 0:P(e[n],t)}let xe=/~/g,Se=/\//g;function Ce(e,t){if(e.length===0)return t?`#`:``;for(let n=0,r=e.length;n<r;n+=1)e[n]=e[n].replace(xe,`~0`).replace(Se,`~1`),t&&(e[n]=encodeURIComponent(e[n]));return(t?`#/`:`/`)+e.join(`/`)}function we(e,...t){let n=[];if(Array.isArray(e))return Ce(e,arguments[1]===!0);let r=arguments[arguments.length-1],i=typeof r==`boolean`?r:e&&e[0]===`#`;for(let e=0,t=arguments.length;e<t;e+=1)n.push.apply(n,ye(arguments[e]));let a=[];for(let e=0,t=n.length;e<t;e+=1)if(n[e]===`..`){if(a.length===0)return i?`#`:``;a.pop()}else a.push(n[e]);return Ce(a,i)}var Te=s(((e,t)=>{
|
|
2
2
|
/** @license URI.js v4.4.1 (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js */
|
|
3
|
-
(function(n,r){typeof e==`object`&&t!==void 0?r(e):typeof define==`function`&&define.amd?define([`exports`],r):r(n.URI=n.URI||{})})(e,(function(e){"use strict";function t(){var e=[...arguments];if(e.length>1){e[0]=e[0].slice(0,-1);for(var t=e.length-1,n=1;n<t;++n)e[n]=e[n].slice(1,-1);return e[t]=e[t].slice(1),e.join(``)}else return e[0]}function n(e){return`(?:`+e+`)`}function r(e){return e===void 0?`undefined`:e===null?`null`:Object.prototype.toString.call(e).split(` `).pop().split(`]`).shift().toLowerCase()}function i(e){return e.toUpperCase()}function a(e){return e==null?[]:e instanceof Array?e:typeof e.length!=`number`||e.split||e.setInterval||e.call?[e]:Array.prototype.slice.call(e)}function o(e,t){var n=e;if(t)for(var r in t)n[r]=t[r];return n}function s(e){var r=`[A-Za-z]`,i=`[0-9]`,a=t(i,`[A-Fa-f]`),o=n(n(`%[EFef]`+a+`%`+a+a+`%`+a+a)+`|`+n(`%[89A-Fa-f]`+a+`%`+a+a)+`|`+n(`%`+a+a)),s=`[\\:\\/\\?\\#\\[\\]\\@]`,c=`[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]`,l=t(s,c),u=e?`[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]`:`[]`,d=e?`[\\uE000-\\uF8FF]`:`[]`,f=t(r,i,`[\\-\\.\\_\\~]`,u),p=n(r+t(r,i,`[\\+\\-\\.]`)+`*`),m=n(n(o+`|`+t(f,c,`[\\:]`))+`*`);n(n(`25[0-5]`)+`|`+n(`2[0-4]`+i)+`|`+n(`1`+i+i)+`|`+n(`[1-9]`+i)+`|`+i);var h=n(n(`25[0-5]`)+`|`+n(`2[0-4]`+i)+`|`+n(`1`+i+i)+`|`+n(`0?[1-9]`+i)+`|0?0?`+i),g=n(h+`\\.`+h+`\\.`+h+`\\.`+h),_=n(a+`{1,4}`),v=n(n(_+`\\:`+_)+`|`+g),ee=n([n(n(_+`\\:`)+`{6}`+v),n(`\\:\\:`+n(_+`\\:`)+`{5}`+v),n(n(_)+`?\\:\\:`+n(_+`\\:`)+`{4}`+v),n(n(n(_+`\\:`)+`{0,1}`+_)+`?\\:\\:`+n(_+`\\:`)+`{3}`+v),n(n(n(_+`\\:`)+`{0,2}`+_)+`?\\:\\:`+n(_+`\\:`)+`{2}`+v),n(n(n(_+`\\:`)+`{0,3}`+_)+`?\\:\\:`+_+`\\:`+v),n(n(n(_+`\\:`)+`{0,4}`+_)+`?\\:\\:`+v),n(n(n(_+`\\:`)+`{0,5}`+_)+`?\\:\\:`+_),n(n(n(_+`\\:`)+`{0,6}`+_)+`?\\:\\:`)].join(`|`)),te=n(n(f+`|`+o)+`+`);n(ee+`\\%25`+te);var ne=n(ee+n(`\\%25|\\%(?!`+a+`{2})`)+te),re=n(`[vV]`+a+`+\\.`+t(f,c,`[\\:]`)+`+`),ie=n(`\\[`+n(ne+`|`+ee+`|`+re)+`\\]`),ae=n(n(o+`|`+t(f,c))+`*`),y=n(ie+`|`+g+`(?!`+ae+`)|`+ae),b=n(i+`*`),oe=n(n(m+`@`)+`?`+y+n(`\\:`+b)+`?`),x=n(o+`|`+t(f,c,`[\\:\\@]`)),se=n(x+`*`),S=n(x+`+`),ce=n(n(o+`|`+t(f,c,`[\\@]`))+`+`),C=n(n(`\\/`+se)+`*`),w=n(`\\/`+n(S+C)+`?`),le=n(ce+C),ue=n(S+C),T=`(?!`+x+`)`;n(C+`|`+w+`|`+le+`|`+ue+`|`+T);var E=n(n(x+`|`+t(`[\\/\\?]`,d))+`*`),D=n(n(x+`|[\\/\\?]`)+`*`),O=n(n(`\\/\\/`+oe+C)+`|`+w+`|`+ue+`|`+T),k=n(p+`\\:`+O+n(`\\?`+E)+`?`+n(`\\#`+D)+`?`),A=n(n(n(`\\/\\/`+oe+C)+`|`+w+`|`+le+`|`+T)+n(`\\?`+E)+`?`+n(`\\#`+D)+`?`);return n(k+`|`+A),n(p+`\\:`+O+n(`\\?`+E)+`?`),``+p+n(n(`\\/\\/(`+n(`(`+m+`)@`)+`?(`+y+`)`+n(`\\:(`+b+`)`)+`?)`)+`?(`+C+`|`+w+`|`+ue+`|`+T+`)`)+n(`\\?(`+E+`)`)+n(`\\#(`+D+`)`),``+n(n(`\\/\\/(`+n(`(`+m+`)@`)+`?(`+y+`)`+n(`\\:(`+b+`)`)+`?)`)+`?(`+C+`|`+w+`|`+le+`|`+T+`)`)+n(`\\?(`+E+`)`)+n(`\\#(`+D+`)`),``+p+n(n(`\\/\\/(`+n(`(`+m+`)@`)+`?(`+y+`)`+n(`\\:(`+b+`)`)+`?)`)+`?(`+C+`|`+w+`|`+ue+`|`+T+`)`)+n(`\\?(`+E+`)`),``+n(`\\#(`+D+`)`),``+n(`(`+m+`)@`)+y+n(`\\:(`+b+`)`),{NOT_SCHEME:new RegExp(t(`[^]`,r,i,`[\\+\\-\\.]`),`g`),NOT_USERINFO:new RegExp(t(`[^\\%\\:]`,f,c),`g`),NOT_HOST:new RegExp(t(`[^\\%\\[\\]\\:]`,f,c),`g`),NOT_PATH:new RegExp(t(`[^\\%\\/\\:\\@]`,f,c),`g`),NOT_PATH_NOSCHEME:new RegExp(t(`[^\\%\\/\\@]`,f,c),`g`),NOT_QUERY:new RegExp(t(`[^\\%]`,f,c,`[\\:\\@\\/\\?]`,d),`g`),NOT_FRAGMENT:new RegExp(t(`[^\\%]`,f,c,`[\\:\\@\\/\\?]`),`g`),ESCAPE:new RegExp(t(`[^]`,f,c),`g`),UNRESERVED:new RegExp(f,`g`),OTHER_CHARS:new RegExp(t(`[^\\%]`,f,l),`g`),PCT_ENCODED:new RegExp(o,`g`),IPV4ADDRESS:RegExp(`^(`+g+`)$`),IPV6ADDRESS:RegExp(`^\\[?(`+ee+`)`+n(n(`\\%25|\\%(?!`+a+`{2})`)+`(`+te+`)`)+`?\\]?$`)}}var c=s(!1),l=s(!0),u=function(){function e(e,t){var n=[],r=!0,i=!1,a=void 0;try{for(var o=e[Symbol.iterator](),s;!(r=(s=o.next()).done)&&(n.push(s.value),!(t&&n.length===t));r=!0);}catch(e){i=!0,a=e}finally{try{!r&&o.return&&o.return()}finally{if(i)throw a}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw TypeError(`Invalid attempt to destructure non-iterable instance`)}}(),d=function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}else return Array.from(e)},f=2147483647,p=36,m=1,h=26,g=38,_=700,v=72,ee=128,te=`-`,ne=/^xn--/,re=/[^\0-\x7E]/,ie=/[\x2E\u3002\uFF0E\uFF61]/g,ae={overflow:`Overflow: input needs wider integers to process`,"not-basic":`Illegal input >= 0x80 (not a basic code point)`,"invalid-input":`Invalid input`},y=p-m,b=Math.floor,oe=String.fromCharCode;function x(e){throw RangeError(ae[e])}function se(e,t){for(var n=[],r=e.length;r--;)n[r]=t(e[r]);return n}function S(e,t){var n=e.split(`@`),r=``;n.length>1&&(r=n[0]+`@`,e=n[1]),e=e.replace(ie,`.`);var i=se(e.split(`.`),t).join(`.`);return r+i}function ce(e){for(var t=[],n=0,r=e.length;n<r;){var i=e.charCodeAt(n++);if(i>=55296&&i<=56319&&n<r){var a=e.charCodeAt(n++);(a&64512)==56320?t.push(((i&1023)<<10)+(a&1023)+65536):(t.push(i),n--)}else t.push(i)}return t}var C=function(e){return String.fromCodePoint.apply(String,d(e))},w=function(e){return e-48<10?e-22:e-65<26?e-65:e-97<26?e-97:p},le=function(e,t){return e+22+75*(e<26)-((t!=0)<<5)},ue=function(e,t,n){var r=0;for(e=n?b(e/_):e>>1,e+=b(e/t);e>y*h>>1;r+=p)e=b(e/y);return b(r+(y+1)*e/(e+g))},T=function(e){var t=[],n=e.length,r=0,i=ee,a=v,o=e.lastIndexOf(te);o<0&&(o=0);for(var s=0;s<o;++s)e.charCodeAt(s)>=128&&x(`not-basic`),t.push(e.charCodeAt(s));for(var c=o>0?o+1:0;c<n;){for(var l=r,u=1,d=p;;d+=p){c>=n&&x(`invalid-input`);var g=w(e.charCodeAt(c++));(g>=p||g>b((f-r)/u))&&x(`overflow`),r+=g*u;var _=d<=a?m:d>=a+h?h:d-a;if(g<_)break;var ne=p-_;u>b(f/ne)&&x(`overflow`),u*=ne}var re=t.length+1;a=ue(r-l,re,l==0),b(r/re)>f-i&&x(`overflow`),i+=b(r/re),r%=re,t.splice(r++,0,i)}return String.fromCodePoint.apply(String,t)},E=function(e){var t=[];e=ce(e);var n=e.length,r=ee,i=0,a=v,o=!0,s=!1,c=void 0;try{for(var l=e[Symbol.iterator](),u;!(o=(u=l.next()).done);o=!0){var d=u.value;d<128&&t.push(oe(d))}}catch(e){s=!0,c=e}finally{try{!o&&l.return&&l.return()}finally{if(s)throw c}}var g=t.length,_=g;for(g&&t.push(te);_<n;){var ne=f,re=!0,ie=!1,ae=void 0;try{for(var y=e[Symbol.iterator](),se;!(re=(se=y.next()).done);re=!0){var S=se.value;S>=r&&S<ne&&(ne=S)}}catch(e){ie=!0,ae=e}finally{try{!re&&y.return&&y.return()}finally{if(ie)throw ae}}var C=_+1;ne-r>b((f-i)/C)&&x(`overflow`),i+=(ne-r)*C,r=ne;var w=!0,T=!1,E=void 0;try{for(var D=e[Symbol.iterator](),O;!(w=(O=D.next()).done);w=!0){var k=O.value;if(k<r&&++i>f&&x(`overflow`),k==r){for(var A=i,j=p;;j+=p){var M=j<=a?m:j>=a+h?h:j-a;if(A<M)break;var de=A-M,fe=p-M;t.push(oe(le(M+de%fe,0))),A=b(de/fe)}t.push(oe(le(A,0))),a=ue(i,C,_==g),i=0,++_}}}catch(e){T=!0,E=e}finally{try{!w&&D.return&&D.return()}finally{if(T)throw E}}++i,++r}return t.join(``)},D={version:`2.1.0`,ucs2:{decode:ce,encode:C},decode:T,encode:E,toASCII:function(e){return S(e,function(e){return re.test(e)?`xn--`+E(e):e})},toUnicode:function(e){return S(e,function(e){return ne.test(e)?T(e.slice(4).toLowerCase()):e})}},O={};function k(e){var t=e.charCodeAt(0),n=void 0;return n=t<16?`%0`+t.toString(16).toUpperCase():t<128?`%`+t.toString(16).toUpperCase():t<2048?`%`+(t>>6|192).toString(16).toUpperCase()+`%`+(t&63|128).toString(16).toUpperCase():`%`+(t>>12|224).toString(16).toUpperCase()+`%`+(t>>6&63|128).toString(16).toUpperCase()+`%`+(t&63|128).toString(16).toUpperCase(),n}function A(e){for(var t=``,n=0,r=e.length;n<r;){var i=parseInt(e.substr(n+1,2),16);if(i<128)t+=String.fromCharCode(i),n+=3;else if(i>=194&&i<224){if(r-n>=6){var a=parseInt(e.substr(n+4,2),16);t+=String.fromCharCode((i&31)<<6|a&63)}else t+=e.substr(n,6);n+=6}else if(i>=224){if(r-n>=9){var o=parseInt(e.substr(n+4,2),16),s=parseInt(e.substr(n+7,2),16);t+=String.fromCharCode((i&15)<<12|(o&63)<<6|s&63)}else t+=e.substr(n,9);n+=9}else t+=e.substr(n,3),n+=3}return t}function j(e,t){function n(e){var n=A(e);return n.match(t.UNRESERVED)?n:e}return e.scheme&&=String(e.scheme).replace(t.PCT_ENCODED,n).toLowerCase().replace(t.NOT_SCHEME,``),e.userinfo!==void 0&&(e.userinfo=String(e.userinfo).replace(t.PCT_ENCODED,n).replace(t.NOT_USERINFO,k).replace(t.PCT_ENCODED,i)),e.host!==void 0&&(e.host=String(e.host).replace(t.PCT_ENCODED,n).toLowerCase().replace(t.NOT_HOST,k).replace(t.PCT_ENCODED,i)),e.path!==void 0&&(e.path=String(e.path).replace(t.PCT_ENCODED,n).replace(e.scheme?t.NOT_PATH:t.NOT_PATH_NOSCHEME,k).replace(t.PCT_ENCODED,i)),e.query!==void 0&&(e.query=String(e.query).replace(t.PCT_ENCODED,n).replace(t.NOT_QUERY,k).replace(t.PCT_ENCODED,i)),e.fragment!==void 0&&(e.fragment=String(e.fragment).replace(t.PCT_ENCODED,n).replace(t.NOT_FRAGMENT,k).replace(t.PCT_ENCODED,i)),e}function M(e){return e.replace(/^0*(.*)/,`$1`)||`0`}function de(e,t){var n=u(e.match(t.IPV4ADDRESS)||[],2)[1];return n?n.split(`.`).map(M).join(`.`):e}function fe(e,t){var n=u(e.match(t.IPV6ADDRESS)||[],3),r=n[1],i=n[2];if(r){for(var a=u(r.toLowerCase().split(`::`).reverse(),2),o=a[0],s=a[1],c=s?s.split(`:`).map(M):[],l=o.split(`:`).map(M),d=t.IPV4ADDRESS.test(l[l.length-1]),f=d?7:8,p=l.length-f,m=Array(f),h=0;h<f;++h)m[h]=c[h]||l[p+h]||``;d&&(m[f-1]=de(m[f-1],t));var g=m.reduce(function(e,t,n){if(!t||t===`0`){var r=e[e.length-1];r&&r.index+r.length===n?r.length++:e.push({index:n,length:1})}return e},[]).sort(function(e,t){return t.length-e.length})[0],_=void 0;if(g&&g.length>1){var v=m.slice(0,g.index),ee=m.slice(g.index+g.length);_=v.join(`:`)+`::`+ee.join(`:`)}else _=m.join(`:`);return i&&(_+=`%`+i),_}else return e}var N=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,pe=``.match(/(){0}/)[1]===void 0;function me(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n={},r=t.iri===!1?c:l;t.reference===`suffix`&&(e=(t.scheme?t.scheme+`:`:``)+`//`+e);var i=e.match(N);if(i){pe?(n.scheme=i[1],n.userinfo=i[3],n.host=i[4],n.port=parseInt(i[5],10),n.path=i[6]||``,n.query=i[7],n.fragment=i[8],isNaN(n.port)&&(n.port=i[5])):(n.scheme=i[1]||void 0,n.userinfo=e.indexOf(`@`)===-1?void 0:i[3],n.host=e.indexOf(`//`)===-1?void 0:i[4],n.port=parseInt(i[5],10),n.path=i[6]||``,n.query=e.indexOf(`?`)===-1?void 0:i[7],n.fragment=e.indexOf(`#`)===-1?void 0:i[8],isNaN(n.port)&&(n.port=e.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?i[4]:void 0)),n.host&&=fe(de(n.host,r),r),n.scheme===void 0&&n.userinfo===void 0&&n.host===void 0&&n.port===void 0&&!n.path&&n.query===void 0?n.reference=`same-document`:n.scheme===void 0?n.reference=`relative`:n.fragment===void 0?n.reference=`absolute`:n.reference=`uri`,t.reference&&t.reference!==`suffix`&&t.reference!==n.reference&&(n.error=n.error||`URI is not a `+t.reference+` reference.`);var a=O[(t.scheme||n.scheme||``).toLowerCase()];if(!t.unicodeSupport&&(!a||!a.unicodeSupport)){if(n.host&&(t.domainHost||a&&a.domainHost))try{n.host=D.toASCII(n.host.replace(r.PCT_ENCODED,A).toLowerCase())}catch(e){n.error=n.error||`Host's domain name can not be converted to ASCII via punycode: `+e}j(n,c)}else j(n,r);a&&a.parse&&a.parse(n,t)}else n.error=n.error||`URI can not be parsed.`;return n}function he(e,t){var n=t.iri===!1?c:l,r=[];return e.userinfo!==void 0&&(r.push(e.userinfo),r.push(`@`)),e.host!==void 0&&r.push(fe(de(String(e.host),n),n).replace(n.IPV6ADDRESS,function(e,t,n){return`[`+t+(n?`%25`+n:``)+`]`})),(typeof e.port==`number`||typeof e.port==`string`)&&(r.push(`:`),r.push(String(e.port))),r.length?r.join(``):void 0}var ge=/^\.\.?\//,_e=/^\/\.(\/|$)/,ve=/^\/\.\.(\/|$)/,ye=/^\/?(?:.|\n)*?(?=\/|$)/;function be(e){for(var t=[];e.length;)if(e.match(ge))e=e.replace(ge,``);else if(e.match(_e))e=e.replace(_e,`/`);else if(e.match(ve))e=e.replace(ve,`/`),t.pop();else if(e===`.`||e===`..`)e=``;else{var n=e.match(ye);if(n){var r=n[0];e=e.slice(r.length),t.push(r)}else throw Error(`Unexpected dot segment condition`)}return t.join(``)}function P(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.iri?l:c,r=[],i=O[(t.scheme||e.scheme||``).toLowerCase()];if(i&&i.serialize&&i.serialize(e,t),e.host&&!n.IPV6ADDRESS.test(e.host)&&(t.domainHost||i&&i.domainHost))try{e.host=t.iri?D.toUnicode(e.host):D.toASCII(e.host.replace(n.PCT_ENCODED,A).toLowerCase())}catch(n){e.error=e.error||`Host's domain name can not be converted to `+(t.iri?`Unicode`:`ASCII`)+` via punycode: `+n}j(e,n),t.reference!==`suffix`&&e.scheme&&(r.push(e.scheme),r.push(`:`));var a=he(e,t);if(a!==void 0&&(t.reference!==`suffix`&&r.push(`//`),r.push(a),e.path&&e.path.charAt(0)!==`/`&&r.push(`/`)),e.path!==void 0){var o=e.path;!t.absolutePath&&(!i||!i.absolutePath)&&(o=be(o)),a===void 0&&(o=o.replace(/^\/\//,`/%2F`)),r.push(o)}return e.query!==void 0&&(r.push(`?`),r.push(e.query)),e.fragment!==void 0&&(r.push(`#`),r.push(e.fragment)),r.join(``)}function xe(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=arguments[3],i={};return r||(e=me(P(e,n),n),t=me(P(t,n),n)),n||={},!n.tolerant&&t.scheme?(i.scheme=t.scheme,i.userinfo=t.userinfo,i.host=t.host,i.port=t.port,i.path=be(t.path||``),i.query=t.query):(t.userinfo!==void 0||t.host!==void 0||t.port!==void 0?(i.userinfo=t.userinfo,i.host=t.host,i.port=t.port,i.path=be(t.path||``),i.query=t.query):(t.path?(t.path.charAt(0)===`/`?i.path=be(t.path):((e.userinfo!==void 0||e.host!==void 0||e.port!==void 0)&&!e.path?i.path=`/`+t.path:e.path?i.path=e.path.slice(0,e.path.lastIndexOf(`/`)+1)+t.path:i.path=t.path,i.path=be(i.path)),i.query=t.query):(i.path=e.path,t.query===void 0?i.query=e.query:i.query=t.query),i.userinfo=e.userinfo,i.host=e.host,i.port=e.port),i.scheme=e.scheme),i.fragment=t.fragment,i}function Se(e,t,n){var r=o({scheme:`null`},n);return P(xe(me(e,r),me(t,r),r,!0),r)}function Ce(e,t){return typeof e==`string`?e=P(me(e,t),t):r(e)===`object`&&(e=me(P(e,t),t)),e}function we(e,t,n){return typeof e==`string`?e=P(me(e,n),n):r(e)===`object`&&(e=P(e,n)),typeof t==`string`?t=P(me(t,n),n):r(t)===`object`&&(t=P(t,n)),e===t}function Te(e,t){return e&&e.toString().replace(!t||!t.iri?c.ESCAPE:l.ESCAPE,k)}function Ee(e,t){return e&&e.toString().replace(!t||!t.iri?c.PCT_ENCODED:l.PCT_ENCODED,A)}var De={scheme:`http`,domainHost:!0,parse:function(e,t){return e.host||(e.error=e.error||`HTTP URIs must have a host.`),e},serialize:function(e,t){var n=String(e.scheme).toLowerCase()===`https`;return(e.port===(n?443:80)||e.port===``)&&(e.port=void 0),e.path||=`/`,e}},Oe={scheme:`https`,domainHost:De.domainHost,parse:De.parse,serialize:De.serialize};function ke(e){return typeof e.secure==`boolean`?e.secure:String(e.scheme).toLowerCase()===`wss`}var F={scheme:`ws`,domainHost:!0,parse:function(e,t){var n=e;return n.secure=ke(n),n.resourceName=(n.path||`/`)+(n.query?`?`+n.query:``),n.path=void 0,n.query=void 0,n},serialize:function(e,t){if((e.port===(ke(e)?443:80)||e.port===``)&&(e.port=void 0),typeof e.secure==`boolean`&&(e.scheme=e.secure?`wss`:`ws`,e.secure=void 0),e.resourceName){var n=u(e.resourceName.split(`?`),2),r=n[0],i=n[1];e.path=r&&r!==`/`?r:void 0,e.query=i,e.resourceName=void 0}return e.fragment=void 0,e}},I={scheme:`wss`,domainHost:F.domainHost,parse:F.parse,serialize:F.serialize},Ae={},je=`[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]`,L=`[0-9A-Fa-f]`,Me=n(n(`%[EFef]`+L+`%`+L+L+`%`+L+L)+`|`+n(`%[89A-Fa-f]`+L+`%`+L+L)+`|`+n(`%`+L+L)),Ne="[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]",Pe=t(`[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]`,`[\\"\\\\]`),R=`[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]`,Fe=new RegExp(je,`g`),Ie=new RegExp(Me,`g`),Le=new RegExp(t(`[^]`,Ne,`[\\.]`,`[\\"]`,Pe),`g`),z=new RegExp(t(`[^]`,je,R),`g`),Re=z;function ze(e){var t=A(e);return t.match(Fe)?t:e}var B={scheme:`mailto`,parse:function(e,t){var n=e,r=n.to=n.path?n.path.split(`,`):[];if(n.path=void 0,n.query){for(var i=!1,a={},o=n.query.split(`&`),s=0,c=o.length;s<c;++s){var l=o[s].split(`=`);switch(l[0]){case`to`:for(var u=l[1].split(`,`),d=0,f=u.length;d<f;++d)r.push(u[d]);break;case`subject`:n.subject=Ee(l[1],t);break;case`body`:n.body=Ee(l[1],t);break;default:i=!0,a[Ee(l[0],t)]=Ee(l[1],t);break}}i&&(n.headers=a)}n.query=void 0;for(var p=0,m=r.length;p<m;++p){var h=r[p].split(`@`);if(h[0]=Ee(h[0]),t.unicodeSupport)h[1]=Ee(h[1],t).toLowerCase();else try{h[1]=D.toASCII(Ee(h[1],t).toLowerCase())}catch(e){n.error=n.error||`Email address's domain name can not be converted to ASCII via punycode: `+e}r[p]=h.join(`@`)}return n},serialize:function(e,t){var n=e,r=a(e.to);if(r){for(var o=0,s=r.length;o<s;++o){var c=String(r[o]),l=c.lastIndexOf(`@`),u=c.slice(0,l).replace(Ie,ze).replace(Ie,i).replace(Le,k),d=c.slice(l+1);try{d=t.iri?D.toUnicode(d):D.toASCII(Ee(d,t).toLowerCase())}catch(e){n.error=n.error||`Email address's domain name can not be converted to `+(t.iri?`Unicode`:`ASCII`)+` via punycode: `+e}r[o]=u+`@`+d}n.path=r.join(`,`)}var f=e.headers=e.headers||{};e.subject&&(f.subject=e.subject),e.body&&(f.body=e.body);var p=[];for(var m in f)f[m]!==Ae[m]&&p.push(m.replace(Ie,ze).replace(Ie,i).replace(z,k)+`=`+f[m].replace(Ie,ze).replace(Ie,i).replace(Re,k));return p.length&&(n.query=p.join(`&`)),n}},Be=/^([^\:]+)\:(.*)/,Ve={scheme:`urn`,parse:function(e,t){var n=e.path&&e.path.match(Be),r=e;if(n){var i=t.scheme||r.scheme||`urn`,a=n[1].toLowerCase(),o=n[2],s=O[i+`:`+(t.nid||a)];r.nid=a,r.nss=o,r.path=void 0,s&&(r=s.parse(r,t))}else r.error=r.error||`URN can not be parsed.`;return r},serialize:function(e,t){var n=t.scheme||e.scheme||`urn`,r=e.nid,i=O[n+`:`+(t.nid||r)];i&&(e=i.serialize(e,t));var a=e,o=e.nss;return a.path=(r||t.nid)+`:`+o,a}},He=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,Ue={scheme:`urn:uuid`,parse:function(e,t){var n=e;return n.uuid=n.nss,n.nss=void 0,!t.tolerant&&(!n.uuid||!n.uuid.match(He))&&(n.error=n.error||`UUID is not valid.`),n},serialize:function(e,t){var n=e;return n.nss=(e.uuid||``).toLowerCase(),n}};O[De.scheme]=De,O[Oe.scheme]=Oe,O[F.scheme]=F,O[I.scheme]=I,O[B.scheme]=B,O[Ve.scheme]=Ve,O[Ue.scheme]=Ue,e.SCHEMES=O,e.pctEncChar=k,e.pctDecChars=A,e.parse=me,e.removeDotSegments=be,e.serialize=P,e.resolveComponents=xe,e.resolve=Se,e.normalize=Ce,e.equal=we,e.escapeComponent=Te,e.unescapeComponent=Ee,Object.defineProperty(e,`__esModule`,{value:!0})}))}))();let Ee=/(#)+$/,De=/#$/,Oe=/^[^:]+:\/\/[^/]+\//,ke=/#.*$/;function F(e,t){return t==null?e?.replace(De,``)??`#`:e==null||e===`#`?t?.replace(De,``):t[0]===`#`?e[0]===`/`?t:`${e.replace(ke,``)}${t.replace(Ee,``)}`:Oe.test(t)?t.replace(De,``):(0,Te.resolve)(e,t??``)??`#`}function I(e,t,...n){if(t?.type===`error`)return t;if(e?.type===`error`||A(e)!==A(t))return e;let r=Ae(e,t);for(let e of n)delete r[e];return r}function Ae(e,t,n){if(j(e)&&j(t)){let n={};return[...Object.keys(e),...Object.keys(t)].filter((e,t,n)=>n.indexOf(e)===t).forEach(r=>n[r]=Ae(e[r],t[r],r)),n}if(Array.isArray(e)&&Array.isArray(t)){if(n===`required`||n===`anyOf`)return e.concat(t).filter((e,t,n)=>n.indexOf(e)===t);if(n===`items`||n===`prefixItems`){let n=[];for(let r=0;r<t.length;r+=1)j(e[r])&&j(t[r])&&e[r].type===t[r].type?n[r]=Ae(e[r],t[r]):n.push(t[r]??e[r]);return n}let r=[],i=[];for(let n=0;n<Math.max(e.length,t.length);n+=1)j(e[n])&&j(t[n])?r[n]=Ae(e[n],t[n]):e[n]!==void 0&&t[n]!==void 0?(r[n]=e[n],i.push(t[n])):e[n]===void 0?t[n]!==void 0&&i.push(t[n]):r[n]=e[n];return[...r,...i].filter((e,t,n)=>n.indexOf(e)===t)}return Array.isArray(t)?t:Array.isArray(e)||t===void 0?e:t}function je(e,t){return(t.order??0)-(e.order??0)}function L(e,t,n){if(e==null||n.indexOf(e)!==t)return!1;let r=e.toJSON?.()??e.name;return n.find((e,n)=>(e.toJSON?.()??e.name)===r&&n===t)}function Me(e,t){if(e==null||t==null)return t||e;let n={};return[...Object.keys(e),...Object.keys(t)].filter((e,t,n)=>n.indexOf(e)===t).forEach(r=>{let i=R(e[r],t[r]);V(i)&&(n[r]=i)}),n}function Ne(e,t){return e==null||t==null?t||e:e.concat(t).filter((e,t,n)=>n.indexOf(e)===t)}function Pe(e,t){if(e==null||t==null)return e||t;let n=[...e],r=e.map(e=>e.node.evaluationPath);return t.forEach(e=>{r.includes(e.node.evaluationPath)||n.push(e)}),n}function R(e,t,...n){if(e==null||t==null)return e||t;let r={};e.items&&t.prefixItems||e.prefixItems&&t.items?t.prefixItems?r.prefixItems=t.prefixItems:r.items=t.items:(r.prefixItems=t.prefixItems??e.prefixItems,r.items=R(e.items,t.items));let i={...e,...t,...r,dynamicId:qe(e.dynamicId,t.dynamicId),oneOfIndex:e.oneOfIndex??t.oneOfIndex,schema:I(e.schema,t.schema,...n),parent:e.parent,resolvers:e.resolvers.concat(t.resolvers).filter(L).sort(je),reducers:e.reducers.concat(t.reducers).filter(L).sort(je),validators:e.validators.concat(t.validators).filter(L).sort(je),additionalProperties:R(e.additionalProperties,t.additionalProperties),contains:R(e.contains,t.contains),enum:Ne(e.enum,t.enum),if:R(e.if,t.if),then:R(e.then,t.then),else:R(e.else,t.else),not:R(e.not,t.not),propertyNames:R(e.propertyNames,t.propertyNames),unevaluatedProperties:R(e.unevaluatedProperties,t.unevaluatedProperties),unevaluatedItems:R(e.unevaluatedItems,t.unevaluatedItems),$defs:Me(e.$defs,t.$defs),patternProperties:Pe(e.patternProperties,t.patternProperties),properties:Me(e.properties,t.properties),required:Ne(e.required,t.required)};function a(e){let t=e.toJSON?.()??e.name;return i.schema?.[t]===void 0?(i[t]=void 0,!1):!0}return n?.forEach(e=>i[e]=void 0),i.resolvers=i.resolvers.filter(a),i.reducers=i.reducers.filter(a),i.validators=i.validators.filter(a),i}function Fe(e,...t){let n={};return Object.keys(e).forEach(r=>{t.includes(r)||(n[r]=e[r])}),n}function Ie(e,...t){if(!j(e)||t.length===0)return e;let n={};return t.forEach(t=>{e[t]!==void 0&&(n[t]=e[t])}),n}function Le(e,t={}){return e.replace(/\{\{(\w+)\}\}/g,(e,n)=>{let r=t[n];return r==null?``:typeof r==`object`?JSON.stringify(r):String(r)})}function z(e,t,n,r){if(W(e))return[e];r.push({pointer:n,node:e});let i=e.schema;if(i===!0)return[];if(i===!1)return[e.createError(`invalid-data-error`,{value:t,pointer:n,schema:e.schema})];let a=[];for(let i of e.validators){let o=i({node:e,data:t,pointer:n,path:r});Array.isArray(o)?a.push(...o):o&&a.push(o)}return D(a)}let Re=Object.prototype.hasOwnProperty,ze=(e,t)=>!(e[t]===void 0||!Re.call(e,t));function B(e,t){if(j(e)||Array.isArray(e))return e[t]}function Be(e,t,n={}){n.path=n.path??[],n.withSchemaWarning=n.withSchemaWarning??!1,n.pointer=n.pointer??`#`;let r=this,i=ye(e);if(i.length===0){let e=r.resolveRef(n);return W(e)?{node:void 0,error:e}:{node:e,error:void 0}}let a=`#`,o=r;for(let e=0,r=i.length;e<r;e+=1){a=`${a}/${i[e]}`;let r=o.getNodeChild(i[e],t,{...n,pointer:a});if(r.error||r.node==null)return r;o=r.node,t=B(t,i[e])}let{node:s,error:c}=o.resolveRef(n).reduceNode(t);return W(c)?{node:void 0,error:c}:V(s)?{node:s,error:void 0}:{error:void 0}}function Ve(e,t,n={}){n.path=n.path??[],n.withSchemaWarning=n.withSchemaWarning??!1,n.pointer=n.pointer??`#`;let{path:r,pointer:i}=n,a=this;if(a.reducers.length){let n=a.reduceNode(t,{key:e,path:r,pointer:i});if(n.error)return n;V(n.node)&&(a=n.node)}for(let n of a.resolvers){let o=n({data:t,key:e,node:a});if(W(o))return{node:void 0,error:o};if(V(o))return{node:o.resolveRef({pointer:i,path:r}),error:void 0}}return n.createSchema===!0?{node:a.compileSchema(a.createSchema(B(t,e)),`${a.evaluationPath}/additional`,`${a.schemaLocation}/additional`),error:void 0}:n.withSchemaWarning===!0?{node:void 0,error:a.createError(`schema-warning`,{pointer:i,value:t,schema:a.schema,key:e})}:{node:void 0}}let{DYNAMIC_PROPERTIES:He,REGEX_FLAGS:Ue,DECLARATOR_ONEOF:We}=O;function V(e){return j(e)&&Array.isArray(e?.reducers)&&Array.isArray(e?.resolvers)}function Ge(e){for(let t=0,n=He.length;t<n;t+=1)if(ze(e,He[t]))return!0;return!1}function Ke(e,t){if(!Array.isArray(e)||e.length===0)throw Error(`Missing drafts in 'compileSchema({ $schema: "${t}" })'`);return e.length===1?e[0]:e.find(e=>new RegExp(e.$schemaRegEx,Ue).test(t))??e[e.length-1]}function qe(e,t){return e==t?e??``:e==null||t==null?(e||t)??``:e.startsWith(t)?e:t.startsWith(e)?t:`${e}+${t}`}let Je={compileSchema(e,t,n,r){let i=this;t??=i.evaluationPath;let a=t.split(`/$ref`)[0],o={lastIdPointer:i.lastIdPointer,context:i.context,parent:i,evaluationPath:t,dynamicId:qe(i.dynamicId,r),schemaLocation:n??we(i.schemaLocation,a),reducers:[],resolvers:[],validators:[],schema:e,...Je};return!H(e)&&!U(e)?(o.schemaValidation=[o.createError(`schema-error`,{pointer:n??t,schema:e,value:void 0,message:`JSON schema must be object or boolean - reveived: '${e}'`})],o):(o.schemaValidation=D(Ze(o).filter(e=>e!=null)),o)},createError(e,t,n){let r=this,i=n;if(i===void 0){let n=r.schema?.errorMessages?.[e]??r.context.errors[e];if(typeof n==`function`)return n(t);i=Le(n??name,t)}return{type:`error`,code:e,message:i,data:t}},createAnnotation(e,t,n){let r=this,i=n;if(i===void 0){let n=r.schema?.errorMessages?.[e]??r.context.errors[e];if(typeof n==`function`)return n(t);i=Le(n??name,t)}return{type:`annotation`,code:e,message:i,data:t}},createSchema:M,getChildSelection(e){let t=this;return t.context.methods.getChildSelection(t,e)},getNode:Be,getNodeChild:Ve,getNodeRef(e){return this.compileSchema({$ref:e},`$dynamic`).resolveRef()},getNodeRoot(){return this.context.rootNode},getDraftVersion(){return this.context.version},getData(e,t){let n=this,r={recursionLimit:1,...n.context.getDataDefaultOptions,cache:{},...t??{}};return n.context.methods.getData(n,e,r)},reduceNode(e,t={}){let n=this,{key:r=`missing-key`,pointer:i=n.evaluationPath,path:a}=t;if(n.schema===!1)return{node:n,error:void 0};if(n.schema===!0){let t=n.compileSchema(M(e),n.evaluationPath,n.schemaLocation);return a?.push({pointer:i,node:n}),{node:t,error:void 0}}let o,s=n.compileSchema(n.schema,n.evaluationPath,n.schemaLocation),c=n.reducers;for(let t of c){let c=t({data:e,key:r,node:n,pointer:i,path:a??[]});if(W(c))return{node:void 0,error:c};if(c){if(c.schema===!1){o=!1;break}s=R(s,c)}}return o===!1?{node:{...n,schema:!1,reducers:[]},error:void 0}:(s!==n&&a?.push({pointer:i,node:n}),s.schema=Fe(s.schema,We,...He),He.forEach(e=>s[e]=void 0),{node:s,error:void 0})},validate(e,t=`#`,n=[]){let r=this,i=z(r,e,t,n)??[],a=[],o=[],s=D(Array.isArray(i)?i:[i]).filter(W),c=[];return D(Array.isArray(i)?i:[i]).forEach(e=>{if(W(e)){if(r.context.throwOnInvalidRef&&e.code===`ref-error`){let t=Error(`Invalid $ref: `+e.message);throw t.data=a,t}a.push(e)}else e instanceof Promise?c.push(e.then(D)):et(e)&&o.push(e)}),{valid:s.length===0,errors:a,annotations:o,errorsAsync:c}},addRemoteSchema(e,t){H(t)&&(t.$id=F(t.$id||e));let n=this,{context:r}=n,i=H(t)?n.context.draft??t.$schema:void 0,a=Ke(r.drafts,i??r.rootNode.schema?.$schema),o={evaluationPath:`#`,lastIdPointer:`#`,schemaLocation:`#`,dynamicId:``,reducers:[],resolvers:[],validators:[],schema:t,context:{...r,refs:{},anchors:{},...E(Ie(a,`methods`,`keywords`,`version`,`formats`,`errors`))},...Je};return o.context.rootNode=o,o.context.remotes[F(e)]=o,Ze(o),n},resolveRef(e){throw Error(`method 'resolveRef' is not implemented`)},toSchemaNodes(){return N(this)},toDataNodes(e,t){let n=this;return n.context.methods.toDataNodes(n,e,t)},toJSON(){let e=this;return{...e,context:void 0,errors:void 0,parent:e.parent?.evaluationPath}}},Ye=[`$ref`,`if`,`$defs`],Xe=[`draft-04`,`draft-06`,`draft-07`];function Ze(e){if(e.schema.$ref&&Xe.includes(e.context.version))return e.context.keywords.filter(({keyword:e})=>Ye.includes(e)).map(t=>Qe(t,e));let t=Object.keys(e.schema),n=e.context.keywords.filter(({keyword:e})=>Ye.includes(e)||t.includes(e)).map(t=>Qe(t,e));return t.filter(t=>!t.startsWith(`x-`)&&e.context.keywords.find(e=>e.keyword===t)==null).forEach(t=>{n.push(e.createAnnotation(`unknown-keyword-warning`,{pointer:`${e.schemaLocation}/${t}`,schema:e.schema,value:t,draft:e.getDraftVersion()}))}),n}function Qe(e,t){let n=e.parse?.(t);return e.reduce&&e.addReduce?.(t)&&t.reducers.push(e.reduce),e.resolve&&e.addResolve?.(t)&&t.resolvers.push(e.resolve),e.validate&&e.addValidate?.(t)&&t.validators.push(e.validate),n}function H(e){return j(e)}function U(e){return typeof e==`boolean`}function $e(e){return j(e)&&(e?.type&&e?.code&&e?.data)!=null}function et(e){return j(e)&&e.type===`annotation`}function W(e){return j(e)&&e.type===`error`}function G(e){return typeof e==`number`}let tt=/(#)+$/g,nt=[``,null,`#`];function rt(e){if(nt.includes(e))return[];if(e=e.replace(tt,``),e.indexOf(`#`)===-1)return[e.replace(/(#|\/)+$/g,``)];if(e.indexOf(`#`)===0)return[e.replace(tt,``)];let t=e.split(`#`);return t[0]=t[0].replace(/(#|\/)+$/g,``),t[1]=`#${t[1].replace(tt,``)}`,t}let it={id:`$ref`,keyword:`$ref`,order:10,parse:ot,addReduce:e=>e.$ref!=null||e.schema.$dynamicRef!=null,reduce:st,addValidate:({schema:e})=>e.$ref!=null||e.$dynamicRef!=null,validate:lt};function at(e,t){e.context.refs[t]??(e.context.refs[t]=e)}function ot(e){e.resolveRef=ct;let t=F(e.parent?.$id,e.schema?.$id);e.$id=t,e.lastIdPointer=e.parent?.lastIdPointer??`#`,t!==e.parent?.$id&&e.evaluationPath!==`#`&&(e.lastIdPointer=e.evaluationPath),e.lastIdPointer!==`#`&&e.evaluationPath.startsWith(e.lastIdPointer)&&at(e,F(t,`#${e.evaluationPath.replace(e.lastIdPointer,``)}`)),at(e,F(e.context.rootNode.$id,e.evaluationPath));let n=e.schema.$anchor;if(n){let r=`${t.replace(/#$/,``)}#${n}`;e.context.anchors[r]??(e.context.anchors[r]=e)}let r=e.schema.$dynamicAnchor;if(r){let n=`${t.replace(/#$/,``)}#${r}`;e.context.dynamicAnchors[n]??(e.context.dynamicAnchors[n]=e)}if(e.schema.$ref&&(e.$ref=F(t,e.schema.$ref),e.$ref.startsWith(`/`)&&(e.$ref=`#${e.$ref}`)),e.$ref?.startsWith(`#/$defs/`)&&be(e.getNodeRoot().schema,e.$ref)==null)return e.createError(`schema-error`,{pointer:`${e.schemaLocation}/$ref`,schema:e.schema,value:e.schema.$ref,message:`Invalid $ref to missing target '${e.schema.ref}'`})}function st({node:e,data:t,key:n,pointer:r,path:i}){if(e==null)return;let a=e.resolveRef({pointer:r,path:i});if(a==null)return e.createError(`ref-error`,{ref:e.schema.$ref??e.schema.$dynamicRef,pointer:r,schema:e.schema,value:t});if(a.schemaLocation===e.schemaLocation)return a;let{node:o,error:s}=R(e,a).reduceNode(t,{key:n,pointer:r,path:i});return o??s}function ct({pointer:e,path:t=[]}={}){if(this.schema.$dynamicRef){let n=ut(this,t);return W(n)||t.push({pointer:e,node:n}),n}if(this.$ref==null)return this;let n=ft(this);return V(n)&&t.push({pointer:e,node:n}),n}function lt({node:e,data:t,pointer:n=`#`,path:r}){let i=e.resolveRef({pointer:n,path:r});return i==null?e.createError(`ref-error`,{ref:e.schema.$ref??e.schema.$dynamicRef,pointer:n,schema:e.schema,value:t}):z(i,t,n,r)}function ut(e,t){let n=t,r=F(e.$id,e.schema.$dynamicRef);if(e.context.dynamicAnchors[r]==null&&e.context.anchors[r])return dt(e.context.anchors[r],e);for(let t of n){if(t.node.schema.$dynamicAnchor)return dt(t.node,e);let n=e.schema.$dynamicRef.split(`#`).pop(),r=F(t.node.$id,`#${n}`);if(e.context.dynamicAnchors[r])return dt(e.context.dynamicAnchors[r],e)}return ft(e,r)}function dt(e,t){let n=e.schema;return j(e.schema)&&(n={...Fe(e.schema,`$id`),...Ie(t.schema,...O.PROPERTIES_TO_MERGE)}),e.compileSchema(n,`${t.evaluationPath}/$ref`,e.schemaLocation)}function ft(e,t=e?.$ref){if(t==null)return e;if(e.context.refs[t])return dt(e.context.refs[t],e);if(e.context.anchors[t])return dt(e.context.anchors[t],e);if(e.context.dynamicAnchors[t])return dt(e.context.dynamicAnchors[t],e);let n=rt(t);if(n.length===0)return e.createError(`ref-error`,{ref:t,pointer:e.evaluationPath,schema:e.schema,value:void 0});if(n.length===1){let t=n[0];if(e.context.remotes[t])return dt(e.context.remotes[t],e);if(t[0]===`#`){let n=e.context.rootNode.schema,r=be(n,t);if(r)return e.compileSchema(r,`${e.evaluationPath}/$ref`,t)}return e.createError(`ref-error`,{ref:t,pointer:e.evaluationPath,schema:e.schema,value:void 0})}if(n.length===2){let r=n[0];if(e.context.remotes[r]&&e!==e.context.remotes[r]){let i=e.context.remotes[r],a=ft(i,t);if(a||(a=ft(i,n[1]),a))return a}if(e.context.refs[r]){let i=e.context.refs[r],a=ye(n[1]),o=i;for(let r of a)if(o=o[r===`definitions`?`$defs`:r],o==null)return e.createError(`ref-error`,{ref:t,pointer:e.evaluationPath,schema:e.schema,value:void 0,host:n[0],local:n[1]});return o}}return e.createError(`ref-error`,{ref:t,pointer:e.evaluationPath,schema:e.schema,value:void 0})}function K(e,...t){return t.reduce((e,t)=>(t.schemaValidation&&e.push(...t.schemaValidation),e),e)}let pt={id:`$defs`,keyword:`$defs`,parse:mt};function mt(e){let t=[];return e.schema.$defs&&(j(e.schema.$defs)?(e.$defs=e.$defs??{},Object.keys(e.schema.$defs).forEach(n=>{e.$defs[n]=e.compileSchema(e.schema.$defs[n],`${e.evaluationPath}/$defs/${ht(n)}`,`${e.schemaLocation}/$defs/${n}`),K(t,e.$defs[n])})):t.push(e.createError(`schema-error`,{pointer:e.schemaLocation,schema:e.schema,value:e.schema.$defs,message:`$defs must be an object - received: ${typeof e.schema.$defs}`}))),e.schema.definitions&&(j(e.schema.definitions)||t.push(e.createError(`schema-error`,{pointer:e.schemaLocation,schema:e.schema,value:e.schema.$defs,message:`definitions must be an object - received: ${typeof e.schema.definitions}`})),e.$defs=e.$defs??{},Object.keys(e.schema.definitions).forEach(n=>{e.$defs[n]=e.compileSchema(e.schema.definitions[n],`${e.evaluationPath}/definitions/${ht(n)}`,`${e.schemaLocation}/definitions/${ht(n)}`),K(t,e.$defs[n])})),t}function ht(e){return e=e.replace(/~/g,`~0`),e=e.replace(/\//g,`~1`),encodeURIComponent(e)}let gt={id:`$ref`,keyword:`$ref`,parse:_t,addValidate:({schema:e})=>e.$ref!=null,validate:vt};function _t(e){let t=e.parent?.$id;if(e.schema?.$ref??(t=F(e.parent?.$id,e.schema?.$id)),e.$id=t,e.lastIdPointer=e.parent?.lastIdPointer??`#`,e.resolveRef=ct,e.context.refs[t]??(e.context.refs[t]=e),t!==e.parent?.$id&&(e.lastIdPointer=e.evaluationPath),e.lastIdPointer!==`#`&&e.evaluationPath.startsWith(e.lastIdPointer)){let n=`#${e.evaluationPath.replace(e.lastIdPointer,``)}`;e.context.refs[F(t,n)]=e}else e.context.refs[F(t,e.evaluationPath)]=e;e.context.refs[F(e.context.rootNode.$id,e.evaluationPath)]=e,e.schema.$ref&&(e.$ref=F(t,e.schema.$ref))}function vt({node:e,data:t,pointer:n=`#`,path:r}){let i=yt(e,n,r);return V(i)?z(i,t,n,r):e.createError(`ref-error`,{ref:e.schema.$ref,pointer:n,schema:e.schema,value:t})}function yt(e,t,n){let r=e.resolveRef({pointer:t,path:n});return V(r)?r!==e&&r?yt(r,t,n):e:e.createError(`ref-error`,{ref:e.schema.$ref,pointer:t,schema:e.schema,value:void 0})}let bt={id:`$ref`,keyword:`$ref`,parse:St,addValidate:({schema:e})=>e.$ref!=null,validate:gt.validate};function xt(e,t){e.context.refs[t]??(e.context.refs[t]=e)}function St(e){let t=e.parent?.$id;if(e.schema?.$ref==null&&e.schema?.id&&(t=F(e.parent?.$id,e.schema.id)),e.$id=t,e.lastIdPointer=e.parent?.lastIdPointer??`#`,e.resolveRef=Ct,e.context.refs[t]??(e.context.refs[t]=e),t!==e.parent?.$id&&(e.lastIdPointer=e.evaluationPath),e.lastIdPointer!==`#`&&e.evaluationPath.startsWith(e.lastIdPointer)){let n=`#${e.evaluationPath.replace(e.lastIdPointer,``)}`;xt(e,F(t,n))}else xt(e,F(t,e.evaluationPath));xt(e,F(e.context.rootNode.$id,e.evaluationPath)),e.schema.$ref&&(e.$ref=F(t,e.schema.$ref))}function Ct({pointer:e,path:t}={}){if(this.$ref==null)return this;let n=Tt(this);return V(n)&&t?.push({pointer:e,node:n}),n}function wt(e,t=e.evaluationPath){let n=j(e.schema)?Fe(e.schema,`id`):e.schema;return e.compileSchema(n,`${t}/$ref`,n.schemaLocation)}function Tt(e,t=e?.$ref){if(t==null)return e;if(e.context.refs[t])return wt(e.context.refs[t],e.evaluationPath);if(e.context.anchors[t])return wt(e.context.anchors[t],e.evaluationPath);let n=rt(t);if(n.length===0)return e.createError(`ref-error`,{ref:t,pointer:e.evaluationPath,schema:e.schema,value:void 0});if(n.length===1){let t=n[0];return e.context.remotes[t]?wt(e.context.remotes[t],e.evaluationPath):e.createError(`ref-error`,{ref:t,pointer:e.evaluationPath,schema:e.schema,value:void 0})}if(n.length===2){let r=n[0];if(e.context.remotes[r]&&e!==e.context.remotes[r]){let i=e.context.remotes[r],a=Tt(i,t);if(a||(a=Tt(i,n[1]),a))return a}let i=n[0];if(e.context.refs[i]){let t=e.context.refs[i],r=n[1].split(`$defs/`).pop();if(r&&t?.$defs)return Tt(t.$defs[r])}return}return e.createError(`ref-error`,{ref:t,pointer:e.evaluationPath,schema:e.schema,value:void 0})}let Et=`additionalItems`,Dt={id:Et,keyword:Et,order:-10,parse:Ot,addResolve:e=>e.items!=null,resolve:kt,addValidate:({schema:e})=>e[Et]!=null&&e[Et]!==!0&&Array.isArray(e.items),validate:At};function Ot(e){let{schema:t,evaluationPath:n,schemaLocation:r}=e;if(t.additionalItems==null||t.additionalItems===!1)return;let i=t[Et];if(!(j(i)||i===!0))return e.createError(`schema-error`,{pointer:n,schema:t,value:void 0,message:`Keyword '${Et}' must be an object or a boolean - received '${typeof i}'`});if(!Array.isArray(t.items))return e.createAnnotation(`schema-error`,{pointer:n,schema:t,value:void 0,message:`Keyword '${Et}' is only evaluated with a given items-array`});e.items=e.compileSchema(t.additionalItems,`${n}/additionalItems`,`${r}/additionalItems`)}function kt({node:e,key:t,data:n}){if(Array.isArray(n)){let r=B(n,t),{node:i,error:a}=e.items.reduceNode(r);return i??a}}function At({node:e,data:t,pointer:n,path:r}){let{schema:i}=e;if(!Array.isArray(t)||t.length===0||Array.isArray(i.items)&&i.items.length>=t.length)return;let a=Array.isArray(i.items)?i.items.length:0,o=[];for(let s=a;s<t.length;s+=1){let a=t[s];if(e.items){let t=z(e.items,a,`${n}/${s}`,r);t&&o.push(...t)}else i.additionalItems===!1&&o.push(e.createError(`additional-items-error`,{key:s,pointer:`${n}/${s}`,value:t,schema:i}))}return o}let jt={id:`additionalProperties`,keyword:`additionalProperties`,order:-10,parse:Mt,addResolve:({schema:e})=>e.additionalProperties!=null,resolve:Nt,addValidate:({schema:e})=>e.additionalProperties!==!0&&e.additionalProperties!=null&&!(e.additionalProperties===!1&&j(e.patternProperties)),validate:Pt};function Mt(e){let{schema:t,evaluationPath:n,schemaLocation:r}=e;if(!(t.additionalProperties==null||U(t.additionalProperties)))return j(t.additionalProperties)?(e.additionalProperties=e.compileSchema(t.additionalProperties,`${n}/additionalProperties`,`${r}/additionalProperties`),e.additionalProperties.schemaValidation):e.createError(`schema-error`,{pointer:e.schemaLocation,schema:t,value:t.additionalProperties,message:`keyword 'additionalProperties' must be a valid JSON Schema - receoved: ${typeof t.additionalProperties}`})}function Nt({node:e,data:t,key:n}){let r=B(t,n);if(e.additionalProperties){let{node:t,error:n}=e.additionalProperties.reduceNode(r);return t??n}if(e.schema.additionalProperties===!1)return e.createError(`no-additional-properties-error`,{pointer:`${n}`,schema:e.schema,value:B(t,n),property:`${n}`})}function Pt({node:e,data:t,pointer:n=`#`,path:r}){if(!j(t))return;let{schema:i}=e,a=[],o=Object.keys(t).filter(e=>O.propertyBlacklist.includes(e)===!1),s=e.patternProperties;Array.isArray(s)&&(o=o.filter(e=>{for(let t of s)if(t.pattern.test(e))return!1;return!0}));let c=e.properties?Object.keys(e.properties):[];return o.filter(e=>c.indexOf(e)===-1).forEach(o=>{let s=B(t,o);if(s!==void 0)if(j(e.additionalProperties)){let t=z(e.additionalProperties,s,`${n}/${o}`,r);t&&a.push(...t)}else a.push(e.createError(`no-additional-properties-error`,{pointer:`${n}/${o}`,schema:i,value:t,property:o,properties:c}))}),a}let q=`allOf`,Ft={id:q,keyword:q,parse:It,addReduce:e=>e[q]!=null,reduce:Lt,addValidate:e=>e[q]!=null,validate:Rt};function It(e){let{schema:t,evaluationPath:n,schemaLocation:r}=e;if(t[q]!=null){if(!Array.isArray(t[q]))return e.createError(`schema-error`,{pointer:r,schema:t,value:t[q],message:`Keyword '${q}' must be an array - received '${typeof t[q]}'`});if(t[q].length!==0)return e[q]=t[q].map((t,i)=>e.compileSchema(t,`${n}/${q}/${i}`,`${r}/${q}/${i}`)),K([],...e[q])}}function Lt({node:e,data:t,key:n,pointer:r,path:i}){if(e[q]==null)return;let a={},o=``;for(let s=0;s<e[q].length;s+=1){let{node:c}=e[q][s].reduceNode(t,{key:n,pointer:r,path:i});if(c){let t=c.dynamicId?.replace(e.dynamicId,``)??``,n=t===``?`${q}/${s}`:t;o+=`${o===``?``:`,`}${n}`;let r=I(e[q][s].schema,c.schema);a=I(a,r,q,`contains`)}}return e.compileSchema(a,`${e.evaluationPath}/${o}`,e.schemaLocation,`${e.schemaLocation}(${o})`)}function Rt({node:e,data:t,pointer:n,path:r}){if(!Array.isArray(e[q])||e[q].length===0)return;let i=[];return e[q].forEach(e=>{i.push(...z(e,t,n,r))}),i}let J=`anyOf`,zt={id:J,keyword:J,parse:Bt,addReduce:e=>e[J]!=null,reduce:Vt,addValidate:e=>e[J]!=null,validate:Ht};function Bt(e){let{schema:t,evaluationPath:n,schemaLocation:r}=e;if(t[J]!=null){if(!Array.isArray(t[J]))return e.createError(`schema-error`,{pointer:r,schema:t,value:t[J],message:`Keyword '${J}' must be an array - received '${typeof t[J]}'`});if(t[J].length!==0)return e[J]=t[J].map((t,i)=>e.compileSchema(t,`${n}/${J}/${i}`,`${r}/${J}/${i}`)),K([],...e[J])}}function Vt({node:e,data:t,pointer:n,path:r}){if(e[J]==null)return;let i={},a=``;for(let o=0;o<e[J].length;o+=1)if(z(e[J][o],t,n,r).length===0){let{node:n}=e[J][o].reduceNode(t);if(n){let t=n.dynamicId?.replace(e.dynamicId,``)??``,r=t===``?`${J}/${o}`:t;a+=`${a===``?``:`,`}${r}`;let s=I(e[J][o].schema,n.schema);i=I(i,s,J)}}return e.compileSchema(i,`${e.evaluationPath}${a}`,e.schemaLocation,`${e.schemaLocation}(${a})`)}function Ht({node:e,data:t,pointer:n,path:r}){if(e[J]!=null){for(let i of e[J])if(z(i,t,n,r).length===0)return;return e.createError(`any-of-error`,{pointer:n,schema:e.schema,value:t,anyOf:e.schema[J]})}}let Y=`contains`,Ut={id:Y,keyword:Y,parse:Wt,addValidate:e=>e[Y]!=null,validate:Gt,addReduce:e=>e[Y]!=null,reduce:({node:e})=>e.compileSchema({items:{anyOf:[e[Y].schema]}},e.evaluationPath,e.schemaLocation)};function Wt(e){let t=e.schema[Y];if(t!=null)return H(t)||U(t)?(e[Y]=e.compileSchema(t,`${e.evaluationPath}/${Y}`),e[Y].schemaValidation):e.createError(`schema-error`,{pointer:`${e.schemaLocation}/${Y}`,schema:e.schema,value:t,message:`Keyword '${Y}' must be a valid JSON Schema - received '${typeof t}'`})}function Gt({node:e,data:t,pointer:n,path:r}){let{schema:i}=e;if(!Array.isArray(t))return;if(i.contains===!1)return e.createError(`contains-array-error`,{pointer:n,value:t,schema:i});if(i.contains===!0)return Array.isArray(t)&&t.length===0?e.createError(`contains-any-error`,{pointer:n,value:t,schema:i}):void 0;if(!j(i.contains)||!Array.isArray(t))return;let a=0;for(let i of t)z(e.contains,i,n,r).length===0&&a++;let o=i.maxContains??1/0,s=i.minContains??1;if(!(o>=a&&s<=a))return o<a?e.createError(`contains-max-error`,{pointer:n,schema:i,delta:a-o,value:t}):s>a?e.createError(`contains-min-error`,{pointer:n,schema:i,delta:s-a,value:t}):e.createError(`contains-error`,{pointer:n,schema:i,value:t})}function Kt(e){return Array.isArray(e)&&e.find(e=>typeof e!=`string`)==null}let X=`dependentRequired`,qt={id:X,keyword:X,parse:Jt,addValidate:e=>e[X]!=null,validate:Yt};function Jt(e){let{schema:t}=e;if(t[X]==null)return;if(!j(t[X]))return e.createError(`schema-error`,{pointer:`${e.schemaLocation}/${X}`,schema:t,value:t[X],message:`Keyword '${X}' must be an object - received '${typeof t[X]}'`});let n=[];e.dependentRequired={};for(let r of Object.keys(t[X])){let i=t[X][r];Kt(i)?e.dependentRequired[r]=i:n.push(e.createError(`schema-error`,{pointer:`${e.schemaLocation}/${X}/${r}`,schema:t,value:i,message:`Keyword '${X}[string]' must be a string[] - received '${typeof i}'`}))}return n}function Yt({node:e,data:t,pointer:n=`#`}){let{dependentRequired:r}=e;if(r==null||!j(t))return;let i=[];return Object.keys(t).forEach(a=>{let o=r[a];if(Array.isArray(o))for(let r=0,a=o.length;r<a;r+=1)t[o[r]]===void 0&&i.push(e.createError(`missing-dependency-error`,{missingProperty:o[r],pointer:n,schema:e.schema,value:t}))}),i}let Xt=`dependentSchemas`,Zt={id:Xt,keyword:Xt,parse:Qt,addReduce:e=>e.dependentSchemas!=null,reduce:$t,addValidate:e=>e.dependentSchemas!=null,validate:en};function Qt(e){let{dependentSchemas:t}=e.schema;if(t==null)return;if(!j(t))return e.createError(`schema-error`,{pointer:`${e.schemaLocation}/${Xt}`,schema:e.schema,value:t,message:`Keyword '${Xt}' must be an object - received '${typeof t}'`});if(Object.keys(t).length===0)return;let n=[],r={};for(let i of Object.keys(t)){let a=t[i];j(a)?(r[i]=e.compileSchema(a,`${e.evaluationPath}/${Xt}/${i}`,`${e.schemaLocation}/${Xt}/${i}`),K(n,r[i])):U(a)?r[i]=a:n.push(e.createError(`schema-error`,{pointer:`${e.schemaLocation}/${Xt}/${i}`,schema:e.schema,value:a,message:`Keyword '${Xt}[string]' must be a valid JSON Schema'`}))}return e.dependentSchemas=r,n}function $t({node:e,data:t}){let{dependentSchemas:n}=e;if(!j(t)||n==null)return e;let r,i=0,a=`${e.schemaLocation}(`;return Object.keys(t).forEach(e=>{n[e]!=null&&(r??={properties:{}},V(n[e])?r=I(r,n[e].schema):r.properties[e]=n[e],a+=`${i?`,`:``}${Xt}/${e}`,i++)}),r==null?e:(r=I(e.schema,r,Xt),e.compileSchema(r,e.evaluationPath,e.schemaLocation,`${a})`))}function en({node:e,data:t,pointer:n,path:r}){let{schema:i,dependentSchemas:a}=e;if(!j(t)||a==null)return;let o=[];return Object.keys(t).forEach(s=>{let c=a[s];if(c!==!0){if(c===!1){o.push(e.createError(`missing-dependency-error`,{pointer:n,schema:i,value:t}));return}if(V(c)){D(z(c,t,n,r),o);return}}}),o}let Z=`dependencies`,tn={id:Z,keyword:Z,parse:nn,order:-9,addReduce:e=>e.schema[Z]!=null,reduce:rn,addValidate:e=>e.schema[Z]!=null,validate:an};function nn(e){let{dependencies:t}=e.schema;if(!j(t))return e.createError(`schema-error`,{pointer:`${e.schemaLocation}/${Z}`,schema:e.schema,value:t,message:`Keyword '${Z}' must be an object - received ${typeof t}`});let n=[];for(let r of Object.keys(t)){let i=t[r];H(i)||U(i)?(e.dependentSchemas=e.dependentSchemas??{},e.dependentSchemas[r]=e.compileSchema(i,`${e.evaluationPath}/${Z}/${r}`,`${e.schemaLocation}/${Z}/${r}`),K(n,e.dependentSchemas[r])):Kt(i)?(e.dependentRequired=e.dependentRequired??{},e.dependentRequired[r]=i):n.push(e.createError(`schema-error`,{pointer:`${e.schemaLocation}/${Z}`,schema:e.schema,value:t,message:`Keyword '${Z}[string]' must be JSON Schema or string[]`}))}return n}function rn({node:e,data:t,key:n,pointer:r,path:i}){if(!j(t)||e.dependentRequired==null&&e.dependentSchemas==null)return e;let a=e.compileSchema(e.schema,e.evaluationPath,e.schemaLocation),o=a.schema.required??[],s=``,c=e.dependentRequired;c&&Object.keys(c).forEach(e=>{if(!ze(t,e)&&!o.includes(e)||c[e]==null)return;o.push(...c[e]);let n=`${Z}/${e}`;s+=`${s===``?``:`,`}${n}`});let l=e.dependentSchemas;return l&&Object.keys(l).forEach(c=>{if(!ze(t,c)&&!o.includes(c))return!0;let u=l[c];if(!V(u))return!0;Array.isArray(u.schema.required)&&o.push(...u.schema.required);let d={...u,schema:{...u.schema,required:o}}.reduceNode(t,{key:n,pointer:`${r}/${Z}/${c}`,path:i}).node;a=R(a,d);let f=d.dynamicId?.replace(e.dynamicId,``)??``,p=f===``?`${Z}/${c}`:f;s+=`${s===``?``:`,`}${p}`}),a===e?e:o.length===0?a:(o=a.schema.required?a.schema.required.concat(...o):o,o=o.filter((e,t,n)=>n.indexOf(e)===t),a=R(a,a,Z),a.compileSchema({...a.schema,required:o},a.evaluationPath,a.schemaLocation,`${e.schemaLocation}(${s})`))}function an({node:e,data:t,pointer:n,path:r}){if(!j(t))return;let i=[];return e.dependentRequired&&D(Yt({node:e,data:t,pointer:n,path:r}),i),e.dependentSchemas&&D(en({node:e,data:t,pointer:n,path:r}),i),i}let on=`deprecated`,sn={id:on,keyword:on,parse:cn,addValidate:e=>e[on]===!0,validate:ln};function cn(e){let t=e.schema[on];if(t!=null){if(typeof t!=`boolean`)return e.createError(`schema-error`,{pointer:`${e.schemaLocation}/${on}`,schema:e.schema,value:t,message:`Keyword '${on}' must be a boolean - received '${typeof t}'`});e[on]=t}}function ln({node:e,data:t,pointer:n}){return[e.createAnnotation(`deprecated-warning`,{pointer:n,schema:e.schema,value:t},e.schema.deprecatedMessage)]}let un=`enum`,dn={id:un,keyword:un,parse:fn,addValidate:e=>e.enum!=null,validate:pn};function fn(e){let{schema:t}=e;if(t[un]!=null){if(!Array.isArray(t[un]))return e.createError(`schema-error`,{pointer:`${e.schemaLocation}/${un}`,schema:t,value:t[un],message:`Keyword '${un}' must be an array - received '${typeof t[un]}'`});e.enum=t[un]}}function pn({node:e,data:t,pointer:n=`#`}){if(e.enum==null)return;let r=A(t);if(r===`object`||r===`array`){let n=JSON.stringify(t);for(let t of e.enum)if(JSON.stringify(t)===n)return}else if(e.enum.includes(t))return;return e.createError(`enum-error`,{pointer:n,schema:e.schema,value:t,values:e.enum})}let mn={"additional-items-error":"Array at `{{pointer}}` may not have an additional item `{{key}}`","additional-properties-error":"Additional property `{{property}}` on `{{pointer}}` does not match schema `{{schema}}`","all-of-error":"Value `{{value}}` at `{{pointer}}` does not match schema of `{{allOf}}`","any-of-error":"Value `{{value}}` at `{{pointer}}` does not match any schema of `{{anyOf}}`","const-error":"Expected value at `{{pointer}}` to be `{{expected}}`, but value given is `{{value}}`","contains-any-error":"The array at `{{pointer}}` must contain at least one item","contains-array-error":"The property at `{{pointer}}` must not be an array","contains-error":"The array at `{{pointer}}` must contain an element that matches `{{schema}}`","contains-min-error":"The array at `{{pointer}}` contains {{delta}} too few items matching `{{schema}}`","contains-max-error":"The array at `{{pointer}}` contains {{delta}} too many items matching `{{schema}}`","enum-error":"Expected given value `{{value}}` in `{{pointer}}` to be one of `{{values}}`","exclusive-maximum-error":"Value in `{{pointer}}` is `{{length}}`, but should be at most `{{maximum}}`","exclusive-minimum-error":"Value in `{{pointer}}` is `{{length}}`, but should be at minimum `{{minimum}}`","forbidden-property-error":"Property name `{{property}}` at `{{pointer}}` is not allowed","format-date-error":"Value `{{value}}` at `{{pointer}}` is not a valid date","format-date-time-error":"Value `{{value}}` at `{{pointer}}` is not a valid date-time","format-duration-error":"Value `{{value}}` at `{{pointer}}` is not a valid duration","format-email-error":"Value `{{value}}` at `{{pointer}}` is not a valid email","format-hostname-error":"Value `{{value}}` at `{{pointer}}` is not a valid hostname","format-idn-hostname-error":"Value `{{value}}` at `{{pointer}}` is not a valid idn hostname","format-ipv4-error":"Value `{{value}}` at `{{pointer}}` is not a valid IPv4 address","format-ipv4-leading-zero-error":`IPv4 addresses starting with zero are invalid, since they are interpreted as octals`,"format-ipv6-error":"Value `{{value}}` at `{{pointer}}` is not a valid IPv6 address","format-ipv6-leading-zero-error":`IPv6 addresses starting with zero are invalid, since they are interpreted as octals`,"format-iri-error":"Value `{{value}}` at `{{pointer}}` is not a valid iri","format-iri-reference-error":"Value `{{value}}` at `{{pointer}}` is not a valid iri-reference","format-json-pointer-error":"Value `{{value}}` at `{{pointer}}` is not a valid json-pointer","format-regex-error":"Value `{{value}}` at `{{pointer}}` is not a valid regular expression","format-time-error":"Value `{{value}}` at `{{pointer}}` is not a valid time","format-uri-error":"Value `{{value}}` at `{{pointer}}` is not a valid uri","format-uri-reference-error":"Value `{{value}}` at `{{pointer}}` is not a valid uri-reference","format-uri-template-error":"Value `{{value}}` at `{{pointer}}` is not a valid uri-template","format-url-error":"Value `{{value}}` at `{{pointer}}` is not a valid url","format-uuid-error":"Value `{{value}}` at `{{pointer}}` is not a valid uuid","invalid-data-error":"No value may be specified in `{{pointer}}`","invalid-property-name-error":"Invalid property name `{{property}}` at `{{pointer}}`","maximum-error":"Value in `{{pointer}}` is `{{length}}`, but should be `{{maximum}}` at maximum","max-items-error":"Too many items in `{{pointer}}`, should be `{{maximum}}` at most, but got `{{length}}`","max-length-error":"Value `{{pointer}}` should have a maximum length of `{{maxLength}}`, but got `{{length}}`.","max-properties-error":"Too many properties in `{{pointer}}`, should be `{{maxProperties}}` at most, but got `{{length}}`","minimum-error":"Value in `{{pointer}}` is `{{length}}`, but should be `{{minimum}}` at minimum","min-items-error":"Too few items in `{{pointer}}`, should be at least `{{minItems}}`, but got `{{length}}`","min-items-one-error":"At least one item is required in `{{pointer}}`","min-length-error":"Value `{{pointer}}` should have a minimum length of `{{minLength}}`, but got `{{length}}`.","min-length-one-error":"A value is required in `{{pointer}}`","missing-one-of-declarator-error":"Missing oneOf declarator `{{declarator}}` in schema `{{schemaLocation}}`","min-properties-error":"Too few properties in `{{pointer}}`, should be at least `{{minProperties}}`, but got `{{length}}`","missing-array-item-error":`Array at '{{pointer}}' has a missing item at '{{key}}'`,"missing-dependency-error":"The required propery '{{missingProperty}}' in `{{pointer}}` is missing","missing-one-of-property-error":"Value at `{{pointer}}` must be object or array and have a property ${oneOfProperty}: ${value}","multiple-of-error":"Expected `{{value}}` in `{{pointer}}` to be multiple of `{{multipleOf}}`","multiple-one-of-error":"Value `{{value}}` should not match multiple schemas in oneOf `{{matches}}`","no-additional-properties-error":"Additional property `{{property}}` in `{{pointer}}` is not allowed","not-error":"Value `{{value}}` at pointer should not match schema `{{not}}`","one-of-error":"Value `{{value}}` in `{{pointer}}` does not match any given oneof schema","one-of-property-error":"Failed finding a matching oneOfProperty schema in `{{pointer}}` where `{{property}}` matches `{{value}}`","pattern-error":"Value in `{{pointer}}` should match `{{description}}`, but received `{{received}}`","pattern-properties-error":"Property `{{key}}` does not match any patterns in `{{pointer}}`. Valid patterns are: {{patterns}}","ref-error":`Could not resolve $ref '{{ref}}' from '{{pointer}}'`,"required-property-error":"The required property `{{key}}` is missing at `{{pointer}}`","schema-warning":`Failed retrieving a schema from '{{pointer}}' to key '{{key}}'`,"type-error":"Expected `{{value}}` ({{received}}) in `{{pointer}}` to be of type `{{expected}}`","undefined-value-error":"Value must not be undefined in `{{pointer}}`","unevaluated-property-error":"Invalid unevaluated property `{{pointer}}`","unevaluated-items-error":"Invalid unevaluated item `{{pointer}}`","unique-items-error":"Items in array must be unique. Value `{{value}}` in `{{pointer}}` is a duplicate of {{duplicatePointer}}.","unknown-property-error":"Could not find a valid schema for property `{{pointer}}` within object","value-not-empty-error":"A value for `{{property}}` is required at `{{pointer}}`","deprecated-warning":"Value at `{{pointer}}` is deprecated","schema-error":`Invalid schema found at {{pointer}}: {{message}}`,"unknown-keyword-warning":`Keyword '{{value}}' is not a valid keyword to draft '{{draft}}'`,"unknown-format-warning":`Format {{value}} is not a valid format`},hn={id:`exclusiveMaximum`,keyword:`exclusiveMaximum`,parse:gn,addValidate:({schema:e})=>e.exclusiveMaximum===!0||!isNaN(e.maximum),validate:_n};function gn(e){let{exclusiveMaximum:t}=e.schema;if(t!=null&&!(typeof t==`number`||typeof t==`boolean`))return e.createError(`schema-error`,{pointer:e.evaluationPath,schema:e.schema,value:void 0,message:`Keyword 'exclusiveMaximum' must be a number - received '${typeof t}'`})}function _n({node:e,data:t,pointer:n}){if(typeof t==`number`&&e.schema.exclusiveMaximum&&e.schema.maximum===t)return e.createError(`maximum-error`,{maximum:e.schema.exclusiveMaximum,length:t,pointer:n,schema:e.schema,value:t})}let vn={id:`exclusiveMinimum`,keyword:`exclusiveMinimum`,parse:yn,addValidate:({schema:e})=>e.exclusiveMinimum===!0||!isNaN(e.minimum),validate:bn};function yn(e){let{exclusiveMinimum:t}=e.schema;if(t!=null&&!(typeof t==`number`||typeof t==`boolean`))return e.createError(`schema-error`,{pointer:e.evaluationPath,schema:e.schema,value:void 0,message:`Keyword 'exclusiveMinimum' must be a number - received '${typeof t}'`})}function bn({node:e,data:t,pointer:n}){if(typeof t==`number`&&e.schema.exclusiveMinimum&&e.schema.minimum===t)return e.createError(`minimum-error`,{minimum:e.schema.exclusiveMinimum,length:t,pointer:n,schema:e.schema,value:t})}let xn=`format`,Sn={id:xn,keyword:xn,parse:Cn,addValidate:({schema:e})=>e?.format!=null,validate:wn};function Cn(e){let t=e.schema[xn];if(t!=null){if(typeof t!=`string`)return e.createError(`schema-error`,{pointer:`${e.schemaLocation}/${xn}`,schema:e.schema,value:t,message:`Keyword '${xn}' must be a string - received '${typeof t}'`});if(e.context.formats[t]==null)return e.createAnnotation(`unknown-format-warning`,{pointer:`${e.schemaLocation}/${xn}`,schema:e.schema,value:t,message:`Keyword '${xn}' must be a string - received '${typeof t}'`})}}function wn(e){let{node:t}=e,n=t.context.formats[t.schema.format];return n?.(e)}var Tn=s(((e,t)=>{(function(e){"use strict";e.exports.is_uri=n,e.exports.is_http_uri=r,e.exports.is_https_uri=i,e.exports.is_web_uri=a,e.exports.isUri=n,e.exports.isHttpUri=r,e.exports.isHttpsUri=i,e.exports.isWebUri=a;var t=function(e){return e.match(/(?:([^:\/?#]+):)?(?:\/\/([^\/?#]*))?([^?#]*)(?:\?([^#]*))?(?:#(.*))?/)};function n(e){if(e&&!/[^a-z0-9\:\/\?\#\[\]\@\!\$\&\'\(\)\*\+\,\;\=\.\-\_\~\%]/i.test(e)&&!/%[^0-9a-f]/i.test(e)&&!/%[0-9a-f](:?[^0-9a-f]|$)/i.test(e)){var n=[],r=``,i=``,a=``,o=``,s=``,c=``;if(n=t(e),r=n[1],i=n[2],a=n[3],o=n[4],s=n[5],r&&r.length&&a.length>=0){if(i&&i.length){if(!(a.length===0||/^\//.test(a)))return}else if(/^\/\//.test(a))return;if(/^[a-z][a-z0-9\+\-\.]*$/.test(r.toLowerCase()))return c+=r+`:`,i&&i.length&&(c+=`//`+i),c+=a,o&&o.length&&(c+=`?`+o),s&&s.length&&(c+=`#`+s),c}}}function r(e,r){if(n(e)){var i=[],a=``,o=``,s=``,c=``,l=``,u=``,d=``;if(i=t(e),a=i[1],o=i[2],s=i[3],l=i[4],u=i[5],a){if(r){if(a.toLowerCase()!=`https`)return}else if(a.toLowerCase()!=`http`)return;if(o)return/:(\d+)$/.test(o)&&(c=o.match(/:(\d+)$/)[0],o=o.replace(/:\d+$/,``)),d+=a+`:`,d+=`//`+o,c&&(d+=c),d+=s,l&&l.length&&(d+=`?`+l),u&&u.length&&(d+=`#`+u),d}}}function i(e){return r(e,!0)}function a(e){return r(e)||i(e)}})(t)}))();let{REGEX_FLAGS:En}=O,Dn=/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,On=/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,kn=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,An=/^(?<time>(?:([0-1]\d|2[0-3]):[0-5]\d:(?<second>[0-5]\d|60)))(?:\.\d+)?(?<offset>(?:z|[+-]([0-1]\d|2[0-3])(?::?[0-5]\d)?))$/i,jn=[0,31,28,31,30,31,30,31,31,30,31,30,31],Mn=/^(?:\/(?:[^~/]|~0|~1)*)*$/,Nn=/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,Pn=/^P(?!$)(\d+Y)?(\d+M)?(\d+W)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?$/,Fn={date:({node:e,pointer:t,data:n})=>{let{schema:r}=e;if(typeof n!=`string`||n===``)return;let i=n.match(kn);if(!i)return e.createError(`format-date-error`,{value:n,pointer:t,schema:r});let a=+i[1],o=+i[2],s=+i[3],c=a%4==0&&(a%100!=0||a%400==0);if(!(o>=1&&o<=12&&s>=1&&s<=(o==2&&c?29:jn[o])))return e.createError(`format-date-error`,{value:n,pointer:t,schema:r})},"date-time":({node:e,pointer:t,data:n,path:r})=>{let{schema:i}=e;if(typeof n!=`string`||n===``)return;let a=n.split(/t/i);if(a.length===2){let n=Fn.date({node:e,pointer:t,data:a[0],path:r})===void 0,i=Fn.time({node:e,pointer:t,data:a[1],path:r})===void 0;if(n&&i)return}return e.createError(`format-date-time-error`,{value:n,pointer:t,schema:i})},duration:({node:e,pointer:t,data:n})=>{if(A(n)===`string`&&(!Pn.test(n)||/(\d+M)(\d+W)|(\d+Y)(\d+W)/.test(n)))return e.createError(`format-duration-error`,{value:n,pointer:t,schema:e.schema})},email:({node:e,pointer:t,data:n})=>{let{schema:r}=e;if(typeof n!=`string`||n===``)return;let i=n.lastIndexOf(`@`),a=n.substr(0,i),o=n.substr(i+1);if(!a||!o||a.length>64||o.length>253)return e.createError(`format-email-error`,{value:n,pointer:t,schema:r});let s=a;if(/^".*"$/.test(a)&&(s=a.replace(/(^")|([. @]+)|("$)/g,``)),s[0]===`.`||s.endsWith(`.`)||s.includes(`..`)||!/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+$/i.test(s))return e.createError(`format-email-error`,{value:n,pointer:t,schema:r});if(/^\[.*\]$/.test(o)){let e=o.substr(1,o.length-2);if(Dn.test(e)||On.test(e)||/IPv6:::[0-9a-f]{1,4}/.test(e))return}if(!/^[a-z0-9.-]+$/i.test(o)||!o.split(`.`).every(e=>/^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$/i.test(e)))return e.createError(`format-email-error`,{value:n,pointer:t,schema:r})},"json-pointer":({node:e,pointer:t,data:n})=>{let{schema:r}=e;if(!(typeof n!=`string`||n===``)&&!Mn.test(n))return e.createError(`format-json-pointer-error`,{value:n,pointer:t,schema:r})},"relative-json-pointer":({node:e,pointer:t,data:n})=>{let{schema:r}=e;if(typeof n==`string`&&!Nn.test(n))return e.createError(`format-json-pointer-error`,{value:n,pointer:t,schema:r})},regex:({node:e,pointer:t,data:n})=>{let{schema:r}=e;if(!(typeof n==`object`||typeof n==`number`||Array.isArray(n)||A(n)===`boolean`)){if(typeof n==`string`&&/\\Z$/.test(n)===!1){try{new RegExp(n,r.regexFlags??En);return}catch{}return e.createError(`format-regex-error`,{value:n,pointer:t,schema:r})}return e.createError(`format-regex-error`,{value:n,pointer:t,schema:r})}},time:({node:e,pointer:t,data:n})=>{let{schema:r}=e;if(typeof n!=`string`||n===``)return;let i=n.match(An);if(!i)return e.createError(`format-date-time-error`,{value:n,pointer:t,schema:r});if(i.groups?.second===`60`){if(/23:59:60(z|\+00:00)/i.test(n))return;let a=i.groups.time.match(/(\d+):(\d+):/),o=i.groups.offset.match(/(\d+):(\d+)/);if(a&&o){let e=parseInt(a[1]),t=parseInt(o[1]),n=parseInt(a[2]),r=parseInt(o[2]),s;s=/^-/.test(i.groups.offset)?(e+t)*60+(n+r):(24+e-t)*60+(n-r);let c=Math.floor(s/60),l=c%24,u=s-c*60;if(l===23&&u===59)return}return e.createError(`format-date-time-error`,{value:n,pointer:t,schema:r})}},url:({node:e,data:t,pointer:n})=>{let{schema:r}=e;if(!(t===``||(0,Tn.isWebUri)(`${t}`)))return e.createError(`format-url-error`,{value:t,pointer:n,schema:r})},uuid:({node:e,data:t,pointer:n})=>{let{schema:r}=e;if(!(typeof t!=`string`||t===``)&&!/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(t))return e.createError(`format-uuid-error`,{value:t,pointer:n,schema:r})}};function In(e,t){if(e.oneOf)return e.oneOf.map(e=>e.resolveRef());if(e.items?.oneOf)return e.items.oneOf.map(e=>e.resolveRef());if(e.prefixItems&&e.prefixItems.length>+t){let{node:n,error:r}=e.getNodeChild(t);return n?[n]:r}if(e.schema.additionalItems){if(e.schema.additionalItems===!0)return[e.compileSchema({type:`string`})];if(e.items)return[e.items.resolveRef()]}if(e.prefixItems&&e.prefixItems.length<=+t)return[];let{node:n,error:r}=e.getNodeChild(t);return n?[n]:r}let Ln=[`string`,`number`,`integer`,`boolean`,`null`,`array`,`object`],Rn=[`additionalProperties`,`dependencies`,`dependentSchemas`,`dependentRequired`,`maxProperties`,`minProperties`,`patternProperties`,`properties`,`propertyNames`,`required`,`unevaluatedProperties`],zn=[`contains`,`items`,`maxItems`,`minItems`,`unevaluatedItems`,`uniqueItems`];function Bn(e,t){let n=A(t),r=e.schema;if(r===!0)return n===`bigint`?`number`:Ln.some(e=>e===n)?n:void 0;if(!j(r))return;let i=r.type;if(Array.isArray(i)){if(i.includes(n))return n;let e=A(r.default);return i.includes(e)?e:i[0]}if(i)return i;if(Array.isArray(r.enum)){let e=r.enum.map(e=>A(e)).filter((e,t,n)=>n.indexOf(e)===t);if(e.includes(n))return n;let t=A(r.default);return e.includes(t)?t:e[0]}let a=Object.keys(e.schema),o=a.filter(e=>Rn.includes(e)),s=a.filter(e=>zn.includes(e));if(o.length>0&&o.length>s.length)return`object`;if(s.length>0&&s.length>o.length)return`array`;if(e.if)return Bn(e.if.resolveRef()??e.if,t);if(e.allOf)for(let n of e.allOf){let e=Bn(n.resolveRef()??n,t);if(e)return e}if(e.oneOf)for(let n of e.oneOf){let e=Bn(n.resolveRef()??n,t);if(e)return e}if(e.anyOf)for(let n of e.anyOf){let e=Bn(n.resolveRef()??n,t);if(e)return e}if(r.$ref){let n=e.resolveRef();if(n)return Bn(n,t)}}function Vn(e){switch(A(e)){case`string`:case`array`:return e?.length===0;case`null`:case`undefined`:return!0;case`object`:return Object.keys(e).length===0;default:return!1}}let Q=`oneOf`,{DECLARATOR_ONEOF:Hn}=O,Un={id:Q,keyword:Q,parse:Gn,addReduce:e=>e[Q]!=null,reduce:Kn,addValidate:e=>e[Q]!=null,validate:Zn},Wn={id:`oneOf-fuzzy`,keyword:`oneOf`,parse:Gn,addReduce:e=>e.oneOf!=null,reduce:Yn,addValidate:e=>e.oneOf!=null,validate:Zn};function Gn(e){let{schema:t,evaluationPath:n,schemaLocation:r}=e;if(t[Q]!=null){if(!Array.isArray(t[Q]))return e.createError(`schema-error`,{pointer:r,schema:t,value:t[Q],message:`Keyword '${Q}' must be an array - received '${typeof t[Q]}'`});if(t[Q].length!==0)return e[Q]=t[Q].map((t,i)=>e.compileSchema(t,`${n}/${Q}/${i}`,`${r}/${Q}/${i}`)),K([],...e[Q])}}function Kn({node:e,data:t,pointer:n,path:r}){if(e.oneOf==null)return;if(t!=null&&e.schema[Hn])return qn({node:e,data:t,pointer:n,path:r});let i=[],a=[];for(let o=0;o<e.oneOf.length;o+=1){let s=z(e.oneOf[o],t,n,r);s.length===0?i.push({index:o,node:e.oneOf[o]}):a.push(...s)}if(i.length===1){let{node:e,index:a}=i[0],{node:o,error:s}=e.reduceNode(t,{pointer:n,path:r});if(o){let t=o.dynamicId?.replace(e.dynamicId,``)??``,n=t===``?`oneOf/${a}`:t;return o.oneOfIndex=a,o.dynamicId=qe(o.dynamicId,`+${e.schemaLocation}(${n})`),o}return s}return i.length,e.createError(`one-of-error`,{value:JSON.stringify(t),pointer:n,schema:e.schema,oneOf:e.schema.oneOf,errors:a})}function qn({node:e,data:t,pointer:n,path:r}){if(e.oneOf==null)return;let i=e.schema[Hn],a=B(t,i);if(t===void 0||a===void 0)return e.createError(`missing-one-of-property-error`,{oneOfProperty:i,pointer:n,schema:e.schema,value:t});let o=[];for(let s=0;s<e.oneOf.length;s+=1){let{node:c}=e.oneOf[s].getNodeChild(i,t);if(!V(c))return e.createError(`missing-one-of-declarator-error`,{declarator:Hn,oneOfProperty:i,schemaLocation:e.oneOf[s].schemaLocation,pointer:`${n}/oneOf/${s}`,schema:e.schema,value:t});let l=D(z(c,a,`${n}/${i}`,r));if(l.length>0)o.push(...l);else{let{node:i}=e.oneOf[s].reduceNode(t,{pointer:n,path:r});if(i)return i.oneOfIndex=s,i}}return e.createError(`one-of-property-error`,{property:i,value:t,pointer:n,schema:e.schema,errors:o})}function Jn(e,t,n,r){if(t==null||e.properties==null)return-1;let i=0,a=Object.keys(e.properties??{});for(let o of a)t[o]&&z(e.properties[o],t[o],n,r).length===0&&(i+=1);return i}function Yn({node:e,data:t,pointer:n,path:r}){if(e.oneOf==null)return e;let i=Kn({node:e,data:t,pointer:n,path:r});if(V(i))return i;if(j(t)){let i,a=-1,o=0;for(let s=0;s<e.oneOf.length;s+=1){let c=e.oneOf[s],l=Jn(c,t,n,r);o<l&&(o=l,i=c,a=s)}if(i===void 0)return e.createError(`one-of-error`,{value:JSON.stringify(t),pointer:n,schema:e.schema,oneOf:e.schema.oneOf});let{node:s,error:c}=i.reduceNode(t,{pointer:n,path:r});return s?(s.oneOfIndex=a,s):c}return i}function Xn({node:e,data:t,pointer:n=`#`,path:r}){let{oneOf:i,schema:a}=e;if(!i)return;let o=a[Hn],s=B(t,o),c=[],l=[];for(let e of i){let{node:t,error:a}=e.getNodeChild(o,s);if(t){let a=z(t,s,`${n}/${o}`,r);a.length>0?l.push(...a):c.push({index:i.indexOf(e),node:e})}else console.log(`jlib oneOf error: failed getting schema for '${o}' to resolve ${Hn} in ${n}/oneOf/${i.indexOf(e)}`,a)}if(c.length===1){let e=c[0];return e.node.oneOfIndex=e.index,z(e.node,t,n,r)}return c.length>1?e.createError(`multiple-one-of-error`,{value:t,pointer:n,schema:a,matches:c}):e.createError(`one-of-error`,{value:JSON.stringify(t),pointer:n,schema:a,oneOf:a.oneOf,errors:l})}function Zn({node:e,data:t,pointer:n=`#`,path:r}){let{oneOf:i,schema:a}=e;if(!i)return;if(a[Hn])return Xn({node:e,data:t,pointer:n,path:r});let o=[],s=[];for(let e=0;e<i.length;e+=1){let a=z(i[e],t,n,r);a.length>0?s.push(...a):o.push({index:e,node:i[e]})}if(o.length===1){let{node:e,index:t}=o[0];e.oneOfIndex=t;return}return o.length>1?e.createError(`multiple-one-of-error`,{value:t,pointer:n,schema:a,matches:o}):e.createError(`one-of-error`,{value:JSON.stringify(t),pointer:n,schema:a,oneOf:a.oneOf,errors:s})}let Qn=()=>!1;try{typeof File==`function`&&(Qn=e=>e instanceof File)}catch{}function $n(e,t){if(e.$ref==null)return;t.cache=t.cache??{};let{cache:n,recursionLimit:r=1}=t,i=e.schemaLocation;if(n[i]=n[i]??{},n[i][e.$ref]=n[i][e.$ref]??0,n[i][e.$ref]>=r&&t.disableRecursionLimit!==!0)return!1;t.disableRecursionLimit=!1,n[i][e.$ref]+=1;let a=e.resolveRef();if(a&&a!==e)return a}function er(e,t){return(t.cache?.[e.schemaLocation]?.[e.$ref]??-1)<(t.recursionLimit??1)}function tr(e,t){let n=A(t);if(e===void 0||t==null||n===e||n===`number`&&e===`integer`)return t;if(e===`string`)return JSON.stringify(t);if(n!==`string`)return t;try{let n=JSON.parse(t);if(A(n)===e)return n}catch{}return t}function nr(e,t,n){if(n?.cache==null)throw Error(`Missing options`);if(e.schema===!1||e.schema===!0||Qn(t))return t;if(e.schema?.const!==void 0)return e.schema?.const;let r=e,i=t;if(Array.isArray(e.schema.enum)&&e.schema.enum.length>0&&t===void 0)return e.schema.default??e.schema.enum[0];if(e.schema.default!==void 0&&i===void 0&&(i=e.schema.default),r.allOf?.length&&r.allOf.forEach(e=>{i=e.getData(i,n)??i}),r.anyOf&&r.anyOf?.length>0&&(i=r.anyOf[0].getData(i,n)??i),r.oneOf&&r.oneOf?.length>0)if(Vn(i))r=R(r,r.oneOf[0]);else{let e=Yn({node:r,data:i,path:[],pointer:`#`});if(W(e)){if(i!=null&&n.removeInvalidData!==!0)return i;r=r.oneOf[0],i=void 0}else r=R(r,e)}let a=$n(r,n);if(a===!1)return i;V(a)&&(i=a.getData(i,n)??i,r=a);let o=rr[Bn(r,i)]?.(r,i,n);return o===void 0?i:o}let rr={null:(e,t,n)=>ir(e,t,null,n.useTypeDefaults),string:(e,t,n)=>ir(e,t,``,n.useTypeDefaults),number:(e,t,n)=>ir(e,t,0,n.useTypeDefaults),integer:(e,t,n)=>ir(e,t,0,n.useTypeDefaults),boolean:(e,t,n)=>ir(e,t,!1,n.useTypeDefaults),object:(e,t,n)=>{let r=e.schema,i=r.default===void 0?{}:r.default,a={},o=n.extendDefaults===!1&&r.default!==void 0?[]:r.required??[],s=e.properties;s&&Object.keys(s).forEach(e=>{let r=s[e],c=o.includes(e),l=B(t,e),u=t===void 0||l===void 0?B(i,e):l;if(u!=null||c||n.addOptionalProps){let t=r.getData(u,n);(t!==void 0||n.useTypeDefaults!==!1)&&(a[e]=t)}});let c=e.dependentRequired;j(c)&&Object.keys(c).forEach(t=>{let r=c[t];B(a,t)!==void 0&&r.forEach(t=>{let{node:r}=e.getNodeChild(t,a);r&&(a[t]=r.getData(B(a,t),n))})});let l=e.dependentSchemas;if(l&&Object.keys(l).forEach(e=>{let r=l[e];if(a[e]!==void 0&&V(r)){let e=r.getData(t??a,n);Object.assign(a,e)}}),t)if(n.removeInvalidData===!0&&(r.additionalProperties===!1||j(r.additionalProperties))){let n=e.additionalProperties;V(n)&&Object.keys(t).forEach(e=>{if(a[e]==null){let r=B(t,e);n.validate(r).valid&&(a[e]=r)}})}else Object.keys(t).forEach(e=>a[e]==null&&(a[e]=B(t,e)));if(e.if){let{valid:t}=e.if.validate(a);if(t&&e.then){let t=e.then.getData(a,n);Object.assign(a,t)}else if(!t&&e.else){let t=e.else.getData(a,n);Object.assign(a,t)}}return{...i,...a}},array:(e,t,n)=>{let r=e.schema,i=r.default===void 0?[]:r.default,a=Array.isArray(t)?[...t]:i,o=n.extendDefaults===!1&&r.default!==void 0?0:r.minItems??0;if(r.items==null){if(e.items){let t=Math.max(o,a.length);for(let r=0;r<t;r+=1)a[r]=e.items.getData(a[r],n)}return a||[]}if(e.prefixItems){let r=Array.isArray(t)?t:[],s=Math.max(o??0,e.prefixItems.length);for(let t=0;t<s;t+=1){let o=e.prefixItems[t]??e.items;if(o&&er(o,n)||r[t]!==void 0){let e=o.getData(a[t]==null?i[t]:a[t],n);e!==void 0&&(a[t]=e)}}return a||[]}if(e.items==null)return a;if(e.items&&er(e.items,n)||Array.isArray(t)&&t?.length>0){let t={...n.cache};for(let r=0,s=Math.max(o,a.length);r<s;r+=1){n.cache=E(t);let o={...n,disableRecursionLimit:!0},s=e.items.getData(a[r]==null?i[r]:a[r],o);if(s===void 0)return a;a[r]=s}}return a}};function ir({schema:e},t,n,r){return t===void 0?e.const?e.const:e.default===void 0&&Array.isArray(e.enum)?e.enum[0]:e.default===void 0&&r!==!1?n:e.default:tr(e.type,t)}let ar=`items`,or={id:ar,keyword:ar,parse:cr,addResolve:e=>(e.prefixItems||e[ar])!=null,resolve:sr,addValidate:({schema:e})=>e.items!=null,validate:lr};function sr({node:e,key:t}){if(e.prefixItems?.[t])return e.prefixItems[t];if(e.items)return e.items}function cr(e){let{schema:t,evaluationPath:n}=e,r=t[ar];if(!(r==null||typeof r==`boolean`)){if(j(r)){e.items=e.compileSchema(r,`${n}/${ar}`,`${e.schemaLocation}/${ar}`);return}if(Array.isArray(r)){e.prefixItems=r.map((t,r)=>e.compileSchema(t,`${n}/${ar}/${r}`,`${e.schemaLocation}/${ar}/${r}`));return}return e.createError(`schema-error`,{pointer:n,schema:t,value:void 0,message:`Keyword '${ar}' must be an object or array - received '${typeof r}'`})}}function lr({node:e,data:t,pointer:n=`#`,path:r}){let{schema:i}=e;if(!Array.isArray(t)||t.length===0)return;if(i.items===!1)return Array.isArray(t)&&t.length===0?void 0:e.createError(`invalid-data-error`,{pointer:n,value:t,schema:i});let a=[];if(e.prefixItems){for(let i=0;i<Math.min(e.prefixItems.length,t.length);i+=1){let o=t[i],s=e.prefixItems[i],c=z(s,o,`${n}/${i}`,r);a.push(...c)}return a}if(e.items){for(let i=0;i<t.length;i+=1){let o=t[i],s=z(e.items,o,`${n}/${i}`,r);s&&a.push(...s)}return a}}let ur=`maximum`,dr={id:ur,keyword:ur,parse:fr,addValidate:e=>e.maximum!=null,validate:pr};function fr(e){let t=e.schema[ur];if(t!=null){if(!G(t))return e.createError(`schema-error`,{pointer:`${e.schemaLocation}/${ur}`,schema:e.schema,value:t,message:`Keyword '${ur}' must be a number - received '${typeof t}'`});e[ur]=t}}function pr({node:e,data:t,pointer:n}){if(!G(t))return;let r=e[ur],{schema:i}=e;if(r&&r<t)return e.createError(`maximum-error`,{maximum:r,length:t,value:t,pointer:n,schema:i});if(r&&i.exclusiveMaximum===!0&&r===t)return e.createError(`maximum-error`,{maximum:r,length:t,pointer:n,schema:i,value:t})}let mr=`maxItems`,hr={id:mr,keyword:mr,parse:gr,addValidate:({schema:e})=>!isNaN(e.maxItems),validate:_r};function gr(e){let t=e.schema[mr];if(t!=null){if(!G(t))return e.createError(`schema-error`,{pointer:`${e.schemaLocation}/${mr}`,schema:e.schema,value:t,message:`Keyword '${mr}' must be a number - received '${typeof t}'`});e[mr]=t}}function _r({node:e,data:t,pointer:n}){let{schema:r}=e;if(Array.isArray(t)&&r.maxItems<t.length)return e.createError(`max-items-error`,{maximum:r.maxItems,length:t.length,schema:r,value:t,pointer:n})}function vr(e){let t=[],n=0,r=e.length;for(;n<r;){let i=e.charCodeAt(n++);if(i>=55296&&i<=56319&&n<r){let r=e.charCodeAt(n++);(r&64512)==56320?t.push(((i&1023)<<10)+(r&1023)+65536):(t.push(i),n--)}else t.push(i)}return t}let yr=`maxLength`,br={id:yr,keyword:yr,parse:xr,addValidate:e=>e[yr]!=null,validate:Sr};function xr(e){let t=e.schema[yr];if(t!=null){if(!G(t))return e.createError(`schema-error`,{pointer:`${e.schemaLocation}/${yr}`,schema:e.schema,value:t,message:`Keyword '${yr}' must be a number - received '${typeof t}'`});e[yr]=t}}function Sr({node:e,data:t,pointer:n=`#`}){if(typeof t!=`string`)return;let r=e[yr],i=vr(t).length;if(r<i)return e.createError(`max-length-error`,{maxLength:r,length:i,pointer:n,schema:e.schema,value:t})}let Cr=`maxProperties`,wr={id:Cr,keyword:Cr,parse:Tr,addValidate:e=>e[Cr]!=null,validate:Er};function Tr(e){let t=e.schema[Cr];if(t!=null){if(!G(t))return e.createError(`schema-error`,{pointer:`${e.schemaLocation}/${Cr}`,schema:e.schema,value:t,message:`Keyword '${Cr}' must be a number - received '${typeof t}'`});e[Cr]=t}}function Er({node:e,data:t,pointer:n=`#`}){if(!j(t))return;let r=e[Cr],i=Object.keys(t).length;if(r<i)return e.createError(`max-properties-error`,{maxProperties:r,length:i,pointer:n,schema:e.schema,value:t})}let Dr=`minimum`,Or={id:Dr,keyword:Dr,parse:kr,addValidate:e=>e[Dr]!=null,validate:Ar};function kr(e){let t=e.schema[Dr];if(t!=null){if(!G(t))return e.createError(`schema-error`,{pointer:`${e.schemaLocation}/${Dr}`,schema:e.schema,value:t,message:`Keyword '${Dr}' must be a number - received '${typeof t}'`});e[Dr]=t}}function Ar({node:e,data:t,pointer:n}){if(!G(t))return;let r=e[Dr];if(r>t||e.schema.exclusiveMinimum===!0&&e.schema.minimum===t)return e.createError(`minimum-error`,{minimum:r,length:t,pointer:n,schema:e.schema,value:t})}let jr=`minItems`,Mr={id:jr,keyword:jr,parse:Nr,addValidate:e=>e[jr]!=null,validate:Pr};function Nr(e){let t=e.schema[jr];if(t!=null){if(!G(t))return e.createError(`schema-error`,{pointer:`${e.schemaLocation}/${jr}`,schema:e.schema,value:t,message:`Keyword '${jr}' must be a number - received '${typeof t}'`});e[jr]=t}}function Pr({node:e,data:t,pointer:n}){if(!Array.isArray(t))return;let r=e[jr];if(r>t.length)return e.createError(`min-items-error`,{minItems:r,length:t.length,pointer:n,schema:e.schema,value:t})}let Fr=`minLength`,Ir={id:Fr,keyword:Fr,parse:Lr,addValidate:e=>e[Fr]!=null,validate:Rr};function Lr(e){let t=e.schema[Fr];if(t!=null){if(!G(t))return e.createError(`schema-error`,{pointer:`${e.schemaLocation}/${Fr}`,schema:e.schema,value:t,message:`Keyword '${Fr}' must be a number - received '${typeof t}'`});e[Fr]=t}}function Rr({node:e,data:t,pointer:n=`#`}){if(typeof t!=`string`)return;let r=vr(t).length,i=e[Fr];if(!(i<=r))return e.createError(`min-length-error`,{minLength:i,length:r,pointer:n,schema:e.schema,value:t})}let zr=`minProperties`,Br={id:zr,keyword:zr,parse:Vr,addValidate:e=>e[zr]!=null,validate:Hr};function Vr(e){let t=e.schema[zr];if(t!=null){if(!G(t))return e.createError(`schema-error`,{pointer:`${e.schemaLocation}/${zr}`,schema:e.schema,value:t,message:`Keyword '${zr}' must be a number - received '${typeof t}'`});e[zr]=t}}function Hr({node:e,data:t,pointer:n=`#`}){if(!j(t))return;let r=Object.keys(t).length;if(e.schema.minProperties>r)return e.createError(`min-properties-error`,{minProperties:e.schema.minProperties,length:r,pointer:n,schema:e.schema,value:t})}function Ur(e){let t=`${e}`;if(t.includes(`e-`))return parseInt(t.replace(/.*e-/,``));let n=t.indexOf(`.`);return n===-1?0:t.length-(n+1)}let Wr=`multipleOf`,Gr={id:Wr,keyword:Wr,parse:Kr,addValidate:e=>e[Wr]!=null,validate:qr};function Kr(e){let t=e.schema[Wr];if(t!=null){if(!G(t))return e.createError(`schema-error`,{pointer:`${e.schemaLocation}/${Wr}`,schema:e.schema,value:t,message:`Keyword '${Wr}' must be a number - received '${typeof t}'`});e[Wr]=t}}function qr({node:e,data:t,pointer:n}){if(typeof t!=`number`)return;let r=e[Wr],i=Ur(t),a=Ur(r);if(i>a)return e.createError(`multiple-of-error`,{multipleOf:r,value:t,pointer:n,schema:e.schema});let o=10**a;if(Math.round(t*o)%Math.round(r*o)/o!==0)return e.createError(`multiple-of-error`,{multipleOf:r,value:t,pointer:n,schema:e.schema})}let Jr={id:`not`,keyword:`not`,parse:Yr,addValidate:e=>e.not!=null,validate:Xr};function Yr(e){let{schema:t,evaluationPath:n,schemaLocation:r}=e,i=t.not;if(i!=null)return!H(i)&&!U(i)?e.createError(`schema-error`,{pointer:`${r}/not`,schema:t,value:i,message:`Keyword 'not' must be a valid JSON Schema - received '${typeof i}'`}):(e.not=e.compileSchema(t.not,`${n}/not`,`${r}/not`),e.not.schemaValidation)}function Xr({node:e,data:t,pointer:n,path:r}){let{schema:i}=e;if(z(e.not,t,n,r).length===0)return e.createError(`not-error`,{value:t,not:i.not,pointer:n,schema:i})}let Zr=`pattern`,{REGEX_FLAGS:Qr}=O,$r={id:Zr,keyword:Zr,parse:ei,addValidate:e=>e[Zr]!=null,validate:ti};function ei(e){let t=e.schema[Zr];if(t!=null){if(typeof t!=`string`)return e.createError(`schema-error`,{pointer:e.schemaLocation,schema:e.schema,value:t,message:`Keyword 'pattern' must be a string - received '${typeof t}'`});try{e[Zr]=new RegExp(t,e.schema.regexFlags??Qr)}catch(n){return e.createError(`schema-error`,{pointer:e.schemaLocation,schema:e.schema,value:t,message:n.message})}}}function ti({node:e,data:t,pointer:n=`#`}){if(typeof t==`string`&&e.pattern.test(t)===!1){let{schema:r}=e;return e.createError(`pattern-error`,{pattern:r.pattern,description:r.patternExample||r.pattern,received:t,schema:r,value:t,pointer:n})}}let{REGEX_FLAGS:ni}=O,ri={id:`patternProperties`,keyword:`patternProperties`,parse:ii,addReduce:e=>e.patternProperties!=null,reduce:oi,addResolve:e=>e.patternProperties!=null,resolve:ai,addValidate:e=>e.patternProperties!=null,validate:si};function ii(e){let{schema:t}=e;if(!j(t.patternProperties))return;let n=Object.keys(t.patternProperties);if(n.length!==0)return e.patternProperties=n.map(n=>({name:n,pattern:new RegExp(n,t.regexFlags??ni),node:e.compileSchema(t.patternProperties[n],`${e.evaluationPath}/patternProperties/${n}`,`${e.schemaLocation}/patternProperties/${n}`)})),K([],...e.patternProperties.map(({node:e})=>e))}function ai({node:e,key:t}){return e.patternProperties?.find(({pattern:e})=>e.test(`${t}`))?.node}function oi({node:e,data:t,key:n}){let{patternProperties:r}=e;if(r==null)return;let i,a=Object.keys(t??{});n&&a.push(`${n}`);let o=`${e.schemaLocation}(`;return a.push(...Object.keys(e.schema.properties??{})),a.forEach((t,n,a)=>{if(a.indexOf(t)!==n)return;let s=e.schema.properties?.[t]??{},c=r.filter(e=>e.pattern.test(t));c.forEach(e=>s=I(s,e.node.schema)),c.length>0&&(i??={properties:{}},i.properties[t]=s,o+=`${c.map(({name:e})=>`patternProperties/${e}`).join(`,`)}`)}),i==null?e:(i=I(e.schema,i,`patternProperties`),e.compileSchema(i,e.evaluationPath,e.schemaLocation,`${o})`))}function si({node:e,data:t,pointer:n,path:r}){if(!j(t))return;let{schema:i,patternProperties:a}=e,o=i.properties||{},s=Object.keys(i.patternProperties).join(`,`),c=[];return Object.keys(t).forEach(l=>{let u=B(t,l),d=a.filter(e=>e.pattern.test(l));d.forEach(({node:e})=>c.push(...z(e,u,`${n}/${l}`,r))),!o[l]&&d.length===0&&i.additionalProperties===!1&&c.push(e.createError(`no-additional-properties-error`,{key:l,pointer:`${n}/${l}`,schema:i,value:u,patterns:s}))}),c}let ci={id:`property`,keyword:`properties`,parse:ui,addResolve:e=>e.properties!=null,resolve:li,addValidate:e=>e.properties!=null,validate:di};function li({node:e,key:t}){return e.properties?.[t]}function ui(e){let{schema:t,evaluationPath:n,schemaLocation:r}=e;if(t.properties==null)return;if(t.properties&&!j(t.properties))return e.createError(`schema-error`,{pointer:r,schema:t,value:void 0,message:"keyword `properties` must be of type `object`"});let i=[],a={};return Object.keys(t.properties).forEach(o=>{a[o]=e.compileSchema(t.properties[o],`${n}/properties/${o}`,`${r}/properties/${o}`),K(i,a[o])}),e.properties=a,i}function di({node:e,data:t,pointer:n,path:r}){if(!j(t))return;let i=[],a=e.properties??{};return Object.keys(t).forEach(e=>{let o=B(t,e),s=a[e];if(s==null||o===void 0)return;let c=z(s,o,`${n}/${e}`,r);i.push(...c)}),i}let fi=`propertyNames`,pi={id:fi,keyword:fi,parse:mi,addValidate:e=>e.schema[fi]!=null,validate:hi};function mi(e){let t=e.schema[fi];if(t!=null){if(!(H(t)||U(t)))return e.createError(`schema-error`,{pointer:`${e.schemaLocation}/${fi}`,schema:e.schema,value:t,message:`Keyword '${fi}' must be a valid JSON Schema - received '${typeof t}'`});if(!U(t))return e.propertyNames=e.compileSchema(t,`${e.evaluationPath}/propertyNames`,`${e.schemaLocation}/propertyNames`),e.propertyNames.schemaValidation}}function hi({node:e,data:t,pointer:n,path:r}){let{schema:i}=e;if(!j(t))return;if(i.propertyNames===!1)return Object.keys(t).length===0?void 0:e.createError(`invalid-property-name-error`,{property:Object.keys(t),pointer:n,value:t,schema:i});if(i[fi]===!0)return;let a=e[fi];if(!j(a))return;let o=[];return Object.keys(t).forEach(s=>{let c=z(a,s,`${n}/${s}`,r);c.length>0&&o.push(e.createError(`invalid-property-name-error`,{property:s,pointer:n,validationError:c[0],value:t[s],schema:i}))}),o}let gi=`required`,_i={id:gi,keyword:gi,parse:vi,addValidate:e=>e.required!=null,validate:yi};function vi(e){let t=e.schema[gi];if(t!=null){if(!Kt(t))return e.createError(`schema-error`,{pointer:`${e.schemaLocation}/${gi}`,schema:e.schema,value:t,message:`Keyword '${gi}' must be a string[]`});e.required=t}}function yi({node:e,data:t,pointer:n=`#`}){let{required:r}=e;if(j(t))return r.map(r=>{if(!ze(t,r))return e.createError(`required-property-error`,{key:r,pointer:n,schema:e.schema,value:t})})}function bi(e){return{...e,keywords:[...e.keywords.map(e=>({...e}))]}}function xi(e,t){let{keywords:n}=Si(e,...t.keywords??[]),r={...e.errors,...t.errors??{}},i={...e.formats,...t.formats??{}};return wi({...e,...t,formats:i,keywords:n,errors:r})}function Si(e,...t){let n=bi(e);return t.forEach(e=>Ci(n,e)),n}function Ci(e,t){let n=e.keywords.findIndex(e=>e.keyword===t.keyword);n===-1?e.keywords.push(t):e.keywords[n]=t}function wi(e){return e.keywords?.forEach(e=>{let t=()=>e.keyword;e.validate&&(e.validate.toJSON=t,e.validate.order=e.order??0),e.reduce&&(e.reduce.toJSON=t,e.reduce.order=e.order??0),e.resolve&&(e.resolve.toJSON=t,e.resolve.order=e.order??0)}),e.keywords?.sort((e,t)=>(t.order??0)-(e.order??0)),e}function Ti(e,t,n=`#`,r=[]){let i=e.resolveRef()??e;return r.push({node:i,value:t,pointer:n}),j(t)?Object.keys(t).forEach(e=>{let{node:a}=i.getNodeChild(e,t);a&&Ti(a,B(t,e),`${n}/${e}`,r)}):Array.isArray(t)&&t.forEach((e,a)=>{let{node:o}=i.getNodeChild(a,t);o&&Ti(o,B(t,a),`${n}/${a}`,r)}),r}let Ei=`type`,Di=[`null`,`boolean`,`number`,`integer`,`string`,`object`,`array`],Oi={id:Ei,keyword:Ei,parse:ki,addReduce:e=>Array.isArray(e.type),reduce:Ai,addValidate:e=>e.type!=null,validate:Mi};function ki(e){let t=e.schema[Ei];if(t!=null){if(typeof t!=`string`&&!Array.isArray(t))return e.createError(`schema-error`,{pointer:`${e.schemaLocation}/${Ei}`,schema:e.schema,value:t,message:`Keyword '${Ei}' must be a string or a string[] - received ${typeof t}`});if(typeof t==`string`&&!Di.includes(t))return e.createError(`schema-error`,{pointer:`${e.schemaLocation}/${Ei}`,schema:e.schema,value:t,message:`Keyword '${Ei}' is not a valid JSON Schema type - received '${t}'. Expected one of ${Di.join(`, `)}`});if(Array.isArray(t)){let n=t.findIndex(e=>!Di.includes(e));if(n!==-1)return e.createError(`schema-error`,{pointer:`${e.schemaLocation}/${Ei}/${n}`,schema:e.schema,value:t[n],message:`Keyword '${Ei}' contains an invalid JSON Schema type: '${t[n]}'`})}e[Ei]=t}}function Ai({node:e,pointer:t,data:n}){let r=ji(n,e.type);if(r!==`undefined`&&Array.isArray(e.schema.type)&&e.schema.type.includes(r))return e.compileSchema({...e.schema,pointer:t,type:r},e.evaluationPath)}function ji(e,t){let n=A(e);return n===`number`&&(t===`integer`||Array.isArray(t)&&t.includes(`integer`))?Number.isInteger(e)||isNaN(e)?`integer`:`number`:n}function Mi({node:e,data:t,pointer:n}){let r=e[Ei],i=ji(t,r);if(!(t===void 0||r===i||Array.isArray(r)&&r.includes(i)))return e.createError(`type-error`,{value:t,received:i,expected:r,schema:e.schema,pointer:n})}var Ni=l(s(((e,t)=>{t.exports=function e(t,n){if(t===n)return!0;if(t&&n&&typeof t==`object`&&typeof n==`object`){if(t.constructor!==n.constructor)return!1;var r,i,a;if(Array.isArray(t)){if(r=t.length,r!=n.length)return!1;for(i=r;i--!==0;)if(!e(t[i],n[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if(a=Object.keys(t),r=a.length,r!==Object.keys(n).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(n,a[i]))return!1;for(i=r;i--!==0;){var o=a[i];if(!e(t[o],n[o]))return!1}return!0}return t!==t&&n!==n}}))());let Pi=`uniqueItems`,Fi={id:Pi,keyword:Pi,parse:Ii,addValidate:({schema:e})=>e[Pi]===!0,validate:Li};function Ii(e){let t=e.schema[Pi];if(!(t==null||t===!1)){if(typeof t!=`boolean`)return e.createError(`schema-error`,{pointer:`${e.schemaLocation}/${Pi}`,schema:e.schema,value:t,message:`Keyword '${Pi}' must be a boolean - received ${typeof t}`});e.uniqueItems=!0}}function Li({node:e,data:t,pointer:n}){if(!Array.isArray(t))return;let{schema:r}=e,i=[],a=[];return t.forEach((o,s)=>{for(let c=s+1;c<t.length;c+=1)(0,Ni.default)(o,t[c])&&!i.includes(c)&&(a.push(e.createError(`unique-items-error`,{pointer:`${n}/${c}`,duplicatePointer:`${n}/${s}`,arrayPointer:n,value:JSON.stringify(o),schema:r})),i.push(c))}),a}let Ri=wi({version:`draft-04`,$schemaRegEx:`draft-?0?4`,$schema:`http://json-schema.org/draft-04/schema#`,errors:mn,formats:Fn,methods:{createSchema:M,getData:nr,getChildSelection:In,toDataNodes:Ti},keywords:[bt,Ft,zt,Ut,pt,tn,sn,dn,hn,vn,Sn,or,dr,hr,br,wr,Or,Mr,Ir,Br,Gr,Jr,ri,$r,ci,pi,_i,Oi,Fi,Un,Dt,jt]}),zi={id:`const`,keyword:`const`,addValidate:({schema:e})=>e.const!==void 0,validate:Bi};function Bi({node:e,data:t,pointer:n}){if(!(0,Ni.default)(t,e.schema.const))return[e.createError(`const-error`,{pointer:n,schema:e.schema,value:t,expected:e.schema.const})]}let Vi=`exclusiveMaximum`,Hi={id:Vi,keyword:Vi,parse:Ui,addValidate:({schema:e})=>e.exclusiveMaximum!=null&&!isNaN(parseInt(e.exclusiveMaximum)),validate:Wi};function Ui(e){let t=e.schema[Vi];if(t!=null&&typeof t!=`number`)return e.createError(`schema-error`,{pointer:`${e.schemaLocation}/${Vi}`,schema:e.schema,value:t,message:`Keyword '${Vi}' must be a number - received '${typeof t}'`})}function Wi({node:e,data:t,pointer:n}){if(typeof t==`number`&&e.schema.exclusiveMaximum<=t)return e.createError(`exclusive-maximum-error`,{maximum:e.schema.exclusiveMaximum,length:t,pointer:n,schema:e.schema,value:t})}let Gi=`exclusiveMinimum`,Ki={id:Gi,keyword:Gi,parse:qi,addValidate:({schema:e})=>e[Gi]!=null&&!isNaN(parseInt(e[Gi])),validate:Ji};function qi(e){let t=e.schema[Gi];if(t!=null&&typeof t!=`number`)return e.createError(`schema-error`,{pointer:`${e.schemaLocation}/${Gi}`,schema:e.schema,value:t,message:`Keyword '${Gi}' must be a number - received '${typeof t}'`})}function Ji({node:e,data:t,pointer:n}){if(typeof t==`number`&&e.schema.exclusiveMinimum>=t)return e.createError(`exclusive-minimum-error`,{minimum:e.schema.exclusiveMinimum,length:t,pointer:n,schema:e.schema,value:t})}let Yi=wi({version:`draft-06`,$schemaRegEx:`draft-?0?6`,$schema:`http://json-schema.org/draft-06/schema#`,errors:mn,formats:Fn,methods:{createSchema:M,getData:nr,getChildSelection:In,toDataNodes:Ti},keywords:[gt,Ft,zt,zi,Ut,pt,tn,sn,dn,Hi,Ki,Sn,or,dr,hr,br,wr,Or,Mr,Ir,Br,Gr,Jr,ri,$r,ci,pi,_i,Oi,Fi,Un,Dt,jt]}),Xi={id:`if-then-else`,keyword:`if`,parse:Zi,addReduce:e=>e.if!=null&&(e.then!=null||e.else!=null),reduce:Qi,addValidate:e=>e.if!=null,validate:$i};function Zi(e){let{schema:t,evaluationPath:n}=e,r=[];return t.if!=null&&(H(t.if)||U(t.if)?(e.if=e.compileSchema(t.if,`${n}/if`),K(r,e.if)):r.push(e.createError(`schema-error`,{pointer:`${e.schemaLocation}/if`,schema:e.schema,value:t.if,message:`Keyword 'if' must be valid JSON Schema - received '${typeof t.if}'`}))),t.then!=null&&(H(t.then)||U(t.then)?(e.then=e.compileSchema(t.then,`${n}/then`),K(r,e.then)):r.push(e.createError(`schema-error`,{pointer:`${e.schemaLocation}/then`,schema:e.schema,value:t.then,message:`Keyword 'then' must be valid JSON Schema - received '${typeof t.then}'`}))),t.else!=null&&(H(t.else)||U(t.else)?(e.else=e.compileSchema(t.else,`${n}/else`),K(r,e.else)):r.push(e.createError(`schema-error`,{pointer:`${e.schemaLocation}/else`,schema:e.schema,value:t.else,message:`Keyword 'else' must be valid JSON Schema - received '${typeof t.else}'`}))),r}function Qi({node:e,data:t,pointer:n,path:r}){if(!(t===void 0||e.if==null)){if(z(e.if,t,n,[...r??[]]).length===0){if(e.then){let{node:n}=e.then.reduceNode(t);if(n){let t=n.dynamicId?.replace(e.dynamicId,``).replace(/^#/,``)??``,r=t===``?`(then)`:t,i=I(e.then.schema,n.schema,`if`,`then`,`else`);return e.compileSchema(i,e.then.evaluationPath,e.schemaLocation,`${e.schemaLocation}${r}`)}}}else if(e.else){let{node:n}=e.else.reduceNode(t);if(n){let t=n.dynamicId?.replace(e.dynamicId,``)??``,r=t===``?`(else)`:t,i=I(e.else.schema,n.schema,`if`,`then`,`else`);return e.compileSchema(i,e.else.evaluationPath,e.schemaLocation,`${e.schemaLocation}${r}`)}}}}function $i({node:e,data:t,pointer:n,path:r}){if(e.if!=null){if(z(e.if,t,n,[...r??[]]).length===0){if(e.then)return z(e.then,t,n,r)}else if(e.else)return z(e.else,t,n,r)}}let ea=wi({version:`draft-07`,$schemaRegEx:`draft-?0?7`,$schema:`http://json-schema.org/draft-07/schema#`,errors:mn,formats:Fn,methods:{createSchema:M,getData:nr,getChildSelection:In,toDataNodes:Ti},keywords:[gt,Ft,zt,zi,Ut,pt,tn,sn,dn,Hi,Ki,Sn,Xi,or,dr,hr,br,wr,Or,Mr,Ir,Br,Gr,Jr,ri,$r,ci,pi,_i,Oi,Fi,Un,Dt,jt]}),ta={id:`$ref`,keyword:`$ref`,parse:ra,addValidate:({schema:e})=>e.$ref!=null||e.$recursiveRef!=null,validate:aa,addReduce:({schema:e})=>e.$ref!=null||e.$recursiveRef!=null,reduce:st};function na(e,t){e.context.refs[t]??(e.context.refs[t]=e)}function ra(e){e.resolveRef=ia;let t=F(e.parent?.$id,e.schema?.$id);e.$id=t,e.lastIdPointer=e.parent?.lastIdPointer??`#`,t!==e.parent?.$id&&e.evaluationPath!==`#`&&(e.lastIdPointer=e.evaluationPath),e.lastIdPointer!==`#`&&e.evaluationPath.startsWith(e.lastIdPointer)&&na(e,F(t,`#${e.evaluationPath.replace(e.lastIdPointer,``)}`)),na(e,F(e.context.rootNode.$id,e.evaluationPath)),e.schema.$anchor&&(e.context.anchors[`${t.replace(/#$/,``)}#${e.schema.$anchor}`]=e),e.schema.$ref&&(e.$ref=F(t,e.schema.$ref),e.$ref.startsWith(`/`)&&(e.$ref=`#${e.$ref}`))}function ia({pointer:e,path:t}={}){if(this.schema.$recursiveRef){let n=oa(this,t??[]);return V(n)&&t?.push({pointer:e,node:n}),n}if(this.$ref==null)return this;let n=sa(this);return V(n)&&t?.push({pointer:e,node:n}),n}function aa({node:e,data:t,pointer:n=`#`,path:r}){let i=e.resolveRef({pointer:n,path:r});return i==null?e.createError(`ref-error`,{ref:e.schema.$ref??e.schema.$recursiveRef,pointer:n,schema:e.schema,value:t}):z(i,t,n,r)}function oa(e,t){let n=t,r=0;for(let t=n.length-1;t>=0;t--){if(n[t].node.schema.$recursiveAnchor===!1)return sa(e,F(e.$id,e.schema.$recursiveRef));if(/^https?:\/\//.test(n[t].node.schema.$id??``)&&n[t].node.schema.$recursiveAnchor!==!0){r=t;break}}let i=n.find((e,t)=>t>=r&&e.node.schema.$recursiveAnchor===!0);return i?i.node:sa(e,F(e.$id,e.schema.$recursiveRef))}function sa(e,t=e?.$ref){if(t==null)return e;if(e.context.refs[t])return dt(e.context.refs[t],e);if(e.context.anchors[t])return dt(e.context.anchors[t],e);let n=rt(t);if(n.length===0)return e.createError(`ref-error`,{ref:t,pointer:e.evaluationPath,schema:e.schema,value:void 0});if(n.length===1){let t=n[0];if(e.context.remotes[t])return dt(e.context.remotes[t],e);if(t[0]===`#`){let n=t.match(/#[^#]*$/)?.pop(),r=e.context.rootNode.schema,i=be(r,n);if(i)return e.compileSchema(i,`${e.evaluationPath}/$ref`,n)}return e.createError(`ref-error`,{ref:t,pointer:e.evaluationPath,schema:e.schema,value:void 0})}if(n.length===2){let r=n[0];if(e.context.remotes[r]&&e!==e.context.remotes[r]){let i=e.context.remotes[r],a=sa(i,t);if(a||(a=sa(i,n[1]),a))return a}if(e.context.refs[r]){let i=e.context.refs[r],a=ye(n[1]),o=i;for(let r of a)if(o=o[r===`definitions`?`$defs`:r],o==null)return e.createError(`ref-error`,{ref:t,pointer:e.evaluationPath,schema:e.schema,value:void 0,host:n[0],local:n[1]});return o}}return e.createError(`ref-error`,{ref:t,pointer:e.evaluationPath,schema:e.schema,value:void 0})}let ca=`unevaluatedItems`,la={id:ca,keyword:ca,parse:ua,addValidate:({schema:e})=>e[ca]!=null,validate:da};function ua(e){let{unevaluatedItems:t}=e.schema;if(!(t==null||typeof t==`boolean`)){if(!j(t))return e.createError(`schema-error`,{pointer:e.evaluationPath,schema:e.schema,value:void 0,message:`Keyword '${ca}' must be an object - received '${typeof t}'`});e.unevaluatedItems=e.compileSchema(e.schema.unevaluatedItems,`${e.evaluationPath}/${ca}`,`${e.schemaLocation}/${ca}`)}}function da({node:e,data:t,pointer:n,path:r}){let{schema:i}=e;if(!Array.isArray(t)||t.length===0||i.unevaluatedItems==null||i.unevaluatedItems===!0)return;let{node:a}=e.reduceNode(t,{pointer:n,path:r});if(a??=e,a.schema.unevaluatedItems===!0||a.schema.additionalItems===!0)return;let o=e.if!=null&&z(e.if,t,n,r).length===0,s=[];for(let a=0;a<t.length;a+=1){let c=t[a],{node:l}=e.getNodeChild(a,t,{path:r});if(l&&z(l,c,`${n}/${a}`,r).length>0){let o=e.unevaluatedItems;if(o&&t.forEach(e=>{let t=z(o,e,`${n}/${a}`,r);if(t!=null){if(Array.isArray(t))return s.push(...t);s.push(t)}}),e.schema.unevaluatedItems===!1)return e.createError(`unevaluated-items-error`,{pointer:`${n}/${a}`,value:JSON.stringify(c),schema:i})}if(l===void 0&&!(o&&e.if.prefixItems&&e.if.prefixItems.length>a))if(e.unevaluatedItems){let t=z(e.unevaluatedItems,c,`${n}/${a}`,r);t.length>0&&s.push(...t)}else s.push(e.createError(`unevaluated-items-error`,{pointer:`${n}/${a}`,value:JSON.stringify(c),schema:i}))}return s}function fa({node:e,data:t,key:n,pointer:r,path:i}){if(Array.isArray(e.schema.required)&&!e.schema.required.find(e=>ze(t,e)))return!1;if(e.schema.unevaluatedProperties===!0||e.schema.additionalProperties===!0||e.properties?.[n]&&e.properties[n].validate(t[n],r,i).valid||e.patternProperties&&e.patternProperties.find(e=>e.pattern.test(n)))return!0;if(e.allOf){for(let a of e.allOf)if(fa({node:a,data:t,key:n,pointer:r,path:i}))return!0}if(e.anyOf){for(let a of e.anyOf)if(fa({node:a,data:t,key:n,pointer:r,path:i}))return!0}if(e.oneOf){for(let a of e.oneOf)if(fa({node:a,data:t,key:n,pointer:r,path:i}))return!0}if(e.if){if(fa({node:e.if,data:t,key:n,pointer:r,path:i}))return!0;let a=z(e.if,t,r,i).length===0;if(a&&e.then){if(fa({node:e.then,data:t,key:n,pointer:r,path:i}))return!0}else if(!a&&e.else&&fa({node:e.else,data:t,key:n,pointer:r,path:i}))return!0}let a=e.resolveRef({pointer:r,path:i});return!!(a!==e&&fa({node:a,data:t,key:n,pointer:r,path:i}))}let pa=`unevaluatedProperties`,ma={id:pa,keyword:pa,parse:ha,addValidate:({schema:e})=>e[pa]!=null,validate:ga};function ha(e){let t=e.schema[pa];if(t!=null){if(!(H(t)||U(t)))return e.createError(`schema-error`,{pointer:`${e.schemaLocation}/${pa}`,schema:e.schema,value:t,message:`Keyword '${pa}' must be a valid JSON Schema - received '${typeof t}'`});if(!U(t))return e.unevaluatedProperties=e.compileSchema(e.schema.unevaluatedProperties,`${e.evaluationPath}/${pa}`,`${e.schemaLocation}/${pa}`),e.unevaluatedProperties.schemaValidation}}function ga({node:e,data:t,pointer:n,path:r}){if(!j(t))return;let i=Object.keys(t).filter(e=>t[e]!==void 0);if(i.length===0)return;let a=[];for(let o of i){if(fa({node:e,data:t,key:o,pointer:n,path:r}))continue;let{node:i}=e.getNodeChild(o,t,{pointer:n,path:r});if(i===void 0)if(e.unevaluatedProperties){let i=z(e.unevaluatedProperties,t[o],`${n}/${o}`,r);a.push(...i)}else e.schema.unevaluatedProperties===!1&&a.push(e.createError(`unevaluated-property-error`,{pointer:`${n}/${o}`,value:JSON.stringify(t[o]),schema:e.schema}));if(i&&z(i,t[o],`${n}/${o}`,r).length>0)if(e.unevaluatedProperties){let i=z(e.unevaluatedProperties,t[o],`${n}/${o}`,r);a.push(...i)}else e.schema.unevaluatedProperties===!1&&a.push(e.createError(`unevaluated-property-error`,{pointer:`${n}/${o}`,value:JSON.stringify(t[o]),schema:e.schema}))}return a}let _a=wi({version:`draft-2019-09`,$schemaRegEx:`draft[/-]2019-?(09)?`,$schema:`https://json-schema.org/draft/2019-09/schema`,errors:mn,formats:Fn,methods:{createSchema:M,getData:nr,getChildSelection:In,toDataNodes:Ti},keywords:[ta,Ft,zt,zi,Ut,pt,tn,qt,Zt,sn,dn,Hi,Ki,Sn,Xi,or,dr,hr,br,wr,Or,Mr,Ir,Br,Gr,Jr,ri,$r,ci,pi,_i,Oi,la,ma,Fi,Un,Dt,jt]});function va(e,t){if(e.oneOf)return e.oneOf.map(e=>e.resolveRef());if(e.items?.oneOf)return e.items.oneOf.map(e=>e.resolveRef());if(e.prefixItems&&e.prefixItems.length>+t){let{node:n,error:r}=e.getNodeChild(t);return V(n)?[n]:r}if(e.schema.items===!0)return[e.compileSchema({type:`string`})];if(e.schema.items===!1)return[];if(e.items)return[e.items.resolveRef()];if(e.prefixItems&&e.prefixItems.length<=+t)return[];let{node:n,error:r}=e.getNodeChild(t);return r??[n]}function ya(e,t){if(e.$ref==null)return;t.cache=t.cache??{};let{cache:n,recursionLimit:r=1}=t,i=e.schemaLocation;if(n[i]=n[i]??{},n[i][e.$ref]=n[i][e.$ref]??0,n[i][e.$ref]>=r&&t.disableRecursionLimit!==!0)return!1;t.disableRecursionLimit=!1,n[i][e.$ref]+=1;let a=e.resolveRef();if(a&&a!==e)return a}function ba(e,t){return(t.cache?.[e.schemaLocation]?.[e.$ref]??-1)<(t.recursionLimit??1)}function xa(e,t){let n=A(t);if(e===void 0||t==null||n===e||n===`number`&&e===`integer`)return t;if(e===`string`)return JSON.stringify(t);if(n!==`string`)return t;try{let n=JSON.parse(t);if(A(n)===e)return n}catch{}return t}function Sa(e,t,n){if(n?.cache==null)throw Error(`Missing options`);if(e.schema===!1||e.schema===!0||Qn(t))return t;if(e.schema?.const!==void 0)return e.schema?.const;let r=e,i=t;if(Array.isArray(e.schema.enum)&&e.schema.enum.length>0&&t===void 0)return e.schema.default??e.schema.enum[0];if(e.schema.default!==void 0&&i===void 0&&(i=e.schema.default),r.allOf?.length&&r.allOf.forEach(e=>{i=e.getData(i,n)??i}),r.anyOf&&r.anyOf?.length>0&&(i=r.anyOf[0].getData(i,n)??i),r.oneOf&&r.oneOf?.length>0)if(Vn(i))r=R(r,r.oneOf[0]);else{let e=Yn({node:r,data:i,path:[],pointer:`#`});if(W(e)){if(i!=null&&n.removeInvalidData!==!0)return i;r=r.oneOf[0],i=void 0}else r=R(r,e)}let a=ya(r,n);if(a===!1)return i;V(a)&&(i=a.getData(i,n)??i,r=a);let o=Ca[Bn(r,i)]?.(r,i,n);return o===void 0?i:o}let Ca={null:(e,t,n)=>wa(e,t,null,n.useTypeDefaults),string:(e,t,n)=>wa(e,t,``,n.useTypeDefaults),number:(e,t,n)=>wa(e,t,0,n.useTypeDefaults),integer:(e,t,n)=>wa(e,t,0,n.useTypeDefaults),boolean:(e,t,n)=>wa(e,t,!1,n.useTypeDefaults),object:(e,t,n)=>{let r=e.schema,i=r.default===void 0?{}:r.default,a={},o=n.extendDefaults===!1&&r.default!==void 0?[]:r.required??[],s=e.properties;s&&Object.keys(s).forEach(e=>{let r=s[e],c=o.includes(e),l=B(t,e),u=t===void 0||l===void 0?B(i,e):l;if(u!=null||c||n.addOptionalProps){let t=r.getData(u,n);(t!==void 0||n.useTypeDefaults!==!1)&&(a[e]=t)}});let c=e.dependentRequired;j(c)&&Object.keys(c).forEach(t=>{let r=c[t];B(a,t)!==void 0&&r.forEach(t=>{let{node:r}=e.getNodeChild(t,a);r&&(a[t]=r.getData(B(a,t),n))})});let l=e.dependentSchemas;if(l&&Object.keys(l).forEach(e=>{let r=l[e];if(a[e]!==void 0&&V(r)){let e=r.getData(t??a,n);Object.assign(a,e)}}),t&&(n.removeInvalidData===!0&&(r.additionalProperties===!1||j(r.additionalProperties))?V(e.additionalProperties)&&Object.keys(t).forEach(n=>{if(a[n]==null){let r=B(t,n);e.additionalProperties?.validate(r).valid&&(a[n]=r)}}):Object.keys(t).forEach(e=>a[e]==null&&(a[e]=B(t,e)))),e.if){let{errors:t}=e.if.validate(a);if(t.length===0&&e.then){let t=e.then.getData(a,n);Object.assign(a,t)}else if(t.length>0&&e.else){let t=e.else.getData(a,n);Object.assign(a,t)}}return{...i,...a}},array:(e,t,n)=>{let r=e.schema,i=r.default===void 0?[]:r.default,a=Array.isArray(t)?[...t]:i,o=n.extendDefaults===!1&&r.default!==void 0?0:r.minItems??0;if(r.prefixItems==null){if(e.items&&(ba(e.items,n)||a?.length>0)){let t={...n.cache},r=Math.max(o,a.length);for(let o=0;o<r;o+=1){n.cache=E(t);let r={...n,disableRecursionLimit:!0};a[o]=e.items.getData(a[o]==null?i[o]:a[o],r)}}return a||[]}if(e.prefixItems){let r=Array.isArray(t)?t:[],s=Math.max(o??0,e.prefixItems.length);for(let t=0;t<s;t+=1){let o=e.prefixItems[t]??e.items;if(o&&ba(o,n)||r[t]!==void 0){let e=o.getData(a[t]==null?i[t]:a[t],n);e!==void 0&&(a[t]=e)}}return a||[]}if(e.items==null)return a;if(e.items&&ba(e.items,n)||t?.length>0){let t={...n.cache};for(let r=0,s=Math.max(o,a.length);r<s;r+=1){n.cache=E(t);let o={...n,disableRecursionLimit:!0},s=e.items.getData(a[r]==null?i[r]:a[r],o);if(s===void 0)return a;a[r]=s}}return a}};function wa({schema:e},t,n,r){return t===void 0?e.const?e.const:e.default===void 0&&Array.isArray(e.enum)?e.enum[0]:e.default===void 0&&r!==!1?n:e.default:xa(e.type,t)}let Ta=`items`,Ea={id:Ta,keyword:Ta,parse:Oa,addResolve:e=>e[Ta]!=null,resolve:Da,addValidate:e=>e[Ta]!=null,validate:ka};function Da({node:e,key:t}){if(!(e.prefixItems&&e.prefixItems?.length>+t))return e.items}function Oa(e){let t=e.schema[Ta];if(t!=null){if(!(H(t)||U(t)))return e.createError(`schema-error`,{pointer:`${e.schemaLocation}/${Ta}`,schema:e.schema,value:t,message:`Keyword '${Ta}' must be a valid JSON Schema - received '${typeof t}'`});if(t!==!0)return e[Ta]=e.compileSchema(t,`${e.evaluationPath}/${Ta}`,`${e.schemaLocation}/${Ta}`),e[Ta].schemaValidation}}function ka({node:e,data:t,pointer:n=`#`,path:r}){let{schema:i}=e;if(!Array.isArray(t)||t.length===0||Array.isArray(i.prefixItems)&&i.prefixItems.length>=t.length)return;if(i.items===!1)return Array.isArray(t)&&t.length===0?void 0:e.createError(`invalid-data-error`,{pointer:n,value:t,schema:i});let a=[];if(e.items){for(let o=i.prefixItems?.length??0;o<t.length;o+=1){let i=t[o],s=z(e.items,i,`${n}/${o}`,r);s&&a.push(...s)}return a}}let Aa=`prefixItems`,ja={id:Aa,keyword:Aa,parse:Na,addResolve:e=>e[Aa]!=null,resolve:Ma,addValidate:e=>e[Aa]!=null,validate:Pa};function Ma({node:e,key:t}){if(e.prefixItems&&e.prefixItems[t])return e.prefixItems[t]}function Na(e){let{schema:t,evaluationPath:n}=e;if(Array.isArray(t.prefixItems))return e.prefixItems=t.prefixItems.map((t,r)=>e.compileSchema(t,`${n}/${Aa}/${r}`,`${e.schemaLocation}/${Aa}/${r}`)),K([],...e.prefixItems)}function Pa({node:e,data:t,pointer:n=`#`,path:r}){if(!Array.isArray(t)||t.length===0)return;let i=[],a=e[Aa];if(a){for(let e=0;e<Math.min(a.length,t.length);e+=1){let o=t[e],s=a[e],c=z(s,o,`${n}/${e}`,r);i.push(...c)}return i}}function Fa({node:e,data:t,key:n,pointer:r,path:i}){let a=B(t,n);if(e.schema.unevaluatedItems===!0||e.schema.items===!0||e.contains&&z(e.contains,a,`${r}/${n}`,i).length===0)return!0;if(e.allOf){for(let a of e.allOf)if(Fa({node:a,data:t,key:n,pointer:r,path:i}))return!0}if(e.anyOf){for(let a of e.anyOf)if(Fa({node:a,data:t,key:n,pointer:r,path:i}))return!0}if(e.oneOf){for(let a of e.oneOf)if(Fa({node:a,data:t,key:n,pointer:r,path:i}))return!0}if(e.if){if(Fa({node:e.if,data:t,key:n,pointer:r,path:i}))return!0;let a=z(e.if,t,r,i).length===0;if(a&&e.if.prefixItems&&e.if.prefixItems.length>n)return!0;if(a&&e.then){if(Fa({node:e.then,data:t,key:n,pointer:r,path:i}))return!0}else if(!a&&e.else&&Fa({node:e.else,data:t,key:n,pointer:r,path:i}))return!0}}let Ia=`unevaluatedItems`,La={id:Ia,keyword:Ia,parse:Ra,addValidate:({schema:e})=>e.unevaluatedItems!=null,validate:za};function Ra(e){let t=e.schema[Ia];if(t!=null){if(!(H(t)||U(t)))return e.createError(`schema-error`,{pointer:`${e.schemaLocation}/${Ia}`,schema:e.schema,value:t,message:`Keyword '${Ia}' must be a valid JSON Schema - received '${typeof t}'`});if(!U(t))return e.unevaluatedItems=e.compileSchema(e.schema.unevaluatedItems,`${e.evaluationPath}/${Ia}`,`${e.schemaLocation}/${Ia}`),e.unevaluatedItems.schemaValidation}}function za({node:e,data:t,pointer:n,path:r}){let{schema:i}=e;if(!Array.isArray(t)||t.length===0||i.unevaluatedItems==null||i.unevaluatedItems===!0)return;let a=[];for(let o=0;o<t.length;o+=1){if(Fa({node:e,data:t,pointer:n,key:o,path:r}))continue;let s=t[o],{node:c}=e.getNodeChild(o,t,{path:r});if(c===void 0)if(e.unevaluatedItems){let t=z(e.unevaluatedItems,s,`${n}/${o}`,r);t.length>0&&a.push(...t)}else a.push(e.createError(`unevaluated-items-error`,{pointer:`${n}/${o}`,value:JSON.stringify(s),schema:i}));if(c&&z(c,s,`${n}/${o}`,r).length>0&&(e.unevaluatedItems&&e.unevaluatedItems.validate(s,`${n}/${o}`,r).valid===!1||e.schema.unevaluatedItems===!1))return e.createError(`unevaluated-items-error`,{pointer:`${n}/${o}`,value:JSON.stringify(s),schema:i})}return a}let Ba=wi({version:`draft-2020-12`,$schemaRegEx:`draft[/-]2020-?(12)?`,$schema:`https://json-schema.org/draft/2020-12/schema`,errors:mn,formats:Fn,methods:{createSchema:M,getData:Sa,getChildSelection:va,toDataNodes:Ti},keywords:[it,jt,Ft,zt,zi,Ut,pt,tn,qt,Zt,sn,dn,Hi,Ki,Sn,Xi,Ea,dr,hr,br,wr,Or,Mr,Ir,Br,Gr,Jr,Un,$r,ri,ja,ci,pi,_i,Oi,La,ma,Fi]}),{REGEX_FLAGS:Va}=O,Ha=[Ri,Yi,ea,_a,Ba];function Ua(e,t){return e.find(e=>new RegExp(e.$schemaRegEx,Va).test(t))??e[e.length-1]}function Wa(e,t={}){let n=t.formatAssertion??!0,r=t.drafts??Ha,i=Ua(r,H(e)?t.draft??e.$schema:void 0),a={evaluationPath:`#`,lastIdPointer:`#`,schemaLocation:`#`,dynamicId:``,reducers:[],resolvers:[],validators:[],schema:e,context:{remotes:{},dynamicAnchors:{},...t.remote?.context??{},anchors:{},refs:{},...E(Ie(i,`methods`,`keywords`,`version`,`formats`,`errors`)),draft:t.draft,getDataDefaultOptions:t.getDataDefaultOptions,throwOnInvalidRef:t.throwOnInvalidRef??!1,drafts:r},...Je};if(a.context.rootNode=a,a.context.remotes[(H(e)?e.$id:void 0)??`#`]=a,t.remote){let e=ft(a,a.schema.$schema);if(V(e)&&e.schema.$vocabulary){let t=Object.keys(e.schema.$vocabulary).find(e=>e.includes(`vocab/format-assertion`));t&&n===`meta-schema`&&(n=e.schema.$vocabulary[t]===!0);let r=Object.keys(e.getData({},{addOptionalProps:!0}));r.length>0&&(a.context.keywords=a.context.keywords.filter(e=>r.includes(e.keyword)))}}if(n===!1&&(a.context.keywords=a.context.keywords.filter(e=>e.keyword!==`format`)),!H(e)&&!U(e))return a.schemaErrors=[a.createError(`schema-error`,{pointer:`#`,schema:e,value:void 0,message:`JSON schema must be object or boolean - reveived: '${e}'`})],a;let o=Ze(a).filter(e=>e!=null);o=D(o);let s=[],c=[];if(o.forEach(e=>{W(e)?s.push(e):et(e)&&c.push(e)}),t.throwOnInvalidSchema&&s.length>0){let e=Error(`Invalid schema passed to compileSchema`);throw e.data=s,e}return a.schemaErrors=s,a.schemaAnnotations=c,a}let Ga=xi(Ba,{$schemaRegEx:`.`,keywords:[Wn],errors:{"min-length-error":e=>e.minLength===1?{type:`error`,code:`min-length-one-error`,message:`An input is required`,data:e}:{type:`error`,code:`min-length-error`,message:Le("Value in `{{pointer}}` is `{{length}}`, but should be `{{minLength}}` at minimum",e),data:e}}}),$=`propertyDependencies`;function Ka(e,t){let n=e[$];if(n==null)return;let r=Object.keys(n),i=[];for(let e of r)if(ze(t,e)){let r=t[e];n[e][r]&&i.push({property:e,value:`${r}`,node:n[e][r]})}return i}let qa={id:$,keyword:$,parse:Ja,addValidate:e=>e[$]!=null,validate:Ya,addReduce:e=>e[$]!=null,reduce:Xa};function Ja(e){let t=e.schema[$];if(!j(t))return e.createError(`schema-error`,{pointer:`${e.schemaLocation}/${$}`,schema:e.schema,value:t,message:`Keyword '${$}' must be an object - received '${typeof t}'`});let n={},r=[];return Object.keys(t).map(i=>{let a=t[i];if(!j(a)){r.push(e.createError(`schema-error`,{pointer:`${e.schemaLocation}/${$}/${i}`,schema:e.schema,value:t,message:`Keyword '${$}[string]' must be an object - received '${typeof t}'`}));return}Object.keys(a).forEach(t=>{let o=a[t];if(!(H(o)||U(o))){r.push(e.createError(`schema-error`,{pointer:`${e.schemaLocation}/${$}/${i}/${t}`,schema:e.schema,value:o,message:`Keyword '${$}[string][string]' must be a valid JSON Schema - received '${typeof o}'`}));return}n[i]=n[i]??{},n[i][t]=e.compileSchema(o,`${e.evaluationPath}/${$}/${i}/${t}`,`${e.schemaLocation}/${$}/${i}/${t}`),K(r,n[i][t])})}),e[$]=n,r}function Ya({node:e,data:t,pointer:n=`#`,path:r}){if(!j(t))return;let i=Ka(e,t);if(i==null||i.length===0)return;let a=[];for(let e of i){let i=z(e.node,t,n,r);a.push(i)}return D(a)}function Xa({node:e,data:t,key:n,pointer:r,path:i}){if(!j(t))return;let a=Ka(e,t);if(a==null||a.length===0)return;let o={},s=``;for(let c of a){let{node:a}=c.node.reduceNode(t,{key:n,pointer:r,path:i});if(a){let t=a.dynamicId?.replace(e.dynamicId,``)??``,n=t===``?`propertyDependencies/${c.property}/${c.value}`:t;s+=`${s===``?``:`,`}${n}`;let r=I(c.node.schema,a.schema);o=I(o,r,`propertyDependencies`)}}return e.compileSchema(o,`${e.evaluationPath}/${s}`,e.schemaLocation,`${e.schemaLocation}(${s})`)}return e.addKeywords=Si,e.compileSchema=Wa,e.draft04=Ri,e.draft06=Yi,e.draft07=ea,e.draft2019=_a,e.draft2020=Ba,e.draftEditor=Ga,e.extendDraft=xi,e.getSchemaType=Bn,e.getTypeOf=A,e.isAnnotation=$e,e.isBooleanSchema=U,e.isJsonAnnotation=et,e.isJsonError=W,e.isJsonSchema=H,e.isReduceable=Ge,e.isSchemaNode=V,e.mergeNode=R,e.mergeSchema=I,e.oneOfFuzzyKeyword=Wn,e.oneOfKeyword=Un,e.propertyDependenciesKeyword=qa,e.render=Le,e.sanitizeErrors=D,e.settings=O,e})({});
|
|
3
|
+
(function(n,r){typeof e==`object`&&t!==void 0?r(e):typeof define==`function`&&define.amd?define([`exports`],r):r(n.URI=n.URI||{})})(e,(function(e){"use strict";function t(){var e=[...arguments];if(e.length>1){e[0]=e[0].slice(0,-1);for(var t=e.length-1,n=1;n<t;++n)e[n]=e[n].slice(1,-1);return e[t]=e[t].slice(1),e.join(``)}else return e[0]}function n(e){return`(?:`+e+`)`}function r(e){return e===void 0?`undefined`:e===null?`null`:Object.prototype.toString.call(e).split(` `).pop().split(`]`).shift().toLowerCase()}function i(e){return e.toUpperCase()}function a(e){return e==null?[]:e instanceof Array?e:typeof e.length!=`number`||e.split||e.setInterval||e.call?[e]:Array.prototype.slice.call(e)}function o(e,t){var n=e;if(t)for(var r in t)n[r]=t[r];return n}function s(e){var r=`[A-Za-z]`,i=`[0-9]`,a=t(i,`[A-Fa-f]`),o=n(n(`%[EFef]`+a+`%`+a+a+`%`+a+a)+`|`+n(`%[89A-Fa-f]`+a+`%`+a+a)+`|`+n(`%`+a+a)),s=`[\\:\\/\\?\\#\\[\\]\\@]`,c=`[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]`,l=t(s,c),u=e?`[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]`:`[]`,d=e?`[\\uE000-\\uF8FF]`:`[]`,f=t(r,i,`[\\-\\.\\_\\~]`,u),p=n(r+t(r,i,`[\\+\\-\\.]`)+`*`),m=n(n(o+`|`+t(f,c,`[\\:]`))+`*`);n(n(`25[0-5]`)+`|`+n(`2[0-4]`+i)+`|`+n(`1`+i+i)+`|`+n(`[1-9]`+i)+`|`+i);var h=n(n(`25[0-5]`)+`|`+n(`2[0-4]`+i)+`|`+n(`1`+i+i)+`|`+n(`0?[1-9]`+i)+`|0?0?`+i),g=n(h+`\\.`+h+`\\.`+h+`\\.`+h),_=n(a+`{1,4}`),v=n(n(_+`\\:`+_)+`|`+g),ee=n([n(n(_+`\\:`)+`{6}`+v),n(`\\:\\:`+n(_+`\\:`)+`{5}`+v),n(n(_)+`?\\:\\:`+n(_+`\\:`)+`{4}`+v),n(n(n(_+`\\:`)+`{0,1}`+_)+`?\\:\\:`+n(_+`\\:`)+`{3}`+v),n(n(n(_+`\\:`)+`{0,2}`+_)+`?\\:\\:`+n(_+`\\:`)+`{2}`+v),n(n(n(_+`\\:`)+`{0,3}`+_)+`?\\:\\:`+_+`\\:`+v),n(n(n(_+`\\:`)+`{0,4}`+_)+`?\\:\\:`+v),n(n(n(_+`\\:`)+`{0,5}`+_)+`?\\:\\:`+_),n(n(n(_+`\\:`)+`{0,6}`+_)+`?\\:\\:`)].join(`|`)),te=n(n(f+`|`+o)+`+`);n(ee+`\\%25`+te);var ne=n(ee+n(`\\%25|\\%(?!`+a+`{2})`)+te),re=n(`[vV]`+a+`+\\.`+t(f,c,`[\\:]`)+`+`),ie=n(`\\[`+n(ne+`|`+ee+`|`+re)+`\\]`),ae=n(n(o+`|`+t(f,c))+`*`),y=n(ie+`|`+g+`(?!`+ae+`)|`+ae),b=n(i+`*`),oe=n(n(m+`@`)+`?`+y+n(`\\:`+b)+`?`),x=n(o+`|`+t(f,c,`[\\:\\@]`)),se=n(x+`*`),S=n(x+`+`),ce=n(n(o+`|`+t(f,c,`[\\@]`))+`+`),C=n(n(`\\/`+se)+`*`),w=n(`\\/`+n(S+C)+`?`),le=n(ce+C),ue=n(S+C),T=`(?!`+x+`)`;n(C+`|`+w+`|`+le+`|`+ue+`|`+T);var E=n(n(x+`|`+t(`[\\/\\?]`,d))+`*`),D=n(n(x+`|[\\/\\?]`)+`*`),O=n(n(`\\/\\/`+oe+C)+`|`+w+`|`+ue+`|`+T),k=n(p+`\\:`+O+n(`\\?`+E)+`?`+n(`\\#`+D)+`?`),A=n(n(n(`\\/\\/`+oe+C)+`|`+w+`|`+le+`|`+T)+n(`\\?`+E)+`?`+n(`\\#`+D)+`?`);return n(k+`|`+A),n(p+`\\:`+O+n(`\\?`+E)+`?`),``+p+n(n(`\\/\\/(`+n(`(`+m+`)@`)+`?(`+y+`)`+n(`\\:(`+b+`)`)+`?)`)+`?(`+C+`|`+w+`|`+ue+`|`+T+`)`)+n(`\\?(`+E+`)`)+n(`\\#(`+D+`)`),``+n(n(`\\/\\/(`+n(`(`+m+`)@`)+`?(`+y+`)`+n(`\\:(`+b+`)`)+`?)`)+`?(`+C+`|`+w+`|`+le+`|`+T+`)`)+n(`\\?(`+E+`)`)+n(`\\#(`+D+`)`),``+p+n(n(`\\/\\/(`+n(`(`+m+`)@`)+`?(`+y+`)`+n(`\\:(`+b+`)`)+`?)`)+`?(`+C+`|`+w+`|`+ue+`|`+T+`)`)+n(`\\?(`+E+`)`),``+n(`\\#(`+D+`)`),``+n(`(`+m+`)@`)+y+n(`\\:(`+b+`)`),{NOT_SCHEME:new RegExp(t(`[^]`,r,i,`[\\+\\-\\.]`),`g`),NOT_USERINFO:new RegExp(t(`[^\\%\\:]`,f,c),`g`),NOT_HOST:new RegExp(t(`[^\\%\\[\\]\\:]`,f,c),`g`),NOT_PATH:new RegExp(t(`[^\\%\\/\\:\\@]`,f,c),`g`),NOT_PATH_NOSCHEME:new RegExp(t(`[^\\%\\/\\@]`,f,c),`g`),NOT_QUERY:new RegExp(t(`[^\\%]`,f,c,`[\\:\\@\\/\\?]`,d),`g`),NOT_FRAGMENT:new RegExp(t(`[^\\%]`,f,c,`[\\:\\@\\/\\?]`),`g`),ESCAPE:new RegExp(t(`[^]`,f,c),`g`),UNRESERVED:new RegExp(f,`g`),OTHER_CHARS:new RegExp(t(`[^\\%]`,f,l),`g`),PCT_ENCODED:new RegExp(o,`g`),IPV4ADDRESS:RegExp(`^(`+g+`)$`),IPV6ADDRESS:RegExp(`^\\[?(`+ee+`)`+n(n(`\\%25|\\%(?!`+a+`{2})`)+`(`+te+`)`)+`?\\]?$`)}}var c=s(!1),l=s(!0),u=function(){function e(e,t){var n=[],r=!0,i=!1,a=void 0;try{for(var o=e[Symbol.iterator](),s;!(r=(s=o.next()).done)&&(n.push(s.value),!(t&&n.length===t));r=!0);}catch(e){i=!0,a=e}finally{try{!r&&o.return&&o.return()}finally{if(i)throw a}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw TypeError(`Invalid attempt to destructure non-iterable instance`)}}(),d=function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}else return Array.from(e)},f=2147483647,p=36,m=1,h=26,g=38,_=700,v=72,ee=128,te=`-`,ne=/^xn--/,re=/[^\0-\x7E]/,ie=/[\x2E\u3002\uFF0E\uFF61]/g,ae={overflow:`Overflow: input needs wider integers to process`,"not-basic":`Illegal input >= 0x80 (not a basic code point)`,"invalid-input":`Invalid input`},y=p-m,b=Math.floor,oe=String.fromCharCode;function x(e){throw RangeError(ae[e])}function se(e,t){for(var n=[],r=e.length;r--;)n[r]=t(e[r]);return n}function S(e,t){var n=e.split(`@`),r=``;n.length>1&&(r=n[0]+`@`,e=n[1]),e=e.replace(ie,`.`);var i=se(e.split(`.`),t).join(`.`);return r+i}function ce(e){for(var t=[],n=0,r=e.length;n<r;){var i=e.charCodeAt(n++);if(i>=55296&&i<=56319&&n<r){var a=e.charCodeAt(n++);(a&64512)==56320?t.push(((i&1023)<<10)+(a&1023)+65536):(t.push(i),n--)}else t.push(i)}return t}var C=function(e){return String.fromCodePoint.apply(String,d(e))},w=function(e){return e-48<10?e-22:e-65<26?e-65:e-97<26?e-97:p},le=function(e,t){return e+22+75*(e<26)-((t!=0)<<5)},ue=function(e,t,n){var r=0;for(e=n?b(e/_):e>>1,e+=b(e/t);e>y*h>>1;r+=p)e=b(e/y);return b(r+(y+1)*e/(e+g))},T=function(e){var t=[],n=e.length,r=0,i=ee,a=v,o=e.lastIndexOf(te);o<0&&(o=0);for(var s=0;s<o;++s)e.charCodeAt(s)>=128&&x(`not-basic`),t.push(e.charCodeAt(s));for(var c=o>0?o+1:0;c<n;){for(var l=r,u=1,d=p;;d+=p){c>=n&&x(`invalid-input`);var g=w(e.charCodeAt(c++));(g>=p||g>b((f-r)/u))&&x(`overflow`),r+=g*u;var _=d<=a?m:d>=a+h?h:d-a;if(g<_)break;var ne=p-_;u>b(f/ne)&&x(`overflow`),u*=ne}var re=t.length+1;a=ue(r-l,re,l==0),b(r/re)>f-i&&x(`overflow`),i+=b(r/re),r%=re,t.splice(r++,0,i)}return String.fromCodePoint.apply(String,t)},E=function(e){var t=[];e=ce(e);var n=e.length,r=ee,i=0,a=v,o=!0,s=!1,c=void 0;try{for(var l=e[Symbol.iterator](),u;!(o=(u=l.next()).done);o=!0){var d=u.value;d<128&&t.push(oe(d))}}catch(e){s=!0,c=e}finally{try{!o&&l.return&&l.return()}finally{if(s)throw c}}var g=t.length,_=g;for(g&&t.push(te);_<n;){var ne=f,re=!0,ie=!1,ae=void 0;try{for(var y=e[Symbol.iterator](),se;!(re=(se=y.next()).done);re=!0){var S=se.value;S>=r&&S<ne&&(ne=S)}}catch(e){ie=!0,ae=e}finally{try{!re&&y.return&&y.return()}finally{if(ie)throw ae}}var C=_+1;ne-r>b((f-i)/C)&&x(`overflow`),i+=(ne-r)*C,r=ne;var w=!0,T=!1,E=void 0;try{for(var D=e[Symbol.iterator](),O;!(w=(O=D.next()).done);w=!0){var k=O.value;if(k<r&&++i>f&&x(`overflow`),k==r){for(var A=i,j=p;;j+=p){var M=j<=a?m:j>=a+h?h:j-a;if(A<M)break;var de=A-M,fe=p-M;t.push(oe(le(M+de%fe,0))),A=b(de/fe)}t.push(oe(le(A,0))),a=ue(i,C,_==g),i=0,++_}}}catch(e){T=!0,E=e}finally{try{!w&&D.return&&D.return()}finally{if(T)throw E}}++i,++r}return t.join(``)},D={version:`2.1.0`,ucs2:{decode:ce,encode:C},decode:T,encode:E,toASCII:function(e){return S(e,function(e){return re.test(e)?`xn--`+E(e):e})},toUnicode:function(e){return S(e,function(e){return ne.test(e)?T(e.slice(4).toLowerCase()):e})}},O={};function k(e){var t=e.charCodeAt(0),n=void 0;return n=t<16?`%0`+t.toString(16).toUpperCase():t<128?`%`+t.toString(16).toUpperCase():t<2048?`%`+(t>>6|192).toString(16).toUpperCase()+`%`+(t&63|128).toString(16).toUpperCase():`%`+(t>>12|224).toString(16).toUpperCase()+`%`+(t>>6&63|128).toString(16).toUpperCase()+`%`+(t&63|128).toString(16).toUpperCase(),n}function A(e){for(var t=``,n=0,r=e.length;n<r;){var i=parseInt(e.substr(n+1,2),16);if(i<128)t+=String.fromCharCode(i),n+=3;else if(i>=194&&i<224){if(r-n>=6){var a=parseInt(e.substr(n+4,2),16);t+=String.fromCharCode((i&31)<<6|a&63)}else t+=e.substr(n,6);n+=6}else if(i>=224){if(r-n>=9){var o=parseInt(e.substr(n+4,2),16),s=parseInt(e.substr(n+7,2),16);t+=String.fromCharCode((i&15)<<12|(o&63)<<6|s&63)}else t+=e.substr(n,9);n+=9}else t+=e.substr(n,3),n+=3}return t}function j(e,t){function n(e){var n=A(e);return n.match(t.UNRESERVED)?n:e}return e.scheme&&=String(e.scheme).replace(t.PCT_ENCODED,n).toLowerCase().replace(t.NOT_SCHEME,``),e.userinfo!==void 0&&(e.userinfo=String(e.userinfo).replace(t.PCT_ENCODED,n).replace(t.NOT_USERINFO,k).replace(t.PCT_ENCODED,i)),e.host!==void 0&&(e.host=String(e.host).replace(t.PCT_ENCODED,n).toLowerCase().replace(t.NOT_HOST,k).replace(t.PCT_ENCODED,i)),e.path!==void 0&&(e.path=String(e.path).replace(t.PCT_ENCODED,n).replace(e.scheme?t.NOT_PATH:t.NOT_PATH_NOSCHEME,k).replace(t.PCT_ENCODED,i)),e.query!==void 0&&(e.query=String(e.query).replace(t.PCT_ENCODED,n).replace(t.NOT_QUERY,k).replace(t.PCT_ENCODED,i)),e.fragment!==void 0&&(e.fragment=String(e.fragment).replace(t.PCT_ENCODED,n).replace(t.NOT_FRAGMENT,k).replace(t.PCT_ENCODED,i)),e}function M(e){return e.replace(/^0*(.*)/,`$1`)||`0`}function de(e,t){var n=u(e.match(t.IPV4ADDRESS)||[],2)[1];return n?n.split(`.`).map(M).join(`.`):e}function fe(e,t){var n=u(e.match(t.IPV6ADDRESS)||[],3),r=n[1],i=n[2];if(r){for(var a=u(r.toLowerCase().split(`::`).reverse(),2),o=a[0],s=a[1],c=s?s.split(`:`).map(M):[],l=o.split(`:`).map(M),d=t.IPV4ADDRESS.test(l[l.length-1]),f=d?7:8,p=l.length-f,m=Array(f),h=0;h<f;++h)m[h]=c[h]||l[p+h]||``;d&&(m[f-1]=de(m[f-1],t));var g=m.reduce(function(e,t,n){if(!t||t===`0`){var r=e[e.length-1];r&&r.index+r.length===n?r.length++:e.push({index:n,length:1})}return e},[]).sort(function(e,t){return t.length-e.length})[0],_=void 0;if(g&&g.length>1){var v=m.slice(0,g.index),ee=m.slice(g.index+g.length);_=v.join(`:`)+`::`+ee.join(`:`)}else _=m.join(`:`);return i&&(_+=`%`+i),_}else return e}var N=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,pe=``.match(/(){0}/)[1]===void 0;function me(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n={},r=t.iri===!1?c:l;t.reference===`suffix`&&(e=(t.scheme?t.scheme+`:`:``)+`//`+e);var i=e.match(N);if(i){pe?(n.scheme=i[1],n.userinfo=i[3],n.host=i[4],n.port=parseInt(i[5],10),n.path=i[6]||``,n.query=i[7],n.fragment=i[8],isNaN(n.port)&&(n.port=i[5])):(n.scheme=i[1]||void 0,n.userinfo=e.indexOf(`@`)===-1?void 0:i[3],n.host=e.indexOf(`//`)===-1?void 0:i[4],n.port=parseInt(i[5],10),n.path=i[6]||``,n.query=e.indexOf(`?`)===-1?void 0:i[7],n.fragment=e.indexOf(`#`)===-1?void 0:i[8],isNaN(n.port)&&(n.port=e.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?i[4]:void 0)),n.host&&=fe(de(n.host,r),r),n.scheme===void 0&&n.userinfo===void 0&&n.host===void 0&&n.port===void 0&&!n.path&&n.query===void 0?n.reference=`same-document`:n.scheme===void 0?n.reference=`relative`:n.fragment===void 0?n.reference=`absolute`:n.reference=`uri`,t.reference&&t.reference!==`suffix`&&t.reference!==n.reference&&(n.error=n.error||`URI is not a `+t.reference+` reference.`);var a=O[(t.scheme||n.scheme||``).toLowerCase()];if(!t.unicodeSupport&&(!a||!a.unicodeSupport)){if(n.host&&(t.domainHost||a&&a.domainHost))try{n.host=D.toASCII(n.host.replace(r.PCT_ENCODED,A).toLowerCase())}catch(e){n.error=n.error||`Host's domain name can not be converted to ASCII via punycode: `+e}j(n,c)}else j(n,r);a&&a.parse&&a.parse(n,t)}else n.error=n.error||`URI can not be parsed.`;return n}function he(e,t){var n=t.iri===!1?c:l,r=[];return e.userinfo!==void 0&&(r.push(e.userinfo),r.push(`@`)),e.host!==void 0&&r.push(fe(de(String(e.host),n),n).replace(n.IPV6ADDRESS,function(e,t,n){return`[`+t+(n?`%25`+n:``)+`]`})),(typeof e.port==`number`||typeof e.port==`string`)&&(r.push(`:`),r.push(String(e.port))),r.length?r.join(``):void 0}var ge=/^\.\.?\//,_e=/^\/\.(\/|$)/,ve=/^\/\.\.(\/|$)/,ye=/^\/?(?:.|\n)*?(?=\/|$)/;function be(e){for(var t=[];e.length;)if(e.match(ge))e=e.replace(ge,``);else if(e.match(_e))e=e.replace(_e,`/`);else if(e.match(ve))e=e.replace(ve,`/`),t.pop();else if(e===`.`||e===`..`)e=``;else{var n=e.match(ye);if(n){var r=n[0];e=e.slice(r.length),t.push(r)}else throw Error(`Unexpected dot segment condition`)}return t.join(``)}function P(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.iri?l:c,r=[],i=O[(t.scheme||e.scheme||``).toLowerCase()];if(i&&i.serialize&&i.serialize(e,t),e.host&&!n.IPV6ADDRESS.test(e.host)&&(t.domainHost||i&&i.domainHost))try{e.host=t.iri?D.toUnicode(e.host):D.toASCII(e.host.replace(n.PCT_ENCODED,A).toLowerCase())}catch(n){e.error=e.error||`Host's domain name can not be converted to `+(t.iri?`Unicode`:`ASCII`)+` via punycode: `+n}j(e,n),t.reference!==`suffix`&&e.scheme&&(r.push(e.scheme),r.push(`:`));var a=he(e,t);if(a!==void 0&&(t.reference!==`suffix`&&r.push(`//`),r.push(a),e.path&&e.path.charAt(0)!==`/`&&r.push(`/`)),e.path!==void 0){var o=e.path;!t.absolutePath&&(!i||!i.absolutePath)&&(o=be(o)),a===void 0&&(o=o.replace(/^\/\//,`/%2F`)),r.push(o)}return e.query!==void 0&&(r.push(`?`),r.push(e.query)),e.fragment!==void 0&&(r.push(`#`),r.push(e.fragment)),r.join(``)}function xe(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=arguments[3],i={};return r||(e=me(P(e,n),n),t=me(P(t,n),n)),n||={},!n.tolerant&&t.scheme?(i.scheme=t.scheme,i.userinfo=t.userinfo,i.host=t.host,i.port=t.port,i.path=be(t.path||``),i.query=t.query):(t.userinfo!==void 0||t.host!==void 0||t.port!==void 0?(i.userinfo=t.userinfo,i.host=t.host,i.port=t.port,i.path=be(t.path||``),i.query=t.query):(t.path?(t.path.charAt(0)===`/`?i.path=be(t.path):((e.userinfo!==void 0||e.host!==void 0||e.port!==void 0)&&!e.path?i.path=`/`+t.path:e.path?i.path=e.path.slice(0,e.path.lastIndexOf(`/`)+1)+t.path:i.path=t.path,i.path=be(i.path)),i.query=t.query):(i.path=e.path,t.query===void 0?i.query=e.query:i.query=t.query),i.userinfo=e.userinfo,i.host=e.host,i.port=e.port),i.scheme=e.scheme),i.fragment=t.fragment,i}function Se(e,t,n){var r=o({scheme:`null`},n);return P(xe(me(e,r),me(t,r),r,!0),r)}function Ce(e,t){return typeof e==`string`?e=P(me(e,t),t):r(e)===`object`&&(e=me(P(e,t),t)),e}function we(e,t,n){return typeof e==`string`?e=P(me(e,n),n):r(e)===`object`&&(e=P(e,n)),typeof t==`string`?t=P(me(t,n),n):r(t)===`object`&&(t=P(t,n)),e===t}function Te(e,t){return e&&e.toString().replace(!t||!t.iri?c.ESCAPE:l.ESCAPE,k)}function Ee(e,t){return e&&e.toString().replace(!t||!t.iri?c.PCT_ENCODED:l.PCT_ENCODED,A)}var De={scheme:`http`,domainHost:!0,parse:function(e,t){return e.host||(e.error=e.error||`HTTP URIs must have a host.`),e},serialize:function(e,t){var n=String(e.scheme).toLowerCase()===`https`;return(e.port===(n?443:80)||e.port===``)&&(e.port=void 0),e.path||=`/`,e}},Oe={scheme:`https`,domainHost:De.domainHost,parse:De.parse,serialize:De.serialize};function ke(e){return typeof e.secure==`boolean`?e.secure:String(e.scheme).toLowerCase()===`wss`}var F={scheme:`ws`,domainHost:!0,parse:function(e,t){var n=e;return n.secure=ke(n),n.resourceName=(n.path||`/`)+(n.query?`?`+n.query:``),n.path=void 0,n.query=void 0,n},serialize:function(e,t){if((e.port===(ke(e)?443:80)||e.port===``)&&(e.port=void 0),typeof e.secure==`boolean`&&(e.scheme=e.secure?`wss`:`ws`,e.secure=void 0),e.resourceName){var n=u(e.resourceName.split(`?`),2),r=n[0],i=n[1];e.path=r&&r!==`/`?r:void 0,e.query=i,e.resourceName=void 0}return e.fragment=void 0,e}},I={scheme:`wss`,domainHost:F.domainHost,parse:F.parse,serialize:F.serialize},Ae={},je=`[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]`,L=`[0-9A-Fa-f]`,Me=n(n(`%[EFef]`+L+`%`+L+L+`%`+L+L)+`|`+n(`%[89A-Fa-f]`+L+`%`+L+L)+`|`+n(`%`+L+L)),Ne="[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]",Pe=t(`[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]`,`[\\"\\\\]`),R=`[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]`,Fe=new RegExp(je,`g`),Ie=new RegExp(Me,`g`),Le=new RegExp(t(`[^]`,Ne,`[\\.]`,`[\\"]`,Pe),`g`),z=new RegExp(t(`[^]`,je,R),`g`),Re=z;function ze(e){var t=A(e);return t.match(Fe)?t:e}var B={scheme:`mailto`,parse:function(e,t){var n=e,r=n.to=n.path?n.path.split(`,`):[];if(n.path=void 0,n.query){for(var i=!1,a={},o=n.query.split(`&`),s=0,c=o.length;s<c;++s){var l=o[s].split(`=`);switch(l[0]){case`to`:for(var u=l[1].split(`,`),d=0,f=u.length;d<f;++d)r.push(u[d]);break;case`subject`:n.subject=Ee(l[1],t);break;case`body`:n.body=Ee(l[1],t);break;default:i=!0,a[Ee(l[0],t)]=Ee(l[1],t);break}}i&&(n.headers=a)}n.query=void 0;for(var p=0,m=r.length;p<m;++p){var h=r[p].split(`@`);if(h[0]=Ee(h[0]),t.unicodeSupport)h[1]=Ee(h[1],t).toLowerCase();else try{h[1]=D.toASCII(Ee(h[1],t).toLowerCase())}catch(e){n.error=n.error||`Email address's domain name can not be converted to ASCII via punycode: `+e}r[p]=h.join(`@`)}return n},serialize:function(e,t){var n=e,r=a(e.to);if(r){for(var o=0,s=r.length;o<s;++o){var c=String(r[o]),l=c.lastIndexOf(`@`),u=c.slice(0,l).replace(Ie,ze).replace(Ie,i).replace(Le,k),d=c.slice(l+1);try{d=t.iri?D.toUnicode(d):D.toASCII(Ee(d,t).toLowerCase())}catch(e){n.error=n.error||`Email address's domain name can not be converted to `+(t.iri?`Unicode`:`ASCII`)+` via punycode: `+e}r[o]=u+`@`+d}n.path=r.join(`,`)}var f=e.headers=e.headers||{};e.subject&&(f.subject=e.subject),e.body&&(f.body=e.body);var p=[];for(var m in f)f[m]!==Ae[m]&&p.push(m.replace(Ie,ze).replace(Ie,i).replace(z,k)+`=`+f[m].replace(Ie,ze).replace(Ie,i).replace(Re,k));return p.length&&(n.query=p.join(`&`)),n}},Be=/^([^\:]+)\:(.*)/,Ve={scheme:`urn`,parse:function(e,t){var n=e.path&&e.path.match(Be),r=e;if(n){var i=t.scheme||r.scheme||`urn`,a=n[1].toLowerCase(),o=n[2],s=O[i+`:`+(t.nid||a)];r.nid=a,r.nss=o,r.path=void 0,s&&(r=s.parse(r,t))}else r.error=r.error||`URN can not be parsed.`;return r},serialize:function(e,t){var n=t.scheme||e.scheme||`urn`,r=e.nid,i=O[n+`:`+(t.nid||r)];i&&(e=i.serialize(e,t));var a=e,o=e.nss;return a.path=(r||t.nid)+`:`+o,a}},He=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,Ue={scheme:`urn:uuid`,parse:function(e,t){var n=e;return n.uuid=n.nss,n.nss=void 0,!t.tolerant&&(!n.uuid||!n.uuid.match(He))&&(n.error=n.error||`UUID is not valid.`),n},serialize:function(e,t){var n=e;return n.nss=(e.uuid||``).toLowerCase(),n}};O[De.scheme]=De,O[Oe.scheme]=Oe,O[F.scheme]=F,O[I.scheme]=I,O[B.scheme]=B,O[Ve.scheme]=Ve,O[Ue.scheme]=Ue,e.SCHEMES=O,e.pctEncChar=k,e.pctDecChars=A,e.parse=me,e.removeDotSegments=be,e.serialize=P,e.resolveComponents=xe,e.resolve=Se,e.normalize=Ce,e.equal=we,e.escapeComponent=Te,e.unescapeComponent=Ee,Object.defineProperty(e,`__esModule`,{value:!0})}))}))();let Ee=/(#)+$/,De=/#$/,Oe=/^[^:]+:\/\/[^/]+\//,ke=/#.*$/;function F(e,t){return t==null?e?.replace(De,``)??`#`:e==null||e===`#`?t?.replace(De,``):t[0]===`#`?e[0]===`/`?t:`${e.replace(ke,``)}${t.replace(Ee,``)}`:Oe.test(t)?t.replace(De,``):(0,Te.resolve)(e,t??``)??`#`}function I(e,t,...n){if(t?.type===`error`)return t;if(e?.type===`error`||A(e)!==A(t))return e;let r=Ae(e,t);for(let e of n)delete r[e];return r}function Ae(e,t,n){if(j(e)&&j(t)){let n={};return[...Object.keys(e),...Object.keys(t)].filter((e,t,n)=>n.indexOf(e)===t).forEach(r=>n[r]=Ae(e[r],t[r],r)),n}let r=Array.isArray(e),i=Array.isArray(t);if(r&&i){if(n===`required`||n===`anyOf`)return e.concat(t).filter((e,t,n)=>n.indexOf(e)===t);if(n===`items`||n===`prefixItems`){let n=[];for(let r=0;r<t.length;r+=1)j(e[r])&&j(t[r])&&e[r].type===t[r].type?n[r]=Ae(e[r],t[r]):n.push(t[r]??e[r]);return n}let r=[],i=[];for(let n=0;n<Math.max(e.length,t.length);n+=1)j(e[n])&&j(t[n])?r[n]=Ae(e[n],t[n]):e[n]!==void 0&&t[n]!==void 0?(r[n]=e[n],i.push(t[n])):e[n]===void 0?t[n]!==void 0&&i.push(t[n]):r[n]=e[n];return[...r,...i].filter((e,t,n)=>n.indexOf(e)===t)}if(n===`type`&&(r||i)){if(r&&e.includes(t))return t;if(i&&t.includes(e))return e;if(r)return[...e,t];if(i)return[...t,e]}return i?t:r||t===void 0?e:t}function je(e,t){return(t.order??0)-(e.order??0)}function L(e,t,n){if(e==null||n.indexOf(e)!==t)return!1;let r=e.toJSON?.()??e.name;return n.find((e,n)=>(e.toJSON?.()??e.name)===r&&n===t)}function Me(e,t){if(e==null||t==null)return t||e;let n={};return[...Object.keys(e),...Object.keys(t)].filter((e,t,n)=>n.indexOf(e)===t).forEach(r=>{let i=R(e[r],t[r]);V(i)&&(n[r]=i)}),n}function Ne(e,t){return e==null||t==null?t||e:e.concat(t).filter((e,t,n)=>n.indexOf(e)===t)}function Pe(e,t){if(e==null||t==null)return e||t;let n=[...e],r=e.map(e=>e.node.evaluationPath);return t.forEach(e=>{r.includes(e.node.evaluationPath)||n.push(e)}),n}function R(e,t,...n){if(e==null||t==null)return e||t;let r={};e.items&&t.prefixItems||e.prefixItems&&t.items?t.prefixItems?r.prefixItems=t.prefixItems:r.items=t.items:(r.prefixItems=t.prefixItems??e.prefixItems,r.items=R(e.items,t.items));let i={...e,...t,...r,dynamicId:qe(e.dynamicId,t.dynamicId),oneOfIndex:e.oneOfIndex??t.oneOfIndex,schema:I(e.schema,t.schema,...n),parent:e.parent,resolvers:e.resolvers.concat(t.resolvers).filter(L).sort(je),reducers:e.reducers.concat(t.reducers).filter(L).sort(je),validators:e.validators.concat(t.validators).filter(L).sort(je),additionalProperties:R(e.additionalProperties,t.additionalProperties),contains:R(e.contains,t.contains),enum:Ne(e.enum,t.enum),if:R(e.if,t.if),then:R(e.then,t.then),else:R(e.else,t.else),not:R(e.not,t.not),propertyNames:R(e.propertyNames,t.propertyNames),unevaluatedProperties:R(e.unevaluatedProperties,t.unevaluatedProperties),unevaluatedItems:R(e.unevaluatedItems,t.unevaluatedItems),$defs:Me(e.$defs,t.$defs),patternProperties:Pe(e.patternProperties,t.patternProperties),properties:Me(e.properties,t.properties),required:Ne(e.required,t.required)};function a(e){let t=e.toJSON?.()??e.name;return i.schema?.[t]===void 0?(i[t]=void 0,!1):!0}return n?.forEach(e=>i[e]=void 0),i.resolvers=i.resolvers.filter(a),i.reducers=i.reducers.filter(a),i.validators=i.validators.filter(a),i}function Fe(e,...t){let n={};return Object.keys(e).forEach(r=>{t.includes(r)||(n[r]=e[r])}),n}function Ie(e,...t){if(!j(e)||t.length===0)return e;let n={};return t.forEach(t=>{e[t]!==void 0&&(n[t]=e[t])}),n}function Le(e,t={}){return e.replace(/\{\{(\w+)\}\}/g,(e,n)=>{let r=t[n];return r==null?``:typeof r==`object`?JSON.stringify(r):String(r)})}function z(e,t,n,r){if(W(e))return[e];r.push({pointer:n,node:e});let i=e.schema;if(i===!0)return[];if(i===!1)return[e.createError(`invalid-data-error`,{value:t,pointer:n,schema:e.schema})];let a=[];for(let i of e.validators){let o=i({node:e,data:t,pointer:n,path:r});Array.isArray(o)?a.push(...o):o&&a.push(o)}return D(a)}let Re=Object.prototype.hasOwnProperty,ze=(e,t)=>!(e[t]===void 0||!Re.call(e,t));function B(e,t){if(j(e)||Array.isArray(e))return e[t]}function Be(e,t,n={}){n.path=n.path??[],n.withSchemaWarning=n.withSchemaWarning??!1,n.pointer=n.pointer??`#`;let r=this,i=ye(e);if(i.length===0){let e=r.resolveRef(n);return W(e)?{node:void 0,error:e}:{node:e,error:void 0}}let a=`#`,o=r;for(let e=0,r=i.length;e<r;e+=1){a=`${a}/${i[e]}`;let r=o.getNodeChild(i[e],t,{...n,pointer:a});if(r.error||r.node==null)return r;o=r.node,t=B(t,i[e])}let{node:s,error:c}=o.resolveRef(n).reduceNode(t);return W(c)?{node:void 0,error:c}:V(s)?{node:s,error:void 0}:{error:void 0}}function Ve(e,t,n={}){n.path=n.path??[],n.withSchemaWarning=n.withSchemaWarning??!1,n.pointer=n.pointer??`#`;let{path:r,pointer:i}=n,a=this;if(a.reducers.length){let n=a.reduceNode(t,{key:e,path:r,pointer:i});if(n.error)return n;V(n.node)&&(a=n.node)}for(let n of a.resolvers){let o=n({data:t,key:e,node:a});if(W(o))return{node:void 0,error:o};if(V(o))return{node:o.resolveRef({pointer:i,path:r}),error:void 0}}return n.createSchema===!0?{node:a.compileSchema(a.createSchema(B(t,e)),`${a.evaluationPath}/additional`,`${a.schemaLocation}/additional`),error:void 0}:n.withSchemaWarning===!0?{node:void 0,error:a.createError(`schema-warning`,{pointer:i,value:t,schema:a.schema,key:e})}:{node:void 0}}let{DYNAMIC_PROPERTIES:He,REGEX_FLAGS:Ue,DECLARATOR_ONEOF:We}=O;function V(e){return j(e)&&Array.isArray(e?.reducers)&&Array.isArray(e?.resolvers)}function Ge(e){for(let t=0,n=He.length;t<n;t+=1)if(ze(e,He[t]))return!0;return!1}function Ke(e,t){if(!Array.isArray(e)||e.length===0)throw Error(`Missing drafts in 'compileSchema({ $schema: "${t}" })'`);return e.length===1?e[0]:e.find(e=>new RegExp(e.$schemaRegEx,Ue).test(t))??e[e.length-1]}function qe(e,t){return e==t?e??``:e==null||t==null?(e||t)??``:e.startsWith(t)?e:t.startsWith(e)?t:`${e}+${t}`}let Je={compileSchema(e,t,n,r){let i=this;t??=i.evaluationPath;let a=t.split(`/$ref`)[0],o={lastIdPointer:i.lastIdPointer,context:i.context,parent:i,evaluationPath:t,dynamicId:qe(i.dynamicId,r),schemaLocation:n??we(i.schemaLocation,a),reducers:[],resolvers:[],validators:[],schema:e,...Je};return!H(e)&&!U(e)?(o.schemaValidation=[o.createError(`schema-error`,{pointer:n??t,schema:e,value:void 0,message:`JSON schema must be object or boolean - reveived: '${e}'`})],o):(o.schemaValidation=D(Ze(o).filter(e=>e!=null)),o)},createError(e,t,n){let r=this,i=n;if(i===void 0){let n=r.schema?.errorMessages?.[e]??r.context.errors[e];if(typeof n==`function`)return n(t);i=Le(n??name,t)}return{type:`error`,code:e,message:i,data:t}},createAnnotation(e,t,n){let r=this,i=n;if(i===void 0){let n=r.schema?.errorMessages?.[e]??r.context.errors[e];if(typeof n==`function`)return n(t);i=Le(n??name,t)}return{type:`annotation`,code:e,message:i,data:t}},createSchema:M,getChildSelection(e){let t=this;return t.context.methods.getChildSelection(t,e)},getNode:Be,getNodeChild:Ve,getNodeRef(e){return this.compileSchema({$ref:e},`$dynamic`).resolveRef()},getNodeRoot(){return this.context.rootNode},getDraftVersion(){return this.context.version},getData(e,t){let n=this,r={recursionLimit:1,...n.context.getDataDefaultOptions,cache:{},...t??{}};return n.context.methods.getData(n,e,r)},reduceNode(e,t={}){let n=this,{key:r=`missing-key`,pointer:i=n.evaluationPath,path:a}=t;if(n.schema===!1)return{node:n,error:void 0};if(n.schema===!0){let t=n.compileSchema(M(e),n.evaluationPath,n.schemaLocation);return a?.push({pointer:i,node:n}),{node:t,error:void 0}}let o,s=n.compileSchema(n.schema,n.evaluationPath,n.schemaLocation),c=n.reducers;for(let t of c){let c=t({data:e,key:r,node:n,pointer:i,path:a??[]});if(W(c))return{node:void 0,error:c};if(c){if(c.schema===!1){o=!1;break}s=R(s,c)}}return o===!1?{node:{...n,schema:!1,reducers:[]},error:void 0}:(s!==n&&a?.push({pointer:i,node:n}),s.schema=Fe(s.schema,We,...He),He.forEach(e=>s[e]=void 0),{node:s,error:void 0})},validate(e,t=`#`,n=[]){let r=this,i=z(r,e,t,n)??[],a=[],o=[],s=D(Array.isArray(i)?i:[i]).filter(W),c=[];return D(Array.isArray(i)?i:[i]).forEach(e=>{if(W(e)){if(r.context.throwOnInvalidRef&&e.code===`ref-error`){let t=Error(`Invalid $ref: `+e.message);throw t.data=a,t}a.push(e)}else e instanceof Promise?c.push(e.then(D)):et(e)&&o.push(e)}),{valid:s.length===0,errors:a,annotations:o,errorsAsync:c}},addRemoteSchema(e,t){H(t)&&(t.$id=F(t.$id||e));let n=this,{context:r}=n,i=H(t)?n.context.draft??t.$schema:void 0,a=Ke(r.drafts,i??r.rootNode.schema?.$schema),o={evaluationPath:`#`,lastIdPointer:`#`,schemaLocation:`#`,dynamicId:``,reducers:[],resolvers:[],validators:[],schema:t,context:{...r,refs:{},anchors:{},...E(Ie(a,`methods`,`keywords`,`version`,`formats`,`errors`))},...Je};return o.context.rootNode=o,o.context.remotes[F(e)]=o,Ze(o),n},resolveRef(e){throw Error(`method 'resolveRef' is not implemented`)},toSchemaNodes(){return N(this)},toDataNodes(e,t){let n=this;return n.context.methods.toDataNodes(n,e,t)},toJSON(){let e=this;return{...e,context:void 0,errors:void 0,parent:e.parent?.evaluationPath}}},Ye=[`$ref`,`if`,`$defs`],Xe=[`draft-04`,`draft-06`,`draft-07`];function Ze(e){if(e.schema.$ref&&Xe.includes(e.context.version))return e.context.keywords.filter(({keyword:e})=>Ye.includes(e)).map(t=>Qe(t,e));let t=Object.keys(e.schema),n=e.context.keywords.filter(({keyword:e})=>Ye.includes(e)||t.includes(e)).map(t=>Qe(t,e));return t.filter(t=>!t.startsWith(`x-`)&&e.context.keywords.find(e=>e.keyword===t)==null).forEach(t=>{n.push(e.createAnnotation(`unknown-keyword-warning`,{pointer:`${e.schemaLocation}/${t}`,schema:e.schema,value:t,draft:e.getDraftVersion()}))}),n}function Qe(e,t){let n=e.parse?.(t);return e.reduce&&e.addReduce?.(t)&&t.reducers.push(e.reduce),e.resolve&&e.addResolve?.(t)&&t.resolvers.push(e.resolve),e.validate&&e.addValidate?.(t)&&t.validators.push(e.validate),n}function H(e){return j(e)}function U(e){return typeof e==`boolean`}function $e(e){return j(e)&&(e?.type&&e?.code&&e?.data)!=null}function et(e){return j(e)&&e.type===`annotation`}function W(e){return j(e)&&e.type===`error`}function G(e){return typeof e==`number`}let tt=/(#)+$/g,nt=[``,null,`#`];function rt(e){if(nt.includes(e))return[];if(e=e.replace(tt,``),e.indexOf(`#`)===-1)return[e.replace(/(#|\/)+$/g,``)];if(e.indexOf(`#`)===0)return[e.replace(tt,``)];let t=e.split(`#`);return t[0]=t[0].replace(/(#|\/)+$/g,``),t[1]=`#${t[1].replace(tt,``)}`,t}let it={id:`$ref`,keyword:`$ref`,order:10,parse:ot,addReduce:e=>e.$ref!=null||e.schema.$dynamicRef!=null,reduce:st,addValidate:({schema:e})=>e.$ref!=null||e.$dynamicRef!=null,validate:lt};function at(e,t){e.context.refs[t]??(e.context.refs[t]=e)}function ot(e){e.resolveRef=ct;let t=F(e.parent?.$id,e.schema?.$id);e.$id=t,e.lastIdPointer=e.parent?.lastIdPointer??`#`,t!==e.parent?.$id&&e.evaluationPath!==`#`&&(e.lastIdPointer=e.evaluationPath),e.lastIdPointer!==`#`&&e.evaluationPath.startsWith(e.lastIdPointer)&&at(e,F(t,`#${e.evaluationPath.replace(e.lastIdPointer,``)}`)),at(e,F(e.context.rootNode.$id,e.evaluationPath));let n=e.schema.$anchor;if(n){let r=`${t.replace(/#$/,``)}#${n}`;e.context.anchors[r]??(e.context.anchors[r]=e)}let r=e.schema.$dynamicAnchor;if(r){let n=`${t.replace(/#$/,``)}#${r}`;e.context.dynamicAnchors[n]??(e.context.dynamicAnchors[n]=e)}if(e.schema.$ref&&(e.$ref=F(t,e.schema.$ref),e.$ref.startsWith(`/`)&&(e.$ref=`#${e.$ref}`)),e.$ref?.startsWith(`#/$defs/`)&&be(e.getNodeRoot().schema,e.$ref)==null)return e.createError(`schema-error`,{pointer:`${e.schemaLocation}/$ref`,schema:e.schema,value:e.schema.$ref,message:`Invalid $ref to missing target '${e.schema.ref}'`})}function st({node:e,data:t,key:n,pointer:r,path:i}){if(e==null)return;let a=e.resolveRef({pointer:r,path:i});if(a==null)return e.createError(`ref-error`,{ref:e.schema.$ref??e.schema.$dynamicRef,pointer:r,schema:e.schema,value:t});if(a.schemaLocation===e.schemaLocation)return a;let{node:o,error:s}=R(e,a).reduceNode(t,{key:n,pointer:r,path:i});return o??s}function ct({pointer:e,path:t=[]}={}){if(this.schema.$dynamicRef){let n=ut(this,t);return W(n)||t.push({pointer:e,node:n}),n}if(this.$ref==null)return this;let n=ft(this);return V(n)&&t.push({pointer:e,node:n}),n}function lt({node:e,data:t,pointer:n=`#`,path:r}){let i=e.resolveRef({pointer:n,path:r});return i==null?e.createError(`ref-error`,{ref:e.schema.$ref??e.schema.$dynamicRef,pointer:n,schema:e.schema,value:t}):z(i,t,n,r)}function ut(e,t){let n=t,r=F(e.$id,e.schema.$dynamicRef);if(e.context.dynamicAnchors[r]==null&&e.context.anchors[r])return dt(e.context.anchors[r],e);for(let t of n){if(t.node.schema.$dynamicAnchor)return dt(t.node,e);let n=e.schema.$dynamicRef.split(`#`).pop(),r=F(t.node.$id,`#${n}`);if(e.context.dynamicAnchors[r])return dt(e.context.dynamicAnchors[r],e)}return ft(e,r)}function dt(e,t){let n=e.schema;return j(e.schema)&&(n={...Fe(e.schema,`$id`),...Ie(t.schema,...O.PROPERTIES_TO_MERGE)}),e.compileSchema(n,`${t.evaluationPath}/$ref`,e.schemaLocation)}function ft(e,t=e?.$ref){if(t==null)return e;if(e.context.refs[t])return dt(e.context.refs[t],e);if(e.context.anchors[t])return dt(e.context.anchors[t],e);if(e.context.dynamicAnchors[t])return dt(e.context.dynamicAnchors[t],e);let n=rt(t);if(n.length===0)return e.createError(`ref-error`,{ref:t,pointer:e.evaluationPath,schema:e.schema,value:void 0});if(n.length===1){let t=n[0];if(e.context.remotes[t])return dt(e.context.remotes[t],e);if(t[0]===`#`){let n=e.context.rootNode.schema,r=be(n,t);if(r)return e.compileSchema(r,`${e.evaluationPath}/$ref`,t)}return e.createError(`ref-error`,{ref:t,pointer:e.evaluationPath,schema:e.schema,value:void 0})}if(n.length===2){let r=n[0];if(e.context.remotes[r]&&e!==e.context.remotes[r]){let i=e.context.remotes[r],a=ft(i,t);if(a||(a=ft(i,n[1]),a))return a}if(e.context.refs[r]){let i=e.context.refs[r],a=ye(n[1]),o=i;for(let r of a)if(o=o[r===`definitions`?`$defs`:r],o==null)return e.createError(`ref-error`,{ref:t,pointer:e.evaluationPath,schema:e.schema,value:void 0,host:n[0],local:n[1]});return o}}return e.createError(`ref-error`,{ref:t,pointer:e.evaluationPath,schema:e.schema,value:void 0})}function K(e,...t){return t.reduce((e,t)=>(t.schemaValidation&&e.push(...t.schemaValidation),e),e)}let pt={id:`$defs`,keyword:`$defs`,parse:mt};function mt(e){let t=[];return e.schema.$defs&&(j(e.schema.$defs)?(e.$defs=e.$defs??{},Object.keys(e.schema.$defs).forEach(n=>{e.$defs[n]=e.compileSchema(e.schema.$defs[n],`${e.evaluationPath}/$defs/${ht(n)}`,`${e.schemaLocation}/$defs/${n}`),K(t,e.$defs[n])})):t.push(e.createError(`schema-error`,{pointer:e.schemaLocation,schema:e.schema,value:e.schema.$defs,message:`$defs must be an object - received: ${typeof e.schema.$defs}`}))),e.schema.definitions&&(j(e.schema.definitions)||t.push(e.createError(`schema-error`,{pointer:e.schemaLocation,schema:e.schema,value:e.schema.$defs,message:`definitions must be an object - received: ${typeof e.schema.definitions}`})),e.$defs=e.$defs??{},Object.keys(e.schema.definitions).forEach(n=>{e.$defs[n]=e.compileSchema(e.schema.definitions[n],`${e.evaluationPath}/definitions/${ht(n)}`,`${e.schemaLocation}/definitions/${ht(n)}`),K(t,e.$defs[n])})),t}function ht(e){return e=e.replace(/~/g,`~0`),e=e.replace(/\//g,`~1`),encodeURIComponent(e)}let gt={id:`$ref`,keyword:`$ref`,parse:_t,addValidate:({schema:e})=>e.$ref!=null,validate:vt};function _t(e){let t=e.parent?.$id;if(e.schema?.$ref??(t=F(e.parent?.$id,e.schema?.$id)),e.$id=t,e.lastIdPointer=e.parent?.lastIdPointer??`#`,e.resolveRef=ct,e.context.refs[t]??(e.context.refs[t]=e),t!==e.parent?.$id&&(e.lastIdPointer=e.evaluationPath),e.lastIdPointer!==`#`&&e.evaluationPath.startsWith(e.lastIdPointer)){let n=`#${e.evaluationPath.replace(e.lastIdPointer,``)}`;e.context.refs[F(t,n)]=e}else e.context.refs[F(t,e.evaluationPath)]=e;e.context.refs[F(e.context.rootNode.$id,e.evaluationPath)]=e,e.schema.$ref&&(e.$ref=F(t,e.schema.$ref))}function vt({node:e,data:t,pointer:n=`#`,path:r}){let i=yt(e,n,r);return V(i)?z(i,t,n,r):e.createError(`ref-error`,{ref:e.schema.$ref,pointer:n,schema:e.schema,value:t})}function yt(e,t,n){let r=e.resolveRef({pointer:t,path:n});return V(r)?r!==e&&r?yt(r,t,n):e:e.createError(`ref-error`,{ref:e.schema.$ref,pointer:t,schema:e.schema,value:void 0})}let bt={id:`$ref`,keyword:`$ref`,parse:St,addValidate:({schema:e})=>e.$ref!=null,validate:gt.validate};function xt(e,t){e.context.refs[t]??(e.context.refs[t]=e)}function St(e){let t=e.parent?.$id;if(e.schema?.$ref==null&&e.schema?.id&&(t=F(e.parent?.$id,e.schema.id)),e.$id=t,e.lastIdPointer=e.parent?.lastIdPointer??`#`,e.resolveRef=Ct,e.context.refs[t]??(e.context.refs[t]=e),t!==e.parent?.$id&&(e.lastIdPointer=e.evaluationPath),e.lastIdPointer!==`#`&&e.evaluationPath.startsWith(e.lastIdPointer)){let n=`#${e.evaluationPath.replace(e.lastIdPointer,``)}`;xt(e,F(t,n))}else xt(e,F(t,e.evaluationPath));xt(e,F(e.context.rootNode.$id,e.evaluationPath)),e.schema.$ref&&(e.$ref=F(t,e.schema.$ref))}function Ct({pointer:e,path:t}={}){if(this.$ref==null)return this;let n=Tt(this);return V(n)&&t?.push({pointer:e,node:n}),n}function wt(e,t=e.evaluationPath){let n=j(e.schema)?Fe(e.schema,`id`):e.schema;return e.compileSchema(n,`${t}/$ref`,n.schemaLocation)}function Tt(e,t=e?.$ref){if(t==null)return e;if(e.context.refs[t])return wt(e.context.refs[t],e.evaluationPath);if(e.context.anchors[t])return wt(e.context.anchors[t],e.evaluationPath);let n=rt(t);if(n.length===0)return e.createError(`ref-error`,{ref:t,pointer:e.evaluationPath,schema:e.schema,value:void 0});if(n.length===1){let t=n[0];return e.context.remotes[t]?wt(e.context.remotes[t],e.evaluationPath):e.createError(`ref-error`,{ref:t,pointer:e.evaluationPath,schema:e.schema,value:void 0})}if(n.length===2){let r=n[0];if(e.context.remotes[r]&&e!==e.context.remotes[r]){let i=e.context.remotes[r],a=Tt(i,t);if(a||(a=Tt(i,n[1]),a))return a}let i=n[0];if(e.context.refs[i]){let t=e.context.refs[i],r=n[1].split(`$defs/`).pop();if(r&&t?.$defs)return Tt(t.$defs[r])}return}return e.createError(`ref-error`,{ref:t,pointer:e.evaluationPath,schema:e.schema,value:void 0})}let Et=`additionalItems`,Dt={id:Et,keyword:Et,order:-10,parse:Ot,addResolve:e=>e.items!=null,resolve:kt,addValidate:({schema:e})=>e[Et]!=null&&e[Et]!==!0&&Array.isArray(e.items),validate:At};function Ot(e){let{schema:t,evaluationPath:n,schemaLocation:r}=e;if(t.additionalItems==null||t.additionalItems===!1)return;let i=t[Et];if(!(j(i)||i===!0))return e.createError(`schema-error`,{pointer:n,schema:t,value:void 0,message:`Keyword '${Et}' must be an object or a boolean - received '${typeof i}'`});if(!Array.isArray(t.items))return e.createAnnotation(`schema-error`,{pointer:n,schema:t,value:void 0,message:`Keyword '${Et}' is only evaluated with a given items-array`});e.items=e.compileSchema(t.additionalItems,`${n}/additionalItems`,`${r}/additionalItems`)}function kt({node:e,key:t,data:n}){if(Array.isArray(n)){let r=B(n,t),{node:i,error:a}=e.items.reduceNode(r);return i??a}}function At({node:e,data:t,pointer:n,path:r}){let{schema:i}=e;if(!Array.isArray(t)||t.length===0||Array.isArray(i.items)&&i.items.length>=t.length)return;let a=Array.isArray(i.items)?i.items.length:0,o=[];for(let s=a;s<t.length;s+=1){let a=t[s];if(e.items){let t=z(e.items,a,`${n}/${s}`,r);t&&o.push(...t)}else i.additionalItems===!1&&o.push(e.createError(`additional-items-error`,{key:s,pointer:`${n}/${s}`,value:t,schema:i}))}return o}let jt={id:`additionalProperties`,keyword:`additionalProperties`,order:-10,parse:Mt,addResolve:({schema:e})=>e.additionalProperties!=null,resolve:Nt,addValidate:({schema:e})=>e.additionalProperties!==!0&&e.additionalProperties!=null&&!(e.additionalProperties===!1&&j(e.patternProperties)),validate:Pt};function Mt(e){let{schema:t,evaluationPath:n,schemaLocation:r}=e;if(!(t.additionalProperties==null||U(t.additionalProperties)))return j(t.additionalProperties)?(e.additionalProperties=e.compileSchema(t.additionalProperties,`${n}/additionalProperties`,`${r}/additionalProperties`),e.additionalProperties.schemaValidation):e.createError(`schema-error`,{pointer:e.schemaLocation,schema:t,value:t.additionalProperties,message:`keyword 'additionalProperties' must be a valid JSON Schema - receoved: ${typeof t.additionalProperties}`})}function Nt({node:e,data:t,key:n}){let r=B(t,n);if(e.additionalProperties){let{node:t,error:n}=e.additionalProperties.reduceNode(r);return t??n}if(e.schema.additionalProperties===!1)return e.createError(`no-additional-properties-error`,{pointer:`${n}`,schema:e.schema,value:B(t,n),property:`${n}`})}function Pt({node:e,data:t,pointer:n=`#`,path:r}){if(!j(t))return;let{schema:i}=e,a=[],o=Object.keys(t).filter(e=>O.propertyBlacklist.includes(e)===!1),s=e.patternProperties;Array.isArray(s)&&(o=o.filter(e=>{for(let t of s)if(t.pattern.test(e))return!1;return!0}));let c=e.properties?Object.keys(e.properties):[];return o.filter(e=>c.indexOf(e)===-1).forEach(o=>{let s=B(t,o);if(s!==void 0)if(j(e.additionalProperties)){let t=z(e.additionalProperties,s,`${n}/${o}`,r);t&&a.push(...t)}else a.push(e.createError(`no-additional-properties-error`,{pointer:`${n}/${o}`,schema:i,value:t,property:o,properties:c}))}),a}let q=`allOf`,Ft={id:q,keyword:q,parse:It,addReduce:e=>e[q]!=null,reduce:Lt,addValidate:e=>e[q]!=null,validate:Rt};function It(e){let{schema:t,evaluationPath:n,schemaLocation:r}=e;if(t[q]!=null){if(!Array.isArray(t[q]))return e.createError(`schema-error`,{pointer:r,schema:t,value:t[q],message:`Keyword '${q}' must be an array - received '${typeof t[q]}'`});if(t[q].length!==0)return e[q]=t[q].map((t,i)=>e.compileSchema(t,`${n}/${q}/${i}`,`${r}/${q}/${i}`)),K([],...e[q])}}function Lt({node:e,data:t,key:n,pointer:r,path:i}){if(e[q]==null)return;let a={},o=``;for(let s=0;s<e[q].length;s+=1){let{node:c}=e[q][s].reduceNode(t,{key:n,pointer:r,path:i});if(c){let t=c.dynamicId?.replace(e.dynamicId,``)??``,n=t===``?`${q}/${s}`:t;o+=`${o===``?``:`,`}${n}`;let r=I(e[q][s].schema,c.schema);a=I(a,r,q,`contains`)}}return e.compileSchema(a,`${e.evaluationPath}/${o}`,e.schemaLocation,`${e.schemaLocation}(${o})`)}function Rt({node:e,data:t,pointer:n,path:r}){if(!Array.isArray(e[q])||e[q].length===0)return;let i=[];return e[q].forEach(e=>{i.push(...z(e,t,n,r))}),i}let J=`anyOf`,zt={id:J,keyword:J,parse:Bt,addReduce:e=>e[J]!=null,reduce:Vt,addValidate:e=>e[J]!=null,validate:Ht};function Bt(e){let{schema:t,evaluationPath:n,schemaLocation:r}=e;if(t[J]!=null){if(!Array.isArray(t[J]))return e.createError(`schema-error`,{pointer:r,schema:t,value:t[J],message:`Keyword '${J}' must be an array - received '${typeof t[J]}'`});if(t[J].length!==0)return e[J]=t[J].map((t,i)=>e.compileSchema(t,`${n}/${J}/${i}`,`${r}/${J}/${i}`)),K([],...e[J])}}function Vt({node:e,data:t,pointer:n,path:r}){if(e[J]==null)return;let i={},a=``;for(let o=0;o<e[J].length;o+=1)if(z(e[J][o],t,n,r).length===0){let{node:n}=e[J][o].reduceNode(t);if(n){let t=n.dynamicId?.replace(e.dynamicId,``)??``,r=t===``?`${J}/${o}`:t;a+=`${a===``?``:`,`}${r}`;let s=I(e[J][o].schema,n.schema);i=I(i,s,J)}}return e.compileSchema(i,`${e.evaluationPath}${a}`,e.schemaLocation,`${e.schemaLocation}(${a})`)}function Ht({node:e,data:t,pointer:n,path:r}){if(e[J]!=null){for(let i of e[J])if(z(i,t,n,r).length===0)return;return e.createError(`any-of-error`,{pointer:n,schema:e.schema,value:t,anyOf:e.schema[J]})}}let Y=`contains`,Ut={id:Y,keyword:Y,parse:Wt,addValidate:e=>e[Y]!=null,validate:Gt,addReduce:e=>e[Y]!=null,reduce:({node:e})=>e.compileSchema({items:{anyOf:[e[Y].schema]}},e.evaluationPath,e.schemaLocation)};function Wt(e){let t=e.schema[Y];if(t!=null)return H(t)||U(t)?(e[Y]=e.compileSchema(t,`${e.evaluationPath}/${Y}`),e[Y].schemaValidation):e.createError(`schema-error`,{pointer:`${e.schemaLocation}/${Y}`,schema:e.schema,value:t,message:`Keyword '${Y}' must be a valid JSON Schema - received '${typeof t}'`})}function Gt({node:e,data:t,pointer:n,path:r}){let{schema:i}=e;if(!Array.isArray(t))return;if(i.contains===!1)return e.createError(`contains-array-error`,{pointer:n,value:t,schema:i});if(i.contains===!0)return Array.isArray(t)&&t.length===0?e.createError(`contains-any-error`,{pointer:n,value:t,schema:i}):void 0;if(!j(i.contains)||!Array.isArray(t))return;let a=0;for(let i of t)z(e.contains,i,n,r).length===0&&a++;let o=i.maxContains??1/0,s=i.minContains??1;if(!(o>=a&&s<=a))return o<a?e.createError(`contains-max-error`,{pointer:n,schema:i,delta:a-o,value:t}):s>a?e.createError(`contains-min-error`,{pointer:n,schema:i,delta:s-a,value:t}):e.createError(`contains-error`,{pointer:n,schema:i,value:t})}function Kt(e){return Array.isArray(e)&&e.find(e=>typeof e!=`string`)==null}let X=`dependentRequired`,qt={id:X,keyword:X,parse:Jt,addValidate:e=>e[X]!=null,validate:Yt};function Jt(e){let{schema:t}=e;if(t[X]==null)return;if(!j(t[X]))return e.createError(`schema-error`,{pointer:`${e.schemaLocation}/${X}`,schema:t,value:t[X],message:`Keyword '${X}' must be an object - received '${typeof t[X]}'`});let n=[];e.dependentRequired={};for(let r of Object.keys(t[X])){let i=t[X][r];Kt(i)?e.dependentRequired[r]=i:n.push(e.createError(`schema-error`,{pointer:`${e.schemaLocation}/${X}/${r}`,schema:t,value:i,message:`Keyword '${X}[string]' must be a string[] - received '${typeof i}'`}))}return n}function Yt({node:e,data:t,pointer:n=`#`}){let{dependentRequired:r}=e;if(r==null||!j(t))return;let i=[];return Object.keys(t).forEach(a=>{let o=r[a];if(Array.isArray(o))for(let r=0,a=o.length;r<a;r+=1)t[o[r]]===void 0&&i.push(e.createError(`missing-dependency-error`,{missingProperty:o[r],pointer:n,schema:e.schema,value:t}))}),i}let Xt=`dependentSchemas`,Zt={id:Xt,keyword:Xt,parse:Qt,addReduce:e=>e.dependentSchemas!=null,reduce:$t,addValidate:e=>e.dependentSchemas!=null,validate:en};function Qt(e){let{dependentSchemas:t}=e.schema;if(t==null)return;if(!j(t))return e.createError(`schema-error`,{pointer:`${e.schemaLocation}/${Xt}`,schema:e.schema,value:t,message:`Keyword '${Xt}' must be an object - received '${typeof t}'`});if(Object.keys(t).length===0)return;let n=[],r={};for(let i of Object.keys(t)){let a=t[i];j(a)?(r[i]=e.compileSchema(a,`${e.evaluationPath}/${Xt}/${i}`,`${e.schemaLocation}/${Xt}/${i}`),K(n,r[i])):U(a)?r[i]=a:n.push(e.createError(`schema-error`,{pointer:`${e.schemaLocation}/${Xt}/${i}`,schema:e.schema,value:a,message:`Keyword '${Xt}[string]' must be a valid JSON Schema'`}))}return e.dependentSchemas=r,n}function $t({node:e,data:t}){let{dependentSchemas:n}=e;if(!j(t)||n==null)return e;let r,i=0,a=`${e.schemaLocation}(`;return Object.keys(t).forEach(e=>{n[e]!=null&&(r??={properties:{}},V(n[e])?r=I(r,n[e].schema):r.properties[e]=n[e],a+=`${i?`,`:``}${Xt}/${e}`,i++)}),r==null?e:(r=I(e.schema,r,Xt),e.compileSchema(r,e.evaluationPath,e.schemaLocation,`${a})`))}function en({node:e,data:t,pointer:n,path:r}){let{schema:i,dependentSchemas:a}=e;if(!j(t)||a==null)return;let o=[];return Object.keys(t).forEach(s=>{let c=a[s];if(c!==!0){if(c===!1){o.push(e.createError(`missing-dependency-error`,{pointer:n,schema:i,value:t}));return}if(V(c)){D(z(c,t,n,r),o);return}}}),o}let Z=`dependencies`,tn={id:Z,keyword:Z,parse:nn,order:-9,addReduce:e=>e.schema[Z]!=null,reduce:rn,addValidate:e=>e.schema[Z]!=null,validate:an};function nn(e){let{dependencies:t}=e.schema;if(!j(t))return e.createError(`schema-error`,{pointer:`${e.schemaLocation}/${Z}`,schema:e.schema,value:t,message:`Keyword '${Z}' must be an object - received ${typeof t}`});let n=[];for(let r of Object.keys(t)){let i=t[r];H(i)||U(i)?(e.dependentSchemas=e.dependentSchemas??{},e.dependentSchemas[r]=e.compileSchema(i,`${e.evaluationPath}/${Z}/${r}`,`${e.schemaLocation}/${Z}/${r}`),K(n,e.dependentSchemas[r])):Kt(i)?(e.dependentRequired=e.dependentRequired??{},e.dependentRequired[r]=i):n.push(e.createError(`schema-error`,{pointer:`${e.schemaLocation}/${Z}`,schema:e.schema,value:t,message:`Keyword '${Z}[string]' must be JSON Schema or string[]`}))}return n}function rn({node:e,data:t,key:n,pointer:r,path:i}){if(!j(t)||e.dependentRequired==null&&e.dependentSchemas==null)return e;let a=e.compileSchema(e.schema,e.evaluationPath,e.schemaLocation),o=a.schema.required??[],s=``,c=e.dependentRequired;c&&Object.keys(c).forEach(e=>{if(!ze(t,e)&&!o.includes(e)||c[e]==null)return;o.push(...c[e]);let n=`${Z}/${e}`;s+=`${s===``?``:`,`}${n}`});let l=e.dependentSchemas;return l&&Object.keys(l).forEach(c=>{if(!ze(t,c)&&!o.includes(c))return!0;let u=l[c];if(!V(u))return!0;Array.isArray(u.schema.required)&&o.push(...u.schema.required);let d={...u,schema:{...u.schema,required:o}}.reduceNode(t,{key:n,pointer:`${r}/${Z}/${c}`,path:i}).node;a=R(a,d);let f=d.dynamicId?.replace(e.dynamicId,``)??``,p=f===``?`${Z}/${c}`:f;s+=`${s===``?``:`,`}${p}`}),a===e?e:o.length===0?a:(o=a.schema.required?a.schema.required.concat(...o):o,o=o.filter((e,t,n)=>n.indexOf(e)===t),a=R(a,a,Z),a.compileSchema({...a.schema,required:o},a.evaluationPath,a.schemaLocation,`${e.schemaLocation}(${s})`))}function an({node:e,data:t,pointer:n,path:r}){if(!j(t))return;let i=[];return e.dependentRequired&&D(Yt({node:e,data:t,pointer:n,path:r}),i),e.dependentSchemas&&D(en({node:e,data:t,pointer:n,path:r}),i),i}let on=`deprecated`,sn={id:on,keyword:on,parse:cn,addValidate:e=>e[on]===!0,validate:ln};function cn(e){let t=e.schema[on];if(t!=null){if(typeof t!=`boolean`)return e.createError(`schema-error`,{pointer:`${e.schemaLocation}/${on}`,schema:e.schema,value:t,message:`Keyword '${on}' must be a boolean - received '${typeof t}'`});e[on]=t}}function ln({node:e,data:t,pointer:n}){return[e.createAnnotation(`deprecated-warning`,{pointer:n,schema:e.schema,value:t},e.schema.deprecatedMessage)]}let un=`enum`,dn={id:un,keyword:un,parse:fn,addValidate:e=>e.enum!=null,validate:pn};function fn(e){let{schema:t}=e;if(t[un]!=null){if(!Array.isArray(t[un]))return e.createError(`schema-error`,{pointer:`${e.schemaLocation}/${un}`,schema:t,value:t[un],message:`Keyword '${un}' must be an array - received '${typeof t[un]}'`});e.enum=t[un]}}function pn({node:e,data:t,pointer:n=`#`}){if(e.enum==null)return;let r=A(t);if(r===`object`||r===`array`){let n=JSON.stringify(t);for(let t of e.enum)if(JSON.stringify(t)===n)return}else if(e.enum.includes(t))return;return e.createError(`enum-error`,{pointer:n,schema:e.schema,value:t,values:e.enum})}let mn={"additional-items-error":"Array at `{{pointer}}` may not have an additional item `{{key}}`","additional-properties-error":"Additional property `{{property}}` on `{{pointer}}` does not match schema `{{schema}}`","all-of-error":"Value `{{value}}` at `{{pointer}}` does not match schema of `{{allOf}}`","any-of-error":"Value `{{value}}` at `{{pointer}}` does not match any schema of `{{anyOf}}`","const-error":"Expected value at `{{pointer}}` to be `{{expected}}`, but value given is `{{value}}`","contains-any-error":"The array at `{{pointer}}` must contain at least one item","contains-array-error":"The property at `{{pointer}}` must not be an array","contains-error":"The array at `{{pointer}}` must contain an element that matches `{{schema}}`","contains-min-error":"The array at `{{pointer}}` contains {{delta}} too few items matching `{{schema}}`","contains-max-error":"The array at `{{pointer}}` contains {{delta}} too many items matching `{{schema}}`","enum-error":"Expected given value `{{value}}` in `{{pointer}}` to be one of `{{values}}`","exclusive-maximum-error":"Value in `{{pointer}}` is `{{length}}`, but should be at most `{{maximum}}`","exclusive-minimum-error":"Value in `{{pointer}}` is `{{length}}`, but should be at minimum `{{minimum}}`","forbidden-property-error":"Property name `{{property}}` at `{{pointer}}` is not allowed","format-date-error":"Value `{{value}}` at `{{pointer}}` is not a valid date","format-date-time-error":"Value `{{value}}` at `{{pointer}}` is not a valid date-time","format-duration-error":"Value `{{value}}` at `{{pointer}}` is not a valid duration","format-email-error":"Value `{{value}}` at `{{pointer}}` is not a valid email","format-hostname-error":"Value `{{value}}` at `{{pointer}}` is not a valid hostname","format-idn-hostname-error":"Value `{{value}}` at `{{pointer}}` is not a valid idn hostname","format-ipv4-error":"Value `{{value}}` at `{{pointer}}` is not a valid IPv4 address","format-ipv4-leading-zero-error":`IPv4 addresses starting with zero are invalid, since they are interpreted as octals`,"format-ipv6-error":"Value `{{value}}` at `{{pointer}}` is not a valid IPv6 address","format-ipv6-leading-zero-error":`IPv6 addresses starting with zero are invalid, since they are interpreted as octals`,"format-iri-error":"Value `{{value}}` at `{{pointer}}` is not a valid iri","format-iri-reference-error":"Value `{{value}}` at `{{pointer}}` is not a valid iri-reference","format-json-pointer-error":"Value `{{value}}` at `{{pointer}}` is not a valid json-pointer","format-regex-error":"Value `{{value}}` at `{{pointer}}` is not a valid regular expression","format-time-error":"Value `{{value}}` at `{{pointer}}` is not a valid time","format-uri-error":"Value `{{value}}` at `{{pointer}}` is not a valid uri","format-uri-reference-error":"Value `{{value}}` at `{{pointer}}` is not a valid uri-reference","format-uri-template-error":"Value `{{value}}` at `{{pointer}}` is not a valid uri-template","format-url-error":"Value `{{value}}` at `{{pointer}}` is not a valid url","format-uuid-error":"Value `{{value}}` at `{{pointer}}` is not a valid uuid","invalid-data-error":"No value may be specified in `{{pointer}}`","invalid-property-name-error":"Invalid property name `{{property}}` at `{{pointer}}`","maximum-error":"Value in `{{pointer}}` is `{{length}}`, but should be `{{maximum}}` at maximum","max-items-error":"Too many items in `{{pointer}}`, should be `{{maximum}}` at most, but got `{{length}}`","max-length-error":"Value `{{pointer}}` should have a maximum length of `{{maxLength}}`, but got `{{length}}`.","max-properties-error":"Too many properties in `{{pointer}}`, should be `{{maxProperties}}` at most, but got `{{length}}`","minimum-error":"Value in `{{pointer}}` is `{{length}}`, but should be `{{minimum}}` at minimum","min-items-error":"Too few items in `{{pointer}}`, should be at least `{{minItems}}`, but got `{{length}}`","min-items-one-error":"At least one item is required in `{{pointer}}`","min-length-error":"Value `{{pointer}}` should have a minimum length of `{{minLength}}`, but got `{{length}}`.","min-length-one-error":"A value is required in `{{pointer}}`","missing-one-of-declarator-error":"Missing oneOf declarator `{{declarator}}` in schema `{{schemaLocation}}`","min-properties-error":"Too few properties in `{{pointer}}`, should be at least `{{minProperties}}`, but got `{{length}}`","missing-array-item-error":`Array at '{{pointer}}' has a missing item at '{{key}}'`,"missing-dependency-error":"The required propery '{{missingProperty}}' in `{{pointer}}` is missing","missing-one-of-property-error":"Value at `{{pointer}}` must be object or array and have a property ${oneOfProperty}: ${value}","multiple-of-error":"Expected `{{value}}` in `{{pointer}}` to be multiple of `{{multipleOf}}`","multiple-one-of-error":"Value `{{value}}` should not match multiple schemas in oneOf `{{matches}}`","no-additional-properties-error":"Additional property `{{property}}` in `{{pointer}}` is not allowed","not-error":"Value `{{value}}` at pointer should not match schema `{{not}}`","one-of-error":"Value `{{value}}` in `{{pointer}}` does not match any given oneof schema","one-of-property-error":"Failed finding a matching oneOfProperty schema in `{{pointer}}` where `{{property}}` matches `{{value}}`","pattern-error":"Value in `{{pointer}}` should match `{{description}}`, but received `{{received}}`","pattern-properties-error":"Property `{{key}}` does not match any patterns in `{{pointer}}`. Valid patterns are: {{patterns}}","ref-error":`Could not resolve $ref '{{ref}}' from '{{pointer}}'`,"required-property-error":"The required property `{{key}}` is missing at `{{pointer}}`","schema-warning":`Failed retrieving a schema from '{{pointer}}' to key '{{key}}'`,"type-error":"Expected `{{value}}` ({{received}}) in `{{pointer}}` to be of type `{{expected}}`","undefined-value-error":"Value must not be undefined in `{{pointer}}`","unevaluated-property-error":"Invalid unevaluated property `{{pointer}}`","unevaluated-items-error":"Invalid unevaluated item `{{pointer}}`","unique-items-error":"Items in array must be unique. Value `{{value}}` in `{{pointer}}` is a duplicate of {{duplicatePointer}}.","unknown-property-error":"Could not find a valid schema for property `{{pointer}}` within object","value-not-empty-error":"A value for `{{property}}` is required at `{{pointer}}`","deprecated-warning":"Value at `{{pointer}}` is deprecated","schema-error":`Invalid schema found at {{pointer}}: {{message}}`,"unknown-keyword-warning":`Keyword '{{value}}' is not a valid keyword to draft '{{draft}}'`,"unknown-format-warning":`Format {{value}} is not a valid format`},hn={id:`exclusiveMaximum`,keyword:`exclusiveMaximum`,parse:gn,addValidate:({schema:e})=>e.exclusiveMaximum===!0||!isNaN(e.maximum),validate:_n};function gn(e){let{exclusiveMaximum:t}=e.schema;if(t!=null&&!(typeof t==`number`||typeof t==`boolean`))return e.createError(`schema-error`,{pointer:e.evaluationPath,schema:e.schema,value:void 0,message:`Keyword 'exclusiveMaximum' must be a number - received '${typeof t}'`})}function _n({node:e,data:t,pointer:n}){if(typeof t==`number`&&e.schema.exclusiveMaximum&&e.schema.maximum===t)return e.createError(`maximum-error`,{maximum:e.schema.exclusiveMaximum,length:t,pointer:n,schema:e.schema,value:t})}let vn={id:`exclusiveMinimum`,keyword:`exclusiveMinimum`,parse:yn,addValidate:({schema:e})=>e.exclusiveMinimum===!0||!isNaN(e.minimum),validate:bn};function yn(e){let{exclusiveMinimum:t}=e.schema;if(t!=null&&!(typeof t==`number`||typeof t==`boolean`))return e.createError(`schema-error`,{pointer:e.evaluationPath,schema:e.schema,value:void 0,message:`Keyword 'exclusiveMinimum' must be a number - received '${typeof t}'`})}function bn({node:e,data:t,pointer:n}){if(typeof t==`number`&&e.schema.exclusiveMinimum&&e.schema.minimum===t)return e.createError(`minimum-error`,{minimum:e.schema.exclusiveMinimum,length:t,pointer:n,schema:e.schema,value:t})}let xn=`format`,Sn={id:xn,keyword:xn,parse:Cn,addValidate:({schema:e})=>e?.format!=null,validate:wn};function Cn(e){let t=e.schema[xn];if(t!=null){if(typeof t!=`string`)return e.createError(`schema-error`,{pointer:`${e.schemaLocation}/${xn}`,schema:e.schema,value:t,message:`Keyword '${xn}' must be a string - received '${typeof t}'`});if(e.context.formats[t]==null)return e.createAnnotation(`unknown-format-warning`,{pointer:`${e.schemaLocation}/${xn}`,schema:e.schema,value:t,message:`Keyword '${xn}' must be a string - received '${typeof t}'`})}}function wn(e){let{node:t}=e,n=t.context.formats[t.schema.format];return n?.(e)}var Tn=s(((e,t)=>{(function(e){"use strict";e.exports.is_uri=n,e.exports.is_http_uri=r,e.exports.is_https_uri=i,e.exports.is_web_uri=a,e.exports.isUri=n,e.exports.isHttpUri=r,e.exports.isHttpsUri=i,e.exports.isWebUri=a;var t=function(e){return e.match(/(?:([^:\/?#]+):)?(?:\/\/([^\/?#]*))?([^?#]*)(?:\?([^#]*))?(?:#(.*))?/)};function n(e){if(e&&!/[^a-z0-9\:\/\?\#\[\]\@\!\$\&\'\(\)\*\+\,\;\=\.\-\_\~\%]/i.test(e)&&!/%[^0-9a-f]/i.test(e)&&!/%[0-9a-f](:?[^0-9a-f]|$)/i.test(e)){var n=[],r=``,i=``,a=``,o=``,s=``,c=``;if(n=t(e),r=n[1],i=n[2],a=n[3],o=n[4],s=n[5],r&&r.length&&a.length>=0){if(i&&i.length){if(!(a.length===0||/^\//.test(a)))return}else if(/^\/\//.test(a))return;if(/^[a-z][a-z0-9\+\-\.]*$/.test(r.toLowerCase()))return c+=r+`:`,i&&i.length&&(c+=`//`+i),c+=a,o&&o.length&&(c+=`?`+o),s&&s.length&&(c+=`#`+s),c}}}function r(e,r){if(n(e)){var i=[],a=``,o=``,s=``,c=``,l=``,u=``,d=``;if(i=t(e),a=i[1],o=i[2],s=i[3],l=i[4],u=i[5],a){if(r){if(a.toLowerCase()!=`https`)return}else if(a.toLowerCase()!=`http`)return;if(o)return/:(\d+)$/.test(o)&&(c=o.match(/:(\d+)$/)[0],o=o.replace(/:\d+$/,``)),d+=a+`:`,d+=`//`+o,c&&(d+=c),d+=s,l&&l.length&&(d+=`?`+l),u&&u.length&&(d+=`#`+u),d}}}function i(e){return r(e,!0)}function a(e){return r(e)||i(e)}})(t)}))();let{REGEX_FLAGS:En}=O,Dn=/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,On=/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,kn=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,An=/^(?<time>(?:([0-1]\d|2[0-3]):[0-5]\d:(?<second>[0-5]\d|60)))(?:\.\d+)?(?<offset>(?:z|[+-]([0-1]\d|2[0-3])(?::?[0-5]\d)?))$/i,jn=[0,31,28,31,30,31,30,31,31,30,31,30,31],Mn=/^(?:\/(?:[^~/]|~0|~1)*)*$/,Nn=/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,Pn=/^P(?!$)(\d+Y)?(\d+M)?(\d+W)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?$/,Fn={date:({node:e,pointer:t,data:n})=>{let{schema:r}=e;if(typeof n!=`string`||n===``)return;let i=n.match(kn);if(!i)return e.createError(`format-date-error`,{value:n,pointer:t,schema:r});let a=+i[1],o=+i[2],s=+i[3],c=a%4==0&&(a%100!=0||a%400==0);if(!(o>=1&&o<=12&&s>=1&&s<=(o==2&&c?29:jn[o])))return e.createError(`format-date-error`,{value:n,pointer:t,schema:r})},"date-time":({node:e,pointer:t,data:n,path:r})=>{let{schema:i}=e;if(typeof n!=`string`||n===``)return;let a=n.split(/t/i);if(a.length===2){let n=Fn.date({node:e,pointer:t,data:a[0],path:r})===void 0,i=Fn.time({node:e,pointer:t,data:a[1],path:r})===void 0;if(n&&i)return}return e.createError(`format-date-time-error`,{value:n,pointer:t,schema:i})},duration:({node:e,pointer:t,data:n})=>{if(A(n)===`string`&&(!Pn.test(n)||/(\d+M)(\d+W)|(\d+Y)(\d+W)/.test(n)))return e.createError(`format-duration-error`,{value:n,pointer:t,schema:e.schema})},email:({node:e,pointer:t,data:n})=>{let{schema:r}=e;if(typeof n!=`string`||n===``)return;let i=n.lastIndexOf(`@`),a=n.substr(0,i),o=n.substr(i+1);if(!a||!o||a.length>64||o.length>253)return e.createError(`format-email-error`,{value:n,pointer:t,schema:r});let s=a;if(/^".*"$/.test(a)&&(s=a.replace(/(^")|([. @]+)|("$)/g,``)),s[0]===`.`||s.endsWith(`.`)||s.includes(`..`)||!/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+$/i.test(s))return e.createError(`format-email-error`,{value:n,pointer:t,schema:r});if(/^\[.*\]$/.test(o)){let e=o.substr(1,o.length-2);if(Dn.test(e)||On.test(e)||/IPv6:::[0-9a-f]{1,4}/.test(e))return}if(!/^[a-z0-9.-]+$/i.test(o)||!o.split(`.`).every(e=>/^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$/i.test(e)))return e.createError(`format-email-error`,{value:n,pointer:t,schema:r})},"json-pointer":({node:e,pointer:t,data:n})=>{let{schema:r}=e;if(!(typeof n!=`string`||n===``)&&!Mn.test(n))return e.createError(`format-json-pointer-error`,{value:n,pointer:t,schema:r})},"relative-json-pointer":({node:e,pointer:t,data:n})=>{let{schema:r}=e;if(typeof n==`string`&&!Nn.test(n))return e.createError(`format-json-pointer-error`,{value:n,pointer:t,schema:r})},regex:({node:e,pointer:t,data:n})=>{let{schema:r}=e;if(!(typeof n==`object`||typeof n==`number`||Array.isArray(n)||A(n)===`boolean`)){if(typeof n==`string`&&/\\Z$/.test(n)===!1){try{new RegExp(n,r.regexFlags??En);return}catch{}return e.createError(`format-regex-error`,{value:n,pointer:t,schema:r})}return e.createError(`format-regex-error`,{value:n,pointer:t,schema:r})}},time:({node:e,pointer:t,data:n})=>{let{schema:r}=e;if(typeof n!=`string`||n===``)return;let i=n.match(An);if(!i)return e.createError(`format-date-time-error`,{value:n,pointer:t,schema:r});if(i.groups?.second===`60`){if(/23:59:60(z|\+00:00)/i.test(n))return;let a=i.groups.time.match(/(\d+):(\d+):/),o=i.groups.offset.match(/(\d+):(\d+)/);if(a&&o){let e=parseInt(a[1]),t=parseInt(o[1]),n=parseInt(a[2]),r=parseInt(o[2]),s;s=/^-/.test(i.groups.offset)?(e+t)*60+(n+r):(24+e-t)*60+(n-r);let c=Math.floor(s/60),l=c%24,u=s-c*60;if(l===23&&u===59)return}return e.createError(`format-date-time-error`,{value:n,pointer:t,schema:r})}},url:({node:e,data:t,pointer:n})=>{let{schema:r}=e;if(!(t===``||(0,Tn.isWebUri)(`${t}`)))return e.createError(`format-url-error`,{value:t,pointer:n,schema:r})},uuid:({node:e,data:t,pointer:n})=>{let{schema:r}=e;if(!(typeof t!=`string`||t===``)&&!/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(t))return e.createError(`format-uuid-error`,{value:t,pointer:n,schema:r})}};function In(e,t){if(e.oneOf)return e.oneOf.map(e=>e.resolveRef());if(e.items?.oneOf)return e.items.oneOf.map(e=>e.resolveRef());if(e.prefixItems&&e.prefixItems.length>+t){let{node:n,error:r}=e.getNodeChild(t);return n?[n]:r}if(e.schema.additionalItems){if(e.schema.additionalItems===!0)return[e.compileSchema({type:`string`})];if(e.items)return[e.items.resolveRef()]}if(e.prefixItems&&e.prefixItems.length<=+t)return[];let{node:n,error:r}=e.getNodeChild(t);return n?[n]:r}let Ln=[`string`,`number`,`integer`,`boolean`,`null`,`array`,`object`],Rn=[`additionalProperties`,`dependencies`,`dependentSchemas`,`dependentRequired`,`maxProperties`,`minProperties`,`patternProperties`,`properties`,`propertyNames`,`required`,`unevaluatedProperties`],zn=[`contains`,`items`,`maxItems`,`minItems`,`unevaluatedItems`,`uniqueItems`];function Bn(e,t){let n=A(t),r=e.schema;if(r===!0)return n===`bigint`?`number`:Ln.some(e=>e===n)?n:void 0;if(!j(r))return;let i=r.type;if(Array.isArray(i)){if(i.includes(n))return n;let e=A(r.default);return i.includes(e)?e:i[0]}if(i)return i;if(Array.isArray(r.enum)){let e=r.enum.map(e=>A(e)).filter((e,t,n)=>n.indexOf(e)===t);if(e.includes(n))return n;let t=A(r.default);return e.includes(t)?t:e[0]}let a=Object.keys(e.schema),o=a.filter(e=>Rn.includes(e)),s=a.filter(e=>zn.includes(e));if(o.length>0&&o.length>s.length)return`object`;if(s.length>0&&s.length>o.length)return`array`;if(e.if)return Bn(e.if.resolveRef()??e.if,t);if(e.allOf)for(let n of e.allOf){let e=Bn(n.resolveRef()??n,t);if(e)return e}if(e.oneOf)for(let n of e.oneOf){let e=Bn(n.resolveRef()??n,t);if(e)return e}if(e.anyOf)for(let n of e.anyOf){let e=Bn(n.resolveRef()??n,t);if(e)return e}if(r.$ref){let n=e.resolveRef();if(n)return Bn(n,t)}}function Vn(e){switch(A(e)){case`string`:case`array`:return e?.length===0;case`null`:case`undefined`:return!0;case`object`:return Object.keys(e).length===0;default:return!1}}let Q=`oneOf`,{DECLARATOR_ONEOF:Hn}=O,Un={id:Q,keyword:Q,parse:Gn,addReduce:e=>e[Q]!=null,reduce:Kn,addValidate:e=>e[Q]!=null,validate:Zn},Wn={id:`oneOf-fuzzy`,keyword:`oneOf`,parse:Gn,addReduce:e=>e.oneOf!=null,reduce:Yn,addValidate:e=>e.oneOf!=null,validate:Zn};function Gn(e){let{schema:t,evaluationPath:n,schemaLocation:r}=e;if(t[Q]!=null){if(!Array.isArray(t[Q]))return e.createError(`schema-error`,{pointer:r,schema:t,value:t[Q],message:`Keyword '${Q}' must be an array - received '${typeof t[Q]}'`});if(t[Q].length!==0)return e[Q]=t[Q].map((t,i)=>e.compileSchema(t,`${n}/${Q}/${i}`,`${r}/${Q}/${i}`)),K([],...e[Q])}}function Kn({node:e,data:t,pointer:n,path:r}){if(e.oneOf==null)return;if(t!=null&&e.schema[Hn])return qn({node:e,data:t,pointer:n,path:r});let i=[],a=[];for(let o=0;o<e.oneOf.length;o+=1){let s=z(e.oneOf[o],t,n,r);s.length===0?i.push({index:o,node:e.oneOf[o]}):a.push(...s)}if(i.length===1){let{node:e,index:a}=i[0],{node:o,error:s}=e.reduceNode(t,{pointer:n,path:r});if(o){let t=o.dynamicId?.replace(e.dynamicId,``)??``,n=t===``?`oneOf/${a}`:t;return o.oneOfIndex=a,o.dynamicId=qe(o.dynamicId,`+${e.schemaLocation}(${n})`),o}return s}return i.length,e.createError(`one-of-error`,{value:JSON.stringify(t),pointer:n,schema:e.schema,oneOf:e.schema.oneOf,errors:a})}function qn({node:e,data:t,pointer:n,path:r}){if(e.oneOf==null)return;let i=e.schema[Hn],a=B(t,i);if(t===void 0||a===void 0)return e.createError(`missing-one-of-property-error`,{oneOfProperty:i,pointer:n,schema:e.schema,value:t});let o=[];for(let s=0;s<e.oneOf.length;s+=1){let{node:c}=e.oneOf[s].getNodeChild(i,t);if(!V(c))return e.createError(`missing-one-of-declarator-error`,{declarator:Hn,oneOfProperty:i,schemaLocation:e.oneOf[s].schemaLocation,pointer:`${n}/oneOf/${s}`,schema:e.schema,value:t});let l=D(z(c,a,`${n}/${i}`,r));if(l.length>0)o.push(...l);else{let{node:i}=e.oneOf[s].reduceNode(t,{pointer:n,path:r});if(i)return i.oneOfIndex=s,i}}return e.createError(`one-of-property-error`,{property:i,value:t,pointer:n,schema:e.schema,errors:o})}function Jn(e,t,n,r){if(t==null||e.properties==null)return-1;let i=0,a=Object.keys(e.properties??{});for(let o of a)t[o]&&z(e.properties[o],t[o],n,r).length===0&&(i+=1);return i}function Yn({node:e,data:t,pointer:n,path:r}){if(e.oneOf==null)return e;let i=Kn({node:e,data:t,pointer:n,path:r});if(V(i))return i;if(j(t)){let i,a=-1,o=0;for(let s=0;s<e.oneOf.length;s+=1){let c=e.oneOf[s],l=Jn(c,t,n,r);o<l&&(o=l,i=c,a=s)}if(i===void 0)return e.createError(`one-of-error`,{value:JSON.stringify(t),pointer:n,schema:e.schema,oneOf:e.schema.oneOf});let{node:s,error:c}=i.reduceNode(t,{pointer:n,path:r});return s?(s.oneOfIndex=a,s):c}return i}function Xn({node:e,data:t,pointer:n=`#`,path:r}){let{oneOf:i,schema:a}=e;if(!i)return;let o=a[Hn],s=B(t,o),c=[],l=[];for(let e of i){let{node:t,error:a}=e.getNodeChild(o,s);if(t){let a=z(t,s,`${n}/${o}`,r);a.length>0?l.push(...a):c.push({index:i.indexOf(e),node:e})}else console.log(`jlib oneOf error: failed getting schema for '${o}' to resolve ${Hn} in ${n}/oneOf/${i.indexOf(e)}`,a)}if(c.length===1){let e=c[0];return e.node.oneOfIndex=e.index,z(e.node,t,n,r)}return c.length>1?e.createError(`multiple-one-of-error`,{value:t,pointer:n,schema:a,matches:c}):e.createError(`one-of-error`,{value:JSON.stringify(t),pointer:n,schema:a,oneOf:a.oneOf,errors:l})}function Zn({node:e,data:t,pointer:n=`#`,path:r}){let{oneOf:i,schema:a}=e;if(!i)return;if(a[Hn])return Xn({node:e,data:t,pointer:n,path:r});let o=[],s=[];for(let e=0;e<i.length;e+=1){let a=z(i[e],t,n,r);a.length>0?s.push(...a):o.push({index:e,node:i[e]})}if(o.length===1){let{node:e,index:t}=o[0];e.oneOfIndex=t;return}return o.length>1?e.createError(`multiple-one-of-error`,{value:t,pointer:n,schema:a,matches:o}):e.createError(`one-of-error`,{value:JSON.stringify(t),pointer:n,schema:a,oneOf:a.oneOf,errors:s})}let Qn=()=>!1;try{typeof File==`function`&&(Qn=e=>e instanceof File)}catch{}function $n(e,t){if(e.$ref==null)return;t.cache=t.cache??{};let{cache:n,recursionLimit:r=1}=t,i=e.schemaLocation;if(n[i]=n[i]??{},n[i][e.$ref]=n[i][e.$ref]??0,n[i][e.$ref]>=r&&t.disableRecursionLimit!==!0)return!1;t.disableRecursionLimit=!1,n[i][e.$ref]+=1;let a=e.resolveRef();if(a&&a!==e)return a}function er(e,t){return(t.cache?.[e.schemaLocation]?.[e.$ref]??-1)<(t.recursionLimit??1)}function tr(e,t){let n=A(t);if(e===void 0||t==null||n===e||n===`number`&&e===`integer`)return t;if(e===`string`)return JSON.stringify(t);if(n!==`string`)return t;try{let n=JSON.parse(t);if(A(n)===e)return n}catch{}return t}function nr(e,t,n){if(n?.cache==null)throw Error(`Missing options`);if(e.schema===!1||e.schema===!0||Qn(t))return t;if(e.schema?.const!==void 0)return e.schema?.const;let r=e,i=t;if(Array.isArray(e.schema.enum)&&e.schema.enum.length>0&&t===void 0)return e.schema.default??e.schema.enum[0];if(e.schema.default!==void 0&&i===void 0&&(i=e.schema.default),r.allOf?.length&&r.allOf.forEach(e=>{i=e.getData(i,n)??i}),r.anyOf&&r.anyOf?.length>0&&(i=r.anyOf[0].getData(i,n)??i),r.oneOf&&r.oneOf?.length>0)if(Vn(i))r=R(r,r.oneOf[0]);else{let e=Yn({node:r,data:i,path:[],pointer:`#`});if(W(e)){if(i!=null&&n.removeInvalidData!==!0)return i;r=r.oneOf[0],i=void 0}else r=R(r,e)}let a=$n(r,n);if(a===!1)return i;V(a)&&(i=a.getData(i,n)??i,r=a);let o=rr[Bn(r,i)]?.(r,i,n);return o===void 0?i:o}let rr={null:(e,t,n)=>ir(e,t,null,n.useTypeDefaults),string:(e,t,n)=>ir(e,t,``,n.useTypeDefaults),number:(e,t,n)=>ir(e,t,0,n.useTypeDefaults),integer:(e,t,n)=>ir(e,t,0,n.useTypeDefaults),boolean:(e,t,n)=>ir(e,t,!1,n.useTypeDefaults),object:(e,t,n)=>{let r=e.schema,i=r.default===void 0?{}:r.default,a={},o=n.extendDefaults===!1&&r.default!==void 0?[]:r.required??[],s=e.properties;s&&Object.keys(s).forEach(e=>{let r=s[e],c=o.includes(e),l=B(t,e),u=t===void 0||l===void 0?B(i,e):l;if(u!=null||c||n.addOptionalProps){let t=r.getData(u,n);(t!==void 0||n.useTypeDefaults!==!1)&&(a[e]=t)}});let c=e.dependentRequired;j(c)&&Object.keys(c).forEach(t=>{let r=c[t];B(a,t)!==void 0&&r.forEach(t=>{let{node:r}=e.getNodeChild(t,a);r&&(a[t]=r.getData(B(a,t),n))})});let l=e.dependentSchemas;if(l&&Object.keys(l).forEach(e=>{let r=l[e];if(a[e]!==void 0&&V(r)){let e=r.getData(t??a,n);Object.assign(a,e)}}),t)if(n.removeInvalidData===!0&&(r.additionalProperties===!1||j(r.additionalProperties))){let n=e.additionalProperties;V(n)&&Object.keys(t).forEach(e=>{if(a[e]==null){let r=B(t,e);n.validate(r).valid&&(a[e]=r)}})}else Object.keys(t).forEach(e=>a[e]==null&&(a[e]=B(t,e)));if(e.if){let{valid:t}=e.if.validate(a);if(t&&e.then){let t=e.then.getData(a,n);Object.assign(a,t)}else if(!t&&e.else){let t=e.else.getData(a,n);Object.assign(a,t)}}return{...i,...a}},array:(e,t,n)=>{let r=e.schema,i=r.default===void 0?[]:r.default,a=Array.isArray(t)?[...t]:i,o=n.extendDefaults===!1&&r.default!==void 0?0:r.minItems??0;if(r.items==null){if(e.items){let t=Math.max(o,a.length);for(let r=0;r<t;r+=1)a[r]=e.items.getData(a[r],n)}return a||[]}if(e.prefixItems){let r=Array.isArray(t)?t:[],s=Math.max(o??0,e.prefixItems.length);for(let t=0;t<s;t+=1){let o=e.prefixItems[t]??e.items;if(o&&er(o,n)||r[t]!==void 0){let e=o.getData(a[t]==null?i[t]:a[t],n);e!==void 0&&(a[t]=e)}}return a||[]}if(e.items==null)return a;if(e.items&&er(e.items,n)||Array.isArray(t)&&t?.length>0){let t={...n.cache};for(let r=0,s=Math.max(o,a.length);r<s;r+=1){n.cache=E(t);let o={...n,disableRecursionLimit:!0},s=e.items.getData(a[r]==null?i[r]:a[r],o);if(s===void 0)return a;a[r]=s}}return a}};function ir({schema:e},t,n,r){return t===void 0?e.const?e.const:e.default===void 0&&Array.isArray(e.enum)?e.enum[0]:e.default===void 0&&r!==!1?n:e.default:tr(e.type,t)}let ar=`items`,or={id:ar,keyword:ar,parse:cr,addResolve:e=>(e.prefixItems||e[ar])!=null,resolve:sr,addValidate:({schema:e})=>e.items!=null,validate:lr};function sr({node:e,key:t}){if(e.prefixItems?.[t])return e.prefixItems[t];if(e.items)return e.items}function cr(e){let{schema:t,evaluationPath:n}=e,r=t[ar];if(!(r==null||typeof r==`boolean`)){if(j(r)){e.items=e.compileSchema(r,`${n}/${ar}`,`${e.schemaLocation}/${ar}`);return}if(Array.isArray(r)){e.prefixItems=r.map((t,r)=>e.compileSchema(t,`${n}/${ar}/${r}`,`${e.schemaLocation}/${ar}/${r}`));return}return e.createError(`schema-error`,{pointer:n,schema:t,value:void 0,message:`Keyword '${ar}' must be an object or array - received '${typeof r}'`})}}function lr({node:e,data:t,pointer:n=`#`,path:r}){let{schema:i}=e;if(!Array.isArray(t)||t.length===0)return;if(i.items===!1)return Array.isArray(t)&&t.length===0?void 0:e.createError(`invalid-data-error`,{pointer:n,value:t,schema:i});let a=[];if(e.prefixItems){for(let i=0;i<Math.min(e.prefixItems.length,t.length);i+=1){let o=t[i],s=e.prefixItems[i],c=z(s,o,`${n}/${i}`,r);a.push(...c)}return a}if(e.items){for(let i=0;i<t.length;i+=1){let o=t[i],s=z(e.items,o,`${n}/${i}`,r);s&&a.push(...s)}return a}}let ur=`maximum`,dr={id:ur,keyword:ur,parse:fr,addValidate:e=>e.maximum!=null,validate:pr};function fr(e){let t=e.schema[ur];if(t!=null){if(!G(t))return e.createError(`schema-error`,{pointer:`${e.schemaLocation}/${ur}`,schema:e.schema,value:t,message:`Keyword '${ur}' must be a number - received '${typeof t}'`});e[ur]=t}}function pr({node:e,data:t,pointer:n}){if(!G(t))return;let r=e[ur],{schema:i}=e;if(r&&r<t)return e.createError(`maximum-error`,{maximum:r,length:t,value:t,pointer:n,schema:i});if(r&&i.exclusiveMaximum===!0&&r===t)return e.createError(`maximum-error`,{maximum:r,length:t,pointer:n,schema:i,value:t})}let mr=`maxItems`,hr={id:mr,keyword:mr,parse:gr,addValidate:({schema:e})=>!isNaN(e.maxItems),validate:_r};function gr(e){let t=e.schema[mr];if(t!=null){if(!G(t))return e.createError(`schema-error`,{pointer:`${e.schemaLocation}/${mr}`,schema:e.schema,value:t,message:`Keyword '${mr}' must be a number - received '${typeof t}'`});e[mr]=t}}function _r({node:e,data:t,pointer:n}){let{schema:r}=e;if(Array.isArray(t)&&r.maxItems<t.length)return e.createError(`max-items-error`,{maximum:r.maxItems,length:t.length,schema:r,value:t,pointer:n})}function vr(e){let t=[],n=0,r=e.length;for(;n<r;){let i=e.charCodeAt(n++);if(i>=55296&&i<=56319&&n<r){let r=e.charCodeAt(n++);(r&64512)==56320?t.push(((i&1023)<<10)+(r&1023)+65536):(t.push(i),n--)}else t.push(i)}return t}let yr=`maxLength`,br={id:yr,keyword:yr,parse:xr,addValidate:e=>e[yr]!=null,validate:Sr};function xr(e){let t=e.schema[yr];if(t!=null){if(!G(t))return e.createError(`schema-error`,{pointer:`${e.schemaLocation}/${yr}`,schema:e.schema,value:t,message:`Keyword '${yr}' must be a number - received '${typeof t}'`});e[yr]=t}}function Sr({node:e,data:t,pointer:n=`#`}){if(typeof t!=`string`)return;let r=e[yr],i=vr(t).length;if(r<i)return e.createError(`max-length-error`,{maxLength:r,length:i,pointer:n,schema:e.schema,value:t})}let Cr=`maxProperties`,wr={id:Cr,keyword:Cr,parse:Tr,addValidate:e=>e[Cr]!=null,validate:Er};function Tr(e){let t=e.schema[Cr];if(t!=null){if(!G(t))return e.createError(`schema-error`,{pointer:`${e.schemaLocation}/${Cr}`,schema:e.schema,value:t,message:`Keyword '${Cr}' must be a number - received '${typeof t}'`});e[Cr]=t}}function Er({node:e,data:t,pointer:n=`#`}){if(!j(t))return;let r=e[Cr],i=Object.keys(t).length;if(r<i)return e.createError(`max-properties-error`,{maxProperties:r,length:i,pointer:n,schema:e.schema,value:t})}let Dr=`minimum`,Or={id:Dr,keyword:Dr,parse:kr,addValidate:e=>e[Dr]!=null,validate:Ar};function kr(e){let t=e.schema[Dr];if(t!=null){if(!G(t))return e.createError(`schema-error`,{pointer:`${e.schemaLocation}/${Dr}`,schema:e.schema,value:t,message:`Keyword '${Dr}' must be a number - received '${typeof t}'`});e[Dr]=t}}function Ar({node:e,data:t,pointer:n}){if(!G(t))return;let r=e[Dr];if(r>t||e.schema.exclusiveMinimum===!0&&e.schema.minimum===t)return e.createError(`minimum-error`,{minimum:r,length:t,pointer:n,schema:e.schema,value:t})}let jr=`minItems`,Mr={id:jr,keyword:jr,parse:Nr,addValidate:e=>e[jr]!=null,validate:Pr};function Nr(e){let t=e.schema[jr];if(t!=null){if(!G(t))return e.createError(`schema-error`,{pointer:`${e.schemaLocation}/${jr}`,schema:e.schema,value:t,message:`Keyword '${jr}' must be a number - received '${typeof t}'`});e[jr]=t}}function Pr({node:e,data:t,pointer:n}){if(!Array.isArray(t))return;let r=e[jr];if(r>t.length)return e.createError(`min-items-error`,{minItems:r,length:t.length,pointer:n,schema:e.schema,value:t})}let Fr=`minLength`,Ir={id:Fr,keyword:Fr,parse:Lr,addValidate:e=>e[Fr]!=null,validate:Rr};function Lr(e){let t=e.schema[Fr];if(t!=null){if(!G(t))return e.createError(`schema-error`,{pointer:`${e.schemaLocation}/${Fr}`,schema:e.schema,value:t,message:`Keyword '${Fr}' must be a number - received '${typeof t}'`});e[Fr]=t}}function Rr({node:e,data:t,pointer:n=`#`}){if(typeof t!=`string`)return;let r=vr(t).length,i=e[Fr];if(!(i<=r))return e.createError(`min-length-error`,{minLength:i,length:r,pointer:n,schema:e.schema,value:t})}let zr=`minProperties`,Br={id:zr,keyword:zr,parse:Vr,addValidate:e=>e[zr]!=null,validate:Hr};function Vr(e){let t=e.schema[zr];if(t!=null){if(!G(t))return e.createError(`schema-error`,{pointer:`${e.schemaLocation}/${zr}`,schema:e.schema,value:t,message:`Keyword '${zr}' must be a number - received '${typeof t}'`});e[zr]=t}}function Hr({node:e,data:t,pointer:n=`#`}){if(!j(t))return;let r=Object.keys(t).length;if(e.schema.minProperties>r)return e.createError(`min-properties-error`,{minProperties:e.schema.minProperties,length:r,pointer:n,schema:e.schema,value:t})}function Ur(e){let t=`${e}`;if(t.includes(`e-`))return parseInt(t.replace(/.*e-/,``));let n=t.indexOf(`.`);return n===-1?0:t.length-(n+1)}let Wr=`multipleOf`,Gr={id:Wr,keyword:Wr,parse:Kr,addValidate:e=>e[Wr]!=null,validate:qr};function Kr(e){let t=e.schema[Wr];if(t!=null){if(!G(t))return e.createError(`schema-error`,{pointer:`${e.schemaLocation}/${Wr}`,schema:e.schema,value:t,message:`Keyword '${Wr}' must be a number - received '${typeof t}'`});e[Wr]=t}}function qr({node:e,data:t,pointer:n}){if(typeof t!=`number`)return;let r=e[Wr],i=Ur(t),a=Ur(r);if(i>a)return e.createError(`multiple-of-error`,{multipleOf:r,value:t,pointer:n,schema:e.schema});let o=10**a;if(Math.round(t*o)%Math.round(r*o)/o!==0)return e.createError(`multiple-of-error`,{multipleOf:r,value:t,pointer:n,schema:e.schema})}let Jr={id:`not`,keyword:`not`,parse:Yr,addValidate:e=>e.not!=null,validate:Xr};function Yr(e){let{schema:t,evaluationPath:n,schemaLocation:r}=e,i=t.not;if(i!=null)return!H(i)&&!U(i)?e.createError(`schema-error`,{pointer:`${r}/not`,schema:t,value:i,message:`Keyword 'not' must be a valid JSON Schema - received '${typeof i}'`}):(e.not=e.compileSchema(t.not,`${n}/not`,`${r}/not`),e.not.schemaValidation)}function Xr({node:e,data:t,pointer:n,path:r}){let{schema:i}=e;if(z(e.not,t,n,r).length===0)return e.createError(`not-error`,{value:t,not:i.not,pointer:n,schema:i})}let Zr=`pattern`,{REGEX_FLAGS:Qr}=O,$r={id:Zr,keyword:Zr,parse:ei,addValidate:e=>e[Zr]!=null,validate:ti};function ei(e){let t=e.schema[Zr];if(t!=null){if(typeof t!=`string`)return e.createError(`schema-error`,{pointer:e.schemaLocation,schema:e.schema,value:t,message:`Keyword 'pattern' must be a string - received '${typeof t}'`});try{e[Zr]=new RegExp(t,e.schema.regexFlags??Qr)}catch(n){return e.createError(`schema-error`,{pointer:e.schemaLocation,schema:e.schema,value:t,message:n.message})}}}function ti({node:e,data:t,pointer:n=`#`}){if(typeof t==`string`&&e.pattern.test(t)===!1){let{schema:r}=e;return e.createError(`pattern-error`,{pattern:r.pattern,description:r.patternExample||r.pattern,received:t,schema:r,value:t,pointer:n})}}let{REGEX_FLAGS:ni}=O,ri={id:`patternProperties`,keyword:`patternProperties`,parse:ii,addReduce:e=>e.patternProperties!=null,reduce:oi,addResolve:e=>e.patternProperties!=null,resolve:ai,addValidate:e=>e.patternProperties!=null,validate:si};function ii(e){let{schema:t}=e;if(!j(t.patternProperties))return;let n=Object.keys(t.patternProperties);if(n.length!==0)return e.patternProperties=n.map(n=>({name:n,pattern:new RegExp(n,t.regexFlags??ni),node:e.compileSchema(t.patternProperties[n],`${e.evaluationPath}/patternProperties/${n}`,`${e.schemaLocation}/patternProperties/${n}`)})),K([],...e.patternProperties.map(({node:e})=>e))}function ai({node:e,key:t}){return e.patternProperties?.find(({pattern:e})=>e.test(`${t}`))?.node}function oi({node:e,data:t,key:n}){let{patternProperties:r}=e;if(r==null)return;let i,a=Object.keys(t??{});n&&a.push(`${n}`);let o=`${e.schemaLocation}(`;return a.push(...Object.keys(e.schema.properties??{})),a.forEach((t,n,a)=>{if(a.indexOf(t)!==n)return;let s=e.schema.properties?.[t]??{},c=r.filter(e=>e.pattern.test(t));c.forEach(e=>s=I(s,e.node.schema)),c.length>0&&(i??={properties:{}},i.properties[t]=s,o+=`${c.map(({name:e})=>`patternProperties/${e}`).join(`,`)}`)}),i==null?e:(i=I(e.schema,i,`patternProperties`),e.compileSchema(i,e.evaluationPath,e.schemaLocation,`${o})`))}function si({node:e,data:t,pointer:n,path:r}){if(!j(t))return;let{schema:i,patternProperties:a}=e,o=i.properties||{},s=Object.keys(i.patternProperties).join(`,`),c=[];return Object.keys(t).forEach(l=>{let u=B(t,l),d=a.filter(e=>e.pattern.test(l));d.forEach(({node:e})=>c.push(...z(e,u,`${n}/${l}`,r))),!o[l]&&d.length===0&&i.additionalProperties===!1&&c.push(e.createError(`no-additional-properties-error`,{key:l,pointer:`${n}/${l}`,schema:i,value:u,patterns:s}))}),c}let ci={id:`property`,keyword:`properties`,parse:ui,addResolve:e=>e.properties!=null,resolve:li,addValidate:e=>e.properties!=null,validate:di};function li({node:e,key:t}){return e.properties?.[t]}function ui(e){let{schema:t,evaluationPath:n,schemaLocation:r}=e;if(t.properties==null)return;if(t.properties&&!j(t.properties))return e.createError(`schema-error`,{pointer:r,schema:t,value:void 0,message:"keyword `properties` must be of type `object`"});let i=[],a={};return Object.keys(t.properties).forEach(o=>{a[o]=e.compileSchema(t.properties[o],`${n}/properties/${o}`,`${r}/properties/${o}`),K(i,a[o])}),e.properties=a,i}function di({node:e,data:t,pointer:n,path:r}){if(!j(t))return;let i=[],a=e.properties??{};return Object.keys(t).forEach(e=>{let o=B(t,e),s=a[e];if(s==null||o===void 0)return;let c=z(s,o,`${n}/${e}`,r);i.push(...c)}),i}let fi=`propertyNames`,pi={id:fi,keyword:fi,parse:mi,addValidate:e=>e.schema[fi]!=null,validate:hi};function mi(e){let t=e.schema[fi];if(t!=null){if(!(H(t)||U(t)))return e.createError(`schema-error`,{pointer:`${e.schemaLocation}/${fi}`,schema:e.schema,value:t,message:`Keyword '${fi}' must be a valid JSON Schema - received '${typeof t}'`});if(!U(t))return e.propertyNames=e.compileSchema(t,`${e.evaluationPath}/propertyNames`,`${e.schemaLocation}/propertyNames`),e.propertyNames.schemaValidation}}function hi({node:e,data:t,pointer:n,path:r}){let{schema:i}=e;if(!j(t))return;if(i.propertyNames===!1)return Object.keys(t).length===0?void 0:e.createError(`invalid-property-name-error`,{property:Object.keys(t),pointer:n,value:t,schema:i});if(i[fi]===!0)return;let a=e[fi];if(!j(a))return;let o=[];return Object.keys(t).forEach(s=>{let c=z(a,s,`${n}/${s}`,r);c.length>0&&o.push(e.createError(`invalid-property-name-error`,{property:s,pointer:n,validationError:c[0],value:t[s],schema:i}))}),o}let gi=`required`,_i={id:gi,keyword:gi,parse:vi,addValidate:e=>e.required!=null,validate:yi};function vi(e){let t=e.schema[gi];if(t!=null){if(!Kt(t))return e.createError(`schema-error`,{pointer:`${e.schemaLocation}/${gi}`,schema:e.schema,value:t,message:`Keyword '${gi}' must be a string[]`});e.required=t}}function yi({node:e,data:t,pointer:n=`#`}){let{required:r}=e;if(j(t))return r.map(r=>{if(!ze(t,r))return e.createError(`required-property-error`,{key:r,pointer:n,schema:e.schema,value:t})})}function bi(e){return{...e,keywords:[...e.keywords.map(e=>({...e}))]}}function xi(e,t){let{keywords:n}=Si(e,...t.keywords??[]),r={...e.errors,...t.errors??{}},i={...e.formats,...t.formats??{}};return wi({...e,...t,formats:i,keywords:n,errors:r})}function Si(e,...t){let n=bi(e);return t.forEach(e=>Ci(n,e)),n}function Ci(e,t){let n=e.keywords.findIndex(e=>e.keyword===t.keyword);n===-1?e.keywords.push(t):e.keywords[n]=t}function wi(e){return e.keywords?.forEach(e=>{let t=()=>e.keyword;e.validate&&(e.validate.toJSON=t,e.validate.order=e.order??0),e.reduce&&(e.reduce.toJSON=t,e.reduce.order=e.order??0),e.resolve&&(e.resolve.toJSON=t,e.resolve.order=e.order??0)}),e.keywords?.sort((e,t)=>(t.order??0)-(e.order??0)),e}function Ti(e,t,n=`#`,r=[]){let i=e.resolveRef()??e;return r.push({node:i,value:t,pointer:n}),j(t)?Object.keys(t).forEach(e=>{let{node:a}=i.getNodeChild(e,t);a&&Ti(a,B(t,e),`${n}/${e}`,r)}):Array.isArray(t)&&t.forEach((e,a)=>{let{node:o}=i.getNodeChild(a,t);o&&Ti(o,B(t,a),`${n}/${a}`,r)}),r}let Ei=`type`,Di=[`null`,`boolean`,`number`,`integer`,`string`,`object`,`array`],Oi={id:Ei,keyword:Ei,parse:ki,addReduce:e=>Array.isArray(e.type),reduce:Ai,addValidate:e=>e.type!=null,validate:Mi};function ki(e){let t=e.schema[Ei];if(t!=null){if(typeof t!=`string`&&!Array.isArray(t))return e.createError(`schema-error`,{pointer:`${e.schemaLocation}/${Ei}`,schema:e.schema,value:t,message:`Keyword '${Ei}' must be a string or a string[] - received ${typeof t}`});if(typeof t==`string`&&!Di.includes(t))return e.createError(`schema-error`,{pointer:`${e.schemaLocation}/${Ei}`,schema:e.schema,value:t,message:`Keyword '${Ei}' is not a valid JSON Schema type - received '${t}'. Expected one of ${Di.join(`, `)}`});if(Array.isArray(t)){let n=t.findIndex(e=>!Di.includes(e));if(n!==-1)return e.createError(`schema-error`,{pointer:`${e.schemaLocation}/${Ei}/${n}`,schema:e.schema,value:t[n],message:`Keyword '${Ei}' contains an invalid JSON Schema type: '${t[n]}'`})}e[Ei]=t}}function Ai({node:e,pointer:t,data:n}){let r=ji(n,e.type);if(r!==`undefined`&&Array.isArray(e.schema.type)&&e.schema.type.includes(r))return e.compileSchema({...e.schema,pointer:t,type:r},e.evaluationPath)}function ji(e,t){let n=A(e);return n===`number`&&(t===`integer`||Array.isArray(t)&&t.includes(`integer`))?Number.isInteger(e)||isNaN(e)?`integer`:`number`:n}function Mi({node:e,data:t,pointer:n}){let r=e[Ei],i=ji(t,r);if(!(t===void 0||r===i||Array.isArray(r)&&r.includes(i)))return e.createError(`type-error`,{value:t,received:i,expected:r,schema:e.schema,pointer:n})}var Ni=l(s(((e,t)=>{t.exports=function e(t,n){if(t===n)return!0;if(t&&n&&typeof t==`object`&&typeof n==`object`){if(t.constructor!==n.constructor)return!1;var r,i,a;if(Array.isArray(t)){if(r=t.length,r!=n.length)return!1;for(i=r;i--!==0;)if(!e(t[i],n[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if(a=Object.keys(t),r=a.length,r!==Object.keys(n).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(n,a[i]))return!1;for(i=r;i--!==0;){var o=a[i];if(!e(t[o],n[o]))return!1}return!0}return t!==t&&n!==n}}))());let Pi=`uniqueItems`,Fi={id:Pi,keyword:Pi,parse:Ii,addValidate:({schema:e})=>e[Pi]===!0,validate:Li};function Ii(e){let t=e.schema[Pi];if(!(t==null||t===!1)){if(typeof t!=`boolean`)return e.createError(`schema-error`,{pointer:`${e.schemaLocation}/${Pi}`,schema:e.schema,value:t,message:`Keyword '${Pi}' must be a boolean - received ${typeof t}`});e.uniqueItems=!0}}function Li({node:e,data:t,pointer:n}){if(!Array.isArray(t))return;let{schema:r}=e,i=[],a=[];return t.forEach((o,s)=>{for(let c=s+1;c<t.length;c+=1)(0,Ni.default)(o,t[c])&&!i.includes(c)&&(a.push(e.createError(`unique-items-error`,{pointer:`${n}/${c}`,duplicatePointer:`${n}/${s}`,arrayPointer:n,value:JSON.stringify(o),schema:r})),i.push(c))}),a}let Ri=wi({version:`draft-04`,$schemaRegEx:`draft-?0?4`,$schema:`http://json-schema.org/draft-04/schema#`,errors:mn,formats:Fn,methods:{createSchema:M,getData:nr,getChildSelection:In,toDataNodes:Ti},keywords:[bt,Ft,zt,Ut,pt,tn,sn,dn,hn,vn,Sn,or,dr,hr,br,wr,Or,Mr,Ir,Br,Gr,Jr,ri,$r,ci,pi,_i,Oi,Fi,Un,Dt,jt]}),zi={id:`const`,keyword:`const`,addValidate:({schema:e})=>e.const!==void 0,validate:Bi};function Bi({node:e,data:t,pointer:n}){if(!(0,Ni.default)(t,e.schema.const))return[e.createError(`const-error`,{pointer:n,schema:e.schema,value:t,expected:e.schema.const})]}let Vi=`exclusiveMaximum`,Hi={id:Vi,keyword:Vi,parse:Ui,addValidate:({schema:e})=>e.exclusiveMaximum!=null&&!isNaN(parseInt(e.exclusiveMaximum)),validate:Wi};function Ui(e){let t=e.schema[Vi];if(t!=null&&typeof t!=`number`)return e.createError(`schema-error`,{pointer:`${e.schemaLocation}/${Vi}`,schema:e.schema,value:t,message:`Keyword '${Vi}' must be a number - received '${typeof t}'`})}function Wi({node:e,data:t,pointer:n}){if(typeof t==`number`&&e.schema.exclusiveMaximum<=t)return e.createError(`exclusive-maximum-error`,{maximum:e.schema.exclusiveMaximum,length:t,pointer:n,schema:e.schema,value:t})}let Gi=`exclusiveMinimum`,Ki={id:Gi,keyword:Gi,parse:qi,addValidate:({schema:e})=>e[Gi]!=null&&!isNaN(parseInt(e[Gi])),validate:Ji};function qi(e){let t=e.schema[Gi];if(t!=null&&typeof t!=`number`)return e.createError(`schema-error`,{pointer:`${e.schemaLocation}/${Gi}`,schema:e.schema,value:t,message:`Keyword '${Gi}' must be a number - received '${typeof t}'`})}function Ji({node:e,data:t,pointer:n}){if(typeof t==`number`&&e.schema.exclusiveMinimum>=t)return e.createError(`exclusive-minimum-error`,{minimum:e.schema.exclusiveMinimum,length:t,pointer:n,schema:e.schema,value:t})}let Yi=wi({version:`draft-06`,$schemaRegEx:`draft-?0?6`,$schema:`http://json-schema.org/draft-06/schema#`,errors:mn,formats:Fn,methods:{createSchema:M,getData:nr,getChildSelection:In,toDataNodes:Ti},keywords:[gt,Ft,zt,zi,Ut,pt,tn,sn,dn,Hi,Ki,Sn,or,dr,hr,br,wr,Or,Mr,Ir,Br,Gr,Jr,ri,$r,ci,pi,_i,Oi,Fi,Un,Dt,jt]}),Xi={id:`if-then-else`,keyword:`if`,parse:Zi,addReduce:e=>e.if!=null&&(e.then!=null||e.else!=null),reduce:Qi,addValidate:e=>e.if!=null,validate:$i};function Zi(e){let{schema:t,evaluationPath:n}=e,r=[];return t.if!=null&&(H(t.if)||U(t.if)?(e.if=e.compileSchema(t.if,`${n}/if`),K(r,e.if)):r.push(e.createError(`schema-error`,{pointer:`${e.schemaLocation}/if`,schema:e.schema,value:t.if,message:`Keyword 'if' must be valid JSON Schema - received '${typeof t.if}'`}))),t.then!=null&&(H(t.then)||U(t.then)?(e.then=e.compileSchema(t.then,`${n}/then`),K(r,e.then)):r.push(e.createError(`schema-error`,{pointer:`${e.schemaLocation}/then`,schema:e.schema,value:t.then,message:`Keyword 'then' must be valid JSON Schema - received '${typeof t.then}'`}))),t.else!=null&&(H(t.else)||U(t.else)?(e.else=e.compileSchema(t.else,`${n}/else`),K(r,e.else)):r.push(e.createError(`schema-error`,{pointer:`${e.schemaLocation}/else`,schema:e.schema,value:t.else,message:`Keyword 'else' must be valid JSON Schema - received '${typeof t.else}'`}))),r}function Qi({node:e,data:t,pointer:n,path:r}){if(!(t===void 0||e.if==null)){if(z(e.if,t,n,[...r??[]]).length===0){if(e.then){let{node:n}=e.then.reduceNode(t);if(n){let t=n.dynamicId?.replace(e.dynamicId,``).replace(/^#/,``)??``,r=t===``?`(then)`:t,i=I(e.then.schema,n.schema,`if`,`then`,`else`);return e.compileSchema(i,e.then.evaluationPath,e.schemaLocation,`${e.schemaLocation}${r}`)}}}else if(e.else){let{node:n}=e.else.reduceNode(t);if(n){let t=n.dynamicId?.replace(e.dynamicId,``)??``,r=t===``?`(else)`:t,i=I(e.else.schema,n.schema,`if`,`then`,`else`);return e.compileSchema(i,e.else.evaluationPath,e.schemaLocation,`${e.schemaLocation}${r}`)}}}}function $i({node:e,data:t,pointer:n,path:r}){if(e.if!=null){if(z(e.if,t,n,[...r??[]]).length===0){if(e.then)return z(e.then,t,n,r)}else if(e.else)return z(e.else,t,n,r)}}let ea=wi({version:`draft-07`,$schemaRegEx:`draft-?0?7`,$schema:`http://json-schema.org/draft-07/schema#`,errors:mn,formats:Fn,methods:{createSchema:M,getData:nr,getChildSelection:In,toDataNodes:Ti},keywords:[gt,Ft,zt,zi,Ut,pt,tn,sn,dn,Hi,Ki,Sn,Xi,or,dr,hr,br,wr,Or,Mr,Ir,Br,Gr,Jr,ri,$r,ci,pi,_i,Oi,Fi,Un,Dt,jt]}),ta={id:`$ref`,keyword:`$ref`,parse:ra,addValidate:({schema:e})=>e.$ref!=null||e.$recursiveRef!=null,validate:aa,addReduce:({schema:e})=>e.$ref!=null||e.$recursiveRef!=null,reduce:st};function na(e,t){e.context.refs[t]??(e.context.refs[t]=e)}function ra(e){e.resolveRef=ia;let t=F(e.parent?.$id,e.schema?.$id);e.$id=t,e.lastIdPointer=e.parent?.lastIdPointer??`#`,t!==e.parent?.$id&&e.evaluationPath!==`#`&&(e.lastIdPointer=e.evaluationPath),e.lastIdPointer!==`#`&&e.evaluationPath.startsWith(e.lastIdPointer)&&na(e,F(t,`#${e.evaluationPath.replace(e.lastIdPointer,``)}`)),na(e,F(e.context.rootNode.$id,e.evaluationPath)),e.schema.$anchor&&(e.context.anchors[`${t.replace(/#$/,``)}#${e.schema.$anchor}`]=e),e.schema.$ref&&(e.$ref=F(t,e.schema.$ref),e.$ref.startsWith(`/`)&&(e.$ref=`#${e.$ref}`))}function ia({pointer:e,path:t}={}){if(this.schema.$recursiveRef){let n=oa(this,t??[]);return V(n)&&t?.push({pointer:e,node:n}),n}if(this.$ref==null)return this;let n=sa(this);return V(n)&&t?.push({pointer:e,node:n}),n}function aa({node:e,data:t,pointer:n=`#`,path:r}){let i=e.resolveRef({pointer:n,path:r});return i==null?e.createError(`ref-error`,{ref:e.schema.$ref??e.schema.$recursiveRef,pointer:n,schema:e.schema,value:t}):z(i,t,n,r)}function oa(e,t){let n=t,r=0;for(let t=n.length-1;t>=0;t--){if(n[t].node.schema.$recursiveAnchor===!1)return sa(e,F(e.$id,e.schema.$recursiveRef));if(/^https?:\/\//.test(n[t].node.schema.$id??``)&&n[t].node.schema.$recursiveAnchor!==!0){r=t;break}}let i=n.find((e,t)=>t>=r&&e.node.schema.$recursiveAnchor===!0);return i?i.node:sa(e,F(e.$id,e.schema.$recursiveRef))}function sa(e,t=e?.$ref){if(t==null)return e;if(e.context.refs[t])return dt(e.context.refs[t],e);if(e.context.anchors[t])return dt(e.context.anchors[t],e);let n=rt(t);if(n.length===0)return e.createError(`ref-error`,{ref:t,pointer:e.evaluationPath,schema:e.schema,value:void 0});if(n.length===1){let t=n[0];if(e.context.remotes[t])return dt(e.context.remotes[t],e);if(t[0]===`#`){let n=t.match(/#[^#]*$/)?.pop(),r=e.context.rootNode.schema,i=be(r,n);if(i)return e.compileSchema(i,`${e.evaluationPath}/$ref`,n)}return e.createError(`ref-error`,{ref:t,pointer:e.evaluationPath,schema:e.schema,value:void 0})}if(n.length===2){let r=n[0];if(e.context.remotes[r]&&e!==e.context.remotes[r]){let i=e.context.remotes[r],a=sa(i,t);if(a||(a=sa(i,n[1]),a))return a}if(e.context.refs[r]){let i=e.context.refs[r],a=ye(n[1]),o=i;for(let r of a)if(o=o[r===`definitions`?`$defs`:r],o==null)return e.createError(`ref-error`,{ref:t,pointer:e.evaluationPath,schema:e.schema,value:void 0,host:n[0],local:n[1]});return o}}return e.createError(`ref-error`,{ref:t,pointer:e.evaluationPath,schema:e.schema,value:void 0})}let ca=`unevaluatedItems`,la={id:ca,keyword:ca,parse:ua,addValidate:({schema:e})=>e[ca]!=null,validate:da};function ua(e){let{unevaluatedItems:t}=e.schema;if(!(t==null||typeof t==`boolean`)){if(!j(t))return e.createError(`schema-error`,{pointer:e.evaluationPath,schema:e.schema,value:void 0,message:`Keyword '${ca}' must be an object - received '${typeof t}'`});e.unevaluatedItems=e.compileSchema(e.schema.unevaluatedItems,`${e.evaluationPath}/${ca}`,`${e.schemaLocation}/${ca}`)}}function da({node:e,data:t,pointer:n,path:r}){let{schema:i}=e;if(!Array.isArray(t)||t.length===0||i.unevaluatedItems==null||i.unevaluatedItems===!0)return;let{node:a}=e.reduceNode(t,{pointer:n,path:r});if(a??=e,a.schema.unevaluatedItems===!0||a.schema.additionalItems===!0)return;let o=e.if!=null&&z(e.if,t,n,r).length===0,s=[];for(let a=0;a<t.length;a+=1){let c=t[a],{node:l}=e.getNodeChild(a,t,{path:r});if(l&&z(l,c,`${n}/${a}`,r).length>0){let o=e.unevaluatedItems;if(o&&t.forEach(e=>{let t=z(o,e,`${n}/${a}`,r);if(t!=null){if(Array.isArray(t))return s.push(...t);s.push(t)}}),e.schema.unevaluatedItems===!1)return e.createError(`unevaluated-items-error`,{pointer:`${n}/${a}`,value:JSON.stringify(c),schema:i})}if(l===void 0&&!(o&&e.if.prefixItems&&e.if.prefixItems.length>a))if(e.unevaluatedItems){let t=z(e.unevaluatedItems,c,`${n}/${a}`,r);t.length>0&&s.push(...t)}else s.push(e.createError(`unevaluated-items-error`,{pointer:`${n}/${a}`,value:JSON.stringify(c),schema:i}))}return s}function fa({node:e,data:t,key:n,pointer:r,path:i}){if(Array.isArray(e.schema.required)&&!e.schema.required.find(e=>ze(t,e)))return!1;if(e.schema.unevaluatedProperties===!0||e.schema.additionalProperties===!0||e.properties?.[n]&&e.properties[n].validate(t[n],r,i).valid||e.patternProperties&&e.patternProperties.find(e=>e.pattern.test(n)))return!0;if(e.allOf){for(let a of e.allOf)if(fa({node:a,data:t,key:n,pointer:r,path:i}))return!0}if(e.anyOf){for(let a of e.anyOf)if(fa({node:a,data:t,key:n,pointer:r,path:i}))return!0}if(e.oneOf){for(let a of e.oneOf)if(fa({node:a,data:t,key:n,pointer:r,path:i}))return!0}if(e.if){if(fa({node:e.if,data:t,key:n,pointer:r,path:i}))return!0;let a=z(e.if,t,r,i).length===0;if(a&&e.then){if(fa({node:e.then,data:t,key:n,pointer:r,path:i}))return!0}else if(!a&&e.else&&fa({node:e.else,data:t,key:n,pointer:r,path:i}))return!0}let a=e.resolveRef({pointer:r,path:i});return!!(a!==e&&fa({node:a,data:t,key:n,pointer:r,path:i}))}let pa=`unevaluatedProperties`,ma={id:pa,keyword:pa,parse:ha,addValidate:({schema:e})=>e[pa]!=null,validate:ga};function ha(e){let t=e.schema[pa];if(t!=null){if(!(H(t)||U(t)))return e.createError(`schema-error`,{pointer:`${e.schemaLocation}/${pa}`,schema:e.schema,value:t,message:`Keyword '${pa}' must be a valid JSON Schema - received '${typeof t}'`});if(!U(t))return e.unevaluatedProperties=e.compileSchema(e.schema.unevaluatedProperties,`${e.evaluationPath}/${pa}`,`${e.schemaLocation}/${pa}`),e.unevaluatedProperties.schemaValidation}}function ga({node:e,data:t,pointer:n,path:r}){if(!j(t))return;let i=Object.keys(t).filter(e=>t[e]!==void 0);if(i.length===0)return;let a=[];for(let o of i){if(fa({node:e,data:t,key:o,pointer:n,path:r}))continue;let{node:i}=e.getNodeChild(o,t,{pointer:n,path:r});if(i===void 0)if(e.unevaluatedProperties){let i=z(e.unevaluatedProperties,t[o],`${n}/${o}`,r);a.push(...i)}else e.schema.unevaluatedProperties===!1&&a.push(e.createError(`unevaluated-property-error`,{pointer:`${n}/${o}`,value:JSON.stringify(t[o]),schema:e.schema}));if(i&&z(i,t[o],`${n}/${o}`,r).length>0)if(e.unevaluatedProperties){let i=z(e.unevaluatedProperties,t[o],`${n}/${o}`,r);a.push(...i)}else e.schema.unevaluatedProperties===!1&&a.push(e.createError(`unevaluated-property-error`,{pointer:`${n}/${o}`,value:JSON.stringify(t[o]),schema:e.schema}))}return a}let _a=wi({version:`draft-2019-09`,$schemaRegEx:`draft[/-]2019-?(09)?`,$schema:`https://json-schema.org/draft/2019-09/schema`,errors:mn,formats:Fn,methods:{createSchema:M,getData:nr,getChildSelection:In,toDataNodes:Ti},keywords:[ta,Ft,zt,zi,Ut,pt,tn,qt,Zt,sn,dn,Hi,Ki,Sn,Xi,or,dr,hr,br,wr,Or,Mr,Ir,Br,Gr,Jr,ri,$r,ci,pi,_i,Oi,la,ma,Fi,Un,Dt,jt]});function va(e,t){if(e.oneOf)return e.oneOf.map(e=>e.resolveRef());if(e.items?.oneOf)return e.items.oneOf.map(e=>e.resolveRef());if(e.prefixItems&&e.prefixItems.length>+t){let{node:n,error:r}=e.getNodeChild(t);return V(n)?[n]:r}if(e.schema.items===!0)return[e.compileSchema({type:`string`})];if(e.schema.items===!1)return[];if(e.items)return[e.items.resolveRef()];if(e.prefixItems&&e.prefixItems.length<=+t)return[];let{node:n,error:r}=e.getNodeChild(t);return r??[n]}function ya(e,t){if(e.$ref==null)return;t.cache=t.cache??{};let{cache:n,recursionLimit:r=1}=t,i=e.schemaLocation;if(n[i]=n[i]??{},n[i][e.$ref]=n[i][e.$ref]??0,n[i][e.$ref]>=r&&t.disableRecursionLimit!==!0)return!1;t.disableRecursionLimit=!1,n[i][e.$ref]+=1;let a=e.resolveRef();if(a&&a!==e)return a}function ba(e,t){return(t.cache?.[e.schemaLocation]?.[e.$ref]??-1)<(t.recursionLimit??1)}function xa(e,t){let n=A(t);if(e===void 0||t==null||n===e||n===`number`&&e===`integer`)return t;if(e===`string`)return JSON.stringify(t);if(n!==`string`)return t;try{let n=JSON.parse(t);if(A(n)===e)return n}catch{}return t}function Sa(e,t,n){if(n?.cache==null)throw Error(`Missing options`);if(e.schema===!1||e.schema===!0||Qn(t))return t;if(e.schema?.const!==void 0)return e.schema?.const;let r=e,i=t;if(Array.isArray(e.schema.enum)&&e.schema.enum.length>0&&t===void 0)return e.schema.default??e.schema.enum[0];if(e.schema.default!==void 0&&i===void 0&&(i=e.schema.default),r.allOf?.length&&r.allOf.forEach(e=>{i=e.getData(i,n)??i}),r.anyOf&&r.anyOf?.length>0&&(i=r.anyOf[0].getData(i,n)??i),r.oneOf&&r.oneOf?.length>0)if(Vn(i))r=R(r,r.oneOf[0]);else{let e=Yn({node:r,data:i,path:[],pointer:`#`});if(W(e)){if(i!=null&&n.removeInvalidData!==!0)return i;r=r.oneOf[0],i=void 0}else r=R(r,e)}let a=ya(r,n);if(a===!1)return i;V(a)&&(i=a.getData(i,n)??i,r=a);let o=Ca[Bn(r,i)]?.(r,i,n);return o===void 0?i:o}let Ca={null:(e,t,n)=>wa(e,t,null,n.useTypeDefaults),string:(e,t,n)=>wa(e,t,``,n.useTypeDefaults),number:(e,t,n)=>wa(e,t,0,n.useTypeDefaults),integer:(e,t,n)=>wa(e,t,0,n.useTypeDefaults),boolean:(e,t,n)=>wa(e,t,!1,n.useTypeDefaults),object:(e,t,n)=>{let r=e.schema,i=r.default===void 0?{}:r.default,a={},o=n.extendDefaults===!1&&r.default!==void 0?[]:r.required??[],s=e.properties;s&&Object.keys(s).forEach(e=>{let r=s[e],c=o.includes(e),l=B(t,e),u=t===void 0||l===void 0?B(i,e):l;if(u!=null||c||n.addOptionalProps){let t=r.getData(u,n);(t!==void 0||n.useTypeDefaults!==!1)&&(a[e]=t)}});let c=e.dependentRequired;j(c)&&Object.keys(c).forEach(t=>{let r=c[t];B(a,t)!==void 0&&r.forEach(t=>{let{node:r}=e.getNodeChild(t,a);r&&(a[t]=r.getData(B(a,t),n))})});let l=e.dependentSchemas;if(l&&Object.keys(l).forEach(e=>{let r=l[e];if(a[e]!==void 0&&V(r)){let e=r.getData(t??a,n);Object.assign(a,e)}}),t&&(n.removeInvalidData===!0&&(r.additionalProperties===!1||j(r.additionalProperties))?V(e.additionalProperties)&&Object.keys(t).forEach(n=>{if(a[n]==null){let r=B(t,n);e.additionalProperties?.validate(r).valid&&(a[n]=r)}}):Object.keys(t).forEach(e=>a[e]==null&&(a[e]=B(t,e)))),e.if){let{errors:t}=e.if.validate(a);if(t.length===0&&e.then){let t=e.then.getData(a,n);Object.assign(a,t)}else if(t.length>0&&e.else){let t=e.else.getData(a,n);Object.assign(a,t)}}return{...i,...a}},array:(e,t,n)=>{let r=e.schema,i=r.default===void 0?[]:r.default,a=Array.isArray(t)?[...t]:i,o=n.extendDefaults===!1&&r.default!==void 0?0:r.minItems??0;if(r.prefixItems==null){if(e.items&&(ba(e.items,n)||a?.length>0)){let t={...n.cache},r=Math.max(o,a.length);for(let o=0;o<r;o+=1){n.cache=E(t);let r={...n,disableRecursionLimit:!0};a[o]=e.items.getData(a[o]==null?i[o]:a[o],r)}}return a||[]}if(e.prefixItems){let r=Array.isArray(t)?t:[],s=Math.max(o??0,e.prefixItems.length);for(let t=0;t<s;t+=1){let o=e.prefixItems[t]??e.items;if(o&&ba(o,n)||r[t]!==void 0){let e=o.getData(a[t]==null?i[t]:a[t],n);e!==void 0&&(a[t]=e)}}return a||[]}if(e.items==null)return a;if(e.items&&ba(e.items,n)||t?.length>0){let t={...n.cache};for(let r=0,s=Math.max(o,a.length);r<s;r+=1){n.cache=E(t);let o={...n,disableRecursionLimit:!0},s=e.items.getData(a[r]==null?i[r]:a[r],o);if(s===void 0)return a;a[r]=s}}return a}};function wa({schema:e},t,n,r){return t===void 0?e.const?e.const:e.default===void 0&&Array.isArray(e.enum)?e.enum[0]:e.default===void 0&&r!==!1?n:e.default:xa(e.type,t)}let Ta=`items`,Ea={id:Ta,keyword:Ta,parse:Oa,addResolve:e=>e[Ta]!=null,resolve:Da,addValidate:e=>e[Ta]!=null,validate:ka};function Da({node:e,key:t}){if(!(e.prefixItems&&e.prefixItems?.length>+t))return e.items}function Oa(e){let t=e.schema[Ta];if(t!=null){if(!(H(t)||U(t)))return e.createError(`schema-error`,{pointer:`${e.schemaLocation}/${Ta}`,schema:e.schema,value:t,message:`Keyword '${Ta}' must be a valid JSON Schema - received '${typeof t}'`});if(t!==!0)return e[Ta]=e.compileSchema(t,`${e.evaluationPath}/${Ta}`,`${e.schemaLocation}/${Ta}`),e[Ta].schemaValidation}}function ka({node:e,data:t,pointer:n=`#`,path:r}){let{schema:i}=e;if(!Array.isArray(t)||t.length===0||Array.isArray(i.prefixItems)&&i.prefixItems.length>=t.length)return;if(i.items===!1)return Array.isArray(t)&&t.length===0?void 0:e.createError(`invalid-data-error`,{pointer:n,value:t,schema:i});let a=[];if(e.items){for(let o=i.prefixItems?.length??0;o<t.length;o+=1){let i=t[o],s=z(e.items,i,`${n}/${o}`,r);s&&a.push(...s)}return a}}let Aa=`prefixItems`,ja={id:Aa,keyword:Aa,parse:Na,addResolve:e=>e[Aa]!=null,resolve:Ma,addValidate:e=>e[Aa]!=null,validate:Pa};function Ma({node:e,key:t}){if(e.prefixItems&&e.prefixItems[t])return e.prefixItems[t]}function Na(e){let{schema:t,evaluationPath:n}=e;if(Array.isArray(t.prefixItems))return e.prefixItems=t.prefixItems.map((t,r)=>e.compileSchema(t,`${n}/${Aa}/${r}`,`${e.schemaLocation}/${Aa}/${r}`)),K([],...e.prefixItems)}function Pa({node:e,data:t,pointer:n=`#`,path:r}){if(!Array.isArray(t)||t.length===0)return;let i=[],a=e[Aa];if(a){for(let e=0;e<Math.min(a.length,t.length);e+=1){let o=t[e],s=a[e],c=z(s,o,`${n}/${e}`,r);i.push(...c)}return i}}function Fa({node:e,data:t,key:n,pointer:r,path:i}){let a=B(t,n);if(e.schema.unevaluatedItems===!0||e.schema.items===!0||e.contains&&z(e.contains,a,`${r}/${n}`,i).length===0)return!0;if(e.allOf){for(let a of e.allOf)if(Fa({node:a,data:t,key:n,pointer:r,path:i}))return!0}if(e.anyOf){for(let a of e.anyOf)if(Fa({node:a,data:t,key:n,pointer:r,path:i}))return!0}if(e.oneOf){for(let a of e.oneOf)if(Fa({node:a,data:t,key:n,pointer:r,path:i}))return!0}if(e.if){if(Fa({node:e.if,data:t,key:n,pointer:r,path:i}))return!0;let a=z(e.if,t,r,i).length===0;if(a&&e.if.prefixItems&&e.if.prefixItems.length>n)return!0;if(a&&e.then){if(Fa({node:e.then,data:t,key:n,pointer:r,path:i}))return!0}else if(!a&&e.else&&Fa({node:e.else,data:t,key:n,pointer:r,path:i}))return!0}}let Ia=`unevaluatedItems`,La={id:Ia,keyword:Ia,parse:Ra,addValidate:({schema:e})=>e.unevaluatedItems!=null,validate:za};function Ra(e){let t=e.schema[Ia];if(t!=null){if(!(H(t)||U(t)))return e.createError(`schema-error`,{pointer:`${e.schemaLocation}/${Ia}`,schema:e.schema,value:t,message:`Keyword '${Ia}' must be a valid JSON Schema - received '${typeof t}'`});if(!U(t))return e.unevaluatedItems=e.compileSchema(e.schema.unevaluatedItems,`${e.evaluationPath}/${Ia}`,`${e.schemaLocation}/${Ia}`),e.unevaluatedItems.schemaValidation}}function za({node:e,data:t,pointer:n,path:r}){let{schema:i}=e;if(!Array.isArray(t)||t.length===0||i.unevaluatedItems==null||i.unevaluatedItems===!0)return;let a=[];for(let o=0;o<t.length;o+=1){if(Fa({node:e,data:t,pointer:n,key:o,path:r}))continue;let s=t[o],{node:c}=e.getNodeChild(o,t,{path:r});if(c===void 0)if(e.unevaluatedItems){let t=z(e.unevaluatedItems,s,`${n}/${o}`,r);t.length>0&&a.push(...t)}else a.push(e.createError(`unevaluated-items-error`,{pointer:`${n}/${o}`,value:JSON.stringify(s),schema:i}));if(c&&z(c,s,`${n}/${o}`,r).length>0&&(e.unevaluatedItems&&e.unevaluatedItems.validate(s,`${n}/${o}`,r).valid===!1||e.schema.unevaluatedItems===!1))return e.createError(`unevaluated-items-error`,{pointer:`${n}/${o}`,value:JSON.stringify(s),schema:i})}return a}let Ba=wi({version:`draft-2020-12`,$schemaRegEx:`draft[/-]2020-?(12)?`,$schema:`https://json-schema.org/draft/2020-12/schema`,errors:mn,formats:Fn,methods:{createSchema:M,getData:Sa,getChildSelection:va,toDataNodes:Ti},keywords:[it,jt,Ft,zt,zi,Ut,pt,tn,qt,Zt,sn,dn,Hi,Ki,Sn,Xi,Ea,dr,hr,br,wr,Or,Mr,Ir,Br,Gr,Jr,Un,$r,ri,ja,ci,pi,_i,Oi,La,ma,Fi]}),{REGEX_FLAGS:Va}=O,Ha=[Ri,Yi,ea,_a,Ba];function Ua(e,t){return e.find(e=>new RegExp(e.$schemaRegEx,Va).test(t))??e[e.length-1]}function Wa(e,t={}){let n=t.formatAssertion??!0,r=t.drafts??Ha,i=Ua(r,H(e)?t.draft??e.$schema:void 0),a={evaluationPath:`#`,lastIdPointer:`#`,schemaLocation:`#`,dynamicId:``,reducers:[],resolvers:[],validators:[],schema:e,context:{remotes:{},dynamicAnchors:{},...t.remote?.context??{},anchors:{},refs:{},...E(Ie(i,`methods`,`keywords`,`version`,`formats`,`errors`)),draft:t.draft,getDataDefaultOptions:t.getDataDefaultOptions,throwOnInvalidRef:t.throwOnInvalidRef??!1,drafts:r},...Je};if(a.context.rootNode=a,a.context.remotes[(H(e)?e.$id:void 0)??`#`]=a,t.remote){let e=ft(a,a.schema.$schema);if(V(e)&&e.schema.$vocabulary){let t=Object.keys(e.schema.$vocabulary).find(e=>e.includes(`vocab/format-assertion`));t&&n===`meta-schema`&&(n=e.schema.$vocabulary[t]===!0);let r=Object.keys(e.getData({},{addOptionalProps:!0}));r.length>0&&(a.context.keywords=a.context.keywords.filter(e=>r.includes(e.keyword)))}}if(n===!1&&(a.context.keywords=a.context.keywords.filter(e=>e.keyword!==`format`)),!H(e)&&!U(e))return a.schemaErrors=[a.createError(`schema-error`,{pointer:`#`,schema:e,value:void 0,message:`JSON schema must be object or boolean - reveived: '${e}'`})],a;let o=Ze(a).filter(e=>e!=null);o=D(o);let s=[],c=[];if(o.forEach(e=>{W(e)?s.push(e):et(e)&&c.push(e)}),t.throwOnInvalidSchema&&s.length>0){let e=Error(`Invalid schema passed to compileSchema`);throw e.data=s,e}return a.schemaErrors=s,a.schemaAnnotations=c,a}let Ga=xi(Ba,{$schemaRegEx:`.`,keywords:[Wn],errors:{"min-length-error":e=>e.minLength===1?{type:`error`,code:`min-length-one-error`,message:`An input is required`,data:e}:{type:`error`,code:`min-length-error`,message:Le("Value in `{{pointer}}` is `{{length}}`, but should be `{{minLength}}` at minimum",e),data:e}}}),$=`propertyDependencies`;function Ka(e,t){let n=e[$];if(n==null)return;let r=Object.keys(n),i=[];for(let e of r)if(ze(t,e)){let r=t[e];n[e][r]&&i.push({property:e,value:`${r}`,node:n[e][r]})}return i}let qa={id:$,keyword:$,parse:Ja,addValidate:e=>e[$]!=null,validate:Ya,addReduce:e=>e[$]!=null,reduce:Xa};function Ja(e){let t=e.schema[$];if(!j(t))return e.createError(`schema-error`,{pointer:`${e.schemaLocation}/${$}`,schema:e.schema,value:t,message:`Keyword '${$}' must be an object - received '${typeof t}'`});let n={},r=[];return Object.keys(t).map(i=>{let a=t[i];if(!j(a)){r.push(e.createError(`schema-error`,{pointer:`${e.schemaLocation}/${$}/${i}`,schema:e.schema,value:t,message:`Keyword '${$}[string]' must be an object - received '${typeof t}'`}));return}Object.keys(a).forEach(t=>{let o=a[t];if(!(H(o)||U(o))){r.push(e.createError(`schema-error`,{pointer:`${e.schemaLocation}/${$}/${i}/${t}`,schema:e.schema,value:o,message:`Keyword '${$}[string][string]' must be a valid JSON Schema - received '${typeof o}'`}));return}n[i]=n[i]??{},n[i][t]=e.compileSchema(o,`${e.evaluationPath}/${$}/${i}/${t}`,`${e.schemaLocation}/${$}/${i}/${t}`),K(r,n[i][t])})}),e[$]=n,r}function Ya({node:e,data:t,pointer:n=`#`,path:r}){if(!j(t))return;let i=Ka(e,t);if(i==null||i.length===0)return;let a=[];for(let e of i){let i=z(e.node,t,n,r);a.push(i)}return D(a)}function Xa({node:e,data:t,key:n,pointer:r,path:i}){if(!j(t))return;let a=Ka(e,t);if(a==null||a.length===0)return;let o={},s=``;for(let c of a){let{node:a}=c.node.reduceNode(t,{key:n,pointer:r,path:i});if(a){let t=a.dynamicId?.replace(e.dynamicId,``)??``,n=t===``?`propertyDependencies/${c.property}/${c.value}`:t;s+=`${s===``?``:`,`}${n}`;let r=I(c.node.schema,a.schema);o=I(o,r,`propertyDependencies`)}}return e.compileSchema(o,`${e.evaluationPath}/${s}`,e.schemaLocation,`${e.schemaLocation}(${s})`)}return e.addKeywords=Si,e.compileSchema=Wa,e.draft04=Ri,e.draft06=Yi,e.draft07=ea,e.draft2019=_a,e.draft2020=Ba,e.draftEditor=Ga,e.extendDraft=xi,e.getSchemaType=Bn,e.getTypeOf=A,e.isAnnotation=$e,e.isBooleanSchema=U,e.isJsonAnnotation=et,e.isJsonError=W,e.isJsonSchema=H,e.isReduceable=Ge,e.isSchemaNode=V,e.mergeNode=R,e.mergeSchema=I,e.oneOfFuzzyKeyword=Wn,e.oneOfKeyword=Un,e.propertyDependenciesKeyword=qa,e.render=Le,e.sanitizeErrors=D,e.settings=O,e})({});
|