-
Notifications
You must be signed in to change notification settings - Fork 31
/
djv.js.map
1 lines (1 loc) · 157 KB
/
djv.js.map
1
{"version":3,"sources":["webpack:///webpack/universalModuleDefinition","webpack:///djv.js","webpack:///webpack/bootstrap 953d4406a3724a01e805","webpack:///./lib/utils/index.js","webpack:///./lib/utils/schema.js","webpack:///./lib/utils/template.js","webpack:///./lib/utils/formats.js","webpack:///./lib/validators/index.js","webpack:///./lib/utils/properties.js","webpack:///./lib/utils/keywords.js","webpack:///./lib/utils/uri.js","webpack:///./lib/djv.js","webpack:///./lib/utils/state.js","webpack:///./lib/validators/required.js","webpack:///./lib/validators/format.js","webpack:///./lib/validators/property.js","webpack:///./lib/validators/type.js","webpack:///./lib/utils/types.js","webpack:///./lib/validators/$ref.js","webpack:///./lib/validators/not.js","webpack:///./lib/validators/anyOf.js","webpack:///./lib/validators/oneOf.js","webpack:///./lib/validators/allOf.js","webpack:///./lib/validators/dependencies.js","webpack:///./lib/validators/properties.js","webpack:///./lib/validators/patternProperties.js","webpack:///./lib/validators/items.js","webpack:///./lib/validators/contains.js","webpack:///./lib/validators/const.js","webpack:///./lib/validators/propertyNames.js","webpack:///./lib/utils/environment.js","webpack:///external \"@korzio/djv-draft-04\""],"names":["root","factory","exports","module","require","define","amd","self","this","__WEBPACK_EXTERNAL_MODULE_29__","modules","__webpack_require__","moduleId","installedModules","i","l","call","m","c","d","name","getter","o","Object","defineProperty","configurable","enumerable","get","n","__esModule","object","property","prototype","hasOwnProperty","p","s","asExpression","fn","schema","tpl","hasProperty","_typeof","Symbol","iterator","obj","constructor","_defineProperty","key","value","writable","is","transform","transformation","ANY_SCHEMA","NOT_ANY_SCHEMA","make","instance","enum","Array","isArray","items","map","additionalItems","required","keys","properties","reduce","memo","assign","not","_toConsumableArray","arr","arr2","length","from","sanitizeString","str","sanitzedStr","String","replace","trim","template","state","options","expression","_len","arguments","args","_key","last","lines","push","match","index","shift","clearDecode","tplString","dataToString","join","error","errorHandler","errorType","path","data","toString","dataPath","schemaPath","cachedIndex","cached","cache","layer","link","url","visit","pop","restore","source","_ref","undefined","inner","Function","makeVariables","_ref2","defineErrors","makeHelpers","_ref3","context","functions","references","forEach","concat","makeContent","variables","errors","body","_ref4","_ref5","_ref6","templateExpression","strings","_len2","_key2","_len3","values","_key3","dict","result","Number","isInteger","_taggedTemplateLiteral","raw","freeze","defineProperties","_templateObject","_templateObject2","_templateObject3","_templateObject4","_templateObject5","_templateObject6","_templateObject7","_templateObject8","_templateObject9","_templateObject10","_templateObject11","_templateObject12","_templateObject13","_templateObject14","_templateObject15","_templateObject16","_templateObject17","_require","alpha","alphanumeric","identifier","hexadecimal","numeric","date-time","uppercase","lowercase","hostname","uri","email","ipv4","ipv6","regex","json-pointer","uri-reference","uri-template","format","type","$ref","anyOf","oneOf","allOf","dependencies","patternProperties","contains","constant","propertyNames","list","readOnly","exclusiveMinimum","minimum","exclusiveMaximum","maximum","multipleOf","pattern","modifiers","RegExp","minLength","maxLength","minItems","maxItems","uniqueItems","minProperties","maxProperties","$1","comparedValue","JSON","stringify","escape","head","split","REGEXP_URI_FRAGMENT","isFullUri","REGEXP_URI","test","REGEXP_URI_PATH","fragment","makePath","parts","filter","part","id","indexOf","sharpUriIndex","slice","partialUri","normalize","decodeURIComponent","Environment","resolved","State","useVersion","version","versionConfigure","addFormat","formats","_require2","generate","_require3","add","use","validate","resolve","addSchema","_this","realSchema","removeSchema","export","_this2","import","config","_this3","item","parse","restoreData","_restoreData$key","formatter","setErrorHandler","configure","env","entries","Map","validators","_require4","_require5","isSchema","transformSchema","create","addEntry","entry","set","revealReference","doubled","resolveReference","reference","lastFullURIReference","lastFullURISchemaIndex","_i","partialReferences","_i3","partialReference","ascend","_ref$schema","parentSchema","descend","uriFragment","currentSchema","subSchema","definitions","fullReference","pseudoSchema","initialLength","some","validator","keywords","condition","types","null","string","boolean","number","integer","array","date","fns","cachedArr","count","cachedCount","dependency","propertyKey","propertySchema","isNotRequired","hasAdditionalProperties","additionalProperties","hasPatternProperties","visitAdditionalProperties","itemsLength","zeroIndex","apply","makeSchema","constantInstanceSchema","const","environmentConfig","patchEnvironment"],"mappings":"CAAA,SAAAA,EAAAC,GACA,gBAAAC,UAAA,gBAAAC,QACAA,OAAAD,QAAAD,EAAAG,QAAA,yBACA,kBAAAC,gBAAAC,IACAD,QAAA,wBAAAJ,GACA,gBAAAC,SACAA,QAAA,IAAAD,EAAAG,QAAA,yBAEAJ,EAAA,IAAAC,EAAAD,EAAA,0BACC,mBAAAO,WAAAC,KAAA,SAAAC,GACD,MCAgB,UAAUC,GCN1B,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAV,OAGA,IAAAC,GAAAU,EAAAD,IACAE,EAAAF,EACAG,GAAA,EACAb,WAUA,OANAQ,GAAAE,GAAAI,KAAAb,EAAAD,QAAAC,IAAAD,QAAAS,GAGAR,EAAAY,GAAA,EAGAZ,EAAAD,QAvBA,GAAAW,KA4DA,OAhCAF,GAAAM,EAAAP,EAGAC,EAAAO,EAAAL,EAGAF,EAAAQ,EAAA,SAAAjB,EAAAkB,EAAAC,GACAV,EAAAW,EAAApB,EAAAkB,IACAG,OAAAC,eAAAtB,EAAAkB,GACAK,cAAA,EACAC,YAAA,EACAC,IAAAN,KAMAV,EAAAiB,EAAA,SAAAzB,GACA,GAAAkB,GAAAlB,KAAA0B,WACA,WAA2B,MAAA1B,GAAA,SAC3B,WAAiC,MAAAA,GAEjC,OADAQ,GAAAQ,EAAAE,EAAA,IAAAA,GACAA,GAIAV,EAAAW,EAAA,SAAAQ,EAAAC,GAAsD,MAAAR,QAAAS,UAAAC,eAAAjB,KAAAc,EAAAC,IAGtDpB,EAAAuB,EAAA,GAGAvB,IAAAwB,EAAA,KDgBM,SAAUhC,EAAQD,EAASS,GAEjC,YE9DA,SAASyB,GAAaC,EAAIC,EAAQC,GAChC,MAAkB,kBAAPF,GACFA,EAGFA,EAAGC,EAAQC,GAYpB,QAASC,GAAYV,EAAQC,GAC3B,MACoB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MAAiD8D,M5B8hE7C,SAAUhG,EAAQD,EAASS,GAEjC,Y6B5hEA,SAASgP,GAAIP,EAASkB,GACpBwE,EAAkB1F,GAAWkB,EAG/B,QAASV,GAAIR,GACX,GAAKA,GAAY0F,EAAkB1F,GAAnC,EAKA2F,EADyBD,EAAkB1F,KAEzCnL,aACAiP,WACAhC,aACA3B,UACAvL,OACAZ,oBAzBJ,GAAMa,GAAatD,EAAQ,GACrBuS,EAAWvS,EAAQ,GACnBuQ,EAAavQ,EAAQ,GACrB4O,EAAU5O,EAAQ,G7B+iEpB+J,E6B9iEa/J,EAAQ,GAAjBqD,E7B+iEG0G,E6B/iEH1G,K7BijEJwL,E6BhjEuB7O,EAAQ,GAA3ByC,E7BijEaoM,E6BjjEbpM,eAEF0R,IAsBN3U,GAAOD,SACLyP,MACAC,Q7BsjEI,SAAUzP,EAAQD,G8B1lExBC,EAAAD,QAAAO","file":"djv.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"@korzio/djv-draft-04\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"@korzio/djv-draft-04\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"djv\"] = factory(require(\"@korzio/djv-draft-04\"));\n\telse\n\t\troot[\"djv\"] = factory(root[\"@korzio/djv-draft-04\"]);\n})(typeof self !== 'undefined' ? self : this, function(__WEBPACK_EXTERNAL_MODULE_29__) {\nreturn \n\n\n// WEBPACK FOOTER //\n// webpack/universalModuleDefinition","(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"@korzio/djv-draft-04\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"@korzio/djv-draft-04\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"djv\"] = factory(require(\"@korzio/djv-draft-04\"));\n\telse\n\t\troot[\"djv\"] = factory(root[\"@korzio/djv-draft-04\"]);\n})(typeof self !== 'undefined' ? self : this, function(__WEBPACK_EXTERNAL_MODULE_29__) {\nreturn /******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId]) {\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, {\n/******/ \t\t\t\tconfigurable: false,\n/******/ \t\t\t\tenumerable: true,\n/******/ \t\t\t\tget: getter\n/******/ \t\t\t});\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 8);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\n/**\n * @module utils\n * @description\n * Basic utilities for djv project\n */\n\n/**\n * @name asExpression\n * @type {function}\n * @description\n * Transform function or string to expression\n * @see validators\n * @param {function|string} fn\n * @param {object} schema\n * @param {object} tpl templater instance\n * @returns {string} expression\n */\nfunction asExpression(fn, schema, tpl) {\n if (typeof fn !== 'function') {\n return fn;\n }\n\n return fn(schema, tpl);\n}\n\n/**\n * @name hasProperty\n * @type {function}\n * @description\n * Check if the property exists in a given object\n * @param {object} object\n * @param {string} property\n * @returns {boolean} exists\n */\nfunction hasProperty(object, property) {\n return (typeof object === 'undefined' ? 'undefined' : _typeof(object)) === 'object' && Object.prototype.hasOwnProperty.call(object, property);\n}\n\nmodule.exports = {\n asExpression: asExpression,\n hasProperty: hasProperty\n};\n\n/***/ }),\n/* 1 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n/**\n * @module schema\n * @description\n * Low-level utilities to check, create and transform schemas\n */\n\n/**\n * @name transformation\n * @type {object}\n * @description\n * Schema values transformation\n */\nvar transformation = {\n ANY_SCHEMA: {},\n NOT_ANY_SCHEMA: { not: {} }\n};\n\n/**\n * @name is\n * @type {function}\n * @description\n * Verify the object could be a schema\n * Since draft-06 supports boolean as a schema definition\n * @param {object} schema\n * @returns {boolean} isSchema\n */\nfunction is(schema) {\n return (typeof schema === 'undefined' ? 'undefined' : _typeof(schema)) === 'object' || typeof schema === 'boolean';\n}\n\n/**\n * @name transform\n * @type {function}\n * @description\n * Transform a schema pseudo presentation\n * Since draft-06 supports boolean as a schema definition\n * @param {object} schema\n * @returns {object} schema\n */\nfunction transform(schema) {\n if (schema === true) {\n return transformation.ANY_SCHEMA;\n } else if (schema === false) {\n return transformation.NOT_ANY_SCHEMA;\n }\n return schema;\n}\n\n/**\n * @name make\n * @type {function}\n * @description\n * Generate a simple schema by a given object\n * @param {any} instance\n * @returns {object} schema\n */\nfunction make(instance) {\n if ((typeof instance === 'undefined' ? 'undefined' : _typeof(instance)) !== 'object' || instance === null) {\n return { enum: [instance] };\n }\n\n if (Array.isArray(instance)) {\n return {\n items: instance.map(make),\n // other items should be valid by `false` schema, aka not exist at all\n additionalItems: false\n };\n }\n\n var required = Object.keys(instance);\n return {\n properties: required.reduce(function (memo, key) {\n return Object.assign({}, memo, _defineProperty({}, key, make(instance[key])));\n }, {}),\n required: required\n // other properties should be valid by `false` schema, aka not exist at all\n // additionalProperties: false,\n };\n}\n\nmodule.exports = {\n is: is,\n make: make,\n transform: transform,\n transformation: transformation\n};\n\n/***/ }),\n/* 2 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nfunction _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }\n\n/**\n * @module template\n * @description\n * Defines a small templater functionality for creating functions body.\n */\n\nfunction sanitizeString(str) {\n if (typeof str !== 'string') {\n return str;\n }\n\n var sanitzedStr = String.prototype.replace.call(str, /[^a-z0-9áéíóúñü .,_-]/gim, '');\n return String.prototype.trim.call(sanitzedStr);\n}\n\n/**\n * @name template\n * @type function\n * @description\n * Provides a templater function, which adds a line of code into generated function body.\n *\n * @param {object} state - used in visit and reference method to iterate and find schemas.\n * @param {DjvConfig} options\n * @return {function} tpl\n */\nfunction template(state, options) {\n function tpl(expression) {\n for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n var last = void 0;\n\n tpl.lines.push(expression.replace(/%i/g, function () {\n return 'i';\n }).replace(/\\$(\\d)/g, function (match, index) {\n return '' + sanitizeString(args[index - 1]);\n }).replace(/(%[sd])/g, function () {\n if (args.length) {\n last = args.shift();\n }\n\n return '' + last;\n }));\n\n return tpl;\n }\n\n function clearDecode(tplString) {\n return tplString.replace('[', '').replace(']', '').replace('(', '').replace(')', '').replace('decodeURIComponent', '');\n }\n\n var error = typeof options.errorHandler === 'function' ? options.errorHandler : function defaultErrorHandler(errorType) {\n var path = this.data.toString().replace(/^data/, '');\n var dataPath = path.replace(/\\['([^']+)'\\]/ig, '.$1').replace(/\\[(i[0-9]*)\\]/ig, '[\\'+$1+\\']');\n var schemaPath = '#' + path.replace(/\\[i([0-9]*)\\]/ig, '/items').replace(/\\['([^']+)'\\]/ig, '/properties/$1') + '/' + errorType;\n\n return 'return {\\n keyword: \\'' + errorType + '\\',\\n dataPath: decodeURIComponent(\"' + clearDecode(dataPath) + '\"),\\n schemaPath: decodeURIComponent(\"' + clearDecode(schemaPath) + '\")\\n };';\n };\n\n Object.assign(tpl, {\n cachedIndex: 0,\n cached: [],\n cache: function cache(expression) {\n var layer = tpl.cached[tpl.cached.length - 1];\n if (layer[expression]) {\n return 'i' + layer[expression];\n }\n\n tpl.cachedIndex += 1;\n layer[expression] = tpl.cachedIndex;\n return '(i' + layer[expression] + ' = ' + expression + ')';\n },\n\n data: ['data'],\n error: error,\n lines: [],\n schema: ['schema'],\n push: tpl,\n /**\n * @name link\n * @description\n * Get schema validator by url\n * Call state link to generate or get cached function\n * @type {function}\n * @param {string} url\n * @return {string} functionName\n */\n link: function link(url) {\n return 'f' + state.link(url);\n },\n\n /**\n * @name visit\n * @description\n * Create new cache scope and visit given schema\n * @type {function}\n * @param {object} schema\n * @return {void}\n */\n visit: function visit(schema) {\n tpl.cached.push({});\n state.visit(schema, tpl);\n tpl.cached.pop();\n }\n });\n\n function dataToString() {\n return this.join('.').replace(/\\.\\[/g, '[');\n }\n tpl.data.toString = dataToString;\n tpl.schema.toString = dataToString;\n\n return tpl;\n}\n\n/**\n * @name restore\n * @type function\n * @description\n * Generate a function by given body with a schema in a closure\n *\n * @param {string} source - function inner & outer body\n * @param {object} schema - passed as argument to meta function\n * @param {DjvConfig} config\n * @return {function} tpl\n */\nfunction restore(source, schema) {\n var _ref = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},\n inner = _ref.inner;\n\n /* eslint-disable no-new-func */\n var tpl = new Function('schema', source)(schema);\n /* eslint-enable no-new-func */\n\n if (!inner) {\n tpl.toString = function toString() {\n return source;\n };\n }\n\n return tpl;\n}\n\n/**\n * Configuration for template functions\n * @typedef {object} TemplateOptions\n * @property {string[]} context\n * @property {string[]} index\n * @property {boolean?} inner - a generating object should be considered as inner\n * @property {boolean?} defineErrors - if erros should be defined\n * @property {string[]} lines - content templates\n */\n\n/**\n * @private\n * @name makeVariables\n * @type function\n * @description\n * Generate internal variables\n *\n * @param {TemplateOptions} options\n * @return {string} variables\n */\nfunction makeVariables(_ref2) {\n var defineErrors = _ref2.defineErrors,\n index = _ref2.index;\n\n /**\n * @var {array} errors - empty array for pushing errors ability\n * @see errorHandler\n */\n var errors = defineErrors ? 'const errors = [];' : '';\n var variables = index ? 'let i' + Array.apply(undefined, _toConsumableArray(Array(index))).map(function (value, i) {\n return i + 1;\n }).join(',i') + ';' : '';\n\n // @see map array with holes trick\n // http://2ality.com/2013/11/initializing-arrays.html\n // TODO change var to const\n return '\\n ' + errors + '\\n ' + variables + '\\n ';\n}\n\n/**\n * @private\n * @name makeHelpers\n * @type function\n * @description\n * Generate internal helpers executed in outer function\n *\n * @param {TemplateOptions} options\n * @return {string} functions\n */\nfunction makeHelpers(_ref3) {\n var context = _ref3.context,\n inner = _ref3.inner;\n\n if (inner || !context.length) {\n return '';\n }\n\n var functions = [];\n var references = [];\n\n context.forEach(function (value, i) {\n if (typeof value === 'number') {\n references.push(i + 1 + ' = f' + (value + 1));\n return;\n }\n functions.push(i + 1 + ' = ' + value);\n });\n\n return 'const f' + functions.concat(references).join(', f') + ';';\n}\n\n/**\n * @private\n * @name makeContent\n * @type function\n * @description\n * Generate internal function body content, including variables\n *\n * @param {TemplateOptions} options\n * @return {string} functions\n */\nfunction makeContent(options) {\n var defineErrors = options.defineErrors,\n lines = options.lines;\n\n\n var variables = makeVariables(options);\n var errors = defineErrors ? 'if(errors.length) return errors;' : '';\n var content = lines.join('\\n');\n\n return '\\n \"use strict\";\\n ' + variables + '\\n ' + content + '\\n ' + errors + '\\n ';\n}\n\n/**\n * @name body\n * @type function\n * @description\n * Generate a function body, containing internal variables and helpers\n *\n * @param {object} tpl - template instance, containing all analyzed schema related data\n * @param {object} state - state of schema generation\n * @param {DjvConfig} config\n * @return {string} body\n */\nfunction body(_ref4, _ref5) {\n var cachedIndex = _ref4.cachedIndex,\n lines = _ref4.lines;\n var context = _ref5.context;\n\n var _ref6 = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},\n inner = _ref6.inner,\n errorHandler = _ref6.errorHandler;\n\n var options = {\n context: context,\n inner: inner,\n defineErrors: errorHandler,\n index: cachedIndex,\n lines: lines\n };\n\n var helpers = makeHelpers(options);\n var content = makeContent(options);\n\n return '\\n ' + helpers + '\\n function f0(data) {\\n ' + content + '\\n }\\n return f0;\\n ';\n}\n\n/**\n * @name templateExpression\n * @type function\n * @description\n * Es6 template helper function\n * Transforms a validator utilities into generated functions body\n * @return {function} template\n */\nfunction templateExpression(strings) {\n for (var _len2 = arguments.length, keys = Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n keys[_key2 - 1] = arguments[_key2];\n }\n\n return function () {\n for (var _len3 = arguments.length, values = Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {\n values[_key3] = arguments[_key3];\n }\n\n var dict = values[values.length - 1] || {};\n var result = [strings[0]];\n keys.forEach(function (key, i) {\n var value = Number.isInteger(key) ? values[key] : dict[key];\n result.push(value, strings[i + 1]);\n });\n return result.join('');\n };\n}\n\nmodule.exports = {\n body: body,\n restore: restore,\n template: template,\n expression: templateExpression\n};\n\n/***/ }),\n/* 3 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _templateObject = _taggedTemplateLiteral(['!/^[a-zA-Z]+$/.test(', ')'], ['!/^[a-zA-Z]+$/.test(', ')']),\n _templateObject2 = _taggedTemplateLiteral(['!/^[a-zA-Z0-9]+$/.test(', ')'], ['!/^[a-zA-Z0-9]+$/.test(', ')']),\n _templateObject3 = _taggedTemplateLiteral(['!/^[-_a-zA-Z0-9]+$/.test(', ')'], ['!/^[-_a-zA-Z0-9]+$/.test(', ')']),\n _templateObject4 = _taggedTemplateLiteral(['!/^[a-fA-F0-9]+$/.test(', ')'], ['!/^[a-fA-F0-9]+$/.test(', ')']),\n _templateObject5 = _taggedTemplateLiteral(['!/^[0-9]+$/.test(', ')'], ['!/^[0-9]+$/.test(', ')']),\n _templateObject6 = _taggedTemplateLiteral(['isNaN(Date.parse(', ')) || ~', '.indexOf(\\'/\\')'], ['isNaN(Date.parse(', ')) || ~', '.indexOf(\\\\\\'/\\\\\\')']),\n _templateObject7 = _taggedTemplateLiteral(['', ' !== ', '.toUpperCase()'], ['', ' !== ', '.toUpperCase()']),\n _templateObject8 = _taggedTemplateLiteral(['', ' !== ', '.toLowerCase()'], ['', ' !== ', '.toLowerCase()']),\n _templateObject9 = _taggedTemplateLiteral(['', '.length >= 256 || !/^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\\\\-]{0,61}[a-zA-Z0-9])(\\\\.([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\\\\-]{0,61}[a-zA-Z0-9]))*$/.test(', ')'], ['', '.length >= 256 || !/^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\\\\\\\\-]{0,61}[a-zA-Z0-9])(\\\\\\\\.([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\\\\\\\\-]{0,61}[a-zA-Z0-9]))*$/.test(', ')']),\n _templateObject10 = _taggedTemplateLiteral(['!/^[A-Za-z][A-Za-z0-9+\\\\-.]*:(?:\\\\/\\\\/(?:(?:[A-Za-z0-9\\\\-._~!$&\\'()*+,;=:]|%[0-9A-Fa-f]{2})*@)?(?:\\\\[(?:(?:(?:(?:[0-9A-Fa-f]{1,4}:){6}|::(?:[0-9A-Fa-f]{1,4}:){5}|(?:[0-9A-Fa-f]{1,4})?::(?:[0-9A-Fa-f]{1,4}:){4}|(?:(?:[0-9A-Fa-f]{1,4}:){0,1}[0-9A-Fa-f]{1,4})?::(?:[0-9A-Fa-f]{1,4}:){3}|(?:(?:[0-9A-Fa-f]{1,4}:){0,2}[0-9A-Fa-f]{1,4})?::(?:[0-9A-Fa-f]{1,4}:){2}|(?:(?:[0-9A-Fa-f]{1,4}:){0,3}[0-9A-Fa-f]{1,4})?::[0-9A-Fa-f]{1,4}:|(?:(?:[0-9A-Fa-f]{1,4}:){0,4}[0-9A-Fa-f]{1,4})?::)(?:[0-9A-Fa-f]{1,4}:[0-9A-Fa-f]{1,4}|(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?))|(?:(?:[0-9A-Fa-f]{1,4}:){0,5}[0-9A-Fa-f]{1,4})?::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\'()*+,;=:@]|%[0-9A-Fa-f]{2})*)*|)(?:\\\\\\\\?(?:[A-Za-z0-9\\\\\\\\-._~!$&\\\\\\'()*+,;=:@\\\\\\\\/?]|%[0-9A-Fa-f]{2})*)?(?:\\\\\\\\#(?:[A-Za-z0-9\\\\\\\\-._~!$&\\\\\\'()*+,;=:@\\\\\\\\/?]|%[0-9A-Fa-f]{2})*)?$/.test(', ')']),\n _templateObject11 = _taggedTemplateLiteral(['!/^[^@]+@[^@]+\\\\.[^@]+$/.test(', ')'], ['!/^[^@]+@[^@]+\\\\\\\\.[^@]+$/.test(', ')']),\n _templateObject12 = _taggedTemplateLiteral(['!/^(\\\\d?\\\\d?\\\\d){0,255}\\\\.(\\\\d?\\\\d?\\\\d){0,255}\\\\.(\\\\d?\\\\d?\\\\d){0,255}\\\\.(\\\\d?\\\\d?\\\\d){0,255}$/.test(', ') || ', '.split(\".\")[3] > 255'], ['!/^(\\\\\\\\d?\\\\\\\\d?\\\\\\\\d){0,255}\\\\\\\\.(\\\\\\\\d?\\\\\\\\d?\\\\\\\\d){0,255}\\\\\\\\.(\\\\\\\\d?\\\\\\\\d?\\\\\\\\d){0,255}\\\\\\\\.(\\\\\\\\d?\\\\\\\\d?\\\\\\\\d){0,255}$/.test(', ') || ', '.split(\".\")[3] > 255']),\n _templateObject13 = _taggedTemplateLiteral(['!/^((?=.*::)(?!.*::.+::)(::)?([\\\\dA-F]{1,4}:(:|\\\\b)|){5}|([\\\\dA-F]{1,4}:){6})((([\\\\dA-F]{1,4}((?!\\\\3)::|:\\\\b|$))|(?!\\\\2\\\\3)){2}|(((2[0-4]|1\\\\d|[1-9])?\\\\d|25[0-5])\\\\.?\\\\b){4})$/.test(', ')'], ['!/^((?=.*::)(?!.*::.+::)(::)?([\\\\\\\\dA-F]{1,4}:(:|\\\\\\\\b)|){5}|([\\\\\\\\dA-F]{1,4}:){6})((([\\\\\\\\dA-F]{1,4}((?!\\\\\\\\3)::|:\\\\\\\\b|$))|(?!\\\\\\\\2\\\\\\\\3)){2}|(((2[0-4]|1\\\\\\\\d|[1-9])?\\\\\\\\d|25[0-5])\\\\\\\\.?\\\\\\\\b){4})$/.test(', ')']),\n _templateObject14 = _taggedTemplateLiteral(['/[^\\\\\\\\]\\\\\\\\[^.*+?^${}()|[\\\\]\\\\\\\\bBcdDfnrsStvwWxu0-9]/i.test(', ')'], ['/[^\\\\\\\\\\\\\\\\]\\\\\\\\\\\\\\\\[^.*+?^\\\\${}()|[\\\\\\\\]\\\\\\\\\\\\\\\\bBcdDfnrsStvwWxu0-9]/i.test(', ')']),\n _templateObject15 = _taggedTemplateLiteral(['!/^$|^\\\\/(?:~(?=[01])|[^~])*$/i.test(', ')'], ['!/^$|^\\\\\\\\/(?:~(?=[01])|[^~])*$/i.test(', ')']),\n _templateObject16 = _taggedTemplateLiteral(['!/^(?:[A-Za-z][A-Za-z0-9+\\\\-.]*:(?:\\\\/\\\\/(?:(?:[A-Za-z0-9\\\\-._~!$&\\'()*+,;=:]|%[0-9A-Fa-f]{2})*@)?(?:\\\\[(?:(?:(?:(?:[0-9A-Fa-f]{1,4}:){6}|::(?:[0-9A-Fa-f]{1,4}:){5}|(?:[0-9A-Fa-f]{1,4})?::(?:[0-9A-Fa-f]{1,4}:){4}|(?:(?:[0-9A-Fa-f]{1,4}:){0,1}[0-9A-Fa-f]{1,4})?::(?:[0-9A-Fa-f]{1,4}:){3}|(?:(?:[0-9A-Fa-f]{1,4}:){0,2}[0-9A-Fa-f]{1,4})?::(?:[0-9A-Fa-f]{1,4}:){2}|(?:(?:[0-9A-Fa-f]{1,4}:){0,3}[0-9A-Fa-f]{1,4})?::[0-9A-Fa-f]{1,4}:|(?:(?:[0-9A-Fa-f]{1,4}:){0,4}[0-9A-Fa-f]{1,4})?::)(?:[0-9A-Fa-f]{1,4}:[0-9A-Fa-f]{1,4}|(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-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0-9A-Fa-f]{2})*)?)$/i.test(', ')']),\n _templateObject17 = _taggedTemplateLiteral(['!/^(?:(?:[^\\\\x00-\\\\x20\"\\'<>%\\\\\\\\^`{|}]|%[0-9a-f]{2})|\\\\{[+#.\\\\/;?&=,!@|]?(?:[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.test(', ')'], ['!/^(?:(?:[^\\\\\\\\x00-\\\\\\\\x20\"\\\\\\'<>%\\\\\\\\\\\\\\\\^\\\\`{|}]|%[0-9a-f]{2})|\\\\\\\\{[+#.\\\\\\\\/;?&=,!@|]?(?:[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.test(', ')']);\n\nfunction _taggedTemplateLiteral(strings, raw) { return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }\n\n/**\n * @module formats\n * @description\n * Validators as string for format keyword rules.\n * A validator is a string, which when executed returns `false` if test is failed, `true` otherwise.\n */\n\nvar _require = __webpack_require__(2),\n expression = _require.expression;\n\nmodule.exports = {\n alpha: expression(_templateObject, 'data'),\n alphanumeric: expression(_templateObject2, 'data'),\n identifier: expression(_templateObject3, 'data'),\n hexadecimal: expression(_templateObject4, 'data'),\n numeric: expression(_templateObject5, 'data'),\n 'date-time': expression(_templateObject6, 'data', 'data'),\n uppercase: expression(_templateObject7, 'data', 'data'),\n lowercase: expression(_templateObject8, 'data', 'data'),\n hostname: expression(_templateObject9, 'data', 'data'),\n uri: expression(_templateObject10, 'data'),\n email: expression(_templateObject11, 'data'),\n ipv4: expression(_templateObject12, 'data', 'data'),\n ipv6: expression(_templateObject13, 'data'),\n regex: expression(_templateObject14, 'data'),\n // TODO optimize uri-reference regex... too long\n 'json-pointer': expression(_templateObject15, 'data'),\n 'uri-reference': expression(_templateObject16, 'data'),\n 'uri-template': expression(_templateObject17, 'data')\n};\n\n/***/ }),\n/* 4 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\n/**\n * @module validators\n * @description\n * Contains validators functions links\n * Provides an information about the order in which validators should be applied\n * Each validator may return true, which means, others will be ignored\n * @see $ref\n */\nvar required = __webpack_require__(11);\nvar format = __webpack_require__(12);\nvar property = __webpack_require__(13);\nvar type = __webpack_require__(14);\nvar $ref = __webpack_require__(16);\nvar not = __webpack_require__(17);\nvar anyOf = __webpack_require__(18);\nvar oneOf = __webpack_require__(19);\nvar allOf = __webpack_require__(20);\nvar dependencies = __webpack_require__(21);\nvar properties = __webpack_require__(22);\nvar patternProperties = __webpack_require__(23);\nvar items = __webpack_require__(24);\nvar contains = __webpack_require__(25);\nvar constant = __webpack_require__(26);\nvar propertyNames = __webpack_require__(27);\n\nmodule.exports = {\n name: {\n $ref: $ref,\n required: required,\n format: format,\n property: property,\n type: type,\n not: not,\n anyOf: anyOf,\n oneOf: oneOf,\n allOf: allOf,\n dependencies: dependencies,\n properties: properties,\n patternProperties: patternProperties,\n items: items,\n contains: contains,\n constant: constant,\n propertyNames: propertyNames\n },\n list: [$ref, required, format, property, type, not, anyOf, oneOf, allOf, dependencies, properties, patternProperties, items, contains, constant, propertyNames]\n};\n\n/***/ }),\n/* 5 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\n/**\n * @module properties\n * @description\n * Validators as string for properties keyword rules.\n * A validator is a function, which when executed returns\n * - `false` if test is failed,\n * - `true` otherwise.\n */\nmodule.exports = {\n readOnly: 'false',\n exclusiveMinimum: function exclusiveMinimum(schema) {\n return '%s <= ' + schema.exclusiveMinimum;\n },\n minimum: function minimum(schema) {\n return '%s < ' + schema.minimum;\n },\n exclusiveMaximum: function exclusiveMaximum(schema) {\n return '%s >= ' + schema.exclusiveMaximum;\n },\n maximum: function maximum(schema) {\n return '%s > ' + schema.maximum;\n },\n\n multipleOf: '($1/$2) % 1 !== 0 && typeof $1 === \"number\"',\n // When the instance value is a string\n // this provides a regular expression that a string instance MUST match in order to be valid.\n pattern: function pattern(schema) {\n var pattern = void 0;\n var modifiers = void 0;\n\n if (typeof schema.pattern === 'string') {\n pattern = schema.pattern;\n } else {\n pattern = schema.pattern[0];\n modifiers = schema.pattern[1];\n }\n\n var regex = new RegExp(pattern, modifiers);\n return 'typeof ($1) === \"string\" && !' + regex + '.test($1)';\n },\n\n /**\n * Creates an array containing the numeric code points of each Unicode\n * character in the string. While JavaScript uses UCS-2 internally,\n * this function will convert a pair of surrogate halves (each of which\n * UCS-2 exposes as separate characters) into a single code point,\n * matching UTF-16.\n * @see `punycode.ucs2.encode`\n * @see <https://mathiasbynens.be/notes/javascript-encoding>\n * @memberOf punycode.ucs2\n * @name decode\n * @param {String} string The Unicode input string (UCS-2).\n * @returns {Array} The new array of code points.\n */\n minLength: 'typeof $1 === \"string\" && function dltml(b,c){for(var a=0,d=b.length;a<d&&c;){var e=b.charCodeAt(a++);55296<=e&&56319>=e&&a<d&&56320!==(b.charCodeAt(a++)&64512)&&a--;c--}return!!c}($1, $2)',\n maxLength: 'typeof $1 === \"string\" && function dmtml(b,c){for(var a=0,d=b.length;a<d&&0<=c;){var e=b.charCodeAt(a++);55296<=e&&56319>=e&&a<d&&56320!==(b.charCodeAt(a++)&64512)&&a--;c--}return 0>c}($1, $2)',\n // This attribute defines the minimum number of values\n // in an array when the array is the instance value.\n minItems: '$1.length < $2 && Array.isArray($1)',\n // This attribute defines the maximum number of values\n // in an array when the array is the instance value.\n maxItems: '$1.length > $2 && Array.isArray($1)',\n // TODO without some\n uniqueItems: function uniqueItems(schema, fn) {\n if (!schema.uniqueItems) {\n return 'true';\n }\n\n fn(fn.cache('{}'));\n return 'Array.isArray($1) && $1.some(function(item, key) {\\n if(item !== null && typeof item === \"object\") key = JSON.stringify(item);\\n else key = item;\\n if(' + fn.cache('{}') + '.hasOwnProperty(key)) return true;\\n ' + fn.cache('{}') + '[key] = true;\\n })';\n },\n\n // ***** object validation ****\n minProperties: '!Array.isArray($1) && typeof $1 === \"object\" && Object.keys($1).length < $2',\n // An object instance is valid against \"maxProperties\"\n // if its number of properties is less than, or equal to, the value of this keyword.\n maxProperties: '!Array.isArray($1) && typeof $1 === \"object\" && Object.keys($1).length > $2',\n // ****** all *****\n enum: function _enum(schema, fn) {\n return schema.enum.map(function (value) {\n var $1 = '$1';\n var comparedValue = value;\n\n if ((typeof value === 'undefined' ? 'undefined' : _typeof(value)) === 'object') {\n comparedValue = '\\'' + JSON.stringify(value) + '\\'';\n $1 = fn.cache('JSON.stringify($1)');\n } else if (typeof value === 'string') {\n comparedValue = '\\'' + escape(value) + '\\'';\n }\n\n return $1 + ' != decodeURIComponent(' + comparedValue + ')';\n }).join(' && ');\n }\n};\n\n/***/ }),\n/* 6 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\n/**\n * @module keywords\n * @description\n * A list of keywords used in specification.\n */\nmodule.exports = ['$ref', '$schema', 'type', 'not', 'anyOf', 'allOf', 'oneOf', 'properties', 'patternProperties', 'additionalProperties', 'items', 'additionalItems', 'required', 'default', 'title', 'description', 'definitions', 'dependencies', '$id', 'contains', 'const', 'examples'];\n\n/***/ }),\n/* 7 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\n/**\n * @module utils\n * @description\n * Utilities to check and normalize uri\n */\nvar REGEXP_URI = /:\\/\\//;\nvar REGEXP_URI_FRAGMENT = /#\\/?/;\nvar REGEXP_URI_PATH = /(^[^:]+:\\/\\/[^?#]*\\/).*/;\n\n/**\n * @name keys\n * @type {object}\n * @description\n * Keys to apply schema attributes & values\n */\nvar keys = {\n id: '$id'\n};\n\n/**\n * @name head\n * @type {function}\n * @description\n * Clean an id from its fragment\n * @example\n * head('http://domain.domain:2020/test/a#test')\n * // returns 'http://domain.domain:2020/test/a'\n * @param {string} id\n * @returns {string} cleaned\n */\nfunction head(uri) {\n if (typeof uri !== 'string') {\n return uri;\n }\n\n var parts = uri.split(REGEXP_URI_FRAGMENT);\n return parts[0];\n}\n\nfunction isFullUri(uri) {\n return REGEXP_URI.test(uri);\n}\n\n/**\n * @name path\n * @type {function}\n * @description\n * Gets a scheme, domain and a path part from the uri\n * @example\n * path('http://domain.domain:2020/test/a?test')\n * // returns 'http://domain.domain:2020/test/'\n * @param {string} uri\n * @returns {string} path\n */\nfunction path(uri) {\n return uri.replace(REGEXP_URI_PATH, '$1');\n}\n\n/**\n * @description\n * Get the fragment (#...) part of the uri\n * @see https://tools.ietf.org/html/rfc3986#section-3\n * @param {string} uri\n * @returns {string} fragment\n */\nfunction fragment(uri) {\n if (typeof uri !== 'string') {\n return uri;\n }\n\n var parts = uri.split(REGEXP_URI_FRAGMENT);\n return parts[1];\n}\n\n/**\n * @name makePath\n * @type function\n * @description\n * Concat parts into single uri\n * @see https://tools.ietf.org/html/rfc3986#section-3\n * @param {array<string>} parts\n * @returns {string} uri\n */\nfunction makePath(parts) {\n return parts.filter(function (part) {\n return typeof part === 'string';\n }).reduce(function (uri, id) {\n // if id is full replace uri\n if (!uri.length || isFullUri(id)) {\n return id;\n }\n if (!id) {\n return uri;\n }\n\n // if fragment found\n if (id.indexOf('#') === 0) {\n // should replace uri's sharp with id\n var sharpUriIndex = uri.indexOf('#');\n if (sharpUriIndex === -1) {\n return uri + id;\n }\n\n return uri.slice(0, sharpUriIndex) + id;\n }\n\n // get path part of uri\n // and replace the rest with id\n var partialUri = path(uri) + id;\n return partialUri + (partialUri.indexOf('#') === -1 ? '#' : '');\n }, '');\n}\n\n/**\n * @name normalize\n * @type {function}\n * @description\n * Replace json-pointer special symbols in a given uri.\n * @param {string} uri\n * @returns {string} normalizedUri\n */\nfunction normalize(uri) {\n return decodeURIComponent(uri.replace(/~1/g, '/').replace(/~0/g, '~'));\n}\n\nmodule.exports = {\n makePath: makePath,\n isFullUri: isFullUri,\n head: head,\n fragment: fragment,\n normalize: normalize,\n keys: keys\n};\n\n/***/ }),\n/* 8 */\n/***/ (function(module, exports, __webpack_require__) {\n\nmodule.exports = __webpack_require__(9);\n\n\n/***/ }),\n/* 9 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar _require = __webpack_require__(2),\n restore = _require.restore,\n expression = _require.expression;\n\nvar formats = __webpack_require__(3);\n\nvar _require2 = __webpack_require__(10),\n generate = _require2.generate,\n State = _require2.State;\n\nvar _require3 = __webpack_require__(28),\n add = _require3.add,\n use = _require3.use;\n\n/**\n * Configuration for template\n * @typedef {object} DjvConfig\n * @property {string?} version - defines which version of json-schema draft to use,\n * draft-04 by default\n * @property {function?} versionConfigure - handler to apply for environment version\n * @property {boolean?} inner - a generating object should be considered as inner\n * Default value is false/undefined.\n * If true, then it avoid creating variables in a generated function body,\n * however without proper wrapper function approach will not work.\n * @see template/body, template/body\n * @property {object?} formats - an object containing list of formatters to add for environment\n * @property {function?} errorHandler - a handler to use for generating custom error messages\n */\n\n/**\n * @name Environment\n * @description\n * Key constructor used for creating enivornment instance\n * @type {function} constructor\n * @param {DjvConfig} options passed to templater and utilities\n *\n * Usage\n *\n * ```javascript\n * const env = djv();\n * const env = new djv();\n * const env = new djv({ errorHandler: () => ';' });\n * ```\n */\n\n\nfunction Environment() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n if (!(this instanceof Environment)) {\n return new Environment(options);\n }\n\n this.options = options;\n this.resolved = {};\n this.state = new State(null, this);\n\n this.useVersion(options.version, options.versionConfigure);\n this.addFormat(options.formats);\n}\n\nObject.assign(Environment, {\n expression: expression\n});\n\nObject.assign(Environment.prototype, {\n /**\n * check if object correspond to schema\n *\n * Usage\n *\n * ```javascript\n * env.validate('test#/common', { type: 'common' });\n * // => undefined\n *\n * env.validate('test#/common', { type: 'custom' });\n * // => 'required: data'\n *\n * @param {string} name\n * @param {object} object\n * @returns {string} error - undefined if it is valid\n */\n validate: function validate(name, object) {\n var foundSchema = this.resolve(name);\n return foundSchema.fn(object);\n },\n\n\n /**\n * add schema to djv environment\n *\n * Usage\n *\n * ```javascript\n * env.addSchema('test', jsonSchema);\n * ```\n *\n * @param {string?} name\n * @param {object} schema\n * @param {object} schema\n * @returns {resolved}\n */\n addSchema: function addSchema(name, schema) {\n var _this = this;\n\n var realSchema = (typeof name === 'undefined' ? 'undefined' : _typeof(name)) === 'object' ? name : schema;\n var resolved = {\n schema: realSchema,\n fn: generate(this, realSchema, undefined, this.options)\n };\n\n [name, schema.id].filter(function (id) {\n return typeof id === 'string';\n }).forEach(function (id) {\n _this.resolved[id] = Object.assign({ name: id }, resolved);\n });\n\n return resolved;\n },\n\n\n /**\n * removes a schema or the whole structure from djv environment\n *\n * Usage\n *\n * ```javascript\n * env.removeSchema('test');\n * ```\n *\n * @param {string} name\n */\n removeSchema: function removeSchema(name) {\n if (name) {\n delete this.resolved[name];\n } else {\n this.resolved = {};\n }\n },\n\n\n /**\n * resolves name by existing environment\n *\n * Usage\n *\n * ```javascript\n * env.resolve('test');\n * // => { name: 'test', schema: {} }, fn: ... }\n * ```\n *\n * @param {string} name\n * @returns {resolved}\n */\n resolve: function resolve(name) {\n if ((typeof name === 'undefined' ? 'undefined' : _typeof(name)) === 'object' || !this.resolved[name]) {\n return this.addSchema(name, this.state.resolve(name));\n }\n\n return this.resolved[name];\n },\n\n\n /**\n * exports the whole structure object from environment or by resolved name\n *\n * Usage\n *\n * ```javascript\n * env.export();\n * // => { test: { name: 'test', schema: {}, ... } }\n * ```\n *\n * @param {string} name\n * @returns {serializedInternalState}\n */\n export: function _export(name) {\n var _this2 = this;\n\n var resolved = void 0;\n if (name) {\n resolved = this.resolve(name);\n resolved = {\n name: name,\n schema: resolved.schema,\n fn: resolved.fn.toString()\n };\n } else {\n resolved = {};\n Object.keys(this.resolved).forEach(function (key) {\n resolved[key] = {\n name: key,\n schema: _this2.resolved[key].schema,\n fn: _this2.resolved[key].fn.toString()\n };\n });\n }\n\n return JSON.stringify(resolved);\n },\n\n\n /**\n * imports all found structure objects to internal environment structure\n * Usage\n *\n * ```javascript\n * env.import(config);\n * ```\n *\n * @param {object} config - internal structure or only resolved schema object\n */\n import: function _import(config) {\n var _this3 = this;\n\n var item = JSON.parse(config);\n var restoreData = item;\n if (item.name && item.fn && item.schema) {\n restoreData = _defineProperty({}, item.name, item);\n }\n\n Object.keys(restoreData).forEach(function (key) {\n var _restoreData$key = restoreData[key],\n name = _restoreData$key.name,\n schema = _restoreData$key.schema,\n source = _restoreData$key.fn;\n\n var fn = restore(source, schema, _this3.options);\n _this3.resolved[name] = { name: name, schema: schema, fn: fn };\n });\n },\n\n\n /**\n * @name addFormat\n * @type function\n * @description\n * Add formatter to djv environment.\n * When a string is passed it is interpreted as an expression which\n * when returns `true` goes with an error, when returns `false` then a property is valid.\n * When a function is passed it will be executed during schema compilation\n * with a current schema and template helper arguments.\n * @see utils/formats\n *\n * Usage\n *\n * ```javascript\n * env.addFormat('UpperCase', '%s !== %s.toUpperCase()');\n * // or\n * env.addFormat('isOk', function(schema, tpl){\n * return `!${schema.isOk} || %s !== %s.toUpperCase()`;\n * });\n * ```\n *\n * @param {string/object?} name\n * @param {string/function} formatter\n */\n addFormat: function addFormat(name, formatter) {\n if (typeof name === 'string') {\n formats[name] = formatter;\n return;\n }\n\n if ((typeof name === 'undefined' ? 'undefined' : _typeof(name)) === 'object') {\n Object.assign(formats, name);\n }\n },\n\n\n /**\n * @name setErrorHandler\n * @type function\n * @description\n * Specify custom error handler which will be used in generated functions when problem found.\n * The function should return a string expression, which will be executed when generated\n * validator function is executed. The simpliest use case is the default one\n * @see template/defaultErrorHandler\n * ```javascript\n * function defaultErrorHandler(errorType) {\n * return `return \"${errorType}: ${tpl.data}\";`;\n * }\n * ```\n * It returns an expression 'return ...', so the output is an error string.\n * Usage\n * ```javascript\n * djv({ errorHandler: () => 'return { error: true };' }) // => returns an object\n * djv({\n * errorHandler: function customErrorHandler(errorType, property) {\n * return `errors.push({\n * type: \"${errorType}\",\n * schema: \"${this.schema[this.schema.length - 1]}\",\n * data: \"${this.data[this.data.length - 1]}\"\n * });`;\n * }\n * });\n * ```\n * When a custom error handler is used, the template body function adds a `error` variable inside\n * a generated validator, which can be used to put error information. `errorType` is always\n * passed to error handler function. Some validate utilities put extra argument, like f.e.\n * currently processed property value. Inside the handler context is a templater instance,\n * which contains `this.schema`, `this.data` paths arrays to identify validator position.\n * @see test/index/setErrorHandler for more examples\n * @param {function} errorHandler - a function called each time compiler creates an error branch\n * @returns void\n */\n setErrorHandler: function setErrorHandler(errorHandler) {\n Object.assign(this.options, { errorHandler: errorHandler });\n },\n\n /**\n * @name useVersion\n * @type {function}\n * @description\n * Add a specification version for environment\n * A configure function is called with exposed environments, like keys, formats, etc.\n * Updates internals utilities and configurations to fix versions implementation conflicts\n * @param {string} version of json-schema specification to use\n * @param {function} configure\n * @returns void\n */\n useVersion: function useVersion(version, configure) {\n if (typeof configure !== 'function' && version === 'draft-04') {\n /* eslint-disable no-param-reassign, global-require, import/no-extraneous-dependencies */\n configure = __webpack_require__(29);\n /* eslint-enable no-param-reassign, global-require, import/no-extraneous-dependencies */\n }\n if (typeof configure === 'function') {\n add(version, configure);\n }\n use(version);\n }\n});\n\nmodule.exports = Environment;\n\n/***/ }),\n/* 10 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\n/**\n * @module state\n * @description\n * State module is responsible for scope schemas resolution.\n * It also exports a main `generate` function.\n */\n\nvar _require = __webpack_require__(4),\n validators = _require.list;\n\nvar _require2 = __webpack_require__(2),\n body = _require2.body,\n restore = _require2.restore,\n template = _require2.template;\n\nvar _require3 = __webpack_require__(0),\n hasProperty = _require3.hasProperty;\n\nvar _require4 = __webpack_require__(7),\n normalize = _require4.normalize,\n makePath = _require4.makePath,\n head = _require4.head,\n isFullUri = _require4.isFullUri,\n fragment = _require4.fragment,\n keys = _require4.keys;\n\nvar _require5 = __webpack_require__(1),\n isSchema = _require5.is,\n transformSchema = _require5.transform;\n\n/* eslint-disable no-unused-vars */\n\n\nfunction State() {\n var schema = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var env = arguments[1];\n\n /* eslint-enable no-unused-vars */\n Object.assign(this, {\n context: [],\n entries: new Map(),\n env: env\n });\n}\n\n/**\n * @name generate\n * @type {function}\n * @description\n * The main schema process function.\n * Available and used both in external and internal generation.\n * Saves the state for internal recursive calls.\n * @param {object} env - djv environment\n * @param {object} schema - to process\n * @param {State} state - saved state\n * @param {Environment} options\n * @returns {function} restoredFunction\n */\nfunction generate(env, schema) {\n var state = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : new State(schema, env);\n var options = arguments[3];\n\n var tpl = template(state, options);\n tpl.visit(schema);\n\n var source = body(tpl, state, options);\n return restore(source, schema, options);\n}\n\nState.prototype = Object.assign(Object.create(Array.prototype), {\n /**\n * @name addEntry\n * @type {function}\n * @description\n * Generates an internal function.\n * Usually necessary for `allOf` types of validators.\n * Caches generated functions by schema object key.\n * Checks for an existing schema in a context stack to avoid double parsing and generation.\n * @param {string} url\n * @param {object} schema\n * @returns {number/boolean} index\n */\n addEntry: function addEntry(url, schema) {\n var entry = this.entries.get(schema);\n if (entry === false) {\n // has already been added to process queue\n // will be revealed as an entry\n return this.context.push(schema);\n }\n\n if (typeof entry === 'undefined') {\n // start to process schema\n this.entries.set(schema, false);\n entry = generate(this.env, schema, this, { inner: true });\n this.entries.set(schema, entry);\n this.revealReference(schema);\n }\n\n return this.context.push(entry);\n },\n\n /**\n * @name revealReference\n * @type {function}\n * @description\n * If a schema was added during the add entry phase\n * Then it should be revealed in this step\n * @param {object} schema\n * @returns {void}\n */\n revealReference: function revealReference(schema) {\n for (var doubled = this.context.indexOf(schema); doubled !== -1; doubled = this.context.indexOf(schema)) {\n this.context[doubled] = this.context.length;\n }\n },\n\n /**\n * @name link\n * @type {function}\n * @description\n * Returns an entry's index in a context stack.\n * @param {string} url\n * @returns {string} entry\n */\n link: function link(url) {\n var schema = this.resolve(url);\n var entry = this.addEntry(url, schema);\n return entry;\n },\n\n /**\n * @name resolveReference\n * @type {function}\n * @description\n * Resolve reference against the stack.\n * @param {string} reference\n * @returns {string} resolvedReference\n */\n resolveReference: function resolveReference(reference) {\n if (isFullUri(reference)) {\n return reference;\n }\n\n // find last full URI schema\n var lastFullURIReference = void 0;\n var lastFullURISchemaIndex = void 0;\n\n for (var i = this.length - 1; i >= 0; i -= 1, lastFullURIReference = false) {\n var _i = this[i],\n id = _i[keys.id],\n $ref = _i.$ref;\n\n lastFullURIReference = id || $ref;\n if (isFullUri(lastFullURIReference)) {\n lastFullURISchemaIndex = i;\n break;\n }\n }\n\n // collect all partial routes for it\n var partialReferences = [];\n for (var _i2 = this.length - 1; _i2 > lastFullURISchemaIndex; _i2 -= 1) {\n var _i3 = this[_i2],\n _id = _i3[keys.id],\n _$ref = _i3.$ref;\n\n var partialReference = _id || _$ref;\n if (head(partialReference)) {\n partialReferences.push(partialReference);\n }\n }\n\n // attach reference and make path\n var path = makePath([lastFullURIReference].concat(partialReferences, [reference]));\n return path;\n },\n\n /**\n * @name ascend\n * @private\n * @type {function}\n * @description\n * Search for a parent schema by reference.\n * Iterates over the chain of schemas.\n * @param {string} reference\n * @returns {object} parentSchema\n */\n ascend: function ascend(reference) {\n var path = head(reference);\n\n var _ref = this.env.resolved[path] || {},\n _ref$schema = _ref.schema,\n parentSchema = _ref$schema === undefined ? this[0] : _ref$schema;\n\n // Search while it is a full schema, not a ref\n\n\n while (parentSchema.$ref &&\n // avoid infinite loop\n head(parentSchema.$ref) !== head(reference) &&\n // > All other properties in a \"$ref\" object MUST be ignored.\n // @see https://tools.ietf.org/html/draft-wright-json-schema-01#section-8\n Object.keys(parentSchema).length === 1) {\n parentSchema = this.ascend(parentSchema.$ref);\n }\n\n return parentSchema;\n },\n\n /**\n * @name descend\n * @private\n * @type {function}\n * @description\n * Search for a child schema by reference.\n * Iterates over the chain of schemas.\n * @param {string} reference\n * @returns {object} currentSchema\n */\n descend: function descend(reference, parentSchema) {\n var _this = this;\n\n var uriFragment = fragment(reference);\n if (!uriFragment && isFullUri(reference)) {\n return parentSchema;\n }\n\n if (!uriFragment) {\n uriFragment = reference;\n }\n\n var parts = uriFragment.split('/');\n var currentSchema = parts.map(normalize).reduce(function (schema, part, index) {\n var subSchema = schema[part];\n if (!isSchema(subSchema)) {\n subSchema = schema.definitions && schema.definitions[part];\n }\n\n if (\n // last will be pushed on visit\n // @see /draft4/refRemote.json:http://localhost:1234/scope_change_defs2.json\n index !== parts.length - 1 && hasProperty(subSchema, keys.id)) {\n _this.push(subSchema);\n }\n\n return subSchema;\n }, parentSchema);\n\n return isSchema(currentSchema) ? currentSchema : parentSchema;\n },\n\n /**\n * @name resolve\n * @type {function}\n * @description\n * Resolves schema by given reference and current registered context stack.\n * @param {string} url\n * @returns {object} schema\n */\n resolve: function resolve(reference) {\n if (typeof reference !== 'string') {\n return reference;\n }\n\n var fullReference = this.resolveReference(reference);\n var parentSchema = this.ascend(fullReference);\n var subSchema = this.descend(reference, parentSchema);\n\n return subSchema;\n },\n\n /**\n * @name visit\n * @type {function}\n * @description\n * Calls each registered validator with given schema and template instance.\n * Validator may or may not add code to generated validator function.\n * @param {object} pseudoSchema\n * @param {object} tpl\n * @returns {void}\n */\n visit: function visit(pseudoSchema, tpl) {\n var schema = transformSchema(pseudoSchema);\n var initialLength = this.length;\n this.push(schema);\n\n validators.some(function (validator) {\n return validator(schema, tpl);\n });\n\n this.length = initialLength;\n }\n});\n\nmodule.exports = {\n State: State,\n generate: generate\n};\n\n/***/ }),\n/* 11 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nmodule.exports = function required(schema, tpl) {\n if (!Array.isArray(schema.required)) {\n return;\n }\n\n tpl('if (' + tpl.data + ' !== null && typeof ' + tpl.data + ' === \\'object\\' && !Array.isArray(' + tpl.data + ')) {\\n ' + schema.required.map(function (name) {\n var condition = '!' + tpl.data + '.hasOwnProperty(decodeURIComponent(\"' + escape(name) + '\"))';\n var error = tpl.error('required', name);\n return 'if (' + condition + ') ' + error;\n }).join('') + '\\n }');\n};\n\n/***/ }),\n/* 12 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar formats = __webpack_require__(3);\n\nmodule.exports = function format(schema, tpl) {\n if (typeof schema.format === 'undefined') {\n return;\n }\n\n var formatter = formats[schema.format];\n if (typeof formatter !== 'function') {\n return;\n }\n\n var data = tpl.data;\n\n var condition = formatter({ data: data, schema: schema });\n var error = tpl.error('format');\n\n tpl('if (' + condition + ') ' + error);\n};\n\n/***/ }),\n/* 13 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar properties = __webpack_require__(5);\nvar keywords = __webpack_require__(6);\n\nvar _require = __webpack_require__(0),\n asExpression = _require.asExpression;\n\nmodule.exports = function property(schema, tpl) {\n Object.keys(schema).forEach(function (key) {\n if (keywords.indexOf(key) !== -1 || key === 'format') {\n return;\n }\n\n var condition = asExpression(properties[key], schema, tpl);\n if (!condition) {\n return;\n }\n var error = tpl.error(key);\n\n tpl('if (' + condition + ') ' + error, tpl.data, schema[key]);\n });\n};\n\n/***/ }),\n/* 14 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar types = __webpack_require__(15);\n\nvar _require = __webpack_require__(0),\n hasProperty = _require.hasProperty;\n\nmodule.exports = function type(schema, tpl) {\n if (!hasProperty(schema, 'type')) {\n return;\n }\n\n var error = tpl.error('type', schema.type);\n var condition = '(' + [].concat(schema.type).map(function (key) {\n return types[key];\n }).join(') && (') + ')';\n\n tpl('if (' + condition + ') ' + error, tpl.data);\n};\n\n/***/ }),\n/* 15 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nmodule.exports = {\n null: '%s !== null',\n string: 'typeof %s !== \"string\"',\n boolean: 'typeof %s !== \"boolean\"',\n number: 'typeof %s !== \"number\" || %s !== %s',\n integer: 'typeof %s !== \"number\" || %s % 1 !== 0',\n object: '!%s || typeof %s !== \"object\" || Array.isArray(%s)',\n array: '!Array.isArray(%s)',\n date: '!(%s instanceof Date)'\n};\n\n/***/ }),\n/* 16 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _require = __webpack_require__(0),\n hasProperty = _require.hasProperty;\n\nmodule.exports = function $ref(schema, tpl) {\n if (!hasProperty(schema, '$ref')) {\n return false;\n }\n\n var condition = tpl.link(schema.$ref) + '(' + tpl.data + ')';\n var error = tpl.error('$ref');\n\n tpl('if (' + condition + ') ' + error);\n\n // All other properties in a \"$ref\" object MUST be ignored.\n // @see https://tools.ietf.org/html/draft-wright-json-schema-01#section-8\n return true;\n};\n\n/***/ }),\n/* 17 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _require = __webpack_require__(0),\n hasProperty = _require.hasProperty;\n\nmodule.exports = function not(schema, tpl) {\n if (!hasProperty(schema, 'not')) {\n return;\n }\n\n var condition = tpl.link(schema.not) + '(' + tpl.data + ')';\n var error = tpl.error('not');\n\n tpl('if (!' + condition + ') ' + error);\n};\n\n/***/ }),\n/* 18 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _require = __webpack_require__(0),\n hasProperty = _require.hasProperty;\n\nmodule.exports = function anyOf(schema, tpl) {\n if (!hasProperty(schema, 'anyOf')) {\n return;\n }\n\n var error = tpl.error('anyOf');\n var condition = schema.anyOf.map(function (reference) {\n return tpl.link(reference) + '(' + tpl.data + ')';\n }).join(' && ');\n\n tpl('if (' + condition + ') ' + error);\n};\n\n/***/ }),\n/* 19 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _require = __webpack_require__(0),\n hasProperty = _require.hasProperty;\n\nmodule.exports = function oneOf(schema, tpl) {\n if (!hasProperty(schema, 'oneOf')) {\n return;\n }\n\n var fns = schema.oneOf.map(function (reference) {\n return tpl.link(reference);\n });\n var arr = tpl.cache('[' + fns + ']');\n var cachedArr = tpl.cache('[' + fns + ']');\n var index = tpl.cache(cachedArr + '.length - 1');\n var cachedIndex = tpl.cache(cachedArr + '.length - 1');\n var count = tpl.cache('0');\n var cachedCount = tpl.cache('0');\n var error = tpl.error('oneOf');\n\n tpl('for (\\n ' + arr + ', ' + index + ', ' + count + ';\\n ' + cachedIndex + ' >= 0 && ' + cachedIndex + ' < ' + cachedArr + '.length;\\n ' + cachedIndex + '--) {\\n if(!' + cachedArr + '[' + cachedIndex + '](' + tpl.data + ')) ' + cachedCount + '++;\\n }\\n if (' + cachedCount + ' !== 1) ' + error + '\\n ');\n};\n\n/***/ }),\n/* 20 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _require = __webpack_require__(0),\n hasProperty = _require.hasProperty;\n\nmodule.exports = function allOf(schema, tpl) {\n if (!hasProperty(schema, 'allOf')) {\n return;\n }\n\n var error = tpl.error('allOf');\n var condition = schema.allOf.map(function (reference) {\n return tpl.link(reference) + '(' + tpl.data + ')';\n }).join(' || ');\n\n tpl('if (' + condition + ') ' + error);\n};\n\n/***/ }),\n/* 21 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nfunction _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }\n\nvar _require = __webpack_require__(0),\n hasProperty = _require.hasProperty;\n\nvar _require2 = __webpack_require__(1),\n isSchema = _require2.is;\n\n// @see http://json-schema.org/latest/json-schema-validation.html#rfc.section.6.5.7\n\n\nmodule.exports = function dependencies(schema, tpl) {\n if (!hasProperty(schema, 'dependencies')) {\n return;\n }\n\n Object.keys(schema.dependencies).forEach(function (dependency) {\n var value = schema.dependencies[dependency];\n var error = tpl.error('dependencies');\n\n tpl('if (' + tpl.data + '.hasOwnProperty(decodeURIComponent(\"' + escape(dependency) + '\"))) {');\n if (Array.isArray(value) || typeof value === 'string') {\n [].concat(_toConsumableArray(value)).map(function (property) {\n return 'if (!' + tpl.data + '.hasOwnProperty(decodeURIComponent(\"' + escape(property) + '\"))) ' + error;\n }).map(tpl);\n } else if (isSchema(value)) {\n tpl.visit(value);\n }\n tpl('}');\n });\n};\n\n/***/ }),\n/* 22 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nvar _require = __webpack_require__(0),\n hasProperty = _require.hasProperty;\n\nmodule.exports = function properties(schema, tpl) {\n if (!hasProperty(schema, 'properties') || _typeof(schema.properties) !== 'object') {\n return;\n }\n\n Object.keys(schema.properties).forEach(function (propertyKey) {\n var propertySchema = schema.properties[propertyKey];\n if ((typeof propertySchema === 'undefined' ? 'undefined' : _typeof(propertySchema)) === 'object' && !Object.keys(propertySchema).length) {\n return;\n }\n\n var isNotRequired = !schema.required || schema.required.indexOf(propertyKey) === -1;\n if (isNotRequired) {\n tpl('if (' + tpl.data + '.hasOwnProperty(decodeURIComponent(\"' + escape(propertyKey) + '\"))) {');\n }\n\n tpl.data.push('[decodeURIComponent(\\'' + escape(propertyKey) + '\\')]');\n tpl.visit(propertySchema);\n tpl.data.pop();\n\n if (isNotRequired) {\n tpl('}');\n }\n });\n};\n\n/***/ }),\n/* 23 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _require = __webpack_require__(0),\n hasProperty = _require.hasProperty;\n\nmodule.exports = function patternProperties(schema, tpl) {\n var hasAdditionalProperties = hasProperty(schema, 'additionalProperties') && schema.additionalProperties !== true;\n var hasPatternProperties = hasProperty(schema, 'patternProperties');\n\n if (!hasAdditionalProperties && !hasPatternProperties) {\n return;\n }\n\n // When the instance value is an object,\n // the property values of the instance object\n // MUST conform to the property definitions in this object.\n tpl('if(typeof ' + tpl.data + ' === \\'object\\' && !Array.isArray(' + tpl.data + ')) {');\n\n tpl(tpl.cache('null'));\n var property = tpl.cache('null');\n var visitAdditionalProperties = function visitAdditionalProperties() {\n if (schema.additionalProperties === false) {\n tpl(tpl.error('additionalProperties'));\n } else if (schema.additionalProperties) {\n tpl.data.push('[' + property + ']');\n tpl.visit(schema.additionalProperties);\n tpl.data.pop();\n }\n };\n\n tpl('for (' + property + ' in ' + tpl.data + ') {');\n if (hasAdditionalProperties && hasPatternProperties) {\n tpl(tpl.cache('false'));\n }\n\n if (hasPatternProperties) {\n Object.keys(schema.patternProperties).forEach(function (propertyKey) {\n tpl('if (' + new RegExp(propertyKey) + '.test(' + property + ')) {');\n if (hasAdditionalProperties) {\n tpl(tpl.cache('false') + ' = true;');\n }\n\n var propertySchema = schema.patternProperties[propertyKey];\n tpl.data.push('[' + property + ']');\n tpl.visit(propertySchema);\n tpl.data.pop();\n tpl('}');\n\n if (schema.properties) {\n tpl('if (' + (hasAdditionalProperties ? tpl.cache('false') + ' || ' : '') + ' ' + tpl.schema + '.properties.hasOwnProperty(' + property + ')) continue;');\n } else if (hasAdditionalProperties) {\n tpl('if (' + tpl.cache('false') + ') continue;');\n }\n\n visitAdditionalProperties();\n });\n } else {\n if (schema.properties) {\n tpl('if(' + tpl.schema + '.properties.hasOwnProperty(' + property + ')) continue;');\n }\n visitAdditionalProperties();\n }\n\n tpl('}}');\n};\n\n/***/ }),\n/* 24 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nvar _require = __webpack_require__(0),\n hasProperty = _require.hasProperty;\n\nmodule.exports = function items(schema, tpl) {\n if (!hasProperty(schema, 'items')) {\n return;\n }\n\n var itemsLength = schema.items.length;\n var error = tpl.error('additionalItems');\n var data = tpl.data;\n\n\n tpl('if(Array.isArray(' + data + ')) {');\n if (Array.isArray(schema.items)) {\n if (schema.additionalItems === false) {\n tpl('if (' + data + '.length > ' + itemsLength + ') ' + error);\n }\n\n schema.items.forEach(function (subSchema, index) {\n tpl('if(' + data + '.length > ' + index + ') {');\n data.push('[' + index + ']');\n tpl.visit(subSchema);\n data.pop();\n tpl('}');\n });\n\n if (_typeof(schema.additionalItems) === 'object') {\n var zeroIndex = tpl.cache(itemsLength);\n var index = tpl.cache(itemsLength);\n\n tpl('for (' + zeroIndex + '; ' + index + ' < ' + data + '.length; ' + index + '++) {');\n data.push('[' + tpl.cache(itemsLength) + ']');\n tpl.visit(schema.additionalItems);\n data.pop();\n tpl('}');\n }\n } else {\n var _zeroIndex = tpl.cache('0');\n var _index = tpl.cache('0');\n\n tpl('for (' + _zeroIndex + '; ' + _index + ' < ' + data + '.length; ' + _index + '++) {');\n data.push('[' + _index + ']');\n tpl.visit(schema.items);\n data.pop();\n tpl('}');\n }\n tpl('}');\n};\n\n/***/ }),\n/* 25 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _require = __webpack_require__(0),\n hasProperty = _require.hasProperty;\n\nmodule.exports = function contains(schema, tpl) {\n if (!hasProperty(schema, 'contains')) {\n return;\n }\n\n var error = tpl.error('contains');\n var fn = '' + tpl.link(schema.contains);\n\n var data = tpl.data;\n\n var zeroIndex = tpl.cache('0');\n var index = tpl.cache('0');\n var dataAtIndex = data.toString.apply(data.concat('[' + index + ']'));\n\n tpl('if (Array.isArray(' + data + ')) {\\n if (' + data + '.length === 0) ' + error + '\\n for (' + zeroIndex + '; ' + index + ' < ' + data + '.length; ' + index + '++) {\\n if (!' + fn + '(' + dataAtIndex + ')) break;\\n if (' + index + ' === ' + data + '.length - 1) ' + error + '\\n }\\n }');\n};\n\n/***/ }),\n/* 26 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _require = __webpack_require__(0),\n hasProperty = _require.hasProperty;\n\nvar _require2 = __webpack_require__(1),\n makeSchema = _require2.make;\n\nmodule.exports = function constant(schema, tpl) {\n if (!hasProperty(schema, 'const')) {\n return;\n }\n\n var constantInstanceSchema = makeSchema(schema.const);\n tpl.visit(constantInstanceSchema);\n};\n\n/***/ }),\n/* 27 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _require = __webpack_require__(0),\n hasProperty = _require.hasProperty;\n\nmodule.exports = function propertyNames(schema, tpl) {\n if (!hasProperty(schema, 'propertyNames')) {\n return;\n }\n\n var fn = tpl.link(schema.propertyNames);\n var error = tpl.error('propertyNames');\n\n tpl('if (Object.keys(' + tpl.data + ').some(' + fn + ')) ' + error);\n};\n\n/***/ }),\n/* 28 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\n/**\n * @module environment\n * @description\n * Update the given environment\n */\nvar properties = __webpack_require__(5);\nvar keywords = __webpack_require__(6);\nvar validators = __webpack_require__(4);\nvar formats = __webpack_require__(3);\n\nvar _require = __webpack_require__(7),\n keys = _require.keys;\n\nvar _require2 = __webpack_require__(1),\n transformation = _require2.transformation;\n\nvar environmentConfig = {};\n\nfunction add(version, config) {\n environmentConfig[version] = config;\n}\n\nfunction use(version) {\n if (!version || !environmentConfig[version]) {\n return;\n }\n\n var patchEnvironment = environmentConfig[version];\n patchEnvironment({\n properties: properties,\n keywords: keywords,\n validators: validators,\n formats: formats,\n keys: keys,\n transformation: transformation\n });\n}\n\nmodule.exports = {\n add: add,\n use: use\n};\n\n/***/ }),\n/* 29 */\n/***/ (function(module, exports) {\n\nmodule.exports = __WEBPACK_EXTERNAL_MODULE_29__;\n\n/***/ })\n/******/ ]);\n});\n\n\n// WEBPACK FOOTER //\n// djv.js"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 8);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 953d4406a3724a01e805","/**\n * @module utils\n * @description\n * Basic utilities for djv project\n */\n\n/**\n * @name asExpression\n * @type {function}\n * @description\n * Transform function or string to expression\n * @see validators\n * @param {function|string} fn\n * @param {object} schema\n * @param {object} tpl templater instance\n * @returns {string} expression\n */\nfunction asExpression(fn, schema, tpl) {\n if (typeof fn !== 'function') {\n return fn;\n }\n\n return fn(schema, tpl);\n}\n\n/**\n * @name hasProperty\n * @type {function}\n * @description\n * Check if the property exists in a given object\n * @param {object} object\n * @param {string} property\n * @returns {boolean} exists\n */\nfunction hasProperty(object, property) {\n return (\n typeof object === 'object' &&\n Object.prototype.hasOwnProperty.call(object, property)\n );\n}\n\nmodule.exports = {\n asExpression,\n hasProperty,\n};\n\n\n\n// WEBPACK FOOTER //\n// ./lib/utils/index.js","/**\n * @module schema\n * @description\n * Low-level utilities to check, create and transform schemas\n */\n\n/**\n * @name transformation\n * @type {object}\n * @description\n * Schema values transformation\n */\nconst transformation = {\n ANY_SCHEMA: {},\n NOT_ANY_SCHEMA: { not: {} },\n};\n\n/**\n * @name is\n * @type {function}\n * @description\n * Verify the object could be a schema\n * Since draft-06 supports boolean as a schema definition\n * @param {object} schema\n * @returns {boolean} isSchema\n */\nfunction is(schema) {\n return (\n typeof schema === 'object' ||\n typeof schema === 'boolean'\n );\n}\n\n/**\n * @name transform\n * @type {function}\n * @description\n * Transform a schema pseudo presentation\n * Since draft-06 supports boolean as a schema definition\n * @param {object} schema\n * @returns {object} schema\n */\nfunction transform(schema) {\n if (schema === true) {\n return transformation.ANY_SCHEMA;\n } else if (schema === false) {\n return transformation.NOT_ANY_SCHEMA;\n }\n return schema;\n}\n\n/**\n * @name make\n * @type {function}\n * @description\n * Generate a simple schema by a given object\n * @param {any} instance\n * @returns {object} schema\n */\nfunction make(instance) {\n if (typeof instance !== 'object' || instance === null) {\n return { enum: [instance] };\n }\n\n if (Array.isArray(instance)) {\n return {\n items: instance.map(make),\n // other items should be valid by `false` schema, aka not exist at all\n additionalItems: false\n };\n }\n\n const required = Object.keys(instance);\n return {\n properties: required.reduce((memo, key) => (\n Object.assign({}, memo, {\n [key]: make(instance[key])\n })\n ), {}),\n required,\n // other properties should be valid by `false` schema, aka not exist at all\n // additionalProperties: false,\n };\n}\n\nmodule.exports = {\n is,\n make,\n transform,\n transformation,\n};\n\n\n\n// WEBPACK FOOTER //\n// ./lib/utils/schema.js","/**\n * @module template\n * @description\n * Defines a small templater functionality for creating functions body.\n */\n\nfunction sanitizeString(str) {\n if (typeof str !== 'string') {\n return str;\n }\n\n const sanitzedStr = String.prototype.replace.call(str, /[^a-z0-9áéíóúñü .,_-]/gim, '');\n return String.prototype.trim.call(sanitzedStr);\n}\n\n/**\n * @name template\n * @type function\n * @description\n * Provides a templater function, which adds a line of code into generated function body.\n *\n * @param {object} state - used in visit and reference method to iterate and find schemas.\n * @param {DjvConfig} options\n * @return {function} tpl\n */\nfunction template(state, options) {\n function tpl(expression, ...args) {\n let last;\n\n tpl.lines.push(\n expression\n .replace(/%i/g, () => 'i')\n .replace(/\\$(\\d)/g, (match, index) => `${sanitizeString(args[index - 1])}`)\n .replace(/(%[sd])/g, () => {\n if (args.length) {\n last = args.shift();\n }\n\n return `${last}`;\n })\n );\n\n return tpl;\n }\n\n function clearDecode(tplString) {\n return tplString\n .replace('[', '')\n .replace(']', '')\n .replace('(', '')\n .replace(')', '')\n .replace('decodeURIComponent', '');\n }\n\n const error = typeof options.errorHandler === 'function' ?\n options.errorHandler :\n function defaultErrorHandler(errorType) {\n const path = this.data.toString()\n .replace(/^data/, '');\n const dataPath = path\n .replace(/\\['([^']+)'\\]/ig, '.$1')\n .replace(/\\[(i[0-9]*)\\]/ig, '[\\'+$1+\\']');\n const schemaPath = `#${\n path\n .replace(/\\[i([0-9]*)\\]/ig, '/items')\n .replace(/\\['([^']+)'\\]/ig, '/properties/$1')\n }/${errorType}`;\n\n return `return {\n keyword: '${errorType}',\n dataPath: decodeURIComponent(\"${clearDecode(dataPath)}\"),\n schemaPath: decodeURIComponent(\"${clearDecode(schemaPath)}\")\n };`;\n };\n\n Object.assign(tpl, {\n cachedIndex: 0,\n cached: [],\n cache(expression) {\n const layer = tpl.cached[tpl.cached.length - 1];\n if (layer[expression]) {\n return `i${layer[expression]}`;\n }\n\n tpl.cachedIndex += 1;\n layer[expression] = tpl.cachedIndex;\n return `(i${layer[expression]} = ${expression})`;\n },\n data: ['data'],\n error,\n lines: [],\n schema: ['schema'],\n push: tpl,\n /**\n * @name link\n * @description\n * Get schema validator by url\n * Call state link to generate or get cached function\n * @type {function}\n * @param {string} url\n * @return {string} functionName\n */\n link(url) {\n return `f${state.link(url)}`;\n },\n /**\n * @name visit\n * @description\n * Create new cache scope and visit given schema\n * @type {function}\n * @param {object} schema\n * @return {void}\n */\n visit(schema) {\n tpl.cached.push({});\n state.visit(schema, tpl);\n tpl.cached.pop();\n },\n });\n\n function dataToString() {\n return this.join('.').replace(/\\.\\[/g, '[');\n }\n tpl.data.toString = dataToString;\n tpl.schema.toString = dataToString;\n\n return tpl;\n}\n\n/**\n * @name restore\n * @type function\n * @description\n * Generate a function by given body with a schema in a closure\n *\n * @param {string} source - function inner & outer body\n * @param {object} schema - passed as argument to meta function\n * @param {DjvConfig} config\n * @return {function} tpl\n */\nfunction restore(source, schema, { inner } = {}) {\n /* eslint-disable no-new-func */\n const tpl = new Function('schema', source)(schema);\n /* eslint-enable no-new-func */\n\n if (!inner) {\n tpl.toString = function toString() {\n return source;\n };\n }\n\n return tpl;\n}\n\n/**\n * Configuration for template functions\n * @typedef {object} TemplateOptions\n * @property {string[]} context\n * @property {string[]} index\n * @property {boolean?} inner - a generating object should be considered as inner\n * @property {boolean?} defineErrors - if erros should be defined\n * @property {string[]} lines - content templates\n */\n\n/**\n * @private\n * @name makeVariables\n * @type function\n * @description\n * Generate internal variables\n *\n * @param {TemplateOptions} options\n * @return {string} variables\n */\nfunction makeVariables({ defineErrors, index }) {\n /**\n * @var {array} errors - empty array for pushing errors ability\n * @see errorHandler\n */\n const errors = defineErrors ? 'const errors = [];' : '';\n const variables = index ?\n `let i${Array(...Array(index))\n .map((value, i) => i + 1)\n .join(',i')};` :\n '';\n\n // @see map array with holes trick\n // http://2ality.com/2013/11/initializing-arrays.html\n // TODO change var to const\n return `\n ${errors}\n ${variables}\n `;\n}\n\n/**\n * @private\n * @name makeHelpers\n * @type function\n * @description\n * Generate internal helpers executed in outer function\n *\n * @param {TemplateOptions} options\n * @return {string} functions\n */\nfunction makeHelpers({ context, inner }) {\n if (inner || !context.length) {\n return '';\n }\n\n const functions = [];\n const references = [];\n\n context\n .forEach((value, i) => {\n if (typeof value === 'number') {\n references.push(`${i + 1} = f${value + 1}`);\n return;\n }\n functions.push(`${i + 1} = ${value}`);\n });\n\n return `const f${functions.concat(references).join(', f')};`;\n}\n\n/**\n * @private\n * @name makeContent\n * @type function\n * @description\n * Generate internal function body content, including variables\n *\n * @param {TemplateOptions} options\n * @return {string} functions\n */\nfunction makeContent(options) {\n const { defineErrors, lines } = options;\n\n const variables = makeVariables(options);\n const errors = defineErrors ? 'if(errors.length) return errors;' : '';\n const content = lines.join('\\n');\n\n return `\n \"use strict\";\n ${variables}\n ${content}\n ${errors}\n `;\n}\n\n/**\n * @name body\n * @type function\n * @description\n * Generate a function body, containing internal variables and helpers\n *\n * @param {object} tpl - template instance, containing all analyzed schema related data\n * @param {object} state - state of schema generation\n * @param {DjvConfig} config\n * @return {string} body\n */\nfunction body({ cachedIndex, lines }, { context }, { inner, errorHandler } = {}) {\n const options = {\n context,\n inner,\n defineErrors: errorHandler,\n index: cachedIndex,\n lines,\n };\n\n const helpers = makeHelpers(options);\n const content = makeContent(options);\n\n return `\n ${helpers}\n function f0(data) {\n ${content}\n }\n return f0;\n `;\n}\n\n/**\n * @name templateExpression\n * @type function\n * @description\n * Es6 template helper function\n * Transforms a validator utilities into generated functions body\n * @return {function} template\n */\nfunction templateExpression(strings, ...keys) {\n return (...values) => {\n let dict = values[values.length - 1] || {};\n let result = [strings[0]];\n keys.forEach((key, i) => {\n let value = Number.isInteger(key) ? values[key] : dict[key];\n result.push(value, strings[i + 1]);\n });\n return result.join('');\n };\n}\n\nmodule.exports = {\n body,\n restore,\n template,\n expression: templateExpression,\n};\n\n\n\n// WEBPACK FOOTER //\n// ./lib/utils/template.js","/**\n * @module formats\n * @description\n * Validators as string for format keyword rules.\n * A validator is a string, which when executed returns `false` if test is failed, `true` otherwise.\n */\n\nconst { expression } = require('./template');\n\nmodule.exports = {\n alpha: expression`!/^[a-zA-Z]+$/.test(${'data'})`,\n alphanumeric: expression`!/^[a-zA-Z0-9]+$/.test(${'data'})`,\n identifier: expression`!/^[-_a-zA-Z0-9]+$/.test(${'data'})`,\n hexadecimal: expression`!/^[a-fA-F0-9]+$/.test(${'data'})`,\n numeric: expression`!/^[0-9]+$/.test(${'data'})`,\n 'date-time': expression`isNaN(Date.parse(${'data'})) || ~${'data'}.indexOf(\\'/\\')`,\n uppercase: expression`${'data'} !== ${'data'}.toUpperCase()`,\n lowercase: expression`${'data'} !== ${'data'}.toLowerCase()`,\n hostname: expression`${'data'}.length >= 256 || !/^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\\\\-]{0,61}[a-zA-Z0-9])(\\\\.([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\\\\-]{0,61}[a-zA-Z0-9]))*$/.test(${'data'})`,\n uri: expression`!/^[A-Za-z][A-Za-z0-9+\\\\-.]*:(?:\\\\/\\\\/(?:(?:[A-Za-z0-9\\\\-._~!$&\\'()*+,;=:]|%[0-9A-Fa-f]{2})*@)?(?:\\\\[(?:(?:(?:(?:[0-9A-Fa-f]{1,4}:){6}|::(?:[0-9A-Fa-f]{1,4}:){5}|(?:[0-9A-Fa-f]{1,4})?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[0-9A-Fa-f]{2})*)*|)(?:\\\\?(?:[A-Za-z0-9\\\\-._~!$&\\'()*+,;=:@\\\\/?]|%[0-9A-Fa-f]{2})*)?(?:\\\\#(?:[A-Za-z0-9\\\\-._~!$&\\'()*+,;=:@\\\\/?]|%[0-9A-Fa-f]{2})*)?$/.test(${'data'})`,\n email: expression`!/^[^@]+@[^@]+\\\\.[^@]+$/.test(${'data'})`,\n ipv4: expression`!/^(\\\\d?\\\\d?\\\\d){0,255}\\\\.(\\\\d?\\\\d?\\\\d){0,255}\\\\.(\\\\d?\\\\d?\\\\d){0,255}\\\\.(\\\\d?\\\\d?\\\\d){0,255}$/.test(${'data'}) || ${'data'}.split(\".\")[3] > 255`,\n ipv6: expression`!/^((?=.*::)(?!.*::.+::)(::)?([\\\\dA-F]{1,4}:(:|\\\\b)|){5}|([\\\\dA-F]{1,4}:){6})((([\\\\dA-F]{1,4}((?!\\\\3)::|:\\\\b|$))|(?!\\\\2\\\\3)){2}|(((2[0-4]|1\\\\d|[1-9])?\\\\d|25[0-5])\\\\.?\\\\b){4})$/.test(${'data'})`,\n regex: expression`/[^\\\\\\\\]\\\\\\\\[^.*+?^\\${}()|[\\\\]\\\\\\\\bBcdDfnrsStvwWxu0-9]/i.test(${'data'})`,\n // TODO optimize uri-reference regex... too long\n 'json-pointer': expression`!/^$|^\\\\/(?:~(?=[01])|[^~])*$/i.test(${'data'})`,\n 'uri-reference': expression`!/^(?:[A-Za-z][A-Za-z0-9+\\\\-.]*:(?:\\\\/\\\\/(?:(?:[A-Za-z0-9\\\\-._~!$&\\'()*+,;=:]|%[0-9A-Fa-f]{2})*@)?(?:\\\\[(?:(?:(?:(?:[0-9A-Fa-f]{1,4}:){6}|::(?:[0-9A-Fa-f]{1,4}:){5}|(?:[0-9A-Fa-f]{1,4})?::(?:[0-9A-Fa-f]{1,4}:){4}|(?:(?:[0-9A-Fa-f]{1,4}:){0,1}[0-9A-Fa-f]{1,4})?::(?:[0-9A-Fa-f]{1,4}:){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\\/(?:(?:[A-Za-z0-9\\\\-._~!$&\\'()*+,;=:@]|%[0-9A-Fa-f]{2})+(?:\\\\/(?:[A-Za-z0-9\\\\-._~!$&\\'()*+,;=:@]|%[0-9A-Fa-f]{2})*)*)?|(?:[A-Za-z0-9\\\\-._~!$&\\'()*+,;=@]|%[0-9A-Fa-f]{2})+(?:\\\\/(?:[A-Za-z0-9\\\\-._~!$&\\'()*+,;=:@]|%[0-9A-Fa-f]{2})*)*|)(?:\\\\?(?:[A-Za-z0-9\\\\-._~!$&\\'()*+,;=:@\\\\/?]|%[0-9A-Fa-f]{2})*)?(?:\\\\#(?:[A-Za-z0-9\\\\-._~!$&\\'()*+,;=:@\\\\/?]|%[0-9A-Fa-f]{2})*)?)$/i.test(${'data'})`,\n 'uri-template': expression`!/^(?:(?:[^\\\\x00-\\\\x20\"\\'<>%\\\\\\\\^\\`{|}]|%[0-9a-f]{2})|\\\\{[+#.\\\\/;?&=,!@|]?(?:[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.test(${'data'})`,\n};\n\n\n\n// WEBPACK FOOTER //\n// ./lib/utils/formats.js","/**\n * @module validators\n * @description\n * Contains validators functions links\n * Provides an information about the order in which validators should be applied\n * Each validator may return true, which means, others will be ignored\n * @see $ref\n */\nconst required = require('./required');\nconst format = require('./format');\nconst property = require('./property');\nconst type = require('./type');\nconst $ref = require('./$ref');\nconst not = require('./not');\nconst anyOf = require('./anyOf');\nconst oneOf = require('./oneOf');\nconst allOf = require('./allOf');\nconst dependencies = require('./dependencies');\nconst properties = require('./properties');\nconst patternProperties = require('./patternProperties');\nconst items = require('./items');\nconst contains = require('../validators/contains');\nconst constant = require('../validators/const');\nconst propertyNames = require('../validators/propertyNames');\n\nmodule.exports = {\n name: {\n $ref,\n required,\n format,\n property,\n type,\n not,\n anyOf,\n oneOf,\n allOf,\n dependencies,\n properties,\n patternProperties,\n items,\n contains,\n constant,\n propertyNames,\n },\n list: [\n $ref,\n required,\n format,\n property,\n type,\n not,\n anyOf,\n oneOf,\n allOf,\n dependencies,\n properties,\n patternProperties,\n items,\n contains,\n constant,\n propertyNames\n ]\n};\n\n\n\n// WEBPACK FOOTER //\n// ./lib/validators/index.js","/**\n * @module properties\n * @description\n * Validators as string for properties keyword rules.\n * A validator is a function, which when executed returns\n * - `false` if test is failed,\n * - `true` otherwise.\n */\nmodule.exports = {\n readOnly: 'false',\n exclusiveMinimum(schema) {\n return `%s <= ${schema.exclusiveMinimum}`;\n },\n minimum(schema) {\n return `%s < ${schema.minimum}`;\n },\n exclusiveMaximum(schema) {\n return `%s >= ${schema.exclusiveMaximum}`;\n },\n maximum(schema) {\n return `%s > ${schema.maximum}`;\n },\n multipleOf: '($1/$2) % 1 !== 0 && typeof $1 === \"number\"',\n // When the instance value is a string\n // this provides a regular expression that a string instance MUST match in order to be valid.\n pattern(schema) {\n let pattern;\n let modifiers;\n\n if (typeof schema.pattern === 'string') { pattern = schema.pattern; } else {\n pattern = schema.pattern[0];\n modifiers = schema.pattern[1];\n }\n\n const regex = new RegExp(pattern, modifiers);\n return `typeof ($1) === \"string\" && !${regex}.test($1)`;\n },\n /**\n * Creates an array containing the numeric code points of each Unicode\n * character in the string. While JavaScript uses UCS-2 internally,\n * this function will convert a pair of surrogate halves (each of which\n * UCS-2 exposes as separate characters) into a single code point,\n * matching UTF-16.\n * @see `punycode.ucs2.encode`\n * @see <https://mathiasbynens.be/notes/javascript-encoding>\n * @memberOf punycode.ucs2\n * @name decode\n * @param {String} string The Unicode input string (UCS-2).\n * @returns {Array} The new array of code points.\n */\n minLength: 'typeof $1 === \"string\" && function dltml(b,c){for(var a=0,d=b.length;a<d&&c;){var e=b.charCodeAt(a++);55296<=e&&56319>=e&&a<d&&56320!==(b.charCodeAt(a++)&64512)&&a--;c--}return!!c}($1, $2)',\n maxLength: 'typeof $1 === \"string\" && function dmtml(b,c){for(var a=0,d=b.length;a<d&&0<=c;){var e=b.charCodeAt(a++);55296<=e&&56319>=e&&a<d&&56320!==(b.charCodeAt(a++)&64512)&&a--;c--}return 0>c}($1, $2)',\n // This attribute defines the minimum number of values\n // in an array when the array is the instance value.\n minItems: '$1.length < $2 && Array.isArray($1)',\n // This attribute defines the maximum number of values\n // in an array when the array is the instance value.\n maxItems: '$1.length > $2 && Array.isArray($1)',\n // TODO without some\n uniqueItems(schema, fn) {\n if (!schema.uniqueItems) {\n return 'true';\n }\n\n fn(fn.cache('{}'));\n return `Array.isArray($1) && $1.some(function(item, key) {\n if(item !== null && typeof item === \"object\") key = JSON.stringify(item);\n else key = item;\n if(${fn.cache('{}')}.hasOwnProperty(key)) return true;\n ${fn.cache('{}')}[key] = true;\n })`;\n },\n // ***** object validation ****\n minProperties: '!Array.isArray($1) && typeof $1 === \"object\" && Object.keys($1).length < $2',\n // An object instance is valid against \"maxProperties\"\n // if its number of properties is less than, or equal to, the value of this keyword.\n maxProperties: '!Array.isArray($1) && typeof $1 === \"object\" && Object.keys($1).length > $2',\n // ****** all *****\n enum(schema, fn) {\n return schema.enum.map((value) => {\n let $1 = '$1';\n let comparedValue = value;\n\n if (typeof value === 'object') {\n comparedValue = `'${JSON.stringify(value)}'`;\n $1 = fn.cache('JSON.stringify($1)');\n } else if (typeof value === 'string') {\n comparedValue = `'${escape(value)}'`;\n }\n\n return `${$1} != decodeURIComponent(${comparedValue})`;\n }).join(' && ');\n }\n};\n\n\n\n// WEBPACK FOOTER //\n// ./lib/utils/properties.js","/**\n * @module keywords\n * @description\n * A list of keywords used in specification.\n */\nmodule.exports = [\n '$ref',\n '$schema',\n 'type',\n 'not',\n 'anyOf',\n 'allOf',\n 'oneOf',\n 'properties',\n 'patternProperties',\n 'additionalProperties',\n 'items',\n 'additionalItems',\n 'required',\n 'default',\n 'title',\n 'description',\n 'definitions',\n 'dependencies',\n '$id',\n 'contains',\n 'const',\n 'examples'\n];\n\n\n\n// WEBPACK FOOTER //\n// ./lib/utils/keywords.js","/**\n * @module utils\n * @description\n * Utilities to check and normalize uri\n */\nconst REGEXP_URI = /:\\/\\//;\nconst REGEXP_URI_FRAGMENT = /#\\/?/;\nconst REGEXP_URI_PATH = /(^[^:]+:\\/\\/[^?#]*\\/).*/;\n\n/**\n * @name keys\n * @type {object}\n * @description\n * Keys to apply schema attributes & values\n */\nconst keys = {\n id: '$id',\n};\n\n/**\n * @name head\n * @type {function}\n * @description\n * Clean an id from its fragment\n * @example\n * head('http://domain.domain:2020/test/a#test')\n * // returns 'http://domain.domain:2020/test/a'\n * @param {string} id\n * @returns {string} cleaned\n */\nfunction head(uri) {\n if (typeof uri !== 'string') {\n return uri;\n }\n\n const parts = uri.split(REGEXP_URI_FRAGMENT);\n return parts[0];\n}\n\nfunction isFullUri(uri) {\n return REGEXP_URI.test(uri);\n}\n\n/**\n * @name path\n * @type {function}\n * @description\n * Gets a scheme, domain and a path part from the uri\n * @example\n * path('http://domain.domain:2020/test/a?test')\n * // returns 'http://domain.domain:2020/test/'\n * @param {string} uri\n * @returns {string} path\n */\nfunction path(uri) {\n return uri.replace(REGEXP_URI_PATH, '$1');\n}\n\n/**\n * @description\n * Get the fragment (#...) part of the uri\n * @see https://tools.ietf.org/html/rfc3986#section-3\n * @param {string} uri\n * @returns {string} fragment\n */\nfunction fragment(uri) {\n if (typeof uri !== 'string') {\n return uri;\n }\n\n const parts = uri.split(REGEXP_URI_FRAGMENT);\n return parts[1];\n}\n\n/**\n * @name makePath\n * @type function\n * @description\n * Concat parts into single uri\n * @see https://tools.ietf.org/html/rfc3986#section-3\n * @param {array<string>} parts\n * @returns {string} uri\n */\nfunction makePath(parts) {\n return parts\n .filter(part => typeof part === 'string')\n .reduce((uri, id) => {\n // if id is full replace uri\n if (!uri.length || isFullUri(id)) {\n return id;\n }\n if (!id) {\n return uri;\n }\n\n // if fragment found\n if (id.indexOf('#') === 0) {\n // should replace uri's sharp with id\n const sharpUriIndex = uri.indexOf('#');\n if (sharpUriIndex === -1) {\n return uri + id;\n }\n\n return uri.slice(0, sharpUriIndex) + id;\n }\n\n // get path part of uri\n // and replace the rest with id\n const partialUri = path(uri) + id;\n return partialUri + (partialUri.indexOf('#') === -1 ? '#' : '');\n }, '');\n}\n\n/**\n * @name normalize\n * @type {function}\n * @description\n * Replace json-pointer special symbols in a given uri.\n * @param {string} uri\n * @returns {string} normalizedUri\n */\nfunction normalize(uri) {\n return decodeURIComponent(uri.replace(/~1/g, '/').replace(/~0/g, '~'));\n}\n\nmodule.exports = {\n makePath,\n isFullUri,\n head,\n fragment,\n normalize,\n keys,\n};\n\n\n\n// WEBPACK FOOTER //\n// ./lib/utils/uri.js","const { restore, expression } = require('./utils/template');\nconst formats = require('./utils/formats');\nconst { generate, State } = require('./utils/state');\nconst { add, use } = require('./utils/environment.js');\n\n/**\n * Configuration for template\n * @typedef {object} DjvConfig\n * @property {string?} version - defines which version of json-schema draft to use,\n * draft-04 by default\n * @property {function?} versionConfigure - handler to apply for environment version\n * @property {boolean?} inner - a generating object should be considered as inner\n * Default value is false/undefined.\n * If true, then it avoid creating variables in a generated function body,\n * however without proper wrapper function approach will not work.\n * @see template/body, template/body\n * @property {object?} formats - an object containing list of formatters to add for environment\n * @property {function?} errorHandler - a handler to use for generating custom error messages\n */\n\n/**\n * @name Environment\n * @description\n * Key constructor used for creating enivornment instance\n * @type {function} constructor\n * @param {DjvConfig} options passed to templater and utilities\n *\n * Usage\n *\n * ```javascript\n * const env = djv();\n * const env = new djv();\n * const env = new djv({ errorHandler: () => ';' });\n * ```\n */\nfunction Environment(options = {}) {\n if (!(this instanceof Environment)) { return new Environment(options); }\n\n this.options = options;\n this.resolved = {};\n this.state = new State(null, this);\n\n this.useVersion(options.version, options.versionConfigure);\n this.addFormat(options.formats);\n}\n\nObject.assign(Environment, {\n expression,\n});\n\nObject.assign(Environment.prototype, {\n /**\n * check if object correspond to schema\n *\n * Usage\n *\n * ```javascript\n * env.validate('test#/common', { type: 'common' });\n * // => undefined\n *\n * env.validate('test#/common', { type: 'custom' });\n * // => 'required: data'\n *\n * @param {string} name\n * @param {object} object\n * @returns {string} error - undefined if it is valid\n */\n validate(name, object) {\n const foundSchema = this.resolve(name);\n return foundSchema.fn(object);\n },\n\n /**\n * add schema to djv environment\n *\n * Usage\n *\n * ```javascript\n * env.addSchema('test', jsonSchema);\n * ```\n *\n * @param {string?} name\n * @param {object} schema\n * @param {object} schema\n * @returns {resolved}\n */\n addSchema(name, schema) {\n const realSchema = typeof name === 'object' ? name : schema;\n const resolved = {\n schema: realSchema,\n fn: generate(this, realSchema, undefined, this.options),\n };\n\n [name, schema.id]\n .filter(id => typeof id === 'string')\n .forEach((id) => {\n this.resolved[id] = Object.assign({ name: id }, resolved);\n });\n\n return resolved;\n },\n\n /**\n * removes a schema or the whole structure from djv environment\n *\n * Usage\n *\n * ```javascript\n * env.removeSchema('test');\n * ```\n *\n * @param {string} name\n */\n removeSchema(name) {\n if (name) {\n delete this.resolved[name];\n } else {\n this.resolved = {};\n }\n },\n\n /**\n * resolves name by existing environment\n *\n * Usage\n *\n * ```javascript\n * env.resolve('test');\n * // => { name: 'test', schema: {} }, fn: ... }\n * ```\n *\n * @param {string} name\n * @returns {resolved}\n */\n resolve(name) {\n if (typeof name === 'object' || !this.resolved[name]) {\n return this.addSchema(\n name,\n this.state.resolve(name)\n );\n }\n\n return this.resolved[name];\n },\n\n /**\n * exports the whole structure object from environment or by resolved name\n *\n * Usage\n *\n * ```javascript\n * env.export();\n * // => { test: { name: 'test', schema: {}, ... } }\n * ```\n *\n * @param {string} name\n * @returns {serializedInternalState}\n */\n export(name) {\n let resolved;\n if (name) {\n resolved = this.resolve(name);\n resolved = {\n name,\n schema: resolved.schema,\n fn: resolved.fn.toString()\n };\n } else {\n resolved = {};\n Object.keys(this.resolved).forEach((key) => {\n resolved[key] = {\n name: key,\n schema: this.resolved[key].schema,\n fn: this.resolved[key].fn.toString()\n };\n });\n }\n\n return JSON.stringify(resolved);\n },\n\n /**\n * imports all found structure objects to internal environment structure\n * Usage\n *\n * ```javascript\n * env.import(config);\n * ```\n *\n * @param {object} config - internal structure or only resolved schema object\n */\n import(config) {\n const item = JSON.parse(config);\n let restoreData = item;\n if (item.name && item.fn && item.schema) {\n restoreData = { [item.name]: item };\n }\n\n Object.keys(restoreData).forEach((key) => {\n const { name, schema, fn: source } = restoreData[key];\n const fn = restore(source, schema, this.options);\n this.resolved[name] = { name, schema, fn };\n });\n },\n\n /**\n * @name addFormat\n * @type function\n * @description\n * Add formatter to djv environment.\n * When a string is passed it is interpreted as an expression which\n * when returns `true` goes with an error, when returns `false` then a property is valid.\n * When a function is passed it will be executed during schema compilation\n * with a current schema and template helper arguments.\n * @see utils/formats\n *\n * Usage\n *\n * ```javascript\n * env.addFormat('UpperCase', '%s !== %s.toUpperCase()');\n * // or\n * env.addFormat('isOk', function(schema, tpl){\n * return `!${schema.isOk} || %s !== %s.toUpperCase()`;\n * });\n * ```\n *\n * @param {string/object?} name\n * @param {string/function} formatter\n */\n addFormat(name, formatter) {\n if (typeof name === 'string') {\n formats[name] = formatter;\n return;\n }\n\n if (typeof name === 'object') {\n Object.assign(formats, name);\n }\n },\n\n /**\n * @name setErrorHandler\n * @type function\n * @description\n * Specify custom error handler which will be used in generated functions when problem found.\n * The function should return a string expression, which will be executed when generated\n * validator function is executed. The simpliest use case is the default one\n * @see template/defaultErrorHandler\n * ```javascript\n * function defaultErrorHandler(errorType) {\n * return `return \"${errorType}: ${tpl.data}\";`;\n * }\n * ```\n * It returns an expression 'return ...', so the output is an error string.\n * Usage\n * ```javascript\n * djv({ errorHandler: () => 'return { error: true };' }) // => returns an object\n * djv({\n * errorHandler: function customErrorHandler(errorType, property) {\n * return `errors.push({\n * type: \"${errorType}\",\n * schema: \"${this.schema[this.schema.length - 1]}\",\n * data: \"${this.data[this.data.length - 1]}\"\n * });`;\n * }\n * });\n * ```\n * When a custom error handler is used, the template body function adds a `error` variable inside\n * a generated validator, which can be used to put error information. `errorType` is always\n * passed to error handler function. Some validate utilities put extra argument, like f.e.\n * currently processed property value. Inside the handler context is a templater instance,\n * which contains `this.schema`, `this.data` paths arrays to identify validator position.\n * @see test/index/setErrorHandler for more examples\n * @param {function} errorHandler - a function called each time compiler creates an error branch\n * @returns void\n */\n setErrorHandler(errorHandler) {\n Object.assign(this.options, { errorHandler });\n },\n /**\n * @name useVersion\n * @type {function}\n * @description\n * Add a specification version for environment\n * A configure function is called with exposed environments, like keys, formats, etc.\n * Updates internals utilities and configurations to fix versions implementation conflicts\n * @param {string} version of json-schema specification to use\n * @param {function} configure\n * @returns void\n */\n useVersion(version, configure) {\n if (typeof configure !== 'function' && version === 'draft-04') {\n /* eslint-disable no-param-reassign, global-require, import/no-extraneous-dependencies */\n configure = require('@korzio/djv-draft-04');\n /* eslint-enable no-param-reassign, global-require, import/no-extraneous-dependencies */\n }\n if (typeof configure === 'function') {\n add(version, configure);\n }\n use(version);\n },\n});\n\nmodule.exports = Environment;\n\n\n\n// WEBPACK FOOTER //\n// ./lib/djv.js","/**\n * @module state\n * @description\n * State module is responsible for scope schemas resolution.\n * It also exports a main `generate` function.\n */\n\nconst { list: validators } = require('../validators');\nconst { body, restore, template } = require('./template');\nconst { hasProperty } = require('./');\nconst {\n normalize,\n makePath,\n head,\n isFullUri,\n fragment,\n keys,\n} = require('./uri');\nconst {\n is: isSchema,\n transform: transformSchema,\n} = require('./schema');\n\n/* eslint-disable no-unused-vars */\nfunction State(schema = {}, env) {\n/* eslint-enable no-unused-vars */\n Object.assign(this, {\n context: [],\n entries: new Map(),\n env,\n });\n}\n\n/**\n * @name generate\n * @type {function}\n * @description\n * The main schema process function.\n * Available and used both in external and internal generation.\n * Saves the state for internal recursive calls.\n * @param {object} env - djv environment\n * @param {object} schema - to process\n * @param {State} state - saved state\n * @param {Environment} options\n * @returns {function} restoredFunction\n */\nfunction generate(env, schema, state = new State(schema, env), options) {\n const tpl = template(state, options);\n tpl.visit(schema);\n\n const source = body(tpl, state, options);\n return restore(source, schema, options);\n}\n\nState.prototype = Object.assign(Object.create(Array.prototype), {\n /**\n * @name addEntry\n * @type {function}\n * @description\n * Generates an internal function.\n * Usually necessary for `allOf` types of validators.\n * Caches generated functions by schema object key.\n * Checks for an existing schema in a context stack to avoid double parsing and generation.\n * @param {string} url\n * @param {object} schema\n * @returns {number/boolean} index\n */\n addEntry(url, schema) {\n let entry = this.entries.get(schema);\n if (entry === false) {\n // has already been added to process queue\n // will be revealed as an entry\n return this.context.push(schema);\n }\n\n if (typeof entry === 'undefined') {\n // start to process schema\n this.entries.set(schema, false);\n entry = generate(this.env, schema, this, { inner: true });\n this.entries.set(schema, entry);\n this.revealReference(schema);\n }\n\n return this.context.push(entry);\n },\n /**\n * @name revealReference\n * @type {function}\n * @description\n * If a schema was added during the add entry phase\n * Then it should be revealed in this step\n * @param {object} schema\n * @returns {void}\n */\n revealReference(schema) {\n for (\n let doubled = this.context.indexOf(schema);\n doubled !== -1;\n doubled = this.context.indexOf(schema)\n ) {\n this.context[doubled] = this.context.length;\n }\n },\n /**\n * @name link\n * @type {function}\n * @description\n * Returns an entry's index in a context stack.\n * @param {string} url\n * @returns {string} entry\n */\n link(url) {\n const schema = this.resolve(url);\n const entry = this.addEntry(url, schema);\n return entry;\n },\n /**\n * @name resolveReference\n * @type {function}\n * @description\n * Resolve reference against the stack.\n * @param {string} reference\n * @returns {string} resolvedReference\n */\n resolveReference(reference) {\n if (isFullUri(reference)) {\n return reference;\n }\n\n // find last full URI schema\n let lastFullURIReference;\n let lastFullURISchemaIndex;\n\n for (let i = this.length - 1; i >= 0; i -= 1, lastFullURIReference = false) {\n const { [keys.id]: id, $ref } = this[i];\n lastFullURIReference = id || $ref;\n if (isFullUri(lastFullURIReference)) {\n lastFullURISchemaIndex = i;\n break;\n }\n }\n\n // collect all partial routes for it\n const partialReferences = [];\n for (let i = this.length - 1; i > lastFullURISchemaIndex; i -= 1) {\n const { [keys.id]: id, $ref } = this[i];\n const partialReference = id || $ref;\n if (head(partialReference)) {\n partialReferences.push(partialReference);\n }\n }\n\n // attach reference and make path\n const path = makePath([lastFullURIReference, ...partialReferences, reference]);\n return path;\n },\n /**\n * @name ascend\n * @private\n * @type {function}\n * @description\n * Search for a parent schema by reference.\n * Iterates over the chain of schemas.\n * @param {string} reference\n * @returns {object} parentSchema\n */\n ascend(reference) {\n const path = head(reference);\n let { schema: parentSchema = this[0] } = this.env.resolved[path] || {};\n\n // Search while it is a full schema, not a ref\n while (\n parentSchema.$ref &&\n // avoid infinite loop\n head(parentSchema.$ref) !== head(reference) &&\n // > All other properties in a \"$ref\" object MUST be ignored.\n // @see https://tools.ietf.org/html/draft-wright-json-schema-01#section-8\n Object.keys(parentSchema).length === 1\n ) {\n parentSchema = this.ascend(parentSchema.$ref);\n }\n\n return parentSchema;\n },\n /**\n * @name descend\n * @private\n * @type {function}\n * @description\n * Search for a child schema by reference.\n * Iterates over the chain of schemas.\n * @param {string} reference\n * @returns {object} currentSchema\n */\n descend(reference, parentSchema) {\n let uriFragment = fragment(reference);\n if (!uriFragment && isFullUri(reference)) {\n return parentSchema;\n }\n\n if (!uriFragment) {\n uriFragment = reference;\n }\n\n const parts = uriFragment.split('/');\n const currentSchema = parts\n .map(normalize)\n .reduce((schema, part, index) => {\n let subSchema = schema[part];\n if (!isSchema(subSchema)) {\n subSchema = schema.definitions && schema.definitions[part];\n }\n\n if (\n // last will be pushed on visit\n // @see /draft4/refRemote.json:http://localhost:1234/scope_change_defs2.json\n index !== parts.length - 1 &&\n hasProperty(subSchema, keys.id)\n ) {\n this.push(subSchema);\n }\n\n return subSchema;\n }, parentSchema);\n\n return isSchema(currentSchema) ? currentSchema : parentSchema;\n },\n /**\n * @name resolve\n * @type {function}\n * @description\n * Resolves schema by given reference and current registered context stack.\n * @param {string} url\n * @returns {object} schema\n */\n resolve(reference) {\n if (typeof reference !== 'string') {\n return reference;\n }\n\n const fullReference = this.resolveReference(reference);\n const parentSchema = this.ascend(fullReference);\n const subSchema = this.descend(reference, parentSchema);\n\n return subSchema;\n },\n /**\n * @name visit\n * @type {function}\n * @description\n * Calls each registered validator with given schema and template instance.\n * Validator may or may not add code to generated validator function.\n * @param {object} pseudoSchema\n * @param {object} tpl\n * @returns {void}\n */\n visit(pseudoSchema, tpl) {\n const schema = transformSchema(pseudoSchema);\n const initialLength = this.length;\n this.push(schema);\n\n validators.some(validator => (\n validator(schema, tpl)\n ));\n\n this.length = initialLength;\n },\n});\n\nmodule.exports = {\n State,\n generate,\n};\n\n\n\n// WEBPACK FOOTER //\n// ./lib/utils/state.js","module.exports = function required(schema, tpl) {\n if (!Array.isArray(schema.required)) {\n return;\n }\n\n tpl(`if (${tpl.data} !== null && typeof ${tpl.data} === 'object' && !Array.isArray(${tpl.data})) {\n ${schema.required.map((name) => {\n const condition = `!${tpl.data}.hasOwnProperty(decodeURIComponent(\"${escape(name)}\"))`;\n const error = tpl.error('required', name);\n return `if (${condition}) ${error}`;\n }).join('')}\n }`);\n};\n\n\n\n// WEBPACK FOOTER //\n// ./lib/validators/required.js","const formats = require('../utils/formats');\n\nmodule.exports = function format(schema, tpl) {\n if (typeof schema.format === 'undefined') {\n return;\n }\n\n const formatter = formats[schema.format];\n if (typeof formatter !== 'function') {\n return;\n }\n\n const { data } = tpl;\n const condition = formatter({ data, schema });\n const error = tpl.error('format');\n\n tpl(`if (${condition}) ${error}`);\n};\n\n\n\n// WEBPACK FOOTER //\n// ./lib/validators/format.js","const properties = require('../utils/properties');\nconst keywords = require('../utils/keywords');\nconst { asExpression } = require('../utils');\n\nmodule.exports = function property(schema, tpl) {\n Object.keys(schema)\n .forEach((key) => {\n if (keywords.indexOf(key) !== -1 || key === 'format') {\n return;\n }\n\n const condition = asExpression(properties[key], schema, tpl);\n if (!condition) {\n return;\n }\n const error = tpl.error(key);\n\n tpl(`if (${condition}) ${error}`, tpl.data, schema[key]);\n });\n};\n\n\n\n// WEBPACK FOOTER //\n// ./lib/validators/property.js","const types = require('../utils/types');\nconst { hasProperty } = require('../utils');\n\nmodule.exports = function type(schema, tpl) {\n if (!hasProperty(schema, 'type')) {\n return;\n }\n\n const error = tpl.error('type', schema.type);\n const condition = `(${[].concat(schema.type).map(key => types[key]).join(') && (')})`;\n\n tpl(`if (${condition}) ${error}`, tpl.data);\n};\n\n\n\n// WEBPACK FOOTER //\n// ./lib/validators/type.js","module.exports = {\n null: '%s !== null',\n string: 'typeof %s !== \"string\"',\n boolean: 'typeof %s !== \"boolean\"',\n number: 'typeof %s !== \"number\" || %s !== %s',\n integer: 'typeof %s !== \"number\" || %s % 1 !== 0',\n object: '!%s || typeof %s !== \"object\" || Array.isArray(%s)',\n array: '!Array.isArray(%s)',\n date: '!(%s instanceof Date)'\n};\n\n\n\n// WEBPACK FOOTER //\n// ./lib/utils/types.js","const { hasProperty } = require('../utils');\n\nmodule.exports = function $ref(schema, tpl) {\n if (!hasProperty(schema, '$ref')) {\n return false;\n }\n\n const condition = `${tpl.link(schema.$ref)}(${tpl.data})`;\n const error = tpl.error('$ref');\n\n tpl(`if (${condition}) ${error}`);\n\n // All other properties in a \"$ref\" object MUST be ignored.\n // @see https://tools.ietf.org/html/draft-wright-json-schema-01#section-8\n return true;\n};\n\n\n\n// WEBPACK FOOTER //\n// ./lib/validators/$ref.js","const { hasProperty } = require('../utils');\n\nmodule.exports = function not(schema, tpl) {\n if (!hasProperty(schema, 'not')) {\n return;\n }\n\n const condition = `${tpl.link(schema.not)}(${tpl.data})`;\n const error = tpl.error('not');\n\n tpl(`if (!${condition}) ${error}`);\n};\n\n\n\n// WEBPACK FOOTER //\n// ./lib/validators/not.js","const { hasProperty } = require('../utils');\n\nmodule.exports = function anyOf(schema, tpl) {\n if (!hasProperty(schema, 'anyOf')) {\n return;\n }\n\n const error = tpl.error('anyOf');\n const condition = schema.anyOf\n .map(reference => `${tpl.link(reference)}(${tpl.data})`)\n .join(' && ');\n\n tpl(`if (${condition}) ${error}`);\n};\n\n\n\n// WEBPACK FOOTER //\n// ./lib/validators/anyOf.js","const { hasProperty } = require('../utils');\n\nmodule.exports = function oneOf(schema, tpl) {\n if (!hasProperty(schema, 'oneOf')) {\n return;\n }\n\n const fns = schema.oneOf.map(reference => tpl.link(reference));\n const arr = tpl.cache(`[${fns}]`);\n const cachedArr = tpl.cache(`[${fns}]`);\n const index = tpl.cache(`${cachedArr}.length - 1`);\n const cachedIndex = tpl.cache(`${cachedArr}.length - 1`);\n const count = tpl.cache('0');\n const cachedCount = tpl.cache('0');\n const error = tpl.error('oneOf');\n\n tpl(`for (\n ${arr}, ${index}, ${count};\n ${cachedIndex} >= 0 && ${cachedIndex} < ${cachedArr}.length;\n ${cachedIndex}--) {\n if(!${cachedArr}[${cachedIndex}](${tpl.data})) ${cachedCount}++;\n }\n if (${cachedCount} !== 1) ${error}\n `);\n};\n\n\n\n// WEBPACK FOOTER //\n// ./lib/validators/oneOf.js","const { hasProperty } = require('../utils');\n\nmodule.exports = function allOf(schema, tpl) {\n if (!hasProperty(schema, 'allOf')) {\n return;\n }\n\n const error = tpl.error('allOf');\n const condition = schema.allOf\n .map(reference => `${tpl.link(reference)}(${tpl.data})`)\n .join(' || ');\n\n tpl(`if (${condition}) ${error}`);\n};\n\n\n\n// WEBPACK FOOTER //\n// ./lib/validators/allOf.js","const { hasProperty } = require('../utils');\nconst { is: isSchema } = require('../utils/schema');\n\n// @see http://json-schema.org/latest/json-schema-validation.html#rfc.section.6.5.7\nmodule.exports = function dependencies(schema, tpl) {\n if (!hasProperty(schema, 'dependencies')) {\n return;\n }\n\n Object.keys(schema.dependencies)\n .forEach((dependency) => {\n const value = schema.dependencies[dependency];\n const error = tpl.error('dependencies');\n\n tpl(`if (${tpl.data}.hasOwnProperty(decodeURIComponent(\"${escape(dependency)}\"))) {`);\n if (Array.isArray(value) || typeof value === 'string') {\n [...value]\n .map(property => `if (!${tpl.data}.hasOwnProperty(decodeURIComponent(\"${escape(property)}\"))) ${error}`)\n .map(tpl);\n } else if (isSchema(value)) {\n tpl.visit(value);\n }\n tpl('}');\n });\n};\n\n\n\n// WEBPACK FOOTER //\n// ./lib/validators/dependencies.js","const { hasProperty } = require('../utils');\n\nmodule.exports = function properties(schema, tpl) {\n if (!hasProperty(schema, 'properties') || typeof schema.properties !== 'object') {\n return;\n }\n\n Object.keys(schema.properties)\n .forEach((propertyKey) => {\n const propertySchema = schema.properties[propertyKey];\n if (typeof propertySchema === 'object' && !Object.keys(propertySchema).length) {\n return;\n }\n\n const isNotRequired = !schema.required || schema.required.indexOf(propertyKey) === -1;\n if (isNotRequired) {\n tpl(`if (${tpl.data}.hasOwnProperty(decodeURIComponent(\"${escape(propertyKey)}\"))) {`);\n }\n\n tpl.data.push(`[decodeURIComponent('${escape(propertyKey)}')]`);\n tpl.visit(propertySchema);\n tpl.data.pop();\n\n if (isNotRequired) {\n tpl('}');\n }\n });\n};\n\n\n\n// WEBPACK FOOTER //\n// ./lib/validators/properties.js","const { hasProperty } = require('../utils');\n\nmodule.exports = function patternProperties(schema, tpl) {\n const hasAdditionalProperties = hasProperty(schema, 'additionalProperties') && schema.additionalProperties !== true;\n const hasPatternProperties = hasProperty(schema, 'patternProperties');\n\n if (!hasAdditionalProperties && !hasPatternProperties) {\n return;\n }\n\n // When the instance value is an object,\n // the property values of the instance object\n // MUST conform to the property definitions in this object.\n tpl(`if(typeof ${tpl.data} === 'object' && !Array.isArray(${tpl.data})) {`);\n\n tpl(tpl.cache('null'));\n const property = tpl.cache('null');\n const visitAdditionalProperties = () => {\n if (schema.additionalProperties === false) {\n tpl(tpl.error('additionalProperties'));\n } else if (schema.additionalProperties) {\n tpl.data.push(`[${property}]`);\n tpl.visit(schema.additionalProperties);\n tpl.data.pop();\n }\n };\n\n tpl(`for (${property} in ${tpl.data}) {`);\n if (hasAdditionalProperties && hasPatternProperties) {\n tpl(tpl.cache('false'));\n }\n\n if (hasPatternProperties) {\n Object.keys(schema.patternProperties)\n .forEach((propertyKey) => {\n tpl(`if (${new RegExp(propertyKey)}.test(${property})) {`);\n if (hasAdditionalProperties) {\n tpl(`${tpl.cache('false')} = true;`);\n }\n\n const propertySchema = schema.patternProperties[propertyKey];\n tpl.data.push(`[${property}]`);\n tpl.visit(propertySchema);\n tpl.data.pop();\n tpl('}');\n\n if (schema.properties) {\n tpl(`if (${hasAdditionalProperties ? `${tpl.cache('false')} || ` : ''} ${tpl.schema}.properties.hasOwnProperty(${property})) continue;`);\n } else if (hasAdditionalProperties) {\n tpl(`if (${tpl.cache('false')}) continue;`);\n }\n\n visitAdditionalProperties();\n });\n } else {\n if (schema.properties) {\n tpl(`if(${tpl.schema}.properties.hasOwnProperty(${property})) continue;`);\n }\n visitAdditionalProperties();\n }\n\n tpl('}}');\n};\n\n\n\n// WEBPACK FOOTER //\n// ./lib/validators/patternProperties.js","const { hasProperty } = require('../utils');\n\nmodule.exports = function items(schema, tpl) {\n if (!hasProperty(schema, 'items')) {\n return;\n }\n\n const itemsLength = schema.items.length;\n const error = tpl.error('additionalItems');\n const { data } = tpl;\n\n tpl(`if(Array.isArray(${data})) {`);\n if (Array.isArray(schema.items)) {\n if (schema.additionalItems === false) {\n tpl(`if (${data}.length > ${itemsLength}) ${error}`);\n }\n\n schema.items.forEach((subSchema, index) => {\n tpl(`if(${data}.length > ${index}) {`);\n data.push(`[${index}]`);\n tpl.visit(subSchema);\n data.pop();\n tpl('}');\n });\n\n if (typeof schema.additionalItems === 'object') {\n const zeroIndex = tpl.cache(itemsLength);\n const index = tpl.cache(itemsLength);\n\n tpl(`for (${zeroIndex}; ${index} < ${data}.length; ${index}++) {`);\n data.push(`[${tpl.cache(itemsLength)}]`);\n tpl.visit(schema.additionalItems);\n data.pop();\n tpl('}');\n }\n } else {\n const zeroIndex = tpl.cache('0');\n const index = tpl.cache('0');\n\n tpl(`for (${zeroIndex}; ${index} < ${data}.length; ${index}++) {`);\n data.push(`[${index}]`);\n tpl.visit(schema.items);\n data.pop();\n tpl('}');\n }\n tpl('}');\n};\n\n\n\n// WEBPACK FOOTER //\n// ./lib/validators/items.js","const { hasProperty } = require('../utils');\n\nmodule.exports = function contains(schema, tpl) {\n if (!hasProperty(schema, 'contains')) {\n return;\n }\n\n const error = tpl.error('contains');\n const fn = `${tpl.link(schema.contains)}`;\n\n const { data } = tpl;\n const zeroIndex = tpl.cache('0');\n const index = tpl.cache('0');\n const dataAtIndex = data.toString.apply(data.concat(`[${index}]`));\n\n tpl(`if (Array.isArray(${data})) {\n if (${data}.length === 0) ${error}\n for (${zeroIndex}; ${index} < ${data}.length; ${index}++) {\n if (!${fn}(${dataAtIndex})) break;\n if (${index} === ${data}.length - 1) ${error}\n }\n }`);\n};\n\n\n\n// WEBPACK FOOTER //\n// ./lib/validators/contains.js","const { hasProperty } = require('../utils');\nconst { make: makeSchema } = require('../utils/schema');\n\nmodule.exports = function constant(schema, tpl) {\n if (!hasProperty(schema, 'const')) {\n return;\n }\n\n const constantInstanceSchema = makeSchema(schema.const);\n tpl.visit(constantInstanceSchema);\n};\n\n\n\n// WEBPACK FOOTER //\n// ./lib/validators/const.js","const { hasProperty } = require('../utils');\n\nmodule.exports = function propertyNames(schema, tpl) {\n if (!hasProperty(schema, 'propertyNames')) {\n return;\n }\n\n const fn = tpl.link(schema.propertyNames);\n const error = tpl.error('propertyNames');\n\n tpl(`if (Object.keys(${tpl.data}).some(${fn})) ${error}`);\n};\n\n\n\n// WEBPACK FOOTER //\n// ./lib/validators/propertyNames.js","/**\n * @module environment\n * @description\n * Update the given environment\n */\nconst properties = require('./properties');\nconst keywords = require('./keywords');\nconst validators = require('../validators');\nconst formats = require('./formats');\nconst { keys } = require('./uri');\nconst { transformation } = require('./schema');\n\nconst environmentConfig = {};\n\nfunction add(version, config) {\n environmentConfig[version] = config;\n}\n\nfunction use(version) {\n if (!version || !environmentConfig[version]) {\n return;\n }\n\n const patchEnvironment = environmentConfig[version];\n patchEnvironment({\n properties,\n keywords,\n validators,\n formats,\n keys,\n transformation,\n });\n}\n\nmodule.exports = {\n add,\n use,\n};\n\n\n\n// WEBPACK FOOTER //\n// ./lib/utils/environment.js","module.exports = __WEBPACK_EXTERNAL_MODULE_29__;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"@korzio/djv-draft-04\"\n// module id = 29\n// module chunks = 0"],"sourceRoot":""}