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AC,EAOV,EAAS,CACZ,OAAO,EACP,OAPA,EADG,IAAkC,IAAtB,EAAS,SACf,KAAK,MAAM,KAAK,UAAU,IAE1B,EAMT,KAAK,EACL,KAAK,GAGN,OAAI,SACH,EAAO,MAAQ,IAAI,MAAM,iCAClB,GAG8D,iBAAhD,IAAV,EAAwB,YAAc,QAAQ,KAAyC,iBAAV,GAAuC,iBAAV,GAAgC,OAAV,GAC3I,EAAO,MAAQ,IAAI,MAAM,gCAClB,GAGM,KAAV,EACI,EAGa,iBAAV,GAAuC,iBAAV,EACnC,eAAe,EAAQ,IAC1B,EAAO,KAAM,EACb,EAAO,KAAM,EACN,IAER,EAAO,OAAO,GAAS,EAChB,GAGJ,aAAiB,MACb,qBAAqB,EAAQ,EAAO,QAAS,GAGiB,iBAAhD,IAAV,EAAwB,YAAc,QAAQ,KAA0B,aAAiB,OAKrG,EAAO,MAAQ,IAAI,MAAM,oBAClB,GALN,EAAS,sBAAsB,EAAQ,EAAO,QAAS,EAMzD,CAEA,OAAO,QAAU","file":"/npm/validol@1.2.2/lib/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/validol@1.2.2/lib/index.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","'use strict';\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol ? \"symbol\" : typeof obj; };\n\nfunction validationProp(object, prop) {\n\tif (object[prop] !== undefined) {\n\t\treturn true;\n\t}\n\treturn false;\n}\n\n\nfunction validationArrayProps(object, props) {\n\tvar propsName = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'props';\n\tvar defaultValue = arguments[3];\n\n\tvar result = {\n\t\terror: false,\n\t\tresult: object,\n\t\tall: true,\n\t\tany: false\n\t};\n\n\tprops.forEach(function (prop) {\n\t\tif (typeof prop === 'string' || typeof prop === 'number') {\n\t\t\tif (validationProp(object, prop)) {\n\t\t\t\tresult.any = true;\n\t\t\t} else {\n\t\t\t\tresult.result[prop] = defaultValue;\n\t\t\t\tresult.all = false;\n\t\t\t}\n\t\t}\n\t\tif ((typeof prop === 'undefined' ? 'undefined' : _typeof(prop)) === 'object' && prop !== null) {\n\t\t\t/* eslint-disable no-use-before-define */\n\t\t\tvar localResult = validationObjectProps(result.result, prop, propsName, defaultValue);\n\t\t\t/* eslint-enable no-use-before-define */\n\t\t\tif (localResult.all === false) {\n\t\t\t\tresult.all = false;\n\t\t\t}\n\t\t\tif (localResult.any === true) {\n\t\t\t\tresult.any = true;\n\t\t\t}\n\t\t\tresult.result = localResult.result;\n\t\t}\n\n\t\treturn true;\n\t});\n\n\treturn result;\n}\n\nfunction validationObjectProps(object, props) {\n\tvar propsName = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'props';\n\tvar defaultValue = arguments[3];\n\n\tvar result = {\n\t\terror: false,\n\t\tresult: object,\n\t\tall: true,\n\t\tany: false\n\t};\n\n\tObject.keys(props).forEach(function (key) {\n\t\tif ({}.hasOwnProperty.call(props, key)) {\n\t\t\tif (validationProp(object, key)) {\n\t\t\t\tresult.any = true;\n\t\t\t\tif (!props[key] || typeof props[key] !== 'string' && typeof props[key] !== 'number' && _typeof(props[key]) !== 'object' || props[key] === null) {\n\t\t\t\t\tresult.all = false;\n\t\t\t\t\tresult.error = new Error(propsName + '.' + key + ' argument is not valid!');\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\tif (typeof props[key] === 'string' || typeof props[key] === 'number') {\n\t\t\t\t\tif (_typeof(result.result[key]) !== 'object' || result.result[key] !== object[key] || result.result[key] === null) {\n\t\t\t\t\t\tresult.all = false;\n\t\t\t\t\t\tif (object[key] === null || object[key] === undefined) {\n\t\t\t\t\t\t\tresult.result[key] = Object();\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tresult.result[key] = Object(object[key]);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tresult.result[key][props[key]] = defaultValue;\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t\tif (validationProp(object[key], props[key])) {\n\t\t\t\t\t\tresult.any = true;\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t\tresult.all = false;\n\t\t\t\t\tresult.result[key] = Object(object[key]);\n\t\t\t\t\tresult.result[key][props[key]] = defaultValue;\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\n\t\t\t\tif (props[key] instanceof Array) {\n\t\t\t\t\tif (_typeof(result.result[key]) !== 'object' || result.result[key] !== object[key] || result.result[key] === null) {\n\t\t\t\t\t\tif (object[key] === null || object[key] === undefined) {\n\t\t\t\t\t\t\tresult.result[key] = Object();\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tresult.result[key] = Object(object[key]);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tvar localResult = validationArrayProps(result.result[key], props[key], propsName + '.' + key, defaultValue);\n\t\t\t\t\tif (localResult.error !== false) {\n\t\t\t\t\t\tresult.error = localResult.error;\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t\tif (localResult.all === false) {\n\t\t\t\t\t\tresult.all = false;\n\t\t\t\t\t}\n\t\t\t\t\tif (localResult.any === true) {\n\t\t\t\t\t\tresult.any = true;\n\t\t\t\t\t}\n\t\t\t\t\tresult.result[key] = localResult.result;\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\n\t\t\t\tif (_typeof(props[key]) === 'object' && props[key] !== null) {\n\t\t\t\t\tif (_typeof(result.result[key]) !== 'object' || result.result[key] !== object[key] || result.result[key] === null) {\n\t\t\t\t\t\tif (object[key] === null || object[key] === undefined) {\n\t\t\t\t\t\t\tresult.result[key] = Object();\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tresult.result[key] = Object(object[key]);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tvar _localResult = validationObjectProps(result.result[key], props[key], propsName + '.' + key, defaultValue);\n\t\t\t\t\tif (_localResult.all === false) {\n\t\t\t\t\t\tresult.all = false;\n\t\t\t\t\t}\n\t\t\t\t\tif (_localResult.any === true) {\n\t\t\t\t\t\tresult.any = true;\n\t\t\t\t\t}\n\t\t\t\t\tresult.result[key] = _localResult.result;\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tresult.all = false;\n\t\t\t\tif (_typeof(result.result[key]) !== 'object' || result.result[key] !== object[key] || result.result[key] === null) {\n\t\t\t\t\tif (object[key] === null || object[key] === undefined) {\n\t\t\t\t\t\tresult.result[key] = Object();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tresult.result[key] = Object(object[key]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (typeof props[key] === 'string' || typeof props[key] === 'number') {\n\t\t\t\t\tresult.result[key][props[key]] = defaultValue;\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\tif (props[key] instanceof Array) {\n\t\t\t\t\tresult.result[key] = validationArrayProps(result.result[key], props[key], propsName + '.' + key, defaultValue).result;\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\n\t\t\t\tif (_typeof(props[key]) === 'object' && props[key] !== null) {\n\t\t\t\t\tvar _localResult2 = validationObjectProps(result.result[key], props[key], propsName + '.' + key, defaultValue);\n\t\t\t\t\tif (_localResult2.all === false) {\n\t\t\t\t\t\tresult.all = false;\n\t\t\t\t\t}\n\t\t\t\t\tif (_localResult2.any === true) {\n\t\t\t\t\t\tresult.any = true;\n\t\t\t\t\t}\n\t\t\t\t\tresult.result[key] = _localResult2.result;\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t});\n\treturn result;\n}\n\nfunction validol(originalObject) {\n\tvar props = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';\n\tvar defaultValue = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : undefined;\n\tvar settings = arguments[3];\n\n\tvar object = {};\n\tif (settings && settings.mutation === false) {\n\t\tobject = JSON.parse(JSON.stringify(originalObject));\n\t} else {\n\t\tobject = originalObject;\n\t}\n\n\tvar result = {\n\t\terror: false,\n\t\tresult: object,\n\t\tall: false,\n\t\tany: false\n\t};\n\n\tif (originalObject === undefined || originalObject === null) {\n\t\tresult.error = new Error('object argument is not valid!');\n\t\treturn result;\n\t}\n\n\tif ((typeof props === 'undefined' ? 'undefined' : _typeof(props)) !== 'object' && typeof props !== 'string' && typeof props !== 'number' || props === null) {\n\t\tresult.error = new Error('props argument is not valid!');\n\t\treturn result;\n\t}\n\n\tif (props === '') {\n\t\treturn result;\n\t}\n\n\tif (typeof props === 'string' || typeof props === 'number') {\n\t\tif (validationProp(object, props)) {\n\t\t\tresult.all = true;\n\t\t\tresult.any = true;\n\t\t\treturn result;\n\t\t}\n\t\tresult.result[props] = defaultValue;\n\t\treturn result;\n\t}\n\n\tif (props instanceof Array) {\n\t\treturn validationArrayProps(object, props, 'props', defaultValue);\n\t}\n\n\tif ((typeof props === 'undefined' ? 'undefined' : _typeof(props)) === 'object' && !(props instanceof Array)) {\n\t\tresult = validationObjectProps(object, props, 'props', defaultValue);\n\t\treturn result;\n\t}\n\n\tresult.error = new Error('undeclared error');\n\treturn result;\n}\n\nmodule.exports = validol;"]}