UNPKG

next

Version:

The React Framework

1 lines • 220 kB
(()=>{var e={6474:(e,r,t)=>{"use strict";var a=t(9258),s=t(2603),i=t(7731),o=t(2961),n=t(6424),l=t(2015),c=t(9233),u=t(1966),d=t(8716);e.exports=Ajv;Ajv.prototype.validate=validate;Ajv.prototype.compile=compile;Ajv.prototype.addSchema=addSchema;Ajv.prototype.addMetaSchema=addMetaSchema;Ajv.prototype.validateSchema=validateSchema;Ajv.prototype.getSchema=getSchema;Ajv.prototype.removeSchema=removeSchema;Ajv.prototype.addFormat=addFormat;Ajv.prototype.errorsText=errorsText;Ajv.prototype._addSchema=_addSchema;Ajv.prototype._compile=_compile;Ajv.prototype.compileAsync=t(2694);var f=t(6765);Ajv.prototype.addKeyword=f.add;Ajv.prototype.getKeyword=f.get;Ajv.prototype.removeKeyword=f.remove;Ajv.prototype.validateKeyword=f.validate;var p=t(6343);Ajv.ValidationError=p.Validation;Ajv.MissingRefError=p.MissingRef;Ajv.$dataMetaSchema=u;var h="http://json-schema.org/draft-07/schema";var m=["removeAdditional","useDefaults","coerceTypes","strictDefaults"];var v=["/properties"];function Ajv(e){if(!(this instanceof Ajv))return new Ajv(e);e=this._opts=d.copy(e)||{};setLogger(this);this._schemas={};this._refs={};this._fragments={};this._formats=l(e.format);this._cache=e.cache||new i;this._loadingSchemas={};this._compilations=[];this.RULES=c();this._getId=chooseGetId(e);e.loopRequired=e.loopRequired||Infinity;if(e.errorDataPath=="property")e._errorDataPathProperty=true;if(e.serialize===undefined)e.serialize=n;this._metaOpts=getMetaSchemaOptions(this);if(e.formats)addInitialFormats(this);if(e.keywords)addInitialKeywords(this);addDefaultMetaSchema(this);if(typeof e.meta=="object")this.addMetaSchema(e.meta);if(e.nullable)this.addKeyword("nullable",{metaSchema:{type:"boolean"}});addInitialSchemas(this)}function validate(e,r){var t;if(typeof e=="string"){t=this.getSchema(e);if(!t)throw new Error('no schema with key or ref "'+e+'"')}else{var a=this._addSchema(e);t=a.validate||this._compile(a)}var s=t(r);if(t.$async!==true)this.errors=t.errors;return s}function compile(e,r){var t=this._addSchema(e,undefined,r);return t.validate||this._compile(t)}function addSchema(e,r,t,a){if(Array.isArray(e)){for(var i=0;i<e.length;i++)this.addSchema(e[i],undefined,t,a);return this}var o=this._getId(e);if(o!==undefined&&typeof o!="string")throw new Error("schema id must be string");r=s.normalizeId(r||o);checkUnique(this,r);this._schemas[r]=this._addSchema(e,t,a,true);return this}function addMetaSchema(e,r,t){this.addSchema(e,r,t,true);return this}function validateSchema(e,r){var t=e.$schema;if(t!==undefined&&typeof t!="string")throw new Error("$schema must be a string");t=t||this._opts.defaultMeta||defaultMeta(this);if(!t){this.logger.warn("meta-schema not available");this.errors=null;return true}var a=this.validate(t,e);if(!a&&r){var s="schema is invalid: "+this.errorsText();if(this._opts.validateSchema=="log")this.logger.error(s);else throw new Error(s)}return a}function defaultMeta(e){var r=e._opts.meta;e._opts.defaultMeta=typeof r=="object"?e._getId(r)||r:e.getSchema(h)?h:undefined;return e._opts.defaultMeta}function getSchema(e){var r=_getSchemaObj(this,e);switch(typeof r){case"object":return r.validate||this._compile(r);case"string":return this.getSchema(r);case"undefined":return _getSchemaFragment(this,e)}}function _getSchemaFragment(e,r){var t=s.schema.call(e,{schema:{}},r);if(t){var i=t.schema,n=t.root,l=t.baseId;var c=a.call(e,i,n,undefined,l);e._fragments[r]=new o({ref:r,fragment:true,schema:i,root:n,baseId:l,validate:c});return c}}function _getSchemaObj(e,r){r=s.normalizeId(r);return e._schemas[r]||e._refs[r]||e._fragments[r]}function removeSchema(e){if(e instanceof RegExp){_removeAllSchemas(this,this._schemas,e);_removeAllSchemas(this,this._refs,e);return this}switch(typeof e){case"undefined":_removeAllSchemas(this,this._schemas);_removeAllSchemas(this,this._refs);this._cache.clear();return this;case"string":var r=_getSchemaObj(this,e);if(r)this._cache.del(r.cacheKey);delete this._schemas[e];delete this._refs[e];return this;case"object":var t=this._opts.serialize;var a=t?t(e):e;this._cache.del(a);var i=this._getId(e);if(i){i=s.normalizeId(i);delete this._schemas[i];delete this._refs[i]}}return this}function _removeAllSchemas(e,r,t){for(var a in r){var s=r[a];if(!s.meta&&(!t||t.test(a))){e._cache.del(s.cacheKey);delete r[a]}}}function _addSchema(e,r,t,a){if(typeof e!="object"&&typeof e!="boolean")throw new Error("schema should be object or boolean");var i=this._opts.serialize;var n=i?i(e):e;var l=this._cache.get(n);if(l)return l;a=a||this._opts.addUsedSchema!==false;var c=s.normalizeId(this._getId(e));if(c&&a)checkUnique(this,c);var u=this._opts.validateSchema!==false&&!r;var d;if(u&&!(d=c&&c==s.normalizeId(e.$schema)))this.validateSchema(e,true);var f=s.ids.call(this,e);var p=new o({id:c,schema:e,localRefs:f,cacheKey:n,meta:t});if(c[0]!="#"&&a)this._refs[c]=p;this._cache.put(n,p);if(u&&d)this.validateSchema(e,true);return p}function _compile(e,r){if(e.compiling){e.validate=callValidate;callValidate.schema=e.schema;callValidate.errors=null;callValidate.root=r?r:callValidate;if(e.schema.$async===true)callValidate.$async=true;return callValidate}e.compiling=true;var t;if(e.meta){t=this._opts;this._opts=this._metaOpts}var s;try{s=a.call(this,e.schema,r,e.localRefs)}catch(r){delete e.validate;throw r}finally{e.compiling=false;if(e.meta)this._opts=t}e.validate=s;e.refs=s.refs;e.refVal=s.refVal;e.root=s.root;return s;function callValidate(){var r=e.validate;var t=r.apply(this,arguments);callValidate.errors=r.errors;return t}}function chooseGetId(e){switch(e.schemaId){case"auto":return _get$IdOrId;case"id":return _getId;default:return _get$Id}}function _getId(e){if(e.$id)this.logger.warn("schema $id ignored",e.$id);return e.id}function _get$Id(e){if(e.id)this.logger.warn("schema id ignored",e.id);return e.$id}function _get$IdOrId(e){if(e.$id&&e.id&&e.$id!=e.id)throw new Error("schema $id is different from id");return e.$id||e.id}function errorsText(e,r){e=e||this.errors;if(!e)return"No errors";r=r||{};var t=r.separator===undefined?", ":r.separator;var a=r.dataVar===undefined?"data":r.dataVar;var s="";for(var i=0;i<e.length;i++){var o=e[i];if(o)s+=a+o.dataPath+" "+o.message+t}return s.slice(0,-t.length)}function addFormat(e,r){if(typeof r=="string")r=new RegExp(r);this._formats[e]=r;return this}function addDefaultMetaSchema(e){var r;if(e._opts.$data){r=t(7664);e.addMetaSchema(r,r.$id,true)}if(e._opts.meta===false)return;var a=t(7136);if(e._opts.$data)a=u(a,v);e.addMetaSchema(a,h,true);e._refs["http://json-schema.org/schema"]=h}function addInitialSchemas(e){var r=e._opts.schemas;if(!r)return;if(Array.isArray(r))e.addSchema(r);else for(var t in r)e.addSchema(r[t],t)}function addInitialFormats(e){for(var r in e._opts.formats){var t=e._opts.formats[r];e.addFormat(r,t)}}function addInitialKeywords(e){for(var r in e._opts.keywords){var t=e._opts.keywords[r];e.addKeyword(r,t)}}function checkUnique(e,r){if(e._schemas[r]||e._refs[r])throw new Error('schema with key or id "'+r+'" already exists')}function getMetaSchemaOptions(e){var r=d.copy(e._opts);for(var t=0;t<m.length;t++)delete r[m[t]];return r}function setLogger(e){var r=e._opts.logger;if(r===false){e.logger={log:noop,warn:noop,error:noop}}else{if(r===undefined)r=console;if(!(typeof r=="object"&&r.log&&r.warn&&r.error))throw new Error("logger must implement log, warn and error methods");e.logger=r}}function noop(){}},7731:e=>{"use strict";var r=e.exports=function Cache(){this._cache={}};r.prototype.put=function Cache_put(e,r){this._cache[e]=r};r.prototype.get=function Cache_get(e){return this._cache[e]};r.prototype.del=function Cache_del(e){delete this._cache[e]};r.prototype.clear=function Cache_clear(){this._cache={}}},2694:(e,r,t)=>{"use strict";var a=t(6343).MissingRef;e.exports=compileAsync;function compileAsync(e,r,t){var s=this;if(typeof this._opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");if(typeof r=="function"){t=r;r=undefined}var i=loadMetaSchemaOf(e).then((function(){var t=s._addSchema(e,undefined,r);return t.validate||_compileAsync(t)}));if(t){i.then((function(e){t(null,e)}),t)}return i;function loadMetaSchemaOf(e){var r=e.$schema;return r&&!s.getSchema(r)?compileAsync.call(s,{$ref:r},true):Promise.resolve()}function _compileAsync(e){try{return s._compile(e)}catch(e){if(e instanceof a)return loadMissingSchema(e);throw e}function loadMissingSchema(t){var a=t.missingSchema;if(added(a))throw new Error("Schema "+a+" is loaded but "+t.missingRef+" cannot be resolved");var i=s._loadingSchemas[a];if(!i){i=s._loadingSchemas[a]=s._opts.loadSchema(a);i.then(removePromise,removePromise)}return i.then((function(e){if(!added(a)){return loadMetaSchemaOf(e).then((function(){if(!added(a))s.addSchema(e,a,undefined,r)}))}})).then((function(){return _compileAsync(e)}));function removePromise(){delete s._loadingSchemas[a]}function added(e){return s._refs[e]||s._schemas[e]}}}}},6343:(e,r,t)=>{"use strict";var a=t(2603);e.exports={Validation:errorSubclass(ValidationError),MissingRef:errorSubclass(MissingRefError)};function ValidationError(e){this.message="validation failed";this.errors=e;this.ajv=this.validation=true}MissingRefError.message=function(e,r){return"can't resolve reference "+r+" from id "+e};function MissingRefError(e,r,t){this.message=t||MissingRefError.message(e,r);this.missingRef=a.url(e,r);this.missingSchema=a.normalizeId(a.fullPath(this.missingRef))}function errorSubclass(e){e.prototype=Object.create(Error.prototype);e.prototype.constructor=e;return e}},2015:(e,r,t)=>{"use strict";var a=t(8716);var s=/^(\d\d\d\d)-(\d\d)-(\d\d)$/;var i=[0,31,28,31,30,31,30,31,31,30,31,30,31];var o=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i;var n=/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i;var l=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,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[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i;var d=/^(?:(?:http[s\u017F]?|ftp):\/\/)(?:(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+(?::(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?@)?(?:(?!10(?:\.[0-9]{1,3}){3})(?!127(?:\.[0-9]{1,3}){3})(?!169\.254(?:\.[0-9]{1,3}){2})(?!192\.168(?:\.[0-9]{1,3}){2})(?!172\.(?:1[6-9]|2[0-9]|3[01])(?:\.[0-9]{1,3}){2})(?:[1-9][0-9]?|1[0-9][0-9]|2[01][0-9]|22[0-3])(?:\.(?:1?[0-9]{1,2}|2[0-4][0-9]|25[0-5])){2}(?:\.(?:[1-9][0-9]?|1[0-9][0-9]|2[0-4][0-9]|25[0-4]))|(?:(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)(?:\.(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)*(?:\.(?:(?:[a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]){2,})))(?::[0-9]{2,5})?(?:\/(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?$/i;var f=/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i;var p=/^(?:\/(?:[^~/]|~0|~1)*)*$/;var h=/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i;var m=/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/;e.exports=formats;function formats(e){e=e=="full"?"full":"fast";return a.copy(formats[e])}formats.fast={date:/^\d\d\d\d-[0-1]\d-[0-3]\d$/,time:/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,"date-time":/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]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}){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}))|:)))(?:%.+)?\s*$/i,regex:regex,uuid:f,"json-pointer":p,"json-pointer-uri-fragment":h,"relative-json-pointer":m};formats.full={date:date,time:time,"date-time":date_time,uri:uri,"uri-reference":c,"uri-template":u,url:d,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:n,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[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}))|:)))(?:%.+)?\s*$/i,regex:regex,uuid:f,"json-pointer":p,"json-pointer-uri-fragment":h,"relative-json-pointer":m};function isLeapYear(e){return e%4===0&&(e%100!==0||e%400===0)}function date(e){var r=e.match(s);if(!r)return false;var t=+r[1];var a=+r[2];var o=+r[3];return a>=1&&a<=12&&o>=1&&o<=(a==2&&isLeapYear(t)?29:i[a])}function time(e,r){var t=e.match(o);if(!t)return false;var a=t[1];var s=t[2];var i=t[3];var n=t[5];return(a<=23&&s<=59&&i<=59||a==23&&s==59&&i==60)&&(!r||n)}var v=/t|\s/i;function date_time(e){var r=e.split(v);return r.length==2&&date(r[0])&&time(r[1],true)}var g=/\/|:/;function uri(e){return g.test(e)&&l.test(e)}var y=/[^\\]\\Z/;function regex(e){if(y.test(e))return false;try{new RegExp(e);return true}catch(e){return false}}},9258:(e,r,t)=>{"use strict";var a=t(2603),s=t(8716),i=t(6343),o=t(6424);var n=t(7003);var l=s.ucs2length;var c=t(1230);var u=i.Validation;e.exports=compile;function compile(e,r,t,d){var f=this,p=this._opts,h=[undefined],m={},v=[],g={},y=[],P={},b=[];r=r||{schema:e,refVal:h,refs:m};var S=checkCompiling.call(this,e,r,d);var _=this._compilations[S.index];if(S.compiling)return _.callValidate=callValidate;var R=this._formats;var E=this.RULES;try{var w=localCompile(e,r,t,d);_.validate=w;var z=_.callValidate;if(z){z.schema=w.schema;z.errors=null;z.refs=w.refs;z.refVal=w.refVal;z.root=w.root;z.$async=w.$async;if(p.sourceCode)z.source=w.source}return w}finally{endCompiling.call(this,e,r,d)}function callValidate(){var e=_.validate;var r=e.apply(this,arguments);callValidate.errors=e.errors;return r}function localCompile(e,t,o,d){var g=!t||t&&t.schema==e;if(t.schema!=r.schema)return compile.call(f,e,t,o,d);var P=e.$async===true;var S=n({isTop:true,schema:e,isRoot:g,baseId:d,root:t,schemaPath:"",errSchemaPath:"#",errorPath:'""',MissingRefError:i.MissingRef,RULES:E,validate:n,util:s,resolve:a,resolveRef:resolveRef,usePattern:usePattern,useDefault:useDefault,useCustomRule:useCustomRule,opts:p,formats:R,logger:f.logger,self:f});S=vars(h,refValCode)+vars(v,patternCode)+vars(y,defaultCode)+vars(b,customRuleCode)+S;if(p.processCode)S=p.processCode(S,e);var _;try{var w=new Function("self","RULES","formats","root","refVal","defaults","customRules","equal","ucs2length","ValidationError",S);_=w(f,E,R,r,h,y,b,c,l,u);h[0]=_}catch(e){f.logger.error("Error compiling schema, function code:",S);throw e}_.schema=e;_.errors=null;_.refs=m;_.refVal=h;_.root=g?_:t;if(P)_.$async=true;if(p.sourceCode===true){_.source={code:S,patterns:v,defaults:y}}return _}function resolveRef(e,s,i){s=a.url(e,s);var o=m[s];var n,l;if(o!==undefined){n=h[o];l="refVal["+o+"]";return resolvedRef(n,l)}if(!i&&r.refs){var c=r.refs[s];if(c!==undefined){n=r.refVal[c];l=addLocalRef(s,n);return resolvedRef(n,l)}}l=addLocalRef(s);var u=a.call(f,localCompile,r,s);if(u===undefined){var d=t&&t[s];if(d){u=a.inlineRef(d,p.inlineRefs)?d:compile.call(f,d,r,t,e)}}if(u===undefined){removeLocalRef(s)}else{replaceLocalRef(s,u);return resolvedRef(u,l)}}function addLocalRef(e,r){var t=h.length;h[t]=r;m[e]=t;return"refVal"+t}function removeLocalRef(e){delete m[e]}function replaceLocalRef(e,r){var t=m[e];h[t]=r}function resolvedRef(e,r){return typeof e=="object"||typeof e=="boolean"?{code:r,schema:e,inline:true}:{code:r,$async:e&&!!e.$async}}function usePattern(e){var r=g[e];if(r===undefined){r=g[e]=v.length;v[r]=e}return"pattern"+r}function useDefault(e){switch(typeof e){case"boolean":case"number":return""+e;case"string":return s.toQuotedString(e);case"object":if(e===null)return"null";var r=o(e);var t=P[r];if(t===undefined){t=P[r]=y.length;y[t]=e}return"default"+t}}function useCustomRule(e,r,t,a){if(f._opts.validateSchema!==false){var s=e.definition.dependencies;if(s&&!s.every((function(e){return Object.prototype.hasOwnProperty.call(t,e)})))throw new Error("parent schema must have all required keywords: "+s.join(","));var i=e.definition.validateSchema;if(i){var o=i(r);if(!o){var n="keyword schema is invalid: "+f.errorsText(i.errors);if(f._opts.validateSchema=="log")f.logger.error(n);else throw new Error(n)}}}var l=e.definition.compile,c=e.definition.inline,u=e.definition.macro;var d;if(l){d=l.call(f,r,t,a)}else if(u){d=u.call(f,r,t,a);if(p.validateSchema!==false)f.validateSchema(d,true)}else if(c){d=c.call(f,a,e.keyword,r,t)}else{d=e.definition.validate;if(!d)return}if(d===undefined)throw new Error('custom keyword "'+e.keyword+'"failed to compile');var h=b.length;b[h]=d;return{code:"customRule"+h,validate:d}}}function checkCompiling(e,r,t){var a=compIndex.call(this,e,r,t);if(a>=0)return{index:a,compiling:true};a=this._compilations.length;this._compilations[a]={schema:e,root:r,baseId:t};return{index:a,compiling:false}}function endCompiling(e,r,t){var a=compIndex.call(this,e,r,t);if(a>=0)this._compilations.splice(a,1)}function compIndex(e,r,t){for(var a=0;a<this._compilations.length;a++){var s=this._compilations[a];if(s.schema==e&&s.root==r&&s.baseId==t)return a}return-1}function patternCode(e,r){return"var pattern"+e+" = new RegExp("+s.toQuotedString(r[e])+");"}function defaultCode(e){return"var default"+e+" = defaults["+e+"];"}function refValCode(e,r){return r[e]===undefined?"":"var refVal"+e+" = refVal["+e+"];"}function customRuleCode(e){return"var customRule"+e+" = customRules["+e+"];"}function vars(e,r){if(!e.length)return"";var t="";for(var a=0;a<e.length;a++)t+=r(a,e);return t}},2603:(e,r,t)=>{"use strict";var a=t(4856),s=t(1230),i=t(8716),o=t(2961),n=t(6042);e.exports=resolve;resolve.normalizeId=normalizeId;resolve.fullPath=getFullPath;resolve.url=resolveUrl;resolve.ids=resolveIds;resolve.inlineRef=inlineRef;resolve.schema=resolveSchema;function resolve(e,r,t){var a=this._refs[t];if(typeof a=="string"){if(this._refs[a])a=this._refs[a];else return resolve.call(this,e,r,a)}a=a||this._schemas[t];if(a instanceof o){return inlineRef(a.schema,this._opts.inlineRefs)?a.schema:a.validate||this._compile(a)}var s=resolveSchema.call(this,r,t);var i,n,l;if(s){i=s.schema;r=s.root;l=s.baseId}if(i instanceof o){n=i.validate||e.call(this,i.schema,r,undefined,l)}else if(i!==undefined){n=inlineRef(i,this._opts.inlineRefs)?i:e.call(this,i,r,undefined,l)}return n}function resolveSchema(e,r){var t=a.parse(r),s=_getFullPath(t),i=getFullPath(this._getId(e.schema));if(Object.keys(e.schema).length===0||s!==i){var n=normalizeId(s);var l=this._refs[n];if(typeof l=="string"){return resolveRecursive.call(this,e,l,t)}else if(l instanceof o){if(!l.validate)this._compile(l);e=l}else{l=this._schemas[n];if(l instanceof o){if(!l.validate)this._compile(l);if(n==normalizeId(r))return{schema:l,root:e,baseId:i};e=l}else{return}}if(!e.schema)return;i=getFullPath(this._getId(e.schema))}return getJsonPointer.call(this,t,i,e.schema,e)}function resolveRecursive(e,r,t){var a=resolveSchema.call(this,e,r);if(a){var s=a.schema;var i=a.baseId;e=a.root;var o=this._getId(s);if(o)i=resolveUrl(i,o);return getJsonPointer.call(this,t,i,s,e)}}var l=i.toHash(["properties","patternProperties","enum","dependencies","definitions"]);function getJsonPointer(e,r,t,a){e.fragment=e.fragment||"";if(e.fragment.slice(0,1)!="/")return;var s=e.fragment.split("/");for(var o=1;o<s.length;o++){var n=s[o];if(n){n=i.unescapeFragment(n);t=t[n];if(t===undefined)break;var c;if(!l[n]){c=this._getId(t);if(c)r=resolveUrl(r,c);if(t.$ref){var u=resolveUrl(r,t.$ref);var d=resolveSchema.call(this,a,u);if(d){t=d.schema;a=d.root;r=d.baseId}}}}}if(t!==undefined&&t!==a.schema)return{schema:t,root:a,baseId:r}}var c=i.toHash(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum"]);function inlineRef(e,r){if(r===false)return false;if(r===undefined||r===true)return checkNoRef(e);else if(r)return countKeys(e)<=r}function checkNoRef(e){var r;if(Array.isArray(e)){for(var t=0;t<e.length;t++){r=e[t];if(typeof r=="object"&&!checkNoRef(r))return false}}else{for(var a in e){if(a=="$ref")return false;r=e[a];if(typeof r=="object"&&!checkNoRef(r))return false}}return true}function countKeys(e){var r=0,t;if(Array.isArray(e)){for(var a=0;a<e.length;a++){t=e[a];if(typeof t=="object")r+=countKeys(t);if(r==Infinity)return Infinity}}else{for(var s in e){if(s=="$ref")return Infinity;if(c[s]){r++}else{t=e[s];if(typeof t=="object")r+=countKeys(t)+1;if(r==Infinity)return Infinity}}}return r}function getFullPath(e,r){if(r!==false)e=normalizeId(e);var t=a.parse(e);return _getFullPath(t)}function _getFullPath(e){return a.serialize(e).split("#")[0]+"#"}var u=/#\/?$/;function normalizeId(e){return e?e.replace(u,""):""}function resolveUrl(e,r){r=normalizeId(r);return a.resolve(e,r)}function resolveIds(e){var r=normalizeId(this._getId(e));var t={"":r};var o={"":getFullPath(r,false)};var l={};var c=this;n(e,{allKeys:true},(function(e,r,n,u,d,f,p){if(r==="")return;var h=c._getId(e);var m=t[u];var v=o[u]+"/"+d;if(p!==undefined)v+="/"+(typeof p=="number"?p:i.escapeFragment(p));if(typeof h=="string"){h=m=normalizeId(m?a.resolve(m,h):h);var g=c._refs[h];if(typeof g=="string")g=c._refs[g];if(g&&g.schema){if(!s(e,g.schema))throw new Error('id "'+h+'" resolves to more than one schema')}else if(h!=normalizeId(v)){if(h[0]=="#"){if(l[h]&&!s(e,l[h]))throw new Error('id "'+h+'" resolves to more than one schema');l[h]=e}else{c._refs[h]=v}}}t[r]=m;o[r]=v}));return l}},9233:(e,r,t)=>{"use strict";var a=t(6964),s=t(8716).toHash;e.exports=function rules(){var e=[{type:"number",rules:[{maximum:["exclusiveMaximum"]},{minimum:["exclusiveMinimum"]},"multipleOf","format"]},{type:"string",rules:["maxLength","minLength","pattern","format"]},{type:"array",rules:["maxItems","minItems","items","contains","uniqueItems"]},{type:"object",rules:["maxProperties","minProperties","required","dependencies","propertyNames",{properties:["additionalProperties","patternProperties"]}]},{rules:["$ref","const","enum","not","anyOf","oneOf","allOf","if"]}];var r=["type","$comment"];var t=["$schema","$id","id","$data","$async","title","description","default","definitions","examples","readOnly","writeOnly","contentMediaType","contentEncoding","additionalItems","then","else"];var i=["number","integer","string","array","object","boolean","null"];e.all=s(r);e.types=s(i);e.forEach((function(t){t.rules=t.rules.map((function(t){var s;if(typeof t=="object"){var i=Object.keys(t)[0];s=t[i];t=i;s.forEach((function(t){r.push(t);e.all[t]=true}))}r.push(t);var o=e.all[t]={keyword:t,code:a[t],implements:s};return o}));e.all.$comment={keyword:"$comment",code:a.$comment};if(t.type)e.types[t.type]=t}));e.keywords=s(r.concat(t));e.custom={};return e}},2961:(e,r,t)=>{"use strict";var a=t(8716);e.exports=SchemaObject;function SchemaObject(e){a.copy(e,this)}},2:e=>{"use strict";e.exports=function ucs2length(e){var r=0,t=e.length,a=0,s;while(a<t){r++;s=e.charCodeAt(a++);if(s>=55296&&s<=56319&&a<t){s=e.charCodeAt(a);if((s&64512)==56320)a++}}return r}},8716:(e,r,t)=>{"use strict";e.exports={copy:copy,checkDataType:checkDataType,checkDataTypes:checkDataTypes,coerceToTypes:coerceToTypes,toHash:toHash,getProperty:getProperty,escapeQuotes:escapeQuotes,equal:t(1230),ucs2length:t(2),varOccurences:varOccurences,varReplace:varReplace,schemaHasRules:schemaHasRules,schemaHasRulesExcept:schemaHasRulesExcept,schemaUnknownRules:schemaUnknownRules,toQuotedString:toQuotedString,getPathExpr:getPathExpr,getPath:getPath,getData:getData,unescapeFragment:unescapeFragment,unescapeJsonPointer:unescapeJsonPointer,escapeFragment:escapeFragment,escapeJsonPointer:escapeJsonPointer};function copy(e,r){r=r||{};for(var t in e)r[t]=e[t];return r}function checkDataType(e,r,t,a){var s=a?" !== ":" === ",i=a?" || ":" && ",o=a?"!":"",n=a?"":"!";switch(e){case"null":return r+s+"null";case"array":return o+"Array.isArray("+r+")";case"object":return"("+o+r+i+"typeof "+r+s+'"object"'+i+n+"Array.isArray("+r+"))";case"integer":return"(typeof "+r+s+'"number"'+i+n+"("+r+" % 1)"+i+r+s+r+(t?i+o+"isFinite("+r+")":"")+")";case"number":return"(typeof "+r+s+'"'+e+'"'+(t?i+o+"isFinite("+r+")":"")+")";default:return"typeof "+r+s+'"'+e+'"'}}function checkDataTypes(e,r,t){switch(e.length){case 1:return checkDataType(e[0],r,t,true);default:var a="";var s=toHash(e);if(s.array&&s.object){a=s.null?"(":"(!"+r+" || ";a+="typeof "+r+' !== "object")';delete s.null;delete s.array;delete s.object}if(s.number)delete s.integer;for(var i in s)a+=(a?" && ":"")+checkDataType(i,r,t,true);return a}}var a=toHash(["string","number","integer","boolean","null"]);function coerceToTypes(e,r){if(Array.isArray(r)){var t=[];for(var s=0;s<r.length;s++){var i=r[s];if(a[i])t[t.length]=i;else if(e==="array"&&i==="array")t[t.length]=i}if(t.length)return t}else if(a[r]){return[r]}else if(e==="array"&&r==="array"){return["array"]}}function toHash(e){var r={};for(var t=0;t<e.length;t++)r[e[t]]=true;return r}var s=/^[a-z$_][a-z$_0-9]*$/i;var i=/'|\\/g;function getProperty(e){return typeof e=="number"?"["+e+"]":s.test(e)?"."+e:"['"+escapeQuotes(e)+"']"}function escapeQuotes(e){return e.replace(i,"\\$&").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\f/g,"\\f").replace(/\t/g,"\\t")}function varOccurences(e,r){r+="[^0-9]";var t=e.match(new RegExp(r,"g"));return t?t.length:0}function varReplace(e,r,t){r+="([^0-9])";t=t.replace(/\$/g,"$$$$");return e.replace(new RegExp(r,"g"),t+"$1")}function schemaHasRules(e,r){if(typeof e=="boolean")return!e;for(var t in e)if(r[t])return true}function schemaHasRulesExcept(e,r,t){if(typeof e=="boolean")return!e&&t!="not";for(var a in e)if(a!=t&&r[a])return true}function schemaUnknownRules(e,r){if(typeof e=="boolean")return;for(var t in e)if(!r[t])return t}function toQuotedString(e){return"'"+escapeQuotes(e)+"'"}function getPathExpr(e,r,t,a){var s=t?"'/' + "+r+(a?"":".replace(/~/g, '~0').replace(/\\//g, '~1')"):a?"'[' + "+r+" + ']'":"'[\\'' + "+r+" + '\\']'";return joinPaths(e,s)}function getPath(e,r,t){var a=t?toQuotedString("/"+escapeJsonPointer(r)):toQuotedString(getProperty(r));return joinPaths(e,a)}var o=/^\/(?:[^~]|~0|~1)*$/;var n=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function getData(e,r,t){var a,s,i,l;if(e==="")return"rootData";if(e[0]=="/"){if(!o.test(e))throw new Error("Invalid JSON-pointer: "+e);s=e;i="rootData"}else{l=e.match(n);if(!l)throw new Error("Invalid JSON-pointer: "+e);a=+l[1];s=l[2];if(s=="#"){if(a>=r)throw new Error("Cannot access property/index "+a+" levels up, current level is "+r);return t[r-a]}if(a>r)throw new Error("Cannot access data "+a+" levels up, current level is "+r);i="data"+(r-a||"");if(!s)return i}var c=i;var u=s.split("/");for(var d=0;d<u.length;d++){var f=u[d];if(f){i+=getProperty(unescapeJsonPointer(f));c+=" && "+i}}return c}function joinPaths(e,r){if(e=='""')return r;return(e+" + "+r).replace(/([^\\])' \+ '/g,"$1")}function unescapeFragment(e){return unescapeJsonPointer(decodeURIComponent(e))}function escapeFragment(e){return encodeURIComponent(escapeJsonPointer(e))}function escapeJsonPointer(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}function unescapeJsonPointer(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}},1966:e=>{"use strict";var r=["multipleOf","maximum","exclusiveMaximum","minimum","exclusiveMinimum","maxLength","minLength","pattern","additionalItems","maxItems","minItems","uniqueItems","maxProperties","minProperties","required","additionalProperties","enum","format","const"];e.exports=function(e,t){for(var a=0;a<t.length;a++){e=JSON.parse(JSON.stringify(e));var s=t[a].split("/");var i=e;var o;for(o=1;o<s.length;o++)i=i[s[o]];for(o=0;o<r.length;o++){var n=r[o];var l=i[n];if(l){i[n]={anyOf:[l,{$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"}]}}}}return e}},6686:(e,r,t)=>{"use strict";var a=t(7136);e.exports={$id:"https://github.com/ajv-validator/ajv/blob/master/lib/definition_schema.js",definitions:{simpleTypes:a.definitions.simpleTypes},type:"object",dependencies:{schema:["validate"],$data:["validate"],statements:["inline"],valid:{not:{required:["macro"]}}},properties:{type:a.properties.type,schema:{type:"boolean"},statements:{type:"boolean"},dependencies:{type:"array",items:{type:"string"}},metaSchema:{type:"object"},modifying:{type:"boolean"},valid:{type:"boolean"},$data:{type:"boolean"},async:{type:"boolean"},errors:{anyOf:[{type:"boolean"},{const:"full"}]}}}},4130:e=>{"use strict";e.exports=function generate__limit(e,r,t){var a=" ";var s=e.level;var i=e.dataLevel;var o=e.schema[r];var n=e.schemaPath+e.util.getProperty(r);var l=e.errSchemaPath+"/"+r;var c=!e.opts.allErrors;var u;var d="data"+(i||"");var f=e.opts.$data&&o&&o.$data,p;if(f){a+=" var schema"+s+" = "+e.util.getData(o.$data,i,e.dataPathArr)+"; ";p="schema"+s}else{p=o}var h=r=="maximum",m=h?"exclusiveMaximum":"exclusiveMinimum",v=e.schema[m],g=e.opts.$data&&v&&v.$data,y=h?"<":">",P=h?">":"<",u=undefined;if(!(f||typeof o=="number"||o===undefined)){throw new Error(r+" must be number")}if(!(g||v===undefined||typeof v=="number"||typeof v=="boolean")){throw new Error(m+" must be number or boolean")}if(g){var b=e.util.getData(v.$data,i,e.dataPathArr),S="exclusive"+s,_="exclType"+s,R="exclIsNumber"+s,E="op"+s,w="' + "+E+" + '";a+=" var schemaExcl"+s+" = "+b+"; ";b="schemaExcl"+s;a+=" var "+S+"; var "+_+" = typeof "+b+"; if ("+_+" != 'boolean' && "+_+" != 'undefined' && "+_+" != 'number') { ";var u=m;var z=z||[];z.push(a);a="";if(e.createErrors!==false){a+=" { keyword: '"+(u||"_exclusiveLimit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: {} ";if(e.opts.messages!==false){a+=" , message: '"+m+" should be boolean' "}if(e.opts.verbose){a+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "}a+=" } "}else{a+=" {} "}var x=a;a=z.pop();if(!e.compositeRule&&c){if(e.async){a+=" throw new ValidationError(["+x+"]); "}else{a+=" validate.errors = ["+x+"]; return false; "}}else{a+=" var err = "+x+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}a+=" } else if ( ";if(f){a+=" ("+p+" !== undefined && typeof "+p+" != 'number') || "}a+=" "+_+" == 'number' ? ( ("+S+" = "+p+" === undefined || "+b+" "+y+"= "+p+") ? "+d+" "+P+"= "+b+" : "+d+" "+P+" "+p+" ) : ( ("+S+" = "+b+" === true) ? "+d+" "+P+"= "+p+" : "+d+" "+P+" "+p+" ) || "+d+" !== "+d+") { var op"+s+" = "+S+" ? '"+y+"' : '"+y+"='; ";if(o===undefined){u=m;l=e.errSchemaPath+"/"+m;p=b;f=g}}else{var R=typeof v=="number",w=y;if(R&&f){var E="'"+w+"'";a+=" if ( ";if(f){a+=" ("+p+" !== undefined && typeof "+p+" != 'number') || "}a+=" ( "+p+" === undefined || "+v+" "+y+"= "+p+" ? "+d+" "+P+"= "+v+" : "+d+" "+P+" "+p+" ) || "+d+" !== "+d+") { "}else{if(R&&o===undefined){S=true;u=m;l=e.errSchemaPath+"/"+m;p=v;P+="="}else{if(R)p=Math[h?"min":"max"](v,o);if(v===(R?p:true)){S=true;u=m;l=e.errSchemaPath+"/"+m;P+="="}else{S=false;w+="="}}var E="'"+w+"'";a+=" if ( ";if(f){a+=" ("+p+" !== undefined && typeof "+p+" != 'number') || "}a+=" "+d+" "+P+" "+p+" || "+d+" !== "+d+") { "}}u=u||r;var z=z||[];z.push(a);a="";if(e.createErrors!==false){a+=" { keyword: '"+(u||"_limit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { comparison: "+E+", limit: "+p+", exclusive: "+S+" } ";if(e.opts.messages!==false){a+=" , message: 'should be "+w+" ";if(f){a+="' + "+p}else{a+=""+p+"'"}}if(e.opts.verbose){a+=" , schema: ";if(f){a+="validate.schema"+n}else{a+=""+o}a+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "}a+=" } "}else{a+=" {} "}var x=a;a=z.pop();if(!e.compositeRule&&c){if(e.async){a+=" throw new ValidationError(["+x+"]); "}else{a+=" validate.errors = ["+x+"]; return false; "}}else{a+=" var err = "+x+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}a+=" } ";if(c){a+=" else { "}return a}},3472:e=>{"use strict";e.exports=function generate__limitItems(e,r,t){var a=" ";var s=e.level;var i=e.dataLevel;var o=e.schema[r];var n=e.schemaPath+e.util.getProperty(r);var l=e.errSchemaPath+"/"+r;var c=!e.opts.allErrors;var u;var d="data"+(i||"");var f=e.opts.$data&&o&&o.$data,p;if(f){a+=" var schema"+s+" = "+e.util.getData(o.$data,i,e.dataPathArr)+"; ";p="schema"+s}else{p=o}if(!(f||typeof o=="number")){throw new Error(r+" must be number")}var h=r=="maxItems"?">":"<";a+="if ( ";if(f){a+=" ("+p+" !== undefined && typeof "+p+" != 'number') || "}a+=" "+d+".length "+h+" "+p+") { ";var u=r;var m=m||[];m.push(a);a="";if(e.createErrors!==false){a+=" { keyword: '"+(u||"_limitItems")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { limit: "+p+" } ";if(e.opts.messages!==false){a+=" , message: 'should NOT have ";if(r=="maxItems"){a+="more"}else{a+="fewer"}a+=" than ";if(f){a+="' + "+p+" + '"}else{a+=""+o}a+=" items' "}if(e.opts.verbose){a+=" , schema: ";if(f){a+="validate.schema"+n}else{a+=""+o}a+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "}a+=" } "}else{a+=" {} "}var v=a;a=m.pop();if(!e.compositeRule&&c){if(e.async){a+=" throw new ValidationError(["+v+"]); "}else{a+=" validate.errors = ["+v+"]; return false; "}}else{a+=" var err = "+v+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}a+="} ";if(c){a+=" else { "}return a}},9018:e=>{"use strict";e.exports=function generate__limitLength(e,r,t){var a=" ";var s=e.level;var i=e.dataLevel;var o=e.schema[r];var n=e.schemaPath+e.util.getProperty(r);var l=e.errSchemaPath+"/"+r;var c=!e.opts.allErrors;var u;var d="data"+(i||"");var f=e.opts.$data&&o&&o.$data,p;if(f){a+=" var schema"+s+" = "+e.util.getData(o.$data,i,e.dataPathArr)+"; ";p="schema"+s}else{p=o}if(!(f||typeof o=="number")){throw new Error(r+" must be number")}var h=r=="maxLength"?">":"<";a+="if ( ";if(f){a+=" ("+p+" !== undefined && typeof "+p+" != 'number') || "}if(e.opts.unicode===false){a+=" "+d+".length "}else{a+=" ucs2length("+d+") "}a+=" "+h+" "+p+") { ";var u=r;var m=m||[];m.push(a);a="";if(e.createErrors!==false){a+=" { keyword: '"+(u||"_limitLength")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { limit: "+p+" } ";if(e.opts.messages!==false){a+=" , message: 'should NOT be ";if(r=="maxLength"){a+="longer"}else{a+="shorter"}a+=" than ";if(f){a+="' + "+p+" + '"}else{a+=""+o}a+=" characters' "}if(e.opts.verbose){a+=" , schema: ";if(f){a+="validate.schema"+n}else{a+=""+o}a+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "}a+=" } "}else{a+=" {} "}var v=a;a=m.pop();if(!e.compositeRule&&c){if(e.async){a+=" throw new ValidationError(["+v+"]); "}else{a+=" validate.errors = ["+v+"]; return false; "}}else{a+=" var err = "+v+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}a+="} ";if(c){a+=" else { "}return a}},8740:e=>{"use strict";e.exports=function generate__limitProperties(e,r,t){var a=" ";var s=e.level;var i=e.dataLevel;var o=e.schema[r];var n=e.schemaPath+e.util.getProperty(r);var l=e.errSchemaPath+"/"+r;var c=!e.opts.allErrors;var u;var d="data"+(i||"");var f=e.opts.$data&&o&&o.$data,p;if(f){a+=" var schema"+s+" = "+e.util.getData(o.$data,i,e.dataPathArr)+"; ";p="schema"+s}else{p=o}if(!(f||typeof o=="number")){throw new Error(r+" must be number")}var h=r=="maxProperties"?">":"<";a+="if ( ";if(f){a+=" ("+p+" !== undefined && typeof "+p+" != 'number') || "}a+=" Object.keys("+d+").length "+h+" "+p+") { ";var u=r;var m=m||[];m.push(a);a="";if(e.createErrors!==false){a+=" { keyword: '"+(u||"_limitProperties")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { limit: "+p+" } ";if(e.opts.messages!==false){a+=" , message: 'should NOT have ";if(r=="maxProperties"){a+="more"}else{a+="fewer"}a+=" than ";if(f){a+="' + "+p+" + '"}else{a+=""+o}a+=" properties' "}if(e.opts.verbose){a+=" , schema: ";if(f){a+="validate.schema"+n}else{a+=""+o}a+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "}a+=" } "}else{a+=" {} "}var v=a;a=m.pop();if(!e.compositeRule&&c){if(e.async){a+=" throw new ValidationError(["+v+"]); "}else{a+=" validate.errors = ["+v+"]; return false; "}}else{a+=" var err = "+v+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}a+="} ";if(c){a+=" else { "}return a}},4378:e=>{"use strict";e.exports=function generate_allOf(e,r,t){var a=" ";var s=e.schema[r];var i=e.schemaPath+e.util.getProperty(r);var o=e.errSchemaPath+"/"+r;var n=!e.opts.allErrors;var l=e.util.copy(e);var c="";l.level++;var u="valid"+l.level;var d=l.baseId,f=true;var p=s;if(p){var h,m=-1,v=p.length-1;while(m<v){h=p[m+=1];if(e.opts.strictKeywords?typeof h=="object"&&Object.keys(h).length>0||h===false:e.util.schemaHasRules(h,e.RULES.all)){f=false;l.schema=h;l.schemaPath=i+"["+m+"]";l.errSchemaPath=o+"/"+m;a+=" "+e.validate(l)+" ";l.baseId=d;if(n){a+=" if ("+u+") { ";c+="}"}}}}if(n){if(f){a+=" if (true) { "}else{a+=" "+c.slice(0,-1)+" "}}return a}},9278:e=>{"use strict";e.exports=function generate_anyOf(e,r,t){var a=" ";var s=e.level;var i=e.dataLevel;var o=e.schema[r];var n=e.schemaPath+e.util.getProperty(r);var l=e.errSchemaPath+"/"+r;var c=!e.opts.allErrors;var u="data"+(i||"");var d="valid"+s;var f="errs__"+s;var p=e.util.copy(e);var h="";p.level++;var m="valid"+p.level;var v=o.every((function(r){return e.opts.strictKeywords?typeof r=="object"&&Object.keys(r).length>0||r===false:e.util.schemaHasRules(r,e.RULES.all)}));if(v){var g=p.baseId;a+=" var "+f+" = errors; var "+d+" = false; ";var y=e.compositeRule;e.compositeRule=p.compositeRule=true;var P=o;if(P){var b,S=-1,_=P.length-1;while(S<_){b=P[S+=1];p.schema=b;p.schemaPath=n+"["+S+"]";p.errSchemaPath=l+"/"+S;a+=" "+e.validate(p)+" ";p.baseId=g;a+=" "+d+" = "+d+" || "+m+"; if (!"+d+") { ";h+="}"}}e.compositeRule=p.compositeRule=y;a+=" "+h+" if (!"+d+") { var err = ";if(e.createErrors!==false){a+=" { keyword: '"+"anyOf"+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: {} ";if(e.opts.messages!==false){a+=" , message: 'should match some schema in anyOf' "}if(e.opts.verbose){a+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "}a+=" } "}else{a+=" {} "}a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";if(!e.compositeRule&&c){if(e.async){a+=" throw new ValidationError(vErrors); "}else{a+=" validate.errors = vErrors; return false; "}}a+=" } else { errors = "+f+"; if (vErrors !== null) { if ("+f+") vErrors.length = "+f+"; else vErrors = null; } ";if(e.opts.allErrors){a+=" } "}}else{if(c){a+=" if (true) { "}}return a}},9263:e=>{"use strict";e.exports=function generate_comment(e,r,t){var a=" ";var s=e.schema[r];var i=e.errSchemaPath+"/"+r;var o=!e.opts.allErrors;var n=e.util.toQuotedString(s);if(e.opts.$comment===true){a+=" console.log("+n+");"}else if(typeof e.opts.$comment=="function"){a+=" self._opts.$comment("+n+", "+e.util.toQuotedString(i)+", validate.root.schema);"}return a}},5326:e=>{"use strict";e.exports=function generate_const(e,r,t){var a=" ";var s=e.level;var i=e.dataLevel;var o=e.schema[r];var n=e.schemaPath+e.util.getProperty(r);var l=e.errSchemaPath+"/"+r;var c=!e.opts.allErrors;var u="data"+(i||"");var d="valid"+s;var f=e.opts.$data&&o&&o.$data,p;if(f){a+=" var schema"+s+" = "+e.util.getData(o.$data,i,e.dataPathArr)+"; ";p="schema"+s}else{p=o}if(!f){a+=" var schema"+s+" = validate.schema"+n+";"}a+="var "+d+" = equal("+u+", schema"+s+"); if (!"+d+") { ";var h=h||[];h.push(a);a="";if(e.createErrors!==false){a+=" { keyword: '"+"const"+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { allowedValue: schema"+s+" } ";if(e.opts.messages!==false){a+=" , message: 'should be equal to constant' "}if(e.opts.verbose){a+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "}a+=" } "}else{a+=" {} "}var m=a;a=h.pop();if(!e.compositeRule&&c){if(e.async){a+=" throw new ValidationError(["+m+"]); "}else{a+=" validate.errors = ["+m+"]; return false; "}}else{a+=" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}a+=" }";if(c){a+=" else { "}return a}},7922:e=>{"use strict";e.exports=function generate_contains(e,r,t){var a=" ";var s=e.level;var i=e.dataLevel;var o=e.schema[r];var n=e.schemaPath+e.util.getProperty(r);var l=e.errSchemaPath+"/"+r;var c=!e.opts.allErrors;var u="data"+(i||"");var d="valid"+s;var f="errs__"+s;var p=e.util.copy(e);var h="";p.level++;var m="valid"+p.level;var v="i"+s,g=p.dataLevel=e.dataLevel+1,y="data"+g,P=e.baseId,b=e.opts.strictKeywords?typeof o=="object"&&Object.keys(o).length>0||o===false:e.util.schemaHasRules(o,e.RULES.all);a+="var "+f+" = errors;var "+d+";";if(b){var S=e.compositeRule;e.compositeRule=p.compositeRule=true;p.schema=o;p.schemaPath=n;p.errSchemaPath=l;a+=" var "+m+" = false; for (var "+v+" = 0; "+v+" < "+u+".length; "+v+"++) { ";p.errorPath=e.util.getPathExpr(e.errorPath,v,e.opts.jsonPointers,true);var _=u+"["+v+"]";p.dataPathArr[g]=v;var R=e.validate(p);p.baseId=P;if(e.util.varOccurences(R,y)<2){a+=" "+e.util.varReplace(R,y,_)+" "}else{a+=" var "+y+" = "+_+"; "+R+" "}a+=" if ("+m+") break; } ";e.compositeRule=p.compositeRule=S;a+=" "+h+" if (!"+m+") {"}else{a+=" if ("+u+".length == 0) {"}var E=E||[];E.push(a);a="";if(e.createErrors!==false){a+=" { keyword: '"+"contains"+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: {} ";if(e.opts.messages!==false){a+=" , message: 'should contain a valid item' "}if(e.opts.verbose){a+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "}a+=" } "}else{a+=" {} "}var w=a;a=E.pop();if(!e.compositeRule&&c){if(e.async){a+=" throw new ValidationError(["+w+"]); "}else{a+=" validate.errors = ["+w+"]; return false; "}}else{a+=" var err = "+w+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}a+=" } else { ";if(b){a+=" errors = "+f+"; if (vErrors !== null) { if ("+f+") vErrors.length = "+f+"; else vErrors = null; } "}if(e.opts.allErrors){a+=" } "}return a}},8029:e=>{"use strict";e.exports=function generate_custom(e,r,t){var a=" ";var s=e.level;var i=e.dataLevel;var o=e.schema[r];var n=e.schemaPath+e.util.getProperty(r);var l=e.errSchemaPath+"/"+r;var c=!e.opts.allErrors;var u;var d="data"+(i||"");var f="valid"+s;var p="errs__"+s;var h=e.opts.$data&&o&&o.$data,m;if(h){a+=" var schema"+s+" = "+e.util.getData(o.$data,i,e.dataPathArr)+"; ";m="schema"+s}else{m=o}var v=this,g="definition"+s,y=v.definition,P="";var b,S,_,R,E;if(h&&y.$data){E="keywordValidate"+s;var w=y.validateSchema;a+=" var "+g+" = RULES.custom['"+r+"'].definition; var "+E+" = "+g+".validate;"}else{R=e.useCustomRule(v,o,e.schema,e);if(!R)return;m="validate.schema"+n;E=R.code;b=y.compile;S=y.inline;_=y.macro}var z=E+".errors",x="i"+s,C="ruleErr"+s,D=y.async;if(D&&!e.async)throw new Error("async keyword in sync schema");if(!(S||_)){a+=""+z+" = null;"}a+="var "+p+" = errors;var "+f+";";if(h&&y.$data){P+="}";a+=" if ("+m+" === undefined) { "+f+" = true; } else { ";if(w){P+="}";a+=" "+f+" = "+g+".validateSchema("+m+"); if ("+f+") { "}}if(S){if(y.statements){a+=" "+R.validate+" "}else{a+=" "+f+" = "+R.validate+"; "}}else if(_){var O=e.util.copy(e);var P="";O.level++;var j="valid"+O.level;O.schema=R.validate;O.schemaPath="";var T=e.compositeRule;e.compositeRule=O.compositeRule=true;var I=e.validate(O).replace(/validate\.schema/g,E);e.compositeRule=O.compositeRule=T;a+=" "+I}else{var A=A||[];A.push(a);a="";a+=" "+E+".call( ";if(e.opts.passContext){a+="this"}else{a+="self"}if(b||y.schema===false){a+=" , "+d+" "}else{a+=" , "+m+" , "+d+" , validate.schema"+e.schemaPath+" "}a+=" , (dataPath || '')";if(e.errorPath!='""'){a+=" + "+e.errorPath}var $=i?"data"+(i-1||""):"parentData",F=i?e.dataPathArr[i]:"parentDataProperty";a+=" , "+$+" , "+F+" , rootData ) ";var k=a;a=A.pop();if(y.errors===false){a+=" "+f+" = ";if(D){a+="await "}a+=""+k+"; "}else{if(D){z="customErrors"+s;a+=" var "+z+" = null; try { "+f+" = await "+k+"; } catch (e) { "+f+" = false; if (e instanceof ValidationError) "+z+" = e.errors; else throw e; } "}else{a+=" "+z+" = null; "+f+" = "+k+"; "}}}if(y.modifying){a+=" if ("+$+") "+d+" = "+$+"["+F+"];"}a+=""+P;if(y.valid){if(c){a+=" if (true) { "}}else{a+=" if ( ";if(y.valid===