rsnext/packages/next/compiled/conf/index.js

1 line
146 KiB
JavaScript
Raw Normal View History

module.exports=(()=>{var f={1313:(f,e,n)=>{"use strict";var s=n(6225),l=n(974),v=n(4970),r=n(7822),b=n(8093),g=n(4571),w=n(9594),j=n(1668),d=n(4403);f.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=n(8316);var E=n(4319);Ajv.prototype.addKeyword=E.add;Ajv.prototype.getKeyword=E.get;Ajv.prototype.removeKeyword=E.remove;Ajv.prototype.validateKeyword=E.validate;var R=n(7137);Ajv.ValidationError=R.Validation;Ajv.MissingRefError=R.MissingRef;Ajv.$dataMetaSchema=j;var A="http://json-schema.org/draft-07/schema";var F=["removeAdditional","useDefaults","coerceTypes","strictDefaults"];var p=["/properties"];function Ajv(f){if(!(this instanceof Ajv))return new Ajv(f);f=this._opts=d.copy(f)||{};setLogger(this);this._schemas={};this._refs={};this._fragments={};this._formats=g(f.format);this._cache=f.cache||new v;this._loadingSchemas={};this._compilations=[];this.RULES=w();this._getId=chooseGetId(f);f.loopRequired=f.loopRequired||Infinity;if(f.errorDataPath=="property")f._errorDataPathProperty=true;if(f.serialize===undefined)f.serialize=b;this._metaOpts=getMetaSchemaOptions(this);if(f.formats)addInitialFormats(this);if(f.keywords)addInitialKeywords(this);addDefaultMetaSchema(this);if(typeof f.meta=="object")this.addMetaSchema(f.meta);if(f.nullable)this.addKeyword("nullable",{metaSchema:{type:"boolean"}});addInitialSchemas(this)}function validate(f,e){var n;if(typeof f=="string"){n=this.getSchema(f);if(!n)throw new Error('no schema with key or ref "'+f+'"')}else{var s=this._addSchema(f);n=s.validate||this._compile(s)}var l=n(e);if(n.$async!==true)this.errors=n.errors;return l}function compile(f,e){var n=this._addSchema(f,undefined,e);return n.validate||this._compile(n)}function addSchema(f,e,n,s){if(Array.isArray(f)){for(var v=0;v<f.length;v++)this.addSchema(f[v],undefined,n,s);return this}var r=this._getId(f);if(r!==undefined&&typeof r!="string")throw new Error("schema id must be string");e=l.normalizeId(e||r);checkUnique(this,e);this._schemas[e]=this._addSchema(f,n,s,true);return this}function addMetaSchema(f,e,n){this.addSchema(f,e,n,true);return this}function validateSchema(f,e){var n=f.$schema;if(n!==undefined&&typeof n!="string")throw new Error("$schema must be a string");n=n||this._opts.defaultMeta||defaultMeta(this);if(!n){this.logger.warn("meta-schema not available");this.errors=null;return true}var s=this.validate(n,f);if(!s&&e){var l="schema is invalid: "+this.errorsText();if(this._opts.validateSchema=="log")this.logger.error(l);else throw new Error(l)}return s}function defaultMeta(f){var e=f._opts.meta;f._opts.defaultMeta=typeof e=="object"?f._getId(e)||e:f.getSchema(A)?A:undefined;return f._opts.defaultMeta}function getSchema(f){var e=_getSchemaObj(this,f);switch(typeof e){case"object":return e.validate||this._compile(e);case"string":return this.getSchema(e);case"undefined":return _getSchemaFragment(this,f)}}function _getSchemaFragment(f,e){var n=l.schema.call(f,{schema:{}},e);if(n){var v=n.schema,b=n.root,g=n.baseId;var w=s.call(f,v,b,undefined,g);f._fragments[e]=new r({ref:e,fragment:true,schema:v,root:b,baseId:g,validate:w});return w}}function _getSchemaObj(f,e){e=l.normalizeId(e);return f._schemas[e]||f._refs[e]||f._fragments[e]}function removeSchema(f){if(f instanceof RegExp){_removeAllSchemas(this,this._schemas,f);_removeAllSchemas(this,this._refs,f);return this}switch(typeof f){case"undefined":_removeAllSchemas(this,this._schemas);_removeAllSchemas(this,this._refs);this._cache.clear();return this;case"string":var e=_getSchemaObj(this,f);if(e)this._cache.del(e.cacheKey);delete this._schemas[f];delete this._refs[f];return this;case"object":var n=this._opts.serialize;var s=n?n(f):f;this._cache.del(s);var v=this._getId(f);if(v){v=l.normalizeI