From b95799e029b307fa7ea813b964b440340b66f37e Mon Sep 17 00:00:00 2001 From: Liu Jun <870395192@qq.com> Date: Mon, 20 Jul 2020 16:23:42 +0800 Subject: [PATCH] build: build lib --- packages/lib/dist/vueJsonSchemaForm.esm.js | 126 +++++++++--------- .../lib/dist/vueJsonSchemaForm.esm.min.js | 4 +- packages/lib/dist/vueJsonSchemaForm.umd.js | 126 +++++++++--------- .../lib/dist/vueJsonSchemaForm.umd.min.js | 4 +- 4 files changed, 130 insertions(+), 130 deletions(-) diff --git a/packages/lib/dist/vueJsonSchemaForm.esm.js b/packages/lib/dist/vueJsonSchemaForm.esm.js index 2e22db7e..69ec0726 100644 --- a/packages/lib/dist/vueJsonSchemaForm.esm.js +++ b/packages/lib/dist/vueJsonSchemaForm.esm.js @@ -1,8 +1,8 @@ /** @license @lljj/vue-json-schema-form (c) 2020-2020 Liu.Jun License: Apache-2.0 */ import Vue from 'vue'; -/** - * Created by Liu.Jun on 2020/4/22 18:58. +/** + * Created by Liu.Jun on 2020/4/22 18:58. */ // 递归参数,统一props var vueProps = { @@ -258,8 +258,8 @@ function localizeZh(errors) { } } -/** - * Created by Liu.Jun on 2020/4/30 11:22. +/** + * Created by Liu.Jun on 2020/4/30 11:22. */ var i18n = { $$currentLocalizeFn: localizeZh, @@ -271,8 +271,8 @@ var i18n = { } }; -/** - * Created by Liu.Jun on 2020/4/25 14:45. +/** + * Created by Liu.Jun on 2020/4/25 14:45. */ var pathSeparator = '.'; // nodePath 转css类名 @@ -584,8 +584,8 @@ function findSchemaDefinition($ref) { return current; } -/** - * Created by Liu.Jun on 2020/4/25 10:53. +/** + * Created by Liu.Jun on 2020/4/25 10:53. */ // 通过 index 上移 function moveUpAt(target, index) { @@ -627,8 +627,8 @@ function intersection(arr1, arr2) { }); } -/** - * Created by Liu.Jun on 2020/4/17 17:05. +/** + * Created by Liu.Jun on 2020/4/17 17:05. */ // is object function isObject(thing) { @@ -8036,9 +8036,9 @@ function createAjvInstance() { /^(#?([0-9A-Fa-f]{3}){1,2}\b|aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow|(rgb\(\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*,\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*,\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*\))|(rgb\(\s*(\d?\d%|100%)+\s*,\s*(\d?\d%|100%)+\s*,\s*(\d?\d%|100%)+\s*\)))$/); return ajvInstance; } -/** - * 将错误输出从ajv转换为jsonschema使用的格式 - * At some point, components should be updated to support ajv. +/** + * 将错误输出从ajv转换为jsonschema使用的格式 + * At some point, components should be updated to support ajv. */ @@ -8068,14 +8068,14 @@ function transformAjvErrors() { }; }); } -/** - * 通过 schema校验formData并返回错误信息 - * @param formData 校验的数据 - * @param schema - * @param transformErrors function - 转换错误, 如个性化的配置 - * @param additionalMetaSchemas 数组 添加 ajv metaSchema - * @param customFormats 添加 ajv 自定义 formats - * @returns {{errors: ([]|{stack: string, schemaPath: *, name: *, property: string, message: *, params: *}[])}} +/** + * 通过 schema校验formData并返回错误信息 + * @param formData 校验的数据 + * @param schema + * @param transformErrors function - 转换错误, 如个性化的配置 + * @param additionalMetaSchemas 数组 添加 ajv metaSchema + * @param customFormats 添加 ajv 自定义 formats + * @returns {{errors: ([]|{stack: string, schemaPath: *, name: *, property: string, message: *, params: *}[])}} */ @@ -8210,11 +8210,11 @@ function validateFormDataAndTransformMsg() { return preErrors; }, []); } -/** - * 根据模式验证数据,如果数据有效则返回true,否则返回* false。如果模式无效,那么这个函数将返回* false。 - * @param schema - * @param data - * @returns {boolean|PromiseLike} +/** + * 根据模式验证数据,如果数据有效则返回true,否则返回* false。如果模式无效,那么这个函数将返回* false。 + * @param schema + * @param data + * @returns {boolean|PromiseLike} */ function isValid(schema, data) { @@ -9472,8 +9472,8 @@ Object.entries(widgetComponents).forEach(function (_ref) { return Vue.component(key, value); }); -/** - * Created by Liu.Jun on 2020/4/21 18:23. +/** + * Created by Liu.Jun on 2020/4/21 18:23. */ var CheckboxesWidget = widgetComponents.CheckboxesWidget, RadioWidget = widgetComponents.RadioWidget, @@ -9522,9 +9522,9 @@ var StringField = { } }; -/** - * Created by Liu.Jun on 2020/4/21 9:24. - * NumberField 复用StringField +/** + * Created by Liu.Jun on 2020/4/21 9:24. + * NumberField 复用StringField */ var NumberField = { name: 'NumberField', @@ -9537,9 +9537,9 @@ var NumberField = { } }; -/** - * Created by Liu.Jun on 2020/4/21 9:24. - * IntegerField 复用StringField +/** + * Created by Liu.Jun on 2020/4/21 9:24. + * IntegerField 复用StringField */ var IntegerField = { name: 'IntegerField', @@ -9579,19 +9579,19 @@ var BooleanField = { } }; -/** - * 根据schema计算出formData的初始值 - * 源码来自:react-jsonschema-form 做了细节调整,重写了allOf实现逻辑 - * https://github.com/rjsf-team/react-jsonschema-form/blob/master/packages/core/src/utils.js#L283 +/** + * 根据schema计算出formData的初始值 + * 源码来自:react-jsonschema-form 做了细节调整,重写了allOf实现逻辑 + * https://github.com/rjsf-team/react-jsonschema-form/blob/master/packages/core/src/utils.js#L283 */ -/** - * When merging defaults and form data, we want to merge in this specific way: - * - objects are deeply merged - * - arrays are merged in such a way that: - * - when the array is set in form data, only array entries set in form data - * are deeply merged; additional entries from the defaults are ignored - * - when the array is not set in form data, the default is copied over - * - scalars are overwritten/set by form data +/** + * When merging defaults and form data, we want to merge in this specific way: + * - objects are deeply merged + * - arrays are merged in such a way that: + * - when the array is set in form data, only array entries set in form data + * are deeply merged; additional entries from the defaults are ignored + * - when the array is not set in form data, the default is copied over + * - scalars are overwritten/set by form data */ function mergeDefaultsWithFormData(defaults, formData) { @@ -9768,8 +9768,8 @@ function getDefaultFormState(_schema, formData) { return formData || defaults; } -/** - * Created by Liu.Jun on 2020/4/24 16:47. +/** + * Created by Liu.Jun on 2020/4/24 16:47. */ // 支持数字排序 ,新增 ,删除等操作 var ArrayOrderList = { @@ -10585,8 +10585,8 @@ var OneOfField = { } }; -/** - * Created by Liu.Jun on 2020/4/20 9:55 下午. +/** + * Created by Liu.Jun on 2020/4/20 9:55 下午. */ var FIELDS_MAPS = { @@ -10789,9 +10789,9 @@ function orderProperties(properties, order) { complete.splice.apply(complete, [restIndex, 1].concat(_toConsumableArray(rest))); return complete; } -/** - * 单个匹配 - * 常量,或者只有一个枚举 +/** + * 单个匹配 + * 常量,或者只有一个枚举 */ function isConstant(schema) { @@ -10808,12 +10808,12 @@ function toConstant(schema) { throw new Error('schema cannot be inferred as a constant'); } -/** - * 是否为选择列表 - * 枚举 或者 oneOf anyOf 每项都只有一个固定常量值 - * @param _schema - * @param rootSchema - * @returns {boolean|*} +/** + * 是否为选择列表 + * 枚举 或者 oneOf anyOf 每项都只有一个固定常量值 + * @param _schema + * @param rootSchema + * @returns {boolean|*} */ function isSelect(_schema) { @@ -11084,8 +11084,8 @@ __vue_render__$4._withStripped = true; /* style */ const __vue_inject_styles__$4 = function (inject) { if (!inject) return - inject("data-v-431cede5_0", { source: "\n.src-JsonSchemaForm-item-e4q8 {\n text-align: right;\n border-top: 1px solid rgba(0, 0, 0, 0.08);\n padding-top: 10px;\n}\n", map: {"version":3,"sources":["/Users/ryuushun/liujun/git/vue-element-schema-form/packages/lib/src/JsonSchemaForm/FormFooter.vue"],"names":[],"mappings":";AAwBA;IACA,iBAAA;IACA,yCAAA;IACA,iBAAA;AACA","file":"FormFooter.vue","sourcesContent":["\n\n\n\n\n"]}, media: undefined }); -Object.defineProperty(this, "$style", { value: {"item":"src-JsonSchemaForm-item-e4q8"} }); + inject("data-v-25c5ccb1_0", { source: "\n.src-JsonSchemaForm-item-1UFV {\n text-align: right;\n border-top: 1px solid rgba(0, 0, 0, 0.08);\n padding-top: 10px;\n}\n", map: {"version":3,"sources":["D:\\code\\git_my\\vue-json-schema-form\\packages\\lib\\src\\JsonSchemaForm\\FormFooter.vue"],"names":[],"mappings":";AAwBA;IACA,iBAAA;IACA,yCAAA;IACA,iBAAA;AACA","file":"FormFooter.vue","sourcesContent":["\r\n\r\n\r\n\r\n\r\n"]}, media: undefined }); +Object.defineProperty(this, "$style", { value: {"item":"src-JsonSchemaForm-item-1UFV"} }); }; /* scoped */ @@ -11259,8 +11259,8 @@ var JsonSchemaForm = { } }; -/** - * Created by Liu.Jun on 2019/11/29 11:25. +/** + * Created by Liu.Jun on 2019/11/29 11:25. */ if (typeof window !== 'undefined' && window.Vue) { diff --git a/packages/lib/dist/vueJsonSchemaForm.esm.min.js b/packages/lib/dist/vueJsonSchemaForm.esm.min.js index 6b00d552..b852efed 100644 --- a/packages/lib/dist/vueJsonSchemaForm.esm.min.js +++ b/packages/lib/dist/vueJsonSchemaForm.esm.min.js @@ -1,4 +1,4 @@ /** @license @lljj/vue-json-schema-form (c) 2020-2020 Liu.Jun License: Apache-2.0 */ -import e from"vue";var r={schema:{type:Object,default:function(){return{}}},uiSchema:{type:Object,default:function(){return{}}},errorSchema:{type:Object,default:function(){return{}}},customFormats:{type:Object,default:function(){return{}}},rootSchema:{type:Object,default:function(){return{}}},rootFormData:{type:null,default:function(){return{}}},curNodePath:{type:String,default:""},required:{type:Boolean,default:!1},needValidFieldGroup:{type:Boolean,default:!0}};var t={$$currentLocalizeFn:function(e){if(e&&e.length)for(var r=0;r=0||(o[t]=e[t]);return o}(e,r);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}function y(e,r){return function(e){if(Array.isArray(e))return e}(e)||function(e,r){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var t=[],a=!0,o=!1,s=void 0;try{for(var i,n=e[Symbol.iterator]();!(a=(i=n.next()).done)&&(t.push(i.value),!r||t.length!==r);a=!0);}catch(e){o=!0,s=e}finally{try{a||null==n.return||n.return()}finally{if(o)throw s}}return t}(e,r)||b(e,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function g(e){return function(e){if(Array.isArray(e))return P(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||b(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function b(e,r){if(e){if("string"==typeof e)return P(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?P(e,r):void 0}}function P(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,a=new Array(r);t1&&void 0!==arguments[1]?arguments[1]:{},t=e;if(!e.startsWith("#"))throw new Error("Could not find a definition for ".concat(t,"."));var a=E(r,e=decodeURIComponent(e.substring(1)));if(void 0===a)throw new Error("Could not find a definition for ".concat(t,"."));return a.hasOwnProperty("$ref")?S(a.$ref,r):a}function O(e,r){return e.fill(null).map((function(){return JSON.parse(JSON.stringify(r))}))}function F(e,r){return e.filter((function(e){return r.includes(e)}))}function x(e){return!("undefined"!=typeof File&&e instanceof File)&&("object"===h(e)&&null!==e&&!Array.isArray(e))}function _(e){return"[object Arguments]"===Object.prototype.toString.call(e)}var $=function(e){return Array.isArray(e)?"array":"string"==typeof e?"string":null==e?"null":"boolean"==typeof e?"boolean":isNaN(e)?"object"===h(e)?"object":"string":"number"};function D(e,r){var t=Object.assign({},e);return Object.keys(r).reduce((function(t,a){var o,s=e?e[a]:{},i=r[a];return e&&e.hasOwnProperty(a)&&x(i)?t[a]=D(s,i):e&&r&&("object"===A(e)||"object"===A(r))&&"required"===a&&Array.isArray(s)&&Array.isArray(i)?t[a]=(o=i,g(new Set([].concat(g(s),g(o))))):t[a]=i,t}),t)}function j(e,r){var t=arguments.length>2&&void 0!==arguments[2]&&arguments[2],a=Object.assign({},e);return Object.keys(r).reduce((function(a,o){var s=e?e[o]:{},i=r[o];return e&&e.hasOwnProperty(o)&&x(i)?a[o]=j(s,i,t):t&&Array.isArray(s)&&Array.isArray(i)?a[o]=s.concat(i):a[o]=i,a}),a)}function A(e){var r=e.type;return!r&&e.const?$(e.const):!r&&e.enum?"string":r||!e.properties&&!e.additionalProperties?r instanceof Array&&2===r.length&&r.includes("null")?r.find((function(e){return"null"!==e})):r:"object"}function k(e,r){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];if(e===r)return!0;if("function"==typeof e||"function"==typeof r)return!0;if("object"!==h(e)||"object"!==h(r))return!1;if(null===e||null===r)return!1;if(e instanceof Date&&r instanceof Date)return e.getTime()===r.getTime();if(e instanceof RegExp&&r instanceof RegExp)return e.source===r.source&&e.global===r.global&&e.multiline===r.multiline&&e.lastIndex===r.lastIndex&&e.ignoreCase===r.ignoreCase;if(_(e)||_(r)){if(!_(e)||!_(r))return!1;var o=Array.prototype.slice;return k(o.call(e),o.call(r),t,a)}if(e.constructor!==r.constructor)return!1;var s=Object.keys(e),i=Object.keys(r);if(0===s.length&&0===i.length)return!0;if(s.length!==i.length)return!1;for(var n,l=t.length;l--;)if(t[l]===e)return a[l]===r;t.push(e),a.push(r),s.sort(),i.sort();for(var c=s.length-1;c>=0;c--)if(s[c]!==i[c])return!1;for(var u=s.length-1;u>=0;u--)if(!k(e[n=s[u]],r[n],t,a))return!1;return t.pop(),a.pop(),!0}var R,C,I=(R="".concat(+new Date),C=0,function(){var e="".concat(+new Date);return e===R?C+=1:C=0,"".concat(R=e,"x").concat(C)});function L(e,r){return Object.entries(e).reduce((function(e,t){var a=y(t,2),o=a[0],s=a[1],i=r(o,s);return void 0!==i&&(e[i]=s),e}),{})}function N(e){return void 0===e?e:String(e).replace(/^./,(function(e){return e.toLocaleLowerCase()}))}function T(e,r){return e*r/function e(r,t){return 0===t?r:e(t,r%t)}(e,r)}"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;function z(e,r){return e(r={exports:{}},r.exports),r.exports}function q(e){return e&&e.default||e}var V,U=z((function(e,r){ +import e from"vue";var r={schema:{type:Object,default:function(){return{}}},uiSchema:{type:Object,default:function(){return{}}},errorSchema:{type:Object,default:function(){return{}}},customFormats:{type:Object,default:function(){return{}}},rootSchema:{type:Object,default:function(){return{}}},rootFormData:{type:null,default:function(){return{}}},curNodePath:{type:String,default:""},required:{type:Boolean,default:!1},needValidFieldGroup:{type:Boolean,default:!0}};var t={$$currentLocalizeFn:function(e){if(e&&e.length)for(var r=0;r=0||(o[t]=e[t]);return o}(e,r);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}function y(e,r){return function(e){if(Array.isArray(e))return e}(e)||function(e,r){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var t=[],a=!0,o=!1,s=void 0;try{for(var i,n=e[Symbol.iterator]();!(a=(i=n.next()).done)&&(t.push(i.value),!r||t.length!==r);a=!0);}catch(e){o=!0,s=e}finally{try{a||null==n.return||n.return()}finally{if(o)throw s}}return t}(e,r)||b(e,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function g(e){return function(e){if(Array.isArray(e))return P(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||b(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function b(e,r){if(e){if("string"==typeof e)return P(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?P(e,r):void 0}}function P(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,a=new Array(r);t1&&void 0!==arguments[1]?arguments[1]:{},t=e;if(!e.startsWith("#"))throw new Error("Could not find a definition for ".concat(t,"."));var a=E(r,e=decodeURIComponent(e.substring(1)));if(void 0===a)throw new Error("Could not find a definition for ".concat(t,"."));return a.hasOwnProperty("$ref")?S(a.$ref,r):a}function F(e,r){return e.fill(null).map((function(){return JSON.parse(JSON.stringify(r))}))}function O(e,r){return e.filter((function(e){return r.includes(e)}))}function x(e){return!("undefined"!=typeof File&&e instanceof File)&&("object"===h(e)&&null!==e&&!Array.isArray(e))}function _(e){return"[object Arguments]"===Object.prototype.toString.call(e)}var $=function(e){return Array.isArray(e)?"array":"string"==typeof e?"string":null==e?"null":"boolean"==typeof e?"boolean":isNaN(e)?"object"===h(e)?"object":"string":"number"};function D(e,r){var t=Object.assign({},e);return Object.keys(r).reduce((function(t,a){var o,s=e?e[a]:{},i=r[a];return e&&e.hasOwnProperty(a)&&x(i)?t[a]=D(s,i):e&&r&&("object"===A(e)||"object"===A(r))&&"required"===a&&Array.isArray(s)&&Array.isArray(i)?t[a]=(o=i,g(new Set([].concat(g(s),g(o))))):t[a]=i,t}),t)}function j(e,r){var t=arguments.length>2&&void 0!==arguments[2]&&arguments[2],a=Object.assign({},e);return Object.keys(r).reduce((function(a,o){var s=e?e[o]:{},i=r[o];return e&&e.hasOwnProperty(o)&&x(i)?a[o]=j(s,i,t):t&&Array.isArray(s)&&Array.isArray(i)?a[o]=s.concat(i):a[o]=i,a}),a)}function A(e){var r=e.type;return!r&&e.const?$(e.const):!r&&e.enum?"string":r||!e.properties&&!e.additionalProperties?r instanceof Array&&2===r.length&&r.includes("null")?r.find((function(e){return"null"!==e})):r:"object"}function k(e,r){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];if(e===r)return!0;if("function"==typeof e||"function"==typeof r)return!0;if("object"!==h(e)||"object"!==h(r))return!1;if(null===e||null===r)return!1;if(e instanceof Date&&r instanceof Date)return e.getTime()===r.getTime();if(e instanceof RegExp&&r instanceof RegExp)return e.source===r.source&&e.global===r.global&&e.multiline===r.multiline&&e.lastIndex===r.lastIndex&&e.ignoreCase===r.ignoreCase;if(_(e)||_(r)){if(!_(e)||!_(r))return!1;var o=Array.prototype.slice;return k(o.call(e),o.call(r),t,a)}if(e.constructor!==r.constructor)return!1;var s=Object.keys(e),i=Object.keys(r);if(0===s.length&&0===i.length)return!0;if(s.length!==i.length)return!1;for(var n,l=t.length;l--;)if(t[l]===e)return a[l]===r;t.push(e),a.push(r),s.sort(),i.sort();for(var c=s.length-1;c>=0;c--)if(s[c]!==i[c])return!1;for(var u=s.length-1;u>=0;u--)if(!k(e[n=s[u]],r[n],t,a))return!1;return t.pop(),a.pop(),!0}var R,C,I=(R="".concat(+new Date),C=0,function(){var e="".concat(+new Date);return e===R?C+=1:C=0,"".concat(R=e,"x").concat(C)});function L(e,r){return Object.entries(e).reduce((function(e,t){var a=y(t,2),o=a[0],s=a[1],i=r(o,s);return void 0!==i&&(e[i]=s),e}),{})}function N(e){return void 0===e?e:String(e).replace(/^./,(function(e){return e.toLocaleLowerCase()}))}function T(e,r){return e*r/function e(r,t){return 0===t?r:e(t,r%t)}(e,r)}"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;function z(e,r){return e(r={exports:{}},r.exports),r.exports}function q(e){return e&&e.default||e}var V,U=z((function(e,r){ /** @license URI.js v4.2.1 (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js */ -!function(e){function r(){for(var e=arguments.length,r=Array(e),t=0;t1){r[0]=r[0].slice(0,-1);for(var a=r.length-1,o=1;o= 0x80 (not a basic code point)","invalid-input":"Invalid input"},m=Math.floor,f=String.fromCharCode;function v(e){throw new RangeError(p[e])}function y(e,r){var t=e.split("@"),a="";t.length>1&&(a=t[0]+"@",e=t[1]);var o=function(e,r){for(var t=[],a=e.length;a--;)t[a]=r(e[a]);return t}((e=e.replace(d,".")).split("."),r).join(".");return a+o}function g(e){for(var r=[],t=0,a=e.length;t=55296&&o<=56319&&t>1,e+=m(e/r);e>455;a+=36)e=m(e/35);return m(a+36*e/(e+38))},w=function(e){var r,t=[],a=e.length,o=0,s=128,i=72,n=e.lastIndexOf("-");n<0&&(n=0);for(var l=0;l=128&&v("not-basic"),t.push(e.charCodeAt(l));for(var u=n>0?n+1:0;u=a&&v("invalid-input");var f=(r=e.charCodeAt(u++))-48<10?r-22:r-65<26?r-65:r-97<26?r-97:36;(f>=36||f>m((c-o)/d))&&v("overflow"),o+=f*d;var y=p<=i?1:p>=i+26?26:p-i;if(fm(c/g)&&v("overflow"),d*=g}var b=t.length+1;i=P(o-h,b,0==h),m(o/b)>c-s&&v("overflow"),s+=m(o/b),o%=b,t.splice(o++,0,s)}return String.fromCodePoint.apply(String,t)},E=function(e){var r=[],t=(e=g(e)).length,a=128,o=0,s=72,i=!0,n=!1,l=void 0;try{for(var u,h=e[Symbol.iterator]();!(i=(u=h.next()).done);i=!0){var d=u.value;d<128&&r.push(f(d))}}catch(e){n=!0,l=e}finally{try{!i&&h.return&&h.return()}finally{if(n)throw l}}var p=r.length,y=p;for(p&&r.push("-");y=a&&_m((c-o)/$)&&v("overflow"),o+=(w-a)*$,a=w;var D=!0,j=!1,A=void 0;try{for(var k,R=e[Symbol.iterator]();!(D=(k=R.next()).done);D=!0){var C=k.value;if(Cc&&v("overflow"),C==a){for(var I=o,L=36;;L+=36){var N=L<=s?1:L>=s+26?26:L-s;if(I>6|192).toString(16).toUpperCase()+"%"+(63&r|128).toString(16).toUpperCase():"%"+(r>>12|224).toString(16).toUpperCase()+"%"+(r>>6&63|128).toString(16).toUpperCase()+"%"+(63&r|128).toString(16).toUpperCase()}function _(e){for(var r="",t=0,a=e.length;t=194&&o<224){if(a-t>=6){var s=parseInt(e.substr(t+4,2),16);r+=String.fromCharCode((31&o)<<6|63&s)}else r+=e.substr(t,6);t+=6}else if(o>=224){if(a-t>=9){var i=parseInt(e.substr(t+4,2),16),n=parseInt(e.substr(t+7,2),16);r+=String.fromCharCode((15&o)<<12|(63&i)<<6|63&n)}else r+=e.substr(t,9);t+=9}else r+=e.substr(t,3),t+=3}return r}function $(e,r){function t(e){var t=_(e);return t.match(r.UNRESERVED)?t:e}return e.scheme&&(e.scheme=String(e.scheme).replace(r.PCT_ENCODED,t).toLowerCase().replace(r.NOT_SCHEME,"")),void 0!==e.userinfo&&(e.userinfo=String(e.userinfo).replace(r.PCT_ENCODED,t).replace(r.NOT_USERINFO,x).replace(r.PCT_ENCODED,o)),void 0!==e.host&&(e.host=String(e.host).replace(r.PCT_ENCODED,t).toLowerCase().replace(r.NOT_HOST,x).replace(r.PCT_ENCODED,o)),void 0!==e.path&&(e.path=String(e.path).replace(r.PCT_ENCODED,t).replace(e.scheme?r.NOT_PATH:r.NOT_PATH_NOSCHEME,x).replace(r.PCT_ENCODED,o)),void 0!==e.query&&(e.query=String(e.query).replace(r.PCT_ENCODED,t).replace(r.NOT_QUERY,x).replace(r.PCT_ENCODED,o)),void 0!==e.fragment&&(e.fragment=String(e.fragment).replace(r.PCT_ENCODED,t).replace(r.NOT_FRAGMENT,x).replace(r.PCT_ENCODED,o)),e}function D(e){return e.replace(/^0*(.*)/,"$1")||"0"}function j(e,r){var t=e.match(r.IPV4ADDRESS)||[],a=l(t,2)[1];return a?a.split(".").map(D).join("."):e}function A(e,r){var t=e.match(r.IPV6ADDRESS)||[],a=l(t,3),o=a[1],s=a[2];if(o){for(var i=o.toLowerCase().split("::").reverse(),n=l(i,2),c=n[0],u=n[1],h=u?u.split(":").map(D):[],d=c.split(":").map(D),p=r.IPV4ADDRESS.test(d[d.length-1]),m=p?7:8,f=d.length-m,v=Array(m),y=0;y1){var P=v.slice(0,g.index),w=v.slice(g.index+g.length);b=P.join(":")+"::"+w.join(":")}else b=v.join(":");return s&&(b+="%"+s),b}return e}var k=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,R=void 0==="".match(/(){0}/)[1];function C(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t={},a=!1!==r.iri?n:i;"suffix"===r.reference&&(e=(r.scheme?r.scheme+":":"")+"//"+e);var o=e.match(k);if(o){R?(t.scheme=o[1],t.userinfo=o[3],t.host=o[4],t.port=parseInt(o[5],10),t.path=o[6]||"",t.query=o[7],t.fragment=o[8],isNaN(t.port)&&(t.port=o[5])):(t.scheme=o[1]||void 0,t.userinfo=-1!==e.indexOf("@")?o[3]:void 0,t.host=-1!==e.indexOf("//")?o[4]:void 0,t.port=parseInt(o[5],10),t.path=o[6]||"",t.query=-1!==e.indexOf("?")?o[7]:void 0,t.fragment=-1!==e.indexOf("#")?o[8]:void 0,isNaN(t.port)&&(t.port=e.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?o[4]:void 0)),t.host&&(t.host=A(j(t.host,a),a)),void 0!==t.scheme||void 0!==t.userinfo||void 0!==t.host||void 0!==t.port||t.path||void 0!==t.query?void 0===t.scheme?t.reference="relative":void 0===t.fragment?t.reference="absolute":t.reference="uri":t.reference="same-document",r.reference&&"suffix"!==r.reference&&r.reference!==t.reference&&(t.error=t.error||"URI is not a "+r.reference+" reference.");var s=F[(r.scheme||t.scheme||"").toLowerCase()];if(r.unicodeSupport||s&&s.unicodeSupport)$(t,a);else{if(t.host&&(r.domainHost||s&&s.domainHost))try{t.host=S(t.host.replace(a.PCT_ENCODED,_).toLowerCase())}catch(e){t.error=t.error||"Host's domain name can not be converted to ASCII via punycode: "+e}$(t,i)}s&&s.parse&&s.parse(t,r)}else t.error=t.error||"URI can not be parsed.";return t}function I(e,r){var t=!1!==r.iri?n:i,a=[];return void 0!==e.userinfo&&(a.push(e.userinfo),a.push("@")),void 0!==e.host&&a.push(A(j(String(e.host),t),t).replace(t.IPV6ADDRESS,(function(e,r,t){return"["+r+(t?"%25"+t:"")+"]"}))),"number"==typeof e.port&&(a.push(":"),a.push(e.port.toString(10))),a.length?a.join(""):void 0}var L=/^\.\.?\//,N=/^\/\.(\/|$)/,T=/^\/\.\.(\/|$)/,z=/^\/?(?:.|\n)*?(?=\/|$)/;function q(e){for(var r=[];e.length;)if(e.match(L))e=e.replace(L,"");else if(e.match(N))e=e.replace(N,"/");else if(e.match(T))e=e.replace(T,"/"),r.pop();else if("."===e||".."===e)e="";else{var t=e.match(z);if(!t)throw new Error("Unexpected dot segment condition");var a=t[0];e=e.slice(a.length),r.push(a)}return r.join("")}function V(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=r.iri?n:i,a=[],o=F[(r.scheme||e.scheme||"").toLowerCase()];if(o&&o.serialize&&o.serialize(e,r),e.host)if(t.IPV6ADDRESS.test(e.host));else if(r.domainHost||o&&o.domainHost)try{e.host=r.iri?O(e.host):S(e.host.replace(t.PCT_ENCODED,_).toLowerCase())}catch(t){e.error=e.error||"Host's domain name can not be converted to "+(r.iri?"Unicode":"ASCII")+" via punycode: "+t}$(e,t),"suffix"!==r.reference&&e.scheme&&(a.push(e.scheme),a.push(":"));var s=I(e,r);if(void 0!==s&&("suffix"!==r.reference&&a.push("//"),a.push(s),e.path&&"/"!==e.path.charAt(0)&&a.push("/")),void 0!==e.path){var l=e.path;r.absolutePath||o&&o.absolutePath||(l=q(l)),void 0===s&&(l=l.replace(/^\/\//,"/%2F")),a.push(l)}return void 0!==e.query&&(a.push("?"),a.push(e.query)),void 0!==e.fragment&&(a.push("#"),a.push(e.fragment)),a.join("")}function U(e,r){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=arguments[3],o={};return a||(e=C(V(e,t),t),r=C(V(r,t),t)),!(t=t||{}).tolerant&&r.scheme?(o.scheme=r.scheme,o.userinfo=r.userinfo,o.host=r.host,o.port=r.port,o.path=q(r.path||""),o.query=r.query):(void 0!==r.userinfo||void 0!==r.host||void 0!==r.port?(o.userinfo=r.userinfo,o.host=r.host,o.port=r.port,o.path=q(r.path||""),o.query=r.query):(r.path?("/"===r.path.charAt(0)?o.path=q(r.path):(void 0===e.userinfo&&void 0===e.host&&void 0===e.port||e.path?e.path?o.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+r.path:o.path=r.path:o.path="/"+r.path,o.path=q(o.path)),o.query=r.query):(o.path=e.path,void 0!==r.query?o.query=r.query:o.query=e.query),o.userinfo=e.userinfo,o.host=e.host,o.port=e.port),o.scheme=e.scheme),o.fragment=r.fragment,o}function Q(e,r){return e&&e.toString().replace(r&&r.iri?n.PCT_ENCODED:i.PCT_ENCODED,_)}var B={scheme:"http",domainHost:!0,parse:function(e,r){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e},serialize:function(e,r){return e.port!==("https"!==String(e.scheme).toLowerCase()?80:443)&&""!==e.port||(e.port=void 0),e.path||(e.path="/"),e}},M={scheme:"https",domainHost:B.domainHost,parse:B.parse,serialize:B.serialize},K={},H="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",W="[0-9A-Fa-f]",J=t(t("%[EFef]"+W+"%"+W+W+"%"+W+W)+"|"+t("%[89A-Fa-f]"+W+"%"+W+W)+"|"+t("%"+W+W)),G=r("[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",'[\\"\\\\]'),Z=new RegExp(H,"g"),X=new RegExp(J,"g"),Y=new RegExp(r("[^]","[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]","[\\.]",'[\\"]',G),"g"),ee=new RegExp(r("[^]",H,"[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]"),"g"),re=ee;function te(e){var r=_(e);return r.match(Z)?r:e}var ae={scheme:"mailto",parse:function(e,r){var t=e,a=t.to=t.path?t.path.split(","):[];if(t.path=void 0,t.query){for(var o=!1,s={},i=t.query.split("&"),n=0,l=i.length;n=55296&&r<=56319&&o=r)throw new Error("Cannot access property/index "+a+" levels up, current level is "+r);return t[r-a]}if(a>r)throw new Error("Cannot access data "+a+" levels up, current level is "+r);if(s="data"+(r-a||""),!o)return s}for(var n=s,l=o.split("/"),c=0;c=0?{index:a,compiling:!0}:(a=this._compilations.length,this._compilations[a]={schema:e,root:r,baseId:t},{index:a,compiling:!1})}function Ne(e,r,t){var a=Te.call(this,e,r,t);a>=0&&this._compilations.splice(a,1)}function Te(e,r,t){for(var a=0;a%\\^`{|}]|%[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,Ze=/^(?:(?:http[s\u017F]?|ftp):\/\/)(?:(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+(?::(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?@)?(?:(?!10(?:\.[0-9]{1,3}){3})(?!127(?:\.[0-9]{1,3}){3})(?!169\.254(?:\.[0-9]{1,3}){2})(?!192\.168(?:\.[0-9]{1,3}){2})(?!172\.(?:1[6-9]|2[0-9]|3[01])(?:\.[0-9]{1,3}){2})(?:[1-9][0-9]?|1[0-9][0-9]|2[01][0-9]|22[0-3])(?:\.(?:1?[0-9]{1,2}|2[0-4][0-9]|25[0-5])){2}(?:\.(?:[1-9][0-9]?|1[0-9][0-9]|2[0-4][0-9]|25[0-4]))|(?:(?:(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-?)*(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)(?:\.(?:(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-?)*(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)*(?:\.(?:(?:[KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]){2,})))(?::[0-9]{2,5})?(?:\/(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?$/i,Xe=/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,Ye=/^(?:\/(?:[^~/]|~0|~1)*)*$/,er=/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,rr=/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,tr=ar;function ar(e){return e="full"==e?"full":"fast",B.copy(ar[e])}function or(e){var r=e.match(Me);if(!r)return!1;var t=+r[1],a=+r[2],o=+r[3];return a>=1&&a<=12&&o>=1&&o<=(2==a&&function(e){return e%4==0&&(e%100!=0||e%400==0)}(t)?29:Ke[a])}function sr(e,r){var t=e.match(He);if(!t)return!1;var a=t[1],o=t[2],s=t[3],i=t[5];return(a<=23&&o<=59&&s<=59||23==a&&59==o&&60==s)&&(!r||i)}ar.fast={date:/^\d\d\d\d-[0-1]\d-[0-3]\d$/,time:/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,"date-time":/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,uri:/^(?:[a-z][a-z0-9+-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,"uri-template":Ge,url:Ze,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i,hostname:We,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,regex:cr,uuid:Xe,"json-pointer":Ye,"json-pointer-uri-fragment":er,"relative-json-pointer":rr},ar.full={date:or,time:sr,"date-time":function(e){var r=e.split(ir);return 2==r.length&&or(r[0])&&sr(r[1],!0)},uri:function(e){return nr.test(e)&&Je.test(e)},"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":Ge,url:Ze,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:We,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,regex:cr,uuid:Xe,"json-pointer":Ye,"json-pointer-uri-fragment":er,"relative-json-pointer":rr};var ir=/t|\s/i;var nr=/\/|:/;var lr=/[^\\]\\Z/;function cr(e){if(lr.test(e))return!1;try{return new RegExp(e),!0}catch(e){return!1}}var ur=function(e,r,t){var a,o=" ",s=e.level,i=e.dataLevel,n=e.schema[r],l=e.schemaPath+e.util.getProperty(r),c=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,h="data"+(i||""),d=e.opts.$data&&n&&n.$data;d?(o+=" var schema"+s+" = "+e.util.getData(n.$data,i,e.dataPathArr)+"; ",a="schema"+s):a=n;var p="maximum"==r,m=p?"exclusiveMaximum":"exclusiveMinimum",f=e.schema[m],v=e.opts.$data&&f&&f.$data,y=p?"<":">",g=p?">":"<",b=void 0;if(v){var P=e.util.getData(f.$data,i,e.dataPathArr),w="exclusive"+s,E="exclType"+s,S="exclIsNumber"+s,O="' + "+(_="op"+s)+" + '";o+=" var schemaExcl"+s+" = "+P+"; ",o+=" var "+w+"; var "+E+" = typeof "+(P="schemaExcl"+s)+"; if ("+E+" != 'boolean' && "+E+" != 'undefined' && "+E+" != 'number') { ";var F;b=m;(F=F||[]).push(o),o="",!1!==e.createErrors?(o+=" { keyword: '"+(b||"_exclusiveLimit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: {} ",!1!==e.opts.messages&&(o+=" , message: '"+m+" should be boolean' "),e.opts.verbose&&(o+=" , schema: validate.schema"+l+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),o+=" } "):o+=" {} ";var x=o;o=F.pop(),!e.compositeRule&&u?e.async?o+=" throw new ValidationError(["+x+"]); ":o+=" validate.errors = ["+x+"]; return false; ":o+=" var err = "+x+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+=" } else if ( ",d&&(o+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),o+=" "+E+" == 'number' ? ( ("+w+" = "+a+" === undefined || "+P+" "+y+"= "+a+") ? "+h+" "+g+"= "+P+" : "+h+" "+g+" "+a+" ) : ( ("+w+" = "+P+" === true) ? "+h+" "+g+"= "+a+" : "+h+" "+g+" "+a+" ) || "+h+" !== "+h+") { var op"+s+" = "+w+" ? '"+y+"' : '"+y+"='; ",void 0===n&&(b=m,c=e.errSchemaPath+"/"+m,a=P,d=v)}else{O=y;if((S="number"==typeof f)&&d){var _="'"+O+"'";o+=" if ( ",d&&(o+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),o+=" ( "+a+" === undefined || "+f+" "+y+"= "+a+" ? "+h+" "+g+"= "+f+" : "+h+" "+g+" "+a+" ) || "+h+" !== "+h+") { "}else{S&&void 0===n?(w=!0,b=m,c=e.errSchemaPath+"/"+m,a=f,g+="="):(S&&(a=Math[p?"min":"max"](f,n)),f===(!S||a)?(w=!0,b=m,c=e.errSchemaPath+"/"+m,g+="="):(w=!1,O+="="));_="'"+O+"'";o+=" if ( ",d&&(o+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),o+=" "+h+" "+g+" "+a+" || "+h+" !== "+h+") { "}}b=b||r,(F=F||[]).push(o),o="",!1!==e.createErrors?(o+=" { keyword: '"+(b||"_limit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { comparison: "+_+", limit: "+a+", exclusive: "+w+" } ",!1!==e.opts.messages&&(o+=" , message: 'should be "+O+" ",o+=d?"' + "+a:a+"'"),e.opts.verbose&&(o+=" , schema: ",o+=d?"validate.schema"+l:""+n,o+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),o+=" } "):o+=" {} ";x=o;return o=F.pop(),!e.compositeRule&&u?e.async?o+=" throw new ValidationError(["+x+"]); ":o+=" validate.errors = ["+x+"]; return false; ":o+=" var err = "+x+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+=" } ",u&&(o+=" else { "),o},hr=function(e,r,t){var a,o=" ",s=e.level,i=e.dataLevel,n=e.schema[r],l=e.schemaPath+e.util.getProperty(r),c=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,h="data"+(i||""),d=e.opts.$data&&n&&n.$data;d?(o+=" var schema"+s+" = "+e.util.getData(n.$data,i,e.dataPathArr)+"; ",a="schema"+s):a=n,o+="if ( ",d&&(o+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),o+=" "+h+".length "+("maxItems"==r?">":"<")+" "+a+") { ";var p=r,m=m||[];m.push(o),o="",!1!==e.createErrors?(o+=" { keyword: '"+(p||"_limitItems")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { limit: "+a+" } ",!1!==e.opts.messages&&(o+=" , message: 'should NOT have ",o+="maxItems"==r?"more":"fewer",o+=" than ",o+=d?"' + "+a+" + '":""+n,o+=" items' "),e.opts.verbose&&(o+=" , schema: ",o+=d?"validate.schema"+l:""+n,o+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),o+=" } "):o+=" {} ";var f=o;return o=m.pop(),!e.compositeRule&&u?e.async?o+=" throw new ValidationError(["+f+"]); ":o+=" validate.errors = ["+f+"]; return false; ":o+=" var err = "+f+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+="} ",u&&(o+=" else { "),o},dr=function(e,r,t){var a,o=" ",s=e.level,i=e.dataLevel,n=e.schema[r],l=e.schemaPath+e.util.getProperty(r),c=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,h="data"+(i||""),d=e.opts.$data&&n&&n.$data;d?(o+=" var schema"+s+" = "+e.util.getData(n.$data,i,e.dataPathArr)+"; ",a="schema"+s):a=n;var p="maxLength"==r?">":"<";o+="if ( ",d&&(o+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),!1===e.opts.unicode?o+=" "+h+".length ":o+=" ucs2length("+h+") ",o+=" "+p+" "+a+") { ";var m=r,f=f||[];f.push(o),o="",!1!==e.createErrors?(o+=" { keyword: '"+(m||"_limitLength")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { limit: "+a+" } ",!1!==e.opts.messages&&(o+=" , message: 'should NOT be ",o+="maxLength"==r?"longer":"shorter",o+=" than ",o+=d?"' + "+a+" + '":""+n,o+=" characters' "),e.opts.verbose&&(o+=" , schema: ",o+=d?"validate.schema"+l:""+n,o+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),o+=" } "):o+=" {} ";var v=o;return o=f.pop(),!e.compositeRule&&u?e.async?o+=" throw new ValidationError(["+v+"]); ":o+=" validate.errors = ["+v+"]; return false; ":o+=" var err = "+v+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+="} ",u&&(o+=" else { "),o},pr=function(e,r,t){var a,o=" ",s=e.level,i=e.dataLevel,n=e.schema[r],l=e.schemaPath+e.util.getProperty(r),c=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,h="data"+(i||""),d=e.opts.$data&&n&&n.$data;d?(o+=" var schema"+s+" = "+e.util.getData(n.$data,i,e.dataPathArr)+"; ",a="schema"+s):a=n,o+="if ( ",d&&(o+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),o+=" Object.keys("+h+").length "+("maxProperties"==r?">":"<")+" "+a+") { ";var p=r,m=m||[];m.push(o),o="",!1!==e.createErrors?(o+=" { keyword: '"+(p||"_limitProperties")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { limit: "+a+" } ",!1!==e.opts.messages&&(o+=" , message: 'should NOT have ",o+="maxProperties"==r?"more":"fewer",o+=" than ",o+=d?"' + "+a+" + '":""+n,o+=" properties' "),e.opts.verbose&&(o+=" , schema: ",o+=d?"validate.schema"+l:""+n,o+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),o+=" } "):o+=" {} ";var f=o;return o=m.pop(),!e.compositeRule&&u?e.async?o+=" throw new ValidationError(["+f+"]); ":o+=" validate.errors = ["+f+"]; return false; ":o+=" var err = "+f+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+="} ",u&&(o+=" else { "),o},mr={$ref:function(e,r,t){var a,o,s=" ",i=e.level,n=e.dataLevel,l=e.schema[r],c=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,h="data"+(n||""),d="valid"+i;if("#"==l||"#/"==l)e.isRoot?(a=e.async,o="validate"):(a=!0===e.root.schema.$async,o="root.refVal[0]");else{var p=e.resolveRef(e.baseId,l,e.isRoot);if(void 0===p){var m=e.MissingRefError.message(e.baseId,l);if("fail"==e.opts.missingRefs){e.logger.error(m),(g=g||[]).push(s),s="",!1!==e.createErrors?(s+=" { keyword: '$ref' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { ref: '"+e.util.escapeQuotes(l)+"' } ",!1!==e.opts.messages&&(s+=" , message: 'can\\'t resolve reference "+e.util.escapeQuotes(l)+"' "),e.opts.verbose&&(s+=" , schema: "+e.util.toQuotedString(l)+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),s+=" } "):s+=" {} ";var f=s;s=g.pop(),!e.compositeRule&&u?e.async?s+=" throw new ValidationError(["+f+"]); ":s+=" validate.errors = ["+f+"]; return false; ":s+=" var err = "+f+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",u&&(s+=" if (false) { ")}else{if("ignore"!=e.opts.missingRefs)throw new e.MissingRefError(e.baseId,l,m);e.logger.warn(m),u&&(s+=" if (true) { ")}}else if(p.inline){var v=e.util.copy(e);v.level++;var y="valid"+v.level;v.schema=p.schema,v.schemaPath="",v.errSchemaPath=l,s+=" "+e.validate(v).replace(/validate\.schema/g,p.code)+" ",u&&(s+=" if ("+y+") { ")}else a=!0===p.$async||e.async&&!1!==p.$async,o=p.code}if(o){var g;(g=g||[]).push(s),s="",e.opts.passContext?s+=" "+o+".call(this, ":s+=" "+o+"( ",s+=" "+h+", (dataPath || '')",'""'!=e.errorPath&&(s+=" + "+e.errorPath);var b=s+=" , "+(n?"data"+(n-1||""):"parentData")+" , "+(n?e.dataPathArr[n]:"parentDataProperty")+", rootData) ";if(s=g.pop(),a){if(!e.async)throw new Error("async schema referenced by sync schema");u&&(s+=" var "+d+"; "),s+=" try { await "+b+"; ",u&&(s+=" "+d+" = true; "),s+=" } catch (e) { if (!(e instanceof ValidationError)) throw e; if (vErrors === null) vErrors = e.errors; else vErrors = vErrors.concat(e.errors); errors = vErrors.length; ",u&&(s+=" "+d+" = false; "),s+=" } ",u&&(s+=" if ("+d+") { ")}else s+=" if (!"+b+") { if (vErrors === null) vErrors = "+o+".errors; else vErrors = vErrors.concat("+o+".errors); errors = vErrors.length; } ",u&&(s+=" else { ")}return s},allOf:function(e,r,t){var a=" ",o=e.schema[r],s=e.schemaPath+e.util.getProperty(r),i=e.errSchemaPath+"/"+r,n=!e.opts.allErrors,l=e.util.copy(e),c="";l.level++;var u="valid"+l.level,h=l.baseId,d=!0,p=o;if(p)for(var m,f=-1,v=p.length-1;f0:e.util.schemaHasRules(m,e.RULES.all))&&(d=!1,l.schema=m,l.schemaPath=s+"["+f+"]",l.errSchemaPath=i+"/"+f,a+=" "+e.validate(l)+" ",l.baseId=h,n&&(a+=" if ("+u+") { ",c+="}"));return n&&(a+=d?" if (true) { ":" "+c.slice(0,-1)+" "),a=e.util.cleanUpCode(a)},anyOf:function(e,r,t){var a=" ",o=e.level,s=e.dataLevel,i=e.schema[r],n=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(s||""),h="valid"+o,d="errs__"+o,p=e.util.copy(e),m="";p.level++;var f="valid"+p.level;if(i.every((function(r){return e.opts.strictKeywords?"object"==typeof r&&Object.keys(r).length>0:e.util.schemaHasRules(r,e.RULES.all)}))){var v=p.baseId;a+=" var "+d+" = errors; var "+h+" = false; ";var y=e.compositeRule;e.compositeRule=p.compositeRule=!0;var g=i;if(g)for(var b,P=-1,w=g.length-1;P0:e.util.schemaHasRules(i,e.RULES.all);if(a+="var "+d+" = errors;var "+h+";",b){var P=e.compositeRule;e.compositeRule=p.compositeRule=!0,p.schema=i,p.schemaPath=n,p.errSchemaPath=l,a+=" var "+m+" = false; for (var "+f+" = 0; "+f+" < "+u+".length; "+f+"++) { ",p.errorPath=e.util.getPathExpr(e.errorPath,f,e.opts.jsonPointers,!0);var w=u+"["+f+"]";p.dataPathArr[v]=f;var E=e.validate(p);p.baseId=g,e.util.varOccurences(E,y)<2?a+=" "+e.util.varReplace(E,y,w)+" ":a+=" var "+y+" = "+w+"; "+E+" ",a+=" if ("+m+") break; } ",e.compositeRule=p.compositeRule=P,a+=" if (!"+m+") {"}else a+=" if ("+u+".length == 0) {";var S=S||[];S.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'contains' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: {} ",!1!==e.opts.messages&&(a+=" , message: 'should contain a valid item' "),e.opts.verbose&&(a+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";var O=a;return a=S.pop(),!e.compositeRule&&c?e.async?a+=" throw new ValidationError(["+O+"]); ":a+=" validate.errors = ["+O+"]; return false; ":a+=" var err = "+O+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } else { ",b&&(a+=" errors = "+d+"; if (vErrors !== null) { if ("+d+") vErrors.length = "+d+"; else vErrors = null; } "),e.opts.allErrors&&(a+=" } "),a=e.util.cleanUpCode(a)},dependencies:function(e,r,t){var a=" ",o=e.level,s=e.dataLevel,i=e.schema[r],n=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(s||""),h="errs__"+o,d=e.util.copy(e),p="";d.level++;var m="valid"+d.level,f={},v={},y=e.opts.ownProperties;for(w in i){var g=i[w],b=Array.isArray(g)?v:f;b[w]=g}a+="var "+h+" = errors;";var P=e.errorPath;for(var w in a+="var missing"+o+";",v)if((b=v[w]).length){if(a+=" if ( "+u+e.util.getProperty(w)+" !== undefined ",y&&(a+=" && Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(w)+"') "),c){a+=" && ( ";var E=b;if(E)for(var S=-1,O=E.length-1;S0:e.util.schemaHasRules(g,e.RULES.all))&&(a+=" "+m+" = true; if ( "+u+e.util.getProperty(w)+" !== undefined ",y&&(a+=" && Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(w)+"') "),a+=") { ",d.schema=g,d.schemaPath=n+e.util.getProperty(w),d.errSchemaPath=l+"/"+e.util.escapeFragment(w),a+=" "+e.validate(d)+" ",d.baseId=I,a+=" } ",c&&(a+=" if ("+m+") { ",p+="}"))}return c&&(a+=" "+p+" if ("+h+" == errors) {"),a=e.util.cleanUpCode(a)},enum:function(e,r,t){var a=" ",o=e.level,s=e.dataLevel,i=e.schema[r],n=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(s||""),h="valid"+o,d=e.opts.$data&&i&&i.$data;d&&(a+=" var schema"+o+" = "+e.util.getData(i.$data,s,e.dataPathArr)+"; ");var p="i"+o,m="schema"+o;d||(a+=" var "+m+" = validate.schema"+n+";"),a+="var "+h+";",d&&(a+=" if (schema"+o+" === undefined) "+h+" = true; else if (!Array.isArray(schema"+o+")) "+h+" = false; else {"),a+=h+" = false;for (var "+p+"=0; "+p+"<"+m+".length; "+p+"++) if (equal("+u+", "+m+"["+p+"])) { "+h+" = true; break; }",d&&(a+=" } "),a+=" if (!"+h+") { ";var f=f||[];f.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'enum' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { allowedValues: schema"+o+" } ",!1!==e.opts.messages&&(a+=" , message: 'should be equal to one of the allowed values' "),e.opts.verbose&&(a+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";var v=a;return a=f.pop(),!e.compositeRule&&c?e.async?a+=" throw new ValidationError(["+v+"]); ":a+=" validate.errors = ["+v+"]; return false; ":a+=" var err = "+v+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" }",c&&(a+=" else { "),a},format:function(e,r,t){var a=" ",o=e.level,s=e.dataLevel,i=e.schema[r],n=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(s||"");if(!1===e.opts.format)return c&&(a+=" if (true) { "),a;var h,d=e.opts.$data&&i&&i.$data;d?(a+=" var schema"+o+" = "+e.util.getData(i.$data,s,e.dataPathArr)+"; ",h="schema"+o):h=i;var p=e.opts.unknownFormats,m=Array.isArray(p);if(d){a+=" var "+(f="format"+o)+" = formats["+h+"]; var "+(v="isObject"+o)+" = typeof "+f+" == 'object' && !("+f+" instanceof RegExp) && "+f+".validate; var "+(y="formatType"+o)+" = "+v+" && "+f+".type || 'string'; if ("+v+") { ",e.async&&(a+=" var async"+o+" = "+f+".async; "),a+=" "+f+" = "+f+".validate; } if ( ",d&&(a+=" ("+h+" !== undefined && typeof "+h+" != 'string') || "),a+=" (","ignore"!=p&&(a+=" ("+h+" && !"+f+" ",m&&(a+=" && self._opts.unknownFormats.indexOf("+h+") == -1 "),a+=") || "),a+=" ("+f+" && "+y+" == '"+t+"' && !(typeof "+f+" == 'function' ? ",e.async?a+=" (async"+o+" ? await "+f+"("+u+") : "+f+"("+u+")) ":a+=" "+f+"("+u+") ",a+=" : "+f+".test("+u+"))))) {"}else{var f;if(!(f=e.formats[i])){if("ignore"==p)return e.logger.warn('unknown format "'+i+'" ignored in schema at path "'+e.errSchemaPath+'"'),c&&(a+=" if (true) { "),a;if(m&&p.indexOf(i)>=0)return c&&(a+=" if (true) { "),a;throw new Error('unknown format "'+i+'" is used in schema at path "'+e.errSchemaPath+'"')}var v,y=(v="object"==typeof f&&!(f instanceof RegExp)&&f.validate)&&f.type||"string";if(v){var g=!0===f.async;f=f.validate}if(y!=t)return c&&(a+=" if (true) { "),a;if(g){if(!e.async)throw new Error("async format in sync schema");a+=" if (!(await "+(b="formats"+e.util.getProperty(i)+".validate")+"("+u+"))) { "}else{a+=" if (! ";var b="formats"+e.util.getProperty(i);v&&(b+=".validate"),a+="function"==typeof f?" "+b+"("+u+") ":" "+b+".test("+u+") ",a+=") { "}}var P=P||[];P.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'format' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { format: ",a+=d?""+h:""+e.util.toQuotedString(i),a+=" } ",!1!==e.opts.messages&&(a+=" , message: 'should match format \"",a+=d?"' + "+h+" + '":""+e.util.escapeQuotes(i),a+="\"' "),e.opts.verbose&&(a+=" , schema: ",a+=d?"validate.schema"+n:""+e.util.toQuotedString(i),a+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";var w=a;return a=P.pop(),!e.compositeRule&&c?e.async?a+=" throw new ValidationError(["+w+"]); ":a+=" validate.errors = ["+w+"]; return false; ":a+=" var err = "+w+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } ",c&&(a+=" else { "),a},if:function(e,r,t){var a=" ",o=e.level,s=e.dataLevel,i=e.schema[r],n=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(s||""),h="valid"+o,d="errs__"+o,p=e.util.copy(e);p.level++;var m="valid"+p.level,f=e.schema.then,v=e.schema.else,y=void 0!==f&&(e.opts.strictKeywords?"object"==typeof f&&Object.keys(f).length>0:e.util.schemaHasRules(f,e.RULES.all)),g=void 0!==v&&(e.opts.strictKeywords?"object"==typeof v&&Object.keys(v).length>0:e.util.schemaHasRules(v,e.RULES.all)),b=p.baseId;if(y||g){var P;p.createErrors=!1,p.schema=i,p.schemaPath=n,p.errSchemaPath=l,a+=" var "+d+" = errors; var "+h+" = true; ";var w=e.compositeRule;e.compositeRule=p.compositeRule=!0,a+=" "+e.validate(p)+" ",p.baseId=b,p.createErrors=!0,a+=" errors = "+d+"; if (vErrors !== null) { if ("+d+") vErrors.length = "+d+"; else vErrors = null; } ",e.compositeRule=p.compositeRule=w,y?(a+=" if ("+m+") { ",p.schema=e.schema.then,p.schemaPath=e.schemaPath+".then",p.errSchemaPath=e.errSchemaPath+"/then",a+=" "+e.validate(p)+" ",p.baseId=b,a+=" "+h+" = "+m+"; ",y&&g?a+=" var "+(P="ifClause"+o)+" = 'then'; ":P="'then'",a+=" } ",g&&(a+=" else { ")):a+=" if (!"+m+") { ",g&&(p.schema=e.schema.else,p.schemaPath=e.schemaPath+".else",p.errSchemaPath=e.errSchemaPath+"/else",a+=" "+e.validate(p)+" ",p.baseId=b,a+=" "+h+" = "+m+"; ",y&&g?a+=" var "+(P="ifClause"+o)+" = 'else'; ":P="'else'",a+=" } "),a+=" if (!"+h+") { var err = ",!1!==e.createErrors?(a+=" { keyword: 'if' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { failingKeyword: "+P+" } ",!1!==e.opts.messages&&(a+=" , message: 'should match \"' + "+P+" + '\" schema' "),e.opts.verbose&&(a+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&c&&(e.async?a+=" throw new ValidationError(vErrors); ":a+=" validate.errors = vErrors; return false; "),a+=" } ",c&&(a+=" else { "),a=e.util.cleanUpCode(a)}else c&&(a+=" if (true) { ");return a},items:function(e,r,t){var a=" ",o=e.level,s=e.dataLevel,i=e.schema[r],n=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(s||""),h="valid"+o,d="errs__"+o,p=e.util.copy(e),m="";p.level++;var f="valid"+p.level,v="i"+o,y=p.dataLevel=e.dataLevel+1,g="data"+y,b=e.baseId;if(a+="var "+d+" = errors;var "+h+";",Array.isArray(i)){var P=e.schema.additionalItems;if(!1===P){a+=" "+h+" = "+u+".length <= "+i.length+"; ";var w=l;l=e.errSchemaPath+"/additionalItems",a+=" if (!"+h+") { ";var E=E||[];E.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'additionalItems' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { limit: "+i.length+" } ",!1!==e.opts.messages&&(a+=" , message: 'should NOT have more than "+i.length+" items' "),e.opts.verbose&&(a+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";var S=a;a=E.pop(),!e.compositeRule&&c?e.async?a+=" throw new ValidationError(["+S+"]); ":a+=" validate.errors = ["+S+"]; return false; ":a+=" var err = "+S+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } ",l=w,c&&(m+="}",a+=" else { ")}var O=i;if(O)for(var F,x=-1,_=O.length-1;x<_;)if(F=O[x+=1],e.opts.strictKeywords?"object"==typeof F&&Object.keys(F).length>0:e.util.schemaHasRules(F,e.RULES.all)){a+=" "+f+" = true; if ("+u+".length > "+x+") { ";var $=u+"["+x+"]";p.schema=F,p.schemaPath=n+"["+x+"]",p.errSchemaPath=l+"/"+x,p.errorPath=e.util.getPathExpr(e.errorPath,x,e.opts.jsonPointers,!0),p.dataPathArr[y]=x;var D=e.validate(p);p.baseId=b,e.util.varOccurences(D,g)<2?a+=" "+e.util.varReplace(D,g,$)+" ":a+=" var "+g+" = "+$+"; "+D+" ",a+=" } ",c&&(a+=" if ("+f+") { ",m+="}")}if("object"==typeof P&&(e.opts.strictKeywords?"object"==typeof P&&Object.keys(P).length>0:e.util.schemaHasRules(P,e.RULES.all))){p.schema=P,p.schemaPath=e.schemaPath+".additionalItems",p.errSchemaPath=e.errSchemaPath+"/additionalItems",a+=" "+f+" = true; if ("+u+".length > "+i.length+") { for (var "+v+" = "+i.length+"; "+v+" < "+u+".length; "+v+"++) { ",p.errorPath=e.util.getPathExpr(e.errorPath,v,e.opts.jsonPointers,!0);$=u+"["+v+"]";p.dataPathArr[y]=v;D=e.validate(p);p.baseId=b,e.util.varOccurences(D,g)<2?a+=" "+e.util.varReplace(D,g,$)+" ":a+=" var "+g+" = "+$+"; "+D+" ",c&&(a+=" if (!"+f+") break; "),a+=" } } ",c&&(a+=" if ("+f+") { ",m+="}")}}else if(e.opts.strictKeywords?"object"==typeof i&&Object.keys(i).length>0:e.util.schemaHasRules(i,e.RULES.all)){p.schema=i,p.schemaPath=n,p.errSchemaPath=l,a+=" for (var "+v+" = 0; "+v+" < "+u+".length; "+v+"++) { ",p.errorPath=e.util.getPathExpr(e.errorPath,v,e.opts.jsonPointers,!0);$=u+"["+v+"]";p.dataPathArr[y]=v;D=e.validate(p);p.baseId=b,e.util.varOccurences(D,g)<2?a+=" "+e.util.varReplace(D,g,$)+" ":a+=" var "+g+" = "+$+"; "+D+" ",c&&(a+=" if (!"+f+") break; "),a+=" }"}return c&&(a+=" "+m+" if ("+d+" == errors) {"),a=e.util.cleanUpCode(a)},maximum:ur,minimum:ur,maxItems:hr,minItems:hr,maxLength:dr,minLength:dr,maxProperties:pr,minProperties:pr,multipleOf:function(e,r,t){var a,o=" ",s=e.level,i=e.dataLevel,n=e.schema[r],l=e.schemaPath+e.util.getProperty(r),c=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,h="data"+(i||""),d=e.opts.$data&&n&&n.$data;d?(o+=" var schema"+s+" = "+e.util.getData(n.$data,i,e.dataPathArr)+"; ",a="schema"+s):a=n,o+="var division"+s+";if (",d&&(o+=" "+a+" !== undefined && ( typeof "+a+" != 'number' || "),o+=" (division"+s+" = "+h+" / "+a+", ",e.opts.multipleOfPrecision?o+=" Math.abs(Math.round(division"+s+") - division"+s+") > 1e-"+e.opts.multipleOfPrecision+" ":o+=" division"+s+" !== parseInt(division"+s+") ",o+=" ) ",d&&(o+=" ) "),o+=" ) { ";var p=p||[];p.push(o),o="",!1!==e.createErrors?(o+=" { keyword: 'multipleOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { multipleOf: "+a+" } ",!1!==e.opts.messages&&(o+=" , message: 'should be multiple of ",o+=d?"' + "+a:a+"'"),e.opts.verbose&&(o+=" , schema: ",o+=d?"validate.schema"+l:""+n,o+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),o+=" } "):o+=" {} ";var m=o;return o=p.pop(),!e.compositeRule&&u?e.async?o+=" throw new ValidationError(["+m+"]); ":o+=" validate.errors = ["+m+"]; return false; ":o+=" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+="} ",u&&(o+=" else { "),o},not:function(e,r,t){var a=" ",o=e.level,s=e.dataLevel,i=e.schema[r],n=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(s||""),h="errs__"+o,d=e.util.copy(e);d.level++;var p="valid"+d.level;if(e.opts.strictKeywords?"object"==typeof i&&Object.keys(i).length>0:e.util.schemaHasRules(i,e.RULES.all)){d.schema=i,d.schemaPath=n,d.errSchemaPath=l,a+=" var "+h+" = errors; ";var m,f=e.compositeRule;e.compositeRule=d.compositeRule=!0,d.createErrors=!1,d.opts.allErrors&&(m=d.opts.allErrors,d.opts.allErrors=!1),a+=" "+e.validate(d)+" ",d.createErrors=!0,m&&(d.opts.allErrors=m),e.compositeRule=d.compositeRule=f,a+=" if ("+p+") { ";var v=v||[];v.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'not' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: {} ",!1!==e.opts.messages&&(a+=" , message: 'should NOT be valid' "),e.opts.verbose&&(a+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";var y=a;a=v.pop(),!e.compositeRule&&c?e.async?a+=" throw new ValidationError(["+y+"]); ":a+=" validate.errors = ["+y+"]; return false; ":a+=" var err = "+y+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } else { errors = "+h+"; if (vErrors !== null) { if ("+h+") vErrors.length = "+h+"; else vErrors = null; } ",e.opts.allErrors&&(a+=" } ")}else a+=" var err = ",!1!==e.createErrors?(a+=" { keyword: 'not' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: {} ",!1!==e.opts.messages&&(a+=" , message: 'should NOT be valid' "),e.opts.verbose&&(a+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",c&&(a+=" if (false) { ");return a},oneOf:function(e,r,t){var a=" ",o=e.level,s=e.dataLevel,i=e.schema[r],n=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(s||""),h="valid"+o,d="errs__"+o,p=e.util.copy(e),m="";p.level++;var f="valid"+p.level,v=p.baseId,y="prevValid"+o,g="passingSchemas"+o;a+="var "+d+" = errors , "+y+" = false , "+h+" = false , "+g+" = null; ";var b=e.compositeRule;e.compositeRule=p.compositeRule=!0;var P=i;if(P)for(var w,E=-1,S=P.length-1;E0:e.util.schemaHasRules(w,e.RULES.all))?(p.schema=w,p.schemaPath=n+"["+E+"]",p.errSchemaPath=l+"/"+E,a+=" "+e.validate(p)+" ",p.baseId=v):a+=" var "+f+" = true; ",E&&(a+=" if ("+f+" && "+y+") { "+h+" = false; "+g+" = ["+g+", "+E+"]; } else { ",m+="}"),a+=" if ("+f+") { "+h+" = "+y+" = true; "+g+" = "+E+"; }";return e.compositeRule=p.compositeRule=b,a+=m+"if (!"+h+") { var err = ",!1!==e.createErrors?(a+=" { keyword: 'oneOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { passingSchemas: "+g+" } ",!1!==e.opts.messages&&(a+=" , message: 'should match exactly one schema in oneOf' "),e.opts.verbose&&(a+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&c&&(e.async?a+=" throw new ValidationError(vErrors); ":a+=" validate.errors = vErrors; return false; "),a+="} else { errors = "+d+"; if (vErrors !== null) { if ("+d+") vErrors.length = "+d+"; else vErrors = null; }",e.opts.allErrors&&(a+=" } "),a},pattern:function(e,r,t){var a,o=" ",s=e.level,i=e.dataLevel,n=e.schema[r],l=e.schemaPath+e.util.getProperty(r),c=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,h="data"+(i||""),d=e.opts.$data&&n&&n.$data;d?(o+=" var schema"+s+" = "+e.util.getData(n.$data,i,e.dataPathArr)+"; ",a="schema"+s):a=n,o+="if ( ",d&&(o+=" ("+a+" !== undefined && typeof "+a+" != 'string') || "),o+=" !"+(d?"(new RegExp("+a+"))":e.usePattern(n))+".test("+h+") ) { ";var p=p||[];p.push(o),o="",!1!==e.createErrors?(o+=" { keyword: 'pattern' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { pattern: ",o+=d?""+a:""+e.util.toQuotedString(n),o+=" } ",!1!==e.opts.messages&&(o+=" , message: 'should match pattern \"",o+=d?"' + "+a+" + '":""+e.util.escapeQuotes(n),o+="\"' "),e.opts.verbose&&(o+=" , schema: ",o+=d?"validate.schema"+l:""+e.util.toQuotedString(n),o+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),o+=" } "):o+=" {} ";var m=o;return o=p.pop(),!e.compositeRule&&u?e.async?o+=" throw new ValidationError(["+m+"]); ":o+=" validate.errors = ["+m+"]; return false; ":o+=" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+="} ",u&&(o+=" else { "),o},properties:function(e,r,t){var a=" ",o=e.level,s=e.dataLevel,i=e.schema[r],n=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(s||""),h="errs__"+o,d=e.util.copy(e),p="";d.level++;var m="valid"+d.level,f="key"+o,v="idx"+o,y=d.dataLevel=e.dataLevel+1,g="data"+y,b="dataProperties"+o,P=Object.keys(i||{}),w=e.schema.patternProperties||{},E=Object.keys(w),S=e.schema.additionalProperties,O=P.length||E.length,F=!1===S,x="object"==typeof S&&Object.keys(S).length,_=e.opts.removeAdditional,$=F||x||_,D=e.opts.ownProperties,j=e.baseId,A=e.schema.required;if(A&&(!e.opts.$data||!A.$data)&&A.length8)a+=" || validate.schema"+n+".hasOwnProperty("+f+") ";else{var R=P;if(R)for(var C=-1,I=R.length-1;C0:e.util.schemaHasRules(Z,e.RULES.all)){var X=e.util.getProperty(W),Y=(B=u+X,K&&void 0!==Z.default);d.schema=Z,d.schemaPath=n+X,d.errSchemaPath=l+"/"+e.util.escapeFragment(W),d.errorPath=e.util.getPath(e.errorPath,W,e.opts.jsonPointers),d.dataPathArr[y]=e.util.toQuotedString(W);M=e.validate(d);if(d.baseId=j,e.util.varOccurences(M,g)<2){M=e.util.varReplace(M,g,B);var ee=B}else{ee=g;a+=" var "+g+" = "+B+"; "}if(Y)a+=" "+M+" ";else{if(k&&k[W]){a+=" if ( "+ee+" === undefined ",D&&(a+=" || ! Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(W)+"') "),a+=") { "+m+" = false; ";z=e.errorPath,V=l;var re,te=e.util.escapeQuotes(W);e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPath(z,W,e.opts.jsonPointers)),l=e.errSchemaPath+"/required",(re=re||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+te+"' } ",!1!==e.opts.messages&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is a required property":a+="should have required property \\'"+te+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";U=a;a=re.pop(),!e.compositeRule&&c?e.async?a+=" throw new ValidationError(["+U+"]); ":a+=" validate.errors = ["+U+"]; return false; ":a+=" var err = "+U+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",l=V,e.errorPath=z,a+=" } else { "}else c?(a+=" if ( "+ee+" === undefined ",D&&(a+=" || ! Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(W)+"') "),a+=") { "+m+" = true; } else { "):(a+=" if ("+ee+" !== undefined ",D&&(a+=" && Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(W)+"') "),a+=" ) { ");a+=" "+M+" } "}}c&&(a+=" if ("+m+") { ",p+="}")}}if(E.length){var ae=E;if(ae)for(var oe,se=-1,ie=ae.length-1;se0:e.util.schemaHasRules(Z,e.RULES.all)){d.schema=Z,d.schemaPath=e.schemaPath+".patternProperties"+e.util.getProperty(oe),d.errSchemaPath=e.errSchemaPath+"/patternProperties/"+e.util.escapeFragment(oe),a+=D?" "+b+" = "+b+" || Object.keys("+u+"); for (var "+v+"=0; "+v+"<"+b+".length; "+v+"++) { var "+f+" = "+b+"["+v+"]; ":" for (var "+f+" in "+u+") { ",a+=" if ("+e.usePattern(oe)+".test("+f+")) { ",d.errorPath=e.util.getPathExpr(e.errorPath,f,e.opts.jsonPointers);B=u+"["+f+"]";d.dataPathArr[y]=f;M=e.validate(d);d.baseId=j,e.util.varOccurences(M,g)<2?a+=" "+e.util.varReplace(M,g,B)+" ":a+=" var "+g+" = "+B+"; "+M+" ",c&&(a+=" if (!"+m+") break; "),a+=" } ",c&&(a+=" else "+m+" = true; "),a+=" } ",c&&(a+=" if ("+m+") { ",p+="}")}}}return c&&(a+=" "+p+" if ("+h+" == errors) {"),a=e.util.cleanUpCode(a)},propertyNames:function(e,r,t){var a=" ",o=e.level,s=e.dataLevel,i=e.schema[r],n=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(s||""),h="errs__"+o,d=e.util.copy(e);d.level++;var p="valid"+d.level;if(a+="var "+h+" = errors;",e.opts.strictKeywords?"object"==typeof i&&Object.keys(i).length>0:e.util.schemaHasRules(i,e.RULES.all)){d.schema=i,d.schemaPath=n,d.errSchemaPath=l;var m="key"+o,f="idx"+o,v="i"+o,y="' + "+m+" + '",g="data"+(d.dataLevel=e.dataLevel+1),b="dataProperties"+o,P=e.opts.ownProperties,w=e.baseId;P&&(a+=" var "+b+" = undefined; "),a+=P?" "+b+" = "+b+" || Object.keys("+u+"); for (var "+f+"=0; "+f+"<"+b+".length; "+f+"++) { var "+m+" = "+b+"["+f+"]; ":" for (var "+m+" in "+u+") { ",a+=" var startErrs"+o+" = errors; ";var E=m,S=e.compositeRule;e.compositeRule=d.compositeRule=!0;var O=e.validate(d);d.baseId=w,e.util.varOccurences(O,g)<2?a+=" "+e.util.varReplace(O,g,E)+" ":a+=" var "+g+" = "+E+"; "+O+" ",e.compositeRule=d.compositeRule=S,a+=" if (!"+p+") { for (var "+v+"=startErrs"+o+"; "+v+"0:e.util.schemaHasRules(b,e.RULES.all))||(m[m.length]=v)}}else m=i;if(d||m.length){var P=e.errorPath,w=d||m.length>=e.opts.loopRequired,E=e.opts.ownProperties;if(c)if(a+=" var missing"+o+"; ",w){d||(a+=" var "+p+" = validate.schema"+n+"; ");var S="' + "+(D="schema"+o+"["+(x="i"+o)+"]")+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(P,D,e.opts.jsonPointers)),a+=" var "+h+" = true; ",d&&(a+=" if (schema"+o+" === undefined) "+h+" = true; else if (!Array.isArray(schema"+o+")) "+h+" = false; else {"),a+=" for (var "+x+" = 0; "+x+" < "+p+".length; "+x+"++) { "+h+" = "+u+"["+p+"["+x+"]] !== undefined ",E&&(a+=" && Object.prototype.hasOwnProperty.call("+u+", "+p+"["+x+"]) "),a+="; if (!"+h+") break; } ",d&&(a+=" } "),a+=" if (!"+h+") { ",($=$||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+S+"' } ",!1!==e.opts.messages&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is a required property":a+="should have required property \\'"+S+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";var O=a;a=$.pop(),!e.compositeRule&&c?e.async?a+=" throw new ValidationError(["+O+"]); ":a+=" validate.errors = ["+O+"]; return false; ":a+=" var err = "+O+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } else { "}else{a+=" if ( ";var F=m;if(F)for(var x=-1,_=F.length-1;x<_;){A=F[x+=1],x&&(a+=" || "),a+=" ( ( "+(I=u+(C=e.util.getProperty(A)))+" === undefined ",E&&(a+=" || ! Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(A)+"') "),a+=") && (missing"+o+" = "+e.util.toQuotedString(e.opts.jsonPointers?A:C)+") ) "}a+=") { ";var $;S="' + "+(D="missing"+o)+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.opts.jsonPointers?e.util.getPathExpr(P,D,!0):P+" + "+D),($=$||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+S+"' } ",!1!==e.opts.messages&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is a required property":a+="should have required property \\'"+S+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";O=a;a=$.pop(),!e.compositeRule&&c?e.async?a+=" throw new ValidationError(["+O+"]); ":a+=" validate.errors = ["+O+"]; return false; ":a+=" var err = "+O+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } else { "}else if(w){d||(a+=" var "+p+" = validate.schema"+n+"; ");var D;S="' + "+(D="schema"+o+"["+(x="i"+o)+"]")+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(P,D,e.opts.jsonPointers)),d&&(a+=" if ("+p+" && !Array.isArray("+p+")) { var err = ",!1!==e.createErrors?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+S+"' } ",!1!==e.opts.messages&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is a required property":a+="should have required property \\'"+S+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } else if ("+p+" !== undefined) { "),a+=" for (var "+x+" = 0; "+x+" < "+p+".length; "+x+"++) { if ("+u+"["+p+"["+x+"]] === undefined ",E&&(a+=" || ! Object.prototype.hasOwnProperty.call("+u+", "+p+"["+x+"]) "),a+=") { var err = ",!1!==e.createErrors?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+S+"' } ",!1!==e.opts.messages&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is a required property":a+="should have required property \\'"+S+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } } ",d&&(a+=" } ")}else{var j=m;if(j)for(var A,k=-1,R=j.length-1;k 1) { ";var m=e.schema.items&&e.schema.items.type,f=Array.isArray(m);if(!m||"object"==m||"array"==m||f&&(m.indexOf("object")>=0||m.indexOf("array")>=0))o+=" outer: for (;i--;) { for (j = i; j--;) { if (equal("+h+"[i], "+h+"[j])) { "+d+" = false; break outer; } } } ";else{o+=" var itemIndices = {}, item; for (;i--;) { var item = "+h+"[i]; ";var v="checkDataType"+(f?"s":"");o+=" if ("+e.util[v](m,"item",!0)+") continue; ",f&&(o+=" if (typeof item == 'string') item = '\"' + item; "),o+=" if (typeof itemIndices[item] == 'number') { "+d+" = false; j = itemIndices[item]; break; } itemIndices[item] = i; } "}o+=" } ",p&&(o+=" } "),o+=" if (!"+d+") { ";var y=y||[];y.push(o),o="",!1!==e.createErrors?(o+=" { keyword: 'uniqueItems' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { i: i, j: j } ",!1!==e.opts.messages&&(o+=" , message: 'should NOT have duplicate items (items ## ' + j + ' and ' + i + ' are identical)' "),e.opts.verbose&&(o+=" , schema: ",o+=p?"validate.schema"+l:""+n,o+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),o+=" } "):o+=" {} ";var g=o;o=y.pop(),!e.compositeRule&&u?e.async?o+=" throw new ValidationError(["+g+"]); ":o+=" validate.errors = ["+g+"]; return false; ":o+=" var err = "+g+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+=" } ",u&&(o+=" else { ")}else u&&(o+=" if (true) { ");return o},validate:ke},fr=B.toHash,vr=["multipleOf","maximum","exclusiveMaximum","minimum","exclusiveMinimum","maxLength","minLength","pattern","additionalItems","maxItems","minItems","uniqueItems","maxProperties","minProperties","required","additionalProperties","enum","format","const"],yr=function(e,r){for(var t=0;t0&&void 0!==arguments[0]?arguments[0]:[];return null===e?[]:e.map((function(e){var r=e.dataPath,t=e.keyword,a=e.message,o=e.params,s=e.schemaPath,i="".concat(r);return{name:t,property:i,message:a,params:o,stack:"".concat(i," ").concat(a).trim(),schemaPath:s}}))}function st(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=e.formData,a=e.schema,o=e.transformErrors,s=e.additionalMetaSchemas,i=void 0===s?[]:s,n=e.customFormats,l=void 0===n?{}:n,c=!k(tt,i),u=!k(rt,l);(c||u)&&(et=at()),i&&c&&Array.isArray(i)&&(et.addMetaSchema(i),tt=i),l&&u&&x(l)&&(Object.keys(l).forEach((function(e){et.addFormat(e,l[e])})),rt=l);var h=null;try{et.validate(a,r)}catch(e){h=e}t.getCurrentLocalize()(et.errors);var d=ot(et.errors);et.errors=null;var p=h&&h.message&&"string"==typeof h.message&&h.message.includes("no schema with key or ref ");return p&&(d=[].concat(g(d),[{stack:h.message}])),"function"==typeof o&&(d=o(d)),{errors:d}}function it(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=e.formData,a=e.schema,o=e.transformErrors,s=e.additionalMetaSchemas,i=void 0===s?[]:s,n=e.customFormats,l=void 0===n?{}:n,c=e.errorSchema,u=void 0===c?{}:c,h=e.required,d=void 0!==h&&h,p=e.propPath,m=void 0===p?"":p,f=e.isOnlyFirstError,v=void 0===f||f,y=void 0===r;if(d){if(y){var g={keyword:"required",params:{missingProperty:m}},b=ra(u).required;return b?g.message=b:t.getCurrentLocalize()([g]),[g]}}else if(y)return[];var P=st({formData:r,schema:a,transformErrors:o,additionalMetaSchemas:i,customFormats:l}).errors;P=P.filter((function(e){return""===e.property&&!e.schemaPath.includes("#/anyOf/")&&!e.schemaPath.includes("#/oneOf/")||"additionalProperties"===e.name}));var w=ra(u);return(v&&P.length>0?[P[0]]:P).reduce((function(e,r){return r.message=w[r.name]||r.message,e.push(r),e}),[])}function nt(e,r){try{return et.validate(e,r)}catch(e){return!1}}function lt(e,r,t){for(var a=0;a=2;)s();return a}function ft(e,r,t){var a=f(f({},e),{},{allOf:e.allOf.map((function(e){return gt(e,r,t)}))});try{var o=a.allOf,s=v(a,["allOf"]);return mt.apply(void 0,[s].concat(g(o)))}catch(e){a.allOf;return v(a,["allOf"])}}function vt(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(e.hasOwnProperty("allOf")&&(e=ft(e,r,t)),e.hasOwnProperty("$ref")&&(e=pt(e,r,t)),e.hasOwnProperty("dependencies")){var a=ut(e,r,t);e=gt(a,r,t)}return e}function yt(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return e=f(f({},e),{},{properties:f({},e.properties)}),Object.keys(t).forEach((function(a){var o;e.properties.hasOwnProperty(a)||(o=e.additionalProperties.hasOwnProperty("$ref")?gt({$ref:e.additionalProperties.$ref},r,t):e.additionalProperties.hasOwnProperty("type")?f({},e.additionalProperties):{type:$(t[a])},e.properties[a]=o,e.properties[a].__additional_property=!0)})),e}function gt(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!x(e))return{};var a=vt(e,r,t),o=a.hasOwnProperty("additionalProperties")&&!1!==a.additionalProperties;return o?yt(a,r,t):a}function bt(e,r,t,a,o,s,i,n,l,c){"boolean"!=typeof i&&(l=n,n=i,i=!1);const u="function"==typeof t?t.options:t;let h;if(e&&e.render&&(u.render=e.render,u.staticRenderFns=e.staticRenderFns,u._compiled=!0,o&&(u.functional=!0)),a&&(u._scopeId=a),s?(h=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),r&&r.call(this,l(e)),e&&e._registeredComponents&&e._registeredComponents.add(s)},u._ssrRegister=h):r&&(h=i?function(e){r.call(this,c(e,this.$root.$options.shadowRoot))}:function(e){r.call(this,n(e))}),h)if(u.functional){const e=u.render;u.render=function(r,t){return h.call(t),e(r,t)}}else{const e=u.beforeCreate;u.beforeCreate=e?[].concat(e,h):[h]}return t}const Pt={name:"FieldGroupWrap",props:{showTitle:{type:Boolean,default:!0},showDescription:{type:Boolean,default:!0},title:{type:String,default:""},description:{type:String,default:""}}};var wt=function(){var e=this,r=e.$createElement,t=e._self._c||r;return t("div",{staticClass:"fieldGroupWrap"},[[e.showTitle&&e.title?t("h3",{staticClass:"fieldGroupWrap_title"},[e._v("\n "+e._s(e.title)+"\n ")]):e._e(),e._v(" "),e.showDescription&&e.description?t("p",{staticClass:"fieldGroupWrap_des",domProps:{innerHTML:e._s(e.description)}}):e._e()],e._v(" "),t("div",{staticClass:"fieldGroupWrap_box"},[e._t("default")],2)],2)};wt._withStripped=!0;const Et=bt({render:wt,staticRenderFns:[]},void 0,Pt,void 0,!1,void 0,!1,void 0,void 0,void 0);var St={name:"Widget",props:{isFormData:{type:Boolean,default:!0},curValue:{type:null,default:0},schema:{type:Object,default:function(){return{}}},errorSchema:{type:Object,default:function(){return{}}},customFormats:{type:Object,default:function(){return{}}},widget:{type:[String,Function,Object]},formatValue:{type:[Function],default:function(e){return{update:!0,value:e}}},rootFormData:{type:null},curNodePath:{type:String,default:""},label:{type:String,default:""},labelWidth:{type:String,default:""},description:{type:String,default:""},required:{type:Boolean,default:!1},emptyValue:{type:null,default:void 0},attrs:{type:Object,default:function(){return{}}},uiProps:{type:Object,default:function(){return{}}}},computed:{value:{get:function(){return this.isFormData?l(this.rootFormData,this.curNodePath):this.curValue},set:function(e){var r=""===e?this.emptyValue:e;this.isFormData&&n(this.rootFormData,this.curNodePath,r),this.$emit("onChange",r)}}},created:function(){this.uiProps.enumOptions&&this.uiProps.enumOptions.length>0&&void 0===this.value&&this.value!==this.uiProps.enumOptions[0]&&(this.value=this.uiProps.enumOptions[0].value)},render:function(e){var r=this,t=r.uiProps,a=t.class,s=t.style,i=v(t,["class","style"]),n=o(this.curNodePath);return e("el-form-item",{class:{"is-required":r.required},props:f({label:r.label,labelWidth:r.labelWidth},this.isFormData?{prop:n?"__$$root":r.curNodePath,rules:[{validator:function(e,t,a){n&&(t=r.rootFormData);var o=it({formData:t,schema:r.$props.schema,customFormats:r.$props.customFormats,errorSchema:r.errorSchema,required:r.required,propPath:r.curNodePath});return o.length>0?a(o[0].message):a()},trigger:"blur"}]}:{}),scopedSlots:{error:function(r){return r.error?e("p",{class:{formItemErrorBox:!0},attrs:{title:r.error}},[r.error]):null}}},[].concat(g(r.description?[e("p",{domProps:{innerHTML:r.description},class:{genFromWidget_des:!0}})]:[]),[e(r.widget,{props:f(f({},i),{},{value:this.value}),style:s,class:a,attrs:f({placeholder:i.placeholder},r.attrs),on:{input:function(e){var t=r.formatValue(e);t.update&&(r.value=t.value)}}})]))}},Ot={name:"SchemaField",props:r,functional:!0,render:function(e,r){var t=r.props,o=t.rootSchema,s=gt(t.schema,o),i=f(f({},t),{},{schema:s});if(0===Object.keys(s).length)return null;var n,l=Zt(i),c="HiddenWidget"===t.uiSchema["ui:widget"]||"hidden"===t.uiSchema["ui:widget"],u=[],h=a(r.props.curNodePath);if(s.anyOf&&s.anyOf.length>0&&!sa(s))u.push(e(Jt.anyOf,{class:(n={},d(n,"".concat(h,"-anyOf"),!0),d(n,"AnyOfField",!0),n),props:i}));else if(s.oneOf&&s.oneOf.length>0&&!sa(s)){var p;u.push(e(Jt.oneOf,{class:(p={},d(p,"".concat(h,"-oneOf"),!0),d(p,"OneOfField",!0),p),props:i}))}else{var m;u.push(l&&e(c?"div":l,{props:f({},i),class:f(f({},r.data.class),{},(m={},d(m,N(l.name)||l,!0),d(m,"hiddenWidget",c),d(m,h,!0),m))}))}return u}},Ft={name:"ObjectField",props:f({},r),methods:{isRequired:function(e){var r=this.schema;return Array.isArray(r.required)&&!!~r.required.indexOf(e)}},render:function(e){var r=this,t=this.$props,a=t.schema,o=t.uiSchema,i=t.errorSchema,n=ta(Object.keys(a.properties||{}),o["ui:order"]).map((function(n){var l=a.properties[n].hasOwnProperty("__additional_property");return e(Ot,{props:f(f({},t),{},{schema:a.properties[n],uiSchema:l?o.additionalProperties:o[n],errorSchema:i[n],required:r.isRequired(n),curNodePath:s(t.curNodePath,n)})})})),l=Yt({schema:a,uiSchema:o}),c=l.title,u=l.description,h=l.showTitle,d=l.showDescription;return e(Et,{props:{title:c,description:u,showTitle:h,showDescription:d}},[e("template",{slot:"default"},[].concat(g(n),[this.needValidFieldGroup?e(St,{class:{validateWidget:!0,"validateWidget-object":!0},props:{schema:Object.entries(r.$props.schema).reduce((function(e,t){var a=y(t,2),o=a[0],s=a[1];return!1!==r.$props.schema.additionalProperties&&"properties"===o||(e[o]=s),e}),{}),errorSchema:this.errorSchema,curNodePath:t.curNodePath,rootFormData:this.rootFormData}}):null]))])}};const xt={name:"CheckboxesWidget",props:{value:{default:function(){return[]},type:[Array]},enumOptions:{default:function(){return[]},type:[Array]}},computed:{checkList:{get:function(){return this.value},set:function(e){this.$emit("input",e)}}}};var _t=function(){var e=this,r=e.$createElement,t=e._self._c||r;return t("el-checkbox-group",{model:{value:e.checkList,callback:function(r){e.checkList=r},expression:"checkList"}},e._l(e.enumOptions,(function(r,a){return t("el-checkbox",{key:a,attrs:{label:r.value}},[e._v(e._s(r.label))])})),1)};_t._withStripped=!0;const $t=bt({render:_t,staticRenderFns:[]},void 0,xt,void 0,!1,void 0,!1,void 0,void 0,void 0);const Dt={name:"RadioWidget",props:{value:{default:function(){return""},type:[String,Number,Boolean]},enumOptions:{default:function(){return[]},type:[Array]}},computed:{checkList:{get:function(){return this.value},set:function(e){this.$emit("input",e)}}}};var jt=function(){var e=this,r=e.$createElement,t=e._self._c||r;return t("el-radio-group",{model:{value:e.checkList,callback:function(r){e.checkList=r},expression:"checkList"}},e._l(e.enumOptions,(function(r,a){return t("el-radio",{key:a,attrs:{label:r.value}},[e._v(e._s(r.label))])})),1)};jt._withStripped=!0;const At=bt({render:jt,staticRenderFns:[]},void 0,Dt,void 0,!1,void 0,!1,void 0,void 0,void 0);const kt={name:"SelectWidget",props:{value:{default:function(){return""},type:[String,Number,Boolean]},enumOptions:{default:function(){return[]},type:[Array]}},computed:{selectList:{get:function(){return this.value},set:function(e){this.$emit("input",e)}}}};var Rt=function(){var e=this,r=e.$createElement,t=e._self._c||r;return t("el-select",e._b({model:{value:e.selectList,callback:function(r){e.selectList=r},expression:"selectList"}},"el-select",e.$attrs,!1),e._l(e.enumOptions,(function(e,r){return t("el-option",{key:r,attrs:{label:e.label,value:e.value}})})),1)};Rt._withStripped=!0;var Ct={CheckboxesWidget:$t,RadioWidget:At,SelectWidget:bt({render:Rt,staticRenderFns:[]},void 0,kt,void 0,!1,void 0,!1,void 0,void 0,void 0)};Object.entries(Ct).forEach((function(r){var t=y(r,2),a=t[0],o=t[1];return e.component(a,o)}));var It={types:{boolean:"el-switch",string:"el-input",number:"el-input-number",integer:"el-input-number"},common:{select:Ct.SelectWidget,radioGroup:Ct.RadioWidget,checkboxGroup:Ct.CheckboxesWidget}},Lt={name:"StringField",props:r,render:function(e){var r=this.$props,t=r.schema,a=r.uiSchema,o=sa(t)&&ca(t),s=ea({schema:t,uiSchema:a},(function(){var e="number"===t.type||"integer"===t.type;return{widget:o?It.common.select:e?It.types.number:It.types.string}}));return o&&(s.uiProps.enumOptions=o),e(St,{props:f(f({},this.$props),s)})}},Nt={name:"NumberField",props:r,render:function(e){return e(Lt,{props:this.$props,on:this.$listeners})}},Tt={name:"IntegerField",props:r,render:function(e){return e(Lt,{props:this.$props,on:this.$listeners})}},zt={name:"BooleanField",props:r,render:function(e){var r=this.$props,t=r.schema,a=r.uiSchema,o=ca({enum:t.enum||[!0,!1]}),s=ea({schema:t,uiSchema:a},(function(){return{widget:"el-switch"}}));return s.uiProps.enumOptions=o,e(St,{props:f(f({},this.$props),s)})}};function qt(e,r){if(Array.isArray(r))return Array.isArray(e)||(e=[]),r.map((function(r,t){return e[t]?qt(e[t],r):r}));if(x(r)){var t=Object.assign({},e);return Object.keys(r).reduce((function(t,a){return t[a]=qt(e?e[a]:{},r[a]),t}),t)}return r}function Vt(e,r,t){var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=arguments.length>4&&void 0!==arguments[4]&&arguments[4],s=x(e)?e:{},i=x(a)?a:{};"allOf"in s&&(s=ft(s,t,i));var n=r;if(x(n)&&x(s.default))n=j(n,s.default);else if("default"in s)n=s.default;else{if("$ref"in s){var l=S(s.$ref,t);return Vt(l,n,t,i,o)}if("dependencies"in s){var c=ut(s,t,i);return Vt(c,n,t,i,o)}if(ia(s))n=s.items.map((function(e,a){return Vt(e,Array.isArray(r)?r[a]:void 0,t,i,o)}));else if("oneOf"in s){var u=s.oneOf[lt(i,s.oneOf)];if(s.properties&&u.properties){var h=j(s,u);delete h.oneOf,s=h}else s=u}else if("anyOf"in s){var d=s.anyOf[lt(i,s.anyOf)];if(s.properties&&d.properties){var p=j(s,d);delete p.anyOf,s=p}else s=d}}switch(void 0===n&&(n=s.default),A(s)){case"null":return null;case"object":return Object.keys(s.properties||{}).reduce((function(e,r){var a=Vt(s.properties[r],(n||{})[r],t,(i||{})[r],o);return(o||void 0!==a)&&(e[r]=a),e}),{});case"array":if(Array.isArray(n)&&(n=n.map((function(e,r){return Vt(s.items[r]||s.additionalItems||{},e,t,{},o)}))),Array.isArray(a)&&(n=a.map((function(e,r){return Vt(s.items,(n||{})[r],t,e,{},o)}))),s.minItems){if(na(s,t))return n||[];var m=n?n.length:0;if(s.minItems>m){var f=n||[],v=Array.isArray(s.items)?s.additionalItems:s.items,y=O(new Array(s.minItems-m),Vt(v,v.defaults,t,{},o));return f.concat(y)}}n=void 0===n?[]:n}return n}function Ut(e,r){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];if(!x(e))throw new Error("Invalid schema: ".concat(e));var o=gt(e,t,r),s=Vt(o,e.default,t,r,a);return void 0===r?s:x(r)||Array.isArray(r)?qt(s,r):0===r||!1===r||""===r?r:r||s}var Qt={name:"ArrayOrderList",props:{vNodeList:{type:Array,default:[]},tupleItemsLength:{type:Number,default:0},addable:{type:Boolean,default:!0},sortable:{type:Boolean,default:!0},removable:{type:Boolean,default:!0},maxItems:{},minItems:{}},computed:{canAdd:function(){var e=this.$props,r=e.addable,t=e.maxItems,a=e.vNodeList;return!!r&&(void 0===t||a.lengtht)}},methods:{},render:function(e){var r=this;return this.vNodeList<=0&&!this.addable?null:e("div",{class:{arrayOrderList:!0}},this.vNodeList.map((function(t,a){var o=t.key,s=t.vNode,i=r.tupleItemsLength+a;return e("div",{key:o,class:{arrayOrderList_item:!0}},[e("div",{class:{arrayListItem_operateTool:!0}},[e("button",{style:f({},r.sortable?{}:{display:"none"}),attrs:{type:"button",disabled:!r.sortable||0===a},class:{arrayListItem_btn:!0,"arrayListItem_orderBtn-top":!0,"el-icon-caret-top":!0},on:{click:function(){r.$emit("onArrayOperate",{command:"moveUp",data:{index:i}})}}}),e("button",{style:f({},r.sortable?{}:{display:"none"}),attrs:{type:"button",disabled:!r.sortable||a===r.vNodeList.length-1},class:{arrayListItem_btn:!0,"arrayListItem_orderBtn-bottom":!0,"el-icon-caret-bottom":!0},on:{click:function(){r.$emit("onArrayOperate",{command:"moveDown",data:{index:i}})}}}),e("button",{style:f({},r.removable?{}:{display:"none"}),attrs:{type:"button",disabled:!r.canRemove},class:{arrayListItem_btn:!0,"arrayListItem_btn-delete":!0,"el-icon-close":!0},on:{click:function(){r.$emit("onArrayOperate",{command:"remove",data:{index:i}})}}})]),e("div",{class:{arrayListItem_content:!0}},[s])])})).concat([e("p",{style:f({},this.canAdd?{}:{display:"none"}),class:{arrayOrderList_bottomAddBtn:!0}},[e("el-button",{class:{bottomAddBtn:!0},props:{plain:!0,icon:"el-icon-plus"},on:{click:function(){r.$emit("onArrayOperate",{command:"add"})}}},[this.maxItems?"( ".concat(this.vNodeList.length," / ").concat(this.maxItems," )"):""])])]))}},Bt={name:"ArrayFieldNormal",props:f(f({},r),{},{itemsFormData:{type:Array}}),render:function(e){var r=this,t=this.$props,a=t.schema,o=t.uiSchema,i=t.errorSchema,n=Yt({schema:a,uiSchema:o}),l=n.title,c=n.description,u=n.addable,h=n.sortable,d=n.removable,p=n.showTitle,m=n.showDescription,v=this.itemsFormData.map((function(t,n){return{key:t.key,vNode:e(Ot,{key:t.key,props:f(f({},r.$props),{},{schema:a.items,required:![].concat(a.items.type).includes("null"),uiSchema:o.items,errorSchema:i.items,curNodePath:s(r.curNodePath,n)})})}}));return e(Et,{props:{title:l,description:c,showTitle:p,showDescription:m}},[e(Qt,{props:{vNodeList:v,addable:u,sortable:h,removable:d,maxItems:a.maxItems,minItems:a.minItems},on:this.$listeners})])}},Mt={name:"ArrayFieldMultiSelect",props:f(f({},r),{},{itemsFormData:{type:Array,default:function(){return[]}}}),render:function(e){var r=this,t=ea({schema:this.schema,uiSchema:this.schema},(function(){var e=ca(gt(r.schema.items,r.rootSchema,r.itemsFormData));return{widget:$t,enumOptions:e}}));return e(St,{props:f(f({},this.$props),t)})}},Kt={name:"ArrayFieldTuple",props:f(f({},r),{},{itemsFormData:{type:Array,default:function(){return[]}}}),created:function(){this.fixItemsFormData()},methods:{fixItemsFormData:function(){var e=!Array.isArray(this.itemsFormData);if(e||this.itemsFormData.lengtha?1:0].push(r),e}),[[],[]])),P=b[0].map((function(t,a){return e(Ot,{key:t.key,props:f(f({},r.$props),{},{required:![].concat(i.items[a].type).includes("null"),schema:i.items[a],uiSchema:n.items?n.items[a]:{},errorSchema:l.items?l.items[a]:{},curNodePath:s(r.curNodePath,a)})})})),w=b[1].map((function(t,a){return{key:t.key,vNode:e(Ot,{key:t.key,props:f(f({},r.$props),{},{schema:i.additionalItems,required:![].concat(i.additionalItems.type).includes("null"),uiSchema:n.additionalItems,errorSchema:l.additionalItems,curNodePath:s(r.curNodePath,a+i.items.length)})})}})),E=(void 0===d||d)&&la(this.schema);return e(Et,{props:{title:u,description:h,showTitle:v,showDescription:y}},[].concat(g(P),[e(Qt,{props:{vNodeList:w,tupleItemsLength:i.items.length,addable:E,sortable:p,removable:m,maxItems:i.maxItems,minItems:i.minItems},on:this.$listeners})]))}},Ht={name:"ArrayField",props:r,data:function(){return{formKeys:this.getCuFormData().map((function(){return I()}))}},computed:{itemsFormData:function(){var e=this.$data.formKeys;return this.curFormData.map((function(r,t){return{key:e[t],value:r}}))},curFormData:function(){return this.getCuFormData()}},watch:{curFormData:function(e,r){e!==r&&(this.formKeys=e.map((function(){return I()})))}},methods:{getCuFormData:function(){var e=this.$props;return l(e.rootFormData,e.curNodePath)},getNewFormDataRow:function(){var e=this.$props,r=e.schema,t=e.rootSchema,a=r.items;return ia(this.schema)&&la(this.schema)&&(a=r.additionalItems),Ut(a,void 0,t)},handleArrayOperate:function(e){var r=e.command,t=e.data,a={moveUp:function(e,r){!function(e,r){if(0===r)return!1;var t=[e[r],e[r-1]];e.splice.apply(e,[r-1,2].concat(t))}(e,r.index)},moveDown:function(e,r){!function(e,r){if(r===e.length-1)return!1;var t=e[r],a=[e[r+1],t];e.splice.apply(e,[r,2].concat(a))}(e,r.index)},remove:function(e,r){!function(e,r){e.splice(r,1).length}(e,r.index)},add:function(e,r){var t=r.newRowData;e.push(t)},batchPush:function(e,r){r.pushArray.forEach((function(r){e.push(r)}))},setNewTarget:function(e,r){n(r.formData,r.nodePath,r.newTarget)}}[r];if(!a)throw new Error("错误 - 未知的操作:[".concat(r,"]"));var o=t,s=t;"add"===r?(o={newRowData:this.getNewFormDataRow()},s={newRowData:I()}):"batchPush"===r?s={pushArray:o.pushArray.map((function(e){return I()}))}:"setNewTarget"===r&&(o={formData:this.rootFormData,nodePath:this.curNodePath,newTarget:o.newTarget},s={formData:this.$data,nodePath:"formKeys",newTarget:o.newTarget.map((function(e){return I()}))}),a.apply(this,[this.$data.formKeys,s]),a.apply(this,[this.curFormData,o])}},render:function(e){var r=this.$props,t=r.schema,a=r.rootSchema,o=r.rootFormData,s=r.curNodePath;if(!t.hasOwnProperty("items"))throw new Error("[".concat(t,"] 请先定义 items属性"));var i=Bt;return ia(t)?i=Kt:na(t,a)&&(i=Mt),e("div",[e(i,{props:f({itemsFormData:this.itemsFormData},this.$props),class:d({},N(i.name),!0),on:{onArrayOperate:this.handleArrayOperate}}),this.needValidFieldGroup?e(St,{class:{validateWidget:!0,"validateWidget-array":!0},props:{schema:Object.entries(this.$props.schema).reduce((function(e,r){var t=y(r,2),a=t[0],o=t[1];return"items"!==a&&(e[a]=o),e}),{}),errorSchema:this.errorSchema,curNodePath:s,rootFormData:o}}):null])}},Wt={name:"SelectLinkageField",props:f(f({},r),{},{combiningType:{type:String,default:"anyOf"},selectList:{type:Array,require:!0}}),data:function(){return{curSelectIndex:this.computedCurSelectIndexByFormData(l(this.rootFormData,this.curNodePath))}},methods:{computedCurSelectIndexByFormData:function(e){var r=lt(e,this.selectList,this.rootSchema);return 0!==r?r:this.curSelectIndex||0},getSelectBoxVnode:function(){var e=this,r=ea({schema:{},uiSchema:this.uiSchema["".concat(this.combiningType,"Select")]||{}},(function(){return{widget:"SelectWidget"}}));Object.assign(r,{label:r.label||this.schema.title,description:r.description||this.schema.description});var t=this.uiSchema[this.combiningType]||[];return r.uiProps.enumOptions=this.selectList.map((function(e,r){return{label:t[r]&&t[r]["ui:title"]||e.title||"选项 ".concat(r+1),value:r}})),this.$createElement(St,{class:d({},"fieldSelect_".concat(this.combiningType),!0),props:f({isFormData:!1,curValue:this.curSelectIndex},r),on:{onChange:function(r){e.curSelectIndex=r}}})}},watch:{curSelectIndex:function(e,r){var t=l(this.rootFormData,this.curNodePath);if("object"===$(t)){var a=gt(this.selectList[r],this.rootSchema,t);if("object"===a.type||a.properties)for(var o in a.properties)Object.prototype.hasOwnProperty.call(a.properties,o)&&i(t,o)}var s=Ut(this.selectList[e],void 0,this.rootSchema);"object"===$(s)?Object.entries(s).forEach((function(e){var r=y(e,2),a=r[0],o=r[1];n(t,a,o)})):n(this.rootFormData,this.curNodePath,s||t)}},render:function(e){var r,t=this,o=a(this.$props.curNodePath),s=null;if(("object"===this.schema.type||this.schema.properties)&&!function(e){for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r))return!1;return!0}(this.schema.properties)){var i,n=Object.assign({},this.schema);delete n[this.combiningType],s=e(Ot,{class:(i={},d(i,"".concat(this.combiningType,"_originBox"),!0),d(i,"".concat(o,"-originBox"),!0),i),props:f(f({},this.$props),{},{schema:n})})}var l=[this.getSelectBoxVnode()],c=this.selectList[this.curSelectIndex];if(c){delete(c=Object.assign({},this.schema,c))[this.combiningType];var u=L(Xt(this.uiSchema),(function(e){return e===t.combiningType?void 0:"ui:".concat(e)})),h=L(ra(this.errorSchema),(function(e){return e===t.combiningType?void 0:"err:".concat(e)}));l.push(e(Ot,{props:f(f({},this.$props),{},{schema:c,required:this.required,uiSchema:f(f({"ui:showTitle":!1,"ui:showDescription":!1},u),(this.uiSchema[this.combiningType]||[])[this.curSelectIndex]),errorSchema:f(f({},h),(this.errorSchema[this.combiningType]||[])[this.curSelectIndex])})}))}return l.push(e(St,{class:d({validateWidget:!0},"validateWidget-".concat(this.combiningType),!0),props:{schema:this.schema,errorSchema:this.errorSchema,curNodePath:this.curNodePath,rootFormData:this.rootFormData}})),e("div",[s,e("div",{class:(r={appendCombining_box:!0},d(r,"".concat(this.combiningType,"_appendBox"),!0),d(r,"".concat(o,"-appendBox"),!0),r)},[l])])}},Jt={array:Ht,boolean:zt,integer:Tt,number:Nt,object:Ft,string:Lt,null:{render:function(){return null}},anyOf:{name:"AnyOfField",functional:!0,render:function(e,r){var t=r.data,a=t.props,o=v(t,["props"]);return e(Wt,f(f({},o),{},{props:f(f({},a),{},{combiningType:"anyOf",selectList:a.schema.anyOf})}),r.children)}},oneOf:{name:"oneOfField",functional:!0,render:function(e,r){var t=r.data,a=t.props,o=v(t,["props"]);return e(Wt,f(f({},o),{},{props:f(f({},a),{},{combiningType:"oneOf",selectList:a.schema.oneOf})}),r.children)}}};function Gt(e){var r=e.schema,t=void 0===r?{}:r,a=e.uiSchema,o=void 0===a?{}:a,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){};return o["ui:widget"]?{widget:o["ui:widget"]}:s({schema:t,uiSchema:o})}function Zt(e){var r=e.schema,t=void 0===r?{}:r,a=e.uiSchema,o=(void 0===a?{}:a)["ui:field"];if("function"==typeof o||"object"===h(o))return o;if("string"==typeof o)return o;var s=Jt[A(t)];if(s)return s;if(!s&&(t.anyOf||t.oneOf))return null;throw new Error("不支持的field类型 ".concat(t.type))}function Xt(e){return Object.keys(e).filter((function(e){return 0===e.indexOf("ui:")})).reduce((function(r,t){var a=e[t];return"ui:options"===t&&x(a)?f(f({},r),a):f(f({},r),{},d({},t.substring(3),a))}),{})}function Yt(e){var r=e.schema,t=e.uiSchema,a={};return void 0!==r.multipleOf&&(a.step=r.multipleOf),(r.minimum||0===r.minimum)&&(a.min=r.minimum),(r.maximum||0===r.maximum)&&(a.max=r.maximum),f(f({title:r.title,description:r.description,hidden:"HiddenWidget"===t["ui:widget"]},a),Xt(t))}function ea(e){var r=e.schema,t=e.uiSchema,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},o=f(f({},Yt({schema:r,uiSchema:t})),Gt({schema:r,uiSchema:t},a)),s=o.widget,i=o.title,n=o.labelWidth,l=o.description,c=o.attrs,u=o.emptyValue,h=v(o,["widget","title","labelWidth","description","attrs","emptyValue"]);return{widget:s,label:i,labelWidth:n,description:l,attrs:c,emptyValue:u,uiProps:h}}function ra(e){return Object.keys(e).filter((function(e){return 0===e.indexOf("err:")})).reduce((function(r,t){var a=e[t];return"err:options"===t&&x(a)?f(f({},r),a):f(f({},r),{},d({},t.substring(4),a))}),{})}function ta(e,r){if(!Array.isArray(r))return e;var t,a=function(e){return e.reduce((function(e,r){return e[r]=!0,e}),{})},o=a(e),s=r.filter((function(e){return"*"===e||o[e]})),i=a(s),n=e.filter((function(e){return!i[e]})),l=s.indexOf("*");if(-1===l){if(n.length)throw new Error("uiSchema order list does not contain ".concat((t=n).length>1?"properties '".concat(t.join("', '"),"'"):"property '".concat(t[0],"'")));return s}if(l!==s.lastIndexOf("*"))throw new Error("uiSchema order list contains more than one wildcard item");var c=g(s);return c.splice.apply(c,[l,1].concat(g(n))),c}function aa(e){return Array.isArray(e.enum)&&1===e.enum.length||e.hasOwnProperty("const")}function oa(e){if(Array.isArray(e.enum)&&1===e.enum.length)return e.enum[0];if(e.hasOwnProperty("const"))return e.const;throw new Error("schema cannot be inferred as a constant")}function sa(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=gt(e,r),a=t.oneOf||t.anyOf;return!!Array.isArray(t.enum)||!!Array.isArray(a)&&a.every((function(e){return aa(e)}))}function ia(e){return Array.isArray(e.items)&&e.items.length>0&&e.items.every((function(e){return x(e)}))}function na(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return!(!e.uniqueItems||!e.items)&&sa(e.items,r)}function la(e){return e.additionalItems,x(e.additionalItems)}function ca(e){return e.enum?e.enum.map((function(r,t){return{label:e.enumNames&&e.enumNames[t]||String(r),value:r}})):(e.oneOf||e.anyOf).map((function(e,r){var t=oa(e);return{label:e.title||String(t),value:t}}))}var ua=Object.freeze({__proto__:null,getUiWidget:Gt,getUiField:Zt,getUserUiOptions:Xt,getUiOptions:Yt,getWidgetConfig:ea,getUserErrOptions:ra,orderProperties:ta,isConstant:aa,toConstant:oa,isSelect:sa,isFixedItems:ia,isMultiSelect:na,allowAdditionalItems:la,optionsList:ca}),ha={formFooter:{type:Object,default:function(){return{show:!0,okBtn:"保存",cancelBtn:"取消"}}},value:{type:null,default:function(){return{}},required:!0},formProps:{type:Object,default:function(){return{}}},schema:{type:Object,default:function(){return{}},required:!0},uiSchema:{type:Object,default:function(){return{}}},customFormats:{type:Object,default:function(){return{}}},extraErrors:{type:Object,default:function(){return{}}},errorSchema:{type:Object,default:function(){return{}}}},da={name:"FormFooter",props:{okBtn:{type:String,default:"保存"},cancelBtn:{type:String,default:"取消"}}};const pa="undefined"!=typeof navigator&&/msie [6-9]\\b/.test(navigator.userAgent.toLowerCase());function ma(e){return(e,r)=>function(e,r){const t=pa?r.media||"default":e,a=va[t]||(va[t]={ids:new Set,styles:[]});if(!a.ids.has(e)){a.ids.add(e);let t=r.source;if(r.map&&(t+="\n/*# sourceURL="+r.map.sources[0]+" */",t+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(r.map))))+" */"),a.element||(a.element=document.createElement("style"),a.element.type="text/css",r.media&&a.element.setAttribute("media",r.media),void 0===fa&&(fa=document.head||document.getElementsByTagName("head")[0]),fa.appendChild(a.element)),"styleSheet"in a.element)a.styles.push(t),a.element.styleSheet.cssText=a.styles.filter(Boolean).join("\n");else{const e=a.ids.size-1,r=document.createTextNode(t),o=a.element.childNodes;o[e]&&a.element.removeChild(o[e]),o.length?a.element.insertBefore(r,o[e]):a.element.appendChild(r)}}}(e,r)}let fa;const va={};const ya=da;var ga=function(){var e=this,r=e.$createElement,t=e._self._c||r;return t("el-form-item",{class:e.$style.item},[t("el-button",{attrs:{size:"small"},on:{click:function(r){return e.$emit("onCancel")}}},[e._v(e._s(e.cancelBtn))]),e._v(" "),t("el-button",{attrs:{size:"small",type:"primary"},on:{click:function(r){return e.$emit("onSubmit")}}},[e._v(e._s(e.okBtn))])],1)};ga._withStripped=!0;const ba=bt({render:ga,staticRenderFns:[]},(function(e){e&&(e("data-v-431cede5_0",{source:"\n.src-JsonSchemaForm-item-e4q8 {\n text-align: right;\n border-top: 1px solid rgba(0, 0, 0, 0.08);\n padding-top: 10px;\n}\n",map:{version:3,sources:["/Users/ryuushun/liujun/git/vue-element-schema-form/packages/lib/src/JsonSchemaForm/FormFooter.vue"],names:[],mappings:";AAwBA;IACA,iBAAA;IACA,yCAAA;IACA,iBAAA;AACA",file:"FormFooter.vue",sourcesContent:['\n\n\n\n\n"]}, media: undefined }); - Object.defineProperty(this, "$style", { value: {"item":"src-JsonSchemaForm-item-e4q8"} }); + inject("data-v-25c5ccb1_0", { source: "\n.src-JsonSchemaForm-item-1UFV {\n text-align: right;\n border-top: 1px solid rgba(0, 0, 0, 0.08);\n padding-top: 10px;\n}\n", map: {"version":3,"sources":["D:\\code\\git_my\\vue-json-schema-form\\packages\\lib\\src\\JsonSchemaForm\\FormFooter.vue"],"names":[],"mappings":";AAwBA;IACA,iBAAA;IACA,yCAAA;IACA,iBAAA;AACA","file":"FormFooter.vue","sourcesContent":["\r\n\r\n\r\n\r\n\r\n"]}, media: undefined }); + Object.defineProperty(this, "$style", { value: {"item":"src-JsonSchemaForm-item-1UFV"} }); }; /* scoped */ @@ -11265,8 +11265,8 @@ } }; - /** - * Created by Liu.Jun on 2019/11/29 11:25. + /** + * Created by Liu.Jun on 2019/11/29 11:25. */ if (typeof window !== 'undefined' && window.Vue) { diff --git a/packages/lib/dist/vueJsonSchemaForm.umd.min.js b/packages/lib/dist/vueJsonSchemaForm.umd.min.js index 82b8dd74..383b5e2a 100644 --- a/packages/lib/dist/vueJsonSchemaForm.umd.min.js +++ b/packages/lib/dist/vueJsonSchemaForm.umd.min.js @@ -1,4 +1,4 @@ /** @license @lljj/vue-json-schema-form (c) 2020-2020 Liu.Jun License: Apache-2.0 */ -!function(e,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports,require("vue")):"function"==typeof define&&define.amd?define(["exports","vue"],r):r((e=e||self).vueJsonSchemaForm={},e.Vue)}(this,(function(e,r){"use strict";r=r&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r;var t={schema:{type:Object,default:function(){return{}}},uiSchema:{type:Object,default:function(){return{}}},errorSchema:{type:Object,default:function(){return{}}},customFormats:{type:Object,default:function(){return{}}},rootSchema:{type:Object,default:function(){return{}}},rootFormData:{type:null,default:function(){return{}}},curNodePath:{type:String,default:""},required:{type:Boolean,default:!1},needValidFieldGroup:{type:Boolean,default:!0}};var a={$$currentLocalizeFn:function(e){if(e&&e.length)for(var r=0;r=0||(o[t]=e[t]);return o}(e,r);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}function g(e,r){return function(e){if(Array.isArray(e))return e}(e)||function(e,r){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var t=[],a=!0,o=!1,s=void 0;try{for(var i,n=e[Symbol.iterator]();!(a=(i=n.next()).done)&&(t.push(i.value),!r||t.length!==r);a=!0);}catch(e){o=!0,s=e}finally{try{a||null==n.return||n.return()}finally{if(o)throw s}}return t}(e,r)||P(e,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function b(e){return function(e){if(Array.isArray(e))return w(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||P(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function P(e,r){if(e){if("string"==typeof e)return w(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?w(e,r):void 0}}function w(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,a=new Array(r);t1&&void 0!==arguments[1]?arguments[1]:{},t=e;if(!e.startsWith("#"))throw new Error("Could not find a definition for ".concat(t,"."));var a=S(r,e=decodeURIComponent(e.substring(1)));if(void 0===a)throw new Error("Could not find a definition for ".concat(t,"."));return a.hasOwnProperty("$ref")?O(a.$ref,r):a}function F(e,r){return e.fill(null).map((function(){return JSON.parse(JSON.stringify(r))}))}function x(e,r){return e.filter((function(e){return r.includes(e)}))}function _(e){return!("undefined"!=typeof File&&e instanceof File)&&("object"===d(e)&&null!==e&&!Array.isArray(e))}function $(e){return"[object Arguments]"===Object.prototype.toString.call(e)}var D=function(e){return Array.isArray(e)?"array":"string"==typeof e?"string":null==e?"null":"boolean"==typeof e?"boolean":isNaN(e)?"object"===d(e)?"object":"string":"number"};function j(e,r){var t=Object.assign({},e);return Object.keys(r).reduce((function(t,a){var o,s=e?e[a]:{},i=r[a];return e&&e.hasOwnProperty(a)&&_(i)?t[a]=j(s,i):e&&r&&("object"===k(e)||"object"===k(r))&&"required"===a&&Array.isArray(s)&&Array.isArray(i)?t[a]=(o=i,b(new Set([].concat(b(s),b(o))))):t[a]=i,t}),t)}function A(e,r){var t=arguments.length>2&&void 0!==arguments[2]&&arguments[2],a=Object.assign({},e);return Object.keys(r).reduce((function(a,o){var s=e?e[o]:{},i=r[o];return e&&e.hasOwnProperty(o)&&_(i)?a[o]=A(s,i,t):t&&Array.isArray(s)&&Array.isArray(i)?a[o]=s.concat(i):a[o]=i,a}),a)}function k(e){var r=e.type;return!r&&e.const?D(e.const):!r&&e.enum?"string":r||!e.properties&&!e.additionalProperties?r instanceof Array&&2===r.length&&r.includes("null")?r.find((function(e){return"null"!==e})):r:"object"}function R(e,r){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];if(e===r)return!0;if("function"==typeof e||"function"==typeof r)return!0;if("object"!==d(e)||"object"!==d(r))return!1;if(null===e||null===r)return!1;if(e instanceof Date&&r instanceof Date)return e.getTime()===r.getTime();if(e instanceof RegExp&&r instanceof RegExp)return e.source===r.source&&e.global===r.global&&e.multiline===r.multiline&&e.lastIndex===r.lastIndex&&e.ignoreCase===r.ignoreCase;if($(e)||$(r)){if(!$(e)||!$(r))return!1;var o=Array.prototype.slice;return R(o.call(e),o.call(r),t,a)}if(e.constructor!==r.constructor)return!1;var s=Object.keys(e),i=Object.keys(r);if(0===s.length&&0===i.length)return!0;if(s.length!==i.length)return!1;for(var n,l=t.length;l--;)if(t[l]===e)return a[l]===r;t.push(e),a.push(r),s.sort(),i.sort();for(var c=s.length-1;c>=0;c--)if(s[c]!==i[c])return!1;for(var u=s.length-1;u>=0;u--)if(!R(e[n=s[u]],r[n],t,a))return!1;return t.pop(),a.pop(),!0}var C,I,L=(C="".concat(+new Date),I=0,function(){var e="".concat(+new Date);return e===C?I+=1:I=0,"".concat(C=e,"x").concat(I)});function N(e,r){return Object.entries(e).reduce((function(e,t){var a=g(t,2),o=a[0],s=a[1],i=r(o,s);return void 0!==i&&(e[i]=s),e}),{})}function T(e){return void 0===e?e:String(e).replace(/^./,(function(e){return e.toLocaleLowerCase()}))}function z(e,r){return e*r/function e(r,t){return 0===t?r:e(t,r%t)}(e,r)}"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;function q(e,r){return e(r={exports:{}},r.exports),r.exports}function V(e){return e&&e.default||e}var U,Q=q((function(e,r){ +!function(e,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports,require("vue")):"function"==typeof define&&define.amd?define(["exports","vue"],r):r((e=e||self).vueJsonSchemaForm={},e.Vue)}(this,(function(e,r){"use strict";r=r&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r;var t={schema:{type:Object,default:function(){return{}}},uiSchema:{type:Object,default:function(){return{}}},errorSchema:{type:Object,default:function(){return{}}},customFormats:{type:Object,default:function(){return{}}},rootSchema:{type:Object,default:function(){return{}}},rootFormData:{type:null,default:function(){return{}}},curNodePath:{type:String,default:""},required:{type:Boolean,default:!1},needValidFieldGroup:{type:Boolean,default:!0}};var a={$$currentLocalizeFn:function(e){if(e&&e.length)for(var r=0;r=0||(o[t]=e[t]);return o}(e,r);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}function g(e,r){return function(e){if(Array.isArray(e))return e}(e)||function(e,r){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var t=[],a=!0,o=!1,s=void 0;try{for(var i,n=e[Symbol.iterator]();!(a=(i=n.next()).done)&&(t.push(i.value),!r||t.length!==r);a=!0);}catch(e){o=!0,s=e}finally{try{a||null==n.return||n.return()}finally{if(o)throw s}}return t}(e,r)||P(e,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function b(e){return function(e){if(Array.isArray(e))return w(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||P(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function P(e,r){if(e){if("string"==typeof e)return w(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?w(e,r):void 0}}function w(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,a=new Array(r);t1&&void 0!==arguments[1]?arguments[1]:{},t=e;if(!e.startsWith("#"))throw new Error("Could not find a definition for ".concat(t,"."));var a=S(r,e=decodeURIComponent(e.substring(1)));if(void 0===a)throw new Error("Could not find a definition for ".concat(t,"."));return a.hasOwnProperty("$ref")?F(a.$ref,r):a}function O(e,r){return e.fill(null).map((function(){return JSON.parse(JSON.stringify(r))}))}function x(e,r){return e.filter((function(e){return r.includes(e)}))}function _(e){return!("undefined"!=typeof File&&e instanceof File)&&("object"===d(e)&&null!==e&&!Array.isArray(e))}function $(e){return"[object Arguments]"===Object.prototype.toString.call(e)}var D=function(e){return Array.isArray(e)?"array":"string"==typeof e?"string":null==e?"null":"boolean"==typeof e?"boolean":isNaN(e)?"object"===d(e)?"object":"string":"number"};function j(e,r){var t=Object.assign({},e);return Object.keys(r).reduce((function(t,a){var o,s=e?e[a]:{},i=r[a];return e&&e.hasOwnProperty(a)&&_(i)?t[a]=j(s,i):e&&r&&("object"===k(e)||"object"===k(r))&&"required"===a&&Array.isArray(s)&&Array.isArray(i)?t[a]=(o=i,b(new Set([].concat(b(s),b(o))))):t[a]=i,t}),t)}function A(e,r){var t=arguments.length>2&&void 0!==arguments[2]&&arguments[2],a=Object.assign({},e);return Object.keys(r).reduce((function(a,o){var s=e?e[o]:{},i=r[o];return e&&e.hasOwnProperty(o)&&_(i)?a[o]=A(s,i,t):t&&Array.isArray(s)&&Array.isArray(i)?a[o]=s.concat(i):a[o]=i,a}),a)}function k(e){var r=e.type;return!r&&e.const?D(e.const):!r&&e.enum?"string":r||!e.properties&&!e.additionalProperties?r instanceof Array&&2===r.length&&r.includes("null")?r.find((function(e){return"null"!==e})):r:"object"}function R(e,r){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];if(e===r)return!0;if("function"==typeof e||"function"==typeof r)return!0;if("object"!==d(e)||"object"!==d(r))return!1;if(null===e||null===r)return!1;if(e instanceof Date&&r instanceof Date)return e.getTime()===r.getTime();if(e instanceof RegExp&&r instanceof RegExp)return e.source===r.source&&e.global===r.global&&e.multiline===r.multiline&&e.lastIndex===r.lastIndex&&e.ignoreCase===r.ignoreCase;if($(e)||$(r)){if(!$(e)||!$(r))return!1;var o=Array.prototype.slice;return R(o.call(e),o.call(r),t,a)}if(e.constructor!==r.constructor)return!1;var s=Object.keys(e),i=Object.keys(r);if(0===s.length&&0===i.length)return!0;if(s.length!==i.length)return!1;for(var n,l=t.length;l--;)if(t[l]===e)return a[l]===r;t.push(e),a.push(r),s.sort(),i.sort();for(var c=s.length-1;c>=0;c--)if(s[c]!==i[c])return!1;for(var u=s.length-1;u>=0;u--)if(!R(e[n=s[u]],r[n],t,a))return!1;return t.pop(),a.pop(),!0}var C,I,L=(C="".concat(+new Date),I=0,function(){var e="".concat(+new Date);return e===C?I+=1:I=0,"".concat(C=e,"x").concat(I)});function N(e,r){return Object.entries(e).reduce((function(e,t){var a=g(t,2),o=a[0],s=a[1],i=r(o,s);return void 0!==i&&(e[i]=s),e}),{})}function T(e){return void 0===e?e:String(e).replace(/^./,(function(e){return e.toLocaleLowerCase()}))}function z(e,r){return e*r/function e(r,t){return 0===t?r:e(t,r%t)}(e,r)}"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;function q(e,r){return e(r={exports:{}},r.exports),r.exports}function V(e){return e&&e.default||e}var U,Q=q((function(e,r){ /** @license URI.js v4.2.1 (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js */ -!function(e){function r(){for(var e=arguments.length,r=Array(e),t=0;t1){r[0]=r[0].slice(0,-1);for(var a=r.length-1,o=1;o= 0x80 (not a basic code point)","invalid-input":"Invalid input"},m=Math.floor,f=String.fromCharCode;function v(e){throw new RangeError(p[e])}function y(e,r){var t=e.split("@"),a="";t.length>1&&(a=t[0]+"@",e=t[1]);var o=function(e,r){for(var t=[],a=e.length;a--;)t[a]=r(e[a]);return t}((e=e.replace(d,".")).split("."),r).join(".");return a+o}function g(e){for(var r=[],t=0,a=e.length;t=55296&&o<=56319&&t>1,e+=m(e/r);e>455;a+=36)e=m(e/35);return m(a+36*e/(e+38))},w=function(e){var r,t=[],a=e.length,o=0,s=128,i=72,n=e.lastIndexOf("-");n<0&&(n=0);for(var l=0;l=128&&v("not-basic"),t.push(e.charCodeAt(l));for(var u=n>0?n+1:0;u=a&&v("invalid-input");var f=(r=e.charCodeAt(u++))-48<10?r-22:r-65<26?r-65:r-97<26?r-97:36;(f>=36||f>m((c-o)/d))&&v("overflow"),o+=f*d;var y=p<=i?1:p>=i+26?26:p-i;if(fm(c/g)&&v("overflow"),d*=g}var b=t.length+1;i=P(o-h,b,0==h),m(o/b)>c-s&&v("overflow"),s+=m(o/b),o%=b,t.splice(o++,0,s)}return String.fromCodePoint.apply(String,t)},E=function(e){var r=[],t=(e=g(e)).length,a=128,o=0,s=72,i=!0,n=!1,l=void 0;try{for(var u,h=e[Symbol.iterator]();!(i=(u=h.next()).done);i=!0){var d=u.value;d<128&&r.push(f(d))}}catch(e){n=!0,l=e}finally{try{!i&&h.return&&h.return()}finally{if(n)throw l}}var p=r.length,y=p;for(p&&r.push("-");y=a&&_m((c-o)/$)&&v("overflow"),o+=(w-a)*$,a=w;var D=!0,j=!1,A=void 0;try{for(var k,R=e[Symbol.iterator]();!(D=(k=R.next()).done);D=!0){var C=k.value;if(Cc&&v("overflow"),C==a){for(var I=o,L=36;;L+=36){var N=L<=s?1:L>=s+26?26:L-s;if(I>6|192).toString(16).toUpperCase()+"%"+(63&r|128).toString(16).toUpperCase():"%"+(r>>12|224).toString(16).toUpperCase()+"%"+(r>>6&63|128).toString(16).toUpperCase()+"%"+(63&r|128).toString(16).toUpperCase()}function _(e){for(var r="",t=0,a=e.length;t=194&&o<224){if(a-t>=6){var s=parseInt(e.substr(t+4,2),16);r+=String.fromCharCode((31&o)<<6|63&s)}else r+=e.substr(t,6);t+=6}else if(o>=224){if(a-t>=9){var i=parseInt(e.substr(t+4,2),16),n=parseInt(e.substr(t+7,2),16);r+=String.fromCharCode((15&o)<<12|(63&i)<<6|63&n)}else r+=e.substr(t,9);t+=9}else r+=e.substr(t,3),t+=3}return r}function $(e,r){function t(e){var t=_(e);return t.match(r.UNRESERVED)?t:e}return e.scheme&&(e.scheme=String(e.scheme).replace(r.PCT_ENCODED,t).toLowerCase().replace(r.NOT_SCHEME,"")),void 0!==e.userinfo&&(e.userinfo=String(e.userinfo).replace(r.PCT_ENCODED,t).replace(r.NOT_USERINFO,x).replace(r.PCT_ENCODED,o)),void 0!==e.host&&(e.host=String(e.host).replace(r.PCT_ENCODED,t).toLowerCase().replace(r.NOT_HOST,x).replace(r.PCT_ENCODED,o)),void 0!==e.path&&(e.path=String(e.path).replace(r.PCT_ENCODED,t).replace(e.scheme?r.NOT_PATH:r.NOT_PATH_NOSCHEME,x).replace(r.PCT_ENCODED,o)),void 0!==e.query&&(e.query=String(e.query).replace(r.PCT_ENCODED,t).replace(r.NOT_QUERY,x).replace(r.PCT_ENCODED,o)),void 0!==e.fragment&&(e.fragment=String(e.fragment).replace(r.PCT_ENCODED,t).replace(r.NOT_FRAGMENT,x).replace(r.PCT_ENCODED,o)),e}function D(e){return e.replace(/^0*(.*)/,"$1")||"0"}function j(e,r){var t=e.match(r.IPV4ADDRESS)||[],a=l(t,2)[1];return a?a.split(".").map(D).join("."):e}function A(e,r){var t=e.match(r.IPV6ADDRESS)||[],a=l(t,3),o=a[1],s=a[2];if(o){for(var i=o.toLowerCase().split("::").reverse(),n=l(i,2),c=n[0],u=n[1],h=u?u.split(":").map(D):[],d=c.split(":").map(D),p=r.IPV4ADDRESS.test(d[d.length-1]),m=p?7:8,f=d.length-m,v=Array(m),y=0;y1){var P=v.slice(0,g.index),w=v.slice(g.index+g.length);b=P.join(":")+"::"+w.join(":")}else b=v.join(":");return s&&(b+="%"+s),b}return e}var k=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,R=void 0==="".match(/(){0}/)[1];function C(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t={},a=!1!==r.iri?n:i;"suffix"===r.reference&&(e=(r.scheme?r.scheme+":":"")+"//"+e);var o=e.match(k);if(o){R?(t.scheme=o[1],t.userinfo=o[3],t.host=o[4],t.port=parseInt(o[5],10),t.path=o[6]||"",t.query=o[7],t.fragment=o[8],isNaN(t.port)&&(t.port=o[5])):(t.scheme=o[1]||void 0,t.userinfo=-1!==e.indexOf("@")?o[3]:void 0,t.host=-1!==e.indexOf("//")?o[4]:void 0,t.port=parseInt(o[5],10),t.path=o[6]||"",t.query=-1!==e.indexOf("?")?o[7]:void 0,t.fragment=-1!==e.indexOf("#")?o[8]:void 0,isNaN(t.port)&&(t.port=e.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?o[4]:void 0)),t.host&&(t.host=A(j(t.host,a),a)),void 0!==t.scheme||void 0!==t.userinfo||void 0!==t.host||void 0!==t.port||t.path||void 0!==t.query?void 0===t.scheme?t.reference="relative":void 0===t.fragment?t.reference="absolute":t.reference="uri":t.reference="same-document",r.reference&&"suffix"!==r.reference&&r.reference!==t.reference&&(t.error=t.error||"URI is not a "+r.reference+" reference.");var s=F[(r.scheme||t.scheme||"").toLowerCase()];if(r.unicodeSupport||s&&s.unicodeSupport)$(t,a);else{if(t.host&&(r.domainHost||s&&s.domainHost))try{t.host=S(t.host.replace(a.PCT_ENCODED,_).toLowerCase())}catch(e){t.error=t.error||"Host's domain name can not be converted to ASCII via punycode: "+e}$(t,i)}s&&s.parse&&s.parse(t,r)}else t.error=t.error||"URI can not be parsed.";return t}function I(e,r){var t=!1!==r.iri?n:i,a=[];return void 0!==e.userinfo&&(a.push(e.userinfo),a.push("@")),void 0!==e.host&&a.push(A(j(String(e.host),t),t).replace(t.IPV6ADDRESS,(function(e,r,t){return"["+r+(t?"%25"+t:"")+"]"}))),"number"==typeof e.port&&(a.push(":"),a.push(e.port.toString(10))),a.length?a.join(""):void 0}var L=/^\.\.?\//,N=/^\/\.(\/|$)/,T=/^\/\.\.(\/|$)/,z=/^\/?(?:.|\n)*?(?=\/|$)/;function q(e){for(var r=[];e.length;)if(e.match(L))e=e.replace(L,"");else if(e.match(N))e=e.replace(N,"/");else if(e.match(T))e=e.replace(T,"/"),r.pop();else if("."===e||".."===e)e="";else{var t=e.match(z);if(!t)throw new Error("Unexpected dot segment condition");var a=t[0];e=e.slice(a.length),r.push(a)}return r.join("")}function V(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=r.iri?n:i,a=[],o=F[(r.scheme||e.scheme||"").toLowerCase()];if(o&&o.serialize&&o.serialize(e,r),e.host)if(t.IPV6ADDRESS.test(e.host));else if(r.domainHost||o&&o.domainHost)try{e.host=r.iri?O(e.host):S(e.host.replace(t.PCT_ENCODED,_).toLowerCase())}catch(t){e.error=e.error||"Host's domain name can not be converted to "+(r.iri?"Unicode":"ASCII")+" via punycode: "+t}$(e,t),"suffix"!==r.reference&&e.scheme&&(a.push(e.scheme),a.push(":"));var s=I(e,r);if(void 0!==s&&("suffix"!==r.reference&&a.push("//"),a.push(s),e.path&&"/"!==e.path.charAt(0)&&a.push("/")),void 0!==e.path){var l=e.path;r.absolutePath||o&&o.absolutePath||(l=q(l)),void 0===s&&(l=l.replace(/^\/\//,"/%2F")),a.push(l)}return void 0!==e.query&&(a.push("?"),a.push(e.query)),void 0!==e.fragment&&(a.push("#"),a.push(e.fragment)),a.join("")}function U(e,r){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=arguments[3],o={};return a||(e=C(V(e,t),t),r=C(V(r,t),t)),!(t=t||{}).tolerant&&r.scheme?(o.scheme=r.scheme,o.userinfo=r.userinfo,o.host=r.host,o.port=r.port,o.path=q(r.path||""),o.query=r.query):(void 0!==r.userinfo||void 0!==r.host||void 0!==r.port?(o.userinfo=r.userinfo,o.host=r.host,o.port=r.port,o.path=q(r.path||""),o.query=r.query):(r.path?("/"===r.path.charAt(0)?o.path=q(r.path):(void 0===e.userinfo&&void 0===e.host&&void 0===e.port||e.path?e.path?o.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+r.path:o.path=r.path:o.path="/"+r.path,o.path=q(o.path)),o.query=r.query):(o.path=e.path,void 0!==r.query?o.query=r.query:o.query=e.query),o.userinfo=e.userinfo,o.host=e.host,o.port=e.port),o.scheme=e.scheme),o.fragment=r.fragment,o}function Q(e,r){return e&&e.toString().replace(r&&r.iri?n.PCT_ENCODED:i.PCT_ENCODED,_)}var B={scheme:"http",domainHost:!0,parse:function(e,r){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e},serialize:function(e,r){return e.port!==("https"!==String(e.scheme).toLowerCase()?80:443)&&""!==e.port||(e.port=void 0),e.path||(e.path="/"),e}},M={scheme:"https",domainHost:B.domainHost,parse:B.parse,serialize:B.serialize},K={},H="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",W="[0-9A-Fa-f]",J=t(t("%[EFef]"+W+"%"+W+W+"%"+W+W)+"|"+t("%[89A-Fa-f]"+W+"%"+W+W)+"|"+t("%"+W+W)),G=r("[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",'[\\"\\\\]'),Z=new RegExp(H,"g"),X=new RegExp(J,"g"),Y=new RegExp(r("[^]","[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]","[\\.]",'[\\"]',G),"g"),ee=new RegExp(r("[^]",H,"[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]"),"g"),re=ee;function te(e){var r=_(e);return r.match(Z)?r:e}var ae={scheme:"mailto",parse:function(e,r){var t=e,a=t.to=t.path?t.path.split(","):[];if(t.path=void 0,t.query){for(var o=!1,s={},i=t.query.split("&"),n=0,l=i.length;n=55296&&r<=56319&&o=r)throw new Error("Cannot access property/index "+a+" levels up, current level is "+r);return t[r-a]}if(a>r)throw new Error("Cannot access data "+a+" levels up, current level is "+r);if(s="data"+(r-a||""),!o)return s}for(var n=s,l=o.split("/"),c=0;c=0?{index:a,compiling:!0}:(a=this._compilations.length,this._compilations[a]={schema:e,root:r,baseId:t},{index:a,compiling:!1})}function Te(e,r,t){var a=ze.call(this,e,r,t);a>=0&&this._compilations.splice(a,1)}function ze(e,r,t){for(var a=0;a%\\^`{|}]|%[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,Xe=/^(?:(?:http[s\u017F]?|ftp):\/\/)(?:(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+(?::(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?@)?(?:(?!10(?:\.[0-9]{1,3}){3})(?!127(?:\.[0-9]{1,3}){3})(?!169\.254(?:\.[0-9]{1,3}){2})(?!192\.168(?:\.[0-9]{1,3}){2})(?!172\.(?:1[6-9]|2[0-9]|3[01])(?:\.[0-9]{1,3}){2})(?:[1-9][0-9]?|1[0-9][0-9]|2[01][0-9]|22[0-3])(?:\.(?:1?[0-9]{1,2}|2[0-4][0-9]|25[0-5])){2}(?:\.(?:[1-9][0-9]?|1[0-9][0-9]|2[0-4][0-9]|25[0-4]))|(?:(?:(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-?)*(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)(?:\.(?:(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-?)*(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)*(?:\.(?:(?:[KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]){2,})))(?::[0-9]{2,5})?(?:\/(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?$/i,Ye=/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,er=/^(?:\/(?:[^~/]|~0|~1)*)*$/,rr=/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,tr=/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,ar=or;function or(e){return e="full"==e?"full":"fast",M.copy(or[e])}function sr(e){var r=e.match(Ke);if(!r)return!1;var t=+r[1],a=+r[2],o=+r[3];return a>=1&&a<=12&&o>=1&&o<=(2==a&&function(e){return e%4==0&&(e%100!=0||e%400==0)}(t)?29:He[a])}function ir(e,r){var t=e.match(We);if(!t)return!1;var a=t[1],o=t[2],s=t[3],i=t[5];return(a<=23&&o<=59&&s<=59||23==a&&59==o&&60==s)&&(!r||i)}or.fast={date:/^\d\d\d\d-[0-1]\d-[0-3]\d$/,time:/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,"date-time":/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,uri:/^(?:[a-z][a-z0-9+-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,"uri-template":Ze,url:Xe,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i,hostname:Je,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,regex:ur,uuid:Ye,"json-pointer":er,"json-pointer-uri-fragment":rr,"relative-json-pointer":tr},or.full={date:sr,time:ir,"date-time":function(e){var r=e.split(nr);return 2==r.length&&sr(r[0])&&ir(r[1],!0)},uri:function(e){return lr.test(e)&&Ge.test(e)},"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":Ze,url:Xe,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:Je,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,regex:ur,uuid:Ye,"json-pointer":er,"json-pointer-uri-fragment":rr,"relative-json-pointer":tr};var nr=/t|\s/i;var lr=/\/|:/;var cr=/[^\\]\\Z/;function ur(e){if(cr.test(e))return!1;try{return new RegExp(e),!0}catch(e){return!1}}var hr=function(e,r,t){var a,o=" ",s=e.level,i=e.dataLevel,n=e.schema[r],l=e.schemaPath+e.util.getProperty(r),c=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,h="data"+(i||""),d=e.opts.$data&&n&&n.$data;d?(o+=" var schema"+s+" = "+e.util.getData(n.$data,i,e.dataPathArr)+"; ",a="schema"+s):a=n;var p="maximum"==r,m=p?"exclusiveMaximum":"exclusiveMinimum",f=e.schema[m],v=e.opts.$data&&f&&f.$data,y=p?"<":">",g=p?">":"<",b=void 0;if(v){var P=e.util.getData(f.$data,i,e.dataPathArr),w="exclusive"+s,E="exclType"+s,S="exclIsNumber"+s,O="' + "+(_="op"+s)+" + '";o+=" var schemaExcl"+s+" = "+P+"; ",o+=" var "+w+"; var "+E+" = typeof "+(P="schemaExcl"+s)+"; if ("+E+" != 'boolean' && "+E+" != 'undefined' && "+E+" != 'number') { ";var F;b=m;(F=F||[]).push(o),o="",!1!==e.createErrors?(o+=" { keyword: '"+(b||"_exclusiveLimit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: {} ",!1!==e.opts.messages&&(o+=" , message: '"+m+" should be boolean' "),e.opts.verbose&&(o+=" , schema: validate.schema"+l+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),o+=" } "):o+=" {} ";var x=o;o=F.pop(),!e.compositeRule&&u?e.async?o+=" throw new ValidationError(["+x+"]); ":o+=" validate.errors = ["+x+"]; return false; ":o+=" var err = "+x+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+=" } else if ( ",d&&(o+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),o+=" "+E+" == 'number' ? ( ("+w+" = "+a+" === undefined || "+P+" "+y+"= "+a+") ? "+h+" "+g+"= "+P+" : "+h+" "+g+" "+a+" ) : ( ("+w+" = "+P+" === true) ? "+h+" "+g+"= "+a+" : "+h+" "+g+" "+a+" ) || "+h+" !== "+h+") { var op"+s+" = "+w+" ? '"+y+"' : '"+y+"='; ",void 0===n&&(b=m,c=e.errSchemaPath+"/"+m,a=P,d=v)}else{O=y;if((S="number"==typeof f)&&d){var _="'"+O+"'";o+=" if ( ",d&&(o+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),o+=" ( "+a+" === undefined || "+f+" "+y+"= "+a+" ? "+h+" "+g+"= "+f+" : "+h+" "+g+" "+a+" ) || "+h+" !== "+h+") { "}else{S&&void 0===n?(w=!0,b=m,c=e.errSchemaPath+"/"+m,a=f,g+="="):(S&&(a=Math[p?"min":"max"](f,n)),f===(!S||a)?(w=!0,b=m,c=e.errSchemaPath+"/"+m,g+="="):(w=!1,O+="="));_="'"+O+"'";o+=" if ( ",d&&(o+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),o+=" "+h+" "+g+" "+a+" || "+h+" !== "+h+") { "}}b=b||r,(F=F||[]).push(o),o="",!1!==e.createErrors?(o+=" { keyword: '"+(b||"_limit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { comparison: "+_+", limit: "+a+", exclusive: "+w+" } ",!1!==e.opts.messages&&(o+=" , message: 'should be "+O+" ",o+=d?"' + "+a:a+"'"),e.opts.verbose&&(o+=" , schema: ",o+=d?"validate.schema"+l:""+n,o+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),o+=" } "):o+=" {} ";x=o;return o=F.pop(),!e.compositeRule&&u?e.async?o+=" throw new ValidationError(["+x+"]); ":o+=" validate.errors = ["+x+"]; return false; ":o+=" var err = "+x+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+=" } ",u&&(o+=" else { "),o},dr=function(e,r,t){var a,o=" ",s=e.level,i=e.dataLevel,n=e.schema[r],l=e.schemaPath+e.util.getProperty(r),c=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,h="data"+(i||""),d=e.opts.$data&&n&&n.$data;d?(o+=" var schema"+s+" = "+e.util.getData(n.$data,i,e.dataPathArr)+"; ",a="schema"+s):a=n,o+="if ( ",d&&(o+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),o+=" "+h+".length "+("maxItems"==r?">":"<")+" "+a+") { ";var p=r,m=m||[];m.push(o),o="",!1!==e.createErrors?(o+=" { keyword: '"+(p||"_limitItems")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { limit: "+a+" } ",!1!==e.opts.messages&&(o+=" , message: 'should NOT have ",o+="maxItems"==r?"more":"fewer",o+=" than ",o+=d?"' + "+a+" + '":""+n,o+=" items' "),e.opts.verbose&&(o+=" , schema: ",o+=d?"validate.schema"+l:""+n,o+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),o+=" } "):o+=" {} ";var f=o;return o=m.pop(),!e.compositeRule&&u?e.async?o+=" throw new ValidationError(["+f+"]); ":o+=" validate.errors = ["+f+"]; return false; ":o+=" var err = "+f+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+="} ",u&&(o+=" else { "),o},pr=function(e,r,t){var a,o=" ",s=e.level,i=e.dataLevel,n=e.schema[r],l=e.schemaPath+e.util.getProperty(r),c=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,h="data"+(i||""),d=e.opts.$data&&n&&n.$data;d?(o+=" var schema"+s+" = "+e.util.getData(n.$data,i,e.dataPathArr)+"; ",a="schema"+s):a=n;var p="maxLength"==r?">":"<";o+="if ( ",d&&(o+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),!1===e.opts.unicode?o+=" "+h+".length ":o+=" ucs2length("+h+") ",o+=" "+p+" "+a+") { ";var m=r,f=f||[];f.push(o),o="",!1!==e.createErrors?(o+=" { keyword: '"+(m||"_limitLength")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { limit: "+a+" } ",!1!==e.opts.messages&&(o+=" , message: 'should NOT be ",o+="maxLength"==r?"longer":"shorter",o+=" than ",o+=d?"' + "+a+" + '":""+n,o+=" characters' "),e.opts.verbose&&(o+=" , schema: ",o+=d?"validate.schema"+l:""+n,o+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),o+=" } "):o+=" {} ";var v=o;return o=f.pop(),!e.compositeRule&&u?e.async?o+=" throw new ValidationError(["+v+"]); ":o+=" validate.errors = ["+v+"]; return false; ":o+=" var err = "+v+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+="} ",u&&(o+=" else { "),o},mr=function(e,r,t){var a,o=" ",s=e.level,i=e.dataLevel,n=e.schema[r],l=e.schemaPath+e.util.getProperty(r),c=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,h="data"+(i||""),d=e.opts.$data&&n&&n.$data;d?(o+=" var schema"+s+" = "+e.util.getData(n.$data,i,e.dataPathArr)+"; ",a="schema"+s):a=n,o+="if ( ",d&&(o+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),o+=" Object.keys("+h+").length "+("maxProperties"==r?">":"<")+" "+a+") { ";var p=r,m=m||[];m.push(o),o="",!1!==e.createErrors?(o+=" { keyword: '"+(p||"_limitProperties")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { limit: "+a+" } ",!1!==e.opts.messages&&(o+=" , message: 'should NOT have ",o+="maxProperties"==r?"more":"fewer",o+=" than ",o+=d?"' + "+a+" + '":""+n,o+=" properties' "),e.opts.verbose&&(o+=" , schema: ",o+=d?"validate.schema"+l:""+n,o+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),o+=" } "):o+=" {} ";var f=o;return o=m.pop(),!e.compositeRule&&u?e.async?o+=" throw new ValidationError(["+f+"]); ":o+=" validate.errors = ["+f+"]; return false; ":o+=" var err = "+f+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+="} ",u&&(o+=" else { "),o},fr={$ref:function(e,r,t){var a,o,s=" ",i=e.level,n=e.dataLevel,l=e.schema[r],c=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,h="data"+(n||""),d="valid"+i;if("#"==l||"#/"==l)e.isRoot?(a=e.async,o="validate"):(a=!0===e.root.schema.$async,o="root.refVal[0]");else{var p=e.resolveRef(e.baseId,l,e.isRoot);if(void 0===p){var m=e.MissingRefError.message(e.baseId,l);if("fail"==e.opts.missingRefs){e.logger.error(m),(g=g||[]).push(s),s="",!1!==e.createErrors?(s+=" { keyword: '$ref' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { ref: '"+e.util.escapeQuotes(l)+"' } ",!1!==e.opts.messages&&(s+=" , message: 'can\\'t resolve reference "+e.util.escapeQuotes(l)+"' "),e.opts.verbose&&(s+=" , schema: "+e.util.toQuotedString(l)+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),s+=" } "):s+=" {} ";var f=s;s=g.pop(),!e.compositeRule&&u?e.async?s+=" throw new ValidationError(["+f+"]); ":s+=" validate.errors = ["+f+"]; return false; ":s+=" var err = "+f+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",u&&(s+=" if (false) { ")}else{if("ignore"!=e.opts.missingRefs)throw new e.MissingRefError(e.baseId,l,m);e.logger.warn(m),u&&(s+=" if (true) { ")}}else if(p.inline){var v=e.util.copy(e);v.level++;var y="valid"+v.level;v.schema=p.schema,v.schemaPath="",v.errSchemaPath=l,s+=" "+e.validate(v).replace(/validate\.schema/g,p.code)+" ",u&&(s+=" if ("+y+") { ")}else a=!0===p.$async||e.async&&!1!==p.$async,o=p.code}if(o){var g;(g=g||[]).push(s),s="",e.opts.passContext?s+=" "+o+".call(this, ":s+=" "+o+"( ",s+=" "+h+", (dataPath || '')",'""'!=e.errorPath&&(s+=" + "+e.errorPath);var b=s+=" , "+(n?"data"+(n-1||""):"parentData")+" , "+(n?e.dataPathArr[n]:"parentDataProperty")+", rootData) ";if(s=g.pop(),a){if(!e.async)throw new Error("async schema referenced by sync schema");u&&(s+=" var "+d+"; "),s+=" try { await "+b+"; ",u&&(s+=" "+d+" = true; "),s+=" } catch (e) { if (!(e instanceof ValidationError)) throw e; if (vErrors === null) vErrors = e.errors; else vErrors = vErrors.concat(e.errors); errors = vErrors.length; ",u&&(s+=" "+d+" = false; "),s+=" } ",u&&(s+=" if ("+d+") { ")}else s+=" if (!"+b+") { if (vErrors === null) vErrors = "+o+".errors; else vErrors = vErrors.concat("+o+".errors); errors = vErrors.length; } ",u&&(s+=" else { ")}return s},allOf:function(e,r,t){var a=" ",o=e.schema[r],s=e.schemaPath+e.util.getProperty(r),i=e.errSchemaPath+"/"+r,n=!e.opts.allErrors,l=e.util.copy(e),c="";l.level++;var u="valid"+l.level,h=l.baseId,d=!0,p=o;if(p)for(var m,f=-1,v=p.length-1;f0:e.util.schemaHasRules(m,e.RULES.all))&&(d=!1,l.schema=m,l.schemaPath=s+"["+f+"]",l.errSchemaPath=i+"/"+f,a+=" "+e.validate(l)+" ",l.baseId=h,n&&(a+=" if ("+u+") { ",c+="}"));return n&&(a+=d?" if (true) { ":" "+c.slice(0,-1)+" "),a=e.util.cleanUpCode(a)},anyOf:function(e,r,t){var a=" ",o=e.level,s=e.dataLevel,i=e.schema[r],n=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(s||""),h="valid"+o,d="errs__"+o,p=e.util.copy(e),m="";p.level++;var f="valid"+p.level;if(i.every((function(r){return e.opts.strictKeywords?"object"==typeof r&&Object.keys(r).length>0:e.util.schemaHasRules(r,e.RULES.all)}))){var v=p.baseId;a+=" var "+d+" = errors; var "+h+" = false; ";var y=e.compositeRule;e.compositeRule=p.compositeRule=!0;var g=i;if(g)for(var b,P=-1,w=g.length-1;P0:e.util.schemaHasRules(i,e.RULES.all);if(a+="var "+d+" = errors;var "+h+";",b){var P=e.compositeRule;e.compositeRule=p.compositeRule=!0,p.schema=i,p.schemaPath=n,p.errSchemaPath=l,a+=" var "+m+" = false; for (var "+f+" = 0; "+f+" < "+u+".length; "+f+"++) { ",p.errorPath=e.util.getPathExpr(e.errorPath,f,e.opts.jsonPointers,!0);var w=u+"["+f+"]";p.dataPathArr[v]=f;var E=e.validate(p);p.baseId=g,e.util.varOccurences(E,y)<2?a+=" "+e.util.varReplace(E,y,w)+" ":a+=" var "+y+" = "+w+"; "+E+" ",a+=" if ("+m+") break; } ",e.compositeRule=p.compositeRule=P,a+=" if (!"+m+") {"}else a+=" if ("+u+".length == 0) {";var S=S||[];S.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'contains' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: {} ",!1!==e.opts.messages&&(a+=" , message: 'should contain a valid item' "),e.opts.verbose&&(a+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";var O=a;return a=S.pop(),!e.compositeRule&&c?e.async?a+=" throw new ValidationError(["+O+"]); ":a+=" validate.errors = ["+O+"]; return false; ":a+=" var err = "+O+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } else { ",b&&(a+=" errors = "+d+"; if (vErrors !== null) { if ("+d+") vErrors.length = "+d+"; else vErrors = null; } "),e.opts.allErrors&&(a+=" } "),a=e.util.cleanUpCode(a)},dependencies:function(e,r,t){var a=" ",o=e.level,s=e.dataLevel,i=e.schema[r],n=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(s||""),h="errs__"+o,d=e.util.copy(e),p="";d.level++;var m="valid"+d.level,f={},v={},y=e.opts.ownProperties;for(w in i){var g=i[w],b=Array.isArray(g)?v:f;b[w]=g}a+="var "+h+" = errors;";var P=e.errorPath;for(var w in a+="var missing"+o+";",v)if((b=v[w]).length){if(a+=" if ( "+u+e.util.getProperty(w)+" !== undefined ",y&&(a+=" && Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(w)+"') "),c){a+=" && ( ";var E=b;if(E)for(var S=-1,O=E.length-1;S0:e.util.schemaHasRules(g,e.RULES.all))&&(a+=" "+m+" = true; if ( "+u+e.util.getProperty(w)+" !== undefined ",y&&(a+=" && Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(w)+"') "),a+=") { ",d.schema=g,d.schemaPath=n+e.util.getProperty(w),d.errSchemaPath=l+"/"+e.util.escapeFragment(w),a+=" "+e.validate(d)+" ",d.baseId=I,a+=" } ",c&&(a+=" if ("+m+") { ",p+="}"))}return c&&(a+=" "+p+" if ("+h+" == errors) {"),a=e.util.cleanUpCode(a)},enum:function(e,r,t){var a=" ",o=e.level,s=e.dataLevel,i=e.schema[r],n=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(s||""),h="valid"+o,d=e.opts.$data&&i&&i.$data;d&&(a+=" var schema"+o+" = "+e.util.getData(i.$data,s,e.dataPathArr)+"; ");var p="i"+o,m="schema"+o;d||(a+=" var "+m+" = validate.schema"+n+";"),a+="var "+h+";",d&&(a+=" if (schema"+o+" === undefined) "+h+" = true; else if (!Array.isArray(schema"+o+")) "+h+" = false; else {"),a+=h+" = false;for (var "+p+"=0; "+p+"<"+m+".length; "+p+"++) if (equal("+u+", "+m+"["+p+"])) { "+h+" = true; break; }",d&&(a+=" } "),a+=" if (!"+h+") { ";var f=f||[];f.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'enum' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { allowedValues: schema"+o+" } ",!1!==e.opts.messages&&(a+=" , message: 'should be equal to one of the allowed values' "),e.opts.verbose&&(a+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";var v=a;return a=f.pop(),!e.compositeRule&&c?e.async?a+=" throw new ValidationError(["+v+"]); ":a+=" validate.errors = ["+v+"]; return false; ":a+=" var err = "+v+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" }",c&&(a+=" else { "),a},format:function(e,r,t){var a=" ",o=e.level,s=e.dataLevel,i=e.schema[r],n=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(s||"");if(!1===e.opts.format)return c&&(a+=" if (true) { "),a;var h,d=e.opts.$data&&i&&i.$data;d?(a+=" var schema"+o+" = "+e.util.getData(i.$data,s,e.dataPathArr)+"; ",h="schema"+o):h=i;var p=e.opts.unknownFormats,m=Array.isArray(p);if(d){a+=" var "+(f="format"+o)+" = formats["+h+"]; var "+(v="isObject"+o)+" = typeof "+f+" == 'object' && !("+f+" instanceof RegExp) && "+f+".validate; var "+(y="formatType"+o)+" = "+v+" && "+f+".type || 'string'; if ("+v+") { ",e.async&&(a+=" var async"+o+" = "+f+".async; "),a+=" "+f+" = "+f+".validate; } if ( ",d&&(a+=" ("+h+" !== undefined && typeof "+h+" != 'string') || "),a+=" (","ignore"!=p&&(a+=" ("+h+" && !"+f+" ",m&&(a+=" && self._opts.unknownFormats.indexOf("+h+") == -1 "),a+=") || "),a+=" ("+f+" && "+y+" == '"+t+"' && !(typeof "+f+" == 'function' ? ",e.async?a+=" (async"+o+" ? await "+f+"("+u+") : "+f+"("+u+")) ":a+=" "+f+"("+u+") ",a+=" : "+f+".test("+u+"))))) {"}else{var f;if(!(f=e.formats[i])){if("ignore"==p)return e.logger.warn('unknown format "'+i+'" ignored in schema at path "'+e.errSchemaPath+'"'),c&&(a+=" if (true) { "),a;if(m&&p.indexOf(i)>=0)return c&&(a+=" if (true) { "),a;throw new Error('unknown format "'+i+'" is used in schema at path "'+e.errSchemaPath+'"')}var v,y=(v="object"==typeof f&&!(f instanceof RegExp)&&f.validate)&&f.type||"string";if(v){var g=!0===f.async;f=f.validate}if(y!=t)return c&&(a+=" if (true) { "),a;if(g){if(!e.async)throw new Error("async format in sync schema");a+=" if (!(await "+(b="formats"+e.util.getProperty(i)+".validate")+"("+u+"))) { "}else{a+=" if (! ";var b="formats"+e.util.getProperty(i);v&&(b+=".validate"),a+="function"==typeof f?" "+b+"("+u+") ":" "+b+".test("+u+") ",a+=") { "}}var P=P||[];P.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'format' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { format: ",a+=d?""+h:""+e.util.toQuotedString(i),a+=" } ",!1!==e.opts.messages&&(a+=" , message: 'should match format \"",a+=d?"' + "+h+" + '":""+e.util.escapeQuotes(i),a+="\"' "),e.opts.verbose&&(a+=" , schema: ",a+=d?"validate.schema"+n:""+e.util.toQuotedString(i),a+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";var w=a;return a=P.pop(),!e.compositeRule&&c?e.async?a+=" throw new ValidationError(["+w+"]); ":a+=" validate.errors = ["+w+"]; return false; ":a+=" var err = "+w+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } ",c&&(a+=" else { "),a},if:function(e,r,t){var a=" ",o=e.level,s=e.dataLevel,i=e.schema[r],n=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(s||""),h="valid"+o,d="errs__"+o,p=e.util.copy(e);p.level++;var m="valid"+p.level,f=e.schema.then,v=e.schema.else,y=void 0!==f&&(e.opts.strictKeywords?"object"==typeof f&&Object.keys(f).length>0:e.util.schemaHasRules(f,e.RULES.all)),g=void 0!==v&&(e.opts.strictKeywords?"object"==typeof v&&Object.keys(v).length>0:e.util.schemaHasRules(v,e.RULES.all)),b=p.baseId;if(y||g){var P;p.createErrors=!1,p.schema=i,p.schemaPath=n,p.errSchemaPath=l,a+=" var "+d+" = errors; var "+h+" = true; ";var w=e.compositeRule;e.compositeRule=p.compositeRule=!0,a+=" "+e.validate(p)+" ",p.baseId=b,p.createErrors=!0,a+=" errors = "+d+"; if (vErrors !== null) { if ("+d+") vErrors.length = "+d+"; else vErrors = null; } ",e.compositeRule=p.compositeRule=w,y?(a+=" if ("+m+") { ",p.schema=e.schema.then,p.schemaPath=e.schemaPath+".then",p.errSchemaPath=e.errSchemaPath+"/then",a+=" "+e.validate(p)+" ",p.baseId=b,a+=" "+h+" = "+m+"; ",y&&g?a+=" var "+(P="ifClause"+o)+" = 'then'; ":P="'then'",a+=" } ",g&&(a+=" else { ")):a+=" if (!"+m+") { ",g&&(p.schema=e.schema.else,p.schemaPath=e.schemaPath+".else",p.errSchemaPath=e.errSchemaPath+"/else",a+=" "+e.validate(p)+" ",p.baseId=b,a+=" "+h+" = "+m+"; ",y&&g?a+=" var "+(P="ifClause"+o)+" = 'else'; ":P="'else'",a+=" } "),a+=" if (!"+h+") { var err = ",!1!==e.createErrors?(a+=" { keyword: 'if' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { failingKeyword: "+P+" } ",!1!==e.opts.messages&&(a+=" , message: 'should match \"' + "+P+" + '\" schema' "),e.opts.verbose&&(a+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&c&&(e.async?a+=" throw new ValidationError(vErrors); ":a+=" validate.errors = vErrors; return false; "),a+=" } ",c&&(a+=" else { "),a=e.util.cleanUpCode(a)}else c&&(a+=" if (true) { ");return a},items:function(e,r,t){var a=" ",o=e.level,s=e.dataLevel,i=e.schema[r],n=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(s||""),h="valid"+o,d="errs__"+o,p=e.util.copy(e),m="";p.level++;var f="valid"+p.level,v="i"+o,y=p.dataLevel=e.dataLevel+1,g="data"+y,b=e.baseId;if(a+="var "+d+" = errors;var "+h+";",Array.isArray(i)){var P=e.schema.additionalItems;if(!1===P){a+=" "+h+" = "+u+".length <= "+i.length+"; ";var w=l;l=e.errSchemaPath+"/additionalItems",a+=" if (!"+h+") { ";var E=E||[];E.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'additionalItems' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { limit: "+i.length+" } ",!1!==e.opts.messages&&(a+=" , message: 'should NOT have more than "+i.length+" items' "),e.opts.verbose&&(a+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";var S=a;a=E.pop(),!e.compositeRule&&c?e.async?a+=" throw new ValidationError(["+S+"]); ":a+=" validate.errors = ["+S+"]; return false; ":a+=" var err = "+S+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } ",l=w,c&&(m+="}",a+=" else { ")}var O=i;if(O)for(var F,x=-1,_=O.length-1;x<_;)if(F=O[x+=1],e.opts.strictKeywords?"object"==typeof F&&Object.keys(F).length>0:e.util.schemaHasRules(F,e.RULES.all)){a+=" "+f+" = true; if ("+u+".length > "+x+") { ";var $=u+"["+x+"]";p.schema=F,p.schemaPath=n+"["+x+"]",p.errSchemaPath=l+"/"+x,p.errorPath=e.util.getPathExpr(e.errorPath,x,e.opts.jsonPointers,!0),p.dataPathArr[y]=x;var D=e.validate(p);p.baseId=b,e.util.varOccurences(D,g)<2?a+=" "+e.util.varReplace(D,g,$)+" ":a+=" var "+g+" = "+$+"; "+D+" ",a+=" } ",c&&(a+=" if ("+f+") { ",m+="}")}if("object"==typeof P&&(e.opts.strictKeywords?"object"==typeof P&&Object.keys(P).length>0:e.util.schemaHasRules(P,e.RULES.all))){p.schema=P,p.schemaPath=e.schemaPath+".additionalItems",p.errSchemaPath=e.errSchemaPath+"/additionalItems",a+=" "+f+" = true; if ("+u+".length > "+i.length+") { for (var "+v+" = "+i.length+"; "+v+" < "+u+".length; "+v+"++) { ",p.errorPath=e.util.getPathExpr(e.errorPath,v,e.opts.jsonPointers,!0);$=u+"["+v+"]";p.dataPathArr[y]=v;D=e.validate(p);p.baseId=b,e.util.varOccurences(D,g)<2?a+=" "+e.util.varReplace(D,g,$)+" ":a+=" var "+g+" = "+$+"; "+D+" ",c&&(a+=" if (!"+f+") break; "),a+=" } } ",c&&(a+=" if ("+f+") { ",m+="}")}}else if(e.opts.strictKeywords?"object"==typeof i&&Object.keys(i).length>0:e.util.schemaHasRules(i,e.RULES.all)){p.schema=i,p.schemaPath=n,p.errSchemaPath=l,a+=" for (var "+v+" = 0; "+v+" < "+u+".length; "+v+"++) { ",p.errorPath=e.util.getPathExpr(e.errorPath,v,e.opts.jsonPointers,!0);$=u+"["+v+"]";p.dataPathArr[y]=v;D=e.validate(p);p.baseId=b,e.util.varOccurences(D,g)<2?a+=" "+e.util.varReplace(D,g,$)+" ":a+=" var "+g+" = "+$+"; "+D+" ",c&&(a+=" if (!"+f+") break; "),a+=" }"}return c&&(a+=" "+m+" if ("+d+" == errors) {"),a=e.util.cleanUpCode(a)},maximum:hr,minimum:hr,maxItems:dr,minItems:dr,maxLength:pr,minLength:pr,maxProperties:mr,minProperties:mr,multipleOf:function(e,r,t){var a,o=" ",s=e.level,i=e.dataLevel,n=e.schema[r],l=e.schemaPath+e.util.getProperty(r),c=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,h="data"+(i||""),d=e.opts.$data&&n&&n.$data;d?(o+=" var schema"+s+" = "+e.util.getData(n.$data,i,e.dataPathArr)+"; ",a="schema"+s):a=n,o+="var division"+s+";if (",d&&(o+=" "+a+" !== undefined && ( typeof "+a+" != 'number' || "),o+=" (division"+s+" = "+h+" / "+a+", ",e.opts.multipleOfPrecision?o+=" Math.abs(Math.round(division"+s+") - division"+s+") > 1e-"+e.opts.multipleOfPrecision+" ":o+=" division"+s+" !== parseInt(division"+s+") ",o+=" ) ",d&&(o+=" ) "),o+=" ) { ";var p=p||[];p.push(o),o="",!1!==e.createErrors?(o+=" { keyword: 'multipleOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { multipleOf: "+a+" } ",!1!==e.opts.messages&&(o+=" , message: 'should be multiple of ",o+=d?"' + "+a:a+"'"),e.opts.verbose&&(o+=" , schema: ",o+=d?"validate.schema"+l:""+n,o+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),o+=" } "):o+=" {} ";var m=o;return o=p.pop(),!e.compositeRule&&u?e.async?o+=" throw new ValidationError(["+m+"]); ":o+=" validate.errors = ["+m+"]; return false; ":o+=" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+="} ",u&&(o+=" else { "),o},not:function(e,r,t){var a=" ",o=e.level,s=e.dataLevel,i=e.schema[r],n=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(s||""),h="errs__"+o,d=e.util.copy(e);d.level++;var p="valid"+d.level;if(e.opts.strictKeywords?"object"==typeof i&&Object.keys(i).length>0:e.util.schemaHasRules(i,e.RULES.all)){d.schema=i,d.schemaPath=n,d.errSchemaPath=l,a+=" var "+h+" = errors; ";var m,f=e.compositeRule;e.compositeRule=d.compositeRule=!0,d.createErrors=!1,d.opts.allErrors&&(m=d.opts.allErrors,d.opts.allErrors=!1),a+=" "+e.validate(d)+" ",d.createErrors=!0,m&&(d.opts.allErrors=m),e.compositeRule=d.compositeRule=f,a+=" if ("+p+") { ";var v=v||[];v.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'not' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: {} ",!1!==e.opts.messages&&(a+=" , message: 'should NOT be valid' "),e.opts.verbose&&(a+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";var y=a;a=v.pop(),!e.compositeRule&&c?e.async?a+=" throw new ValidationError(["+y+"]); ":a+=" validate.errors = ["+y+"]; return false; ":a+=" var err = "+y+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } else { errors = "+h+"; if (vErrors !== null) { if ("+h+") vErrors.length = "+h+"; else vErrors = null; } ",e.opts.allErrors&&(a+=" } ")}else a+=" var err = ",!1!==e.createErrors?(a+=" { keyword: 'not' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: {} ",!1!==e.opts.messages&&(a+=" , message: 'should NOT be valid' "),e.opts.verbose&&(a+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",c&&(a+=" if (false) { ");return a},oneOf:function(e,r,t){var a=" ",o=e.level,s=e.dataLevel,i=e.schema[r],n=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(s||""),h="valid"+o,d="errs__"+o,p=e.util.copy(e),m="";p.level++;var f="valid"+p.level,v=p.baseId,y="prevValid"+o,g="passingSchemas"+o;a+="var "+d+" = errors , "+y+" = false , "+h+" = false , "+g+" = null; ";var b=e.compositeRule;e.compositeRule=p.compositeRule=!0;var P=i;if(P)for(var w,E=-1,S=P.length-1;E0:e.util.schemaHasRules(w,e.RULES.all))?(p.schema=w,p.schemaPath=n+"["+E+"]",p.errSchemaPath=l+"/"+E,a+=" "+e.validate(p)+" ",p.baseId=v):a+=" var "+f+" = true; ",E&&(a+=" if ("+f+" && "+y+") { "+h+" = false; "+g+" = ["+g+", "+E+"]; } else { ",m+="}"),a+=" if ("+f+") { "+h+" = "+y+" = true; "+g+" = "+E+"; }";return e.compositeRule=p.compositeRule=b,a+=m+"if (!"+h+") { var err = ",!1!==e.createErrors?(a+=" { keyword: 'oneOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { passingSchemas: "+g+" } ",!1!==e.opts.messages&&(a+=" , message: 'should match exactly one schema in oneOf' "),e.opts.verbose&&(a+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&c&&(e.async?a+=" throw new ValidationError(vErrors); ":a+=" validate.errors = vErrors; return false; "),a+="} else { errors = "+d+"; if (vErrors !== null) { if ("+d+") vErrors.length = "+d+"; else vErrors = null; }",e.opts.allErrors&&(a+=" } "),a},pattern:function(e,r,t){var a,o=" ",s=e.level,i=e.dataLevel,n=e.schema[r],l=e.schemaPath+e.util.getProperty(r),c=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,h="data"+(i||""),d=e.opts.$data&&n&&n.$data;d?(o+=" var schema"+s+" = "+e.util.getData(n.$data,i,e.dataPathArr)+"; ",a="schema"+s):a=n,o+="if ( ",d&&(o+=" ("+a+" !== undefined && typeof "+a+" != 'string') || "),o+=" !"+(d?"(new RegExp("+a+"))":e.usePattern(n))+".test("+h+") ) { ";var p=p||[];p.push(o),o="",!1!==e.createErrors?(o+=" { keyword: 'pattern' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { pattern: ",o+=d?""+a:""+e.util.toQuotedString(n),o+=" } ",!1!==e.opts.messages&&(o+=" , message: 'should match pattern \"",o+=d?"' + "+a+" + '":""+e.util.escapeQuotes(n),o+="\"' "),e.opts.verbose&&(o+=" , schema: ",o+=d?"validate.schema"+l:""+e.util.toQuotedString(n),o+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),o+=" } "):o+=" {} ";var m=o;return o=p.pop(),!e.compositeRule&&u?e.async?o+=" throw new ValidationError(["+m+"]); ":o+=" validate.errors = ["+m+"]; return false; ":o+=" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+="} ",u&&(o+=" else { "),o},properties:function(e,r,t){var a=" ",o=e.level,s=e.dataLevel,i=e.schema[r],n=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(s||""),h="errs__"+o,d=e.util.copy(e),p="";d.level++;var m="valid"+d.level,f="key"+o,v="idx"+o,y=d.dataLevel=e.dataLevel+1,g="data"+y,b="dataProperties"+o,P=Object.keys(i||{}),w=e.schema.patternProperties||{},E=Object.keys(w),S=e.schema.additionalProperties,O=P.length||E.length,F=!1===S,x="object"==typeof S&&Object.keys(S).length,_=e.opts.removeAdditional,$=F||x||_,D=e.opts.ownProperties,j=e.baseId,A=e.schema.required;if(A&&(!e.opts.$data||!A.$data)&&A.length8)a+=" || validate.schema"+n+".hasOwnProperty("+f+") ";else{var R=P;if(R)for(var C=-1,I=R.length-1;C0:e.util.schemaHasRules(Z,e.RULES.all)){var X=e.util.getProperty(W),Y=(B=u+X,K&&void 0!==Z.default);d.schema=Z,d.schemaPath=n+X,d.errSchemaPath=l+"/"+e.util.escapeFragment(W),d.errorPath=e.util.getPath(e.errorPath,W,e.opts.jsonPointers),d.dataPathArr[y]=e.util.toQuotedString(W);M=e.validate(d);if(d.baseId=j,e.util.varOccurences(M,g)<2){M=e.util.varReplace(M,g,B);var ee=B}else{ee=g;a+=" var "+g+" = "+B+"; "}if(Y)a+=" "+M+" ";else{if(k&&k[W]){a+=" if ( "+ee+" === undefined ",D&&(a+=" || ! Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(W)+"') "),a+=") { "+m+" = false; ";z=e.errorPath,V=l;var re,te=e.util.escapeQuotes(W);e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPath(z,W,e.opts.jsonPointers)),l=e.errSchemaPath+"/required",(re=re||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+te+"' } ",!1!==e.opts.messages&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is a required property":a+="should have required property \\'"+te+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";U=a;a=re.pop(),!e.compositeRule&&c?e.async?a+=" throw new ValidationError(["+U+"]); ":a+=" validate.errors = ["+U+"]; return false; ":a+=" var err = "+U+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",l=V,e.errorPath=z,a+=" } else { "}else c?(a+=" if ( "+ee+" === undefined ",D&&(a+=" || ! Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(W)+"') "),a+=") { "+m+" = true; } else { "):(a+=" if ("+ee+" !== undefined ",D&&(a+=" && Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(W)+"') "),a+=" ) { ");a+=" "+M+" } "}}c&&(a+=" if ("+m+") { ",p+="}")}}if(E.length){var ae=E;if(ae)for(var oe,se=-1,ie=ae.length-1;se0:e.util.schemaHasRules(Z,e.RULES.all)){d.schema=Z,d.schemaPath=e.schemaPath+".patternProperties"+e.util.getProperty(oe),d.errSchemaPath=e.errSchemaPath+"/patternProperties/"+e.util.escapeFragment(oe),a+=D?" "+b+" = "+b+" || Object.keys("+u+"); for (var "+v+"=0; "+v+"<"+b+".length; "+v+"++) { var "+f+" = "+b+"["+v+"]; ":" for (var "+f+" in "+u+") { ",a+=" if ("+e.usePattern(oe)+".test("+f+")) { ",d.errorPath=e.util.getPathExpr(e.errorPath,f,e.opts.jsonPointers);B=u+"["+f+"]";d.dataPathArr[y]=f;M=e.validate(d);d.baseId=j,e.util.varOccurences(M,g)<2?a+=" "+e.util.varReplace(M,g,B)+" ":a+=" var "+g+" = "+B+"; "+M+" ",c&&(a+=" if (!"+m+") break; "),a+=" } ",c&&(a+=" else "+m+" = true; "),a+=" } ",c&&(a+=" if ("+m+") { ",p+="}")}}}return c&&(a+=" "+p+" if ("+h+" == errors) {"),a=e.util.cleanUpCode(a)},propertyNames:function(e,r,t){var a=" ",o=e.level,s=e.dataLevel,i=e.schema[r],n=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(s||""),h="errs__"+o,d=e.util.copy(e);d.level++;var p="valid"+d.level;if(a+="var "+h+" = errors;",e.opts.strictKeywords?"object"==typeof i&&Object.keys(i).length>0:e.util.schemaHasRules(i,e.RULES.all)){d.schema=i,d.schemaPath=n,d.errSchemaPath=l;var m="key"+o,f="idx"+o,v="i"+o,y="' + "+m+" + '",g="data"+(d.dataLevel=e.dataLevel+1),b="dataProperties"+o,P=e.opts.ownProperties,w=e.baseId;P&&(a+=" var "+b+" = undefined; "),a+=P?" "+b+" = "+b+" || Object.keys("+u+"); for (var "+f+"=0; "+f+"<"+b+".length; "+f+"++) { var "+m+" = "+b+"["+f+"]; ":" for (var "+m+" in "+u+") { ",a+=" var startErrs"+o+" = errors; ";var E=m,S=e.compositeRule;e.compositeRule=d.compositeRule=!0;var O=e.validate(d);d.baseId=w,e.util.varOccurences(O,g)<2?a+=" "+e.util.varReplace(O,g,E)+" ":a+=" var "+g+" = "+E+"; "+O+" ",e.compositeRule=d.compositeRule=S,a+=" if (!"+p+") { for (var "+v+"=startErrs"+o+"; "+v+"0:e.util.schemaHasRules(b,e.RULES.all))||(m[m.length]=v)}}else m=i;if(d||m.length){var P=e.errorPath,w=d||m.length>=e.opts.loopRequired,E=e.opts.ownProperties;if(c)if(a+=" var missing"+o+"; ",w){d||(a+=" var "+p+" = validate.schema"+n+"; ");var S="' + "+(D="schema"+o+"["+(x="i"+o)+"]")+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(P,D,e.opts.jsonPointers)),a+=" var "+h+" = true; ",d&&(a+=" if (schema"+o+" === undefined) "+h+" = true; else if (!Array.isArray(schema"+o+")) "+h+" = false; else {"),a+=" for (var "+x+" = 0; "+x+" < "+p+".length; "+x+"++) { "+h+" = "+u+"["+p+"["+x+"]] !== undefined ",E&&(a+=" && Object.prototype.hasOwnProperty.call("+u+", "+p+"["+x+"]) "),a+="; if (!"+h+") break; } ",d&&(a+=" } "),a+=" if (!"+h+") { ",($=$||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+S+"' } ",!1!==e.opts.messages&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is a required property":a+="should have required property \\'"+S+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";var O=a;a=$.pop(),!e.compositeRule&&c?e.async?a+=" throw new ValidationError(["+O+"]); ":a+=" validate.errors = ["+O+"]; return false; ":a+=" var err = "+O+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } else { "}else{a+=" if ( ";var F=m;if(F)for(var x=-1,_=F.length-1;x<_;){A=F[x+=1],x&&(a+=" || "),a+=" ( ( "+(I=u+(C=e.util.getProperty(A)))+" === undefined ",E&&(a+=" || ! Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(A)+"') "),a+=") && (missing"+o+" = "+e.util.toQuotedString(e.opts.jsonPointers?A:C)+") ) "}a+=") { ";var $;S="' + "+(D="missing"+o)+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.opts.jsonPointers?e.util.getPathExpr(P,D,!0):P+" + "+D),($=$||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+S+"' } ",!1!==e.opts.messages&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is a required property":a+="should have required property \\'"+S+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";O=a;a=$.pop(),!e.compositeRule&&c?e.async?a+=" throw new ValidationError(["+O+"]); ":a+=" validate.errors = ["+O+"]; return false; ":a+=" var err = "+O+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } else { "}else if(w){d||(a+=" var "+p+" = validate.schema"+n+"; ");var D;S="' + "+(D="schema"+o+"["+(x="i"+o)+"]")+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(P,D,e.opts.jsonPointers)),d&&(a+=" if ("+p+" && !Array.isArray("+p+")) { var err = ",!1!==e.createErrors?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+S+"' } ",!1!==e.opts.messages&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is a required property":a+="should have required property \\'"+S+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } else if ("+p+" !== undefined) { "),a+=" for (var "+x+" = 0; "+x+" < "+p+".length; "+x+"++) { if ("+u+"["+p+"["+x+"]] === undefined ",E&&(a+=" || ! Object.prototype.hasOwnProperty.call("+u+", "+p+"["+x+"]) "),a+=") { var err = ",!1!==e.createErrors?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+S+"' } ",!1!==e.opts.messages&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is a required property":a+="should have required property \\'"+S+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } } ",d&&(a+=" } ")}else{var j=m;if(j)for(var A,k=-1,R=j.length-1;k 1) { ";var m=e.schema.items&&e.schema.items.type,f=Array.isArray(m);if(!m||"object"==m||"array"==m||f&&(m.indexOf("object")>=0||m.indexOf("array")>=0))o+=" outer: for (;i--;) { for (j = i; j--;) { if (equal("+h+"[i], "+h+"[j])) { "+d+" = false; break outer; } } } ";else{o+=" var itemIndices = {}, item; for (;i--;) { var item = "+h+"[i]; ";var v="checkDataType"+(f?"s":"");o+=" if ("+e.util[v](m,"item",!0)+") continue; ",f&&(o+=" if (typeof item == 'string') item = '\"' + item; "),o+=" if (typeof itemIndices[item] == 'number') { "+d+" = false; j = itemIndices[item]; break; } itemIndices[item] = i; } "}o+=" } ",p&&(o+=" } "),o+=" if (!"+d+") { ";var y=y||[];y.push(o),o="",!1!==e.createErrors?(o+=" { keyword: 'uniqueItems' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { i: i, j: j } ",!1!==e.opts.messages&&(o+=" , message: 'should NOT have duplicate items (items ## ' + j + ' and ' + i + ' are identical)' "),e.opts.verbose&&(o+=" , schema: ",o+=p?"validate.schema"+l:""+n,o+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),o+=" } "):o+=" {} ";var g=o;o=y.pop(),!e.compositeRule&&u?e.async?o+=" throw new ValidationError(["+g+"]); ":o+=" validate.errors = ["+g+"]; return false; ":o+=" var err = "+g+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+=" } ",u&&(o+=" else { ")}else u&&(o+=" if (true) { ");return o},validate:Re},vr=M.toHash,yr=["multipleOf","maximum","exclusiveMaximum","minimum","exclusiveMinimum","maxLength","minLength","pattern","additionalItems","maxItems","minItems","uniqueItems","maxProperties","minProperties","required","additionalProperties","enum","format","const"],gr=function(e,r){for(var t=0;t0&&void 0!==arguments[0]?arguments[0]:[];return null===e?[]:e.map((function(e){var r=e.dataPath,t=e.keyword,a=e.message,o=e.params,s=e.schemaPath,i="".concat(r);return{name:t,property:i,message:a,params:o,stack:"".concat(i," ").concat(a).trim(),schemaPath:s}}))}function it(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=e.formData,t=e.schema,o=e.transformErrors,s=e.additionalMetaSchemas,i=void 0===s?[]:s,n=e.customFormats,l=void 0===n?{}:n,c=!R(at,i),u=!R(tt,l);(c||u)&&(rt=ot()),i&&c&&Array.isArray(i)&&(rt.addMetaSchema(i),at=i),l&&u&&_(l)&&(Object.keys(l).forEach((function(e){rt.addFormat(e,l[e])})),tt=l);var h=null;try{rt.validate(t,r)}catch(e){h=e}a.getCurrentLocalize()(rt.errors);var d=st(rt.errors);rt.errors=null;var p=h&&h.message&&"string"==typeof h.message&&h.message.includes("no schema with key or ref ");return p&&(d=[].concat(b(d),[{stack:h.message}])),"function"==typeof o&&(d=o(d)),{errors:d}}function nt(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=e.formData,t=e.schema,o=e.transformErrors,s=e.additionalMetaSchemas,i=void 0===s?[]:s,n=e.customFormats,l=void 0===n?{}:n,c=e.errorSchema,u=void 0===c?{}:c,h=e.required,d=void 0!==h&&h,p=e.propPath,m=void 0===p?"":p,f=e.isOnlyFirstError,v=void 0===f||f,y=void 0===r;if(d){if(y){var g={keyword:"required",params:{missingProperty:m}},b=ta(u).required;return b?g.message=b:a.getCurrentLocalize()([g]),[g]}}else if(y)return[];var P=it({formData:r,schema:t,transformErrors:o,additionalMetaSchemas:i,customFormats:l}).errors;P=P.filter((function(e){return""===e.property&&!e.schemaPath.includes("#/anyOf/")&&!e.schemaPath.includes("#/oneOf/")||"additionalProperties"===e.name}));var w=ta(u);return(v&&P.length>0?[P[0]]:P).reduce((function(e,r){return r.message=w[r.name]||r.message,e.push(r),e}),[])}function lt(e,r){try{return rt.validate(e,r)}catch(e){return!1}}function ct(e,r,t){for(var a=0;a=2;)s();return a}function vt(e,r,t){var a=v(v({},e),{},{allOf:e.allOf.map((function(e){return bt(e,r,t)}))});try{var o=a.allOf,s=y(a,["allOf"]);return ft.apply(void 0,[s].concat(b(o)))}catch(e){a.allOf;return y(a,["allOf"])}}function yt(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(e.hasOwnProperty("allOf")&&(e=vt(e,r,t)),e.hasOwnProperty("$ref")&&(e=mt(e,r,t)),e.hasOwnProperty("dependencies")){var a=ht(e,r,t);e=bt(a,r,t)}return e}function gt(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return e=v(v({},e),{},{properties:v({},e.properties)}),Object.keys(t).forEach((function(a){var o;e.properties.hasOwnProperty(a)||(o=e.additionalProperties.hasOwnProperty("$ref")?bt({$ref:e.additionalProperties.$ref},r,t):e.additionalProperties.hasOwnProperty("type")?v({},e.additionalProperties):{type:D(t[a])},e.properties[a]=o,e.properties[a].__additional_property=!0)})),e}function bt(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!_(e))return{};var a=yt(e,r,t),o=a.hasOwnProperty("additionalProperties")&&!1!==a.additionalProperties;return o?gt(a,r,t):a}function Pt(e,r,t,a,o,s,i,n,l,c){"boolean"!=typeof i&&(l=n,n=i,i=!1);const u="function"==typeof t?t.options:t;let h;if(e&&e.render&&(u.render=e.render,u.staticRenderFns=e.staticRenderFns,u._compiled=!0,o&&(u.functional=!0)),a&&(u._scopeId=a),s?(h=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),r&&r.call(this,l(e)),e&&e._registeredComponents&&e._registeredComponents.add(s)},u._ssrRegister=h):r&&(h=i?function(e){r.call(this,c(e,this.$root.$options.shadowRoot))}:function(e){r.call(this,n(e))}),h)if(u.functional){const e=u.render;u.render=function(r,t){return h.call(t),e(r,t)}}else{const e=u.beforeCreate;u.beforeCreate=e?[].concat(e,h):[h]}return t}const wt={name:"FieldGroupWrap",props:{showTitle:{type:Boolean,default:!0},showDescription:{type:Boolean,default:!0},title:{type:String,default:""},description:{type:String,default:""}}};var Et=function(){var e=this,r=e.$createElement,t=e._self._c||r;return t("div",{staticClass:"fieldGroupWrap"},[[e.showTitle&&e.title?t("h3",{staticClass:"fieldGroupWrap_title"},[e._v("\n "+e._s(e.title)+"\n ")]):e._e(),e._v(" "),e.showDescription&&e.description?t("p",{staticClass:"fieldGroupWrap_des",domProps:{innerHTML:e._s(e.description)}}):e._e()],e._v(" "),t("div",{staticClass:"fieldGroupWrap_box"},[e._t("default")],2)],2)};Et._withStripped=!0;const St=Pt({render:Et,staticRenderFns:[]},void 0,wt,void 0,!1,void 0,!1,void 0,void 0,void 0);var Ot={name:"Widget",props:{isFormData:{type:Boolean,default:!0},curValue:{type:null,default:0},schema:{type:Object,default:function(){return{}}},errorSchema:{type:Object,default:function(){return{}}},customFormats:{type:Object,default:function(){return{}}},widget:{type:[String,Function,Object]},formatValue:{type:[Function],default:function(e){return{update:!0,value:e}}},rootFormData:{type:null},curNodePath:{type:String,default:""},label:{type:String,default:""},labelWidth:{type:String,default:""},description:{type:String,default:""},required:{type:Boolean,default:!1},emptyValue:{type:null,default:void 0},attrs:{type:Object,default:function(){return{}}},uiProps:{type:Object,default:function(){return{}}}},computed:{value:{get:function(){return this.isFormData?c(this.rootFormData,this.curNodePath):this.curValue},set:function(e){var r=""===e?this.emptyValue:e;this.isFormData&&l(this.rootFormData,this.curNodePath,r),this.$emit("onChange",r)}}},created:function(){this.uiProps.enumOptions&&this.uiProps.enumOptions.length>0&&void 0===this.value&&this.value!==this.uiProps.enumOptions[0]&&(this.value=this.uiProps.enumOptions[0].value)},render:function(e){var r=this,t=r.uiProps,a=t.class,o=t.style,i=y(t,["class","style"]),n=s(this.curNodePath);return e("el-form-item",{class:{"is-required":r.required},props:v({label:r.label,labelWidth:r.labelWidth},this.isFormData?{prop:n?"__$$root":r.curNodePath,rules:[{validator:function(e,t,a){n&&(t=r.rootFormData);var o=nt({formData:t,schema:r.$props.schema,customFormats:r.$props.customFormats,errorSchema:r.errorSchema,required:r.required,propPath:r.curNodePath});return o.length>0?a(o[0].message):a()},trigger:"blur"}]}:{}),scopedSlots:{error:function(r){return r.error?e("p",{class:{formItemErrorBox:!0},attrs:{title:r.error}},[r.error]):null}}},[].concat(b(r.description?[e("p",{domProps:{innerHTML:r.description},class:{genFromWidget_des:!0}})]:[]),[e(r.widget,{props:v(v({},i),{},{value:this.value}),style:o,class:a,attrs:v({placeholder:i.placeholder},r.attrs),on:{input:function(e){var t=r.formatValue(e);t.update&&(r.value=t.value)}}})]))}},Ft={name:"SchemaField",props:t,functional:!0,render:function(e,r){var t=r.props,a=t.rootSchema,s=bt(t.schema,a),i=v(v({},t),{},{schema:s});if(0===Object.keys(s).length)return null;var n,l=Xt(i),c="HiddenWidget"===t.uiSchema["ui:widget"]||"hidden"===t.uiSchema["ui:widget"],u=[],h=o(r.props.curNodePath);if(s.anyOf&&s.anyOf.length>0&&!ia(s))u.push(e(Gt.anyOf,{class:(n={},p(n,"".concat(h,"-anyOf"),!0),p(n,"AnyOfField",!0),n),props:i}));else if(s.oneOf&&s.oneOf.length>0&&!ia(s)){var d;u.push(e(Gt.oneOf,{class:(d={},p(d,"".concat(h,"-oneOf"),!0),p(d,"OneOfField",!0),d),props:i}))}else{var m;u.push(l&&e(c?"div":l,{props:v({},i),class:v(v({},r.data.class),{},(m={},p(m,T(l.name)||l,!0),p(m,"hiddenWidget",c),p(m,h,!0),m))}))}return u}},xt={name:"ObjectField",props:v({},t),methods:{isRequired:function(e){var r=this.schema;return Array.isArray(r.required)&&!!~r.required.indexOf(e)}},render:function(e){var r=this,t=this.$props,a=t.schema,o=t.uiSchema,s=t.errorSchema,n=aa(Object.keys(a.properties||{}),o["ui:order"]).map((function(n){var l=a.properties[n].hasOwnProperty("__additional_property");return e(Ft,{props:v(v({},t),{},{schema:a.properties[n],uiSchema:l?o.additionalProperties:o[n],errorSchema:s[n],required:r.isRequired(n),curNodePath:i(t.curNodePath,n)})})})),l=ea({schema:a,uiSchema:o}),c=l.title,u=l.description,h=l.showTitle,d=l.showDescription;return e(St,{props:{title:c,description:u,showTitle:h,showDescription:d}},[e("template",{slot:"default"},[].concat(b(n),[this.needValidFieldGroup?e(Ot,{class:{validateWidget:!0,"validateWidget-object":!0},props:{schema:Object.entries(r.$props.schema).reduce((function(e,t){var a=g(t,2),o=a[0],s=a[1];return!1!==r.$props.schema.additionalProperties&&"properties"===o||(e[o]=s),e}),{}),errorSchema:this.errorSchema,curNodePath:t.curNodePath,rootFormData:this.rootFormData}}):null]))])}};const _t={name:"CheckboxesWidget",props:{value:{default:function(){return[]},type:[Array]},enumOptions:{default:function(){return[]},type:[Array]}},computed:{checkList:{get:function(){return this.value},set:function(e){this.$emit("input",e)}}}};var $t=function(){var e=this,r=e.$createElement,t=e._self._c||r;return t("el-checkbox-group",{model:{value:e.checkList,callback:function(r){e.checkList=r},expression:"checkList"}},e._l(e.enumOptions,(function(r,a){return t("el-checkbox",{key:a,attrs:{label:r.value}},[e._v(e._s(r.label))])})),1)};$t._withStripped=!0;const Dt=Pt({render:$t,staticRenderFns:[]},void 0,_t,void 0,!1,void 0,!1,void 0,void 0,void 0);const jt={name:"RadioWidget",props:{value:{default:function(){return""},type:[String,Number,Boolean]},enumOptions:{default:function(){return[]},type:[Array]}},computed:{checkList:{get:function(){return this.value},set:function(e){this.$emit("input",e)}}}};var At=function(){var e=this,r=e.$createElement,t=e._self._c||r;return t("el-radio-group",{model:{value:e.checkList,callback:function(r){e.checkList=r},expression:"checkList"}},e._l(e.enumOptions,(function(r,a){return t("el-radio",{key:a,attrs:{label:r.value}},[e._v(e._s(r.label))])})),1)};At._withStripped=!0;const kt=Pt({render:At,staticRenderFns:[]},void 0,jt,void 0,!1,void 0,!1,void 0,void 0,void 0);const Rt={name:"SelectWidget",props:{value:{default:function(){return""},type:[String,Number,Boolean]},enumOptions:{default:function(){return[]},type:[Array]}},computed:{selectList:{get:function(){return this.value},set:function(e){this.$emit("input",e)}}}};var Ct=function(){var e=this,r=e.$createElement,t=e._self._c||r;return t("el-select",e._b({model:{value:e.selectList,callback:function(r){e.selectList=r},expression:"selectList"}},"el-select",e.$attrs,!1),e._l(e.enumOptions,(function(e,r){return t("el-option",{key:r,attrs:{label:e.label,value:e.value}})})),1)};Ct._withStripped=!0;var It={CheckboxesWidget:Dt,RadioWidget:kt,SelectWidget:Pt({render:Ct,staticRenderFns:[]},void 0,Rt,void 0,!1,void 0,!1,void 0,void 0,void 0)};Object.entries(It).forEach((function(e){var t=g(e,2),a=t[0],o=t[1];return r.component(a,o)}));var Lt={types:{boolean:"el-switch",string:"el-input",number:"el-input-number",integer:"el-input-number"},common:{select:It.SelectWidget,radioGroup:It.RadioWidget,checkboxGroup:It.CheckboxesWidget}},Nt={name:"StringField",props:t,render:function(e){var r=this.$props,t=r.schema,a=r.uiSchema,o=ia(t)&&ua(t),s=ra({schema:t,uiSchema:a},(function(){var e="number"===t.type||"integer"===t.type;return{widget:o?Lt.common.select:e?Lt.types.number:Lt.types.string}}));return o&&(s.uiProps.enumOptions=o),e(Ot,{props:v(v({},this.$props),s)})}},Tt={name:"NumberField",props:t,render:function(e){return e(Nt,{props:this.$props,on:this.$listeners})}},zt={name:"IntegerField",props:t,render:function(e){return e(Nt,{props:this.$props,on:this.$listeners})}},qt={name:"BooleanField",props:t,render:function(e){var r=this.$props,t=r.schema,a=r.uiSchema,o=ua({enum:t.enum||[!0,!1]}),s=ra({schema:t,uiSchema:a},(function(){return{widget:"el-switch"}}));return s.uiProps.enumOptions=o,e(Ot,{props:v(v({},this.$props),s)})}};function Vt(e,r){if(Array.isArray(r))return Array.isArray(e)||(e=[]),r.map((function(r,t){return e[t]?Vt(e[t],r):r}));if(_(r)){var t=Object.assign({},e);return Object.keys(r).reduce((function(t,a){return t[a]=Vt(e?e[a]:{},r[a]),t}),t)}return r}function Ut(e,r,t){var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=arguments.length>4&&void 0!==arguments[4]&&arguments[4],s=_(e)?e:{},i=_(a)?a:{};"allOf"in s&&(s=vt(s,t,i));var n=r;if(_(n)&&_(s.default))n=A(n,s.default);else if("default"in s)n=s.default;else{if("$ref"in s){var l=O(s.$ref,t);return Ut(l,n,t,i,o)}if("dependencies"in s){var c=ht(s,t,i);return Ut(c,n,t,i,o)}if(na(s))n=s.items.map((function(e,a){return Ut(e,Array.isArray(r)?r[a]:void 0,t,i,o)}));else if("oneOf"in s){var u=s.oneOf[ct(i,s.oneOf)];if(s.properties&&u.properties){var h=A(s,u);delete h.oneOf,s=h}else s=u}else if("anyOf"in s){var d=s.anyOf[ct(i,s.anyOf)];if(s.properties&&d.properties){var p=A(s,d);delete p.anyOf,s=p}else s=d}}switch(void 0===n&&(n=s.default),k(s)){case"null":return null;case"object":return Object.keys(s.properties||{}).reduce((function(e,r){var a=Ut(s.properties[r],(n||{})[r],t,(i||{})[r],o);return(o||void 0!==a)&&(e[r]=a),e}),{});case"array":if(Array.isArray(n)&&(n=n.map((function(e,r){return Ut(s.items[r]||s.additionalItems||{},e,t,{},o)}))),Array.isArray(a)&&(n=a.map((function(e,r){return Ut(s.items,(n||{})[r],t,e,{},o)}))),s.minItems){if(la(s,t))return n||[];var m=n?n.length:0;if(s.minItems>m){var f=n||[],v=Array.isArray(s.items)?s.additionalItems:s.items,y=F(new Array(s.minItems-m),Ut(v,v.defaults,t,{},o));return f.concat(y)}}n=void 0===n?[]:n}return n}function Qt(e,r){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];if(!_(e))throw new Error("Invalid schema: ".concat(e));var o=bt(e,t,r),s=Ut(o,e.default,t,r,a);return void 0===r?s:_(r)||Array.isArray(r)?Vt(s,r):0===r||!1===r||""===r?r:r||s}var Bt={name:"ArrayOrderList",props:{vNodeList:{type:Array,default:[]},tupleItemsLength:{type:Number,default:0},addable:{type:Boolean,default:!0},sortable:{type:Boolean,default:!0},removable:{type:Boolean,default:!0},maxItems:{},minItems:{}},computed:{canAdd:function(){var e=this.$props,r=e.addable,t=e.maxItems,a=e.vNodeList;return!!r&&(void 0===t||a.lengtht)}},methods:{},render:function(e){var r=this;return this.vNodeList<=0&&!this.addable?null:e("div",{class:{arrayOrderList:!0}},this.vNodeList.map((function(t,a){var o=t.key,s=t.vNode,i=r.tupleItemsLength+a;return e("div",{key:o,class:{arrayOrderList_item:!0}},[e("div",{class:{arrayListItem_operateTool:!0}},[e("button",{style:v({},r.sortable?{}:{display:"none"}),attrs:{type:"button",disabled:!r.sortable||0===a},class:{arrayListItem_btn:!0,"arrayListItem_orderBtn-top":!0,"el-icon-caret-top":!0},on:{click:function(){r.$emit("onArrayOperate",{command:"moveUp",data:{index:i}})}}}),e("button",{style:v({},r.sortable?{}:{display:"none"}),attrs:{type:"button",disabled:!r.sortable||a===r.vNodeList.length-1},class:{arrayListItem_btn:!0,"arrayListItem_orderBtn-bottom":!0,"el-icon-caret-bottom":!0},on:{click:function(){r.$emit("onArrayOperate",{command:"moveDown",data:{index:i}})}}}),e("button",{style:v({},r.removable?{}:{display:"none"}),attrs:{type:"button",disabled:!r.canRemove},class:{arrayListItem_btn:!0,"arrayListItem_btn-delete":!0,"el-icon-close":!0},on:{click:function(){r.$emit("onArrayOperate",{command:"remove",data:{index:i}})}}})]),e("div",{class:{arrayListItem_content:!0}},[s])])})).concat([e("p",{style:v({},this.canAdd?{}:{display:"none"}),class:{arrayOrderList_bottomAddBtn:!0}},[e("el-button",{class:{bottomAddBtn:!0},props:{plain:!0,icon:"el-icon-plus"},on:{click:function(){r.$emit("onArrayOperate",{command:"add"})}}},[this.maxItems?"( ".concat(this.vNodeList.length," / ").concat(this.maxItems," )"):""])])]))}},Mt={name:"ArrayFieldNormal",props:v(v({},t),{},{itemsFormData:{type:Array}}),render:function(e){var r=this,t=this.$props,a=t.schema,o=t.uiSchema,s=t.errorSchema,n=ea({schema:a,uiSchema:o}),l=n.title,c=n.description,u=n.addable,h=n.sortable,d=n.removable,p=n.showTitle,m=n.showDescription,f=this.itemsFormData.map((function(t,n){return{key:t.key,vNode:e(Ft,{key:t.key,props:v(v({},r.$props),{},{schema:a.items,required:![].concat(a.items.type).includes("null"),uiSchema:o.items,errorSchema:s.items,curNodePath:i(r.curNodePath,n)})})}}));return e(St,{props:{title:l,description:c,showTitle:p,showDescription:m}},[e(Bt,{props:{vNodeList:f,addable:u,sortable:h,removable:d,maxItems:a.maxItems,minItems:a.minItems},on:this.$listeners})])}},Kt={name:"ArrayFieldMultiSelect",props:v(v({},t),{},{itemsFormData:{type:Array,default:function(){return[]}}}),render:function(e){var r=this,t=ra({schema:this.schema,uiSchema:this.schema},(function(){var e=ua(bt(r.schema.items,r.rootSchema,r.itemsFormData));return{widget:Dt,enumOptions:e}}));return e(Ot,{props:v(v({},this.$props),t)})}},Ht={name:"ArrayFieldTuple",props:v(v({},t),{},{itemsFormData:{type:Array,default:function(){return[]}}}),created:function(){this.fixItemsFormData()},methods:{fixItemsFormData:function(){var e=!Array.isArray(this.itemsFormData);if(e||this.itemsFormData.lengtha?1:0].push(r),e}),[[],[]])),P=g[0].map((function(t,a){return e(Ft,{key:t.key,props:v(v({},r.$props),{},{required:![].concat(s.items[a].type).includes("null"),schema:s.items[a],uiSchema:n.items?n.items[a]:{},errorSchema:l.items?l.items[a]:{},curNodePath:i(r.curNodePath,a)})})})),w=g[1].map((function(t,a){return{key:t.key,vNode:e(Ft,{key:t.key,props:v(v({},r.$props),{},{schema:s.additionalItems,required:![].concat(s.additionalItems.type).includes("null"),uiSchema:n.additionalItems,errorSchema:l.additionalItems,curNodePath:i(r.curNodePath,a+s.items.length)})})}})),E=(void 0===d||d)&&ca(this.schema);return e(St,{props:{title:u,description:h,showTitle:f,showDescription:y}},[].concat(b(P),[e(Bt,{props:{vNodeList:w,tupleItemsLength:s.items.length,addable:E,sortable:p,removable:m,maxItems:s.maxItems,minItems:s.minItems},on:this.$listeners})]))}},Wt={name:"ArrayField",props:t,data:function(){return{formKeys:this.getCuFormData().map((function(){return L()}))}},computed:{itemsFormData:function(){var e=this.$data.formKeys;return this.curFormData.map((function(r,t){return{key:e[t],value:r}}))},curFormData:function(){return this.getCuFormData()}},watch:{curFormData:function(e,r){e!==r&&(this.formKeys=e.map((function(){return L()})))}},methods:{getCuFormData:function(){var e=this.$props;return c(e.rootFormData,e.curNodePath)},getNewFormDataRow:function(){var e=this.$props,r=e.schema,t=e.rootSchema,a=r.items;return na(this.schema)&&ca(this.schema)&&(a=r.additionalItems),Qt(a,void 0,t)},handleArrayOperate:function(e){var r=e.command,t=e.data,a={moveUp:function(e,r){!function(e,r){if(0===r)return!1;var t=[e[r],e[r-1]];e.splice.apply(e,[r-1,2].concat(t))}(e,r.index)},moveDown:function(e,r){!function(e,r){if(r===e.length-1)return!1;var t=e[r],a=[e[r+1],t];e.splice.apply(e,[r,2].concat(a))}(e,r.index)},remove:function(e,r){!function(e,r){e.splice(r,1).length}(e,r.index)},add:function(e,r){var t=r.newRowData;e.push(t)},batchPush:function(e,r){r.pushArray.forEach((function(r){e.push(r)}))},setNewTarget:function(e,r){l(r.formData,r.nodePath,r.newTarget)}}[r];if(!a)throw new Error("错误 - 未知的操作:[".concat(r,"]"));var o=t,s=t;"add"===r?(o={newRowData:this.getNewFormDataRow()},s={newRowData:L()}):"batchPush"===r?s={pushArray:o.pushArray.map((function(e){return L()}))}:"setNewTarget"===r&&(o={formData:this.rootFormData,nodePath:this.curNodePath,newTarget:o.newTarget},s={formData:this.$data,nodePath:"formKeys",newTarget:o.newTarget.map((function(e){return L()}))}),a.apply(this,[this.$data.formKeys,s]),a.apply(this,[this.curFormData,o])}},render:function(e){var r=this.$props,t=r.schema,a=r.rootSchema,o=r.rootFormData,s=r.curNodePath;if(!t.hasOwnProperty("items"))throw new Error("[".concat(t,"] 请先定义 items属性"));var i=Mt;return na(t)?i=Ht:la(t,a)&&(i=Kt),e("div",[e(i,{props:v({itemsFormData:this.itemsFormData},this.$props),class:p({},T(i.name),!0),on:{onArrayOperate:this.handleArrayOperate}}),this.needValidFieldGroup?e(Ot,{class:{validateWidget:!0,"validateWidget-array":!0},props:{schema:Object.entries(this.$props.schema).reduce((function(e,r){var t=g(r,2),a=t[0],o=t[1];return"items"!==a&&(e[a]=o),e}),{}),errorSchema:this.errorSchema,curNodePath:s,rootFormData:o}}):null])}},Jt={name:"SelectLinkageField",props:v(v({},t),{},{combiningType:{type:String,default:"anyOf"},selectList:{type:Array,require:!0}}),data:function(){return{curSelectIndex:this.computedCurSelectIndexByFormData(c(this.rootFormData,this.curNodePath))}},methods:{computedCurSelectIndexByFormData:function(e){var r=ct(e,this.selectList,this.rootSchema);return 0!==r?r:this.curSelectIndex||0},getSelectBoxVnode:function(){var e=this,r=ra({schema:{},uiSchema:this.uiSchema["".concat(this.combiningType,"Select")]||{}},(function(){return{widget:"SelectWidget"}}));Object.assign(r,{label:r.label||this.schema.title,description:r.description||this.schema.description});var t=this.uiSchema[this.combiningType]||[];return r.uiProps.enumOptions=this.selectList.map((function(e,r){return{label:t[r]&&t[r]["ui:title"]||e.title||"选项 ".concat(r+1),value:r}})),this.$createElement(Ot,{class:p({},"fieldSelect_".concat(this.combiningType),!0),props:v({isFormData:!1,curValue:this.curSelectIndex},r),on:{onChange:function(r){e.curSelectIndex=r}}})}},watch:{curSelectIndex:function(e,r){var t=c(this.rootFormData,this.curNodePath);if("object"===D(t)){var a=bt(this.selectList[r],this.rootSchema,t);if("object"===a.type||a.properties)for(var o in a.properties)Object.prototype.hasOwnProperty.call(a.properties,o)&&n(t,o)}var s=Qt(this.selectList[e],void 0,this.rootSchema);"object"===D(s)?Object.entries(s).forEach((function(e){var r=g(e,2),a=r[0],o=r[1];l(t,a,o)})):l(this.rootFormData,this.curNodePath,s||t)}},render:function(e){var r,t=this,a=o(this.$props.curNodePath),s=null;if(("object"===this.schema.type||this.schema.properties)&&!function(e){for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r))return!1;return!0}(this.schema.properties)){var i,n=Object.assign({},this.schema);delete n[this.combiningType],s=e(Ft,{class:(i={},p(i,"".concat(this.combiningType,"_originBox"),!0),p(i,"".concat(a,"-originBox"),!0),i),props:v(v({},this.$props),{},{schema:n})})}var l=[this.getSelectBoxVnode()],c=this.selectList[this.curSelectIndex];if(c){delete(c=Object.assign({},this.schema,c))[this.combiningType];var u=N(Yt(this.uiSchema),(function(e){return e===t.combiningType?void 0:"ui:".concat(e)})),h=N(ta(this.errorSchema),(function(e){return e===t.combiningType?void 0:"err:".concat(e)}));l.push(e(Ft,{props:v(v({},this.$props),{},{schema:c,required:this.required,uiSchema:v(v({"ui:showTitle":!1,"ui:showDescription":!1},u),(this.uiSchema[this.combiningType]||[])[this.curSelectIndex]),errorSchema:v(v({},h),(this.errorSchema[this.combiningType]||[])[this.curSelectIndex])})}))}return l.push(e(Ot,{class:p({validateWidget:!0},"validateWidget-".concat(this.combiningType),!0),props:{schema:this.schema,errorSchema:this.errorSchema,curNodePath:this.curNodePath,rootFormData:this.rootFormData}})),e("div",[s,e("div",{class:(r={appendCombining_box:!0},p(r,"".concat(this.combiningType,"_appendBox"),!0),p(r,"".concat(a,"-appendBox"),!0),r)},[l])])}},Gt={array:Wt,boolean:qt,integer:zt,number:Tt,object:xt,string:Nt,null:{render:function(){return null}},anyOf:{name:"AnyOfField",functional:!0,render:function(e,r){var t=r.data,a=t.props,o=y(t,["props"]);return e(Jt,v(v({},o),{},{props:v(v({},a),{},{combiningType:"anyOf",selectList:a.schema.anyOf})}),r.children)}},oneOf:{name:"oneOfField",functional:!0,render:function(e,r){var t=r.data,a=t.props,o=y(t,["props"]);return e(Jt,v(v({},o),{},{props:v(v({},a),{},{combiningType:"oneOf",selectList:a.schema.oneOf})}),r.children)}}};function Zt(e){var r=e.schema,t=void 0===r?{}:r,a=e.uiSchema,o=void 0===a?{}:a,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){};return o["ui:widget"]?{widget:o["ui:widget"]}:s({schema:t,uiSchema:o})}function Xt(e){var r=e.schema,t=void 0===r?{}:r,a=e.uiSchema,o=(void 0===a?{}:a)["ui:field"];if("function"==typeof o||"object"===d(o))return o;if("string"==typeof o)return o;var s=Gt[k(t)];if(s)return s;if(!s&&(t.anyOf||t.oneOf))return null;throw new Error("不支持的field类型 ".concat(t.type))}function Yt(e){return Object.keys(e).filter((function(e){return 0===e.indexOf("ui:")})).reduce((function(r,t){var a=e[t];return"ui:options"===t&&_(a)?v(v({},r),a):v(v({},r),{},p({},t.substring(3),a))}),{})}function ea(e){var r=e.schema,t=e.uiSchema,a={};return void 0!==r.multipleOf&&(a.step=r.multipleOf),(r.minimum||0===r.minimum)&&(a.min=r.minimum),(r.maximum||0===r.maximum)&&(a.max=r.maximum),v(v({title:r.title,description:r.description,hidden:"HiddenWidget"===t["ui:widget"]},a),Yt(t))}function ra(e){var r=e.schema,t=e.uiSchema,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},o=v(v({},ea({schema:r,uiSchema:t})),Zt({schema:r,uiSchema:t},a)),s=o.widget,i=o.title,n=o.labelWidth,l=o.description,c=o.attrs,u=o.emptyValue,h=y(o,["widget","title","labelWidth","description","attrs","emptyValue"]);return{widget:s,label:i,labelWidth:n,description:l,attrs:c,emptyValue:u,uiProps:h}}function ta(e){return Object.keys(e).filter((function(e){return 0===e.indexOf("err:")})).reduce((function(r,t){var a=e[t];return"err:options"===t&&_(a)?v(v({},r),a):v(v({},r),{},p({},t.substring(4),a))}),{})}function aa(e,r){if(!Array.isArray(r))return e;var t,a=function(e){return e.reduce((function(e,r){return e[r]=!0,e}),{})},o=a(e),s=r.filter((function(e){return"*"===e||o[e]})),i=a(s),n=e.filter((function(e){return!i[e]})),l=s.indexOf("*");if(-1===l){if(n.length)throw new Error("uiSchema order list does not contain ".concat((t=n).length>1?"properties '".concat(t.join("', '"),"'"):"property '".concat(t[0],"'")));return s}if(l!==s.lastIndexOf("*"))throw new Error("uiSchema order list contains more than one wildcard item");var c=b(s);return c.splice.apply(c,[l,1].concat(b(n))),c}function oa(e){return Array.isArray(e.enum)&&1===e.enum.length||e.hasOwnProperty("const")}function sa(e){if(Array.isArray(e.enum)&&1===e.enum.length)return e.enum[0];if(e.hasOwnProperty("const"))return e.const;throw new Error("schema cannot be inferred as a constant")}function ia(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=bt(e,r),a=t.oneOf||t.anyOf;return!!Array.isArray(t.enum)||!!Array.isArray(a)&&a.every((function(e){return oa(e)}))}function na(e){return Array.isArray(e.items)&&e.items.length>0&&e.items.every((function(e){return _(e)}))}function la(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return!(!e.uniqueItems||!e.items)&&ia(e.items,r)}function ca(e){return e.additionalItems,_(e.additionalItems)}function ua(e){return e.enum?e.enum.map((function(r,t){return{label:e.enumNames&&e.enumNames[t]||String(r),value:r}})):(e.oneOf||e.anyOf).map((function(e,r){var t=sa(e);return{label:e.title||String(t),value:t}}))}var ha=Object.freeze({__proto__:null,getUiWidget:Zt,getUiField:Xt,getUserUiOptions:Yt,getUiOptions:ea,getWidgetConfig:ra,getUserErrOptions:ta,orderProperties:aa,isConstant:oa,toConstant:sa,isSelect:ia,isFixedItems:na,isMultiSelect:la,allowAdditionalItems:ca,optionsList:ua}),da={formFooter:{type:Object,default:function(){return{show:!0,okBtn:"保存",cancelBtn:"取消"}}},value:{type:null,default:function(){return{}},required:!0},formProps:{type:Object,default:function(){return{}}},schema:{type:Object,default:function(){return{}},required:!0},uiSchema:{type:Object,default:function(){return{}}},customFormats:{type:Object,default:function(){return{}}},extraErrors:{type:Object,default:function(){return{}}},errorSchema:{type:Object,default:function(){return{}}}},pa={name:"FormFooter",props:{okBtn:{type:String,default:"保存"},cancelBtn:{type:String,default:"取消"}}};const ma="undefined"!=typeof navigator&&/msie [6-9]\\b/.test(navigator.userAgent.toLowerCase());function fa(e){return(e,r)=>function(e,r){const t=ma?r.media||"default":e,a=ya[t]||(ya[t]={ids:new Set,styles:[]});if(!a.ids.has(e)){a.ids.add(e);let t=r.source;if(r.map&&(t+="\n/*# sourceURL="+r.map.sources[0]+" */",t+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(r.map))))+" */"),a.element||(a.element=document.createElement("style"),a.element.type="text/css",r.media&&a.element.setAttribute("media",r.media),void 0===va&&(va=document.head||document.getElementsByTagName("head")[0]),va.appendChild(a.element)),"styleSheet"in a.element)a.styles.push(t),a.element.styleSheet.cssText=a.styles.filter(Boolean).join("\n");else{const e=a.ids.size-1,r=document.createTextNode(t),o=a.element.childNodes;o[e]&&a.element.removeChild(o[e]),o.length?a.element.insertBefore(r,o[e]):a.element.appendChild(r)}}}(e,r)}let va;const ya={};const ga=pa;var ba=function(){var e=this,r=e.$createElement,t=e._self._c||r;return t("el-form-item",{class:e.$style.item},[t("el-button",{attrs:{size:"small"},on:{click:function(r){return e.$emit("onCancel")}}},[e._v(e._s(e.cancelBtn))]),e._v(" "),t("el-button",{attrs:{size:"small",type:"primary"},on:{click:function(r){return e.$emit("onSubmit")}}},[e._v(e._s(e.okBtn))])],1)};ba._withStripped=!0;const Pa=Pt({render:ba,staticRenderFns:[]},(function(e){e&&(e("data-v-431cede5_0",{source:"\n.src-JsonSchemaForm-item-e4q8 {\n text-align: right;\n border-top: 1px solid rgba(0, 0, 0, 0.08);\n padding-top: 10px;\n}\n",map:{version:3,sources:["/Users/ryuushun/liujun/git/vue-element-schema-form/packages/lib/src/JsonSchemaForm/FormFooter.vue"],names:[],mappings:";AAwBA;IACA,iBAAA;IACA,yCAAA;IACA,iBAAA;AACA",file:"FormFooter.vue",sourcesContent:['\n\n