UNPKG

@depthark/css-first

Version:

Advanced MCP server for intelligent, context-aware CSS suggestions with logical units, container queries, and automated feature discovery

8 lines 1.11 MB
#!/usr/bin/env node (()=>{var e={1730:(e,t,r)=>{"use strict"; /*! * accepts * Copyright(c) 2014 Jonathan Ong * Copyright(c) 2015 Douglas Christopher Wilson * MIT Licensed */var a=r(8009);var n=r(5920);e.exports=Accepts;function Accepts(e){if(!(this instanceof Accepts)){return new Accepts(e)}this.headers=e.headers;this.negotiator=new a(e)}Accepts.prototype.type=Accepts.prototype.types=function(e){var t=e;if(t&&!Array.isArray(t)){t=new Array(arguments.length);for(var r=0;r<t.length;r++){t[r]=arguments[r]}}if(!t||t.length===0){return this.negotiator.mediaTypes()}if(!this.headers.accept){return t[0]}var a=t.map(extToMime);var n=this.negotiator.mediaTypes(a.filter(validMime));var i=n[0];return i?t[a.indexOf(i)]:false};Accepts.prototype.encoding=Accepts.prototype.encodings=function(e){var t=e;if(t&&!Array.isArray(t)){t=new Array(arguments.length);for(var r=0;r<t.length;r++){t[r]=arguments[r]}}if(!t||t.length===0){return this.negotiator.encodings()}return this.negotiator.encodings(t)[0]||false};Accepts.prototype.charset=Accepts.prototype.charsets=function(e){var t=e;if(t&&!Array.isArray(t)){t=new Array(arguments.length);for(var r=0;r<t.length;r++){t[r]=arguments[r]}}if(!t||t.length===0){return this.negotiator.charsets()}return this.negotiator.charsets(t)[0]||false};Accepts.prototype.lang=Accepts.prototype.langs=Accepts.prototype.language=Accepts.prototype.languages=function(e){var t=e;if(t&&!Array.isArray(t)){t=new Array(arguments.length);for(var r=0;r<t.length;r++){t[r]=arguments[r]}}if(!t||t.length===0){return this.negotiator.languages()}return this.negotiator.languages(t)[0]||false};function extToMime(e){return e.indexOf("/")===-1?n.lookup(e):e}function validMime(e){return typeof e==="string"}},2464:(e,t,r)=>{"use strict";var a=r(5489),n=r(8581),i=r(5321),o=r(8392),s=r(7427),c=r(5689),l=r(5366),p=r(931),u=r(569);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=r(6097);var d=r(8628);Ajv.prototype.addKeyword=d.add;Ajv.prototype.getKeyword=d.get;Ajv.prototype.removeKeyword=d.remove;Ajv.prototype.validateKeyword=d.validate;var m=r(9840);Ajv.ValidationError=m.Validation;Ajv.MissingRefError=m.MissingRef;Ajv.$dataMetaSchema=p;var h="http://json-schema.org/draft-07/schema";var v=["removeAdditional","useDefaults","coerceTypes","strictDefaults"];var g=["/properties"];function Ajv(e){if(!(this instanceof Ajv))return new Ajv(e);e=this._opts=u.copy(e)||{};setLogger(this);this._schemas={};this._refs={};this._fragments={};this._formats=c(e.format);this._cache=e.cache||new i;this._loadingSchemas={};this._compilations=[];this.RULES=l();this._getId=chooseGetId(e);e.loopRequired=e.loopRequired||Infinity;if(e.errorDataPath=="property")e._errorDataPathProperty=true;if(e.serialize===undefined)e.serialize=s;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,t){var r;if(typeof e=="string"){r=this.getSchema(e);if(!r)throw new Error('no schema with key or ref "'+e+'"')}else{var a=this._addSchema(e);r=a.validate||this._compile(a)}var n=r(t);if(r.$async!==true)this.errors=r.errors;return n}function compile(e,t){var r=this._addSchema(e,undefined,t);return r.validate||this._compile(r)}function addSchema(e,t,r,a){if(Array.isArray(e)){for(var i=0;i<e.length;i++)this.addSchema(e[i],undefined,r,a);return this}var o=this._getId(e);if(o!==undefined&&typeof o!="string")throw new Error("schema id must be string");t=n.normalizeId(t||o);checkUnique(this,t);this._schemas[t]=this._addSchema(e,r,a,true);return this}function addMetaSchema(e,t,r){this.addSchema(e,t,r,true);return this}function validateSchema(e,t){var r=e.$schema;if(r!==undefined&&typeof r!="string")throw new Error("$schema must be a string");r=r||this._opts.defaultMeta||defaultMeta(this);if(!r){this.logger.warn("meta-schema not available");this.errors=null;return true}var a=this.validate(r,e);if(!a&&t){var n="schema is invalid: "+this.errorsText();if(this._opts.validateSchema=="log")this.logger.error(n);else throw new Error(n)}return a}function defaultMeta(e){var t=e._opts.meta;e._opts.defaultMeta=typeof t=="object"?e._getId(t)||t:e.getSchema(h)?h:undefined;return e._opts.defaultMeta}function getSchema(e){var t=_getSchemaObj(this,e);switch(typeof t){case"object":return t.validate||this._compile(t);case"string":return this.getSchema(t);case"undefined":return _getSchemaFragment(this,e)}}function _getSchemaFragment(e,t){var r=n.schema.call(e,{schema:{}},t);if(r){var i=r.schema,s=r.root,c=r.baseId;var l=a.call(e,i,s,undefined,c);e._fragments[t]=new o({ref:t,fragment:true,schema:i,root:s,baseId:c,validate:l});return l}}function _getSchemaObj(e,t){t=n.normalizeId(t);return e._schemas[t]||e._refs[t]||e._fragments[t]}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 t=_getSchemaObj(this,e);if(t)this._cache.del(t.cacheKey);delete this._schemas[e];delete this._refs[e];return this;case"object":var r=this._opts.serialize;var a=r?r(e):e;this._cache.del(a);var i=this._getId(e);if(i){i=n.normalizeId(i);delete this._schemas[i];delete this._refs[i]}}return this}function _removeAllSchemas(e,t,r){for(var a in t){var n=t[a];if(!n.meta&&(!r||r.test(a))){e._cache.del(n.cacheKey);delete t[a]}}}function _addSchema(e,t,r,a){if(typeof e!="object"&&typeof e!="boolean")throw new Error("schema should be object or boolean");var i=this._opts.serialize;var s=i?i(e):e;var c=this._cache.get(s);if(c)return c;a=a||this._opts.addUsedSchema!==false;var l=n.normalizeId(this._getId(e));if(l&&a)checkUnique(this,l);var p=this._opts.validateSchema!==false&&!t;var u;if(p&&!(u=l&&l==n.normalizeId(e.$schema)))this.validateSchema(e,true);var d=n.ids.call(this,e);var m=new o({id:l,schema:e,localRefs:d,cacheKey:s,meta:r});if(l[0]!="#"&&a)this._refs[l]=m;this._cache.put(s,m);if(p&&u)this.validateSchema(e,true);return m}function _compile(e,t){if(e.compiling){e.validate=callValidate;callValidate.schema=e.schema;callValidate.errors=null;callValidate.root=t?t:callValidate;if(e.schema.$async===true)callValidate.$async=true;return callValidate}e.compiling=true;var r;if(e.meta){r=this._opts;this._opts=this._metaOpts}var n;try{n=a.call(this,e.schema,t,e.localRefs)}catch(t){delete e.validate;throw t}finally{e.compiling=false;if(e.meta)this._opts=r}e.validate=n;e.refs=n.refs;e.refVal=n.refVal;e.root=n.root;return n;function callValidate(){var t=e.validate;var r=t.apply(this,arguments);callValidate.errors=t.errors;return r}}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,t){e=e||this.errors;if(!e)return"No errors";t=t||{};var r=t.separator===undefined?", ":t.separator;var a=t.dataVar===undefined?"data":t.dataVar;var n="";for(var i=0;i<e.length;i++){var o=e[i];if(o)n+=a+o.dataPath+" "+o.message+r}return n.slice(0,-r.length)}function addFormat(e,t){if(typeof t=="string")t=new RegExp(t);this._formats[e]=t;return this}function addDefaultMetaSchema(e){var t;if(e._opts.$data){t=r(9746);e.addMetaSchema(t,t.$id,true)}if(e._opts.meta===false)return;var a=r(7120);if(e._opts.$data)a=p(a,g);e.addMetaSchema(a,h,true);e._refs["http://json-schema.org/schema"]=h}function addInitialSchemas(e){var t=e._opts.schemas;if(!t)return;if(Array.isArray(t))e.addSchema(t);else for(var r in t)e.addSchema(t[r],r)}function addInitialFormats(e){for(var t in e._opts.formats){var r=e._opts.formats[t];e.addFormat(t,r)}}function addInitialKeywords(e){for(var t in e._opts.keywords){var r=e._opts.keywords[t];e.addKeyword(t,r)}}function checkUnique(e,t){if(e._schemas[t]||e._refs[t])throw new Error('schema with key or id "'+t+'" already exists')}function getMetaSchemaOptions(e){var t=u.copy(e._opts);for(var r=0;r<v.length;r++)delete t[v[r]];return t}function setLogger(e){var t=e._opts.logger;if(t===false){e.logger={log:noop,warn:noop,error:noop}}else{if(t===undefined)t=console;if(!(typeof t=="object"&&t.log&&t.warn&&t.error))throw new Error("logger must implement log, warn and error methods");e.logger=t}}function noop(){}},5321:e=>{"use strict";var t=e.exports=function Cache(){this._cache={}};t.prototype.put=function Cache_put(e,t){this._cache[e]=t};t.prototype.get=function Cache_get(e){return this._cache[e]};t.prototype.del=function Cache_del(e){delete this._cache[e]};t.prototype.clear=function Cache_clear(){this._cache={}}},6097:(e,t,r)=>{"use strict";var a=r(9840).MissingRef;e.exports=compileAsync;function compileAsync(e,t,r){var n=this;if(typeof this._opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");if(typeof t=="function"){r=t;t=undefined}var i=loadMetaSchemaOf(e).then((function(){var r=n._addSchema(e,undefined,t);return r.validate||_compileAsync(r)}));if(r){i.then((function(e){r(null,e)}),r)}return i;function loadMetaSchemaOf(e){var t=e.$schema;return t&&!n.getSchema(t)?compileAsync.call(n,{$ref:t},true):Promise.resolve()}function _compileAsync(e){try{return n._compile(e)}catch(e){if(e instanceof a)return loadMissingSchema(e);throw e}function loadMissingSchema(r){var a=r.missingSchema;if(added(a))throw new Error("Schema "+a+" is loaded but "+r.missingRef+" cannot be resolved");var i=n._loadingSchemas[a];if(!i){i=n._loadingSchemas[a]=n._opts.loadSchema(a);i.then(removePromise,removePromise)}return i.then((function(e){if(!added(a)){return loadMetaSchemaOf(e).then((function(){if(!added(a))n.addSchema(e,a,undefined,t)}))}})).then((function(){return _compileAsync(e)}));function removePromise(){delete n._loadingSchemas[a]}function added(e){return n._refs[e]||n._schemas[e]}}}}},9840:(e,t,r)=>{"use strict";var a=r(8581);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,t){return"can't resolve reference "+t+" from id "+e};function MissingRefError(e,t,r){this.message=r||MissingRefError.message(e,t);this.missingRef=a.url(e,t);this.missingSchema=a.normalizeId(a.fullPath(this.missingRef))}function errorSubclass(e){e.prototype=Object.create(Error.prototype);e.prototype.constructor=e;return e}},5689:(e,t,r)=>{"use strict";var a=r(569);var n=/^(\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 s=/^(?=.{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 c=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::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(?:[\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 d=/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i;var m=/^(?:\/(?:[^~/]|~0|~1)*)*$/;var h=/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i;var v=/^(?: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|[+-]\d\d(?::?\d\d)?)$/i,uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*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(?:(?:(?::[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:d,"json-pointer":m,"json-pointer-uri-fragment":h,"relative-json-pointer":v};formats.full={date:date,time:time,"date-time":date_time,uri:uri,"uri-reference":l,"uri-template":p,url:u,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:s,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:d,"json-pointer":m,"json-pointer-uri-fragment":h,"relative-json-pointer":v};function isLeapYear(e){return e%4===0&&(e%100!==0||e%400===0)}function date(e){var t=e.match(n);if(!t)return false;var r=+t[1];var a=+t[2];var o=+t[3];return a>=1&&a<=12&&o>=1&&o<=(a==2&&isLeapYear(r)?29:i[a])}function time(e,t){var r=e.match(o);if(!r)return false;var a=r[1];var n=r[2];var i=r[3];var s=r[5];return(a<=23&&n<=59&&i<=59||a==23&&n==59&&i==60)&&(!t||s)}var g=/t|\s/i;function date_time(e){var t=e.split(g);return t.length==2&&date(t[0])&&time(t[1],true)}var y=/\/|:/;function uri(e){return y.test(e)&&c.test(e)}var b=/[^\\]\\Z/;function regex(e){if(b.test(e))return false;try{new RegExp(e);return true}catch(e){return false}}},5489:(e,t,r)=>{"use strict";var a=r(8581),n=r(569),i=r(9840),o=r(7427);var s=r(6464);var c=n.ucs2length;var l=r(4711);var p=i.Validation;e.exports=compile;function compile(e,t,r,u){var d=this,m=this._opts,h=[undefined],v={},g=[],y={},b=[],x={},S=[];t=t||{schema:e,refVal:h,refs:v};var w=checkCompiling.call(this,e,t,u);var _=this._compilations[w.index];if(w.compiling)return _.callValidate=callValidate;var C=this._formats;var P=this.RULES;try{var E=localCompile(e,t,r,u);_.validate=E;var k=_.callValidate;if(k){k.schema=E.schema;k.errors=null;k.refs=E.refs;k.refVal=E.refVal;k.root=E.root;k.$async=E.$async;if(m.sourceCode)k.source=E.source}return E}finally{endCompiling.call(this,e,t,u)}function callValidate(){var e=_.validate;var t=e.apply(this,arguments);callValidate.errors=e.errors;return t}function localCompile(e,r,o,u){var y=!r||r&&r.schema==e;if(r.schema!=t.schema)return compile.call(d,e,r,o,u);var x=e.$async===true;var w=s({isTop:true,schema:e,isRoot:y,baseId:u,root:r,schemaPath:"",errSchemaPath:"#",errorPath:'""',MissingRefError:i.MissingRef,RULES:P,validate:s,util:n,resolve:a,resolveRef:resolveRef,usePattern:usePattern,useDefault:useDefault,useCustomRule:useCustomRule,opts:m,formats:C,logger:d.logger,self:d});w=vars(h,refValCode)+vars(g,patternCode)+vars(b,defaultCode)+vars(S,customRuleCode)+w;if(m.processCode)w=m.processCode(w,e);var _;try{var E=new Function("self","RULES","formats","root","refVal","defaults","customRules","equal","ucs2length","ValidationError",w);_=E(d,P,C,t,h,b,S,l,c,p);h[0]=_}catch(e){d.logger.error("Error compiling schema, function code:",w);throw e}_.schema=e;_.errors=null;_.refs=v;_.refVal=h;_.root=y?_:r;if(x)_.$async=true;if(m.sourceCode===true){_.source={code:w,patterns:g,defaults:b}}return _}function resolveRef(e,n,i){n=a.url(e,n);var o=v[n];var s,c;if(o!==undefined){s=h[o];c="refVal["+o+"]";return resolvedRef(s,c)}if(!i&&t.refs){var l=t.refs[n];if(l!==undefined){s=t.refVal[l];c=addLocalRef(n,s);return resolvedRef(s,c)}}c=addLocalRef(n);var p=a.call(d,localCompile,t,n);if(p===undefined){var u=r&&r[n];if(u){p=a.inlineRef(u,m.inlineRefs)?u:compile.call(d,u,t,r,e)}}if(p===undefined){removeLocalRef(n)}else{replaceLocalRef(n,p);return resolvedRef(p,c)}}function addLocalRef(e,t){var r=h.length;h[r]=t;v[e]=r;return"refVal"+r}function removeLocalRef(e){delete v[e]}function replaceLocalRef(e,t){var r=v[e];h[r]=t}function resolvedRef(e,t){return typeof e=="object"||typeof e=="boolean"?{code:t,schema:e,inline:true}:{code:t,$async:e&&!!e.$async}}function usePattern(e){var t=y[e];if(t===undefined){t=y[e]=g.length;g[t]=e}return"pattern"+t}function useDefault(e){switch(typeof e){case"boolean":case"number":return""+e;case"string":return n.toQuotedString(e);case"object":if(e===null)return"null";var t=o(e);var r=x[t];if(r===undefined){r=x[t]=b.length;b[r]=e}return"default"+r}}function useCustomRule(e,t,r,a){if(d._opts.validateSchema!==false){var n=e.definition.dependencies;if(n&&!n.every((function(e){return Object.prototype.hasOwnProperty.call(r,e)})))throw new Error("parent schema must have all required keywords: "+n.join(","));var i=e.definition.validateSchema;if(i){var o=i(t);if(!o){var s="keyword schema is invalid: "+d.errorsText(i.errors);if(d._opts.validateSchema=="log")d.logger.error(s);else throw new Error(s)}}}var c=e.definition.compile,l=e.definition.inline,p=e.definition.macro;var u;if(c){u=c.call(d,t,r,a)}else if(p){u=p.call(d,t,r,a);if(m.validateSchema!==false)d.validateSchema(u,true)}else if(l){u=l.call(d,a,e.keyword,t,r)}else{u=e.definition.validate;if(!u)return}if(u===undefined)throw new Error('custom keyword "'+e.keyword+'"failed to compile');var h=S.length;S[h]=u;return{code:"customRule"+h,validate:u}}}function checkCompiling(e,t,r){var a=compIndex.call(this,e,t,r);if(a>=0)return{index:a,compiling:true};a=this._compilations.length;this._compilations[a]={schema:e,root:t,baseId:r};return{index:a,compiling:false}}function endCompiling(e,t,r){var a=compIndex.call(this,e,t,r);if(a>=0)this._compilations.splice(a,1)}function compIndex(e,t,r){for(var a=0;a<this._compilations.length;a++){var n=this._compilations[a];if(n.schema==e&&n.root==t&&n.baseId==r)return a}return-1}function patternCode(e,t){return"var pattern"+e+" = new RegExp("+n.toQuotedString(t[e])+");"}function defaultCode(e){return"var default"+e+" = defaults["+e+"];"}function refValCode(e,t){return t[e]===undefined?"":"var refVal"+e+" = refVal["+e+"];"}function customRuleCode(e){return"var customRule"+e+" = customRules["+e+"];"}function vars(e,t){if(!e.length)return"";var r="";for(var a=0;a<e.length;a++)r+=t(a,e);return r}},8581:(e,t,r)=>{"use strict";var a=r(8209),n=r(4711),i=r(569),o=r(8392),s=r(6901);e.exports=resolve;resolve.normalizeId=normalizeId;resolve.fullPath=getFullPath;resolve.url=resolveUrl;resolve.ids=resolveIds;resolve.inlineRef=inlineRef;resolve.schema=resolveSchema;function resolve(e,t,r){var a=this._refs[r];if(typeof a=="string"){if(this._refs[a])a=this._refs[a];else return resolve.call(this,e,t,a)}a=a||this._schemas[r];if(a instanceof o){return inlineRef(a.schema,this._opts.inlineRefs)?a.schema:a.validate||this._compile(a)}var n=resolveSchema.call(this,t,r);var i,s,c;if(n){i=n.schema;t=n.root;c=n.baseId}if(i instanceof o){s=i.validate||e.call(this,i.schema,t,undefined,c)}else if(i!==undefined){s=inlineRef(i,this._opts.inlineRefs)?i:e.call(this,i,t,undefined,c)}return s}function resolveSchema(e,t){var r=a.parse(t),n=_getFullPath(r),i=getFullPath(this._getId(e.schema));if(Object.keys(e.schema).length===0||n!==i){var s=normalizeId(n);var c=this._refs[s];if(typeof c=="string"){return resolveRecursive.call(this,e,c,r)}else if(c instanceof o){if(!c.validate)this._compile(c);e=c}else{c=this._schemas[s];if(c instanceof o){if(!c.validate)this._compile(c);if(s==normalizeId(t))return{schema:c,root:e,baseId:i};e=c}else{return}}if(!e.schema)return;i=getFullPath(this._getId(e.schema))}return getJsonPointer.call(this,r,i,e.schema,e)}function resolveRecursive(e,t,r){var a=resolveSchema.call(this,e,t);if(a){var n=a.schema;var i=a.baseId;e=a.root;var o=this._getId(n);if(o)i=resolveUrl(i,o);return getJsonPointer.call(this,r,i,n,e)}}var c=i.toHash(["properties","patternProperties","enum","dependencies","definitions"]);function getJsonPointer(e,t,r,a){e.fragment=e.fragment||"";if(e.fragment.slice(0,1)!="/")return;var n=e.fragment.split("/");for(var o=1;o<n.length;o++){var s=n[o];if(s){s=i.unescapeFragment(s);r=r[s];if(r===undefined)break;var l;if(!c[s]){l=this._getId(r);if(l)t=resolveUrl(t,l);if(r.$ref){var p=resolveUrl(t,r.$ref);var u=resolveSchema.call(this,a,p);if(u){r=u.schema;a=u.root;t=u.baseId}}}}}if(r!==undefined&&r!==a.schema)return{schema:r,root:a,baseId:t}}var l=i.toHash(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum"]);function inlineRef(e,t){if(t===false)return false;if(t===undefined||t===true)return checkNoRef(e);else if(t)return countKeys(e)<=t}function checkNoRef(e){var t;if(Array.isArray(e)){for(var r=0;r<e.length;r++){t=e[r];if(typeof t=="object"&&!checkNoRef(t))return false}}else{for(var a in e){if(a=="$ref")return false;t=e[a];if(typeof t=="object"&&!checkNoRef(t))return false}}return true}function countKeys(e){var t=0,r;if(Array.isArray(e)){for(var a=0;a<e.length;a++){r=e[a];if(typeof r=="object")t+=countKeys(r);if(t==Infinity)return Infinity}}else{for(var n in e){if(n=="$ref")return Infinity;if(l[n]){t++}else{r=e[n];if(typeof r=="object")t+=countKeys(r)+1;if(t==Infinity)return Infinity}}}return t}function getFullPath(e,t){if(t!==false)e=normalizeId(e);var r=a.parse(e);return _getFullPath(r)}function _getFullPath(e){return a.serialize(e).split("#")[0]+"#"}var p=/#\/?$/;function normalizeId(e){return e?e.replace(p,""):""}function resolveUrl(e,t){t=normalizeId(t);return a.resolve(e,t)}function resolveIds(e){var t=normalizeId(this._getId(e));var r={"":t};var o={"":getFullPath(t,false)};var c={};var l=this;s(e,{allKeys:true},(function(e,t,s,p,u,d,m){if(t==="")return;var h=l._getId(e);var v=r[p];var g=o[p]+"/"+u;if(m!==undefined)g+="/"+(typeof m=="number"?m:i.escapeFragment(m));if(typeof h=="string"){h=v=normalizeId(v?a.resolve(v,h):h);var y=l._refs[h];if(typeof y=="string")y=l._refs[y];if(y&&y.schema){if(!n(e,y.schema))throw new Error('id "'+h+'" resolves to more than one schema')}else if(h!=normalizeId(g)){if(h[0]=="#"){if(c[h]&&!n(e,c[h]))throw new Error('id "'+h+'" resolves to more than one schema');c[h]=e}else{l._refs[h]=g}}}r[t]=v;o[t]=g}));return c}},5366:(e,t,r)=>{"use strict";var a=r(6424),n=r(569).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 t=["type","$comment"];var r=["$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=n(t);e.types=n(i);e.forEach((function(r){r.rules=r.rules.map((function(r){var n;if(typeof r=="object"){var i=Object.keys(r)[0];n=r[i];r=i;n.forEach((function(r){t.push(r);e.all[r]=true}))}t.push(r);var o=e.all[r]={keyword:r,code:a[r],implements:n};return o}));e.all.$comment={keyword:"$comment",code:a.$comment};if(r.type)e.types[r.type]=r}));e.keywords=n(t.concat(r));e.custom={};return e}},8392:(e,t,r)=>{"use strict";var a=r(569);e.exports=SchemaObject;function SchemaObject(e){a.copy(e,this)}},7072:e=>{"use strict";e.exports=function ucs2length(e){var t=0,r=e.length,a=0,n;while(a<r){t++;n=e.charCodeAt(a++);if(n>=55296&&n<=56319&&a<r){n=e.charCodeAt(a);if((n&64512)==56320)a++}}return t}},569:(e,t,r)=>{"use strict";e.exports={copy:copy,checkDataType:checkDataType,checkDataTypes:checkDataTypes,coerceToTypes:coerceToTypes,toHash:toHash,getProperty:getProperty,escapeQuotes:escapeQuotes,equal:r(4711),ucs2length:r(7072),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,t){t=t||{};for(var r in e)t[r]=e[r];return t}function checkDataType(e,t,r,a){var n=a?" !== ":" === ",i=a?" || ":" && ",o=a?"!":"",s=a?"":"!";switch(e){case"null":return t+n+"null";case"array":return o+"Array.isArray("+t+")";case"object":return"("+o+t+i+"typeof "+t+n+'"object"'+i+s+"Array.isArray("+t+"))";case"integer":return"(typeof "+t+n+'"number"'+i+s+"("+t+" % 1)"+i+t+n+t+(r?i+o+"isFinite("+t+")":"")+")";case"number":return"(typeof "+t+n+'"'+e+'"'+(r?i+o+"isFinite("+t+")":"")+")";default:return"typeof "+t+n+'"'+e+'"'}}function checkDataTypes(e,t,r){switch(e.length){case 1:return checkDataType(e[0],t,r,true);default:var a="";var n=toHash(e);if(n.array&&n.object){a=n.null?"(":"(!"+t+" || ";a+="typeof "+t+' !== "object")';delete n.null;delete n.array;delete n.object}if(n.number)delete n.integer;for(var i in n)a+=(a?" && ":"")+checkDataType(i,t,r,true);return a}}var a=toHash(["string","number","integer","boolean","null"]);function coerceToTypes(e,t){if(Array.isArray(t)){var r=[];for(var n=0;n<t.length;n++){var i=t[n];if(a[i])r[r.length]=i;else if(e==="array"&&i==="array")r[r.length]=i}if(r.length)return r}else if(a[t]){return[t]}else if(e==="array"&&t==="array"){return["array"]}}function toHash(e){var t={};for(var r=0;r<e.length;r++)t[e[r]]=true;return t}var n=/^[a-z$_][a-z$_0-9]*$/i;var i=/'|\\/g;function getProperty(e){return typeof e=="number"?"["+e+"]":n.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,t){t+="[^0-9]";var r=e.match(new RegExp(t,"g"));return r?r.length:0}function varReplace(e,t,r){t+="([^0-9])";r=r.replace(/\$/g,"$$$$");return e.replace(new RegExp(t,"g"),r+"$1")}function schemaHasRules(e,t){if(typeof e=="boolean")return!e;for(var r in e)if(t[r])return true}function schemaHasRulesExcept(e,t,r){if(typeof e=="boolean")return!e&&r!="not";for(var a in e)if(a!=r&&t[a])return true}function schemaUnknownRules(e,t){if(typeof e=="boolean")return;for(var r in e)if(!t[r])return r}function toQuotedString(e){return"'"+escapeQuotes(e)+"'"}function getPathExpr(e,t,r,a){var n=r?"'/' + "+t+(a?"":".replace(/~/g, '~0').replace(/\\//g, '~1')"):a?"'[' + "+t+" + ']'":"'[\\'' + "+t+" + '\\']'";return joinPaths(e,n)}function getPath(e,t,r){var a=r?toQuotedString("/"+escapeJsonPointer(t)):toQuotedString(getProperty(t));return joinPaths(e,a)}var o=/^\/(?:[^~]|~0|~1)*$/;var s=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function getData(e,t,r){var a,n,i,c;if(e==="")return"rootData";if(e[0]=="/"){if(!o.test(e))throw new Error("Invalid JSON-pointer: "+e);n=e;i="rootData"}else{c=e.match(s);if(!c)throw new Error("Invalid JSON-pointer: "+e);a=+c[1];n=c[2];if(n=="#"){if(a>=t)throw new Error("Cannot access property/index "+a+" levels up, current level is "+t);return r[t-a]}if(a>t)throw new Error("Cannot access data "+a+" levels up, current level is "+t);i="data"+(t-a||"");if(!n)return i}var l=i;var p=n.split("/");for(var u=0;u<p.length;u++){var d=p[u];if(d){i+=getProperty(unescapeJsonPointer(d));l+=" && "+i}}return l}function joinPaths(e,t){if(e=='""')return t;return(e+" + "+t).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,"~")}},931:e=>{"use strict";var t=["multipleOf","maximum","exclusiveMaximum","minimum","exclusiveMinimum","maxLength","minLength","pattern","additionalItems","maxItems","minItems","uniqueItems","maxProperties","minProperties","required","additionalProperties","enum","format","const"];e.exports=function(e,r){for(var a=0;a<r.length;a++){e=JSON.parse(JSON.stringify(e));var n=r[a].split("/");var i=e;var o;for(o=1;o<n.length;o++)i=i[n[o]];for(o=0;o<t.length;o++){var s=t[o];var c=i[s];if(c){i[s]={anyOf:[c,{$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"}]}}}}return e}},5794:(e,t,r)=>{"use strict";var a=r(7120);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"}]}}}},3558:e=>{"use strict";e.exports=function generate__limit(e,t,r){var a=" ";var n=e.level;var i=e.dataLevel;var o=e.schema[t];var s=e.schemaPath+e.util.getProperty(t);var c=e.errSchemaPath+"/"+t;var l=!e.opts.allErrors;var p;var u="data"+(i||"");var d=e.opts.$data&&o&&o.$data,m;if(d){a+=" var schema"+n+" = "+e.util.getData(o.$data,i,e.dataPathArr)+"; ";m="schema"+n}else{m=o}var h=t=="maximum",v=h?"exclusiveMaximum":"exclusiveMinimum",g=e.schema[v],y=e.opts.$data&&g&&g.$data,b=h?"<":">",x=h?">":"<",p=undefined;if(!(d||typeof o=="number"||o===undefined)){throw new Error(t+" must be number")}if(!(y||g===undefined||typeof g=="number"||typeof g=="boolean")){throw new Error(v+" must be number or boolean")}if(y){var S=e.util.getData(g.$data,i,e.dataPathArr),w="exclusive"+n,_="exclType"+n,C="exclIsNumber"+n,P="op"+n,E="' + "+P+" + '";a+=" var schemaExcl"+n+" = "+S+"; ";S="schemaExcl"+n;a+=" var "+w+"; var "+_+" = typeof "+S+"; if ("+_+" != 'boolean' && "+_+" != 'undefined' && "+_+" != 'number') { ";var p=v;var k=k||[];k.push(a);a="";if(e.createErrors!==false){a+=" { keyword: '"+(p||"_exclusiveLimit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: {} ";if(e.opts.messages!==false){a+=" , message: '"+v+" should be boolean' "}if(e.opts.verbose){a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "}a+=" } "}else{a+=" {} "}var I=a;a=k.pop();if(!e.compositeRule&&l){if(e.async){a+=" throw new ValidationError(["+I+"]); "}else{a+=" validate.errors = ["+I+"]; return false; "}}else{a+=" var err = "+I+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}a+=" } else if ( ";if(d){a+=" ("+m+" !== undefined && typeof "+m+" != 'number') || "}a+=" "+_+" == 'number' ? ( ("+w+" = "+m+" === undefined || "+S+" "+b+"= "+m+") ? "+u+" "+x+"= "+S+" : "+u+" "+x+" "+m+" ) : ( ("+w+" = "+S+" === true) ? "+u+" "+x+"= "+m+" : "+u+" "+x+" "+m+" ) || "+u+" !== "+u+") { var op"+n+" = "+w+" ? '"+b+"' : '"+b+"='; ";if(o===undefined){p=v;c=e.errSchemaPath+"/"+v;m=S;d=y}}else{var C=typeof g=="number",E=b;if(C&&d){var P="'"+E+"'";a+=" if ( ";if(d){a+=" ("+m+" !== undefined && typeof "+m+" != 'number') || "}a+=" ( "+m+" === undefined || "+g+" "+b+"= "+m+" ? "+u+" "+x+"= "+g+" : "+u+" "+x+" "+m+" ) || "+u+" !== "+u+") { "}else{if(C&&o===undefined){w=true;p=v;c=e.errSchemaPath+"/"+v;m=g;x+="="}else{if(C)m=Math[h?"min":"max"](g,o);if(g===(C?m:true)){w=true;p=v;c=e.errSchemaPath+"/"+v;x+="="}else{w=false;E+="="}}var P="'"+E+"'";a+=" if ( ";if(d){a+=" ("+m+" !== undefined && typeof "+m+" != 'number') || "}a+=" "+u+" "+x+" "+m+" || "+u+" !== "+u+") { "}}p=p||t;var k=k||[];k.push(a);a="";if(e.createErrors!==false){a+=" { keyword: '"+(p||"_limit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { comparison: "+P+", limit: "+m+", exclusive: "+w+" } ";if(e.opts.messages!==false){a+=" , message: 'should be "+E+" ";if(d){a+="' + "+m}else{a+=""+m+"'"}}if(e.opts.verbose){a+=" , schema: ";if(d){a+="validate.schema"+s}else{a+=""+o}a+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "}a+=" } "}else{a+=" {} "}var I=a;a=k.pop();if(!e.compositeRule&&l){if(e.async){a+=" throw new ValidationError(["+I+"]); "}else{a+=" validate.errors = ["+I+"]; return false; "}}else{a+=" var err = "+I+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}a+=" } ";if(l){a+=" else { "}return a}},7564:e=>{"use strict";e.exports=function generate__limitItems(e,t,r){var a=" ";var n=e.level;var i=e.dataLevel;var o=e.schema[t];var s=e.schemaPath+e.util.getProperty(t);var c=e.errSchemaPath+"/"+t;var l=!e.opts.allErrors;var p;var u="data"+(i||"");var d=e.opts.$data&&o&&o.$data,m;if(d){a+=" var schema"+n+" = "+e.util.getData(o.$data,i,e.dataPathArr)+"; ";m="schema"+n}else{m=o}if(!(d||typeof o=="number")){throw new Error(t+" must be number")}var h=t=="maxItems"?">":"<";a+="if ( ";if(d){a+=" ("+m+" !== undefined && typeof "+m+" != 'number') || "}a+=" "+u+".length "+h+" "+m+") { ";var p=t;var v=v||[];v.push(a);a="";if(e.createErrors!==false){a+=" { keyword: '"+(p||"_limitItems")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { limit: "+m+" } ";if(e.opts.messages!==false){a+=" , message: 'should NOT have ";if(t=="maxItems"){a+="more"}else{a+="fewer"}a+=" than ";if(d){a+="' + "+m+" + '"}else{a+=""+o}a+=" items' "}if(e.opts.verbose){a+=" , schema: ";if(d){a+="validate.schema"+s}else{a+=""+o}a+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "}a+=" } "}else{a+=" {} "}var g=a;a=v.pop();if(!e.compositeRule&&l){if(e.async){a+=" throw new ValidationError(["+g+"]); "}else{a+=" validate.errors = ["+g+"]; return false; "}}else{a+=" var err = "+g+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}a+="} ";if(l){a+=" else { "}return a}},7054:e=>{"use strict";e.exports=function generate__limitLength(e,t,r){var a=" ";var n=e.level;var i=e.dataLevel;var o=e.schema[t];var s=e.schemaPath+e.util.getProperty(t);var c=e.errSchemaPath+"/"+t;var l=!e.opts.allErrors;var p;var u="data"+(i||"");var d=e.opts.$data&&o&&o.$data,m;if(d){a+=" var schema"+n+" = "+e.util.getData(o.$data,i,e.dataPathArr)+"; ";m="schema"+n}else{m=o}if(!(d||typeof o=="number")){throw new Error(t+" must be number")}var h=t=="maxLength"?">":"<";a+="if ( ";if(d){a+=" ("+m+" !== undefined && typeof "+m+" != 'number') || "}if(e.opts.unicode===false){a+=" "+u+".length "}else{a+=" ucs2length("+u+") "}a+=" "+h+" "+m+") { ";var p=t;var v=v||[];v.push(a);a="";if(e.createErrors!==false){a+=" { keyword: '"+(p||"_limitLength")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { limit: "+m+" } ";if(e.opts.messages!==false){a+=" , message: 'should NOT be ";if(t=="maxLength"){a+="longer"}else{a+="shorter"}a+=" than ";if(d){a+="' + "+m+" + '"}else{a+=""+o}a+=" characters' "}if(e.opts.verbose){a+=" , schema: ";if(d){a+="validate.schema"+s}else{a+=""+o}a+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "}a+=" } "}else{a+=" {} "}var g=a;a=v.pop();if(!e.compositeRule&&l){if(e.async){a+=" throw new ValidationError(["+g+"]); "}else{a+=" validate.errors = ["+g+"]; return false; "}}else{a+=" var err = "+g+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}a+="} ";if(l){a+=" else { "}return a}},9763:e=>{"use strict";e.exports=function generate__limitProperties(e,t,r){var a=" ";var n=e.level;var i=e.dataLevel;var o=e.schema[t];var s=e.schemaPath+e.util.getProperty(t);var c=e.errSchemaPath+"/"+t;var l=!e.opts.allErrors;var p;var u="data"+(i||"");var d=e.opts.$data&&o&&o.$data,m;if(d){a+=" var schema"+n+" = "+e.util.getData(o.$data,i,e.dataPathArr)+"; ";m="schema"+n}else{m=o}if(!(d||typeof o=="number")){throw new Error(t+" must be number")}var h=t=="maxProperties"?">":"<";a+="if ( ";if(d){a+=" ("+m+" !== undefined && typeof "+m+" != 'number') || "}a+=" Object.keys("+u+").length "+h+" "+m+") { ";var p=t;var v=v||[];v.push(a);a="";if(e.createErrors!==false){a+=" { keyword: '"+(p||"_limitProperties")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { limit: "+m+" } ";if(e.opts.messages!==false){a+=" , message: 'should NOT have ";if(t=="maxProperties"){a+="more"}else{a+="fewer"}a+=" than ";if(d){a+="' + "+m+" + '"}else{a+=""+o}a+=" properties' "}if(e.opts.verbose){a+=" , schema: ";if(d){a+="validate.schema"+s}else{a+=""+o}a+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "}a+=" } "}else{a+=" {} "}var g=a;a=v.pop();if(!e.compositeRule&&l){if(e.async){a+=" throw new ValidationError(["+g+"]); "}else{a+=" validate.errors = ["+g+"]; return false; "}}else{a+=" var err = "+g+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}a+="} ";if(l){a+=" else { "}return a}},1046:e=>{"use strict";e.exports=function generate_allOf(e,t,r){var a=" ";var n=e.schema[t];var i=e.schemaPath+e.util.getProperty(t);var o=e.errSchemaPath+"/"+t;var s=!e.opts.allErrors;var c=e.util.copy(e);var l="";c.level++;var p="valid"+c.level;var u=c.baseId,d=true;var m=n;if(m){var h,v=-1,g=m.length-1;while(v<g){h=m[v+=1];if(e.opts.strictKeywords?typeof h=="object"&&Object.keys(h).length>0||h===false:e.util.schemaHasRules(h,e.RULES.all)){d=false;c.schema=h;c.schemaPath=i+"["+v+"]";c.errSchemaPath=o+"/"+v;a+=" "+e.validate(c)+" ";c.baseId=u;if(s){a+=" if ("+p+") { ";l+="}"}}}}if(s){if(d){a+=" if (true) { "}else{a+=" "+l.slice(0,-1)+" "}}return a}},3463:e=>{"use strict";e.exports=function generate_anyOf(e,t,r){var a=" ";var n=e.level;var i=e.dataLevel;var o=e.schema[t];var s=e.schemaPath+e.util.getProperty(t);var c=e.errSchemaPath+"/"+t;var l=!e.opts.allErrors;var p="data"+(i||"");var u="valid"+n;var d="errs__"+n;var m=e.util.copy(e);var h="";m.level++;var v="valid"+m.level;var g=o.every((function(t){return e.opts.strictKeywords?typeof t=="object"&&Object.keys(t).length>0||t===false:e.util.schemaHasRules(t,e.RULES.all)}));if(g){var y=m.baseId;a+=" var "+d+" = errors; var "+u+" = false; ";var b=e.compositeRule;e.compositeRule=m.compositeRule=true;var x=o;if(x){var S,w=-1,_=x.length-1;while(w<_){S=x[w+=1];m.schema=S;m.schemaPath=s+"["+w+"]";m.errSchemaPath=c+"/"+w;a+=" "+e.validate(m)+" ";m.baseId=y;a+=" "+u+" = "+u+" || "+v+"; if (!"+u+") { ";h+="}"}}e.compositeRule=m.compositeRule=b;a+=" "+h+" if (!"+u+") { var err = ";if(e.createErrors!==false){a+=" { keyword: '"+"anyOf"+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: {} ";if(e.opts.messages!==false){a+=" , message: 'should match some schema in anyOf' "}if(e.opts.verbose){a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+p+" "}a+=" } "}else{a+=" {} "}a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";if(!e.compositeRule&&l){if(e.async){a+=" throw new ValidationError(vErrors); "}else{a+=" validate.errors = vErrors; return false; "}}a+=" } else { errors = "+d+"; if (vErrors !== null) { if ("+d+") vErrors.length = "+d+"; else vErrors = null; } ";if(e.opts.allErrors){a+=" } "}}else{if(l){a+=" if (true) { "}}return a}},729:e=>{"use strict";e.exports=function generate_comment(e,t,r){var a=" ";var n=e.schema[t];var i=e.errSchemaPath+"/"+t;var o=!e.opts.allErrors;var s=e.util.toQuotedString(n);if(e.opts.$comment===true){a+=" console.log("+s+");"}else if(typeof e.opts.$comment=="function"){a+=" self._opts.$comment("+s+", "+e.util.toQuotedString(i)+", validate.root.schema);"}return a}},5523:e=>{"use strict";e.exports=function generate_const(e,t,r){var a=" ";var n=e.level;var i=e.dataLevel;var o=e.schema[t];var s=e.schemaPath+e.util.getProperty(t);var c=e.errSchemaPath+"/"+t;var l=!e.opts.allErrors;var p="data"+(i||"");var u="valid"+n;var d=e.opts.$data&&o&&o.$data,m;if(d){a+=" var schema"+n+" = "+e.util.getData(o.$data,i,e.dataPathArr)+"; ";m="schema"+n}else{m=o}if(!d){a+=" var schema"+n+" = validate.schema"+s+";"}a+="var "+u+" = equal("+p+", schema"+n+"); if (!"+u+") { ";var h=h||[];h.push(a);a="";if(e.createErrors!==false){a+=" { keyword: '"+"const"+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { allowedValue: schema"+n+" } ";if(e.opts.messages!==false){a+=" , message: 'should be equal to constant' "}if(e.opts.verbose){a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+p+" "}a+=" } "}else{a+=" {} "}var v=a;a=h.pop();if(!e.compositeRule&&l){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(l){a+=" else { "}return a}},6575:e=>{"use strict";e.exports=function generate_contains(e,t,r){var a=" ";var n=e.level;var i=e.dataLevel;var o=e.schema[t];var s=e.schemaPath+e.util.getProperty(t);var c=e.errSchemaPath+"/"+t;var l=!e.opts.allErrors;var p="data"+(i||"");var u="valid"+n;var d="errs__"+n;var m=e.util.copy(e);var h="";m.level++;var v="valid"+m.level;var g="i"+n,y=m.dataLevel=e.dataLevel+1,b="data"+y,x=e.baseId,S=e.opts.strictKeywords?typeof o=="object"&&Object.keys(o).length>0||o===false:e.util.schemaHasRules(o,e.RULES.all);a+="var "+d+" = errors;var "+u+";";if(S){var w=e.compositeRule;e.compositeRule=m.compositeRule=true;m.schema=o;m.schemaPath=s;m.errSchemaPath=c;a+=" var "+v+" = false; for (var "+g+" = 0; "+g+" < "+p+".length; "+g+"++) { ";m.errorPath=e.util.getPathExpr(e.errorPath,g,e.opts.jsonPointers,true);var _=p+"["+g+"]";m.dataPathArr[y]=g;var C=e.validate(m);m.baseId=x;if(e.util.varOccurences(C,b)<2){a+=" "+e.util.varReplace(C,b,_)+" "}else{a+=" var "+b+" = "+_+"; "+C+" "}a+=" if ("+v+") break; } ";e.compositeRule=m.compositeRule=w;a+=" "+h+" if (!"+v+") {"}else{a+=" if ("+p+".length == 0) {"}var P=P||[];P.push(a);a="";if(e.createErrors!==false){a+=" { keyword: '"+"contains"+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: {} ";if(e.opts.messages!==false){a+=" , message: 'should contain a valid item' "}if(e.opts.verbose){a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+p+" "}a+=" } "}else{a+=" {} "}var E=a;a=P.pop();if(!e.compositeRule&&l){if(e.async){a+=" throw new ValidationError(["+E+"]); "}else{a+=" validate.errors = ["+E+"]; return false; "}}else{a+=" var err = "+E+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}a+=" } else { ";if(S){a+=" errors = "+d+"; if (vErrors !== null) { if ("+d+") vErrors.length = "+d+"; else vErrors = null; } "}if(e.opts.allErrors){a+=" } "}return a}},7409:e=>{"use strict";e.exports=function generate_custom(e,t,r){var a=" ";var n=e.level;var i=e.dataLevel;var o=e.schema[t];var s=e.schemaPath+e.util.getProperty(t);var c=e.errSchemaPath+"/"+t;var l=!e.opts.allErrors;var p;var u="data"+(i||"");var d="valid"+n;var m="errs__"+n;var h=e.opts.$data&&o&&o.$data,v;if(h){a+=" var schema"+n+" = "+e.util.getData(o.$data,i,e.dataPathArr)+"; ";v="schema"+n}else{v=o}var g=this,y="definition"+n,b=g.definition,x="";var S,w,_,C,P;if(h&&b.$data){P="keywordValidate"+n;var E=b.