From 1514691aa70ed0203562f851da694d6cde956d93 Mon Sep 17 00:00:00 2001 From: Nick Randall Date: Fri, 25 Mar 2016 02:50:48 -0600 Subject: [PATCH] 0.0.3 --- dist/bundle.js | 2 +- dist/bundle.js.map | 2 +- package.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dist/bundle.js b/dist/bundle.js index 1d1c925..f704d34 100644 --- a/dist/bundle.js +++ b/dist/bundle.js @@ -1,4 +1,4 @@ -!function(e,r){"object"==typeof exports&&"object"==typeof module?module.exports=r():"function"==typeof define&&define.amd?define([],r):"object"==typeof exports?exports.KotoConfig=r():e.KotoConfig=r()}(this,function(){return function(e){function r(a){if(t[a])return t[a].exports;var s=t[a]={exports:{},id:a,loaded:!1};return e[a].call(s.exports,s,s.exports,r),s.loaded=!0,s.exports}var t={};return r.m=e,r.c=t,r.p="/dist/",r(0)}([function(e,r,t){"use strict";function a(e){var r=t(1),a=new r;return a.addKeyword("color",{type:"string",validate:function(e,r){var t=/^#([0-9a-f]{3})$/,a=/^#([0-9a-f]{6})$/,s=/^rgb\(\s*([-+]?\d+)\s*,\s*([-+]?\d+)\s*,\s*([-+]?\d+)\s*\)$/,o=/^rgb\(\s*([-+]?\d+(?:\.\d+)?)%\s*,\s*([-+]?\d+(?:\.\d+)?)%\s*,\s*([-+]?\d+(?:\.\d+)?)%\s*\)$/,i=/^rgba\(\s*([-+]?\d+)\s*,\s*([-+]?\d+)\s*,\s*([-+]?\d+)\s*,\s*([-+]?\d+(?:\.\d+)?)\s*\)$/,n=/^rgba\(\s*([-+]?\d+(?:\.\d+)?)%\s*,\s*([-+]?\d+(?:\.\d+)?)%\s*,\s*([-+]?\d+(?:\.\d+)?)%\s*,\s*([-+]?\d+(?:\.\d+)?)\s*\)$/,l=/^hsl\(\s*([-+]?\d+(?:\.\d+)?)\s*,\s*([-+]?\d+(?:\.\d+)?)%\s*,\s*([-+]?\d+(?:\.\d+)?)%\s*\)$/,c=/^hsla\(\s*([-+]?\d+(?:\.\d+)?)\s*,\s*([-+]?\d+(?:\.\d+)?)%\s*,\s*([-+]?\d+(?:\.\d+)?)%\s*,\s*([-+]?\d+(?:\.\d+)?)\s*\)$/,h=["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkgrey","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkslategrey","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dimgrey","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","green","greenyellow","grey","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightgrey","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightslategrey","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","slategrey","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"],u=String(r).trim().toLowerCase();return t.exec(u)||a.exec(u)||s.exec(u)||o.exec(u)||i.exec(u)||n.exec(u)||l.exec(u)||c.exec(u)||h.indexOf(u)>=0||"transparent"===u}}),function(r){var t=r.prototype.config;r.prototype.config=function(r,s){if(e.hasOwnProperty(r)){var o=a.validate(e[r],s);if(o)return t.call(this,r,s);throw Error("invald config")}return t.call(this,r,s)}}}r.__esModule=!0,r["default"]=a},function(module,exports,__webpack_require__){var require,require;(function(global){!function(e){module.exports=e()}(function(){var define,module,exports;return function e(r,t,a){function s(i,n){if(!t[i]){if(!r[i]){var l="function"==typeof require&&require;if(!n&&l)return require(i,!0);if(o)return o(i,!0);var c=new Error("Cannot find module '"+i+"'");throw c.code="MODULE_NOT_FOUND",c}var h=t[i]={exports:{}};r[i][0].call(h.exports,function(e){var t=r[i][1][e];return s(t?t:e)},h,h.exports,e,r,t,a)}return t[i].exports}for(var o="function"==typeof require&&require,i=0;i=1&&12>=t&&a>=1&&a<=m[t]}function o(e,r){var t=e.match(v);if(!t)return!1;var a=t[1],s=t[2],o=t[3],i=t[5];return 23>=a&&59>=s&&59>=o&&(!r||i)}function i(e){var r=e.split(w);return s(r[0])&&o(r[1],!0)}function n(e){return e.length<=255&&y.test(e)}function l(e){return j.test(e)&&g.test(e)}function c(e){try{return new RegExp(e),!0}catch(r){return!1}}function h(e,r){return e&&r?e>r?1:r>e?-1:e===r?0:void 0:void 0}function u(e,r){return e&&r&&(e=e.match(v),r=r.match(v),e&&r)?(e=e[1]+e[2]+e[3]+(e[4]||""),r=r[1]+r[2]+r[3]+(r[4]||""),e>r?1:r>e?-1:e===r?0:void 0):void 0}function f(e,r){if(e&&r){e=e.split(w),r=r.split(w);var t=h(e[0],r[0]);if(void 0!==t)return t||u(e[1],r[1])}}var d=e("./util"),p=/^\d\d\d\d-(\d\d)-(\d\d)$/,m=[0,31,29,31,30,31,30,31,31,30,31,30,31],v=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d:\d\d)?$/i,y=/^[a-z](?:(?:[-0-9a-z]{0,61})?[0-9a-z])?(\.[a-z](?:(?:[-0-9a-z]{0,61})?[0-9a-z])?)*$/i,g=/^(?:[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,P=/^(?:urn\:uuid\:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,b=/^(?:\/(?:[^~\/]|~0|~1)+)*(?:\/)?$|^\#(?:\/(?:[a-z0-9_\-\.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)+)*(?:\/)?$/i,E=/^(?:0|[1-9][0-9]*)(?:\#|(?:\/(?:[^~\/]|~0|~1)+)*(?:\/)?)$/;r.exports=a,a.fast={date:/^\d\d\d\d-[0-1]\d-[0-3]\d$/,time:/^[0-2]\d:[0-5]\d:[0-5]\d(?:\.\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(?:\.\d+)?(?:z|[+-]\d\d:\d\d)$/i,uri:/^(?:[a-z][a-z0-9+-.]*)?(?:\:|\/)\/?[^\s]*$/i,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:y,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:c,uuid:P,"json-pointer":b,"relative-json-pointer":E},a.full={date:s,time:o,"date-time":i,uri:l,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:n,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:c,uuid:P,"json-pointer":b,"relative-json-pointer":E},a.compare={date:h,time:u,"date-time":f};var w=/t|\s/i,j=/\/|\:/},{"./util":10}],6:[function(require,module,exports){"use strict";function compile(schema,root,localRefs,baseId){function localCompile(_schema,_root,localRefs,baseId){var isRoot=!_root||_root&&_root.schema==_schema;if(_root.schema!=root.schema)return compile.call(self,_schema,_root,localRefs,baseId);var $async=_schema.$async===!0;$async&&!opts.transpile&&async.setup(opts);var sourceCode=validateGenerator({isTop:!0,schema:_schema,isRoot:isRoot,baseId:baseId,root:_root,schemaPath:"",errSchemaPath:"#",errorPath:'""',RULES:RULES,validate:validateGenerator,util:util,resolve:resolve,resolveRef:resolveRef,usePattern:usePattern,useDefault:useDefault,useCustomRule:useCustomRule,opts:opts,formats:formats,self:self});sourceCode=vars(refVal,refValCode)+vars(patterns,patternCode)+vars(defaults,defaultCode)+vars(customRules,customRuleCode)+sourceCode,opts.beautify&&(beautify?sourceCode=beautify(sourceCode,opts.beautify):console.error('"npm install js-beautify" to use beautify option'));var validate,validateCode,transpile=opts._transpileFunc;try{validateCode=$async&&transpile?transpile(sourceCode):sourceCode,eval(validateCode),refVal[0]=validate}catch(e){throw console.error("Error compiling schema, function code:",validateCode),e}return validate.schema=_schema,validate.errors=null,validate.refs=refs,validate.refVal=refVal,validate.root=isRoot?validate:_root,$async&&(validate.async=!0),transpile&&(validate.sourceCode=sourceCode),validate}function resolveRef(e,r,t){r=resolve.url(e,r);var a,s,o=refs[r];if(void 0!==o)return a=refVal[o],s="refVal["+o+"]",resolvedRef(a,s);if(!t){var i=root.refs[r];if(void 0!==i)return a=root.refVal[i],s=addLocalRef(r,a),resolvedRef(a,s)}s=addLocalRef(r);var n=resolve.call(self,localCompile,root,r);if(!n){var l=localRefs&&localRefs[r];l&&(n=resolve.inlineRef(l,opts.inlineRefs)?l:compile.call(self,l,root,localRefs,e))}return n?(replaceLocalRef(r,n),resolvedRef(n,s)):void 0}function addLocalRef(e,r){var t=refVal.length;return refVal[t]=r,refs[e]=t,"refVal"+t}function replaceLocalRef(e,r){var t=refs[e];refVal[t]=r}function resolvedRef(e,r){return"object"==typeof e?{code:r,schema:e,inline:!0}:{code:r,async:e&&e.async}}function usePattern(e){var r=patternsHash[e];return void 0===r&&(r=patternsHash[e]=patterns.length,patterns[r]=e),"pattern"+r}function useDefault(e){switch(typeof e){case"boolean":case"number":return""+e;case"string":return util.toQuotedString(e);case"object":if(null===e)return"null";var r=stableStringify(e),t=defaultsHash[r];return void 0===t&&(t=defaultsHash[r]=defaults.length,defaults[t]=e),"default"+t}}function useCustomRule(e,r,t,a){var s,o=e.definition.compile,i=e.definition.inline,n=e.definition.macro;o?s=o.call(self,r,t):n?(s=n.call(self,r,t),opts.validateSchema!==!1&&self.validateSchema(s,!0)):s=i?i.call(self,a,e.keyword,r,t):e.definition.validate;var l=customRules.length;return customRules[l]=s,{code:"customRule"+l,validate:s}}var self=this,opts=this._opts,refVal=[void 0],refs={},patterns=[],patternsHash={},defaults=[],defaultsHash={},customRules=[];root=root||{schema:schema,refVal:refVal,refs:refs};var formats=this._formats,RULES=this.RULES;return localCompile(schema,root,localRefs,baseId)}function patternCode(e,r){return"var pattern"+e+" = new RegExp("+util.toQuotedString(r[e])+");"}function defaultCode(e){return"var default"+e+" = defaults["+e+"];"}function refValCode(e,r){return r[e]?"var refVal"+e+" = refVal["+e+"];":""}function customRuleCode(e){return"var customRule"+e+" = customRules["+e+"];"}function vars(e,r){if(!e.length)return"";for(var t="",a=0;as;)t++,r=e.charCodeAt(s++),r>=55296&&56319>=r&&a>s&&(r=e.charCodeAt(s),56320==(64512&r)&&s++);return t}function u(e,r){r+="[^0-9]";var t=e.match(new RegExp(r,"g"));return t?t.length:0}function f(e,r,t){return r+="([^0-9])",t=t.replace(/\$/g,"$$$$"),e.replace(new RegExp(r,"g"),t+"$1")}function d(e){return e.replace(R,"").replace(k,"").replace(O,"if (!($1))")}function p(e,r){var t=e.match(A);return t&&2===t.length?r?e.replace(q,"").replace(D,V):e.replace(I,"").replace(L,C):e}function m(e,r){for(var t in e)if(r[t])return!0}function v(e){return"'"+c(e)+"'"}function y(e,r,t,a){var s=t?"'/' + "+r+(a?"":".replace(/~/g, '~0').replace(/\\//g, '~1')"):a?"'[' + "+r+" + ']'":"'[\\'' + "+r+" + '\\']'";return b(e,s)}function g(e,r,t){var a=v(t?"/"+j(r):l(r));return b(e,a)}function P(e,r,t){var a=e.match(z);if(!a)throw new Error("Invalid relative JSON-pointer: "+e);var s=+a[1],o=a[2];if("#"==o){if(s>=r)throw new Error("Cannot access property/index "+s+" levels up, current level is "+r);return t[r-s]}if(s>r)throw new Error("Cannot access data "+s+" levels up, current level is "+r);var i="data"+(r-s||"");if(!o)return i;for(var n=i,c=o.split("/"),h=0;h",j="result"+s,x=e.opts.v5&&i.$data,$=x?e.util.getData(i.$data,o,e.dataPathArr):i;if(x&&(a+=" var schema"+s+" = "+$+"; ",$="schema"+s),E){var _=e.util.getData(b.$data,o,e.dataPathArr),S="exclusive"+s,R="op"+s,k="' + "+R+" + '";a+=" var schemaExcl"+s+" = "+_+"; ",_="schemaExcl"+s,a+=" if (typeof "+_+" != 'boolean' && "+_+" !== undefined) { "+u+" = false; ";var t=P,O=O||[];O.push(a),a="",e.createErrors!==!1?(a+=" { keyword: '"+(t||"_exclusiveFormatLimit")+"' , dataPath: (dataPath || '') + "+e.errorPath+' , schemaPath: "'+l+'" , params: {} ',e.opts.messages!==!1&&(a+=" , message: '"+P+" should be boolean' "),e.opts.verbose&&(a+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ";var A=a;a=O.pop(),a+=!e.compositeRule&&c?e.async?" throw new ValidationError(["+A+"]); ":" validate.errors = ["+A+"]; return false; ":" var err = "+A+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } ",c&&(p+="}",a+=" else { "),x&&(a+=" if ("+$+" === undefined) "+u+" = true; else if (typeof "+$+" != 'string') "+u+" = false; else { ",p+="}"),d&&(a+=" if (!"+y+") "+u+" = true; else { ",p+="}"),a+=" var "+j+" = "+y+"("+h+", ",a+=x?""+$:""+e.util.toQuotedString(i),a+=" ); if ("+j+" === undefined) "+u+" = false; var exclusive"+s+" = "+_+" === true; if ("+u+" === undefined) { "+u+" = exclusive"+s+" ? "+j+" "+w+" 0 : "+j+" "+w+"= 0; } if (!"+u+") var op"+s+" = exclusive"+s+" ? '"+w+"' : '"+w+"=';"}else{var S=b===!0,k=w;S||(k+="=");var R="'"+k+"'";x&&(a+=" if ("+$+" === undefined) "+u+" = true; else if (typeof "+$+" != 'string') "+u+" = false; else { ",p+="}"),d&&(a+=" if (!"+y+") "+u+" = true; else { ",p+="}"),a+=" var "+j+" = "+y+"("+h+", ",a+=x?""+$:""+e.util.toQuotedString(i),a+=" ); if ("+j+" === undefined) "+u+" = false; if ("+u+" === undefined) "+u+" = "+j+" "+w,S||(a+="="),a+=" 0;"}a+=""+p+"if (!"+u+") { ";var t=r,O=O||[];O.push(a),a="",e.createErrors!==!1?(a+=" { keyword: '"+(t||"_formatLimit")+"' , dataPath: (dataPath || '') + "+e.errorPath+' , schemaPath: "'+l+'" , params: { limit: ',a+=x?""+$:""+e.util.toQuotedString(i),a+=" } ",e.opts.messages!==!1&&(a+=" , message: 'should be "+k+' "',a+=x?"' + "+$+" + '":""+e.util.escapeQuotes(i),a+="\"' "),e.opts.verbose&&(a+=" , schema: ",a+=x?"validate.schema"+n:""+e.util.toQuotedString(i),a+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ";var A=a;return a=O.pop(),a+=!e.compositeRule&&c?e.async?" throw new ValidationError(["+A+"]); ":" validate.errors = ["+A+"]; return false; ":" var err = "+A+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+="}"}},{}],13:[function(e,r,t){"use strict";r.exports=function(e,r){var t,a=" ",s=e.level,o=e.dataLevel,i=e.schema[r],n=e.schemaPath+"."+r,l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,h="data"+(o||""),u=e.opts.v5&&i.$data,f=u?e.util.getData(i.$data,o,e.dataPathArr):i;u&&(a+=" var schema"+s+" = "+f+"; ",f="schema"+s);var d="maximum"==r,p=d?"exclusiveMaximum":"exclusiveMinimum",m=e.schema[p],v=e.opts.v5&&m&&m.$data,y=d?"<":">",g=d?">":"<";if(v){var P=e.util.getData(m.$data,o,e.dataPathArr),b="exclusive"+s,E="op"+s,w="' + "+E+" + '";a+=" var schemaExcl"+s+" = "+P+"; ",P="schemaExcl"+s,a+=" var exclusive"+s+"; if (typeof "+P+" != 'boolean' && typeof "+P+" != 'undefined') { ";var t=p,j=j||[];j.push(a),a="",e.createErrors!==!1?(a+=" { keyword: '"+(t||"_exclusiveLimit")+"' , dataPath: (dataPath || '') + "+e.errorPath+' , schemaPath: "'+l+'" , params: {} ',e.opts.messages!==!1&&(a+=" , message: '"+p+" should be boolean' "),e.opts.verbose&&(a+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ";var x=a;a=j.pop(),a+=!e.compositeRule&&c?e.async?" throw new ValidationError(["+x+"]); ":" validate.errors = ["+x+"]; return false; ":" var err = "+x+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } else if( ",u&&(a+=" ("+f+" !== undefined && typeof "+f+" != 'number') || "),a+=" ((exclusive"+s+" = "+P+" === true) ? "+h+" "+g+"= "+f+" : "+h+" "+g+" "+f+")) { var op"+s+" = exclusive"+s+" ? '"+y+"' : '"+y+"=';"}else{var b=m===!0,w=y;b||(w+="=");var E="'"+w+"'";a+=" if ( ",u&&(a+=" ("+f+" !== undefined && typeof "+f+" != 'number') || "),a+=" "+h+" "+g,b&&(a+="="),a+=" "+f+") {"}var t=r,j=j||[];j.push(a),a="",e.createErrors!==!1?(a+=" { keyword: '"+(t||"_limit")+"' , dataPath: (dataPath || '') + "+e.errorPath+' , schemaPath: "'+l+'" , params: { comparison: '+E+", limit: "+f+", exclusive: "+b+" } ", +!function(e,r){"object"==typeof exports&&"object"==typeof module?module.exports=r():"function"==typeof define&&define.amd?define([],r):"object"==typeof exports?exports.KotoConfig=r():e.KotoConfig=r()}(this,function(){return function(e){function r(a){if(t[a])return t[a].exports;var s=t[a]={exports:{},id:a,loaded:!1};return e[a].call(s.exports,s,s.exports,r),s.loaded=!0,s.exports}var t={};return r.m=e,r.c=t,r.p="/dist/",r(0)}([function(e,r,t){"use strict";function a(e){var r=t(1),a=new r;return a.addKeyword("color",{type:"string",validate:function(e,r){var t=/^#([0-9a-f]{3})$/,a=/^#([0-9a-f]{6})$/,s=/^rgb\(\s*([-+]?\d+)\s*,\s*([-+]?\d+)\s*,\s*([-+]?\d+)\s*\)$/,o=/^rgb\(\s*([-+]?\d+(?:\.\d+)?)%\s*,\s*([-+]?\d+(?:\.\d+)?)%\s*,\s*([-+]?\d+(?:\.\d+)?)%\s*\)$/,i=/^rgba\(\s*([-+]?\d+)\s*,\s*([-+]?\d+)\s*,\s*([-+]?\d+)\s*,\s*([-+]?\d+(?:\.\d+)?)\s*\)$/,n=/^rgba\(\s*([-+]?\d+(?:\.\d+)?)%\s*,\s*([-+]?\d+(?:\.\d+)?)%\s*,\s*([-+]?\d+(?:\.\d+)?)%\s*,\s*([-+]?\d+(?:\.\d+)?)\s*\)$/,l=/^hsl\(\s*([-+]?\d+(?:\.\d+)?)\s*,\s*([-+]?\d+(?:\.\d+)?)%\s*,\s*([-+]?\d+(?:\.\d+)?)%\s*\)$/,c=/^hsla\(\s*([-+]?\d+(?:\.\d+)?)\s*,\s*([-+]?\d+(?:\.\d+)?)%\s*,\s*([-+]?\d+(?:\.\d+)?)%\s*,\s*([-+]?\d+(?:\.\d+)?)\s*\)$/,h=["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkgrey","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkslategrey","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dimgrey","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","green","greenyellow","grey","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightgrey","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightslategrey","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","slategrey","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"],u=String(r).trim().toLowerCase();return t.exec(u)||a.exec(u)||s.exec(u)||o.exec(u)||i.exec(u)||n.exec(u)||l.exec(u)||c.exec(u)||h.indexOf(u)>=0||"transparent"===u}}),function(r){var t=r.prototype.config;r.prototype.config=function(r,s){if(e.hasOwnProperty(r)){var o=a.validate(e[r],s);if(o)return t.call(this,r,s);throw Error(r+" config "+a.errorsText())}return t.call(this,r,s)}}}r.__esModule=!0,r["default"]=a},function(module,exports,__webpack_require__){var require,require;(function(global){!function(e){module.exports=e()}(function(){var define,module,exports;return function e(r,t,a){function s(i,n){if(!t[i]){if(!r[i]){var l="function"==typeof require&&require;if(!n&&l)return require(i,!0);if(o)return o(i,!0);var c=new Error("Cannot find module '"+i+"'");throw c.code="MODULE_NOT_FOUND",c}var h=t[i]={exports:{}};r[i][0].call(h.exports,function(e){var t=r[i][1][e];return s(t?t:e)},h,h.exports,e,r,t,a)}return t[i].exports}for(var o="function"==typeof require&&require,i=0;i=1&&12>=t&&a>=1&&a<=m[t]}function o(e,r){var t=e.match(v);if(!t)return!1;var a=t[1],s=t[2],o=t[3],i=t[5];return 23>=a&&59>=s&&59>=o&&(!r||i)}function i(e){var r=e.split(w);return s(r[0])&&o(r[1],!0)}function n(e){return e.length<=255&&y.test(e)}function l(e){return j.test(e)&&g.test(e)}function c(e){try{return new RegExp(e),!0}catch(r){return!1}}function h(e,r){return e&&r?e>r?1:r>e?-1:e===r?0:void 0:void 0}function u(e,r){return e&&r&&(e=e.match(v),r=r.match(v),e&&r)?(e=e[1]+e[2]+e[3]+(e[4]||""),r=r[1]+r[2]+r[3]+(r[4]||""),e>r?1:r>e?-1:e===r?0:void 0):void 0}function f(e,r){if(e&&r){e=e.split(w),r=r.split(w);var t=h(e[0],r[0]);if(void 0!==t)return t||u(e[1],r[1])}}var d=e("./util"),p=/^\d\d\d\d-(\d\d)-(\d\d)$/,m=[0,31,29,31,30,31,30,31,31,30,31,30,31],v=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d:\d\d)?$/i,y=/^[a-z](?:(?:[-0-9a-z]{0,61})?[0-9a-z])?(\.[a-z](?:(?:[-0-9a-z]{0,61})?[0-9a-z])?)*$/i,g=/^(?:[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,P=/^(?:urn\:uuid\:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,b=/^(?:\/(?:[^~\/]|~0|~1)+)*(?:\/)?$|^\#(?:\/(?:[a-z0-9_\-\.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)+)*(?:\/)?$/i,E=/^(?:0|[1-9][0-9]*)(?:\#|(?:\/(?:[^~\/]|~0|~1)+)*(?:\/)?)$/;r.exports=a,a.fast={date:/^\d\d\d\d-[0-1]\d-[0-3]\d$/,time:/^[0-2]\d:[0-5]\d:[0-5]\d(?:\.\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(?:\.\d+)?(?:z|[+-]\d\d:\d\d)$/i,uri:/^(?:[a-z][a-z0-9+-.]*)?(?:\:|\/)\/?[^\s]*$/i,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:y,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:c,uuid:P,"json-pointer":b,"relative-json-pointer":E},a.full={date:s,time:o,"date-time":i,uri:l,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:n,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:c,uuid:P,"json-pointer":b,"relative-json-pointer":E},a.compare={date:h,time:u,"date-time":f};var w=/t|\s/i,j=/\/|\:/},{"./util":10}],6:[function(require,module,exports){"use strict";function compile(schema,root,localRefs,baseId){function localCompile(_schema,_root,localRefs,baseId){var isRoot=!_root||_root&&_root.schema==_schema;if(_root.schema!=root.schema)return compile.call(self,_schema,_root,localRefs,baseId);var $async=_schema.$async===!0;$async&&!opts.transpile&&async.setup(opts);var sourceCode=validateGenerator({isTop:!0,schema:_schema,isRoot:isRoot,baseId:baseId,root:_root,schemaPath:"",errSchemaPath:"#",errorPath:'""',RULES:RULES,validate:validateGenerator,util:util,resolve:resolve,resolveRef:resolveRef,usePattern:usePattern,useDefault:useDefault,useCustomRule:useCustomRule,opts:opts,formats:formats,self:self});sourceCode=vars(refVal,refValCode)+vars(patterns,patternCode)+vars(defaults,defaultCode)+vars(customRules,customRuleCode)+sourceCode,opts.beautify&&(beautify?sourceCode=beautify(sourceCode,opts.beautify):console.error('"npm install js-beautify" to use beautify option'));var validate,validateCode,transpile=opts._transpileFunc;try{validateCode=$async&&transpile?transpile(sourceCode):sourceCode,eval(validateCode),refVal[0]=validate}catch(e){throw console.error("Error compiling schema, function code:",validateCode),e}return validate.schema=_schema,validate.errors=null,validate.refs=refs,validate.refVal=refVal,validate.root=isRoot?validate:_root,$async&&(validate.async=!0),transpile&&(validate.sourceCode=sourceCode),validate}function resolveRef(e,r,t){r=resolve.url(e,r);var a,s,o=refs[r];if(void 0!==o)return a=refVal[o],s="refVal["+o+"]",resolvedRef(a,s);if(!t){var i=root.refs[r];if(void 0!==i)return a=root.refVal[i],s=addLocalRef(r,a),resolvedRef(a,s)}s=addLocalRef(r);var n=resolve.call(self,localCompile,root,r);if(!n){var l=localRefs&&localRefs[r];l&&(n=resolve.inlineRef(l,opts.inlineRefs)?l:compile.call(self,l,root,localRefs,e))}return n?(replaceLocalRef(r,n),resolvedRef(n,s)):void 0}function addLocalRef(e,r){var t=refVal.length;return refVal[t]=r,refs[e]=t,"refVal"+t}function replaceLocalRef(e,r){var t=refs[e];refVal[t]=r}function resolvedRef(e,r){return"object"==typeof e?{code:r,schema:e,inline:!0}:{code:r,async:e&&e.async}}function usePattern(e){var r=patternsHash[e];return void 0===r&&(r=patternsHash[e]=patterns.length,patterns[r]=e),"pattern"+r}function useDefault(e){switch(typeof e){case"boolean":case"number":return""+e;case"string":return util.toQuotedString(e);case"object":if(null===e)return"null";var r=stableStringify(e),t=defaultsHash[r];return void 0===t&&(t=defaultsHash[r]=defaults.length,defaults[t]=e),"default"+t}}function useCustomRule(e,r,t,a){var s,o=e.definition.compile,i=e.definition.inline,n=e.definition.macro;o?s=o.call(self,r,t):n?(s=n.call(self,r,t),opts.validateSchema!==!1&&self.validateSchema(s,!0)):s=i?i.call(self,a,e.keyword,r,t):e.definition.validate;var l=customRules.length;return customRules[l]=s,{code:"customRule"+l,validate:s}}var self=this,opts=this._opts,refVal=[void 0],refs={},patterns=[],patternsHash={},defaults=[],defaultsHash={},customRules=[];root=root||{schema:schema,refVal:refVal,refs:refs};var formats=this._formats,RULES=this.RULES;return localCompile(schema,root,localRefs,baseId)}function patternCode(e,r){return"var pattern"+e+" = new RegExp("+util.toQuotedString(r[e])+");"}function defaultCode(e){return"var default"+e+" = defaults["+e+"];"}function refValCode(e,r){return r[e]?"var refVal"+e+" = refVal["+e+"];":""}function customRuleCode(e){return"var customRule"+e+" = customRules["+e+"];"}function vars(e,r){if(!e.length)return"";for(var t="",a=0;as;)t++,r=e.charCodeAt(s++),r>=55296&&56319>=r&&a>s&&(r=e.charCodeAt(s),56320==(64512&r)&&s++);return t}function u(e,r){r+="[^0-9]";var t=e.match(new RegExp(r,"g"));return t?t.length:0}function f(e,r,t){return r+="([^0-9])",t=t.replace(/\$/g,"$$$$"),e.replace(new RegExp(r,"g"),t+"$1")}function d(e){return e.replace(R,"").replace(k,"").replace(O,"if (!($1))")}function p(e,r){var t=e.match(A);return t&&2===t.length?r?e.replace(q,"").replace(D,V):e.replace(I,"").replace(L,C):e}function m(e,r){for(var t in e)if(r[t])return!0}function v(e){return"'"+c(e)+"'"}function y(e,r,t,a){var s=t?"'/' + "+r+(a?"":".replace(/~/g, '~0').replace(/\\//g, '~1')"):a?"'[' + "+r+" + ']'":"'[\\'' + "+r+" + '\\']'";return b(e,s)}function g(e,r,t){var a=v(t?"/"+j(r):l(r));return b(e,a)}function P(e,r,t){var a=e.match(z);if(!a)throw new Error("Invalid relative JSON-pointer: "+e);var s=+a[1],o=a[2];if("#"==o){if(s>=r)throw new Error("Cannot access property/index "+s+" levels up, current level is "+r);return t[r-s]}if(s>r)throw new Error("Cannot access data "+s+" levels up, current level is "+r);var i="data"+(r-s||"");if(!o)return i;for(var n=i,c=o.split("/"),h=0;h",j="result"+s,x=e.opts.v5&&i.$data,$=x?e.util.getData(i.$data,o,e.dataPathArr):i;if(x&&(a+=" var schema"+s+" = "+$+"; ",$="schema"+s),E){var _=e.util.getData(b.$data,o,e.dataPathArr),S="exclusive"+s,R="op"+s,k="' + "+R+" + '";a+=" var schemaExcl"+s+" = "+_+"; ",_="schemaExcl"+s,a+=" if (typeof "+_+" != 'boolean' && "+_+" !== undefined) { "+u+" = false; ";var t=P,O=O||[];O.push(a),a="",e.createErrors!==!1?(a+=" { keyword: '"+(t||"_exclusiveFormatLimit")+"' , dataPath: (dataPath || '') + "+e.errorPath+' , schemaPath: "'+l+'" , params: {} ',e.opts.messages!==!1&&(a+=" , message: '"+P+" should be boolean' "),e.opts.verbose&&(a+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ";var A=a;a=O.pop(),a+=!e.compositeRule&&c?e.async?" throw new ValidationError(["+A+"]); ":" validate.errors = ["+A+"]; return false; ":" var err = "+A+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } ",c&&(p+="}",a+=" else { "),x&&(a+=" if ("+$+" === undefined) "+u+" = true; else if (typeof "+$+" != 'string') "+u+" = false; else { ",p+="}"),d&&(a+=" if (!"+y+") "+u+" = true; else { ",p+="}"),a+=" var "+j+" = "+y+"("+h+", ",a+=x?""+$:""+e.util.toQuotedString(i),a+=" ); if ("+j+" === undefined) "+u+" = false; var exclusive"+s+" = "+_+" === true; if ("+u+" === undefined) { "+u+" = exclusive"+s+" ? "+j+" "+w+" 0 : "+j+" "+w+"= 0; } if (!"+u+") var op"+s+" = exclusive"+s+" ? '"+w+"' : '"+w+"=';"}else{var S=b===!0,k=w;S||(k+="=");var R="'"+k+"'";x&&(a+=" if ("+$+" === undefined) "+u+" = true; else if (typeof "+$+" != 'string') "+u+" = false; else { ",p+="}"),d&&(a+=" if (!"+y+") "+u+" = true; else { ",p+="}"),a+=" var "+j+" = "+y+"("+h+", ",a+=x?""+$:""+e.util.toQuotedString(i),a+=" ); if ("+j+" === undefined) "+u+" = false; if ("+u+" === undefined) "+u+" = "+j+" "+w,S||(a+="="),a+=" 0;"}a+=""+p+"if (!"+u+") { ";var t=r,O=O||[];O.push(a),a="",e.createErrors!==!1?(a+=" { keyword: '"+(t||"_formatLimit")+"' , dataPath: (dataPath || '') + "+e.errorPath+' , schemaPath: "'+l+'" , params: { limit: ',a+=x?""+$:""+e.util.toQuotedString(i),a+=" } ",e.opts.messages!==!1&&(a+=" , message: 'should be "+k+' "',a+=x?"' + "+$+" + '":""+e.util.escapeQuotes(i),a+="\"' "),e.opts.verbose&&(a+=" , schema: ",a+=x?"validate.schema"+n:""+e.util.toQuotedString(i),a+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ";var A=a;return a=O.pop(),a+=!e.compositeRule&&c?e.async?" throw new ValidationError(["+A+"]); ":" validate.errors = ["+A+"]; return false; ":" var err = "+A+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+="}"}},{}],13:[function(e,r,t){"use strict";r.exports=function(e,r){var t,a=" ",s=e.level,o=e.dataLevel,i=e.schema[r],n=e.schemaPath+"."+r,l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,h="data"+(o||""),u=e.opts.v5&&i.$data,f=u?e.util.getData(i.$data,o,e.dataPathArr):i;u&&(a+=" var schema"+s+" = "+f+"; ",f="schema"+s);var d="maximum"==r,p=d?"exclusiveMaximum":"exclusiveMinimum",m=e.schema[p],v=e.opts.v5&&m&&m.$data,y=d?"<":">",g=d?">":"<";if(v){var P=e.util.getData(m.$data,o,e.dataPathArr),b="exclusive"+s,E="op"+s,w="' + "+E+" + '";a+=" var schemaExcl"+s+" = "+P+"; ",P="schemaExcl"+s,a+=" var exclusive"+s+"; if (typeof "+P+" != 'boolean' && typeof "+P+" != 'undefined') { ";var t=p,j=j||[];j.push(a),a="",e.createErrors!==!1?(a+=" { keyword: '"+(t||"_exclusiveLimit")+"' , dataPath: (dataPath || '') + "+e.errorPath+' , schemaPath: "'+l+'" , params: {} ',e.opts.messages!==!1&&(a+=" , message: '"+p+" should be boolean' "),e.opts.verbose&&(a+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ";var x=a;a=j.pop(),a+=!e.compositeRule&&c?e.async?" throw new ValidationError(["+x+"]); ":" validate.errors = ["+x+"]; return false; ":" var err = "+x+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } else if( ",u&&(a+=" ("+f+" !== undefined && typeof "+f+" != 'number') || "),a+=" ((exclusive"+s+" = "+P+" === true) ? "+h+" "+g+"= "+f+" : "+h+" "+g+" "+f+")) { var op"+s+" = exclusive"+s+" ? '"+y+"' : '"+y+"=';"}else{var b=m===!0,w=y;b||(w+="=");var E="'"+w+"'";a+=" if ( ",u&&(a+=" ("+f+" !== undefined && typeof "+f+" != 'number') || "),a+=" "+h+" "+g,b&&(a+="="),a+=" "+f+") {"}var t=r,j=j||[];j.push(a),a="",e.createErrors!==!1?(a+=" { keyword: '"+(t||"_limit")+"' , dataPath: (dataPath || '') + "+e.errorPath+' , schemaPath: "'+l+'" , params: { comparison: '+E+", limit: "+f+", exclusive: "+b+" } ", e.opts.messages!==!1&&(a+=" , message: 'should be "+w+" ",a+=u?"' + "+f:""+i+"'"),e.opts.verbose&&(a+=" , schema: ",a+=u?"validate.schema"+n:""+i,a+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ";var x=a;return a=j.pop(),a+=!e.compositeRule&&c?e.async?" throw new ValidationError(["+x+"]); ":" validate.errors = ["+x+"]; return false; ":" var err = "+x+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } ",c&&(a+=" else { "),a}},{}],14:[function(e,r,t){"use strict";r.exports=function(e,r){var t,a=" ",s=e.level,o=e.dataLevel,i=e.schema[r],n=e.schemaPath+"."+r,l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,h="data"+(o||""),u=e.opts.v5&&i.$data,f=u?e.util.getData(i.$data,o,e.dataPathArr):i;u&&(a+=" var schema"+s+" = "+f+"; ",f="schema"+s);var d="maxItems"==r?">":"<";a+="if ( ",u&&(a+=" ("+f+" !== undefined && typeof "+f+" != 'number') || "),a+=" "+h+".length "+d+" "+f+") { ";var t=r,p=p||[];p.push(a),a="",e.createErrors!==!1?(a+=" { keyword: '"+(t||"_limitItems")+"' , dataPath: (dataPath || '') + "+e.errorPath+' , schemaPath: "'+l+'" , params: { limit: '+f+" } ",e.opts.messages!==!1&&(a+=" , message: 'should NOT have ",a+="maxItems"==r?"more":"less",a+=" than ",a+=u?"' + "+f+" + '":""+i,a+=" items' "),e.opts.verbose&&(a+=" , schema: ",a+=u?"validate.schema"+n:""+i,a+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ";var m=a;return a=p.pop(),a+=!e.compositeRule&&c?e.async?" throw new ValidationError(["+m+"]); ":" validate.errors = ["+m+"]; return false; ":" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+="} ",c&&(a+=" else { "),a}},{}],15:[function(e,r,t){"use strict";r.exports=function(e,r){var t,a=" ",s=e.level,o=e.dataLevel,i=e.schema[r],n=e.schemaPath+"."+r,l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,h="data"+(o||""),u=e.opts.v5&&i.$data,f=u?e.util.getData(i.$data,o,e.dataPathArr):i;u&&(a+=" var schema"+s+" = "+f+"; ",f="schema"+s);var d="maxLength"==r?">":"<";a+="if ( ",u&&(a+=" ("+f+" !== undefined && typeof "+f+" != 'number') || "),a+=e.opts.unicode===!1?" "+h+".length ":" ucs2length("+h+") ",a+=" "+d+" "+f+") { ";var t=r,p=p||[];p.push(a),a="",e.createErrors!==!1?(a+=" { keyword: '"+(t||"_limitLength")+"' , dataPath: (dataPath || '') + "+e.errorPath+' , schemaPath: "'+l+'" , params: { limit: '+f+" } ",e.opts.messages!==!1&&(a+=" , message: 'should NOT be ",a+="maxLength"==r?"longer":"shorter",a+=" than ",a+=u?"' + "+f+" + '":""+i,a+=" characters' "),e.opts.verbose&&(a+=" , schema: ",a+=u?"validate.schema"+n:""+i,a+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ";var m=a;return a=p.pop(),a+=!e.compositeRule&&c?e.async?" throw new ValidationError(["+m+"]); ":" validate.errors = ["+m+"]; return false; ":" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+="} ",c&&(a+=" else { "),a}},{}],16:[function(e,r,t){"use strict";r.exports=function(e,r){var t,a=" ",s=e.level,o=e.dataLevel,i=e.schema[r],n=e.schemaPath+"."+r,l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,h="data"+(o||""),u=e.opts.v5&&i.$data,f=u?e.util.getData(i.$data,o,e.dataPathArr):i;u&&(a+=" var schema"+s+" = "+f+"; ",f="schema"+s);var d="maxProperties"==r?">":"<";a+="if ( ",u&&(a+=" ("+f+" !== undefined && typeof "+f+" != 'number') || "),a+=" Object.keys("+h+").length "+d+" "+f+") { ";var t=r,p=p||[];p.push(a),a="",e.createErrors!==!1?(a+=" { keyword: '"+(t||"_limitProperties")+"' , dataPath: (dataPath || '') + "+e.errorPath+' , schemaPath: "'+l+'" , params: { limit: '+f+" } ",e.opts.messages!==!1&&(a+=" , message: 'should NOT have ",a+="maxProperties"==r?"more":"less",a+=" than ",a+=u?"' + "+f+" + '":""+i,a+=" properties' "),e.opts.verbose&&(a+=" , schema: ",a+=u?"validate.schema"+n:""+i,a+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ";var m=a;return a=p.pop(),a+=!e.compositeRule&&c?e.async?" throw new ValidationError(["+m+"]); ":" validate.errors = ["+m+"]; return false; ":" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+="} ",c&&(a+=" else { "),a}},{}],17:[function(e,r,t){"use strict";r.exports=function(e,r){var t=" ",a=e.schema[r],s=e.schemaPath+"."+r,o=e.errSchemaPath+"/"+r,i=!e.opts.allErrors,n=e.util.copy(e),l="";n.level++;var c=a;if(c)for(var h,u=-1,f=c.length-1;f>u;)h=c[u+=1],e.util.schemaHasRules(h,e.RULES.all)&&(n.schema=h,n.schemaPath=s+"["+u+"]",n.errSchemaPath=o+"/"+u,t+=" "+e.validate(n)+" ",i&&(t+=" if (valid"+n.level+") { ",l+="}"));return i&&(t+=" "+l.slice(0,-1)),t=e.util.cleanUpCode(t)}},{}],18:[function(e,r,t){"use strict";r.exports=function(e,r){var t,a=" ",s=e.level,o=e.dataLevel,i=e.schema[r],n=e.schemaPath+"."+r,l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,h="data"+(o||""),u="valid"+s,f="errs__"+s,d=e.util.copy(e),p="";d.level++;var m=i.every(function(r){return e.util.schemaHasRules(r,e.RULES.all)});if(m){a+=" var "+f+" = errors; var "+u+" = false; ";var v=e.compositeRule;e.compositeRule=d.compositeRule=!0;var y=i;if(y)for(var g,P=-1,b=y.length-1;b>P;)g=y[P+=1],d.schema=g,d.schemaPath=n+"["+P+"]",d.errSchemaPath=l+"/"+P,a+=" "+e.validate(d)+" "+u+" = "+u+" || valid"+d.level+"; if (!"+u+") { ",p+="}";e.compositeRule=d.compositeRule=v,a+=" "+p+" if (!"+u+") { var err = ",e.createErrors!==!1?(a+=" { keyword: '"+(t||"anyOf")+"' , dataPath: (dataPath || '') + "+e.errorPath+' , schemaPath: "'+l+'" , params: {} ',e.opts.messages!==!1&&(a+=" , message: 'should match some schema in anyOf' "),e.opts.verbose&&(a+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } else { errors = "+f+"; if (vErrors !== null) { if ("+f+") vErrors.length = "+f+"; else vErrors = null; } ",e.opts.allErrors&&(a+=" } "),a=e.util.cleanUpCode(a)}else c&&(a+=" if (true) { ");return a}},{}],19:[function(e,r,t){"use strict";r.exports=function(e,r){var t,a=" ",s=e.level,o=e.dataLevel,i=e.schema[r],n=e.schemaPath+"."+r,l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,h="data"+(o||""),u="valid"+s,f=e.opts.v5&&i.$data,d=f?e.util.getData(i.$data,o,e.dataPathArr):i;f&&(a+=" var schema"+s+" = "+d+"; ",d="schema"+s),f||(a+=" var schema"+s+" = validate.schema"+n+";"),a+="var "+u+" = equal("+h+", schema"+s+"); if (!"+u+") { ";var p=p||[];p.push(a),a="",e.createErrors!==!1?(a+=" { keyword: '"+(t||"constant")+"' , dataPath: (dataPath || '') + "+e.errorPath+' , schemaPath: "'+l+'" , params: {} ',e.opts.messages!==!1&&(a+=" , message: 'should be equal to constant' "),e.opts.verbose&&(a+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ";var m=a;return a=p.pop(),a+=!e.compositeRule&&c?e.async?" throw new ValidationError(["+m+"]); ":" validate.errors = ["+m+"]; return false; ":" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" }"}},{}],20:[function(e,r,t){"use strict";r.exports=function(e,r){var t,a=" ",s=e.level,o=e.dataLevel,i=e.schema[r],n=e.schemaPath+"."+r,l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,h="data"+(o||""),u="errs__"+s,f=e.util.copy(e),d="";f.level++;var p={},m={};for(P in i){var v=i[P],y=Array.isArray(v)?m:p;y[P]=v}a+="var "+u+" = errors;";var g=e.errorPath;a+="var missing"+s+";";for(var P in m){y=m[P],a+=" if ("+h+e.util.getProperty(P)+" !== undefined && ( ";var b=y;if(b)for(var E,w=-1,j=b.length-1;j>w;){E=b[w+=1],w&&(a+=" || ");var x=e.util.getProperty(E);a+=" ( "+h+x+" === undefined && (missing"+s+" = "+e.util.toQuotedString(e.opts.jsonPointers?E:x)+") ) "}a+=")) { ";var $="missing"+s,_="' + "+$+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.opts.jsonPointers?e.util.getPathExpr(g,$,!0):g+" + "+$);var S=S||[];S.push(a),a="",e.createErrors!==!1?(a+=" { keyword: '"+(t||"dependencies")+"' , dataPath: (dataPath || '') + "+e.errorPath+' , schemaPath: "'+l+"\" , params: { property: '"+e.util.escapeQuotes(P)+"', missingProperty: '"+_+"', depsCount: "+y.length+", deps: '"+e.util.escapeQuotes(1==y.length?y[0]:y.join(", "))+"' } ",e.opts.messages!==!1&&(a+=" , message: 'should have ",a+=1==y.length?"property "+e.util.escapeQuotes(y[0]):"properties "+e.util.escapeQuotes(y.join(", ")),a+=" when property "+e.util.escapeQuotes(P)+" is present' "),e.opts.verbose&&(a+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ";var R=a;a=S.pop(),a+=!e.compositeRule&&c?e.async?" throw new ValidationError(["+R+"]); ":" validate.errors = ["+R+"]; return false; ":" var err = "+R+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } ",c&&(d+="}",a+=" else { ")}e.errorPath=g;for(var P in p){var v=p[P];e.util.schemaHasRules(v,e.RULES.all)&&(a+=" valid"+f.level+" = true; if ("+h+"['"+P+"'] !== undefined) { ",f.schema=v,f.schemaPath=n+e.util.getProperty(P),f.errSchemaPath=l+"/"+e.util.escapeFragment(P),a+=" "+e.validate(f)+" } ",c&&(a+=" if (valid"+f.level+") { ",d+="}"))}return c&&(a+=" "+d+" if ("+u+" == errors) {"),a=e.util.cleanUpCode(a)}},{}],21:[function(e,r,t){"use strict";r.exports=function(e,r){var t,a=" ",s=e.level,o=e.dataLevel,i=e.schema[r],n=e.schemaPath+"."+r,l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,h="data"+(o||""),u="valid"+s,f=e.opts.v5&&i.$data,d=f?e.util.getData(i.$data,o,e.dataPathArr):i;f&&(a+=" var schema"+s+" = "+d+"; ",d="schema"+s);var p="i"+s;f||(a+=" var schema"+s+" = validate.schema"+n+";"),a+="var "+u+";",f&&(a+=" if (schema"+s+" === undefined) "+u+" = true; else if (!Array.isArray(schema"+s+")) "+u+" = false; else {"),a+=""+u+" = false;for (var "+p+"=0; "+p+"j;)if(w=E[j+=1],e.util.schemaHasRules(w,e.RULES.all)){a+=" valid"+d.level+" = true; if ("+h+".length > "+j+") { ";var $=h+"["+j+"]";d.schema=w,d.schemaPath=n+"["+j+"]",d.errSchemaPath=l+"/"+j,d.errorPath=e.util.getPathExpr(e.errorPath,j,e.opts.jsonPointers,!0),d.dataPathArr[m]=j;var _=e.validate(d);a+=e.util.varOccurences(_,v)<2?" "+e.util.varReplace(_,v,$)+" ":" var "+v+" = "+$+"; "+_+" ",a+=" } ",c&&(a+=" if (valid"+d.level+") { ",p+="}")}if("object"==typeof y&&e.util.schemaHasRules(y,e.RULES.all)){d.schema=y,d.schemaPath=e.schemaPath+".additionalItems",d.errSchemaPath=e.errSchemaPath+"/additionalItems",a+=" valid"+d.level+" = true; if ("+h+".length > "+i.length+") { for (var i"+s+" = "+i.length+"; i"+s+" < "+h+".length; i"+s+"++) { ",d.errorPath=e.util.getPathExpr(e.errorPath,"i"+s,e.opts.jsonPointers,!0);var $=h+"[i"+s+"]";d.dataPathArr[m]="i"+s;var _=e.validate(d);a+=e.util.varOccurences(_,v)<2?" "+e.util.varReplace(_,v,$)+" ":" var "+v+" = "+$+"; "+_+" ",c&&(a+=" if (!valid"+d.level+") break; "),a+=" } } ",c&&(a+=" if (valid"+d.level+") { ",p+="}")}}else if(e.util.schemaHasRules(i,e.RULES.all)){d.schema=i,d.schemaPath=n,d.errSchemaPath=l,a+=" for (var i"+s+" = 0; i"+s+" < "+h+".length; i"+s+"++) { ",d.errorPath=e.util.getPathExpr(e.errorPath,"i"+s,e.opts.jsonPointers,!0);var $=h+"[i"+s+"]";d.dataPathArr[m]="i"+s;var _=e.validate(d);a+=e.util.varOccurences(_,v)<2?" "+e.util.varReplace(_,v,$)+" ":" var "+v+" = "+$+"; "+_+" ",c&&(a+=" if (!valid"+d.level+") break; "),a+=" } ",c&&(a+=" if (valid"+d.level+") { ",p+="}")}return c&&(a+=" "+p+" if ("+f+" == errors) {"),a=e.util.cleanUpCode(a)}},{}],24:[function(e,r,t){"use strict";r.exports=function(e,r){var t,a=" ",s=e.level,o=e.dataLevel,i=e.schema[r],n=e.schemaPath+"."+r,l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,h="data"+(o||""),u=e.opts.v5&&i.$data,f=u?e.util.getData(i.$data,o,e.dataPathArr):i;u&&(a+=" var schema"+s+" = "+f+"; ",f="schema"+s),a+="var division"+s+";if (",u&&(a+=" "+f+" !== undefined && ( typeof "+f+" != 'number' || "),a+=" (division"+s+" = "+h+" / "+f+", ",a+=e.opts.multipleOfPrecision?" Math.abs(Math.round(division"+s+") - division"+s+") > 1e-"+e.opts.multipleOfPrecision+" ":" division"+s+" !== parseInt(division"+s+") ",a+=" ) ",u&&(a+=" ) "),a+=" ) { ";var d=d||[];d.push(a),a="",e.createErrors!==!1?(a+=" { keyword: '"+(t||"multipleOf")+"' , dataPath: (dataPath || '') + "+e.errorPath+' , schemaPath: "'+l+'" , params: { multipleOf: '+f+" } ",e.opts.messages!==!1&&(a+=" , message: 'should be multiple of ",a+=u?"' + "+f:""+i+"'"),e.opts.verbose&&(a+=" , schema: ",a+=u?"validate.schema"+n:""+i,a+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ";var p=a;return a=d.pop(),a+=!e.compositeRule&&c?e.async?" throw new ValidationError(["+p+"]); ":" validate.errors = ["+p+"]; return false; ":" var err = "+p+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+="} ",c&&(a+=" else { "),a}},{}],25:[function(e,r,t){"use strict";r.exports=function(e,r){var t,a=" ",s=e.level,o=e.dataLevel,i=e.schema[r],n=e.schemaPath+"."+r,l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,h="data"+(o||""),u="errs__"+s,f=e.util.copy(e);if(f.level++,e.util.schemaHasRules(i,e.RULES.all)){f.schema=i,f.schemaPath=n,f.errSchemaPath=l,a+=" var "+u+" = errors; ";var d=e.compositeRule;e.compositeRule=f.compositeRule=!0,f.createErrors=!1;var p;f.opts.allErrors&&(p=f.opts.allErrors,f.opts.allErrors=!1),a+=" "+e.validate(f)+" ",f.createErrors=!0,p&&(f.opts.allErrors=p),e.compositeRule=f.compositeRule=d,a+=" if (valid"+f.level+") { ";var m=m||[];m.push(a),a="",e.createErrors!==!1?(a+=" { keyword: '"+(t||"not")+"' , dataPath: (dataPath || '') + "+e.errorPath+' , schemaPath: "'+l+'" , params: {} ',e.opts.messages!==!1&&(a+=" , message: 'should NOT be valid' "),e.opts.verbose&&(a+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ";var v=a;a=m.pop(),a+=!e.compositeRule&&c?e.async?" throw new ValidationError(["+v+"]); ":" validate.errors = ["+v+"]; return false; ":" var err = "+v+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } else { errors = "+u+"; if (vErrors !== null) { if ("+u+") vErrors.length = "+u+"; else vErrors = null; } ",e.opts.allErrors&&(a+=" } ")}else a+=" var err = ",e.createErrors!==!1?(a+=" { keyword: '"+(t||"not")+"' , dataPath: (dataPath || '') + "+e.errorPath+' , schemaPath: "'+l+'" , params: {} ',e.opts.messages!==!1&&(a+=" , message: 'should NOT be valid' "),e.opts.verbose&&(a+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",c&&(a+=" if (false) { ");return a}},{}],26:[function(e,r,t){"use strict";r.exports=function(e,r){var t,a=" ",s=e.level,o=e.dataLevel,i=e.schema[r],n=e.schemaPath+"."+r,l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,h="data"+(o||""),u="valid"+s,f="errs__"+s,d=e.util.copy(e),p="";d.level++,a+="var "+f+" = errors;var prevValid"+s+" = false;var "+u+" = false; ";var m=e.compositeRule;e.compositeRule=d.compositeRule=!0;var v=i;if(v)for(var y,g=-1,P=v.length-1;P>g;)y=v[g+=1],e.util.schemaHasRules(y,e.RULES.all)?(d.schema=y,d.schemaPath=n+"["+g+"]",d.errSchemaPath=l+"/"+g,a+=" "+e.validate(d)+" "):a+=" var valid"+d.level+" = true; ",g&&(a+=" if (valid"+d.level+" && prevValid"+s+") "+u+" = false; else { ",p+="}"),a+=" if (valid"+d.level+") "+u+" = prevValid"+s+" = true;";e.compositeRule=d.compositeRule=m,a+=""+p+"if (!"+u+") { ";var b=b||[];b.push(a),a="",e.createErrors!==!1?(a+=" { keyword: '"+(t||"oneOf")+"' , dataPath: (dataPath || '') + "+e.errorPath+' , schemaPath: "'+l+'" , params: {} ',e.opts.messages!==!1&&(a+=" , message: 'should match exactly one schema in oneOf' "),e.opts.verbose&&(a+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ";var E=a;return a=b.pop(),a+=!e.compositeRule&&c?e.async?" throw new ValidationError(["+E+"]); ":" validate.errors = ["+E+"]; return false; ":" var err = "+E+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+="} else { errors = "+f+"; if (vErrors !== null) { if ("+f+") vErrors.length = "+f+"; else vErrors = null; }",e.opts.allErrors&&(a+=" } "),a}},{}],27:[function(e,r,t){"use strict";r.exports=function(e,r){var t,a=" ",s=e.level,o=e.dataLevel,i=e.schema[r],n=e.schemaPath+"."+r,l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,h="data"+(o||""),u=e.opts.v5&&i.$data,f=u?e.util.getData(i.$data,o,e.dataPathArr):i;u&&(a+=" var schema"+s+" = "+f+"; ",f="schema"+s);var d=u?"(new RegExp("+f+"))":e.usePattern(i);a+="if ( ",u&&(a+=" ("+f+" !== undefined && typeof "+f+" != 'string') || "),a+=" !"+d+".test("+h+") ) { ";var p=p||[];p.push(a),a="",e.createErrors!==!1?(a+=" { keyword: '"+(t||"pattern")+"' , dataPath: (dataPath || '') + "+e.errorPath+' , schemaPath: "'+l+'" , params: { pattern: ',a+=u?""+f:""+e.util.toQuotedString(i),a+=" } ",e.opts.messages!==!1&&(a+=" , message: 'should match pattern \"",a+=u?"' + "+f+" + '":""+e.util.escapeQuotes(i),a+="\"' "),e.opts.verbose&&(a+=" , schema: ",a+=u?"validate.schema"+n:""+e.util.toQuotedString(i),a+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ";var m=a;return a=p.pop(),a+=!e.compositeRule&&c?e.async?" throw new ValidationError(["+m+"]); ":" validate.errors = ["+m+"]; return false; ":" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+="} ",c&&(a+=" else { "),a}},{}],28:[function(e,r,t){"use strict";r.exports=function(e,r){var t,a=" ",s=e.level,o=e.dataLevel,i=e.schema[r],n=e.schemaPath+"."+r,l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,h="data"+(o||""),u="valid"+s,f="key"+s,d="patternMatched"+s,p="";a+="var "+u+" = true;";var m=i;if(m)for(var v,y=-1,g=m.length-1;g>y;){v=m[y+=1],a+=" var "+d+" = false; for (var "+f+" in "+h+") { "+d+" = "+e.usePattern(v)+".test("+f+"); if ("+d+") break; } ";var P=e.util.escapeQuotes(v);a+=" if (!"+d+") { "+u+" = false; var err = ",e.createErrors!==!1?(a+=" { keyword: '"+(t||"patternRequired")+"' , dataPath: (dataPath || '') + "+e.errorPath+' , schemaPath: "'+l+"\" , params: { missingPattern: '"+P+"' } ",e.opts.messages!==!1&&(a+=" , message: 'should have property matching pattern \\'"+P+"\\'' "),e.opts.verbose&&(a+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } ",c&&(p+="}",a+=" else { ")}return a+=""+p}},{}],29:[function(e,r,t){"use strict";r.exports=function(e,r){var t,a=" ",s=e.level,o=e.dataLevel,i=e.schema[r],n=e.schemaPath+"."+r,l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,h="data"+(o||""),u="valid"+s,f="errs__"+s,d=e.util.copy(e),p="";d.level++;var m=d.dataLevel=e.dataLevel+1,v="data"+m,y=Object.keys(i||{}),g=e.schema.patternProperties||{},P=Object.keys(g),b=e.schema.additionalProperties,E=y.length||P.length,w=b===!1,j="object"==typeof b&&Object.keys(b).length,x=e.opts.removeAdditional,$=w||j||x,_=e.schema.required;if(_&&(!e.opts.v5||!_.$data)&&_.length5)a+=" || validate.schema"+n+"[key"+s+"] ";else{var O=y;if(O)for(var A,I=-1,q=O.length-1;q>I;)A=O[I+=1],a+=" || key"+s+" == "+e.util.toQuotedString(A)+" "}if(P.length){var L=P;if(L)for(var C,D=-1,V=L.length-1;V>D;)C=L[D+=1],a+=" || "+e.usePattern(C)+".test(key"+s+") "}if(e.opts.v5&&k&&k.length){var z=k;if(z)for(var U,D=-1,T=z.length-1;T>D;)U=z[D+=1],a+=" || "+e.usePattern(U)+".test(key"+s+") "}a+=" ); if (isAdditional"+s+") { "}if("all"==x)a+=" delete "+h+"[key"+s+"]; ";else{var M=e.errorPath,N="' + key"+s+" + '";if(e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(e.errorPath,"key"+s,e.opts.jsonPointers)),w)if(x)a+=" delete "+h+"[key"+s+"]; ";else{a+=" valid"+d.level+" = false; ";var F=l;l=e.errSchemaPath+"/additionalProperties";var Q=Q||[];Q.push(a),a="",e.createErrors!==!1?(a+=" { keyword: '"+(t||"additionalProperties")+"' , dataPath: (dataPath || '') + "+e.errorPath+' , schemaPath: "'+l+"\" , params: { additionalProperty: '"+N+"' } ",e.opts.messages!==!1&&(a+=" , message: 'should NOT have additional properties' "),e.opts.verbose&&(a+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ";var H=a;a=Q.pop(),a+=!e.compositeRule&&c?e.async?" throw new ValidationError(["+H+"]); ":" validate.errors = ["+H+"]; return false; ":" var err = "+H+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",l=F,c&&(a+=" break; ")}else if(j)if("failing"==x){a+=" var "+f+" = errors; ";var G=e.compositeRule;e.compositeRule=d.compositeRule=!0,d.schema=b,d.schemaPath=e.schemaPath+".additionalProperties",d.errSchemaPath=e.errSchemaPath+"/additionalProperties",d.errorPath=e.opts._errorDataPathProperty?e.errorPath:e.util.getPathExpr(e.errorPath,"key"+s,e.opts.jsonPointers);var J=h+"[key"+s+"]";d.dataPathArr[m]="key"+s;var K=e.validate(d);a+=e.util.varOccurences(K,v)<2?" "+e.util.varReplace(K,v,J)+" ":" var "+v+" = "+J+"; "+K+" ",a+=" if (!valid"+d.level+") { errors = "+f+"; if (validate.errors !== null) { if (errors) validate.errors.length = errors; else validate.errors = null; } delete "+h+"[key"+s+"]; } ",e.compositeRule=d.compositeRule=G}else{d.schema=b,d.schemaPath=e.schemaPath+".additionalProperties",d.errSchemaPath=e.errSchemaPath+"/additionalProperties",d.errorPath=e.opts._errorDataPathProperty?e.errorPath:e.util.getPathExpr(e.errorPath,"key"+s,e.opts.jsonPointers);var J=h+"[key"+s+"]";d.dataPathArr[m]="key"+s;var K=e.validate(d);a+=e.util.varOccurences(K,v)<2?" "+e.util.varReplace(K,v,J)+" ":" var "+v+" = "+J+"; "+K+" ",c&&(a+=" if (!valid"+d.level+") break; ")}e.errorPath=M}E&&(a+=" } "),a+=" } ",c&&(a+=" if (valid"+d.level+") { ",p+="}")}var B=e.opts.useDefaults&&!e.compositeRule;if(y.length){var Y=y;if(Y)for(var A,Z=-1,W=Y.length-1;W>Z;){A=Y[Z+=1];var X=i[A];if(e.util.schemaHasRules(X,e.RULES.all)){var ee=e.util.getProperty(A),J=h+ee,re=B&&void 0!==X["default"];d.schema=X,d.schemaPath=n+ee,d.errSchemaPath=l+"/"+e.util.escapeFragment(A),d.errorPath=e.util.getPath(e.errorPath,A,e.opts.jsonPointers),d.dataPathArr[m]=e.util.toQuotedString(A);var K=e.validate(d);if(e.util.varOccurences(K,v)<2){K=e.util.varReplace(K,v,J);var te=J}else{var te=v;a+=" var "+v+" = "+J+"; "}if(re)a+=" "+K+" ";else{if(S&&S[A]){a+=" if ("+te+" === undefined) { valid"+d.level+" = false; ";var M=e.errorPath,F=l,ae=e.util.escapeQuotes(A);e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPath(M,A,e.opts.jsonPointers)),l=e.errSchemaPath+"/required";var Q=Q||[];Q.push(a),a="",e.createErrors!==!1?(a+=" { keyword: '"+(t||"required")+"' , dataPath: (dataPath || '') + "+e.errorPath+' , schemaPath: "'+l+"\" , params: { missingProperty: '"+ae+"' } ",e.opts.messages!==!1&&(a+=" , message: '",a+=e.opts._errorDataPathProperty?"is a required property":"should have required property \\'"+ae+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ";var H=a;a=Q.pop(),a+=!e.compositeRule&&c?e.async?" throw new ValidationError(["+H+"]); ":" validate.errors = ["+H+"]; return false; ":" var err = "+H+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",l=F,e.errorPath=M,a+=" } else { "}else a+=c?" if ("+te+" === undefined) { valid"+d.level+" = true; } else { ":" if ("+te+" !== undefined) { ";a+=" "+K+" } "}}c&&(a+=" if (valid"+d.level+") { ",p+="}")}}var se=P;if(se)for(var C,oe=-1,ie=se.length-1;ie>oe;){C=se[oe+=1];var X=g[C];if(e.util.schemaHasRules(X,e.RULES.all)){d.schema=X,d.schemaPath=e.schemaPath+".patternProperties"+e.util.getProperty(C),d.errSchemaPath=e.errSchemaPath+"/patternProperties/"+e.util.escapeFragment(C),a+=" for (var key"+s+" in "+h+") { if ("+e.usePattern(C)+".test(key"+s+")) { ",d.errorPath=e.util.getPathExpr(e.errorPath,"key"+s,e.opts.jsonPointers);var J=h+"[key"+s+"]";d.dataPathArr[m]="key"+s;var K=e.validate(d);a+=e.util.varOccurences(K,v)<2?" "+e.util.varReplace(K,v,J)+" ":" var "+v+" = "+J+"; "+K+" ",c&&(a+=" if (!valid"+d.level+") break; "),a+=" } ",c&&(a+=" else valid"+d.level+" = true; "),a+=" } ",c&&(a+=" if (valid"+d.level+") { ",p+="}")}}if(e.opts.v5){var ne=k;if(ne)for(var U,le=-1,ce=ne.length-1;ce>le;){U=ne[le+=1];var he=R[U],X=he.schema;if(e.util.schemaHasRules(X,e.RULES.all)){d.schema=X,d.schemaPath=e.schemaPath+".patternGroups"+e.util.getProperty(U)+".schema",d.errSchemaPath=e.errSchemaPath+"/patternGroups/"+e.util.escapeFragment(U)+"/schema",a+=" var pgPropCount"+s+" = 0; for (var key"+s+" in "+h+") { if ("+e.usePattern(U)+".test(key"+s+")) { pgPropCount"+s+"++; ",d.errorPath=e.util.getPathExpr(e.errorPath,"key"+s,e.opts.jsonPointers);var J=h+"[key"+s+"]";d.dataPathArr[m]="key"+s;var K=e.validate(d);a+=e.util.varOccurences(K,v)<2?" "+e.util.varReplace(K,v,J)+" ":" var "+v+" = "+J+"; "+K+" ",c&&(a+=" if (!valid"+d.level+") break; "),a+=" } ",c&&(a+=" else valid"+d.level+" = true; "),a+=" } ",c&&(a+=" if (valid"+d.level+") { ",p+="}");var ue=he.minimum,fe=he.maximum;if(void 0!==ue||void 0!==fe){a+=" var "+u+" = true; ";var F=l;if(void 0!==ue){var de=ue,pe="minimum",me="less";a+=" "+u+" = pgPropCount"+s+" >= "+ue+"; ",l=e.errSchemaPath+"/patternGroups/minimum",a+=" if (!"+u+") { ";var Q=Q||[];Q.push(a),a="",e.createErrors!==!1?(a+=" { keyword: '"+(t||"patternGroups")+"' , dataPath: (dataPath || '') + "+e.errorPath+' , schemaPath: "'+l+"\" , params: { reason: '"+pe+"', limit: "+de+", pattern: '"+e.util.escapeQuotes(U)+"' } ",e.opts.messages!==!1&&(a+=" , message: 'should NOT have "+me+" than "+de+' properties matching pattern "'+e.util.escapeQuotes(U)+"\"' "),e.opts.verbose&&(a+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ";var H=a;a=Q.pop(),a+=!e.compositeRule&&c?e.async?" throw new ValidationError(["+H+"]); ":" validate.errors = ["+H+"]; return false; ":" var err = "+H+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } ",void 0!==fe&&(a+=" else ")}if(void 0!==fe){var de=fe,pe="maximum",me="more";a+=" "+u+" = pgPropCount"+s+" <= "+fe+"; ",l=e.errSchemaPath+"/patternGroups/maximum",a+=" if (!"+u+") { ";var Q=Q||[];Q.push(a),a="",e.createErrors!==!1?(a+=" { keyword: '"+(t||"patternGroups")+"' , dataPath: (dataPath || '') + "+e.errorPath+' , schemaPath: "'+l+"\" , params: { reason: '"+pe+"', limit: "+de+", pattern: '"+e.util.escapeQuotes(U)+"' } ",e.opts.messages!==!1&&(a+=" , message: 'should NOT have "+me+" than "+de+' properties matching pattern "'+e.util.escapeQuotes(U)+"\"' "),e.opts.verbose&&(a+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ";var H=a;a=Q.pop(),a+=!e.compositeRule&&c?e.async?" throw new ValidationError(["+H+"]); ":" validate.errors = ["+H+"]; return false; ":" var err = "+H+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } "}l=F,c&&(a+=" if ("+u+") { ",p+="}")}}}}return c&&(a+=" "+p+" if ("+f+" == errors) {"),a=e.util.cleanUpCode(a)}},{}],30:[function(e,r,t){"use strict";r.exports=function(e,r){var t,a,s,o=" ",i=e.level,n=e.dataLevel,l=e.schema[r],c=e.errSchemaPath+"/"+r,h=!e.opts.allErrors,u="data"+(n||""),f="valid"+i;if("#"==l||"#/"==l)e.isRoot?(a=e.async,s="validate"):(a=e.root.schema.$async===!0,s="root.refVal[0]");else{var d=e.resolveRef(e.baseId,l,e.isRoot);if(void 0===d){var p="can't resolve reference "+l+" from id "+e.baseId;if("fail"==e.opts.missingRefs){console.log(p);var m=m||[];m.push(o),o="",e.createErrors!==!1?(o+=" { keyword: '"+(t||"$ref")+"' , dataPath: (dataPath || '') + "+e.errorPath+' , schemaPath: "'+c+"\" , params: { ref: '"+e.util.escapeQuotes(l)+"' } ", e.opts.messages!==!1&&(o+=" , message: 'can\\'t resolve reference "+e.util.escapeQuotes(l)+"' "),e.opts.verbose&&(o+=" , schema: "+e.util.toQuotedString(l)+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),o+=" } "):o+=" {} ";var v=o;o=m.pop(),o+=!e.compositeRule&&h?e.async?" throw new ValidationError(["+v+"]); ":" validate.errors = ["+v+"]; return false; ":" var err = "+v+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",h&&(o+=" if (false) { ")}else{if("ignore"!=e.opts.missingRefs){var y=new Error(p);throw y.missingRef=e.resolve.url(e.baseId,l),y.missingSchema=e.resolve.normalizeId(e.resolve.fullPath(y.missingRef)),y}console.log(p),h&&(o+=" if (true) { ")}}else if(d.inline){var g=e.util.copy(e);g.level++,g.schema=d.schema,g.schemaPath="",g.errSchemaPath=l;var P=e.validate(g).replace(/validate\.schema/g,d.code);o+=" "+P+" ",h&&(o+=" if (valid"+g.level+") { ")}else a=d.async,s=d.code}if(s){var m=m||[];m.push(o),o="",o+=e.opts.passContext?" "+s+".call(this, ":" "+s+"( ",o+=" "+u+", (dataPath || '')",'""'!=e.errorPath&&(o+=" + "+e.errorPath),o+=n?" , data"+(n-1||"")+" , "+e.dataPathArr[n]+" ":" , parentData , parentDataProperty ",o+=") ";var b=o;if(o=m.pop(),a){if(!e.async)throw new Error("async schema referenced by sync schema");o+=" try { ",h&&(o+="var "+f+" ="),o+=" "+e.yieldAwait+" "+b+"; } catch (e) { if (!(e instanceof ValidationError)) throw e; if (vErrors === null) vErrors = e.errors; else vErrors = vErrors.concat(e.errors); errors = vErrors.length; } ",h&&(o+=" if ("+f+") { ")}else o+=" if (!"+b+") { if (vErrors === null) vErrors = "+s+".errors; else vErrors = vErrors.concat("+s+".errors); errors = vErrors.length; } ",h&&(o+=" else { ")}return o}},{}],31:[function(e,r,t){"use strict";r.exports=function(e,r){var t,a=" ",s=e.level,o=e.dataLevel,i=e.schema[r],n=e.schemaPath+"."+r,l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,h="data"+(o||""),u="valid"+s,f=e.opts.v5&&i.$data,d=f?e.util.getData(i.$data,o,e.dataPathArr):i;if(f&&(a+=" var schema"+s+" = "+d+"; ",d="schema"+s),!f)if(i.lengthy;){v=m[y+=1];var P=e.schema.properties[v];P&&e.util.schemaHasRules(P,e.RULES.all)||(p[p.length]=v)}}else var p=i;if(f||p.length){var b=e.errorPath,E=f||p.length>=e.opts.loopRequired;if(c)if(a+=" var missing"+s+"; ",E){f||(a+=" var schema"+s+" = validate.schema"+n+"; ");var w="i"+s,j="schema"+s+"["+w+"]",x="' + "+j+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(b,j,e.opts.jsonPointers)),a+=" var "+u+" = true; ",f&&(a+=" if (schema"+s+" === undefined) "+u+" = true; else if (!Array.isArray(schema"+s+")) "+u+" = false; else {"),a+=" for (var "+w+" = 0; "+w+" < schema"+s+".length; "+w+"++) { "+u+" = "+h+"[schema"+s+"["+w+"]] !== undefined; if (!"+u+") break; } ",f&&(a+=" } "),a+=" if (!"+u+") { ";var $=$||[];$.push(a),a="",e.createErrors!==!1?(a+=" { keyword: '"+(t||"required")+"' , dataPath: (dataPath || '') + "+e.errorPath+' , schemaPath: "'+l+"\" , params: { missingProperty: '"+x+"' } ",e.opts.messages!==!1&&(a+=" , message: '",a+=e.opts._errorDataPathProperty?"is a required property":"should have required property \\'"+x+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ";var _=a;a=$.pop(),a+=!e.compositeRule&&c?e.async?" throw new ValidationError(["+_+"]); ":" validate.errors = ["+_+"]; return false; ":" var err = "+_+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } else { "}else{a+=" if ( ";var S=p;if(S)for(var R,w=-1,k=S.length-1;k>w;){R=S[w+=1],w&&(a+=" || ");var O=e.util.getProperty(R);a+=" ( "+h+O+" === undefined && (missing"+s+" = "+e.util.toQuotedString(e.opts.jsonPointers?R:O)+") ) "}a+=") { ";var j="missing"+s,x="' + "+j+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.opts.jsonPointers?e.util.getPathExpr(b,j,!0):b+" + "+j);var $=$||[];$.push(a),a="",e.createErrors!==!1?(a+=" { keyword: '"+(t||"required")+"' , dataPath: (dataPath || '') + "+e.errorPath+' , schemaPath: "'+l+"\" , params: { missingProperty: '"+x+"' } ",e.opts.messages!==!1&&(a+=" , message: '",a+=e.opts._errorDataPathProperty?"is a required property":"should have required property \\'"+x+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ";var _=a;a=$.pop(),a+=!e.compositeRule&&c?e.async?" throw new ValidationError(["+_+"]); ":" validate.errors = ["+_+"]; return false; ":" var err = "+_+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } else { "}else if(E){f||(a+=" var schema"+s+" = validate.schema"+n+"; ");var w="i"+s,j="schema"+s+"["+w+"]",x="' + "+j+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(b,j,e.opts.jsonPointers)),f&&(a+=" if (schema"+s+" && !Array.isArray(schema"+s+")) { var err = ",e.createErrors!==!1?(a+=" { keyword: '"+(t||"required")+"' , dataPath: (dataPath || '') + "+e.errorPath+' , schemaPath: "'+l+"\" , params: { missingProperty: '"+x+"' } ",e.opts.messages!==!1&&(a+=" , message: '",a+=e.opts._errorDataPathProperty?"is a required property":"should have required property \\'"+x+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } else if (schema"+s+" !== undefined) { "),a+=" for (var "+w+" = 0; "+w+" < schema"+s+".length; "+w+"++) { if ("+h+"[schema"+s+"["+w+"]] === undefined) { var err = ",e.createErrors!==!1?(a+=" { keyword: '"+(t||"required")+"' , dataPath: (dataPath || '') + "+e.errorPath+' , schemaPath: "'+l+"\" , params: { missingProperty: '"+x+"' } ",e.opts.messages!==!1&&(a+=" , message: '",a+=e.opts._errorDataPathProperty?"is a required property":"should have required property \\'"+x+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } } ",f&&(a+=" } ")}else{var A=p;if(A)for(var v,w=-1,I=A.length-1;I>w;){v=A[w+=1];var O=e.util.getProperty(v),x=e.util.escapeQuotes(v);e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPath(b,v,e.opts.jsonPointers)),a+=" if ("+h+O+" === undefined) { var err = ",e.createErrors!==!1?(a+=" { keyword: '"+(t||"required")+"' , dataPath: (dataPath || '') + "+e.errorPath+' , schemaPath: "'+l+"\" , params: { missingProperty: '"+x+"' } ",e.opts.messages!==!1&&(a+=" , message: '",a+=e.opts._errorDataPathProperty?"is a required property":"should have required property \\'"+x+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } "}}e.errorPath=b}else c&&(a+=" if (true) {");return a}},{}],32:[function(e,r,t){"use strict";r.exports=function(e,r){var t,a=" ",s=e.level,o=e.dataLevel,i=e.schema[r],n=e.schemaPath+"."+r,l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,h="data"+(o||""),u="valid"+s,f="errs__"+s,d=e.util.copy(e),p="";d.level++;var m,v="ifPassed"+e.level;a+="var "+v+";";var y=i;if(y)for(var g,P=-1,b=y.length-1;b>P;){if(g=y[P+=1],P&&!m&&(a+=" if (!"+v+") { ",p+="}"),g["if"]&&e.util.schemaHasRules(g["if"],e.RULES.all)){a+=" var "+f+" = errors; ";var E=e.compositeRule;if(e.compositeRule=d.compositeRule=!0,d.createErrors=!1,d.schema=g["if"],d.schemaPath=n+"["+P+"].if",d.errSchemaPath=l+"/"+P+"/if",a+=" "+e.validate(d)+" ",d.createErrors=!0,e.compositeRule=d.compositeRule=E,a+=" "+v+" = valid"+d.level+"; if ("+v+") { ","boolean"==typeof g.then){if(g.then===!1){var w=w||[];w.push(a),a="",e.createErrors!==!1?(a+=" { keyword: '"+(t||"switch")+"' , dataPath: (dataPath || '') + "+e.errorPath+' , schemaPath: "'+l+'" , params: { caseIndex: '+P+" } ",e.opts.messages!==!1&&(a+=" , message: 'should pass \"switch\" keyword validation' "),e.opts.verbose&&(a+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ";var j=a;a=w.pop(),a+=!e.compositeRule&&c?e.async?" throw new ValidationError(["+j+"]); ":" validate.errors = ["+j+"]; return false; ":" var err = "+j+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}a+=" var valid"+d.level+" = "+g.then+"; "}else d.schema=g.then,d.schemaPath=n+"["+P+"].then",d.errSchemaPath=l+"/"+P+"/then",a+=" "+e.validate(d)+" ";a+=" } else { errors = "+f+"; if (vErrors !== null) { if ("+f+") vErrors.length = "+f+"; else vErrors = null; } } "}else if(a+=" "+v+" = true; ","boolean"==typeof g.then){if(g.then===!1){var w=w||[];w.push(a),a="",e.createErrors!==!1?(a+=" { keyword: '"+(t||"switch")+"' , dataPath: (dataPath || '') + "+e.errorPath+' , schemaPath: "'+l+'" , params: { caseIndex: '+P+" } ",e.opts.messages!==!1&&(a+=" , message: 'should pass \"switch\" keyword validation' "),e.opts.verbose&&(a+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ";var j=a;a=w.pop(),a+=!e.compositeRule&&c?e.async?" throw new ValidationError(["+j+"]); ":" validate.errors = ["+j+"]; return false; ":" var err = "+j+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}a+=" var valid"+d.level+" = "+g.then+"; "}else d.schema=g.then,d.schemaPath=n+"["+P+"].then",d.errSchemaPath=l+"/"+P+"/then",a+=" "+e.validate(d)+" ";m=g["continue"]}return a+=""+p+"var "+u+" = valid"+d.level+"; ",a=e.util.cleanUpCode(a)}},{}],33:[function(e,r,t){"use strict";r.exports=function(e,r){var t,a=" ",s=e.level,o=e.dataLevel,i=e.schema[r],n=e.schemaPath+"."+r,l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,h="data"+(o||""),u="valid"+s,f=e.opts.v5&&i.$data,d=f?e.util.getData(i.$data,o,e.dataPathArr):i;if(f&&(a+=" var schema"+s+" = "+d+"; ",d="schema"+s),(i||f)&&e.opts.uniqueItems!==!1){f&&(a+=" var "+u+"; if ("+d+" === false || "+d+" === undefined) "+u+" = true; else if (typeof "+d+" != 'boolean') "+u+" = false; else { "),a+=" var "+u+" = true; if ("+h+".length > 1) { var i = "+h+".length, j; outer: for (;i--;) { for (j = i; j--;) { if (equal("+h+"[i], "+h+"[j])) { "+u+" = false; break outer; } } } } ",f&&(a+=" } "),a+=" if (!"+u+") { ";var p=p||[];p.push(a),a="",e.createErrors!==!1?(a+=" { keyword: '"+(t||"uniqueItems")+"' , dataPath: (dataPath || '') + "+e.errorPath+' , schemaPath: "'+l+'" , params: { i: i, j: j } ',e.opts.messages!==!1&&(a+=" , message: 'should NOT have duplicate items (items ## ' + j + ' and ' + i + ' are identical)' "),e.opts.verbose&&(a+=" , schema: ",a+=f?"validate.schema"+n:""+i,a+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ";var m=a;a=p.pop(),a+=!e.compositeRule&&c?e.async?" throw new ValidationError(["+m+"]); ":" validate.errors = ["+m+"]; return false; ":" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } ",c&&(a+=" else { ")}else c&&(a+=" if (true) { ");return a}},{}],34:[function(e,r,t){"use strict";r.exports=function(e,r){function t(e){for(var r=0;rS;)_=$[S+=1],S&&(s+=" if ("+j+" === undefined) { ",x+="}"),"string"==_?s+=" if ("+w+" == 'number' || "+w+" == 'boolean') "+j+" = '' + "+c+"; else if ("+c+" === null) "+j+" = ''; ":"number"==_||"integer"==_?(s+=" if ("+w+" == 'boolean' || "+c+" === null || ("+w+" == 'string' && "+c+" && "+c+" == +"+c+" ","integer"==_&&(s+=" && !("+c+" % 1)"),s+=")) "+j+" = +"+c+"; "):"boolean"==_?s+=" if ("+c+" === 'false' || "+c+" === 0 || "+c+" === null) "+j+" = false; else if ("+c+" === 'true' || "+c+" === 1) "+j+" = true; ":"null"==_&&(s+=" if ("+c+" === '' || "+c+" === 0 || "+c+" === false) "+j+" = null; ");s+=" "+x+" if ("+j+" === undefined) { ";var k=k||[];k.push(s),s="",e.createErrors!==!1?(s+=" { keyword: '"+(u||"type")+"' , dataPath: (dataPath || '') + "+e.errorPath+' , schemaPath: "'+b+"\" , params: { type: '",s+=y?""+v.join(","):""+v,s+="' } ",e.opts.messages!==!1&&(s+=" , message: 'should be ",s+=y?""+v.join(","):""+v,s+="' "),e.opts.verbose&&(s+=" , schema: validate.schema"+P+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),s+=" } "):s+=" {} ";var O=s;if(s=k.pop(),s+=!e.compositeRule&&d?e.async?" throw new ValidationError(["+O+"]); ":" validate.errors = ["+O+"]; return false; ":" var err = "+O+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",s+=" } else { ",l){var A="data"+(l-1||""),I=e.dataPathArr[l];s+=" "+c+" = "+A+"["+I+"] = "+j+"; "}else s+=" data = "+j+"; if (parentData !== undefined) parentData[parentDataProperty] = "+j+"; ";s+=" } } "}}var q=e.RULES;if(q)for(var L,C=-1,D=q.length-1;D>C;)if(L=q[C+=1],t(L)){if(L.type&&(s+=" if ("+e.util.checkDataType(L.type,c)+") { "),e.opts.useDefaults&&!e.compositeRule)if("object"==L.type&&e.schema.properties){var V=e.schema.properties,z=Object.keys(V),U=z;if(U)for(var T,M=-1,N=U.length-1;N>M;){T=U[M+=1];var F=V[T];if(void 0!==F["default"]){var Q=c+e.util.getProperty(T);s+=" if ("+Q+" === undefined) "+Q+" = ",s+="clone"==e.opts.useDefaults?" "+JSON.stringify(F["default"])+" ":" "+e.useDefault(F["default"])+" ",s+="; "}}}else if("array"==L.type&&Array.isArray(e.schema.items)){var H=e.schema.items;if(H)for(var F,S=-1,G=H.length-1;G>S;)if(F=H[S+=1],void 0!==F["default"]){var Q=c+"["+S+"]";s+=" if ("+Q+" === undefined) "+Q+" = ",s+="clone"==e.opts.useDefaults?" "+JSON.stringify(F["default"])+" ":" "+e.useDefault(F["default"])+" ",s+="; "}}var J=L.rules;if(J)for(var K,B=-1,Y=J.length-1;Y>B;)if(K=J[B+=1],a(K)){if(K.custom){var V=e.schema[K.keyword],Z=e.useCustomRule(K,V,e.schema,e),W=Z.code+".errors",P=e.schemaPath+"."+K.keyword,b=e.errSchemaPath+"/"+K.keyword,X="errs"+n,S="i"+n,ee="ruleErr"+n,re=K.definition,te=re.async,ae=re.inline,se=re.macro;if(te&&!e.async)throw new Error("async keyword in sync schema");if(ae||se||(s+=""+W+" = null;"),s+="var "+X+" = errors;var valid"+n+";",ae&&re.statements)s+=" "+Z.validate;else if(se){var oe=e.util.copy(e);oe.level++,oe.schema=Z.validate,oe.schemaPath="";var ie=e.compositeRule;e.compositeRule=oe.compositeRule=!0;var ne=e.validate(oe).replace(/validate\.schema/g,Z.code);e.compositeRule=oe.compositeRule=ie,s+=" "+ne}else if(re.compile||re.validate){var k=k||[];k.push(s),s="",s+=" "+Z.code+".call( ",s+=e.opts.passContext?"this":"self";Z.validate.length;s+=re.compile||re.schema===!1?" , "+c+" ":" , validate.schema"+P+" , "+c+" , validate.schema"+e.schemaPath+" ",s+=" , (dataPath || '')",'""'!=e.errorPath&&(s+=" + "+e.errorPath),s+=l?" , data"+(l-1||"")+" , "+e.dataPathArr[l]+" ":" , parentData , parentDataProperty ",s+=" ) ";var le=s;s=k.pop(),re.errors!==!1&&(te?(W="customErrors"+n,s+=" var "+W+" = null; try { valid"+n+" = "+e.yieldAwait+le+"; } catch (e) { valid"+n+" = false; if (e instanceof ValidationError) "+W+" = e.errors; else throw e; } "):s+=" "+Z.code+".errors = null; ")}s+="if (! ",s+=ae?re.statements?" valid"+n+" ":" ("+Z.validate+") ":se?" valid"+oe.level+" ":te?re.errors===!1?" ("+e.yieldAwait+le+") ":" valid"+n+" ":" "+le+" ",s+=") { ",u=K.keyword;var k=k||[];k.push(s),s="";var k=k||[];k.push(s),s="",e.createErrors!==!1?(s+=" { keyword: '"+(u||"custom")+"' , dataPath: (dataPath || '') + "+e.errorPath+' , schemaPath: "'+b+"\" , params: { keyword: '"+K.keyword+"' } ",e.opts.messages!==!1&&(s+=" , message: 'should pass \""+K.keyword+"\" keyword validation' "),e.opts.verbose&&(s+=" , schema: validate.schema"+P+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),s+=" } "):s+=" {} ";var O=s;s=k.pop(),s+=!e.compositeRule&&d?e.async?" throw new ValidationError(["+O+"]); ":" validate.errors = ["+O+"]; return false; ":" var err = "+O+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";var ce=s;s=k.pop(),ae?re.errors?"full"!=re.errors&&(s+=" for (var "+S+"="+X+"; "+S+"n;n++)s(i[n]);for(n=0;l>n;n++)t(e,i[n],r)}else i&&s(i),t(e,i,r)}this.RULES.keywords[e]=!0,this.RULES.all[e]=!0}},{}],36:[function(e,r,t){r.exports={id:"http://json-schema.org/draft-04/schema#",$schema:"http://json-schema.org/draft-04/schema#",description:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},positiveInteger:{type:"integer",minimum:0},positiveIntegerDefault0:{allOf:[{$ref:"#/definitions/positiveInteger"},{"default":0}]},simpleTypes:{"enum":["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0}},type:"object",properties:{id:{type:"string",format:"uri"},$schema:{type:"string",format:"uri"},title:{type:"string"},description:{type:"string"},"default":{},multipleOf:{type:"number",minimum:0,exclusiveMinimum:!0},maximum:{type:"number"},exclusiveMaximum:{type:"boolean","default":!1},minimum:{type:"number"},exclusiveMinimum:{type:"boolean","default":!1},maxLength:{$ref:"#/definitions/positiveInteger"},minLength:{$ref:"#/definitions/positiveIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{anyOf:[{type:"boolean"},{$ref:"#"}],"default":{}},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],"default":{}},maxItems:{$ref:"#/definitions/positiveInteger"},minItems:{$ref:"#/definitions/positiveIntegerDefault0"},uniqueItems:{type:"boolean","default":!1},maxProperties:{$ref:"#/definitions/positiveInteger"},minProperties:{$ref:"#/definitions/positiveIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{anyOf:[{type:"boolean"},{$ref:"#"}],"default":{}},definitions:{type:"object",additionalProperties:{$ref:"#"},"default":{}},properties:{type:"object",additionalProperties:{$ref:"#"},"default":{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},"default":{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},"enum":{type:"array",minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},dependencies:{exclusiveMaximum:["maximum"],exclusiveMinimum:["minimum"]},"default":{}}},{}],37:[function(e,r,t){r.exports={id:"https://raw.githubusercontent.com/epoberezkin/ajv/master/lib/refs/json-schema-v5.json#",$schema:"http://json-schema.org/draft-04/schema#",description:"Core schema meta-schema (v5 proposals)",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},positiveInteger:{type:"integer",minimum:0},positiveIntegerDefault0:{allOf:[{$ref:"#/definitions/positiveInteger"},{"default":0}]},simpleTypes:{"enum":["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0},$data:{type:"object",required:["$data"],properties:{$data:{type:"string",format:"relative-json-pointer"}},additionalProperties:!1}},type:"object",properties:{id:{type:"string",format:"uri"},$schema:{type:"string",format:"uri"},title:{type:"string"},description:{type:"string"},"default":{},multipleOf:{anyOf:[{type:"number",minimum:0,exclusiveMinimum:!0},{$ref:"#/definitions/$data"}]},maximum:{anyOf:[{type:"number"},{$ref:"#/definitions/$data"}]},exclusiveMaximum:{anyOf:[{type:"boolean","default":!1},{$ref:"#/definitions/$data"}]},minimum:{anyOf:[{type:"number"},{$ref:"#/definitions/$data"}]},exclusiveMinimum:{anyOf:[{type:"boolean","default":!1},{$ref:"#/definitions/$data"}]},maxLength:{anyOf:[{$ref:"#/definitions/positiveInteger"},{$ref:"#/definitions/$data"}]},minLength:{anyOf:[{$ref:"#/definitions/positiveIntegerDefault0"},{$ref:"#/definitions/$data"}]},pattern:{anyOf:[{type:"string",format:"regex"},{$ref:"#/definitions/$data"}]},additionalItems:{anyOf:[{type:"boolean"},{$ref:"#"},{$ref:"#/definitions/$data"}],"default":{}},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],"default":{}},maxItems:{anyOf:[{$ref:"#/definitions/positiveInteger"},{$ref:"#/definitions/$data"}]},minItems:{anyOf:[{$ref:"#/definitions/positiveIntegerDefault0"},{$ref:"#/definitions/$data"}]},uniqueItems:{anyOf:[{type:"boolean","default":!1},{$ref:"#/definitions/$data"}]},maxProperties:{anyOf:[{$ref:"#/definitions/positiveInteger"},{$ref:"#/definitions/$data"}]},minProperties:{anyOf:[{$ref:"#/definitions/positiveIntegerDefault0"},{$ref:"#/definitions/$data"}]},required:{anyOf:[{$ref:"#/definitions/stringArray"},{$ref:"#/definitions/$data"}]},additionalProperties:{anyOf:[{type:"boolean"},{$ref:"#"},{$ref:"#/definitions/$data"}],"default":{}},definitions:{type:"object",additionalProperties:{$ref:"#"},"default":{}},properties:{type:"object",additionalProperties:{$ref:"#"},"default":{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},"default":{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},"enum":{anyOf:[{type:"array",minItems:1,uniqueItems:!0},{$ref:"#/definitions/$data"}]},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"},format:{anyOf:[{type:"string"},{$ref:"#/definitions/$data"}]},formatMaximum:{anyOf:[{type:"string"},{$ref:"#/definitions/$data"}]},formatMinimum:{anyOf:[{type:"string"},{$ref:"#/definitions/$data"}]},exclusiveFormatMaximum:{anyOf:[{type:"boolean","default":!1},{$ref:"#/definitions/$data"}]},exclusiveFormatMinimum:{anyOf:[{type:"boolean","default":!1},{$ref:"#/definitions/$data"}]},constant:{anyOf:[{},{$ref:"#/definitions/$data"}]},contains:{$ref:"#"},patternGroups:{type:"object",additionalProperties:{type:"object",required:["schema"],properties:{maximum:{anyOf:[{$ref:"#/definitions/positiveInteger"},{$ref:"#/definitions/$data"}]},minimum:{anyOf:[{$ref:"#/definitions/positiveIntegerDefault0"},{$ref:"#/definitions/$data"}]},schema:{$ref:"#"}},additionalProperties:!1},"default":{}},"switch":{type:"array",items:{required:["then"],properties:{"if":{$ref:"#"},then:{anyOf:[{type:"boolean"},{$ref:"#"}]},"continue":{type:"boolean"}},additionalProperties:!1,dependencies:{"continue":["if"]}}}},dependencies:{exclusiveMaximum:["maximum"],exclusiveMinimum:["minimum"],formatMaximum:["format"],formatMinimum:["format"],exclusiveFormatMaximum:["formatMaximum"],exclusiveFormatMinimum:["formatMinimum"]},"default":{}}},{}],38:[function(e,r,t){"use strict";function a(r){function t(e,t,s){var o={inline:s||a[e],statements:!0,errors:"full"};t&&(o.type=t),r.addKeyword(e,o)}var a={"switch":e("./dotjs/switch"),constant:e("./dotjs/constant"),_formatLimit:e("./dotjs/_formatLimit"),patternRequired:e("./dotjs/patternRequired")};if(r._opts.meta!==!1){var i=e("./refs/json-schema-v5.json");r.addMetaSchema(i,o)}t("constant"),r.addKeyword("contains",{type:"array",macro:s}),t("formatMaximum","string",a._formatLimit),t("formatMinimum","string",a._formatLimit),r.addKeyword("exclusiveFormatMaximum"),r.addKeyword("exclusiveFormatMinimum"),r.addKeyword("patternGroups"),t("patternRequired","object"),t("switch")}function s(e){return{not:{items:{not:e}}}}var o="https://raw.githubusercontent.com/epoberezkin/ajv/master/lib/refs/json-schema-v5.json";r.exports={enable:a,META_SCHEMA_ID:o}},{"./dotjs/_formatLimit":12,"./dotjs/constant":19,"./dotjs/patternRequired":28,"./dotjs/switch":32,"./refs/json-schema-v5.json":37}],39:[function(e,r,t){(function(e){!function(a){function s(e){throw new RangeError(q[e])}function o(e,r){for(var t=e.length,a=[];t--;)a[t]=r(e[t]);return a}function i(e,r){var t=e.split("@"),a="";t.length>1&&(a=t[0]+"@",e=t[1]),e=e.replace(I,".");var s=e.split("."),i=o(s,r).join(".");return a+i}function n(e){for(var r,t,a=[],s=0,o=e.length;o>s;)r=e.charCodeAt(s++),r>=55296&&56319>=r&&o>s?(t=e.charCodeAt(s++),56320==(64512&t)?a.push(((1023&r)<<10)+(1023&t)+65536):(a.push(r),s--)):a.push(r);return a}function l(e){return o(e,function(e){var r="";return e>65535&&(e-=65536,r+=D(e>>>10&1023|55296),e=56320|1023&e),r+=D(e)}).join("")}function c(e){return 10>e-48?e-22:26>e-65?e-65:26>e-97?e-97:w}function h(e,r){return e+22+75*(26>e)-((0!=r)<<5)}function u(e,r,t){var a=0;for(e=t?C(e/_):e>>1,e+=C(e/r);e>L*x>>1;a+=w)e=C(e/L);return C(a+(L+1)*e/(e+$))}function f(e){var r,t,a,o,i,n,h,f,d,p,m=[],v=e.length,y=0,g=R,P=S;for(t=e.lastIndexOf(k),0>t&&(t=0),a=0;t>a;++a)e.charCodeAt(a)>=128&&s("not-basic"),m.push(e.charCodeAt(a));for(o=t>0?t+1:0;v>o;){for(i=y,n=1,h=w;o>=v&&s("invalid-input"),f=c(e.charCodeAt(o++)),(f>=w||f>C((E-y)/n))&&s("overflow"),y+=f*n,d=P>=h?j:h>=P+x?x:h-P,!(d>f);h+=w)p=w-d,n>C(E/p)&&s("overflow"),n*=p;r=m.length+1,P=u(y-i,r,0==i),C(y/r)>E-g&&s("overflow"),g+=C(y/r),y%=r,m.splice(y++,0,g)}return l(m)}function d(e){var r,t,a,o,i,l,c,f,d,p,m,v,y,g,P,b=[];for(e=n(e),v=e.length,r=R,t=0,i=S,l=0;v>l;++l)m=e[l],128>m&&b.push(D(m));for(a=o=b.length,o&&b.push(k);v>a;){for(c=E,l=0;v>l;++l)m=e[l],m>=r&&c>m&&(c=m);for(y=a+1,c-r>C((E-t)/y)&&s("overflow"),t+=(c-r)*y,r=c,l=0;v>l;++l)if(m=e[l],r>m&&++t>E&&s("overflow"),m==r){for(f=t,d=w;p=i>=d?j:d>=i+x?x:d-i,!(p>f);d+=w)P=f-p,g=w-p,b.push(D(h(p+P%g,0))),f=C(P/g);b.push(D(h(f,0))),i=u(t,y,a==o),t=0,++a}++t,++r}return b.join("")}function p(e){return i(e,function(e){return O.test(e)?f(e.slice(4).toLowerCase()):e})}function m(e){return i(e,function(e){return A.test(e)?"xn--"+d(e):e})}var v="object"==typeof t&&t&&!t.nodeType&&t,y="object"==typeof r&&r&&!r.nodeType&&r,g="object"==typeof e&&e;g.global!==g&&g.window!==g&&g.self!==g||(a=g);var P,b,E=2147483647,w=36,j=1,x=26,$=38,_=700,S=72,R=128,k="-",O=/^xn--/,A=/[^\x20-\x7E]/,I=/[\x2E\u3002\uFF0E\uFF61]/g,q={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)", "invalid-input":"Invalid input"},L=w-j,C=Math.floor,D=String.fromCharCode;if(P={version:"1.3.2",ucs2:{decode:n,encode:l},decode:f,encode:d,toASCII:m,toUnicode:p},"function"==typeof define&&"object"==typeof define.amd&&define.amd)define("punycode",function(){return P});else if(v&&y)if(r.exports==v)y.exports=P;else for(b in P)P.hasOwnProperty(b)&&(v[b]=P[b]);else a.punycode=P}(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],40:[function(e,r,t){"use strict";function a(e,r){return Object.prototype.hasOwnProperty.call(e,r)}r.exports=function(e,r,t,o){r=r||"&",t=t||"=";var i={};if("string"!=typeof e||0===e.length)return i;var n=/\+/g;e=e.split(r);var l=1e3;o&&"number"==typeof o.maxKeys&&(l=o.maxKeys);var c=e.length;l>0&&c>l&&(c=l);for(var h=0;c>h;++h){var u,f,d,p,m=e[h].replace(n,"%20"),v=m.indexOf(t);v>=0?(u=m.substr(0,v),f=m.substr(v+1)):(u=m,f=""),d=decodeURIComponent(u),p=decodeURIComponent(f),a(i,d)?s(i[d])?i[d].push(p):i[d]=[i[d],p]:i[d]=p}return i};var s=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},{}],41:[function(e,r,t){"use strict";function a(e,r){if(e.map)return e.map(r);for(var t=[],a=0;a",'"',"`"," ","\r","\n"," "],p=["{","}","|","\\","^","`"].concat(d),m=["'"].concat(p),v=["%","/","?",";","#"].concat(m),y=["/","?","#"],g=255,P=/^[+a-z0-9A-Z_-]{0,63}$/,b=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,E={javascript:!0,"javascript:":!0},w={javascript:!0,"javascript:":!0},j={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},x=e("querystring");a.prototype.parse=function(e,r,t){if(!c.isString(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var a=e.indexOf("?"),s=-1!==a&&aR)&&(_=R)}var k,O;O=-1===_?n.lastIndexOf("@"):n.lastIndexOf("@",_),-1!==O&&(k=n.slice(0,O),n=n.slice(O+1),this.auth=decodeURIComponent(k)),_=-1;for(var S=0;SR)&&(_=R)}-1===_&&(_=n.length),this.host=n.slice(0,_),n=n.slice(_),this.parseHost(),this.hostname=this.hostname||"";var A="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!A)for(var I=this.hostname.split(/\./),S=0,q=I.length;q>S;S++){var L=I[S];if(L&&!L.match(P)){for(var C="",D=0,V=L.length;V>D;D++)C+=L.charCodeAt(D)>127?"x":L[D];if(!C.match(P)){var z=I.slice(0,S),U=I.slice(S+1),T=L.match(b);T&&(z.push(T[1]),U.unshift(T[2])),U.length&&(n="/"+U.join(".")+n),this.hostname=z.join(".");break}}}this.hostname.length>g?this.hostname="":this.hostname=this.hostname.toLowerCase(),A||(this.hostname=l.toASCII(this.hostname));var M=this.port?":"+this.port:"",N=this.hostname||"";this.host=N+M,this.href+=this.host,A&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==n[0]&&(n="/"+n))}if(!E[p])for(var S=0,q=m.length;q>S;S++){var F=m[S];if(-1!==n.indexOf(F)){var Q=encodeURIComponent(F);Q===F&&(Q=escape(F)),n=n.split(F).join(Q)}}var H=n.indexOf("#");-1!==H&&(this.hash=n.substr(H),n=n.slice(0,H));var G=n.indexOf("?");if(-1!==G?(this.search=n.substr(G),this.query=n.substr(G+1),r&&(this.query=x.parse(this.query)),n=n.slice(0,G)):r&&(this.search="",this.query={}),n&&(this.pathname=n),j[p]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var M=this.pathname||"",J=this.search||"";this.path=M+J}return this.href=this.format(),this},a.prototype.format=function(){var e=this.auth||"";e&&(e=encodeURIComponent(e),e=e.replace(/%3A/i,":"),e+="@");var r=this.protocol||"",t=this.pathname||"",a=this.hash||"",s=!1,o="";this.host?s=e+this.host:this.hostname&&(s=e+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(s+=":"+this.port)),this.query&&c.isObject(this.query)&&Object.keys(this.query).length&&(o=x.stringify(this.query));var i=this.search||o&&"?"+o||"";return r&&":"!==r.substr(-1)&&(r+=":"),this.slashes||(!r||j[r])&&s!==!1?(s="//"+(s||""),t&&"/"!==t.charAt(0)&&(t="/"+t)):s||(s=""),a&&"#"!==a.charAt(0)&&(a="#"+a),i&&"?"!==i.charAt(0)&&(i="?"+i),t=t.replace(/[?#]/g,function(e){return encodeURIComponent(e)}),i=i.replace("#","%23"),r+s+t+i+a},a.prototype.resolve=function(e){return this.resolveObject(s(e,!1,!0)).format()},a.prototype.resolveObject=function(e){if(c.isString(e)){var r=new a;r.parse(e,!1,!0),e=r}for(var t=new a,s=Object.keys(this),o=0;o0?t.host.split("@"):!1;$&&(t.auth=$.shift(),t.host=t.hostname=$.shift())}return t.search=e.search,t.query=e.query,c.isNull(t.pathname)&&c.isNull(t.search)||(t.path=(t.pathname?t.pathname:"")+(t.search?t.search:"")),t.href=t.format(),t}if(!E.length)return t.pathname=null,t.search?t.path="/"+t.search:t.path=null,t.href=t.format(),t;for(var _=E.slice(-1)[0],S=(t.host||e.host||E.length>1)&&("."===_||".."===_)||""===_,R=0,k=E.length;k>=0;k--)_=E[k],"."===_?E.splice(k,1):".."===_?(E.splice(k,1),R++):R&&(E.splice(k,1),R--);if(!P&&!b)for(;R--;R)E.unshift("..");!P||""===E[0]||E[0]&&"/"===E[0].charAt(0)||E.unshift(""),S&&"/"!==E.join("/").substr(-1)&&E.push("");var O=""===E[0]||E[0]&&"/"===E[0].charAt(0);if(x){t.hostname=t.host=O?"":E.length?E.shift():"";var $=t.host&&t.host.indexOf("@")>0?t.host.split("@"):!1;$&&(t.auth=$.shift(),t.host=t.hostname=$.shift())}return P=P||t.host&&E.length,P&&!O&&E.unshift(""),E.length?t.pathname=E.join("/"):(t.pathname=null,t.path=null),c.isNull(t.pathname)&&c.isNull(t.search)||(t.path=(t.pathname?t.pathname:"")+(t.search?t.search:"")),t.auth=e.auth||t.auth,t.slashes=t.slashes||e.slashes,t.href=t.format(),t},a.prototype.parseHost=function(){var e=this.host,r=u.exec(e);r&&(r=r[0],":"!==r&&(this.port=r.substr(1)),e=e.substr(0,e.length-r.length)),e&&(this.hostname=e)}},{"./util":44,punycode:39,querystring:42}],44:[function(e,r,t){"use strict";r.exports={isString:function(e){return"string"==typeof e},isObject:function(e){return"object"==typeof e&&null!==e},isNull:function(e){return null===e},isNullOrUndefined:function(e){return null==e}}},{}],45:[function(e,r,t){function a(e){var r=this,t=f.call(arguments,1);return new Promise(function(a,o){function i(r){var t;try{t=e.next(r)}catch(a){return o(a)}c(t)}function n(r){var t;try{t=e["throw"](r)}catch(a){return o(a)}c(t)}function c(e){if(e.done)return a(e.value);var t=s.call(r,e.value);return t&&l(t)?t.then(i,n):n(new TypeError('You may only yield a function, promise, generator, array, or object, but the following object was passed: "'+String(e.value)+'"'))}return"function"==typeof e&&(e=e.apply(r,t)),e&&"function"==typeof e.next?void i():a(e)})}function s(e){return e?l(e)?e:h(e)||c(e)?a.call(this,e):"function"==typeof e?o.call(this,e):Array.isArray(e)?i.call(this,e):u(e)?n.call(this,e):e:e}function o(e){var r=this;return new Promise(function(t,a){e.call(r,function(e,r){return e?a(e):(arguments.length>2&&(r=f.call(arguments,1)),void t(r))})})}function i(e){return Promise.all(e.map(s,this))}function n(e){function r(e,r){t[r]=void 0,o.push(e.then(function(e){t[r]=e}))}for(var t=new e.constructor,a=Object.keys(e),o=[],i=0;i="0"&&"9">=s;)r+=s,c();if("."===s)for(r+=".";c()&&s>="0"&&"9">=s;)r+=s;if("e"===s||"E"===s)for(r+=s,c(),"-"!==s&&"+"!==s||(r+=s,c());s>="0"&&"9">=s;)r+=s,c();return e=+r,isFinite(e)?e:void l("Bad number")},u=function(){var e,r,t,a="";if('"'===s)for(;c();){if('"'===s)return c(),a;if("\\"===s)if(c(),"u"===s){for(t=0,r=0;4>r&&(e=parseInt(c(),16),isFinite(e));r+=1)t=16*t+e;a+=String.fromCharCode(t)}else{if("string"!=typeof n[s])break;a+=n[s]}else a+=s}l("Bad string")},f=function(){for(;s&&" ">=s;)c()},d=function(){switch(s){case"t":return c("t"),c("r"),c("u"),c("e"),!0;case"f":return c("f"),c("a"),c("l"),c("s"),c("e"),!1;case"n":return c("n"),c("u"),c("l"),c("l"),null}l("Unexpected '"+s+"'")},p=function(){var e=[];if("["===s){if(c("["),f(),"]"===s)return c("]"),e;for(;s;){if(e.push(i()),f(),"]"===s)return c("]"),e;c(","),f()}}l("Bad array")},m=function(){var e,r={};if("{"===s){if(c("{"),f(),"}"===s)return c("}"),r;for(;s;){if(e=u(),f(),c(":"),Object.hasOwnProperty.call(r,e)&&l('Duplicate key "'+e+'"'),r[e]=i(),f(),"}"===s)return c("}"),r;c(","),f()}}l("Bad object")};i=function(){switch(f(),s){case"{":return m();case"[":return p();case'"':return u();case"-":return h();default:return s>="0"&&"9">=s?h():d()}},r.exports=function(e,r){var t;return o=e,a=0,s=" ",t=i(),f(),s&&l("Syntax error"),"function"==typeof r?function n(e,t){var a,s,o=e[t];if(o&&"object"==typeof o)for(a in o)Object.prototype.hasOwnProperty.call(o,a)&&(s=n(o,a),void 0!==s?o[a]=s:delete o[a]);return r.call(e,t,o)}({"":t},""):t}},{}],49:[function(e,r,t){function a(e){return l.lastIndex=0,l.test(e)?'"'+e.replace(l,function(e){var r=c[e];return"string"==typeof r?r:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+e+'"'}function s(e,r){var t,l,c,h,u,f=o,d=r[e];switch(d&&"object"==typeof d&&"function"==typeof d.toJSON&&(d=d.toJSON(e)),"function"==typeof n&&(d=n.call(r,e,d)),typeof d){case"string":return a(d);case"number":return isFinite(d)?String(d):"null";case"boolean":case"null":return String(d);case"object":if(!d)return"null";if(o+=i,u=[],"[object Array]"===Object.prototype.toString.apply(d)){for(h=d.length,t=0;h>t;t+=1)u[t]=s(t,d)||"null";return c=0===u.length?"[]":o?"[\n"+o+u.join(",\n"+o)+"\n"+f+"]":"["+u.join(",")+"]",o=f,c}if(n&&"object"==typeof n)for(h=n.length,t=0;h>t;t+=1)l=n[t],"string"==typeof l&&(c=s(l,d),c&&u.push(a(l)+(o?": ":":")+c));else for(l in d)Object.prototype.hasOwnProperty.call(d,l)&&(c=s(l,d),c&&u.push(a(l)+(o?": ":":")+c));return c=0===u.length?"{}":o?"{\n"+o+u.join(",\n"+o)+"\n"+f+"}":"{"+u.join(",")+"}",o=f,c}}var o,i,n,l=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,c={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};r.exports=function(e,r,t){var a;if(o="",i="","number"==typeof t)for(a=0;t>a;a+=1)i+=" ";else"string"==typeof t&&(i=t);if(n=r,r&&"function"!=typeof r&&("object"!=typeof r||"number"!=typeof r.length))throw new Error("JSON.stringify");return s("",{"":e})}},{}],ajv:[function(e,r,t){"use strict";function a(e){return y.test(e)}function s(r){function t(e,r){var t;if("string"==typeof e){if(t=x(e),!t)throw new Error('no schema with key or ref "'+e+'"')}else{var a=R(e);t=a.validate||k(a)}var s=t(r);return t.async?"*"==D._opts.async?m(s):s:(D.errors=t.errors,s)}function P(e){var r=R(e);return r.validate||k(r)}function b(e,r,t,a){if(Array.isArray(e))for(var s=0;s= 0 || format === 'transparent';\n\t }\n\t });\n\t\n\t // TODO: add more types here\n\t\n\t return function Decorator(target) {\n\t var proxyConfig = target.prototype.config;\n\t target.prototype.config = function proxy(name, value) {\n\t if (schema.hasOwnProperty(name)) {\n\t var valid = ajv.validate(schema[name], value);\n\t if (valid) {\n\t return proxyConfig.call(this, name, value);\n\t }\n\t\n\t // TODO: handle errors\n\t throw Error('invald config');\n\t } else {\n\t return proxyConfig.call(this, name, value);\n\t }\n\t };\n\t };\n\t}\n\t\n\tif (false) {\n\t require('./index.spec.js')(KotoConfig);\n\t}\n\t\n\texports.default = KotoConfig;\n\n/***/ },\n/* 1 */\n/***/ function(module, exports, __webpack_require__) {\n\n\tvar require;var require;/* WEBPACK VAR INJECTION */(function(global) {(function(f){if(true){module.exports=f()}else if(typeof define===\"function\"&&define.amd){define([],f)}else{var g;if(typeof window!==\"undefined\"){g=window}else if(typeof global!==\"undefined\"){g=global}else if(typeof self!==\"undefined\"){g=self}else{g=this}g.Ajv = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require==\"function\"&&require;if(!u&&a)return require(o,!0);if(i)return i(o,!0);var f=new Error(\"Cannot find module '\"+o+\"'\");throw f.code=\"MODULE_NOT_FOUND\",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require==\"function\"&&require;for(var o=0;o= 1 && month <= 12 && day >= 1 && day <= DAYS[month];\n\t}\n\t\n\t\n\tfunction time(str, full) {\n\t var matches = str.match(TIME);\n\t if (!matches) return false;\n\t\n\t var hour = matches[1];\n\t var minute = matches[2];\n\t var second = matches[3];\n\t var timeZone = matches[5];\n\t return hour <= 23 && minute <= 59 && second <= 59 && (!full || timeZone);\n\t}\n\t\n\t\n\tvar DATE_TIME_SEPARATOR = /t|\\s/i;\n\tfunction date_time(str) {\n\t // http://tools.ietf.org/html/rfc3339#section-5.6\n\t var dateTime = str.split(DATE_TIME_SEPARATOR);\n\t return date(dateTime[0]) && time(dateTime[1], true);\n\t}\n\t\n\t\n\tfunction hostname(str) {\n\t // http://tools.ietf.org/html/rfc1034#section-3.5\n\t return str.length <= 255 && HOSTNAME.test(str);\n\t}\n\t\n\t\n\tvar NOT_URI_FRAGMENT = /\\/|\\:/;\n\tfunction uri(str) {\n\t // http://jmrware.com/articles/2009/uri_regexp/URI_regex.html + optional protocol + required \".\"\n\t return NOT_URI_FRAGMENT.test(str) && URI.test(str);\n\t}\n\t\n\t\n\tfunction regex(str) {\n\t try {\n\t new RegExp(str);\n\t return true;\n\t } catch(e) {\n\t return false;\n\t }\n\t}\n\t\n\t\n\tfunction compareDate(d1, d2) {\n\t if (!(d1 && d2)) return;\n\t if (d1 > d2) return 1;\n\t if (d1 < d2) return -1;\n\t if (d1 === d2) return 0;\n\t}\n\t\n\t\n\tfunction compareTime(t1, t2) {\n\t if (!(t1 && t2)) return;\n\t t1 = t1.match(TIME);\n\t t2 = t2.match(TIME);\n\t if (!(t1 && t2)) return;\n\t t1 = t1[1] + t1[2] + t1[3] + (t1[4]||'');\n\t t2 = t2[1] + t2[2] + t2[3] + (t2[4]||'');\n\t if (t1 > t2) return 1;\n\t if (t1 < t2) return -1;\n\t if (t1 === t2) return 0;\n\t}\n\t\n\t\n\tfunction compareDateTime(dt1, dt2) {\n\t if (!(dt1 && dt2)) return;\n\t dt1 = dt1.split(DATE_TIME_SEPARATOR);\n\t dt2 = dt2.split(DATE_TIME_SEPARATOR);\n\t var res = compareDate(dt1[0], dt2[0]);\n\t if (res === undefined) return;\n\t return res || compareTime(dt1[1], dt2[1]);\n\t}\n\t\n\t},{\"./util\":10}],6:[function(require,module,exports){\n\t'use strict';\n\t\n\tvar resolve = require('./resolve')\n\t , util = require('./util')\n\t , stableStringify = require('json-stable-stringify')\n\t , async = require('../async');\n\t\n\tvar beautify = (function() { try { return require('' + 'js-beautify').js_beautify; } catch(e) {/*empty*/} })();\n\t\n\tvar validateGenerator = require('../dotjs/validate');\n\t\n\tmodule.exports = compile;\n\t\n\t\n\t/**\n\t * Compiles schema to validation function\n\t * @this Ajv\n\t * @param {Object} schema schema object\n\t * @param {Object} root object with information about the root schema for this schema\n\t * @param {Object} localRefs the hash of local references inside the schema (created by resolve.id), used for inline resolution\n\t * @param {String} baseId base ID for IDs in the schema\n\t * @return {Function} validation function\n\t */\n\tfunction compile(schema, root, localRefs, baseId) {\n\t /* jshint validthis: true, evil: true */\n\t /* eslint no-shadow: 0 */\n\t var self = this\n\t , opts = this._opts\n\t , refVal = [ undefined ]\n\t , refs = {}\n\t , patterns = []\n\t , patternsHash = {}\n\t , defaults = []\n\t , defaultsHash = {}\n\t , customRules = [];\n\t\n\t root = root || { schema: schema, refVal: refVal, refs: refs };\n\t\n\t var formats = this._formats;\n\t var RULES = this.RULES;\n\t\n\t return localCompile(schema, root, localRefs, baseId);\n\t\n\t\n\t function localCompile(_schema, _root, localRefs, baseId) {\n\t var isRoot = !_root || (_root && _root.schema == _schema);\n\t if (_root.schema != root.schema)\n\t return compile.call(self, _schema, _root, localRefs, baseId);\n\t\n\t var $async = _schema.$async === true;\n\t if ($async && !opts.transpile) async.setup(opts);\n\t\n\t var sourceCode = validateGenerator({\n\t isTop: true,\n\t schema: _schema,\n\t isRoot: isRoot,\n\t baseId: baseId,\n\t root: _root,\n\t schemaPath: '',\n\t errSchemaPath: '#',\n\t errorPath: '\"\"',\n\t RULES: RULES,\n\t validate: validateGenerator,\n\t util: util,\n\t resolve: resolve,\n\t resolveRef: resolveRef,\n\t usePattern: usePattern,\n\t useDefault: useDefault,\n\t useCustomRule: useCustomRule,\n\t opts: opts,\n\t formats: formats,\n\t self: self\n\t });\n\t\n\t sourceCode = vars(refVal, refValCode) + vars(patterns, patternCode)\n\t + vars(defaults, defaultCode) + vars(customRules, customRuleCode)\n\t + sourceCode;\n\t\n\t if (opts.beautify) {\n\t /* istanbul ignore else */\n\t if (beautify) sourceCode = beautify(sourceCode, opts.beautify);\n\t else console.error('\"npm install js-beautify\" to use beautify option');\n\t }\n\t // console.log('\\n\\n\\n *** \\n', sourceCode);\n\t var validate, validateCode\n\t , transpile = opts._transpileFunc;\n\t try {\n\t validateCode = $async && transpile\n\t ? transpile(sourceCode)\n\t : sourceCode;\n\t eval(validateCode);\n\t refVal[0] = validate;\n\t } catch(e) {\n\t console.error('Error compiling schema, function code:', validateCode);\n\t throw e;\n\t }\n\t\n\t validate.schema = _schema;\n\t validate.errors = null;\n\t validate.refs = refs;\n\t validate.refVal = refVal;\n\t validate.root = isRoot ? validate : _root;\n\t if ($async) validate.async = true;\n\t if (transpile) validate.sourceCode = sourceCode;\n\t\n\t return validate;\n\t }\n\t\n\t function resolveRef(baseId, ref, isRoot) {\n\t ref = resolve.url(baseId, ref);\n\t var refIndex = refs[ref];\n\t var _refVal, refCode;\n\t if (refIndex !== undefined) {\n\t _refVal = refVal[refIndex];\n\t refCode = 'refVal[' + refIndex + ']';\n\t return resolvedRef(_refVal, refCode);\n\t }\n\t if (!isRoot) {\n\t var rootRefId = root.refs[ref];\n\t if (rootRefId !== undefined) {\n\t _refVal = root.refVal[rootRefId];\n\t refCode = addLocalRef(ref, _refVal);\n\t return resolvedRef(_refVal, refCode);\n\t }\n\t }\n\t\n\t refCode = addLocalRef(ref);\n\t var v = resolve.call(self, localCompile, root, ref);\n\t if (!v) {\n\t var localSchema = localRefs && localRefs[ref];\n\t if (localSchema) {\n\t v = resolve.inlineRef(localSchema, opts.inlineRefs)\n\t ? localSchema\n\t : compile.call(self, localSchema, root, localRefs, baseId);\n\t }\n\t }\n\t\n\t if (v) {\n\t replaceLocalRef(ref, v);\n\t return resolvedRef(v, refCode);\n\t }\n\t }\n\t\n\t function addLocalRef(ref, v) {\n\t var refId = refVal.length;\n\t refVal[refId] = v;\n\t refs[ref] = refId;\n\t return 'refVal' + refId;\n\t }\n\t\n\t function replaceLocalRef(ref, v) {\n\t var refId = refs[ref];\n\t refVal[refId] = v;\n\t }\n\t\n\t function resolvedRef(refVal, code) {\n\t return typeof refVal == 'object'\n\t ? { code: code, schema: refVal, inline: true }\n\t : { code: code, async: refVal && refVal.async };\n\t }\n\t\n\t function usePattern(regexStr) {\n\t var index = patternsHash[regexStr];\n\t if (index === undefined) {\n\t index = patternsHash[regexStr] = patterns.length;\n\t patterns[index] = regexStr;\n\t }\n\t return 'pattern' + index;\n\t }\n\t\n\t function useDefault(value) {\n\t switch (typeof value) {\n\t case 'boolean':\n\t case 'number':\n\t return '' + value;\n\t case 'string':\n\t return util.toQuotedString(value);\n\t case 'object':\n\t if (value === null) return 'null';\n\t var valueStr = stableStringify(value);\n\t var index = defaultsHash[valueStr];\n\t if (index === undefined) {\n\t index = defaultsHash[valueStr] = defaults.length;\n\t defaults[index] = value;\n\t }\n\t return 'default' + index;\n\t }\n\t }\n\t\n\t function useCustomRule(rule, schema, parentSchema, it) {\n\t var compile = rule.definition.compile\n\t , inline = rule.definition.inline\n\t , macro = rule.definition.macro;\n\t\n\t var validate;\n\t if (compile) {\n\t validate = compile.call(self, schema, parentSchema);\n\t } else if (macro) {\n\t validate = macro.call(self, schema, parentSchema);\n\t if (opts.validateSchema !== false) self.validateSchema(validate, true);\n\t } else if (inline) {\n\t validate = inline.call(self, it, rule.keyword, schema, parentSchema);\n\t } else {\n\t validate = rule.definition.validate;\n\t }\n\t\n\t var index = customRules.length;\n\t customRules[index] = validate;\n\t\n\t return {\n\t code: 'customRule' + index,\n\t validate: validate\n\t };\n\t }\n\t}\n\t\n\t\n\tfunction patternCode(i, patterns) {\n\t return 'var pattern' + i + ' = new RegExp(' + util.toQuotedString(patterns[i]) + ');';\n\t}\n\t\n\t\n\tfunction defaultCode(i) {\n\t return 'var default' + i + ' = defaults[' + i + '];';\n\t}\n\t\n\t\n\tfunction refValCode(i, refVal) {\n\t return refVal[i] ? 'var refVal' + i + ' = refVal[' + i + '];' : '';\n\t}\n\t\n\t\n\tfunction customRuleCode(i) {\n\t return 'var customRule' + i + ' = customRules[' + i + '];';\n\t}\n\t\n\t\n\tfunction vars(arr, statement) {\n\t if (!arr.length) return '';\n\t var code = '';\n\t for (var i=0; i= 0xD800 && value <= 0xDBFF && pos < len) {\n\t // high surrogate, and there is a next character\n\t value = str.charCodeAt(pos);\n\t if ((value & 0xFC00) == 0xDC00) pos++; // low surrogate\n\t }\n\t }\n\t return length;\n\t}\n\t\n\t\n\tfunction varOccurences(str, dataVar) {\n\t dataVar += '[^0-9]';\n\t var matches = str.match(new RegExp(dataVar, 'g'));\n\t return matches ? matches.length : 0;\n\t}\n\t\n\t\n\tfunction varReplace(str, dataVar, expr) {\n\t dataVar += '([^0-9])';\n\t expr = expr.replace(/\\$/g, '$$$$');\n\t return str.replace(new RegExp(dataVar, 'g'), expr + '$1');\n\t}\n\t\n\t\n\tvar EMPTY_ELSE = /else\\s*{\\s*}/g\n\t , EMPTY_IF_NO_ELSE = /if\\s*\\([^)]+\\)\\s*\\{\\s*\\}(?!\\s*else)/g\n\t , EMPTY_IF_WITH_ELSE = /if\\s*\\(([^)]+)\\)\\s*\\{\\s*\\}\\s*else(?!\\s*if)/g;\n\tfunction cleanUpCode(out) {\n\t return out.replace(EMPTY_ELSE, '')\n\t .replace(EMPTY_IF_NO_ELSE, '')\n\t .replace(EMPTY_IF_WITH_ELSE, 'if (!($1))');\n\t}\n\t\n\t\n\tvar ERRORS_REGEXP = /[^v\\.]errors/g\n\t , REMOVE_ERRORS = /var errors = 0;|var vErrors = null;|validate.errors = vErrors;/g\n\t , REMOVE_ERRORS_ASYNC = /var errors = 0;|var vErrors = null;/g\n\t , RETURN_VALID = 'return errors === 0;'\n\t , RETURN_TRUE = 'validate.errors = null; return true;'\n\t , RETURN_ASYNC = /if \\(errors === 0\\) return true;\\s*else throw new ValidationError\\(vErrors\\);/\n\t , RETURN_TRUE_ASYNC = 'return true;';\n\t\n\tfunction cleanUpVarErrors(out, async) {\n\t var matches = out.match(ERRORS_REGEXP);\n\t if (!matches || matches.length !== 2) return out;\n\t return async\n\t ? out.replace(REMOVE_ERRORS_ASYNC, '')\n\t .replace(RETURN_ASYNC, RETURN_TRUE_ASYNC)\n\t : out.replace(REMOVE_ERRORS, '')\n\t .replace(RETURN_VALID, RETURN_TRUE);\n\t}\n\t\n\t\n\tfunction schemaHasRules(schema, rules) {\n\t for (var key in schema) if (rules[key]) return true;\n\t}\n\t\n\t\n\tfunction toQuotedString(str) {\n\t return '\\'' + escapeQuotes(str) + '\\'';\n\t}\n\t\n\t\n\tfunction getPathExpr(currentPath, expr, jsonPointers, isNumber) {\n\t var path = jsonPointers // false by default\n\t ? '\\'/\\' + ' + expr + (isNumber ? '' : '.replace(/~/g, \\'~0\\').replace(/\\\\//g, \\'~1\\')')\n\t : (isNumber ? '\\'[\\' + ' + expr + ' + \\']\\'' : '\\'[\\\\\\'\\' + ' + expr + ' + \\'\\\\\\']\\'');\n\t return joinPaths(currentPath, path);\n\t}\n\t\n\t\n\tfunction getPath(currentPath, prop, jsonPointers) {\n\t var path = jsonPointers // false by default\n\t ? toQuotedString('/' + escapeJsonPointer(prop))\n\t : toQuotedString(getProperty(prop));\n\t return joinPaths(currentPath, path);\n\t}\n\t\n\t\n\tvar RELATIVE_JSON_POINTER = /^([0-9]+)(#|\\/(?:[^~]|~0|~1)*)?$/;\n\tfunction getData($data, lvl, paths) {\n\t var matches = $data.match(RELATIVE_JSON_POINTER);\n\t if (!matches) throw new Error('Invalid relative JSON-pointer: ' + $data);\n\t var up = +matches[1];\n\t var jsonPointer = matches[2];\n\t if (jsonPointer == '#') {\n\t if (up >= lvl) throw new Error('Cannot access property/index ' + up + ' levels up, current level is ' + lvl);\n\t return paths[lvl - up];\n\t }\n\t\n\t if (up > lvl) throw new Error('Cannot access data ' + up + ' levels up, current level is ' + lvl);\n\t var data = 'data' + ((lvl - up) || '');\n\t if (!jsonPointer) return data;\n\t\n\t var expr = data;\n\t var segments = jsonPointer.split('/');\n\t for (var i=0; i',\n\t $result = 'result' + $lvl;\n\t var $isData = it.opts.v5 && $schema.$data;\n\t var $schemaValue = $isData ? it.util.getData($schema.$data, $dataLvl, it.dataPathArr) : $schema;\n\t if ($isData) {\n\t out += ' var schema' + ($lvl) + ' = ' + ($schemaValue) + '; ';\n\t $schemaValue = 'schema' + $lvl;\n\t }\n\t if ($isDataExcl) {\n\t var $schemaValueExcl = it.util.getData($schemaExcl.$data, $dataLvl, it.dataPathArr),\n\t $exclusive = 'exclusive' + $lvl,\n\t $opExpr = 'op' + $lvl,\n\t $opStr = '\\' + ' + $opExpr + ' + \\'';\n\t out += ' var schemaExcl' + ($lvl) + ' = ' + ($schemaValueExcl) + '; ';\n\t $schemaValueExcl = 'schemaExcl' + $lvl;\n\t out += ' if (typeof ' + ($schemaValueExcl) + ' != \\'boolean\\' && ' + ($schemaValueExcl) + ' !== undefined) { ' + ($valid) + ' = false; ';\n\t var $errorKeyword = $exclusiveKeyword;\n\t var $$outStack = $$outStack || [];\n\t $$outStack.push(out);\n\t out = ''; /* istanbul ignore else */\n\t if (it.createErrors !== false) {\n\t out += ' { keyword: \\'' + ($errorKeyword || '_exclusiveFormatLimit') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: \"' + ($errSchemaPath) + '\" , params: {} ';\n\t if (it.opts.messages !== false) {\n\t out += ' , message: \\'' + ($exclusiveKeyword) + ' should be boolean\\' ';\n\t }\n\t if (it.opts.verbose) {\n\t out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n\t }\n\t out += ' } ';\n\t } else {\n\t out += ' {} ';\n\t }\n\t var __err = out;\n\t out = $$outStack.pop();\n\t if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */\n\t if (it.async) {\n\t out += ' throw new ValidationError([' + (__err) + ']); ';\n\t } else {\n\t out += ' validate.errors = [' + (__err) + ']; return false; ';\n\t }\n\t } else {\n\t out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n\t }\n\t out += ' } ';\n\t if ($breakOnError) {\n\t $closingBraces += '}';\n\t out += ' else { ';\n\t }\n\t if ($isData) {\n\t out += ' if (' + ($schemaValue) + ' === undefined) ' + ($valid) + ' = true; else if (typeof ' + ($schemaValue) + ' != \\'string\\') ' + ($valid) + ' = false; else { ';\n\t $closingBraces += '}';\n\t }\n\t if ($isDataFormat) {\n\t out += ' if (!' + ($compare) + ') ' + ($valid) + ' = true; else { ';\n\t $closingBraces += '}';\n\t }\n\t out += ' var ' + ($result) + ' = ' + ($compare) + '(' + ($data) + ', ';\n\t if ($isData) {\n\t out += '' + ($schemaValue);\n\t } else {\n\t out += '' + (it.util.toQuotedString($schema));\n\t }\n\t out += ' ); if (' + ($result) + ' === undefined) ' + ($valid) + ' = false; var exclusive' + ($lvl) + ' = ' + ($schemaValueExcl) + ' === true; if (' + ($valid) + ' === undefined) { ' + ($valid) + ' = exclusive' + ($lvl) + ' ? ' + ($result) + ' ' + ($op) + ' 0 : ' + ($result) + ' ' + ($op) + '= 0; } if (!' + ($valid) + ') var op' + ($lvl) + ' = exclusive' + ($lvl) + ' ? \\'' + ($op) + '\\' : \\'' + ($op) + '=\\';';\n\t } else {\n\t var $exclusive = $schemaExcl === true,\n\t $opStr = $op;\n\t if (!$exclusive) $opStr += '=';\n\t var $opExpr = '\\'' + $opStr + '\\'';\n\t if ($isData) {\n\t out += ' if (' + ($schemaValue) + ' === undefined) ' + ($valid) + ' = true; else if (typeof ' + ($schemaValue) + ' != \\'string\\') ' + ($valid) + ' = false; else { ';\n\t $closingBraces += '}';\n\t }\n\t if ($isDataFormat) {\n\t out += ' if (!' + ($compare) + ') ' + ($valid) + ' = true; else { ';\n\t $closingBraces += '}';\n\t }\n\t out += ' var ' + ($result) + ' = ' + ($compare) + '(' + ($data) + ', ';\n\t if ($isData) {\n\t out += '' + ($schemaValue);\n\t } else {\n\t out += '' + (it.util.toQuotedString($schema));\n\t }\n\t out += ' ); if (' + ($result) + ' === undefined) ' + ($valid) + ' = false; if (' + ($valid) + ' === undefined) ' + ($valid) + ' = ' + ($result) + ' ' + ($op);\n\t if (!$exclusive) {\n\t out += '=';\n\t }\n\t out += ' 0;';\n\t }\n\t out += '' + ($closingBraces) + 'if (!' + ($valid) + ') { ';\n\t var $errorKeyword = $keyword;\n\t var $$outStack = $$outStack || [];\n\t $$outStack.push(out);\n\t out = ''; /* istanbul ignore else */\n\t if (it.createErrors !== false) {\n\t out += ' { keyword: \\'' + ($errorKeyword || '_formatLimit') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: \"' + ($errSchemaPath) + '\" , params: { limit: ';\n\t if ($isData) {\n\t out += '' + ($schemaValue);\n\t } else {\n\t out += '' + (it.util.toQuotedString($schema));\n\t }\n\t out += ' } ';\n\t if (it.opts.messages !== false) {\n\t out += ' , message: \\'should be ' + ($opStr) + ' \"';\n\t if ($isData) {\n\t out += '\\' + ' + ($schemaValue) + ' + \\'';\n\t } else {\n\t out += '' + (it.util.escapeQuotes($schema));\n\t }\n\t out += '\"\\' ';\n\t }\n\t if (it.opts.verbose) {\n\t out += ' , schema: ';\n\t if ($isData) {\n\t out += 'validate.schema' + ($schemaPath);\n\t } else {\n\t out += '' + (it.util.toQuotedString($schema));\n\t }\n\t out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n\t }\n\t out += ' } ';\n\t } else {\n\t out += ' {} ';\n\t }\n\t var __err = out;\n\t out = $$outStack.pop();\n\t if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */\n\t if (it.async) {\n\t out += ' throw new ValidationError([' + (__err) + ']); ';\n\t } else {\n\t out += ' validate.errors = [' + (__err) + ']; return false; ';\n\t }\n\t } else {\n\t out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n\t }\n\t out += '}';\n\t return out;\n\t}\n\t\n\t},{}],13:[function(require,module,exports){\n\t'use strict';\n\tmodule.exports = function generate__limit(it, $keyword) {\n\t var out = ' ';\n\t var $lvl = it.level;\n\t var $dataLvl = it.dataLevel;\n\t var $schema = it.schema[$keyword];\n\t var $schemaPath = it.schemaPath + '.' + $keyword;\n\t var $errSchemaPath = it.errSchemaPath + '/' + $keyword;\n\t var $breakOnError = !it.opts.allErrors;\n\t var $errorKeyword;\n\t var $data = 'data' + ($dataLvl || '');\n\t var $isData = it.opts.v5 && $schema.$data;\n\t var $schemaValue = $isData ? it.util.getData($schema.$data, $dataLvl, it.dataPathArr) : $schema;\n\t if ($isData) {\n\t out += ' var schema' + ($lvl) + ' = ' + ($schemaValue) + '; ';\n\t $schemaValue = 'schema' + $lvl;\n\t }\n\t var $isMax = $keyword == 'maximum',\n\t $exclusiveKeyword = $isMax ? 'exclusiveMaximum' : 'exclusiveMinimum',\n\t $schemaExcl = it.schema[$exclusiveKeyword],\n\t $isDataExcl = it.opts.v5 && $schemaExcl && $schemaExcl.$data,\n\t $op = $isMax ? '<' : '>',\n\t $notOp = $isMax ? '>' : '<';\n\t if ($isDataExcl) {\n\t var $schemaValueExcl = it.util.getData($schemaExcl.$data, $dataLvl, it.dataPathArr),\n\t $exclusive = 'exclusive' + $lvl,\n\t $opExpr = 'op' + $lvl,\n\t $opStr = '\\' + ' + $opExpr + ' + \\'';\n\t out += ' var schemaExcl' + ($lvl) + ' = ' + ($schemaValueExcl) + '; ';\n\t $schemaValueExcl = 'schemaExcl' + $lvl;\n\t out += ' var exclusive' + ($lvl) + '; if (typeof ' + ($schemaValueExcl) + ' != \\'boolean\\' && typeof ' + ($schemaValueExcl) + ' != \\'undefined\\') { ';\n\t var $errorKeyword = $exclusiveKeyword;\n\t var $$outStack = $$outStack || [];\n\t $$outStack.push(out);\n\t out = ''; /* istanbul ignore else */\n\t if (it.createErrors !== false) {\n\t out += ' { keyword: \\'' + ($errorKeyword || '_exclusiveLimit') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: \"' + ($errSchemaPath) + '\" , params: {} ';\n\t if (it.opts.messages !== false) {\n\t out += ' , message: \\'' + ($exclusiveKeyword) + ' should be boolean\\' ';\n\t }\n\t if (it.opts.verbose) {\n\t out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n\t }\n\t out += ' } ';\n\t } else {\n\t out += ' {} ';\n\t }\n\t var __err = out;\n\t out = $$outStack.pop();\n\t if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */\n\t if (it.async) {\n\t out += ' throw new ValidationError([' + (__err) + ']); ';\n\t } else {\n\t out += ' validate.errors = [' + (__err) + ']; return false; ';\n\t }\n\t } else {\n\t out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n\t }\n\t out += ' } else if( ';\n\t if ($isData) {\n\t out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \\'number\\') || ';\n\t }\n\t out += ' ((exclusive' + ($lvl) + ' = ' + ($schemaValueExcl) + ' === true) ? ' + ($data) + ' ' + ($notOp) + '= ' + ($schemaValue) + ' : ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ')) { var op' + ($lvl) + ' = exclusive' + ($lvl) + ' ? \\'' + ($op) + '\\' : \\'' + ($op) + '=\\';';\n\t } else {\n\t var $exclusive = $schemaExcl === true,\n\t $opStr = $op;\n\t if (!$exclusive) $opStr += '=';\n\t var $opExpr = '\\'' + $opStr + '\\'';\n\t out += ' if ( ';\n\t if ($isData) {\n\t out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \\'number\\') || ';\n\t }\n\t out += ' ' + ($data) + ' ' + ($notOp);\n\t if ($exclusive) {\n\t out += '=';\n\t }\n\t out += ' ' + ($schemaValue) + ') {';\n\t }\n\t var $errorKeyword = $keyword;\n\t var $$outStack = $$outStack || [];\n\t $$outStack.push(out);\n\t out = ''; /* istanbul ignore else */\n\t if (it.createErrors !== false) {\n\t out += ' { keyword: \\'' + ($errorKeyword || '_limit') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: \"' + ($errSchemaPath) + '\" , params: { comparison: ' + ($opExpr) + ', limit: ' + ($schemaValue) + ', exclusive: ' + ($exclusive) + ' } ';\n\t if (it.opts.messages !== false) {\n\t out += ' , message: \\'should be ' + ($opStr) + ' ';\n\t if ($isData) {\n\t out += '\\' + ' + ($schemaValue);\n\t } else {\n\t out += '' + ($schema) + '\\'';\n\t }\n\t }\n\t if (it.opts.verbose) {\n\t out += ' , schema: ';\n\t if ($isData) {\n\t out += 'validate.schema' + ($schemaPath);\n\t } else {\n\t out += '' + ($schema);\n\t }\n\t out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n\t }\n\t out += ' } ';\n\t } else {\n\t out += ' {} ';\n\t }\n\t var __err = out;\n\t out = $$outStack.pop();\n\t if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */\n\t if (it.async) {\n\t out += ' throw new ValidationError([' + (__err) + ']); ';\n\t } else {\n\t out += ' validate.errors = [' + (__err) + ']; return false; ';\n\t }\n\t } else {\n\t out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n\t }\n\t out += ' } ';\n\t if ($breakOnError) {\n\t out += ' else { ';\n\t }\n\t return out;\n\t}\n\t\n\t},{}],14:[function(require,module,exports){\n\t'use strict';\n\tmodule.exports = function generate__limitItems(it, $keyword) {\n\t var out = ' ';\n\t var $lvl = it.level;\n\t var $dataLvl = it.dataLevel;\n\t var $schema = it.schema[$keyword];\n\t var $schemaPath = it.schemaPath + '.' + $keyword;\n\t var $errSchemaPath = it.errSchemaPath + '/' + $keyword;\n\t var $breakOnError = !it.opts.allErrors;\n\t var $errorKeyword;\n\t var $data = 'data' + ($dataLvl || '');\n\t var $isData = it.opts.v5 && $schema.$data;\n\t var $schemaValue = $isData ? it.util.getData($schema.$data, $dataLvl, it.dataPathArr) : $schema;\n\t if ($isData) {\n\t out += ' var schema' + ($lvl) + ' = ' + ($schemaValue) + '; ';\n\t $schemaValue = 'schema' + $lvl;\n\t }\n\t var $op = $keyword == 'maxItems' ? '>' : '<';\n\t out += 'if ( ';\n\t if ($isData) {\n\t out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \\'number\\') || ';\n\t }\n\t out += ' ' + ($data) + '.length ' + ($op) + ' ' + ($schemaValue) + ') { ';\n\t var $errorKeyword = $keyword;\n\t var $$outStack = $$outStack || [];\n\t $$outStack.push(out);\n\t out = ''; /* istanbul ignore else */\n\t if (it.createErrors !== false) {\n\t out += ' { keyword: \\'' + ($errorKeyword || '_limitItems') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: \"' + ($errSchemaPath) + '\" , params: { limit: ' + ($schemaValue) + ' } ';\n\t if (it.opts.messages !== false) {\n\t out += ' , message: \\'should NOT have ';\n\t if ($keyword == 'maxItems') {\n\t out += 'more';\n\t } else {\n\t out += 'less';\n\t }\n\t out += ' than ';\n\t if ($isData) {\n\t out += '\\' + ' + ($schemaValue) + ' + \\'';\n\t } else {\n\t out += '' + ($schema);\n\t }\n\t out += ' items\\' ';\n\t }\n\t if (it.opts.verbose) {\n\t out += ' , schema: ';\n\t if ($isData) {\n\t out += 'validate.schema' + ($schemaPath);\n\t } else {\n\t out += '' + ($schema);\n\t }\n\t out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n\t }\n\t out += ' } ';\n\t } else {\n\t out += ' {} ';\n\t }\n\t var __err = out;\n\t out = $$outStack.pop();\n\t if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */\n\t if (it.async) {\n\t out += ' throw new ValidationError([' + (__err) + ']); ';\n\t } else {\n\t out += ' validate.errors = [' + (__err) + ']; return false; ';\n\t }\n\t } else {\n\t out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n\t }\n\t out += '} ';\n\t if ($breakOnError) {\n\t out += ' else { ';\n\t }\n\t return out;\n\t}\n\t\n\t},{}],15:[function(require,module,exports){\n\t'use strict';\n\tmodule.exports = function generate__limitLength(it, $keyword) {\n\t var out = ' ';\n\t var $lvl = it.level;\n\t var $dataLvl = it.dataLevel;\n\t var $schema = it.schema[$keyword];\n\t var $schemaPath = it.schemaPath + '.' + $keyword;\n\t var $errSchemaPath = it.errSchemaPath + '/' + $keyword;\n\t var $breakOnError = !it.opts.allErrors;\n\t var $errorKeyword;\n\t var $data = 'data' + ($dataLvl || '');\n\t var $isData = it.opts.v5 && $schema.$data;\n\t var $schemaValue = $isData ? it.util.getData($schema.$data, $dataLvl, it.dataPathArr) : $schema;\n\t if ($isData) {\n\t out += ' var schema' + ($lvl) + ' = ' + ($schemaValue) + '; ';\n\t $schemaValue = 'schema' + $lvl;\n\t }\n\t var $op = $keyword == 'maxLength' ? '>' : '<';\n\t out += 'if ( ';\n\t if ($isData) {\n\t out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \\'number\\') || ';\n\t }\n\t if (it.opts.unicode === false) {\n\t out += ' ' + ($data) + '.length ';\n\t } else {\n\t out += ' ucs2length(' + ($data) + ') ';\n\t }\n\t out += ' ' + ($op) + ' ' + ($schemaValue) + ') { ';\n\t var $errorKeyword = $keyword;\n\t var $$outStack = $$outStack || [];\n\t $$outStack.push(out);\n\t out = ''; /* istanbul ignore else */\n\t if (it.createErrors !== false) {\n\t out += ' { keyword: \\'' + ($errorKeyword || '_limitLength') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: \"' + ($errSchemaPath) + '\" , params: { limit: ' + ($schemaValue) + ' } ';\n\t if (it.opts.messages !== false) {\n\t out += ' , message: \\'should NOT be ';\n\t if ($keyword == 'maxLength') {\n\t out += 'longer';\n\t } else {\n\t out += 'shorter';\n\t }\n\t out += ' than ';\n\t if ($isData) {\n\t out += '\\' + ' + ($schemaValue) + ' + \\'';\n\t } else {\n\t out += '' + ($schema);\n\t }\n\t out += ' characters\\' ';\n\t }\n\t if (it.opts.verbose) {\n\t out += ' , schema: ';\n\t if ($isData) {\n\t out += 'validate.schema' + ($schemaPath);\n\t } else {\n\t out += '' + ($schema);\n\t }\n\t out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n\t }\n\t out += ' } ';\n\t } else {\n\t out += ' {} ';\n\t }\n\t var __err = out;\n\t out = $$outStack.pop();\n\t if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */\n\t if (it.async) {\n\t out += ' throw new ValidationError([' + (__err) + ']); ';\n\t } else {\n\t out += ' validate.errors = [' + (__err) + ']; return false; ';\n\t }\n\t } else {\n\t out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n\t }\n\t out += '} ';\n\t if ($breakOnError) {\n\t out += ' else { ';\n\t }\n\t return out;\n\t}\n\t\n\t},{}],16:[function(require,module,exports){\n\t'use strict';\n\tmodule.exports = function generate__limitProperties(it, $keyword) {\n\t var out = ' ';\n\t var $lvl = it.level;\n\t var $dataLvl = it.dataLevel;\n\t var $schema = it.schema[$keyword];\n\t var $schemaPath = it.schemaPath + '.' + $keyword;\n\t var $errSchemaPath = it.errSchemaPath + '/' + $keyword;\n\t var $breakOnError = !it.opts.allErrors;\n\t var $errorKeyword;\n\t var $data = 'data' + ($dataLvl || '');\n\t var $isData = it.opts.v5 && $schema.$data;\n\t var $schemaValue = $isData ? it.util.getData($schema.$data, $dataLvl, it.dataPathArr) : $schema;\n\t if ($isData) {\n\t out += ' var schema' + ($lvl) + ' = ' + ($schemaValue) + '; ';\n\t $schemaValue = 'schema' + $lvl;\n\t }\n\t var $op = $keyword == 'maxProperties' ? '>' : '<';\n\t out += 'if ( ';\n\t if ($isData) {\n\t out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \\'number\\') || ';\n\t }\n\t out += ' Object.keys(' + ($data) + ').length ' + ($op) + ' ' + ($schemaValue) + ') { ';\n\t var $errorKeyword = $keyword;\n\t var $$outStack = $$outStack || [];\n\t $$outStack.push(out);\n\t out = ''; /* istanbul ignore else */\n\t if (it.createErrors !== false) {\n\t out += ' { keyword: \\'' + ($errorKeyword || '_limitProperties') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: \"' + ($errSchemaPath) + '\" , params: { limit: ' + ($schemaValue) + ' } ';\n\t if (it.opts.messages !== false) {\n\t out += ' , message: \\'should NOT have ';\n\t if ($keyword == 'maxProperties') {\n\t out += 'more';\n\t } else {\n\t out += 'less';\n\t }\n\t out += ' than ';\n\t if ($isData) {\n\t out += '\\' + ' + ($schemaValue) + ' + \\'';\n\t } else {\n\t out += '' + ($schema);\n\t }\n\t out += ' properties\\' ';\n\t }\n\t if (it.opts.verbose) {\n\t out += ' , schema: ';\n\t if ($isData) {\n\t out += 'validate.schema' + ($schemaPath);\n\t } else {\n\t out += '' + ($schema);\n\t }\n\t out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n\t }\n\t out += ' } ';\n\t } else {\n\t out += ' {} ';\n\t }\n\t var __err = out;\n\t out = $$outStack.pop();\n\t if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */\n\t if (it.async) {\n\t out += ' throw new ValidationError([' + (__err) + ']); ';\n\t } else {\n\t out += ' validate.errors = [' + (__err) + ']; return false; ';\n\t }\n\t } else {\n\t out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n\t }\n\t out += '} ';\n\t if ($breakOnError) {\n\t out += ' else { ';\n\t }\n\t return out;\n\t}\n\t\n\t},{}],17:[function(require,module,exports){\n\t'use strict';\n\tmodule.exports = function generate_allOf(it, $keyword) {\n\t var out = ' ';\n\t var $schema = it.schema[$keyword];\n\t var $schemaPath = it.schemaPath + '.' + $keyword;\n\t var $errSchemaPath = it.errSchemaPath + '/' + $keyword;\n\t var $breakOnError = !it.opts.allErrors;\n\t var $it = it.util.copy(it);\n\t var $closingBraces = '';\n\t $it.level++;\n\t var arr1 = $schema;\n\t if (arr1) {\n\t var $sch, $i = -1,\n\t l1 = arr1.length - 1;\n\t while ($i < l1) {\n\t $sch = arr1[$i += 1];\n\t if (it.util.schemaHasRules($sch, it.RULES.all)) {\n\t $it.schema = $sch;\n\t $it.schemaPath = $schemaPath + '[' + $i + ']';\n\t $it.errSchemaPath = $errSchemaPath + '/' + $i;\n\t out += ' ' + (it.validate($it)) + ' ';\n\t if ($breakOnError) {\n\t out += ' if (valid' + ($it.level) + ') { ';\n\t $closingBraces += '}';\n\t }\n\t }\n\t }\n\t }\n\t if ($breakOnError) {\n\t out += ' ' + ($closingBraces.slice(0, -1));\n\t }\n\t out = it.util.cleanUpCode(out);\n\t return out;\n\t}\n\t\n\t},{}],18:[function(require,module,exports){\n\t'use strict';\n\tmodule.exports = function generate_anyOf(it, $keyword) {\n\t var out = ' ';\n\t var $lvl = it.level;\n\t var $dataLvl = it.dataLevel;\n\t var $schema = it.schema[$keyword];\n\t var $schemaPath = it.schemaPath + '.' + $keyword;\n\t var $errSchemaPath = it.errSchemaPath + '/' + $keyword;\n\t var $breakOnError = !it.opts.allErrors;\n\t var $errorKeyword;\n\t var $data = 'data' + ($dataLvl || '');\n\t var $valid = 'valid' + $lvl;\n\t var $errs = 'errs__' + $lvl;\n\t var $it = it.util.copy(it);\n\t var $closingBraces = '';\n\t $it.level++;\n\t var $noEmptySchema = $schema.every(function($sch) {\n\t return it.util.schemaHasRules($sch, it.RULES.all);\n\t });\n\t if ($noEmptySchema) {\n\t out += ' var ' + ($errs) + ' = errors; var ' + ($valid) + ' = false; ';\n\t var $wasComposite = it.compositeRule;\n\t it.compositeRule = $it.compositeRule = true;\n\t var arr1 = $schema;\n\t if (arr1) {\n\t var $sch, $i = -1,\n\t l1 = arr1.length - 1;\n\t while ($i < l1) {\n\t $sch = arr1[$i += 1];\n\t $it.schema = $sch;\n\t $it.schemaPath = $schemaPath + '[' + $i + ']';\n\t $it.errSchemaPath = $errSchemaPath + '/' + $i;\n\t out += ' ' + (it.validate($it)) + ' ' + ($valid) + ' = ' + ($valid) + ' || valid' + ($it.level) + '; if (!' + ($valid) + ') { ';\n\t $closingBraces += '}';\n\t }\n\t }\n\t it.compositeRule = $it.compositeRule = $wasComposite;\n\t out += ' ' + ($closingBraces) + ' if (!' + ($valid) + ') { var err = '; /* istanbul ignore else */\n\t if (it.createErrors !== false) {\n\t out += ' { keyword: \\'' + ($errorKeyword || 'anyOf') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: \"' + ($errSchemaPath) + '\" , params: {} ';\n\t if (it.opts.messages !== false) {\n\t out += ' , message: \\'should match some schema in anyOf\\' ';\n\t }\n\t if (it.opts.verbose) {\n\t out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n\t }\n\t out += ' } ';\n\t } else {\n\t out += ' {} ';\n\t }\n\t out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } else { errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } ';\n\t if (it.opts.allErrors) {\n\t out += ' } ';\n\t }\n\t out = it.util.cleanUpCode(out);\n\t } else {\n\t if ($breakOnError) {\n\t out += ' if (true) { ';\n\t }\n\t }\n\t return out;\n\t}\n\t\n\t},{}],19:[function(require,module,exports){\n\t'use strict';\n\tmodule.exports = function generate_constant(it, $keyword) {\n\t var out = ' ';\n\t var $lvl = it.level;\n\t var $dataLvl = it.dataLevel;\n\t var $schema = it.schema[$keyword];\n\t var $schemaPath = it.schemaPath + '.' + $keyword;\n\t var $errSchemaPath = it.errSchemaPath + '/' + $keyword;\n\t var $breakOnError = !it.opts.allErrors;\n\t var $errorKeyword;\n\t var $data = 'data' + ($dataLvl || '');\n\t var $valid = 'valid' + $lvl;\n\t var $isData = it.opts.v5 && $schema.$data;\n\t var $schemaValue = $isData ? it.util.getData($schema.$data, $dataLvl, it.dataPathArr) : $schema;\n\t if ($isData) {\n\t out += ' var schema' + ($lvl) + ' = ' + ($schemaValue) + '; ';\n\t $schemaValue = 'schema' + $lvl;\n\t }\n\t if (!$isData) {\n\t out += ' var schema' + ($lvl) + ' = validate.schema' + ($schemaPath) + ';';\n\t }\n\t out += 'var ' + ($valid) + ' = equal(' + ($data) + ', schema' + ($lvl) + '); if (!' + ($valid) + ') { ';\n\t var $$outStack = $$outStack || [];\n\t $$outStack.push(out);\n\t out = ''; /* istanbul ignore else */\n\t if (it.createErrors !== false) {\n\t out += ' { keyword: \\'' + ($errorKeyword || 'constant') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: \"' + ($errSchemaPath) + '\" , params: {} ';\n\t if (it.opts.messages !== false) {\n\t out += ' , message: \\'should be equal to constant\\' ';\n\t }\n\t if (it.opts.verbose) {\n\t out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n\t }\n\t out += ' } ';\n\t } else {\n\t out += ' {} ';\n\t }\n\t var __err = out;\n\t out = $$outStack.pop();\n\t if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */\n\t if (it.async) {\n\t out += ' throw new ValidationError([' + (__err) + ']); ';\n\t } else {\n\t out += ' validate.errors = [' + (__err) + ']; return false; ';\n\t }\n\t } else {\n\t out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n\t }\n\t out += ' }';\n\t return out;\n\t}\n\t\n\t},{}],20:[function(require,module,exports){\n\t'use strict';\n\tmodule.exports = function generate_dependencies(it, $keyword) {\n\t var out = ' ';\n\t var $lvl = it.level;\n\t var $dataLvl = it.dataLevel;\n\t var $schema = it.schema[$keyword];\n\t var $schemaPath = it.schemaPath + '.' + $keyword;\n\t var $errSchemaPath = it.errSchemaPath + '/' + $keyword;\n\t var $breakOnError = !it.opts.allErrors;\n\t var $errorKeyword;\n\t var $data = 'data' + ($dataLvl || '');\n\t var $errs = 'errs__' + $lvl;\n\t var $it = it.util.copy(it);\n\t var $closingBraces = '';\n\t $it.level++;\n\t var $schemaDeps = {},\n\t $propertyDeps = {};\n\t for ($property in $schema) {\n\t var $sch = $schema[$property];\n\t var $deps = Array.isArray($sch) ? $propertyDeps : $schemaDeps;\n\t $deps[$property] = $sch;\n\t }\n\t out += 'var ' + ($errs) + ' = errors;';\n\t var $currentErrorPath = it.errorPath;\n\t out += 'var missing' + ($lvl) + ';';\n\t for (var $property in $propertyDeps) {\n\t $deps = $propertyDeps[$property];\n\t out += ' if (' + ($data) + (it.util.getProperty($property)) + ' !== undefined && ( ';\n\t var arr1 = $deps;\n\t if (arr1) {\n\t var _$property, $i = -1,\n\t l1 = arr1.length - 1;\n\t while ($i < l1) {\n\t _$property = arr1[$i += 1];\n\t if ($i) {\n\t out += ' || ';\n\t }\n\t var $prop = it.util.getProperty(_$property);\n\t out += ' ( ' + ($data) + ($prop) + ' === undefined && (missing' + ($lvl) + ' = ' + (it.util.toQuotedString(it.opts.jsonPointers ? _$property : $prop)) + ') ) ';\n\t }\n\t }\n\t out += ')) { ';\n\t var $propertyPath = 'missing' + $lvl,\n\t $missingProperty = '\\' + ' + $propertyPath + ' + \\'';\n\t if (it.opts._errorDataPathProperty) {\n\t it.errorPath = it.opts.jsonPointers ? it.util.getPathExpr($currentErrorPath, $propertyPath, true) : $currentErrorPath + ' + ' + $propertyPath;\n\t }\n\t var $$outStack = $$outStack || [];\n\t $$outStack.push(out);\n\t out = ''; /* istanbul ignore else */\n\t if (it.createErrors !== false) {\n\t out += ' { keyword: \\'' + ($errorKeyword || 'dependencies') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: \"' + ($errSchemaPath) + '\" , params: { property: \\'' + (it.util.escapeQuotes($property)) + '\\', missingProperty: \\'' + ($missingProperty) + '\\', depsCount: ' + ($deps.length) + ', deps: \\'' + (it.util.escapeQuotes($deps.length == 1 ? $deps[0] : $deps.join(\", \"))) + '\\' } ';\n\t if (it.opts.messages !== false) {\n\t out += ' , message: \\'should have ';\n\t if ($deps.length == 1) {\n\t out += 'property ' + (it.util.escapeQuotes($deps[0]));\n\t } else {\n\t out += 'properties ' + (it.util.escapeQuotes($deps.join(\", \")));\n\t }\n\t out += ' when property ' + (it.util.escapeQuotes($property)) + ' is present\\' ';\n\t }\n\t if (it.opts.verbose) {\n\t out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n\t }\n\t out += ' } ';\n\t } else {\n\t out += ' {} ';\n\t }\n\t var __err = out;\n\t out = $$outStack.pop();\n\t if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */\n\t if (it.async) {\n\t out += ' throw new ValidationError([' + (__err) + ']); ';\n\t } else {\n\t out += ' validate.errors = [' + (__err) + ']; return false; ';\n\t }\n\t } else {\n\t out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n\t }\n\t out += ' } ';\n\t if ($breakOnError) {\n\t $closingBraces += '}';\n\t out += ' else { ';\n\t }\n\t }\n\t it.errorPath = $currentErrorPath;\n\t for (var $property in $schemaDeps) {\n\t var $sch = $schemaDeps[$property];\n\t if (it.util.schemaHasRules($sch, it.RULES.all)) {\n\t out += ' valid' + ($it.level) + ' = true; if (' + ($data) + '[\\'' + ($property) + '\\'] !== undefined) { ';\n\t $it.schema = $sch;\n\t $it.schemaPath = $schemaPath + it.util.getProperty($property);\n\t $it.errSchemaPath = $errSchemaPath + '/' + it.util.escapeFragment($property);\n\t out += ' ' + (it.validate($it)) + ' } ';\n\t if ($breakOnError) {\n\t out += ' if (valid' + ($it.level) + ') { ';\n\t $closingBraces += '}';\n\t }\n\t }\n\t }\n\t if ($breakOnError) {\n\t out += ' ' + ($closingBraces) + ' if (' + ($errs) + ' == errors) {';\n\t }\n\t out = it.util.cleanUpCode(out);\n\t return out;\n\t}\n\t\n\t},{}],21:[function(require,module,exports){\n\t'use strict';\n\tmodule.exports = function generate_enum(it, $keyword) {\n\t var out = ' ';\n\t var $lvl = it.level;\n\t var $dataLvl = it.dataLevel;\n\t var $schema = it.schema[$keyword];\n\t var $schemaPath = it.schemaPath + '.' + $keyword;\n\t var $errSchemaPath = it.errSchemaPath + '/' + $keyword;\n\t var $breakOnError = !it.opts.allErrors;\n\t var $errorKeyword;\n\t var $data = 'data' + ($dataLvl || '');\n\t var $valid = 'valid' + $lvl;\n\t var $isData = it.opts.v5 && $schema.$data;\n\t var $schemaValue = $isData ? it.util.getData($schema.$data, $dataLvl, it.dataPathArr) : $schema;\n\t if ($isData) {\n\t out += ' var schema' + ($lvl) + ' = ' + ($schemaValue) + '; ';\n\t $schemaValue = 'schema' + $lvl;\n\t }\n\t var $i = 'i' + $lvl;\n\t if (!$isData) {\n\t out += ' var schema' + ($lvl) + ' = validate.schema' + ($schemaPath) + ';';\n\t }\n\t out += 'var ' + ($valid) + ';';\n\t if ($isData) {\n\t out += ' if (schema' + ($lvl) + ' === undefined) ' + ($valid) + ' = true; else if (!Array.isArray(schema' + ($lvl) + ')) ' + ($valid) + ' = false; else {';\n\t }\n\t out += '' + ($valid) + ' = false;for (var ' + ($i) + '=0; ' + ($i) + ' ' + ($i) + ') { ';\n\t var $passData = $data + '[' + $i + ']';\n\t $it.schema = $sch;\n\t $it.schemaPath = $schemaPath + '[' + $i + ']';\n\t $it.errSchemaPath = $errSchemaPath + '/' + $i;\n\t $it.errorPath = it.util.getPathExpr(it.errorPath, $i, it.opts.jsonPointers, true);\n\t $it.dataPathArr[$dataNxt] = $i;\n\t var $code = it.validate($it);\n\t if (it.util.varOccurences($code, $nextData) < 2) {\n\t out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' ';\n\t } else {\n\t out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' ';\n\t }\n\t out += ' } ';\n\t if ($breakOnError) {\n\t out += ' if (valid' + ($it.level) + ') { ';\n\t $closingBraces += '}';\n\t }\n\t }\n\t }\n\t }\n\t if (typeof $additionalItems == 'object' && it.util.schemaHasRules($additionalItems, it.RULES.all)) {\n\t $it.schema = $additionalItems;\n\t $it.schemaPath = it.schemaPath + '.additionalItems';\n\t $it.errSchemaPath = it.errSchemaPath + '/additionalItems';\n\t out += ' valid' + ($it.level) + ' = true; if (' + ($data) + '.length > ' + ($schema.length) + ') { for (var i' + ($lvl) + ' = ' + ($schema.length) + '; i' + ($lvl) + ' < ' + ($data) + '.length; i' + ($lvl) + '++) { ';\n\t $it.errorPath = it.util.getPathExpr(it.errorPath, 'i' + $lvl, it.opts.jsonPointers, true);\n\t var $passData = $data + '[i' + $lvl + ']';\n\t $it.dataPathArr[$dataNxt] = 'i' + $lvl;\n\t var $code = it.validate($it);\n\t if (it.util.varOccurences($code, $nextData) < 2) {\n\t out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' ';\n\t } else {\n\t out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' ';\n\t }\n\t if ($breakOnError) {\n\t out += ' if (!valid' + ($it.level) + ') break; ';\n\t }\n\t out += ' } } ';\n\t if ($breakOnError) {\n\t out += ' if (valid' + ($it.level) + ') { ';\n\t $closingBraces += '}';\n\t }\n\t }\n\t } else if (it.util.schemaHasRules($schema, it.RULES.all)) {\n\t $it.schema = $schema;\n\t $it.schemaPath = $schemaPath;\n\t $it.errSchemaPath = $errSchemaPath;\n\t out += ' for (var i' + ($lvl) + ' = ' + (0) + '; i' + ($lvl) + ' < ' + ($data) + '.length; i' + ($lvl) + '++) { ';\n\t $it.errorPath = it.util.getPathExpr(it.errorPath, 'i' + $lvl, it.opts.jsonPointers, true);\n\t var $passData = $data + '[i' + $lvl + ']';\n\t $it.dataPathArr[$dataNxt] = 'i' + $lvl;\n\t var $code = it.validate($it);\n\t if (it.util.varOccurences($code, $nextData) < 2) {\n\t out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' ';\n\t } else {\n\t out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' ';\n\t }\n\t if ($breakOnError) {\n\t out += ' if (!valid' + ($it.level) + ') break; ';\n\t }\n\t out += ' } ';\n\t if ($breakOnError) {\n\t out += ' if (valid' + ($it.level) + ') { ';\n\t $closingBraces += '}';\n\t }\n\t }\n\t if ($breakOnError) {\n\t out += ' ' + ($closingBraces) + ' if (' + ($errs) + ' == errors) {';\n\t }\n\t out = it.util.cleanUpCode(out);\n\t return out;\n\t}\n\t\n\t},{}],24:[function(require,module,exports){\n\t'use strict';\n\tmodule.exports = function generate_multipleOf(it, $keyword) {\n\t var out = ' ';\n\t var $lvl = it.level;\n\t var $dataLvl = it.dataLevel;\n\t var $schema = it.schema[$keyword];\n\t var $schemaPath = it.schemaPath + '.' + $keyword;\n\t var $errSchemaPath = it.errSchemaPath + '/' + $keyword;\n\t var $breakOnError = !it.opts.allErrors;\n\t var $errorKeyword;\n\t var $data = 'data' + ($dataLvl || '');\n\t var $isData = it.opts.v5 && $schema.$data;\n\t var $schemaValue = $isData ? it.util.getData($schema.$data, $dataLvl, it.dataPathArr) : $schema;\n\t if ($isData) {\n\t out += ' var schema' + ($lvl) + ' = ' + ($schemaValue) + '; ';\n\t $schemaValue = 'schema' + $lvl;\n\t }\n\t out += 'var division' + ($lvl) + ';if (';\n\t if ($isData) {\n\t out += ' ' + ($schemaValue) + ' !== undefined && ( typeof ' + ($schemaValue) + ' != \\'number\\' || ';\n\t }\n\t out += ' (division' + ($lvl) + ' = ' + ($data) + ' / ' + ($schemaValue) + ', ';\n\t if (it.opts.multipleOfPrecision) {\n\t out += ' Math.abs(Math.round(division' + ($lvl) + ') - division' + ($lvl) + ') > 1e-' + (it.opts.multipleOfPrecision) + ' ';\n\t } else {\n\t out += ' division' + ($lvl) + ' !== parseInt(division' + ($lvl) + ') ';\n\t }\n\t out += ' ) ';\n\t if ($isData) {\n\t out += ' ) ';\n\t }\n\t out += ' ) { ';\n\t var $$outStack = $$outStack || [];\n\t $$outStack.push(out);\n\t out = ''; /* istanbul ignore else */\n\t if (it.createErrors !== false) {\n\t out += ' { keyword: \\'' + ($errorKeyword || 'multipleOf') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: \"' + ($errSchemaPath) + '\" , params: { multipleOf: ' + ($schemaValue) + ' } ';\n\t if (it.opts.messages !== false) {\n\t out += ' , message: \\'should be multiple of ';\n\t if ($isData) {\n\t out += '\\' + ' + ($schemaValue);\n\t } else {\n\t out += '' + ($schema) + '\\'';\n\t }\n\t }\n\t if (it.opts.verbose) {\n\t out += ' , schema: ';\n\t if ($isData) {\n\t out += 'validate.schema' + ($schemaPath);\n\t } else {\n\t out += '' + ($schema);\n\t }\n\t out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n\t }\n\t out += ' } ';\n\t } else {\n\t out += ' {} ';\n\t }\n\t var __err = out;\n\t out = $$outStack.pop();\n\t if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */\n\t if (it.async) {\n\t out += ' throw new ValidationError([' + (__err) + ']); ';\n\t } else {\n\t out += ' validate.errors = [' + (__err) + ']; return false; ';\n\t }\n\t } else {\n\t out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n\t }\n\t out += '} ';\n\t if ($breakOnError) {\n\t out += ' else { ';\n\t }\n\t return out;\n\t}\n\t\n\t},{}],25:[function(require,module,exports){\n\t'use strict';\n\tmodule.exports = function generate_not(it, $keyword) {\n\t var out = ' ';\n\t var $lvl = it.level;\n\t var $dataLvl = it.dataLevel;\n\t var $schema = it.schema[$keyword];\n\t var $schemaPath = it.schemaPath + '.' + $keyword;\n\t var $errSchemaPath = it.errSchemaPath + '/' + $keyword;\n\t var $breakOnError = !it.opts.allErrors;\n\t var $errorKeyword;\n\t var $data = 'data' + ($dataLvl || '');\n\t var $errs = 'errs__' + $lvl;\n\t var $it = it.util.copy(it);\n\t $it.level++;\n\t if (it.util.schemaHasRules($schema, it.RULES.all)) {\n\t $it.schema = $schema;\n\t $it.schemaPath = $schemaPath;\n\t $it.errSchemaPath = $errSchemaPath;\n\t out += ' var ' + ($errs) + ' = errors; ';\n\t var $wasComposite = it.compositeRule;\n\t it.compositeRule = $it.compositeRule = true;\n\t $it.createErrors = false;\n\t var $allErrorsOption;\n\t if ($it.opts.allErrors) {\n\t $allErrorsOption = $it.opts.allErrors;\n\t $it.opts.allErrors = false;\n\t }\n\t out += ' ' + (it.validate($it)) + ' ';\n\t $it.createErrors = true;\n\t if ($allErrorsOption) $it.opts.allErrors = $allErrorsOption;\n\t it.compositeRule = $it.compositeRule = $wasComposite;\n\t out += ' if (valid' + ($it.level) + ') { ';\n\t var $$outStack = $$outStack || [];\n\t $$outStack.push(out);\n\t out = ''; /* istanbul ignore else */\n\t if (it.createErrors !== false) {\n\t out += ' { keyword: \\'' + ($errorKeyword || 'not') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: \"' + ($errSchemaPath) + '\" , params: {} ';\n\t if (it.opts.messages !== false) {\n\t out += ' , message: \\'should NOT be valid\\' ';\n\t }\n\t if (it.opts.verbose) {\n\t out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n\t }\n\t out += ' } ';\n\t } else {\n\t out += ' {} ';\n\t }\n\t var __err = out;\n\t out = $$outStack.pop();\n\t if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */\n\t if (it.async) {\n\t out += ' throw new ValidationError([' + (__err) + ']); ';\n\t } else {\n\t out += ' validate.errors = [' + (__err) + ']; return false; ';\n\t }\n\t } else {\n\t out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n\t }\n\t out += ' } else { errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } ';\n\t if (it.opts.allErrors) {\n\t out += ' } ';\n\t }\n\t } else {\n\t out += ' var err = '; /* istanbul ignore else */\n\t if (it.createErrors !== false) {\n\t out += ' { keyword: \\'' + ($errorKeyword || 'not') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: \"' + ($errSchemaPath) + '\" , params: {} ';\n\t if (it.opts.messages !== false) {\n\t out += ' , message: \\'should NOT be valid\\' ';\n\t }\n\t if (it.opts.verbose) {\n\t out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n\t }\n\t out += ' } ';\n\t } else {\n\t out += ' {} ';\n\t }\n\t out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n\t if ($breakOnError) {\n\t out += ' if (false) { ';\n\t }\n\t }\n\t return out;\n\t}\n\t\n\t},{}],26:[function(require,module,exports){\n\t'use strict';\n\tmodule.exports = function generate_oneOf(it, $keyword) {\n\t var out = ' ';\n\t var $lvl = it.level;\n\t var $dataLvl = it.dataLevel;\n\t var $schema = it.schema[$keyword];\n\t var $schemaPath = it.schemaPath + '.' + $keyword;\n\t var $errSchemaPath = it.errSchemaPath + '/' + $keyword;\n\t var $breakOnError = !it.opts.allErrors;\n\t var $errorKeyword;\n\t var $data = 'data' + ($dataLvl || '');\n\t var $valid = 'valid' + $lvl;\n\t var $errs = 'errs__' + $lvl;\n\t var $it = it.util.copy(it);\n\t var $closingBraces = '';\n\t $it.level++;\n\t out += 'var ' + ($errs) + ' = errors;var prevValid' + ($lvl) + ' = false;var ' + ($valid) + ' = false; ';\n\t var $wasComposite = it.compositeRule;\n\t it.compositeRule = $it.compositeRule = true;\n\t var arr1 = $schema;\n\t if (arr1) {\n\t var $sch, $i = -1,\n\t l1 = arr1.length - 1;\n\t while ($i < l1) {\n\t $sch = arr1[$i += 1];\n\t if (it.util.schemaHasRules($sch, it.RULES.all)) {\n\t $it.schema = $sch;\n\t $it.schemaPath = $schemaPath + '[' + $i + ']';\n\t $it.errSchemaPath = $errSchemaPath + '/' + $i;\n\t out += ' ' + (it.validate($it)) + ' ';\n\t } else {\n\t out += ' var valid' + ($it.level) + ' = true; ';\n\t }\n\t if ($i) {\n\t out += ' if (valid' + ($it.level) + ' && prevValid' + ($lvl) + ') ' + ($valid) + ' = false; else { ';\n\t $closingBraces += '}';\n\t }\n\t out += ' if (valid' + ($it.level) + ') ' + ($valid) + ' = prevValid' + ($lvl) + ' = true;';\n\t }\n\t }\n\t it.compositeRule = $it.compositeRule = $wasComposite;\n\t out += '' + ($closingBraces) + 'if (!' + ($valid) + ') { ';\n\t var $$outStack = $$outStack || [];\n\t $$outStack.push(out);\n\t out = ''; /* istanbul ignore else */\n\t if (it.createErrors !== false) {\n\t out += ' { keyword: \\'' + ($errorKeyword || 'oneOf') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: \"' + ($errSchemaPath) + '\" , params: {} ';\n\t if (it.opts.messages !== false) {\n\t out += ' , message: \\'should match exactly one schema in oneOf\\' ';\n\t }\n\t if (it.opts.verbose) {\n\t out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n\t }\n\t out += ' } ';\n\t } else {\n\t out += ' {} ';\n\t }\n\t var __err = out;\n\t out = $$outStack.pop();\n\t if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */\n\t if (it.async) {\n\t out += ' throw new ValidationError([' + (__err) + ']); ';\n\t } else {\n\t out += ' validate.errors = [' + (__err) + ']; return false; ';\n\t }\n\t } else {\n\t out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n\t }\n\t out += '} else { errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; }';\n\t if (it.opts.allErrors) {\n\t out += ' } ';\n\t }\n\t return out;\n\t}\n\t\n\t},{}],27:[function(require,module,exports){\n\t'use strict';\n\tmodule.exports = function generate_pattern(it, $keyword) {\n\t var out = ' ';\n\t var $lvl = it.level;\n\t var $dataLvl = it.dataLevel;\n\t var $schema = it.schema[$keyword];\n\t var $schemaPath = it.schemaPath + '.' + $keyword;\n\t var $errSchemaPath = it.errSchemaPath + '/' + $keyword;\n\t var $breakOnError = !it.opts.allErrors;\n\t var $errorKeyword;\n\t var $data = 'data' + ($dataLvl || '');\n\t var $isData = it.opts.v5 && $schema.$data;\n\t var $schemaValue = $isData ? it.util.getData($schema.$data, $dataLvl, it.dataPathArr) : $schema;\n\t if ($isData) {\n\t out += ' var schema' + ($lvl) + ' = ' + ($schemaValue) + '; ';\n\t $schemaValue = 'schema' + $lvl;\n\t }\n\t var $regexp = $isData ? '(new RegExp(' + $schemaValue + '))' : it.usePattern($schema);\n\t out += 'if ( ';\n\t if ($isData) {\n\t out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \\'string\\') || ';\n\t }\n\t out += ' !' + ($regexp) + '.test(' + ($data) + ') ) { ';\n\t var $$outStack = $$outStack || [];\n\t $$outStack.push(out);\n\t out = ''; /* istanbul ignore else */\n\t if (it.createErrors !== false) {\n\t out += ' { keyword: \\'' + ($errorKeyword || 'pattern') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: \"' + ($errSchemaPath) + '\" , params: { pattern: ';\n\t if ($isData) {\n\t out += '' + ($schemaValue);\n\t } else {\n\t out += '' + (it.util.toQuotedString($schema));\n\t }\n\t out += ' } ';\n\t if (it.opts.messages !== false) {\n\t out += ' , message: \\'should match pattern \"';\n\t if ($isData) {\n\t out += '\\' + ' + ($schemaValue) + ' + \\'';\n\t } else {\n\t out += '' + (it.util.escapeQuotes($schema));\n\t }\n\t out += '\"\\' ';\n\t }\n\t if (it.opts.verbose) {\n\t out += ' , schema: ';\n\t if ($isData) {\n\t out += 'validate.schema' + ($schemaPath);\n\t } else {\n\t out += '' + (it.util.toQuotedString($schema));\n\t }\n\t out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n\t }\n\t out += ' } ';\n\t } else {\n\t out += ' {} ';\n\t }\n\t var __err = out;\n\t out = $$outStack.pop();\n\t if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */\n\t if (it.async) {\n\t out += ' throw new ValidationError([' + (__err) + ']); ';\n\t } else {\n\t out += ' validate.errors = [' + (__err) + ']; return false; ';\n\t }\n\t } else {\n\t out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n\t }\n\t out += '} ';\n\t if ($breakOnError) {\n\t out += ' else { ';\n\t }\n\t return out;\n\t}\n\t\n\t},{}],28:[function(require,module,exports){\n\t'use strict';\n\tmodule.exports = function generate_patternRequired(it, $keyword) {\n\t var out = ' ';\n\t var $lvl = it.level;\n\t var $dataLvl = it.dataLevel;\n\t var $schema = it.schema[$keyword];\n\t var $schemaPath = it.schemaPath + '.' + $keyword;\n\t var $errSchemaPath = it.errSchemaPath + '/' + $keyword;\n\t var $breakOnError = !it.opts.allErrors;\n\t var $errorKeyword;\n\t var $data = 'data' + ($dataLvl || '');\n\t var $valid = 'valid' + $lvl;\n\t var $key = 'key' + $lvl,\n\t $matched = 'patternMatched' + $lvl,\n\t $closingBraces = '';\n\t out += 'var ' + ($valid) + ' = true;';\n\t var arr1 = $schema;\n\t if (arr1) {\n\t var $pProperty, i1 = -1,\n\t l1 = arr1.length - 1;\n\t while (i1 < l1) {\n\t $pProperty = arr1[i1 += 1];\n\t out += ' var ' + ($matched) + ' = false; for (var ' + ($key) + ' in ' + ($data) + ') { ' + ($matched) + ' = ' + (it.usePattern($pProperty)) + '.test(' + ($key) + '); if (' + ($matched) + ') break; } ';\n\t var $missingPattern = it.util.escapeQuotes($pProperty);\n\t out += ' if (!' + ($matched) + ') { ' + ($valid) + ' = false; var err = '; /* istanbul ignore else */\n\t if (it.createErrors !== false) {\n\t out += ' { keyword: \\'' + ($errorKeyword || 'patternRequired') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: \"' + ($errSchemaPath) + '\" , params: { missingPattern: \\'' + ($missingPattern) + '\\' } ';\n\t if (it.opts.messages !== false) {\n\t out += ' , message: \\'should have property matching pattern \\\\\\'' + ($missingPattern) + '\\\\\\'\\' ';\n\t }\n\t if (it.opts.verbose) {\n\t out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n\t }\n\t out += ' } ';\n\t } else {\n\t out += ' {} ';\n\t }\n\t out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } ';\n\t if ($breakOnError) {\n\t $closingBraces += '}';\n\t out += ' else { ';\n\t }\n\t }\n\t }\n\t out += '' + ($closingBraces);\n\t return out;\n\t}\n\t\n\t},{}],29:[function(require,module,exports){\n\t'use strict';\n\tmodule.exports = function generate_properties(it, $keyword) {\n\t var out = ' ';\n\t var $lvl = it.level;\n\t var $dataLvl = it.dataLevel;\n\t var $schema = it.schema[$keyword];\n\t var $schemaPath = it.schemaPath + '.' + $keyword;\n\t var $errSchemaPath = it.errSchemaPath + '/' + $keyword;\n\t var $breakOnError = !it.opts.allErrors;\n\t var $errorKeyword;\n\t var $data = 'data' + ($dataLvl || '');\n\t var $valid = 'valid' + $lvl;\n\t var $errs = 'errs__' + $lvl;\n\t var $it = it.util.copy(it);\n\t var $closingBraces = '';\n\t $it.level++;\n\t var $dataNxt = $it.dataLevel = it.dataLevel + 1,\n\t $nextData = 'data' + $dataNxt;\n\t var $schemaKeys = Object.keys($schema || {}),\n\t $pProperties = it.schema.patternProperties || {},\n\t $pPropertyKeys = Object.keys($pProperties),\n\t $aProperties = it.schema.additionalProperties,\n\t $someProperties = $schemaKeys.length || $pPropertyKeys.length,\n\t $noAdditional = $aProperties === false,\n\t $additionalIsSchema = typeof $aProperties == 'object' && Object.keys($aProperties).length,\n\t $removeAdditional = it.opts.removeAdditional,\n\t $checkAdditional = $noAdditional || $additionalIsSchema || $removeAdditional;\n\t var $required = it.schema.required;\n\t if ($required && !(it.opts.v5 && $required.$data) && $required.length < it.opts.loopRequired) var $requiredHash = it.util.toHash($required);\n\t if (it.opts.v5) {\n\t var $pgProperties = it.schema.patternGroups || {},\n\t $pgPropertyKeys = Object.keys($pgProperties);\n\t }\n\t out += 'var ' + ($errs) + ' = errors;var valid' + ($it.level) + ' = true;';\n\t if ($checkAdditional) {\n\t out += ' for (var key' + ($lvl) + ' in ' + ($data) + ') { ';\n\t if ($someProperties) {\n\t out += ' var isAdditional' + ($lvl) + ' = !(false ';\n\t if ($schemaKeys.length) {\n\t if ($schemaKeys.length > 5) {\n\t out += ' || validate.schema' + ($schemaPath) + '[key' + ($lvl) + '] ';\n\t } else {\n\t var arr1 = $schemaKeys;\n\t if (arr1) {\n\t var $propertyKey, i1 = -1,\n\t l1 = arr1.length - 1;\n\t while (i1 < l1) {\n\t $propertyKey = arr1[i1 += 1];\n\t out += ' || key' + ($lvl) + ' == ' + (it.util.toQuotedString($propertyKey)) + ' ';\n\t }\n\t }\n\t }\n\t }\n\t if ($pPropertyKeys.length) {\n\t var arr2 = $pPropertyKeys;\n\t if (arr2) {\n\t var $pProperty, $i = -1,\n\t l2 = arr2.length - 1;\n\t while ($i < l2) {\n\t $pProperty = arr2[$i += 1];\n\t out += ' || ' + (it.usePattern($pProperty)) + '.test(key' + ($lvl) + ') ';\n\t }\n\t }\n\t }\n\t if (it.opts.v5 && $pgPropertyKeys && $pgPropertyKeys.length) {\n\t var arr3 = $pgPropertyKeys;\n\t if (arr3) {\n\t var $pgProperty, $i = -1,\n\t l3 = arr3.length - 1;\n\t while ($i < l3) {\n\t $pgProperty = arr3[$i += 1];\n\t out += ' || ' + (it.usePattern($pgProperty)) + '.test(key' + ($lvl) + ') ';\n\t }\n\t }\n\t }\n\t out += ' ); if (isAdditional' + ($lvl) + ') { ';\n\t }\n\t if ($removeAdditional == 'all') {\n\t out += ' delete ' + ($data) + '[key' + ($lvl) + ']; ';\n\t } else {\n\t var $currentErrorPath = it.errorPath;\n\t var $additionalProperty = '\\' + key' + $lvl + ' + \\'';\n\t if (it.opts._errorDataPathProperty) {\n\t it.errorPath = it.util.getPathExpr(it.errorPath, 'key' + $lvl, it.opts.jsonPointers);\n\t }\n\t if ($noAdditional) {\n\t if ($removeAdditional) {\n\t out += ' delete ' + ($data) + '[key' + ($lvl) + ']; ';\n\t } else {\n\t out += ' valid' + ($it.level) + ' = false; ';\n\t var $currErrSchemaPath = $errSchemaPath;\n\t $errSchemaPath = it.errSchemaPath + '/additionalProperties';\n\t var $$outStack = $$outStack || [];\n\t $$outStack.push(out);\n\t out = ''; /* istanbul ignore else */\n\t if (it.createErrors !== false) {\n\t out += ' { keyword: \\'' + ($errorKeyword || 'additionalProperties') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: \"' + ($errSchemaPath) + '\" , params: { additionalProperty: \\'' + ($additionalProperty) + '\\' } ';\n\t if (it.opts.messages !== false) {\n\t out += ' , message: \\'should NOT have additional properties\\' ';\n\t }\n\t if (it.opts.verbose) {\n\t out += ' , schema: false , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n\t }\n\t out += ' } ';\n\t } else {\n\t out += ' {} ';\n\t }\n\t var __err = out;\n\t out = $$outStack.pop();\n\t if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */\n\t if (it.async) {\n\t out += ' throw new ValidationError([' + (__err) + ']); ';\n\t } else {\n\t out += ' validate.errors = [' + (__err) + ']; return false; ';\n\t }\n\t } else {\n\t out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n\t }\n\t $errSchemaPath = $currErrSchemaPath;\n\t if ($breakOnError) {\n\t out += ' break; ';\n\t }\n\t }\n\t } else if ($additionalIsSchema) {\n\t if ($removeAdditional == 'failing') {\n\t out += ' var ' + ($errs) + ' = errors; ';\n\t var $wasComposite = it.compositeRule;\n\t it.compositeRule = $it.compositeRule = true;\n\t $it.schema = $aProperties;\n\t $it.schemaPath = it.schemaPath + '.additionalProperties';\n\t $it.errSchemaPath = it.errSchemaPath + '/additionalProperties';\n\t $it.errorPath = it.opts._errorDataPathProperty ? it.errorPath : it.util.getPathExpr(it.errorPath, 'key' + $lvl, it.opts.jsonPointers);\n\t var $passData = $data + '[key' + $lvl + ']';\n\t $it.dataPathArr[$dataNxt] = 'key' + $lvl;\n\t var $code = it.validate($it);\n\t if (it.util.varOccurences($code, $nextData) < 2) {\n\t out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' ';\n\t } else {\n\t out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' ';\n\t }\n\t out += ' if (!valid' + ($it.level) + ') { errors = ' + ($errs) + '; if (validate.errors !== null) { if (errors) validate.errors.length = errors; else validate.errors = null; } delete ' + ($data) + '[key' + ($lvl) + ']; } ';\n\t it.compositeRule = $it.compositeRule = $wasComposite;\n\t } else {\n\t $it.schema = $aProperties;\n\t $it.schemaPath = it.schemaPath + '.additionalProperties';\n\t $it.errSchemaPath = it.errSchemaPath + '/additionalProperties';\n\t $it.errorPath = it.opts._errorDataPathProperty ? it.errorPath : it.util.getPathExpr(it.errorPath, 'key' + $lvl, it.opts.jsonPointers);\n\t var $passData = $data + '[key' + $lvl + ']';\n\t $it.dataPathArr[$dataNxt] = 'key' + $lvl;\n\t var $code = it.validate($it);\n\t if (it.util.varOccurences($code, $nextData) < 2) {\n\t out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' ';\n\t } else {\n\t out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' ';\n\t }\n\t if ($breakOnError) {\n\t out += ' if (!valid' + ($it.level) + ') break; ';\n\t }\n\t }\n\t }\n\t it.errorPath = $currentErrorPath;\n\t }\n\t if ($someProperties) {\n\t out += ' } ';\n\t }\n\t out += ' } ';\n\t if ($breakOnError) {\n\t out += ' if (valid' + ($it.level) + ') { ';\n\t $closingBraces += '}';\n\t }\n\t }\n\t var $useDefaults = it.opts.useDefaults && !it.compositeRule;\n\t if ($schemaKeys.length) {\n\t var arr4 = $schemaKeys;\n\t if (arr4) {\n\t var $propertyKey, i4 = -1,\n\t l4 = arr4.length - 1;\n\t while (i4 < l4) {\n\t $propertyKey = arr4[i4 += 1];\n\t var $sch = $schema[$propertyKey];\n\t if (it.util.schemaHasRules($sch, it.RULES.all)) {\n\t var $prop = it.util.getProperty($propertyKey),\n\t $passData = $data + $prop,\n\t $hasDefault = $useDefaults && $sch.default !== undefined;\n\t $it.schema = $sch;\n\t $it.schemaPath = $schemaPath + $prop;\n\t $it.errSchemaPath = $errSchemaPath + '/' + it.util.escapeFragment($propertyKey);\n\t $it.errorPath = it.util.getPath(it.errorPath, $propertyKey, it.opts.jsonPointers);\n\t $it.dataPathArr[$dataNxt] = it.util.toQuotedString($propertyKey);\n\t var $code = it.validate($it);\n\t if (it.util.varOccurences($code, $nextData) < 2) {\n\t $code = it.util.varReplace($code, $nextData, $passData);\n\t var $useData = $passData;\n\t } else {\n\t var $useData = $nextData;\n\t out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ';\n\t }\n\t if ($hasDefault) {\n\t out += ' ' + ($code) + ' ';\n\t } else {\n\t if ($requiredHash && $requiredHash[$propertyKey]) {\n\t out += ' if (' + ($useData) + ' === undefined) { valid' + ($it.level) + ' = false; ';\n\t var $currentErrorPath = it.errorPath,\n\t $currErrSchemaPath = $errSchemaPath,\n\t $missingProperty = it.util.escapeQuotes($propertyKey);\n\t if (it.opts._errorDataPathProperty) {\n\t it.errorPath = it.util.getPath($currentErrorPath, $propertyKey, it.opts.jsonPointers);\n\t }\n\t $errSchemaPath = it.errSchemaPath + '/required';\n\t var $$outStack = $$outStack || [];\n\t $$outStack.push(out);\n\t out = ''; /* istanbul ignore else */\n\t if (it.createErrors !== false) {\n\t out += ' { keyword: \\'' + ($errorKeyword || 'required') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: \"' + ($errSchemaPath) + '\" , params: { missingProperty: \\'' + ($missingProperty) + '\\' } ';\n\t if (it.opts.messages !== false) {\n\t out += ' , message: \\'';\n\t if (it.opts._errorDataPathProperty) {\n\t out += 'is a required property';\n\t } else {\n\t out += 'should have required property \\\\\\'' + ($missingProperty) + '\\\\\\'';\n\t }\n\t out += '\\' ';\n\t }\n\t if (it.opts.verbose) {\n\t out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n\t }\n\t out += ' } ';\n\t } else {\n\t out += ' {} ';\n\t }\n\t var __err = out;\n\t out = $$outStack.pop();\n\t if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */\n\t if (it.async) {\n\t out += ' throw new ValidationError([' + (__err) + ']); ';\n\t } else {\n\t out += ' validate.errors = [' + (__err) + ']; return false; ';\n\t }\n\t } else {\n\t out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n\t }\n\t $errSchemaPath = $currErrSchemaPath;\n\t it.errorPath = $currentErrorPath;\n\t out += ' } else { ';\n\t } else {\n\t if ($breakOnError) {\n\t out += ' if (' + ($useData) + ' === undefined) { valid' + ($it.level) + ' = true; } else { ';\n\t } else {\n\t out += ' if (' + ($useData) + ' !== undefined) { ';\n\t }\n\t }\n\t out += ' ' + ($code) + ' } ';\n\t }\n\t }\n\t if ($breakOnError) {\n\t out += ' if (valid' + ($it.level) + ') { ';\n\t $closingBraces += '}';\n\t }\n\t }\n\t }\n\t }\n\t var arr5 = $pPropertyKeys;\n\t if (arr5) {\n\t var $pProperty, i5 = -1,\n\t l5 = arr5.length - 1;\n\t while (i5 < l5) {\n\t $pProperty = arr5[i5 += 1];\n\t var $sch = $pProperties[$pProperty];\n\t if (it.util.schemaHasRules($sch, it.RULES.all)) {\n\t $it.schema = $sch;\n\t $it.schemaPath = it.schemaPath + '.patternProperties' + it.util.getProperty($pProperty);\n\t $it.errSchemaPath = it.errSchemaPath + '/patternProperties/' + it.util.escapeFragment($pProperty);\n\t out += ' for (var key' + ($lvl) + ' in ' + ($data) + ') { if (' + (it.usePattern($pProperty)) + '.test(key' + ($lvl) + ')) { ';\n\t $it.errorPath = it.util.getPathExpr(it.errorPath, 'key' + $lvl, it.opts.jsonPointers);\n\t var $passData = $data + '[key' + $lvl + ']';\n\t $it.dataPathArr[$dataNxt] = 'key' + $lvl;\n\t var $code = it.validate($it);\n\t if (it.util.varOccurences($code, $nextData) < 2) {\n\t out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' ';\n\t } else {\n\t out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' ';\n\t }\n\t if ($breakOnError) {\n\t out += ' if (!valid' + ($it.level) + ') break; ';\n\t }\n\t out += ' } ';\n\t if ($breakOnError) {\n\t out += ' else valid' + ($it.level) + ' = true; ';\n\t }\n\t out += ' } ';\n\t if ($breakOnError) {\n\t out += ' if (valid' + ($it.level) + ') { ';\n\t $closingBraces += '}';\n\t }\n\t }\n\t }\n\t }\n\t if (it.opts.v5) {\n\t var arr6 = $pgPropertyKeys;\n\t if (arr6) {\n\t var $pgProperty, i6 = -1,\n\t l6 = arr6.length - 1;\n\t while (i6 < l6) {\n\t $pgProperty = arr6[i6 += 1];\n\t var $pgSchema = $pgProperties[$pgProperty],\n\t $sch = $pgSchema.schema;\n\t if (it.util.schemaHasRules($sch, it.RULES.all)) {\n\t $it.schema = $sch;\n\t $it.schemaPath = it.schemaPath + '.patternGroups' + it.util.getProperty($pgProperty) + '.schema';\n\t $it.errSchemaPath = it.errSchemaPath + '/patternGroups/' + it.util.escapeFragment($pgProperty) + '/schema';\n\t out += ' var pgPropCount' + ($lvl) + ' = 0; for (var key' + ($lvl) + ' in ' + ($data) + ') { if (' + (it.usePattern($pgProperty)) + '.test(key' + ($lvl) + ')) { pgPropCount' + ($lvl) + '++; ';\n\t $it.errorPath = it.util.getPathExpr(it.errorPath, 'key' + $lvl, it.opts.jsonPointers);\n\t var $passData = $data + '[key' + $lvl + ']';\n\t $it.dataPathArr[$dataNxt] = 'key' + $lvl;\n\t var $code = it.validate($it);\n\t if (it.util.varOccurences($code, $nextData) < 2) {\n\t out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' ';\n\t } else {\n\t out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' ';\n\t }\n\t if ($breakOnError) {\n\t out += ' if (!valid' + ($it.level) + ') break; ';\n\t }\n\t out += ' } ';\n\t if ($breakOnError) {\n\t out += ' else valid' + ($it.level) + ' = true; ';\n\t }\n\t out += ' } ';\n\t if ($breakOnError) {\n\t out += ' if (valid' + ($it.level) + ') { ';\n\t $closingBraces += '}';\n\t }\n\t var $pgMin = $pgSchema.minimum,\n\t $pgMax = $pgSchema.maximum;\n\t if ($pgMin !== undefined || $pgMax !== undefined) {\n\t out += ' var ' + ($valid) + ' = true; ';\n\t var $currErrSchemaPath = $errSchemaPath;\n\t if ($pgMin !== undefined) {\n\t var $limit = $pgMin,\n\t $reason = 'minimum',\n\t $moreOrLess = 'less';\n\t out += ' ' + ($valid) + ' = pgPropCount' + ($lvl) + ' >= ' + ($pgMin) + '; ';\n\t $errSchemaPath = it.errSchemaPath + '/patternGroups/minimum';\n\t out += ' if (!' + ($valid) + ') { ';\n\t var $$outStack = $$outStack || [];\n\t $$outStack.push(out);\n\t out = ''; /* istanbul ignore else */\n\t if (it.createErrors !== false) {\n\t out += ' { keyword: \\'' + ($errorKeyword || 'patternGroups') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: \"' + ($errSchemaPath) + '\" , params: { reason: \\'' + ($reason) + '\\', limit: ' + ($limit) + ', pattern: \\'' + (it.util.escapeQuotes($pgProperty)) + '\\' } ';\n\t if (it.opts.messages !== false) {\n\t out += ' , message: \\'should NOT have ' + ($moreOrLess) + ' than ' + ($limit) + ' properties matching pattern \"' + (it.util.escapeQuotes($pgProperty)) + '\"\\' ';\n\t }\n\t if (it.opts.verbose) {\n\t out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n\t }\n\t out += ' } ';\n\t } else {\n\t out += ' {} ';\n\t }\n\t var __err = out;\n\t out = $$outStack.pop();\n\t if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */\n\t if (it.async) {\n\t out += ' throw new ValidationError([' + (__err) + ']); ';\n\t } else {\n\t out += ' validate.errors = [' + (__err) + ']; return false; ';\n\t }\n\t } else {\n\t out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n\t }\n\t out += ' } ';\n\t if ($pgMax !== undefined) {\n\t out += ' else ';\n\t }\n\t }\n\t if ($pgMax !== undefined) {\n\t var $limit = $pgMax,\n\t $reason = 'maximum',\n\t $moreOrLess = 'more';\n\t out += ' ' + ($valid) + ' = pgPropCount' + ($lvl) + ' <= ' + ($pgMax) + '; ';\n\t $errSchemaPath = it.errSchemaPath + '/patternGroups/maximum';\n\t out += ' if (!' + ($valid) + ') { ';\n\t var $$outStack = $$outStack || [];\n\t $$outStack.push(out);\n\t out = ''; /* istanbul ignore else */\n\t if (it.createErrors !== false) {\n\t out += ' { keyword: \\'' + ($errorKeyword || 'patternGroups') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: \"' + ($errSchemaPath) + '\" , params: { reason: \\'' + ($reason) + '\\', limit: ' + ($limit) + ', pattern: \\'' + (it.util.escapeQuotes($pgProperty)) + '\\' } ';\n\t if (it.opts.messages !== false) {\n\t out += ' , message: \\'should NOT have ' + ($moreOrLess) + ' than ' + ($limit) + ' properties matching pattern \"' + (it.util.escapeQuotes($pgProperty)) + '\"\\' ';\n\t }\n\t if (it.opts.verbose) {\n\t out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n\t }\n\t out += ' } ';\n\t } else {\n\t out += ' {} ';\n\t }\n\t var __err = out;\n\t out = $$outStack.pop();\n\t if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */\n\t if (it.async) {\n\t out += ' throw new ValidationError([' + (__err) + ']); ';\n\t } else {\n\t out += ' validate.errors = [' + (__err) + ']; return false; ';\n\t }\n\t } else {\n\t out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n\t }\n\t out += ' } ';\n\t }\n\t $errSchemaPath = $currErrSchemaPath;\n\t if ($breakOnError) {\n\t out += ' if (' + ($valid) + ') { ';\n\t $closingBraces += '}';\n\t }\n\t }\n\t }\n\t }\n\t }\n\t }\n\t if ($breakOnError) {\n\t out += ' ' + ($closingBraces) + ' if (' + ($errs) + ' == errors) {';\n\t }\n\t out = it.util.cleanUpCode(out);\n\t return out;\n\t}\n\t\n\t},{}],30:[function(require,module,exports){\n\t'use strict';\n\tmodule.exports = function generate_ref(it, $keyword) {\n\t var out = ' ';\n\t var $lvl = it.level;\n\t var $dataLvl = it.dataLevel;\n\t var $schema = it.schema[$keyword];\n\t var $errSchemaPath = it.errSchemaPath + '/' + $keyword;\n\t var $breakOnError = !it.opts.allErrors;\n\t var $errorKeyword;\n\t var $data = 'data' + ($dataLvl || '');\n\t var $valid = 'valid' + $lvl;\n\t var $async, $refCode;\n\t if ($schema == '#' || $schema == '#/') {\n\t if (it.isRoot) {\n\t $async = it.async;\n\t $refCode = 'validate';\n\t } else {\n\t $async = it.root.schema.$async === true;\n\t $refCode = 'root.refVal[0]';\n\t }\n\t } else {\n\t var $refVal = it.resolveRef(it.baseId, $schema, it.isRoot);\n\t if ($refVal === undefined) {\n\t var $message = 'can\\'t resolve reference ' + $schema + ' from id ' + it.baseId;\n\t if (it.opts.missingRefs == 'fail') {\n\t console.log($message);\n\t var $$outStack = $$outStack || [];\n\t $$outStack.push(out);\n\t out = ''; /* istanbul ignore else */\n\t if (it.createErrors !== false) {\n\t out += ' { keyword: \\'' + ($errorKeyword || '$ref') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: \"' + ($errSchemaPath) + '\" , params: { ref: \\'' + (it.util.escapeQuotes($schema)) + '\\' } ';\n\t if (it.opts.messages !== false) {\n\t out += ' , message: \\'can\\\\\\'t resolve reference ' + (it.util.escapeQuotes($schema)) + '\\' ';\n\t }\n\t if (it.opts.verbose) {\n\t out += ' , schema: ' + (it.util.toQuotedString($schema)) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n\t }\n\t out += ' } ';\n\t } else {\n\t out += ' {} ';\n\t }\n\t var __err = out;\n\t out = $$outStack.pop();\n\t if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */\n\t if (it.async) {\n\t out += ' throw new ValidationError([' + (__err) + ']); ';\n\t } else {\n\t out += ' validate.errors = [' + (__err) + ']; return false; ';\n\t }\n\t } else {\n\t out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n\t }\n\t if ($breakOnError) {\n\t out += ' if (false) { ';\n\t }\n\t } else if (it.opts.missingRefs == 'ignore') {\n\t console.log($message);\n\t if ($breakOnError) {\n\t out += ' if (true) { ';\n\t }\n\t } else {\n\t var $error = new Error($message);\n\t $error.missingRef = it.resolve.url(it.baseId, $schema);\n\t $error.missingSchema = it.resolve.normalizeId(it.resolve.fullPath($error.missingRef));\n\t throw $error;\n\t }\n\t } else if ($refVal.inline) {\n\t var $it = it.util.copy(it);\n\t $it.level++;\n\t $it.schema = $refVal.schema;\n\t $it.schemaPath = '';\n\t $it.errSchemaPath = $schema;\n\t var $code = it.validate($it).replace(/validate\\.schema/g, $refVal.code);\n\t out += ' ' + ($code) + ' ';\n\t if ($breakOnError) {\n\t out += ' if (valid' + ($it.level) + ') { ';\n\t }\n\t } else {\n\t $async = $refVal.async;\n\t $refCode = $refVal.code;\n\t }\n\t }\n\t if ($refCode) {\n\t var $$outStack = $$outStack || [];\n\t $$outStack.push(out);\n\t out = '';\n\t if (it.opts.passContext) {\n\t out += ' ' + ($refCode) + '.call(this, ';\n\t } else {\n\t out += ' ' + ($refCode) + '( ';\n\t }\n\t out += ' ' + ($data) + ', (dataPath || \\'\\')';\n\t if (it.errorPath != '\"\"') {\n\t out += ' + ' + (it.errorPath);\n\t }\n\t if ($dataLvl) {\n\t out += ' , data' + (($dataLvl - 1) || '') + ' , ' + (it.dataPathArr[$dataLvl]) + ' ';\n\t } else {\n\t out += ' , parentData , parentDataProperty ';\n\t }\n\t out += ') ';\n\t var __callValidate = out;\n\t out = $$outStack.pop();\n\t if ($async) {\n\t if (!it.async) throw new Error('async schema referenced by sync schema');\n\t out += ' try { ';\n\t if ($breakOnError) {\n\t out += 'var ' + ($valid) + ' =';\n\t }\n\t out += ' ' + (it.yieldAwait) + ' ' + (__callValidate) + '; } catch (e) { if (!(e instanceof ValidationError)) throw e; if (vErrors === null) vErrors = e.errors; else vErrors = vErrors.concat(e.errors); errors = vErrors.length; } ';\n\t if ($breakOnError) {\n\t out += ' if (' + ($valid) + ') { ';\n\t }\n\t } else {\n\t out += ' if (!' + (__callValidate) + ') { if (vErrors === null) vErrors = ' + ($refCode) + '.errors; else vErrors = vErrors.concat(' + ($refCode) + '.errors); errors = vErrors.length; } ';\n\t if ($breakOnError) {\n\t out += ' else { ';\n\t }\n\t }\n\t }\n\t return out;\n\t}\n\t\n\t},{}],31:[function(require,module,exports){\n\t'use strict';\n\tmodule.exports = function generate_required(it, $keyword) {\n\t var out = ' ';\n\t var $lvl = it.level;\n\t var $dataLvl = it.dataLevel;\n\t var $schema = it.schema[$keyword];\n\t var $schemaPath = it.schemaPath + '.' + $keyword;\n\t var $errSchemaPath = it.errSchemaPath + '/' + $keyword;\n\t var $breakOnError = !it.opts.allErrors;\n\t var $errorKeyword;\n\t var $data = 'data' + ($dataLvl || '');\n\t var $valid = 'valid' + $lvl;\n\t var $isData = it.opts.v5 && $schema.$data;\n\t var $schemaValue = $isData ? it.util.getData($schema.$data, $dataLvl, it.dataPathArr) : $schema;\n\t if ($isData) {\n\t out += ' var schema' + ($lvl) + ' = ' + ($schemaValue) + '; ';\n\t $schemaValue = 'schema' + $lvl;\n\t }\n\t if (!$isData) {\n\t if ($schema.length < it.opts.loopRequired && it.schema.properties && Object.keys(it.schema.properties).length) {\n\t var $required = [];\n\t var arr1 = $schema;\n\t if (arr1) {\n\t var $property, i1 = -1,\n\t l1 = arr1.length - 1;\n\t while (i1 < l1) {\n\t $property = arr1[i1 += 1];\n\t var $propertySch = it.schema.properties[$property];\n\t if (!($propertySch && it.util.schemaHasRules($propertySch, it.RULES.all))) {\n\t $required[$required.length] = $property;\n\t }\n\t }\n\t }\n\t } else {\n\t var $required = $schema;\n\t }\n\t }\n\t if ($isData || $required.length) {\n\t var $currentErrorPath = it.errorPath,\n\t $loopRequired = $isData || $required.length >= it.opts.loopRequired;\n\t if ($breakOnError) {\n\t out += ' var missing' + ($lvl) + '; ';\n\t if ($loopRequired) {\n\t if (!$isData) {\n\t out += ' var schema' + ($lvl) + ' = validate.schema' + ($schemaPath) + '; ';\n\t }\n\t var $i = 'i' + $lvl,\n\t $propertyPath = 'schema' + $lvl + '[' + $i + ']',\n\t $missingProperty = '\\' + ' + $propertyPath + ' + \\'';\n\t if (it.opts._errorDataPathProperty) {\n\t it.errorPath = it.util.getPathExpr($currentErrorPath, $propertyPath, it.opts.jsonPointers);\n\t }\n\t out += ' var ' + ($valid) + ' = true; ';\n\t if ($isData) {\n\t out += ' if (schema' + ($lvl) + ' === undefined) ' + ($valid) + ' = true; else if (!Array.isArray(schema' + ($lvl) + ')) ' + ($valid) + ' = false; else {';\n\t }\n\t out += ' for (var ' + ($i) + ' = 0; ' + ($i) + ' < schema' + ($lvl) + '.length; ' + ($i) + '++) { ' + ($valid) + ' = ' + ($data) + '[schema' + ($lvl) + '[' + ($i) + ']] !== undefined; if (!' + ($valid) + ') break; } ';\n\t if ($isData) {\n\t out += ' } ';\n\t }\n\t out += ' if (!' + ($valid) + ') { ';\n\t var $$outStack = $$outStack || [];\n\t $$outStack.push(out);\n\t out = ''; /* istanbul ignore else */\n\t if (it.createErrors !== false) {\n\t out += ' { keyword: \\'' + ($errorKeyword || 'required') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: \"' + ($errSchemaPath) + '\" , params: { missingProperty: \\'' + ($missingProperty) + '\\' } ';\n\t if (it.opts.messages !== false) {\n\t out += ' , message: \\'';\n\t if (it.opts._errorDataPathProperty) {\n\t out += 'is a required property';\n\t } else {\n\t out += 'should have required property \\\\\\'' + ($missingProperty) + '\\\\\\'';\n\t }\n\t out += '\\' ';\n\t }\n\t if (it.opts.verbose) {\n\t out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n\t }\n\t out += ' } ';\n\t } else {\n\t out += ' {} ';\n\t }\n\t var __err = out;\n\t out = $$outStack.pop();\n\t if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */\n\t if (it.async) {\n\t out += ' throw new ValidationError([' + (__err) + ']); ';\n\t } else {\n\t out += ' validate.errors = [' + (__err) + ']; return false; ';\n\t }\n\t } else {\n\t out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n\t }\n\t out += ' } else { ';\n\t } else {\n\t out += ' if ( ';\n\t var arr2 = $required;\n\t if (arr2) {\n\t var _$property, $i = -1,\n\t l2 = arr2.length - 1;\n\t while ($i < l2) {\n\t _$property = arr2[$i += 1];\n\t if ($i) {\n\t out += ' || ';\n\t }\n\t var $prop = it.util.getProperty(_$property);\n\t out += ' ( ' + ($data) + ($prop) + ' === undefined && (missing' + ($lvl) + ' = ' + (it.util.toQuotedString(it.opts.jsonPointers ? _$property : $prop)) + ') ) ';\n\t }\n\t }\n\t out += ') { ';\n\t var $propertyPath = 'missing' + $lvl,\n\t $missingProperty = '\\' + ' + $propertyPath + ' + \\'';\n\t if (it.opts._errorDataPathProperty) {\n\t it.errorPath = it.opts.jsonPointers ? it.util.getPathExpr($currentErrorPath, $propertyPath, true) : $currentErrorPath + ' + ' + $propertyPath;\n\t }\n\t var $$outStack = $$outStack || [];\n\t $$outStack.push(out);\n\t out = ''; /* istanbul ignore else */\n\t if (it.createErrors !== false) {\n\t out += ' { keyword: \\'' + ($errorKeyword || 'required') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: \"' + ($errSchemaPath) + '\" , params: { missingProperty: \\'' + ($missingProperty) + '\\' } ';\n\t if (it.opts.messages !== false) {\n\t out += ' , message: \\'';\n\t if (it.opts._errorDataPathProperty) {\n\t out += 'is a required property';\n\t } else {\n\t out += 'should have required property \\\\\\'' + ($missingProperty) + '\\\\\\'';\n\t }\n\t out += '\\' ';\n\t }\n\t if (it.opts.verbose) {\n\t out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n\t }\n\t out += ' } ';\n\t } else {\n\t out += ' {} ';\n\t }\n\t var __err = out;\n\t out = $$outStack.pop();\n\t if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */\n\t if (it.async) {\n\t out += ' throw new ValidationError([' + (__err) + ']); ';\n\t } else {\n\t out += ' validate.errors = [' + (__err) + ']; return false; ';\n\t }\n\t } else {\n\t out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n\t }\n\t out += ' } else { ';\n\t }\n\t } else {\n\t if ($loopRequired) {\n\t if (!$isData) {\n\t out += ' var schema' + ($lvl) + ' = validate.schema' + ($schemaPath) + '; ';\n\t }\n\t var $i = 'i' + $lvl,\n\t $propertyPath = 'schema' + $lvl + '[' + $i + ']',\n\t $missingProperty = '\\' + ' + $propertyPath + ' + \\'';\n\t if (it.opts._errorDataPathProperty) {\n\t it.errorPath = it.util.getPathExpr($currentErrorPath, $propertyPath, it.opts.jsonPointers);\n\t }\n\t if ($isData) {\n\t out += ' if (schema' + ($lvl) + ' && !Array.isArray(schema' + ($lvl) + ')) { var err = '; /* istanbul ignore else */\n\t if (it.createErrors !== false) {\n\t out += ' { keyword: \\'' + ($errorKeyword || 'required') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: \"' + ($errSchemaPath) + '\" , params: { missingProperty: \\'' + ($missingProperty) + '\\' } ';\n\t if (it.opts.messages !== false) {\n\t out += ' , message: \\'';\n\t if (it.opts._errorDataPathProperty) {\n\t out += 'is a required property';\n\t } else {\n\t out += 'should have required property \\\\\\'' + ($missingProperty) + '\\\\\\'';\n\t }\n\t out += '\\' ';\n\t }\n\t if (it.opts.verbose) {\n\t out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n\t }\n\t out += ' } ';\n\t } else {\n\t out += ' {} ';\n\t }\n\t out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } else if (schema' + ($lvl) + ' !== undefined) { ';\n\t }\n\t out += ' for (var ' + ($i) + ' = 0; ' + ($i) + ' < schema' + ($lvl) + '.length; ' + ($i) + '++) { if (' + ($data) + '[schema' + ($lvl) + '[' + ($i) + ']] === undefined) { var err = '; /* istanbul ignore else */\n\t if (it.createErrors !== false) {\n\t out += ' { keyword: \\'' + ($errorKeyword || 'required') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: \"' + ($errSchemaPath) + '\" , params: { missingProperty: \\'' + ($missingProperty) + '\\' } ';\n\t if (it.opts.messages !== false) {\n\t out += ' , message: \\'';\n\t if (it.opts._errorDataPathProperty) {\n\t out += 'is a required property';\n\t } else {\n\t out += 'should have required property \\\\\\'' + ($missingProperty) + '\\\\\\'';\n\t }\n\t out += '\\' ';\n\t }\n\t if (it.opts.verbose) {\n\t out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n\t }\n\t out += ' } ';\n\t } else {\n\t out += ' {} ';\n\t }\n\t out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } } ';\n\t if ($isData) {\n\t out += ' } ';\n\t }\n\t } else {\n\t var arr3 = $required;\n\t if (arr3) {\n\t var $property, $i = -1,\n\t l3 = arr3.length - 1;\n\t while ($i < l3) {\n\t $property = arr3[$i += 1];\n\t var $prop = it.util.getProperty($property),\n\t $missingProperty = it.util.escapeQuotes($property);\n\t if (it.opts._errorDataPathProperty) {\n\t it.errorPath = it.util.getPath($currentErrorPath, $property, it.opts.jsonPointers);\n\t }\n\t out += ' if (' + ($data) + ($prop) + ' === undefined) { var err = '; /* istanbul ignore else */\n\t if (it.createErrors !== false) {\n\t out += ' { keyword: \\'' + ($errorKeyword || 'required') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: \"' + ($errSchemaPath) + '\" , params: { missingProperty: \\'' + ($missingProperty) + '\\' } ';\n\t if (it.opts.messages !== false) {\n\t out += ' , message: \\'';\n\t if (it.opts._errorDataPathProperty) {\n\t out += 'is a required property';\n\t } else {\n\t out += 'should have required property \\\\\\'' + ($missingProperty) + '\\\\\\'';\n\t }\n\t out += '\\' ';\n\t }\n\t if (it.opts.verbose) {\n\t out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n\t }\n\t out += ' } ';\n\t } else {\n\t out += ' {} ';\n\t }\n\t out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } ';\n\t }\n\t }\n\t }\n\t }\n\t it.errorPath = $currentErrorPath;\n\t } else if ($breakOnError) {\n\t out += ' if (true) {';\n\t }\n\t return out;\n\t}\n\t\n\t},{}],32:[function(require,module,exports){\n\t'use strict';\n\tmodule.exports = function generate_switch(it, $keyword) {\n\t var out = ' ';\n\t var $lvl = it.level;\n\t var $dataLvl = it.dataLevel;\n\t var $schema = it.schema[$keyword];\n\t var $schemaPath = it.schemaPath + '.' + $keyword;\n\t var $errSchemaPath = it.errSchemaPath + '/' + $keyword;\n\t var $breakOnError = !it.opts.allErrors;\n\t var $errorKeyword;\n\t var $data = 'data' + ($dataLvl || '');\n\t var $valid = 'valid' + $lvl;\n\t var $errs = 'errs__' + $lvl;\n\t var $it = it.util.copy(it);\n\t var $closingBraces = '';\n\t $it.level++;\n\t var $ifPassed = 'ifPassed' + it.level,\n\t $shouldContinue;\n\t out += 'var ' + ($ifPassed) + ';';\n\t var arr1 = $schema;\n\t if (arr1) {\n\t var $sch, $caseIndex = -1,\n\t l1 = arr1.length - 1;\n\t while ($caseIndex < l1) {\n\t $sch = arr1[$caseIndex += 1];\n\t if ($caseIndex && !$shouldContinue) {\n\t out += ' if (!' + ($ifPassed) + ') { ';\n\t $closingBraces += '}';\n\t }\n\t if ($sch.if && it.util.schemaHasRules($sch.if, it.RULES.all)) {\n\t out += ' var ' + ($errs) + ' = errors; ';\n\t var $wasComposite = it.compositeRule;\n\t it.compositeRule = $it.compositeRule = true;\n\t $it.createErrors = false;\n\t $it.schema = $sch.if;\n\t $it.schemaPath = $schemaPath + '[' + $caseIndex + '].if';\n\t $it.errSchemaPath = $errSchemaPath + '/' + $caseIndex + '/if';\n\t out += ' ' + (it.validate($it)) + ' ';\n\t $it.createErrors = true;\n\t it.compositeRule = $it.compositeRule = $wasComposite;\n\t out += ' ' + ($ifPassed) + ' = valid' + ($it.level) + '; if (' + ($ifPassed) + ') { ';\n\t if (typeof $sch.then == 'boolean') {\n\t if ($sch.then === false) {\n\t var $$outStack = $$outStack || [];\n\t $$outStack.push(out);\n\t out = ''; /* istanbul ignore else */\n\t if (it.createErrors !== false) {\n\t out += ' { keyword: \\'' + ($errorKeyword || 'switch') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: \"' + ($errSchemaPath) + '\" , params: { caseIndex: ' + ($caseIndex) + ' } ';\n\t if (it.opts.messages !== false) {\n\t out += ' , message: \\'should pass \"switch\" keyword validation\\' ';\n\t }\n\t if (it.opts.verbose) {\n\t out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n\t }\n\t out += ' } ';\n\t } else {\n\t out += ' {} ';\n\t }\n\t var __err = out;\n\t out = $$outStack.pop();\n\t if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */\n\t if (it.async) {\n\t out += ' throw new ValidationError([' + (__err) + ']); ';\n\t } else {\n\t out += ' validate.errors = [' + (__err) + ']; return false; ';\n\t }\n\t } else {\n\t out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n\t }\n\t }\n\t out += ' var valid' + ($it.level) + ' = ' + ($sch.then) + '; ';\n\t } else {\n\t $it.schema = $sch.then;\n\t $it.schemaPath = $schemaPath + '[' + $caseIndex + '].then';\n\t $it.errSchemaPath = $errSchemaPath + '/' + $caseIndex + '/then';\n\t out += ' ' + (it.validate($it)) + ' ';\n\t }\n\t out += ' } else { errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } } ';\n\t } else {\n\t out += ' ' + ($ifPassed) + ' = true; ';\n\t if (typeof $sch.then == 'boolean') {\n\t if ($sch.then === false) {\n\t var $$outStack = $$outStack || [];\n\t $$outStack.push(out);\n\t out = ''; /* istanbul ignore else */\n\t if (it.createErrors !== false) {\n\t out += ' { keyword: \\'' + ($errorKeyword || 'switch') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: \"' + ($errSchemaPath) + '\" , params: { caseIndex: ' + ($caseIndex) + ' } ';\n\t if (it.opts.messages !== false) {\n\t out += ' , message: \\'should pass \"switch\" keyword validation\\' ';\n\t }\n\t if (it.opts.verbose) {\n\t out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n\t }\n\t out += ' } ';\n\t } else {\n\t out += ' {} ';\n\t }\n\t var __err = out;\n\t out = $$outStack.pop();\n\t if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */\n\t if (it.async) {\n\t out += ' throw new ValidationError([' + (__err) + ']); ';\n\t } else {\n\t out += ' validate.errors = [' + (__err) + ']; return false; ';\n\t }\n\t } else {\n\t out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n\t }\n\t }\n\t out += ' var valid' + ($it.level) + ' = ' + ($sch.then) + '; ';\n\t } else {\n\t $it.schema = $sch.then;\n\t $it.schemaPath = $schemaPath + '[' + $caseIndex + '].then';\n\t $it.errSchemaPath = $errSchemaPath + '/' + $caseIndex + '/then';\n\t out += ' ' + (it.validate($it)) + ' ';\n\t }\n\t }\n\t $shouldContinue = $sch.continue\n\t }\n\t }\n\t out += '' + ($closingBraces) + 'var ' + ($valid) + ' = valid' + ($it.level) + '; ';\n\t out = it.util.cleanUpCode(out);\n\t return out;\n\t}\n\t\n\t},{}],33:[function(require,module,exports){\n\t'use strict';\n\tmodule.exports = function generate_uniqueItems(it, $keyword) {\n\t var out = ' ';\n\t var $lvl = it.level;\n\t var $dataLvl = it.dataLevel;\n\t var $schema = it.schema[$keyword];\n\t var $schemaPath = it.schemaPath + '.' + $keyword;\n\t var $errSchemaPath = it.errSchemaPath + '/' + $keyword;\n\t var $breakOnError = !it.opts.allErrors;\n\t var $errorKeyword;\n\t var $data = 'data' + ($dataLvl || '');\n\t var $valid = 'valid' + $lvl;\n\t var $isData = it.opts.v5 && $schema.$data;\n\t var $schemaValue = $isData ? it.util.getData($schema.$data, $dataLvl, it.dataPathArr) : $schema;\n\t if ($isData) {\n\t out += ' var schema' + ($lvl) + ' = ' + ($schemaValue) + '; ';\n\t $schemaValue = 'schema' + $lvl;\n\t }\n\t if (($schema || $isData) && it.opts.uniqueItems !== false) {\n\t if ($isData) {\n\t out += ' var ' + ($valid) + '; if (' + ($schemaValue) + ' === false || ' + ($schemaValue) + ' === undefined) ' + ($valid) + ' = true; else if (typeof ' + ($schemaValue) + ' != \\'boolean\\') ' + ($valid) + ' = false; else { ';\n\t }\n\t out += ' var ' + ($valid) + ' = true; if (' + ($data) + '.length > 1) { var i = ' + ($data) + '.length, j; outer: for (;i--;) { for (j = i; j--;) { if (equal(' + ($data) + '[i], ' + ($data) + '[j])) { ' + ($valid) + ' = false; break outer; } } } } ';\n\t if ($isData) {\n\t out += ' } ';\n\t }\n\t out += ' if (!' + ($valid) + ') { ';\n\t var $$outStack = $$outStack || [];\n\t $$outStack.push(out);\n\t out = ''; /* istanbul ignore else */\n\t if (it.createErrors !== false) {\n\t out += ' { keyword: \\'' + ($errorKeyword || 'uniqueItems') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: \"' + ($errSchemaPath) + '\" , params: { i: i, j: j } ';\n\t if (it.opts.messages !== false) {\n\t out += ' , message: \\'should NOT have duplicate items (items ## \\' + j + \\' and \\' + i + \\' are identical)\\' ';\n\t }\n\t if (it.opts.verbose) {\n\t out += ' , schema: ';\n\t if ($isData) {\n\t out += 'validate.schema' + ($schemaPath);\n\t } else {\n\t out += '' + ($schema);\n\t }\n\t out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n\t }\n\t out += ' } ';\n\t } else {\n\t out += ' {} ';\n\t }\n\t var __err = out;\n\t out = $$outStack.pop();\n\t if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */\n\t if (it.async) {\n\t out += ' throw new ValidationError([' + (__err) + ']); ';\n\t } else {\n\t out += ' validate.errors = [' + (__err) + ']; return false; ';\n\t }\n\t } else {\n\t out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n\t }\n\t out += ' } ';\n\t if ($breakOnError) {\n\t out += ' else { ';\n\t }\n\t } else {\n\t if ($breakOnError) {\n\t out += ' if (true) { ';\n\t }\n\t }\n\t return out;\n\t}\n\t\n\t},{}],34:[function(require,module,exports){\n\t'use strict';\n\tmodule.exports = function generate_validate(it, $keyword) {\n\t var out = '';\n\t var $async = it.schema.$async === true;\n\t if (it.isTop) {\n\t var $top = it.isTop,\n\t $lvl = it.level = 0,\n\t $dataLvl = it.dataLevel = 0,\n\t $data = 'data';\n\t it.rootId = it.resolve.fullPath(it.root.schema.id);\n\t it.baseId = it.baseId || it.rootId;\n\t if ($async) {\n\t it.async = true;\n\t var $es7 = it.opts.async == 'es7';\n\t it.yieldAwait = $es7 ? 'await' : 'yield';\n\t }\n\t delete it.isTop;\n\t it.dataPathArr = [undefined];\n\t out += ' validate = ';\n\t if ($async) {\n\t if ($es7) {\n\t out += ' (async function ';\n\t } else {\n\t if (it.opts.async == 'co*') {\n\t out += 'co.wrap';\n\t }\n\t out += '(function* ';\n\t }\n\t } else {\n\t out += ' (function ';\n\t }\n\t out += ' (data, dataPath, parentData, parentDataProperty) { \\'use strict\\'; var vErrors = null; ';\n\t out += ' var errors = 0; ';\n\t } else {\n\t var $lvl = it.level,\n\t $dataLvl = it.dataLevel,\n\t $data = 'data' + ($dataLvl || '');\n\t if (it.schema.id) it.baseId = it.resolve.url(it.baseId, it.schema.id);\n\t if ($async && !it.async) throw new Error('async schema in sync schema');\n\t out += ' var errs_' + ($lvl) + ' = errors;';\n\t }\n\t var $valid = 'valid' + $lvl,\n\t $breakOnError = !it.opts.allErrors,\n\t $closingBraces1 = '',\n\t $closingBraces2 = '',\n\t $errorKeyword;\n\t var $typeSchema = it.schema.type,\n\t $typeIsArray = Array.isArray($typeSchema);\n\t if ($typeSchema && it.opts.coerceTypes) {\n\t var $coerceToTypes = it.util.coerceToTypes($typeSchema);\n\t if ($coerceToTypes) {\n\t var $schemaPath = it.schemaPath + '.type',\n\t $errSchemaPath = it.errSchemaPath + '/type',\n\t $method = $typeIsArray ? 'checkDataTypes' : 'checkDataType';\n\t out += ' if (' + (it.util[$method]($typeSchema, $data, true)) + ') { ';\n\t var $dataType = 'dataType' + $lvl,\n\t $coerced = 'coerced' + $lvl;\n\t out += ' var ' + ($dataType) + ' = typeof ' + ($data) + '; var ' + ($coerced) + '; ';\n\t var $bracesCoercion = '';\n\t var arr1 = $coerceToTypes;\n\t if (arr1) {\n\t var $type, $i = -1,\n\t l1 = arr1.length - 1;\n\t while ($i < l1) {\n\t $type = arr1[$i += 1];\n\t if ($i) {\n\t out += ' if (' + ($coerced) + ' === undefined) { ';\n\t $bracesCoercion += '}';\n\t }\n\t if ($type == 'string') {\n\t out += ' if (' + ($dataType) + ' == \\'number\\' || ' + ($dataType) + ' == \\'boolean\\') ' + ($coerced) + ' = \\'\\' + ' + ($data) + '; else if (' + ($data) + ' === null) ' + ($coerced) + ' = \\'\\'; ';\n\t } else if ($type == 'number' || $type == 'integer') {\n\t out += ' if (' + ($dataType) + ' == \\'boolean\\' || ' + ($data) + ' === null || (' + ($dataType) + ' == \\'string\\' && ' + ($data) + ' && ' + ($data) + ' == +' + ($data) + ' ';\n\t if ($type == 'integer') {\n\t out += ' && !(' + ($data) + ' % 1)';\n\t }\n\t out += ')) ' + ($coerced) + ' = +' + ($data) + '; ';\n\t } else if ($type == 'boolean') {\n\t out += ' if (' + ($data) + ' === \\'false\\' || ' + ($data) + ' === 0 || ' + ($data) + ' === null) ' + ($coerced) + ' = false; else if (' + ($data) + ' === \\'true\\' || ' + ($data) + ' === 1) ' + ($coerced) + ' = true; ';\n\t } else if ($type == 'null') {\n\t out += ' if (' + ($data) + ' === \\'\\' || ' + ($data) + ' === 0 || ' + ($data) + ' === false) ' + ($coerced) + ' = null; ';\n\t }\n\t }\n\t }\n\t out += ' ' + ($bracesCoercion) + ' if (' + ($coerced) + ' === undefined) { ';\n\t var $$outStack = $$outStack || [];\n\t $$outStack.push(out);\n\t out = ''; /* istanbul ignore else */\n\t if (it.createErrors !== false) {\n\t out += ' { keyword: \\'' + ($errorKeyword || 'type') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: \"' + ($errSchemaPath) + '\" , params: { type: \\'';\n\t if ($typeIsArray) {\n\t out += '' + ($typeSchema.join(\",\"));\n\t } else {\n\t out += '' + ($typeSchema);\n\t }\n\t out += '\\' } ';\n\t if (it.opts.messages !== false) {\n\t out += ' , message: \\'should be ';\n\t if ($typeIsArray) {\n\t out += '' + ($typeSchema.join(\",\"));\n\t } else {\n\t out += '' + ($typeSchema);\n\t }\n\t out += '\\' ';\n\t }\n\t if (it.opts.verbose) {\n\t out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n\t }\n\t out += ' } ';\n\t } else {\n\t out += ' {} ';\n\t }\n\t var __err = out;\n\t out = $$outStack.pop();\n\t if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */\n\t if (it.async) {\n\t out += ' throw new ValidationError([' + (__err) + ']); ';\n\t } else {\n\t out += ' validate.errors = [' + (__err) + ']; return false; ';\n\t }\n\t } else {\n\t out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n\t }\n\t out += ' } else { ';\n\t if ($dataLvl) {\n\t var $parentData = 'data' + (($dataLvl - 1) || ''),\n\t $dataProperty = it.dataPathArr[$dataLvl];\n\t out += ' ' + ($data) + ' = ' + ($parentData) + '[' + ($dataProperty) + '] = ' + ($coerced) + '; ';\n\t } else {\n\t out += ' data = ' + ($coerced) + '; if (parentData !== undefined) parentData[parentDataProperty] = ' + ($coerced) + '; ';\n\t }\n\t out += ' } } ';\n\t }\n\t }\n\t var arr2 = it.RULES;\n\t if (arr2) {\n\t var $rulesGroup, i2 = -1,\n\t l2 = arr2.length - 1;\n\t while (i2 < l2) {\n\t $rulesGroup = arr2[i2 += 1];\n\t if ($shouldUseGroup($rulesGroup)) {\n\t if ($rulesGroup.type) {\n\t out += ' if (' + (it.util.checkDataType($rulesGroup.type, $data)) + ') { ';\n\t }\n\t if (it.opts.useDefaults && !it.compositeRule) {\n\t if ($rulesGroup.type == 'object' && it.schema.properties) {\n\t var $schema = it.schema.properties,\n\t $schemaKeys = Object.keys($schema);\n\t var arr3 = $schemaKeys;\n\t if (arr3) {\n\t var $propertyKey, i3 = -1,\n\t l3 = arr3.length - 1;\n\t while (i3 < l3) {\n\t $propertyKey = arr3[i3 += 1];\n\t var $sch = $schema[$propertyKey];\n\t if ($sch.default !== undefined) {\n\t var $passData = $data + it.util.getProperty($propertyKey);\n\t out += ' if (' + ($passData) + ' === undefined) ' + ($passData) + ' = ';\n\t if (it.opts.useDefaults == 'clone') {\n\t out += ' ' + (JSON.stringify($sch.default)) + ' ';\n\t } else {\n\t out += ' ' + (it.useDefault($sch.default)) + ' ';\n\t }\n\t out += '; ';\n\t }\n\t }\n\t }\n\t } else if ($rulesGroup.type == 'array' && Array.isArray(it.schema.items)) {\n\t var arr4 = it.schema.items;\n\t if (arr4) {\n\t var $sch, $i = -1,\n\t l4 = arr4.length - 1;\n\t while ($i < l4) {\n\t $sch = arr4[$i += 1];\n\t if ($sch.default !== undefined) {\n\t var $passData = $data + '[' + $i + ']';\n\t out += ' if (' + ($passData) + ' === undefined) ' + ($passData) + ' = ';\n\t if (it.opts.useDefaults == 'clone') {\n\t out += ' ' + (JSON.stringify($sch.default)) + ' ';\n\t } else {\n\t out += ' ' + (it.useDefault($sch.default)) + ' ';\n\t }\n\t out += '; ';\n\t }\n\t }\n\t }\n\t }\n\t }\n\t var arr5 = $rulesGroup.rules;\n\t if (arr5) {\n\t var $rule, i5 = -1,\n\t l5 = arr5.length - 1;\n\t while (i5 < l5) {\n\t $rule = arr5[i5 += 1];\n\t if ($shouldUseRule($rule)) {\n\t if ($rule.custom) {\n\t var $schema = it.schema[$rule.keyword],\n\t $ruleValidate = it.useCustomRule($rule, $schema, it.schema, it),\n\t $ruleErrs = $ruleValidate.code + '.errors',\n\t $schemaPath = it.schemaPath + '.' + $rule.keyword,\n\t $errSchemaPath = it.errSchemaPath + '/' + $rule.keyword,\n\t $errs = 'errs' + $lvl,\n\t $i = 'i' + $lvl,\n\t $ruleErr = 'ruleErr' + $lvl,\n\t $rDef = $rule.definition,\n\t $asyncKeyword = $rDef.async,\n\t $inline = $rDef.inline,\n\t $macro = $rDef.macro;\n\t if ($asyncKeyword && !it.async) throw new Error('async keyword in sync schema');\n\t if (!($inline || $macro)) {\n\t out += '' + ($ruleErrs) + ' = null;';\n\t }\n\t out += 'var ' + ($errs) + ' = errors;var valid' + ($lvl) + ';';\n\t if ($inline && $rDef.statements) {\n\t out += ' ' + ($ruleValidate.validate);\n\t } else if ($macro) {\n\t var $it = it.util.copy(it);\n\t $it.level++;\n\t $it.schema = $ruleValidate.validate;\n\t $it.schemaPath = '';\n\t var $wasComposite = it.compositeRule;\n\t it.compositeRule = $it.compositeRule = true;\n\t var $code = it.validate($it).replace(/validate\\.schema/g, $ruleValidate.code);\n\t it.compositeRule = $it.compositeRule = $wasComposite;\n\t out += ' ' + ($code);\n\t } else if ($rDef.compile || $rDef.validate) {\n\t var $$outStack = $$outStack || [];\n\t $$outStack.push(out);\n\t out = '';\n\t out += ' ' + ($ruleValidate.code) + '.call( ';\n\t if (it.opts.passContext) {\n\t out += 'this';\n\t } else {\n\t out += 'self';\n\t }\n\t var $validateArgs = $ruleValidate.validate.length;\n\t if ($rDef.compile || $rDef.schema === false) {\n\t out += ' , ' + ($data) + ' ';\n\t } else {\n\t out += ' , validate.schema' + ($schemaPath) + ' , ' + ($data) + ' , validate.schema' + (it.schemaPath) + ' ';\n\t }\n\t out += ' , (dataPath || \\'\\')';\n\t if (it.errorPath != '\"\"') {\n\t out += ' + ' + (it.errorPath);\n\t }\n\t if ($dataLvl) {\n\t out += ' , data' + (($dataLvl - 1) || '') + ' , ' + (it.dataPathArr[$dataLvl]) + ' ';\n\t } else {\n\t out += ' , parentData , parentDataProperty ';\n\t }\n\t out += ' ) ';\n\t var def_callRuleValidate = out;\n\t out = $$outStack.pop();\n\t if ($rDef.errors !== false) {\n\t if ($asyncKeyword) {\n\t $ruleErrs = 'customErrors' + $lvl;\n\t out += ' var ' + ($ruleErrs) + ' = null; try { valid' + ($lvl) + ' = ' + (it.yieldAwait) + (def_callRuleValidate) + '; } catch (e) { valid' + ($lvl) + ' = false; if (e instanceof ValidationError) ' + ($ruleErrs) + ' = e.errors; else throw e; } ';\n\t } else {\n\t out += ' ' + ($ruleValidate.code) + '.errors = null; ';\n\t }\n\t }\n\t }\n\t out += 'if (! ';\n\t if ($inline) {\n\t if ($rDef.statements) {\n\t out += ' valid' + ($lvl) + ' ';\n\t } else {\n\t out += ' (' + ($ruleValidate.validate) + ') ';\n\t }\n\t } else if ($macro) {\n\t out += ' valid' + ($it.level) + ' ';\n\t } else {\n\t if ($asyncKeyword) {\n\t if ($rDef.errors === false) {\n\t out += ' (' + (it.yieldAwait) + (def_callRuleValidate) + ') ';\n\t } else {\n\t out += ' valid' + ($lvl) + ' ';\n\t }\n\t } else {\n\t out += ' ' + (def_callRuleValidate) + ' ';\n\t }\n\t }\n\t out += ') { ';\n\t $errorKeyword = $rule.keyword;\n\t var $$outStack = $$outStack || [];\n\t $$outStack.push(out);\n\t out = '';\n\t var $$outStack = $$outStack || [];\n\t $$outStack.push(out);\n\t out = ''; /* istanbul ignore else */\n\t if (it.createErrors !== false) {\n\t out += ' { keyword: \\'' + ($errorKeyword || 'custom') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: \"' + ($errSchemaPath) + '\" , params: { keyword: \\'' + ($rule.keyword) + '\\' } ';\n\t if (it.opts.messages !== false) {\n\t out += ' , message: \\'should pass \"' + ($rule.keyword) + '\" keyword validation\\' ';\n\t }\n\t if (it.opts.verbose) {\n\t out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n\t }\n\t out += ' } ';\n\t } else {\n\t out += ' {} ';\n\t }\n\t var __err = out;\n\t out = $$outStack.pop();\n\t if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */\n\t if (it.async) {\n\t out += ' throw new ValidationError([' + (__err) + ']); ';\n\t } else {\n\t out += ' validate.errors = [' + (__err) + ']; return false; ';\n\t }\n\t } else {\n\t out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n\t }\n\t var def_customError = out;\n\t out = $$outStack.pop();\n\t if ($inline) {\n\t if ($rDef.errors) {\n\t if ($rDef.errors != 'full') {\n\t out += ' for (var ' + ($i) + '=' + ($errs) + '; ' + ($i) + '= 0x80 (not a basic code point)',\n\t\t\t'invalid-input': 'Invalid input'\n\t\t},\n\t\n\t\t/** Convenience shortcuts */\n\t\tbaseMinusTMin = base - tMin,\n\t\tfloor = Math.floor,\n\t\tstringFromCharCode = String.fromCharCode,\n\t\n\t\t/** Temporary variable */\n\t\tkey;\n\t\n\t\t/*--------------------------------------------------------------------------*/\n\t\n\t\t/**\n\t\t * A generic error utility function.\n\t\t * @private\n\t\t * @param {String} type The error type.\n\t\t * @returns {Error} Throws a `RangeError` with the applicable error message.\n\t\t */\n\t\tfunction error(type) {\n\t\t\tthrow new RangeError(errors[type]);\n\t\t}\n\t\n\t\t/**\n\t\t * A generic `Array#map` utility function.\n\t\t * @private\n\t\t * @param {Array} array The array to iterate over.\n\t\t * @param {Function} callback The function that gets called for every array\n\t\t * item.\n\t\t * @returns {Array} A new array of values returned by the callback function.\n\t\t */\n\t\tfunction map(array, fn) {\n\t\t\tvar length = array.length;\n\t\t\tvar result = [];\n\t\t\twhile (length--) {\n\t\t\t\tresult[length] = fn(array[length]);\n\t\t\t}\n\t\t\treturn result;\n\t\t}\n\t\n\t\t/**\n\t\t * A simple `Array#map`-like wrapper to work with domain name strings or email\n\t\t * addresses.\n\t\t * @private\n\t\t * @param {String} domain The domain name or email address.\n\t\t * @param {Function} callback The function that gets called for every\n\t\t * character.\n\t\t * @returns {Array} A new string of characters returned by the callback\n\t\t * function.\n\t\t */\n\t\tfunction mapDomain(string, fn) {\n\t\t\tvar parts = string.split('@');\n\t\t\tvar result = '';\n\t\t\tif (parts.length > 1) {\n\t\t\t\t// In email addresses, only the domain name should be punycoded. Leave\n\t\t\t\t// the local part (i.e. everything up to `@`) intact.\n\t\t\t\tresult = parts[0] + '@';\n\t\t\t\tstring = parts[1];\n\t\t\t}\n\t\t\t// Avoid `split(regex)` for IE8 compatibility. See #17.\n\t\t\tstring = string.replace(regexSeparators, '\\x2E');\n\t\t\tvar labels = string.split('.');\n\t\t\tvar encoded = map(labels, fn).join('.');\n\t\t\treturn result + encoded;\n\t\t}\n\t\n\t\t/**\n\t\t * Creates an array containing the numeric code points of each Unicode\n\t\t * character in the string. While JavaScript uses UCS-2 internally,\n\t\t * this function will convert a pair of surrogate halves (each of which\n\t\t * UCS-2 exposes as separate characters) into a single code point,\n\t\t * matching UTF-16.\n\t\t * @see `punycode.ucs2.encode`\n\t\t * @see \n\t\t * @memberOf punycode.ucs2\n\t\t * @name decode\n\t\t * @param {String} string The Unicode input string (UCS-2).\n\t\t * @returns {Array} The new array of code points.\n\t\t */\n\t\tfunction ucs2decode(string) {\n\t\t\tvar output = [],\n\t\t\t counter = 0,\n\t\t\t length = string.length,\n\t\t\t value,\n\t\t\t extra;\n\t\t\twhile (counter < length) {\n\t\t\t\tvalue = string.charCodeAt(counter++);\n\t\t\t\tif (value >= 0xD800 && value <= 0xDBFF && counter < length) {\n\t\t\t\t\t// high surrogate, and there is a next character\n\t\t\t\t\textra = string.charCodeAt(counter++);\n\t\t\t\t\tif ((extra & 0xFC00) == 0xDC00) { // low surrogate\n\t\t\t\t\t\toutput.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// unmatched surrogate; only append this code unit, in case the next\n\t\t\t\t\t\t// code unit is the high surrogate of a surrogate pair\n\t\t\t\t\t\toutput.push(value);\n\t\t\t\t\t\tcounter--;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\toutput.push(value);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn output;\n\t\t}\n\t\n\t\t/**\n\t\t * Creates a string based on an array of numeric code points.\n\t\t * @see `punycode.ucs2.decode`\n\t\t * @memberOf punycode.ucs2\n\t\t * @name encode\n\t\t * @param {Array} codePoints The array of numeric code points.\n\t\t * @returns {String} The new Unicode string (UCS-2).\n\t\t */\n\t\tfunction ucs2encode(array) {\n\t\t\treturn map(array, function(value) {\n\t\t\t\tvar output = '';\n\t\t\t\tif (value > 0xFFFF) {\n\t\t\t\t\tvalue -= 0x10000;\n\t\t\t\t\toutput += stringFromCharCode(value >>> 10 & 0x3FF | 0xD800);\n\t\t\t\t\tvalue = 0xDC00 | value & 0x3FF;\n\t\t\t\t}\n\t\t\t\toutput += stringFromCharCode(value);\n\t\t\t\treturn output;\n\t\t\t}).join('');\n\t\t}\n\t\n\t\t/**\n\t\t * Converts a basic code point into a digit/integer.\n\t\t * @see `digitToBasic()`\n\t\t * @private\n\t\t * @param {Number} codePoint The basic numeric code point value.\n\t\t * @returns {Number} The numeric value of a basic code point (for use in\n\t\t * representing integers) in the range `0` to `base - 1`, or `base` if\n\t\t * the code point does not represent a value.\n\t\t */\n\t\tfunction basicToDigit(codePoint) {\n\t\t\tif (codePoint - 48 < 10) {\n\t\t\t\treturn codePoint - 22;\n\t\t\t}\n\t\t\tif (codePoint - 65 < 26) {\n\t\t\t\treturn codePoint - 65;\n\t\t\t}\n\t\t\tif (codePoint - 97 < 26) {\n\t\t\t\treturn codePoint - 97;\n\t\t\t}\n\t\t\treturn base;\n\t\t}\n\t\n\t\t/**\n\t\t * Converts a digit/integer into a basic code point.\n\t\t * @see `basicToDigit()`\n\t\t * @private\n\t\t * @param {Number} digit The numeric value of a basic code point.\n\t\t * @returns {Number} The basic code point whose value (when used for\n\t\t * representing integers) is `digit`, which needs to be in the range\n\t\t * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is\n\t\t * used; else, the lowercase form is used. The behavior is undefined\n\t\t * if `flag` is non-zero and `digit` has no uppercase form.\n\t\t */\n\t\tfunction digitToBasic(digit, flag) {\n\t\t\t// 0..25 map to ASCII a..z or A..Z\n\t\t\t// 26..35 map to ASCII 0..9\n\t\t\treturn digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5);\n\t\t}\n\t\n\t\t/**\n\t\t * Bias adaptation function as per section 3.4 of RFC 3492.\n\t\t * https://tools.ietf.org/html/rfc3492#section-3.4\n\t\t * @private\n\t\t */\n\t\tfunction adapt(delta, numPoints, firstTime) {\n\t\t\tvar k = 0;\n\t\t\tdelta = firstTime ? floor(delta / damp) : delta >> 1;\n\t\t\tdelta += floor(delta / numPoints);\n\t\t\tfor (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) {\n\t\t\t\tdelta = floor(delta / baseMinusTMin);\n\t\t\t}\n\t\t\treturn floor(k + (baseMinusTMin + 1) * delta / (delta + skew));\n\t\t}\n\t\n\t\t/**\n\t\t * Converts a Punycode string of ASCII-only symbols to a string of Unicode\n\t\t * symbols.\n\t\t * @memberOf punycode\n\t\t * @param {String} input The Punycode string of ASCII-only symbols.\n\t\t * @returns {String} The resulting string of Unicode symbols.\n\t\t */\n\t\tfunction decode(input) {\n\t\t\t// Don't use UCS-2\n\t\t\tvar output = [],\n\t\t\t inputLength = input.length,\n\t\t\t out,\n\t\t\t i = 0,\n\t\t\t n = initialN,\n\t\t\t bias = initialBias,\n\t\t\t basic,\n\t\t\t j,\n\t\t\t index,\n\t\t\t oldi,\n\t\t\t w,\n\t\t\t k,\n\t\t\t digit,\n\t\t\t t,\n\t\t\t /** Cached calculation results */\n\t\t\t baseMinusT;\n\t\n\t\t\t// Handle the basic code points: let `basic` be the number of input code\n\t\t\t// points before the last delimiter, or `0` if there is none, then copy\n\t\t\t// the first basic code points to the output.\n\t\n\t\t\tbasic = input.lastIndexOf(delimiter);\n\t\t\tif (basic < 0) {\n\t\t\t\tbasic = 0;\n\t\t\t}\n\t\n\t\t\tfor (j = 0; j < basic; ++j) {\n\t\t\t\t// if it's not a basic code point\n\t\t\t\tif (input.charCodeAt(j) >= 0x80) {\n\t\t\t\t\terror('not-basic');\n\t\t\t\t}\n\t\t\t\toutput.push(input.charCodeAt(j));\n\t\t\t}\n\t\n\t\t\t// Main decoding loop: start just after the last delimiter if any basic code\n\t\t\t// points were copied; start at the beginning otherwise.\n\t\n\t\t\tfor (index = basic > 0 ? basic + 1 : 0; index < inputLength; /* no final expression */) {\n\t\n\t\t\t\t// `index` is the index of the next character to be consumed.\n\t\t\t\t// Decode a generalized variable-length integer into `delta`,\n\t\t\t\t// which gets added to `i`. The overflow checking is easier\n\t\t\t\t// if we increase `i` as we go, then subtract off its starting\n\t\t\t\t// value at the end to obtain `delta`.\n\t\t\t\tfor (oldi = i, w = 1, k = base; /* no condition */; k += base) {\n\t\n\t\t\t\t\tif (index >= inputLength) {\n\t\t\t\t\t\terror('invalid-input');\n\t\t\t\t\t}\n\t\n\t\t\t\t\tdigit = basicToDigit(input.charCodeAt(index++));\n\t\n\t\t\t\t\tif (digit >= base || digit > floor((maxInt - i) / w)) {\n\t\t\t\t\t\terror('overflow');\n\t\t\t\t\t}\n\t\n\t\t\t\t\ti += digit * w;\n\t\t\t\t\tt = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);\n\t\n\t\t\t\t\tif (digit < t) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\n\t\t\t\t\tbaseMinusT = base - t;\n\t\t\t\t\tif (w > floor(maxInt / baseMinusT)) {\n\t\t\t\t\t\terror('overflow');\n\t\t\t\t\t}\n\t\n\t\t\t\t\tw *= baseMinusT;\n\t\n\t\t\t\t}\n\t\n\t\t\t\tout = output.length + 1;\n\t\t\t\tbias = adapt(i - oldi, out, oldi == 0);\n\t\n\t\t\t\t// `i` was supposed to wrap around from `out` to `0`,\n\t\t\t\t// incrementing `n` each time, so we'll fix that now:\n\t\t\t\tif (floor(i / out) > maxInt - n) {\n\t\t\t\t\terror('overflow');\n\t\t\t\t}\n\t\n\t\t\t\tn += floor(i / out);\n\t\t\t\ti %= out;\n\t\n\t\t\t\t// Insert `n` at position `i` of the output\n\t\t\t\toutput.splice(i++, 0, n);\n\t\n\t\t\t}\n\t\n\t\t\treturn ucs2encode(output);\n\t\t}\n\t\n\t\t/**\n\t\t * Converts a string of Unicode symbols (e.g. a domain name label) to a\n\t\t * Punycode string of ASCII-only symbols.\n\t\t * @memberOf punycode\n\t\t * @param {String} input The string of Unicode symbols.\n\t\t * @returns {String} The resulting Punycode string of ASCII-only symbols.\n\t\t */\n\t\tfunction encode(input) {\n\t\t\tvar n,\n\t\t\t delta,\n\t\t\t handledCPCount,\n\t\t\t basicLength,\n\t\t\t bias,\n\t\t\t j,\n\t\t\t m,\n\t\t\t q,\n\t\t\t k,\n\t\t\t t,\n\t\t\t currentValue,\n\t\t\t output = [],\n\t\t\t /** `inputLength` will hold the number of code points in `input`. */\n\t\t\t inputLength,\n\t\t\t /** Cached calculation results */\n\t\t\t handledCPCountPlusOne,\n\t\t\t baseMinusT,\n\t\t\t qMinusT;\n\t\n\t\t\t// Convert the input in UCS-2 to Unicode\n\t\t\tinput = ucs2decode(input);\n\t\n\t\t\t// Cache the length\n\t\t\tinputLength = input.length;\n\t\n\t\t\t// Initialize the state\n\t\t\tn = initialN;\n\t\t\tdelta = 0;\n\t\t\tbias = initialBias;\n\t\n\t\t\t// Handle the basic code points\n\t\t\tfor (j = 0; j < inputLength; ++j) {\n\t\t\t\tcurrentValue = input[j];\n\t\t\t\tif (currentValue < 0x80) {\n\t\t\t\t\toutput.push(stringFromCharCode(currentValue));\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t\thandledCPCount = basicLength = output.length;\n\t\n\t\t\t// `handledCPCount` is the number of code points that have been handled;\n\t\t\t// `basicLength` is the number of basic code points.\n\t\n\t\t\t// Finish the basic string - if it is not empty - with a delimiter\n\t\t\tif (basicLength) {\n\t\t\t\toutput.push(delimiter);\n\t\t\t}\n\t\n\t\t\t// Main encoding loop:\n\t\t\twhile (handledCPCount < inputLength) {\n\t\n\t\t\t\t// All non-basic code points < n have been handled already. Find the next\n\t\t\t\t// larger one:\n\t\t\t\tfor (m = maxInt, j = 0; j < inputLength; ++j) {\n\t\t\t\t\tcurrentValue = input[j];\n\t\t\t\t\tif (currentValue >= n && currentValue < m) {\n\t\t\t\t\t\tm = currentValue;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\n\t\t\t\t// Increase `delta` enough to advance the decoder's state to ,\n\t\t\t\t// but guard against overflow\n\t\t\t\thandledCPCountPlusOne = handledCPCount + 1;\n\t\t\t\tif (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) {\n\t\t\t\t\terror('overflow');\n\t\t\t\t}\n\t\n\t\t\t\tdelta += (m - n) * handledCPCountPlusOne;\n\t\t\t\tn = m;\n\t\n\t\t\t\tfor (j = 0; j < inputLength; ++j) {\n\t\t\t\t\tcurrentValue = input[j];\n\t\n\t\t\t\t\tif (currentValue < n && ++delta > maxInt) {\n\t\t\t\t\t\terror('overflow');\n\t\t\t\t\t}\n\t\n\t\t\t\t\tif (currentValue == n) {\n\t\t\t\t\t\t// Represent delta as a generalized variable-length integer\n\t\t\t\t\t\tfor (q = delta, k = base; /* no condition */; k += base) {\n\t\t\t\t\t\t\tt = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);\n\t\t\t\t\t\t\tif (q < t) {\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tqMinusT = q - t;\n\t\t\t\t\t\t\tbaseMinusT = base - t;\n\t\t\t\t\t\t\toutput.push(\n\t\t\t\t\t\t\t\tstringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0))\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\tq = floor(qMinusT / baseMinusT);\n\t\t\t\t\t\t}\n\t\n\t\t\t\t\t\toutput.push(stringFromCharCode(digitToBasic(q, 0)));\n\t\t\t\t\t\tbias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength);\n\t\t\t\t\t\tdelta = 0;\n\t\t\t\t\t\t++handledCPCount;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\n\t\t\t\t++delta;\n\t\t\t\t++n;\n\t\n\t\t\t}\n\t\t\treturn output.join('');\n\t\t}\n\t\n\t\t/**\n\t\t * Converts a Punycode string representing a domain name or an email address\n\t\t * to Unicode. Only the Punycoded parts of the input will be converted, i.e.\n\t\t * it doesn't matter if you call it on a string that has already been\n\t\t * converted to Unicode.\n\t\t * @memberOf punycode\n\t\t * @param {String} input The Punycoded domain name or email address to\n\t\t * convert to Unicode.\n\t\t * @returns {String} The Unicode representation of the given Punycode\n\t\t * string.\n\t\t */\n\t\tfunction toUnicode(input) {\n\t\t\treturn mapDomain(input, function(string) {\n\t\t\t\treturn regexPunycode.test(string)\n\t\t\t\t\t? decode(string.slice(4).toLowerCase())\n\t\t\t\t\t: string;\n\t\t\t});\n\t\t}\n\t\n\t\t/**\n\t\t * Converts a Unicode string representing a domain name or an email address to\n\t\t * Punycode. Only the non-ASCII parts of the domain name will be converted,\n\t\t * i.e. it doesn't matter if you call it with a domain that's already in\n\t\t * ASCII.\n\t\t * @memberOf punycode\n\t\t * @param {String} input The domain name or email address to convert, as a\n\t\t * Unicode string.\n\t\t * @returns {String} The Punycode representation of the given domain name or\n\t\t * email address.\n\t\t */\n\t\tfunction toASCII(input) {\n\t\t\treturn mapDomain(input, function(string) {\n\t\t\t\treturn regexNonASCII.test(string)\n\t\t\t\t\t? 'xn--' + encode(string)\n\t\t\t\t\t: string;\n\t\t\t});\n\t\t}\n\t\n\t\t/*--------------------------------------------------------------------------*/\n\t\n\t\t/** Define the public API */\n\t\tpunycode = {\n\t\t\t/**\n\t\t\t * A string representing the current Punycode.js version number.\n\t\t\t * @memberOf punycode\n\t\t\t * @type String\n\t\t\t */\n\t\t\t'version': '1.3.2',\n\t\t\t/**\n\t\t\t * An object of methods to convert from JavaScript's internal character\n\t\t\t * representation (UCS-2) to Unicode code points, and back.\n\t\t\t * @see \n\t\t\t * @memberOf punycode\n\t\t\t * @type Object\n\t\t\t */\n\t\t\t'ucs2': {\n\t\t\t\t'decode': ucs2decode,\n\t\t\t\t'encode': ucs2encode\n\t\t\t},\n\t\t\t'decode': decode,\n\t\t\t'encode': encode,\n\t\t\t'toASCII': toASCII,\n\t\t\t'toUnicode': toUnicode\n\t\t};\n\t\n\t\t/** Expose `punycode` */\n\t\t// Some AMD build optimizers, like r.js, check for specific condition patterns\n\t\t// like the following:\n\t\tif (\n\t\t\ttypeof define == 'function' &&\n\t\t\ttypeof define.amd == 'object' &&\n\t\t\tdefine.amd\n\t\t) {\n\t\t\tdefine('punycode', function() {\n\t\t\t\treturn punycode;\n\t\t\t});\n\t\t} else if (freeExports && freeModule) {\n\t\t\tif (module.exports == freeExports) {\n\t\t\t\t// in Node.js, io.js, or RingoJS v0.8.0+\n\t\t\t\tfreeModule.exports = punycode;\n\t\t\t} else {\n\t\t\t\t// in Narwhal or RingoJS v0.7.0-\n\t\t\t\tfor (key in punycode) {\n\t\t\t\t\tpunycode.hasOwnProperty(key) && (freeExports[key] = punycode[key]);\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\t// in Rhino or a web browser\n\t\t\troot.punycode = punycode;\n\t\t}\n\t\n\t}(this));\n\t\n\t}).call(this,typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : {})\n\t},{}],40:[function(require,module,exports){\n\t// Copyright Joyent, Inc. and other Node contributors.\n\t//\n\t// Permission is hereby granted, free of charge, to any person obtaining a\n\t// copy of this software and associated documentation files (the\n\t// \"Software\"), to deal in the Software without restriction, including\n\t// without limitation the rights to use, copy, modify, merge, publish,\n\t// distribute, sublicense, and/or sell copies of the Software, and to permit\n\t// persons to whom the Software is furnished to do so, subject to the\n\t// following conditions:\n\t//\n\t// The above copyright notice and this permission notice shall be included\n\t// in all copies or substantial portions of the Software.\n\t//\n\t// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n\t// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n\t// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n\t// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n\t// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n\t// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n\t// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\t\n\t'use strict';\n\t\n\t// If obj.hasOwnProperty has been overridden, then calling\n\t// obj.hasOwnProperty(prop) will break.\n\t// See: https://github.com/joyent/node/issues/1707\n\tfunction hasOwnProperty(obj, prop) {\n\t return Object.prototype.hasOwnProperty.call(obj, prop);\n\t}\n\t\n\tmodule.exports = function(qs, sep, eq, options) {\n\t sep = sep || '&';\n\t eq = eq || '=';\n\t var obj = {};\n\t\n\t if (typeof qs !== 'string' || qs.length === 0) {\n\t return obj;\n\t }\n\t\n\t var regexp = /\\+/g;\n\t qs = qs.split(sep);\n\t\n\t var maxKeys = 1000;\n\t if (options && typeof options.maxKeys === 'number') {\n\t maxKeys = options.maxKeys;\n\t }\n\t\n\t var len = qs.length;\n\t // maxKeys <= 0 means that we should not limit keys count\n\t if (maxKeys > 0 && len > maxKeys) {\n\t len = maxKeys;\n\t }\n\t\n\t for (var i = 0; i < len; ++i) {\n\t var x = qs[i].replace(regexp, '%20'),\n\t idx = x.indexOf(eq),\n\t kstr, vstr, k, v;\n\t\n\t if (idx >= 0) {\n\t kstr = x.substr(0, idx);\n\t vstr = x.substr(idx + 1);\n\t } else {\n\t kstr = x;\n\t vstr = '';\n\t }\n\t\n\t k = decodeURIComponent(kstr);\n\t v = decodeURIComponent(vstr);\n\t\n\t if (!hasOwnProperty(obj, k)) {\n\t obj[k] = v;\n\t } else if (isArray(obj[k])) {\n\t obj[k].push(v);\n\t } else {\n\t obj[k] = [obj[k], v];\n\t }\n\t }\n\t\n\t return obj;\n\t};\n\t\n\tvar isArray = Array.isArray || function (xs) {\n\t return Object.prototype.toString.call(xs) === '[object Array]';\n\t};\n\t\n\t},{}],41:[function(require,module,exports){\n\t// Copyright Joyent, Inc. and other Node contributors.\n\t//\n\t// Permission is hereby granted, free of charge, to any person obtaining a\n\t// copy of this software and associated documentation files (the\n\t// \"Software\"), to deal in the Software without restriction, including\n\t// without limitation the rights to use, copy, modify, merge, publish,\n\t// distribute, sublicense, and/or sell copies of the Software, and to permit\n\t// persons to whom the Software is furnished to do so, subject to the\n\t// following conditions:\n\t//\n\t// The above copyright notice and this permission notice shall be included\n\t// in all copies or substantial portions of the Software.\n\t//\n\t// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n\t// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n\t// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n\t// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n\t// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n\t// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n\t// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\t\n\t'use strict';\n\t\n\tvar stringifyPrimitive = function(v) {\n\t switch (typeof v) {\n\t case 'string':\n\t return v;\n\t\n\t case 'boolean':\n\t return v ? 'true' : 'false';\n\t\n\t case 'number':\n\t return isFinite(v) ? v : '';\n\t\n\t default:\n\t return '';\n\t }\n\t};\n\t\n\tmodule.exports = function(obj, sep, eq, name) {\n\t sep = sep || '&';\n\t eq = eq || '=';\n\t if (obj === null) {\n\t obj = undefined;\n\t }\n\t\n\t if (typeof obj === 'object') {\n\t return map(objectKeys(obj), function(k) {\n\t var ks = encodeURIComponent(stringifyPrimitive(k)) + eq;\n\t if (isArray(obj[k])) {\n\t return map(obj[k], function(v) {\n\t return ks + encodeURIComponent(stringifyPrimitive(v));\n\t }).join(sep);\n\t } else {\n\t return ks + encodeURIComponent(stringifyPrimitive(obj[k]));\n\t }\n\t }).join(sep);\n\t\n\t }\n\t\n\t if (!name) return '';\n\t return encodeURIComponent(stringifyPrimitive(name)) + eq +\n\t encodeURIComponent(stringifyPrimitive(obj));\n\t};\n\t\n\tvar isArray = Array.isArray || function (xs) {\n\t return Object.prototype.toString.call(xs) === '[object Array]';\n\t};\n\t\n\tfunction map (xs, f) {\n\t if (xs.map) return xs.map(f);\n\t var res = [];\n\t for (var i = 0; i < xs.length; i++) {\n\t res.push(f(xs[i], i));\n\t }\n\t return res;\n\t}\n\t\n\tvar objectKeys = Object.keys || function (obj) {\n\t var res = [];\n\t for (var key in obj) {\n\t if (Object.prototype.hasOwnProperty.call(obj, key)) res.push(key);\n\t }\n\t return res;\n\t};\n\t\n\t},{}],42:[function(require,module,exports){\n\t'use strict';\n\t\n\texports.decode = exports.parse = require('./decode');\n\texports.encode = exports.stringify = require('./encode');\n\t\n\t},{\"./decode\":40,\"./encode\":41}],43:[function(require,module,exports){\n\t// Copyright Joyent, Inc. and other Node contributors.\n\t//\n\t// Permission is hereby granted, free of charge, to any person obtaining a\n\t// copy of this software and associated documentation files (the\n\t// \"Software\"), to deal in the Software without restriction, including\n\t// without limitation the rights to use, copy, modify, merge, publish,\n\t// distribute, sublicense, and/or sell copies of the Software, and to permit\n\t// persons to whom the Software is furnished to do so, subject to the\n\t// following conditions:\n\t//\n\t// The above copyright notice and this permission notice shall be included\n\t// in all copies or substantial portions of the Software.\n\t//\n\t// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n\t// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n\t// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n\t// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n\t// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n\t// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n\t// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\t\n\t'use strict';\n\t\n\tvar punycode = require('punycode');\n\tvar util = require('./util');\n\t\n\texports.parse = urlParse;\n\texports.resolve = urlResolve;\n\texports.resolveObject = urlResolveObject;\n\texports.format = urlFormat;\n\t\n\texports.Url = Url;\n\t\n\tfunction Url() {\n\t this.protocol = null;\n\t this.slashes = null;\n\t this.auth = null;\n\t this.host = null;\n\t this.port = null;\n\t this.hostname = null;\n\t this.hash = null;\n\t this.search = null;\n\t this.query = null;\n\t this.pathname = null;\n\t this.path = null;\n\t this.href = null;\n\t}\n\t\n\t// Reference: RFC 3986, RFC 1808, RFC 2396\n\t\n\t// define these here so at least they only have to be\n\t// compiled once on the first module load.\n\tvar protocolPattern = /^([a-z0-9.+-]+:)/i,\n\t portPattern = /:[0-9]*$/,\n\t\n\t // Special case for a simple path URL\n\t simplePathPattern = /^(\\/\\/?(?!\\/)[^\\?\\s]*)(\\?[^\\s]*)?$/,\n\t\n\t // RFC 2396: characters reserved for delimiting URLs.\n\t // We actually just auto-escape these.\n\t delims = ['<', '>', '\"', '`', ' ', '\\r', '\\n', '\\t'],\n\t\n\t // RFC 2396: characters not allowed for various reasons.\n\t unwise = ['{', '}', '|', '\\\\', '^', '`'].concat(delims),\n\t\n\t // Allowed by RFCs, but cause of XSS attacks. Always escape these.\n\t autoEscape = ['\\''].concat(unwise),\n\t // Characters that are never ever allowed in a hostname.\n\t // Note that any invalid chars are also handled, but these\n\t // are the ones that are *expected* to be seen, so we fast-path\n\t // them.\n\t nonHostChars = ['%', '/', '?', ';', '#'].concat(autoEscape),\n\t hostEndingChars = ['/', '?', '#'],\n\t hostnameMaxLen = 255,\n\t hostnamePartPattern = /^[+a-z0-9A-Z_-]{0,63}$/,\n\t hostnamePartStart = /^([+a-z0-9A-Z_-]{0,63})(.*)$/,\n\t // protocols that can allow \"unsafe\" and \"unwise\" chars.\n\t unsafeProtocol = {\n\t 'javascript': true,\n\t 'javascript:': true\n\t },\n\t // protocols that never have a hostname.\n\t hostlessProtocol = {\n\t 'javascript': true,\n\t 'javascript:': true\n\t },\n\t // protocols that always contain a // bit.\n\t slashedProtocol = {\n\t 'http': true,\n\t 'https': true,\n\t 'ftp': true,\n\t 'gopher': true,\n\t 'file': true,\n\t 'http:': true,\n\t 'https:': true,\n\t 'ftp:': true,\n\t 'gopher:': true,\n\t 'file:': true\n\t },\n\t querystring = require('querystring');\n\t\n\tfunction urlParse(url, parseQueryString, slashesDenoteHost) {\n\t if (url && util.isObject(url) && url instanceof Url) return url;\n\t\n\t var u = new Url;\n\t u.parse(url, parseQueryString, slashesDenoteHost);\n\t return u;\n\t}\n\t\n\tUrl.prototype.parse = function(url, parseQueryString, slashesDenoteHost) {\n\t if (!util.isString(url)) {\n\t throw new TypeError(\"Parameter 'url' must be a string, not \" + typeof url);\n\t }\n\t\n\t // Copy chrome, IE, opera backslash-handling behavior.\n\t // Back slashes before the query string get converted to forward slashes\n\t // See: https://code.google.com/p/chromium/issues/detail?id=25916\n\t var queryIndex = url.indexOf('?'),\n\t splitter =\n\t (queryIndex !== -1 && queryIndex < url.indexOf('#')) ? '?' : '#',\n\t uSplit = url.split(splitter),\n\t slashRegex = /\\\\/g;\n\t uSplit[0] = uSplit[0].replace(slashRegex, '/');\n\t url = uSplit.join(splitter);\n\t\n\t var rest = url;\n\t\n\t // trim before proceeding.\n\t // This is to support parse stuff like \" http://foo.com \\n\"\n\t rest = rest.trim();\n\t\n\t if (!slashesDenoteHost && url.split('#').length === 1) {\n\t // Try fast path regexp\n\t var simplePath = simplePathPattern.exec(rest);\n\t if (simplePath) {\n\t this.path = rest;\n\t this.href = rest;\n\t this.pathname = simplePath[1];\n\t if (simplePath[2]) {\n\t this.search = simplePath[2];\n\t if (parseQueryString) {\n\t this.query = querystring.parse(this.search.substr(1));\n\t } else {\n\t this.query = this.search.substr(1);\n\t }\n\t } else if (parseQueryString) {\n\t this.search = '';\n\t this.query = {};\n\t }\n\t return this;\n\t }\n\t }\n\t\n\t var proto = protocolPattern.exec(rest);\n\t if (proto) {\n\t proto = proto[0];\n\t var lowerProto = proto.toLowerCase();\n\t this.protocol = lowerProto;\n\t rest = rest.substr(proto.length);\n\t }\n\t\n\t // figure out if it's got a host\n\t // user@server is *always* interpreted as a hostname, and url\n\t // resolution will treat //foo/bar as host=foo,path=bar because that's\n\t // how the browser resolves relative URLs.\n\t if (slashesDenoteHost || proto || rest.match(/^\\/\\/[^@\\/]+@[^@\\/]+/)) {\n\t var slashes = rest.substr(0, 2) === '//';\n\t if (slashes && !(proto && hostlessProtocol[proto])) {\n\t rest = rest.substr(2);\n\t this.slashes = true;\n\t }\n\t }\n\t\n\t if (!hostlessProtocol[proto] &&\n\t (slashes || (proto && !slashedProtocol[proto]))) {\n\t\n\t // there's a hostname.\n\t // the first instance of /, ?, ;, or # ends the host.\n\t //\n\t // If there is an @ in the hostname, then non-host chars *are* allowed\n\t // to the left of the last @ sign, unless some host-ending character\n\t // comes *before* the @-sign.\n\t // URLs are obnoxious.\n\t //\n\t // ex:\n\t // http://a@b@c/ => user:a@b host:c\n\t // http://a@b?@c => user:a host:c path:/?@c\n\t\n\t // v0.12 TODO(isaacs): This is not quite how Chrome does things.\n\t // Review our test case against browsers more comprehensively.\n\t\n\t // find the first instance of any hostEndingChars\n\t var hostEnd = -1;\n\t for (var i = 0; i < hostEndingChars.length; i++) {\n\t var hec = rest.indexOf(hostEndingChars[i]);\n\t if (hec !== -1 && (hostEnd === -1 || hec < hostEnd))\n\t hostEnd = hec;\n\t }\n\t\n\t // at this point, either we have an explicit point where the\n\t // auth portion cannot go past, or the last @ char is the decider.\n\t var auth, atSign;\n\t if (hostEnd === -1) {\n\t // atSign can be anywhere.\n\t atSign = rest.lastIndexOf('@');\n\t } else {\n\t // atSign must be in auth portion.\n\t // http://a@b/c@d => host:b auth:a path:/c@d\n\t atSign = rest.lastIndexOf('@', hostEnd);\n\t }\n\t\n\t // Now we have a portion which is definitely the auth.\n\t // Pull that off.\n\t if (atSign !== -1) {\n\t auth = rest.slice(0, atSign);\n\t rest = rest.slice(atSign + 1);\n\t this.auth = decodeURIComponent(auth);\n\t }\n\t\n\t // the host is the remaining to the left of the first non-host char\n\t hostEnd = -1;\n\t for (var i = 0; i < nonHostChars.length; i++) {\n\t var hec = rest.indexOf(nonHostChars[i]);\n\t if (hec !== -1 && (hostEnd === -1 || hec < hostEnd))\n\t hostEnd = hec;\n\t }\n\t // if we still have not hit it, then the entire thing is a host.\n\t if (hostEnd === -1)\n\t hostEnd = rest.length;\n\t\n\t this.host = rest.slice(0, hostEnd);\n\t rest = rest.slice(hostEnd);\n\t\n\t // pull out port.\n\t this.parseHost();\n\t\n\t // we've indicated that there is a hostname,\n\t // so even if it's empty, it has to be present.\n\t this.hostname = this.hostname || '';\n\t\n\t // if hostname begins with [ and ends with ]\n\t // assume that it's an IPv6 address.\n\t var ipv6Hostname = this.hostname[0] === '[' &&\n\t this.hostname[this.hostname.length - 1] === ']';\n\t\n\t // validate a little.\n\t if (!ipv6Hostname) {\n\t var hostparts = this.hostname.split(/\\./);\n\t for (var i = 0, l = hostparts.length; i < l; i++) {\n\t var part = hostparts[i];\n\t if (!part) continue;\n\t if (!part.match(hostnamePartPattern)) {\n\t var newpart = '';\n\t for (var j = 0, k = part.length; j < k; j++) {\n\t if (part.charCodeAt(j) > 127) {\n\t // we replace non-ASCII char with a temporary placeholder\n\t // we need this to make sure size of hostname is not\n\t // broken by replacing non-ASCII by nothing\n\t newpart += 'x';\n\t } else {\n\t newpart += part[j];\n\t }\n\t }\n\t // we test again with ASCII char only\n\t if (!newpart.match(hostnamePartPattern)) {\n\t var validParts = hostparts.slice(0, i);\n\t var notHost = hostparts.slice(i + 1);\n\t var bit = part.match(hostnamePartStart);\n\t if (bit) {\n\t validParts.push(bit[1]);\n\t notHost.unshift(bit[2]);\n\t }\n\t if (notHost.length) {\n\t rest = '/' + notHost.join('.') + rest;\n\t }\n\t this.hostname = validParts.join('.');\n\t break;\n\t }\n\t }\n\t }\n\t }\n\t\n\t if (this.hostname.length > hostnameMaxLen) {\n\t this.hostname = '';\n\t } else {\n\t // hostnames are always lower case.\n\t this.hostname = this.hostname.toLowerCase();\n\t }\n\t\n\t if (!ipv6Hostname) {\n\t // IDNA Support: Returns a punycoded representation of \"domain\".\n\t // It only converts parts of the domain name that\n\t // have non-ASCII characters, i.e. it doesn't matter if\n\t // you call it with a domain that already is ASCII-only.\n\t this.hostname = punycode.toASCII(this.hostname);\n\t }\n\t\n\t var p = this.port ? ':' + this.port : '';\n\t var h = this.hostname || '';\n\t this.host = h + p;\n\t this.href += this.host;\n\t\n\t // strip [ and ] from the hostname\n\t // the host field still retains them, though\n\t if (ipv6Hostname) {\n\t this.hostname = this.hostname.substr(1, this.hostname.length - 2);\n\t if (rest[0] !== '/') {\n\t rest = '/' + rest;\n\t }\n\t }\n\t }\n\t\n\t // now rest is set to the post-host stuff.\n\t // chop off any delim chars.\n\t if (!unsafeProtocol[lowerProto]) {\n\t\n\t // First, make 100% sure that any \"autoEscape\" chars get\n\t // escaped, even if encodeURIComponent doesn't think they\n\t // need to be.\n\t for (var i = 0, l = autoEscape.length; i < l; i++) {\n\t var ae = autoEscape[i];\n\t if (rest.indexOf(ae) === -1)\n\t continue;\n\t var esc = encodeURIComponent(ae);\n\t if (esc === ae) {\n\t esc = escape(ae);\n\t }\n\t rest = rest.split(ae).join(esc);\n\t }\n\t }\n\t\n\t\n\t // chop off from the tail first.\n\t var hash = rest.indexOf('#');\n\t if (hash !== -1) {\n\t // got a fragment string.\n\t this.hash = rest.substr(hash);\n\t rest = rest.slice(0, hash);\n\t }\n\t var qm = rest.indexOf('?');\n\t if (qm !== -1) {\n\t this.search = rest.substr(qm);\n\t this.query = rest.substr(qm + 1);\n\t if (parseQueryString) {\n\t this.query = querystring.parse(this.query);\n\t }\n\t rest = rest.slice(0, qm);\n\t } else if (parseQueryString) {\n\t // no query string, but parseQueryString still requested\n\t this.search = '';\n\t this.query = {};\n\t }\n\t if (rest) this.pathname = rest;\n\t if (slashedProtocol[lowerProto] &&\n\t this.hostname && !this.pathname) {\n\t this.pathname = '/';\n\t }\n\t\n\t //to support http.request\n\t if (this.pathname || this.search) {\n\t var p = this.pathname || '';\n\t var s = this.search || '';\n\t this.path = p + s;\n\t }\n\t\n\t // finally, reconstruct the href based on what has been validated.\n\t this.href = this.format();\n\t return this;\n\t};\n\t\n\t// format a parsed object into a url string\n\tfunction urlFormat(obj) {\n\t // ensure it's an object, and not a string url.\n\t // If it's an obj, this is a no-op.\n\t // this way, you can call url_format() on strings\n\t // to clean up potentially wonky urls.\n\t if (util.isString(obj)) obj = urlParse(obj);\n\t if (!(obj instanceof Url)) return Url.prototype.format.call(obj);\n\t return obj.format();\n\t}\n\t\n\tUrl.prototype.format = function() {\n\t var auth = this.auth || '';\n\t if (auth) {\n\t auth = encodeURIComponent(auth);\n\t auth = auth.replace(/%3A/i, ':');\n\t auth += '@';\n\t }\n\t\n\t var protocol = this.protocol || '',\n\t pathname = this.pathname || '',\n\t hash = this.hash || '',\n\t host = false,\n\t query = '';\n\t\n\t if (this.host) {\n\t host = auth + this.host;\n\t } else if (this.hostname) {\n\t host = auth + (this.hostname.indexOf(':') === -1 ?\n\t this.hostname :\n\t '[' + this.hostname + ']');\n\t if (this.port) {\n\t host += ':' + this.port;\n\t }\n\t }\n\t\n\t if (this.query &&\n\t util.isObject(this.query) &&\n\t Object.keys(this.query).length) {\n\t query = querystring.stringify(this.query);\n\t }\n\t\n\t var search = this.search || (query && ('?' + query)) || '';\n\t\n\t if (protocol && protocol.substr(-1) !== ':') protocol += ':';\n\t\n\t // only the slashedProtocols get the //. Not mailto:, xmpp:, etc.\n\t // unless they had them to begin with.\n\t if (this.slashes ||\n\t (!protocol || slashedProtocol[protocol]) && host !== false) {\n\t host = '//' + (host || '');\n\t if (pathname && pathname.charAt(0) !== '/') pathname = '/' + pathname;\n\t } else if (!host) {\n\t host = '';\n\t }\n\t\n\t if (hash && hash.charAt(0) !== '#') hash = '#' + hash;\n\t if (search && search.charAt(0) !== '?') search = '?' + search;\n\t\n\t pathname = pathname.replace(/[?#]/g, function(match) {\n\t return encodeURIComponent(match);\n\t });\n\t search = search.replace('#', '%23');\n\t\n\t return protocol + host + pathname + search + hash;\n\t};\n\t\n\tfunction urlResolve(source, relative) {\n\t return urlParse(source, false, true).resolve(relative);\n\t}\n\t\n\tUrl.prototype.resolve = function(relative) {\n\t return this.resolveObject(urlParse(relative, false, true)).format();\n\t};\n\t\n\tfunction urlResolveObject(source, relative) {\n\t if (!source) return relative;\n\t return urlParse(source, false, true).resolveObject(relative);\n\t}\n\t\n\tUrl.prototype.resolveObject = function(relative) {\n\t if (util.isString(relative)) {\n\t var rel = new Url();\n\t rel.parse(relative, false, true);\n\t relative = rel;\n\t }\n\t\n\t var result = new Url();\n\t var tkeys = Object.keys(this);\n\t for (var tk = 0; tk < tkeys.length; tk++) {\n\t var tkey = tkeys[tk];\n\t result[tkey] = this[tkey];\n\t }\n\t\n\t // hash is always overridden, no matter what.\n\t // even href=\"\" will remove it.\n\t result.hash = relative.hash;\n\t\n\t // if the relative url is empty, then there's nothing left to do here.\n\t if (relative.href === '') {\n\t result.href = result.format();\n\t return result;\n\t }\n\t\n\t // hrefs like //foo/bar always cut to the protocol.\n\t if (relative.slashes && !relative.protocol) {\n\t // take everything except the protocol from relative\n\t var rkeys = Object.keys(relative);\n\t for (var rk = 0; rk < rkeys.length; rk++) {\n\t var rkey = rkeys[rk];\n\t if (rkey !== 'protocol')\n\t result[rkey] = relative[rkey];\n\t }\n\t\n\t //urlParse appends trailing / to urls like http://www.example.com\n\t if (slashedProtocol[result.protocol] &&\n\t result.hostname && !result.pathname) {\n\t result.path = result.pathname = '/';\n\t }\n\t\n\t result.href = result.format();\n\t return result;\n\t }\n\t\n\t if (relative.protocol && relative.protocol !== result.protocol) {\n\t // if it's a known url protocol, then changing\n\t // the protocol does weird things\n\t // first, if it's not file:, then we MUST have a host,\n\t // and if there was a path\n\t // to begin with, then we MUST have a path.\n\t // if it is file:, then the host is dropped,\n\t // because that's known to be hostless.\n\t // anything else is assumed to be absolute.\n\t if (!slashedProtocol[relative.protocol]) {\n\t var keys = Object.keys(relative);\n\t for (var v = 0; v < keys.length; v++) {\n\t var k = keys[v];\n\t result[k] = relative[k];\n\t }\n\t result.href = result.format();\n\t return result;\n\t }\n\t\n\t result.protocol = relative.protocol;\n\t if (!relative.host && !hostlessProtocol[relative.protocol]) {\n\t var relPath = (relative.pathname || '').split('/');\n\t while (relPath.length && !(relative.host = relPath.shift()));\n\t if (!relative.host) relative.host = '';\n\t if (!relative.hostname) relative.hostname = '';\n\t if (relPath[0] !== '') relPath.unshift('');\n\t if (relPath.length < 2) relPath.unshift('');\n\t result.pathname = relPath.join('/');\n\t } else {\n\t result.pathname = relative.pathname;\n\t }\n\t result.search = relative.search;\n\t result.query = relative.query;\n\t result.host = relative.host || '';\n\t result.auth = relative.auth;\n\t result.hostname = relative.hostname || relative.host;\n\t result.port = relative.port;\n\t // to support http.request\n\t if (result.pathname || result.search) {\n\t var p = result.pathname || '';\n\t var s = result.search || '';\n\t result.path = p + s;\n\t }\n\t result.slashes = result.slashes || relative.slashes;\n\t result.href = result.format();\n\t return result;\n\t }\n\t\n\t var isSourceAbs = (result.pathname && result.pathname.charAt(0) === '/'),\n\t isRelAbs = (\n\t relative.host ||\n\t relative.pathname && relative.pathname.charAt(0) === '/'\n\t ),\n\t mustEndAbs = (isRelAbs || isSourceAbs ||\n\t (result.host && relative.pathname)),\n\t removeAllDots = mustEndAbs,\n\t srcPath = result.pathname && result.pathname.split('/') || [],\n\t relPath = relative.pathname && relative.pathname.split('/') || [],\n\t psychotic = result.protocol && !slashedProtocol[result.protocol];\n\t\n\t // if the url is a non-slashed url, then relative\n\t // links like ../.. should be able\n\t // to crawl up to the hostname, as well. This is strange.\n\t // result.protocol has already been set by now.\n\t // Later on, put the first path part into the host field.\n\t if (psychotic) {\n\t result.hostname = '';\n\t result.port = null;\n\t if (result.host) {\n\t if (srcPath[0] === '') srcPath[0] = result.host;\n\t else srcPath.unshift(result.host);\n\t }\n\t result.host = '';\n\t if (relative.protocol) {\n\t relative.hostname = null;\n\t relative.port = null;\n\t if (relative.host) {\n\t if (relPath[0] === '') relPath[0] = relative.host;\n\t else relPath.unshift(relative.host);\n\t }\n\t relative.host = null;\n\t }\n\t mustEndAbs = mustEndAbs && (relPath[0] === '' || srcPath[0] === '');\n\t }\n\t\n\t if (isRelAbs) {\n\t // it's absolute.\n\t result.host = (relative.host || relative.host === '') ?\n\t relative.host : result.host;\n\t result.hostname = (relative.hostname || relative.hostname === '') ?\n\t relative.hostname : result.hostname;\n\t result.search = relative.search;\n\t result.query = relative.query;\n\t srcPath = relPath;\n\t // fall through to the dot-handling below.\n\t } else if (relPath.length) {\n\t // it's relative\n\t // throw away the existing file, and take the new path instead.\n\t if (!srcPath) srcPath = [];\n\t srcPath.pop();\n\t srcPath = srcPath.concat(relPath);\n\t result.search = relative.search;\n\t result.query = relative.query;\n\t } else if (!util.isNullOrUndefined(relative.search)) {\n\t // just pull out the search.\n\t // like href='?foo'.\n\t // Put this after the other two cases because it simplifies the booleans\n\t if (psychotic) {\n\t result.hostname = result.host = srcPath.shift();\n\t //occationaly the auth can get stuck only in host\n\t //this especially happens in cases like\n\t //url.resolveObject('mailto:local1@domain1', 'local2@domain2')\n\t var authInHost = result.host && result.host.indexOf('@') > 0 ?\n\t result.host.split('@') : false;\n\t if (authInHost) {\n\t result.auth = authInHost.shift();\n\t result.host = result.hostname = authInHost.shift();\n\t }\n\t }\n\t result.search = relative.search;\n\t result.query = relative.query;\n\t //to support http.request\n\t if (!util.isNull(result.pathname) || !util.isNull(result.search)) {\n\t result.path = (result.pathname ? result.pathname : '') +\n\t (result.search ? result.search : '');\n\t }\n\t result.href = result.format();\n\t return result;\n\t }\n\t\n\t if (!srcPath.length) {\n\t // no path at all. easy.\n\t // we've already handled the other stuff above.\n\t result.pathname = null;\n\t //to support http.request\n\t if (result.search) {\n\t result.path = '/' + result.search;\n\t } else {\n\t result.path = null;\n\t }\n\t result.href = result.format();\n\t return result;\n\t }\n\t\n\t // if a url ENDs in . or .., then it must get a trailing slash.\n\t // however, if it ends in anything else non-slashy,\n\t // then it must NOT get a trailing slash.\n\t var last = srcPath.slice(-1)[0];\n\t var hasTrailingSlash = (\n\t (result.host || relative.host || srcPath.length > 1) &&\n\t (last === '.' || last === '..') || last === '');\n\t\n\t // strip single dots, resolve double dots to parent dir\n\t // if the path tries to go above the root, `up` ends up > 0\n\t var up = 0;\n\t for (var i = srcPath.length; i >= 0; i--) {\n\t last = srcPath[i];\n\t if (last === '.') {\n\t srcPath.splice(i, 1);\n\t } else if (last === '..') {\n\t srcPath.splice(i, 1);\n\t up++;\n\t } else if (up) {\n\t srcPath.splice(i, 1);\n\t up--;\n\t }\n\t }\n\t\n\t // if the path is allowed to go above the root, restore leading ..s\n\t if (!mustEndAbs && !removeAllDots) {\n\t for (; up--; up) {\n\t srcPath.unshift('..');\n\t }\n\t }\n\t\n\t if (mustEndAbs && srcPath[0] !== '' &&\n\t (!srcPath[0] || srcPath[0].charAt(0) !== '/')) {\n\t srcPath.unshift('');\n\t }\n\t\n\t if (hasTrailingSlash && (srcPath.join('/').substr(-1) !== '/')) {\n\t srcPath.push('');\n\t }\n\t\n\t var isAbsolute = srcPath[0] === '' ||\n\t (srcPath[0] && srcPath[0].charAt(0) === '/');\n\t\n\t // put the host back\n\t if (psychotic) {\n\t result.hostname = result.host = isAbsolute ? '' :\n\t srcPath.length ? srcPath.shift() : '';\n\t //occationaly the auth can get stuck only in host\n\t //this especially happens in cases like\n\t //url.resolveObject('mailto:local1@domain1', 'local2@domain2')\n\t var authInHost = result.host && result.host.indexOf('@') > 0 ?\n\t result.host.split('@') : false;\n\t if (authInHost) {\n\t result.auth = authInHost.shift();\n\t result.host = result.hostname = authInHost.shift();\n\t }\n\t }\n\t\n\t mustEndAbs = mustEndAbs || (result.host && srcPath.length);\n\t\n\t if (mustEndAbs && !isAbsolute) {\n\t srcPath.unshift('');\n\t }\n\t\n\t if (!srcPath.length) {\n\t result.pathname = null;\n\t result.path = null;\n\t } else {\n\t result.pathname = srcPath.join('/');\n\t }\n\t\n\t //to support request.http\n\t if (!util.isNull(result.pathname) || !util.isNull(result.search)) {\n\t result.path = (result.pathname ? result.pathname : '') +\n\t (result.search ? result.search : '');\n\t }\n\t result.auth = relative.auth || result.auth;\n\t result.slashes = result.slashes || relative.slashes;\n\t result.href = result.format();\n\t return result;\n\t};\n\t\n\tUrl.prototype.parseHost = function() {\n\t var host = this.host;\n\t var port = portPattern.exec(host);\n\t if (port) {\n\t port = port[0];\n\t if (port !== ':') {\n\t this.port = port.substr(1);\n\t }\n\t host = host.substr(0, host.length - port.length);\n\t }\n\t if (host) this.hostname = host;\n\t};\n\t\n\t},{\"./util\":44,\"punycode\":39,\"querystring\":42}],44:[function(require,module,exports){\n\t'use strict';\n\t\n\tmodule.exports = {\n\t isString: function(arg) {\n\t return typeof(arg) === 'string';\n\t },\n\t isObject: function(arg) {\n\t return typeof(arg) === 'object' && arg !== null;\n\t },\n\t isNull: function(arg) {\n\t return arg === null;\n\t },\n\t isNullOrUndefined: function(arg) {\n\t return arg == null;\n\t }\n\t};\n\t\n\t},{}],45:[function(require,module,exports){\n\t\n\t/**\n\t * slice() reference.\n\t */\n\t\n\tvar slice = Array.prototype.slice;\n\t\n\t/**\n\t * Expose `co`.\n\t */\n\t\n\tmodule.exports = co['default'] = co.co = co;\n\t\n\t/**\n\t * Wrap the given generator `fn` into a\n\t * function that returns a promise.\n\t * This is a separate function so that\n\t * every `co()` call doesn't create a new,\n\t * unnecessary closure.\n\t *\n\t * @param {GeneratorFunction} fn\n\t * @return {Function}\n\t * @api public\n\t */\n\t\n\tco.wrap = function (fn) {\n\t createPromise.__generatorFunction__ = fn;\n\t return createPromise;\n\t function createPromise() {\n\t return co.call(this, fn.apply(this, arguments));\n\t }\n\t};\n\t\n\t/**\n\t * Execute the generator function or a generator\n\t * and return a promise.\n\t *\n\t * @param {Function} fn\n\t * @return {Promise}\n\t * @api public\n\t */\n\t\n\tfunction co(gen) {\n\t var ctx = this;\n\t var args = slice.call(arguments, 1)\n\t\n\t // we wrap everything in a promise to avoid promise chaining,\n\t // which leads to memory leak errors.\n\t // see https://github.com/tj/co/issues/180\n\t return new Promise(function(resolve, reject) {\n\t if (typeof gen === 'function') gen = gen.apply(ctx, args);\n\t if (!gen || typeof gen.next !== 'function') return resolve(gen);\n\t\n\t onFulfilled();\n\t\n\t /**\n\t * @param {Mixed} res\n\t * @return {Promise}\n\t * @api private\n\t */\n\t\n\t function onFulfilled(res) {\n\t var ret;\n\t try {\n\t ret = gen.next(res);\n\t } catch (e) {\n\t return reject(e);\n\t }\n\t next(ret);\n\t }\n\t\n\t /**\n\t * @param {Error} err\n\t * @return {Promise}\n\t * @api private\n\t */\n\t\n\t function onRejected(err) {\n\t var ret;\n\t try {\n\t ret = gen.throw(err);\n\t } catch (e) {\n\t return reject(e);\n\t }\n\t next(ret);\n\t }\n\t\n\t /**\n\t * Get the next value in the generator,\n\t * return a promise.\n\t *\n\t * @param {Object} ret\n\t * @return {Promise}\n\t * @api private\n\t */\n\t\n\t function next(ret) {\n\t if (ret.done) return resolve(ret.value);\n\t var value = toPromise.call(ctx, ret.value);\n\t if (value && isPromise(value)) return value.then(onFulfilled, onRejected);\n\t return onRejected(new TypeError('You may only yield a function, promise, generator, array, or object, '\n\t + 'but the following object was passed: \"' + String(ret.value) + '\"'));\n\t }\n\t });\n\t}\n\t\n\t/**\n\t * Convert a `yield`ed value into a promise.\n\t *\n\t * @param {Mixed} obj\n\t * @return {Promise}\n\t * @api private\n\t */\n\t\n\tfunction toPromise(obj) {\n\t if (!obj) return obj;\n\t if (isPromise(obj)) return obj;\n\t if (isGeneratorFunction(obj) || isGenerator(obj)) return co.call(this, obj);\n\t if ('function' == typeof obj) return thunkToPromise.call(this, obj);\n\t if (Array.isArray(obj)) return arrayToPromise.call(this, obj);\n\t if (isObject(obj)) return objectToPromise.call(this, obj);\n\t return obj;\n\t}\n\t\n\t/**\n\t * Convert a thunk to a promise.\n\t *\n\t * @param {Function}\n\t * @return {Promise}\n\t * @api private\n\t */\n\t\n\tfunction thunkToPromise(fn) {\n\t var ctx = this;\n\t return new Promise(function (resolve, reject) {\n\t fn.call(ctx, function (err, res) {\n\t if (err) return reject(err);\n\t if (arguments.length > 2) res = slice.call(arguments, 1);\n\t resolve(res);\n\t });\n\t });\n\t}\n\t\n\t/**\n\t * Convert an array of \"yieldables\" to a promise.\n\t * Uses `Promise.all()` internally.\n\t *\n\t * @param {Array} obj\n\t * @return {Promise}\n\t * @api private\n\t */\n\t\n\tfunction arrayToPromise(obj) {\n\t return Promise.all(obj.map(toPromise, this));\n\t}\n\t\n\t/**\n\t * Convert an object of \"yieldables\" to a promise.\n\t * Uses `Promise.all()` internally.\n\t *\n\t * @param {Object} obj\n\t * @return {Promise}\n\t * @api private\n\t */\n\t\n\tfunction objectToPromise(obj){\n\t var results = new obj.constructor();\n\t var keys = Object.keys(obj);\n\t var promises = [];\n\t for (var i = 0; i < keys.length; i++) {\n\t var key = keys[i];\n\t var promise = toPromise.call(this, obj[key]);\n\t if (promise && isPromise(promise)) defer(promise, key);\n\t else results[key] = obj[key];\n\t }\n\t return Promise.all(promises).then(function () {\n\t return results;\n\t });\n\t\n\t function defer(promise, key) {\n\t // predefine the key in the result\n\t results[key] = undefined;\n\t promises.push(promise.then(function (res) {\n\t results[key] = res;\n\t }));\n\t }\n\t}\n\t\n\t/**\n\t * Check if `obj` is a promise.\n\t *\n\t * @param {Object} obj\n\t * @return {Boolean}\n\t * @api private\n\t */\n\t\n\tfunction isPromise(obj) {\n\t return 'function' == typeof obj.then;\n\t}\n\t\n\t/**\n\t * Check if `obj` is a generator.\n\t *\n\t * @param {Mixed} obj\n\t * @return {Boolean}\n\t * @api private\n\t */\n\t\n\tfunction isGenerator(obj) {\n\t return 'function' == typeof obj.next && 'function' == typeof obj.throw;\n\t}\n\t\n\t/**\n\t * Check if `obj` is a generator function.\n\t *\n\t * @param {Mixed} obj\n\t * @return {Boolean}\n\t * @api private\n\t */\n\tfunction isGeneratorFunction(obj) {\n\t var constructor = obj.constructor;\n\t if (!constructor) return false;\n\t if ('GeneratorFunction' === constructor.name || 'GeneratorFunction' === constructor.displayName) return true;\n\t return isGenerator(constructor.prototype);\n\t}\n\t\n\t/**\n\t * Check for plain object.\n\t *\n\t * @param {Mixed} val\n\t * @return {Boolean}\n\t * @api private\n\t */\n\t\n\tfunction isObject(val) {\n\t return Object == val.constructor;\n\t}\n\t\n\t},{}],46:[function(require,module,exports){\n\tvar json = typeof JSON !== 'undefined' ? JSON : require('jsonify');\n\t\n\tmodule.exports = function (obj, opts) {\n\t if (!opts) opts = {};\n\t if (typeof opts === 'function') opts = { cmp: opts };\n\t var space = opts.space || '';\n\t if (typeof space === 'number') space = Array(space+1).join(' ');\n\t var cycles = (typeof opts.cycles === 'boolean') ? opts.cycles : false;\n\t var replacer = opts.replacer || function(key, value) { return value; };\n\t\n\t var cmp = opts.cmp && (function (f) {\n\t return function (node) {\n\t return function (a, b) {\n\t var aobj = { key: a, value: node[a] };\n\t var bobj = { key: b, value: node[b] };\n\t return f(aobj, bobj);\n\t };\n\t };\n\t })(opts.cmp);\n\t\n\t var seen = [];\n\t return (function stringify (parent, key, node, level) {\n\t var indent = space ? ('\\n' + new Array(level + 1).join(space)) : '';\n\t var colonSeparator = space ? ': ' : ':';\n\t\n\t if (node && node.toJSON && typeof node.toJSON === 'function') {\n\t node = node.toJSON();\n\t }\n\t\n\t node = replacer.call(parent, key, node);\n\t\n\t if (node === undefined) {\n\t return;\n\t }\n\t if (typeof node !== 'object' || node === null) {\n\t return json.stringify(node);\n\t }\n\t if (isArray(node)) {\n\t var out = [];\n\t for (var i = 0; i < node.length; i++) {\n\t var item = stringify(node, i, node[i], level+1) || json.stringify(null);\n\t out.push(indent + space + item);\n\t }\n\t return '[' + out.join(',') + indent + ']';\n\t }\n\t else {\n\t if (seen.indexOf(node) !== -1) {\n\t if (cycles) return json.stringify('__cycle__');\n\t throw new TypeError('Converting circular structure to JSON');\n\t }\n\t else seen.push(node);\n\t\n\t var keys = objectKeys(node).sort(cmp && cmp(node));\n\t var out = [];\n\t for (var i = 0; i < keys.length; i++) {\n\t var key = keys[i];\n\t var value = stringify(node, key, node[key], level+1);\n\t\n\t if(!value) continue;\n\t\n\t var keyValue = json.stringify(key)\n\t + colonSeparator\n\t + value;\n\t ;\n\t out.push(indent + space + keyValue);\n\t }\n\t seen.splice(seen.indexOf(node), 1);\n\t return '{' + out.join(',') + indent + '}';\n\t }\n\t })({ '': obj }, '', obj, 0);\n\t};\n\t\n\tvar isArray = Array.isArray || function (x) {\n\t return {}.toString.call(x) === '[object Array]';\n\t};\n\t\n\tvar objectKeys = Object.keys || function (obj) {\n\t var has = Object.prototype.hasOwnProperty || function () { return true };\n\t var keys = [];\n\t for (var key in obj) {\n\t if (has.call(obj, key)) keys.push(key);\n\t }\n\t return keys;\n\t};\n\t\n\t},{\"jsonify\":47}],47:[function(require,module,exports){\n\texports.parse = require('./lib/parse');\n\texports.stringify = require('./lib/stringify');\n\t\n\t},{\"./lib/parse\":48,\"./lib/stringify\":49}],48:[function(require,module,exports){\n\tvar at, // The index of the current character\n\t ch, // The current character\n\t escapee = {\n\t '\"': '\"',\n\t '\\\\': '\\\\',\n\t '/': '/',\n\t b: '\\b',\n\t f: '\\f',\n\t n: '\\n',\n\t r: '\\r',\n\t t: '\\t'\n\t },\n\t text,\n\t\n\t error = function (m) {\n\t // Call error when something is wrong.\n\t throw {\n\t name: 'SyntaxError',\n\t message: m,\n\t at: at,\n\t text: text\n\t };\n\t },\n\t \n\t next = function (c) {\n\t // If a c parameter is provided, verify that it matches the current character.\n\t if (c && c !== ch) {\n\t error(\"Expected '\" + c + \"' instead of '\" + ch + \"'\");\n\t }\n\t \n\t // Get the next character. When there are no more characters,\n\t // return the empty string.\n\t \n\t ch = text.charAt(at);\n\t at += 1;\n\t return ch;\n\t },\n\t \n\t number = function () {\n\t // Parse a number value.\n\t var number,\n\t string = '';\n\t \n\t if (ch === '-') {\n\t string = '-';\n\t next('-');\n\t }\n\t while (ch >= '0' && ch <= '9') {\n\t string += ch;\n\t next();\n\t }\n\t if (ch === '.') {\n\t string += '.';\n\t while (next() && ch >= '0' && ch <= '9') {\n\t string += ch;\n\t }\n\t }\n\t if (ch === 'e' || ch === 'E') {\n\t string += ch;\n\t next();\n\t if (ch === '-' || ch === '+') {\n\t string += ch;\n\t next();\n\t }\n\t while (ch >= '0' && ch <= '9') {\n\t string += ch;\n\t next();\n\t }\n\t }\n\t number = +string;\n\t if (!isFinite(number)) {\n\t error(\"Bad number\");\n\t } else {\n\t return number;\n\t }\n\t },\n\t \n\t string = function () {\n\t // Parse a string value.\n\t var hex,\n\t i,\n\t string = '',\n\t uffff;\n\t \n\t // When parsing for string values, we must look for \" and \\ characters.\n\t if (ch === '\"') {\n\t while (next()) {\n\t if (ch === '\"') {\n\t next();\n\t return string;\n\t } else if (ch === '\\\\') {\n\t next();\n\t if (ch === 'u') {\n\t uffff = 0;\n\t for (i = 0; i < 4; i += 1) {\n\t hex = parseInt(next(), 16);\n\t if (!isFinite(hex)) {\n\t break;\n\t }\n\t uffff = uffff * 16 + hex;\n\t }\n\t string += String.fromCharCode(uffff);\n\t } else if (typeof escapee[ch] === 'string') {\n\t string += escapee[ch];\n\t } else {\n\t break;\n\t }\n\t } else {\n\t string += ch;\n\t }\n\t }\n\t }\n\t error(\"Bad string\");\n\t },\n\t\n\t white = function () {\n\t\n\t// Skip whitespace.\n\t\n\t while (ch && ch <= ' ') {\n\t next();\n\t }\n\t },\n\t\n\t word = function () {\n\t\n\t// true, false, or null.\n\t\n\t switch (ch) {\n\t case 't':\n\t next('t');\n\t next('r');\n\t next('u');\n\t next('e');\n\t return true;\n\t case 'f':\n\t next('f');\n\t next('a');\n\t next('l');\n\t next('s');\n\t next('e');\n\t return false;\n\t case 'n':\n\t next('n');\n\t next('u');\n\t next('l');\n\t next('l');\n\t return null;\n\t }\n\t error(\"Unexpected '\" + ch + \"'\");\n\t },\n\t\n\t value, // Place holder for the value function.\n\t\n\t array = function () {\n\t\n\t// Parse an array value.\n\t\n\t var array = [];\n\t\n\t if (ch === '[') {\n\t next('[');\n\t white();\n\t if (ch === ']') {\n\t next(']');\n\t return array; // empty array\n\t }\n\t while (ch) {\n\t array.push(value());\n\t white();\n\t if (ch === ']') {\n\t next(']');\n\t return array;\n\t }\n\t next(',');\n\t white();\n\t }\n\t }\n\t error(\"Bad array\");\n\t },\n\t\n\t object = function () {\n\t\n\t// Parse an object value.\n\t\n\t var key,\n\t object = {};\n\t\n\t if (ch === '{') {\n\t next('{');\n\t white();\n\t if (ch === '}') {\n\t next('}');\n\t return object; // empty object\n\t }\n\t while (ch) {\n\t key = string();\n\t white();\n\t next(':');\n\t if (Object.hasOwnProperty.call(object, key)) {\n\t error('Duplicate key \"' + key + '\"');\n\t }\n\t object[key] = value();\n\t white();\n\t if (ch === '}') {\n\t next('}');\n\t return object;\n\t }\n\t next(',');\n\t white();\n\t }\n\t }\n\t error(\"Bad object\");\n\t };\n\t\n\tvalue = function () {\n\t\n\t// Parse a JSON value. It could be an object, an array, a string, a number,\n\t// or a word.\n\t\n\t white();\n\t switch (ch) {\n\t case '{':\n\t return object();\n\t case '[':\n\t return array();\n\t case '\"':\n\t return string();\n\t case '-':\n\t return number();\n\t default:\n\t return ch >= '0' && ch <= '9' ? number() : word();\n\t }\n\t};\n\t\n\t// Return the json_parse function. It will have access to all of the above\n\t// functions and variables.\n\t\n\tmodule.exports = function (source, reviver) {\n\t var result;\n\t \n\t text = source;\n\t at = 0;\n\t ch = ' ';\n\t result = value();\n\t white();\n\t if (ch) {\n\t error(\"Syntax error\");\n\t }\n\t\n\t // If there is a reviver function, we recursively walk the new structure,\n\t // passing each name/value pair to the reviver function for possible\n\t // transformation, starting with a temporary root object that holds the result\n\t // in an empty key. If there is not a reviver function, we simply return the\n\t // result.\n\t\n\t return typeof reviver === 'function' ? (function walk(holder, key) {\n\t var k, v, value = holder[key];\n\t if (value && typeof value === 'object') {\n\t for (k in value) {\n\t if (Object.prototype.hasOwnProperty.call(value, k)) {\n\t v = walk(value, k);\n\t if (v !== undefined) {\n\t value[k] = v;\n\t } else {\n\t delete value[k];\n\t }\n\t }\n\t }\n\t }\n\t return reviver.call(holder, key, value);\n\t }({'': result}, '')) : result;\n\t};\n\t\n\t},{}],49:[function(require,module,exports){\n\tvar cx = /[\\u0000\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]/g,\n\t escapable = /[\\\\\\\"\\x00-\\x1f\\x7f-\\x9f\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]/g,\n\t gap,\n\t indent,\n\t meta = { // table of character substitutions\n\t '\\b': '\\\\b',\n\t '\\t': '\\\\t',\n\t '\\n': '\\\\n',\n\t '\\f': '\\\\f',\n\t '\\r': '\\\\r',\n\t '\"' : '\\\\\"',\n\t '\\\\': '\\\\\\\\'\n\t },\n\t rep;\n\t\n\tfunction quote(string) {\n\t // If the string contains no control characters, no quote characters, and no\n\t // backslash characters, then we can safely slap some quotes around it.\n\t // Otherwise we must also replace the offending characters with safe escape\n\t // sequences.\n\t \n\t escapable.lastIndex = 0;\n\t return escapable.test(string) ? '\"' + string.replace(escapable, function (a) {\n\t var c = meta[a];\n\t return typeof c === 'string' ? c :\n\t '\\\\u' + ('0000' + a.charCodeAt(0).toString(16)).slice(-4);\n\t }) + '\"' : '\"' + string + '\"';\n\t}\n\t\n\tfunction str(key, holder) {\n\t // Produce a string from holder[key].\n\t var i, // The loop counter.\n\t k, // The member key.\n\t v, // The member value.\n\t length,\n\t mind = gap,\n\t partial,\n\t value = holder[key];\n\t \n\t // If the value has a toJSON method, call it to obtain a replacement value.\n\t if (value && typeof value === 'object' &&\n\t typeof value.toJSON === 'function') {\n\t value = value.toJSON(key);\n\t }\n\t \n\t // If we were called with a replacer function, then call the replacer to\n\t // obtain a replacement value.\n\t if (typeof rep === 'function') {\n\t value = rep.call(holder, key, value);\n\t }\n\t \n\t // What happens next depends on the value's type.\n\t switch (typeof value) {\n\t case 'string':\n\t return quote(value);\n\t \n\t case 'number':\n\t // JSON numbers must be finite. Encode non-finite numbers as null.\n\t return isFinite(value) ? String(value) : 'null';\n\t \n\t case 'boolean':\n\t case 'null':\n\t // If the value is a boolean or null, convert it to a string. Note:\n\t // typeof null does not produce 'null'. The case is included here in\n\t // the remote chance that this gets fixed someday.\n\t return String(value);\n\t \n\t case 'object':\n\t if (!value) return 'null';\n\t gap += indent;\n\t partial = [];\n\t \n\t // Array.isArray\n\t if (Object.prototype.toString.apply(value) === '[object Array]') {\n\t length = value.length;\n\t for (i = 0; i < length; i += 1) {\n\t partial[i] = str(i, value) || 'null';\n\t }\n\t \n\t // Join all of the elements together, separated with commas, and\n\t // wrap them in brackets.\n\t v = partial.length === 0 ? '[]' : gap ?\n\t '[\\n' + gap + partial.join(',\\n' + gap) + '\\n' + mind + ']' :\n\t '[' + partial.join(',') + ']';\n\t gap = mind;\n\t return v;\n\t }\n\t \n\t // If the replacer is an array, use it to select the members to be\n\t // stringified.\n\t if (rep && typeof rep === 'object') {\n\t length = rep.length;\n\t for (i = 0; i < length; i += 1) {\n\t k = rep[i];\n\t if (typeof k === 'string') {\n\t v = str(k, value);\n\t if (v) {\n\t partial.push(quote(k) + (gap ? ': ' : ':') + v);\n\t }\n\t }\n\t }\n\t }\n\t else {\n\t // Otherwise, iterate through all of the keys in the object.\n\t for (k in value) {\n\t if (Object.prototype.hasOwnProperty.call(value, k)) {\n\t v = str(k, value);\n\t if (v) {\n\t partial.push(quote(k) + (gap ? ': ' : ':') + v);\n\t }\n\t }\n\t }\n\t }\n\t \n\t // Join all of the member texts together, separated with commas,\n\t // and wrap them in braces.\n\t\n\t v = partial.length === 0 ? '{}' : gap ?\n\t '{\\n' + gap + partial.join(',\\n' + gap) + '\\n' + mind + '}' :\n\t '{' + partial.join(',') + '}';\n\t gap = mind;\n\t return v;\n\t }\n\t}\n\t\n\tmodule.exports = function (value, replacer, space) {\n\t var i;\n\t gap = '';\n\t indent = '';\n\t \n\t // If the space parameter is a number, make an indent string containing that\n\t // many spaces.\n\t if (typeof space === 'number') {\n\t for (i = 0; i < space; i += 1) {\n\t indent += ' ';\n\t }\n\t }\n\t // If the space parameter is a string, it will be used as the indent string.\n\t else if (typeof space === 'string') {\n\t indent = space;\n\t }\n\t\n\t // If there is a replacer, it must be a function or an array.\n\t // Otherwise, throw an error.\n\t rep = replacer;\n\t if (replacer && typeof replacer !== 'function'\n\t && (typeof replacer !== 'object' || typeof replacer.length !== 'number')) {\n\t throw new Error('JSON.stringify');\n\t }\n\t \n\t // Make a fake root object containing our value under the key of ''.\n\t // Return the result of stringifying the value.\n\t return str('', {'': value});\n\t};\n\t\n\t},{}],\"ajv\":[function(require,module,exports){\n\t'use strict';\n\t\n\tvar compileSchema = require('./compile')\n\t , resolve = require('./compile/resolve')\n\t , Cache = require('./cache')\n\t , SchemaObject = require('./compile/schema_obj')\n\t , stableStringify = require('json-stable-stringify')\n\t , formats = require('./compile/formats')\n\t , rules = require('./compile/rules')\n\t , v5 = require('./v5')\n\t , util = require('./compile/util')\n\t , async = require('./async')\n\t , co = require('co');\n\t\n\tmodule.exports = Ajv;\n\t\n\tAjv.prototype.compileAsync = async.compile;\n\tAjv.prototype.addKeyword = require('./keyword');\n\tAjv.ValidationError = require('./compile/validation_error');\n\t\n\tvar META_SCHEMA_ID = 'http://json-schema.org/draft-04/schema';\n\tvar SCHEMA_URI_FORMAT = /^(?:(?:[a-z][a-z0-9+-.]*:)?\\/\\/)?[^\\s]*$/i;\n\tfunction SCHEMA_URI_FORMAT_FUNC(str) {\n\t return SCHEMA_URI_FORMAT.test(str);\n\t}\n\t\n\tvar META_IGNORE_OPTIONS = [ 'removeAdditional', 'useDefaults', 'coerceTypes' ];\n\t\n\t/**\n\t * Creates validator instance.\n\t * Usage: `Ajv(opts)`\n\t * @param {Object} opts optional options\n\t * @return {Object} ajv instance\n\t */\n\tfunction Ajv(opts) {\n\t if (!(this instanceof Ajv)) return new Ajv(opts);\n\t var self = this;\n\t\n\t opts = this._opts = util.copy(opts) || {};\n\t this._schemas = {};\n\t this._refs = {};\n\t this._formats = formats(opts.format);\n\t this._cache = opts.cache || new Cache;\n\t this._loadingSchemas = {};\n\t this.RULES = rules();\n\t\n\t // this is done on purpose, so that methods are bound to the instance\n\t // (without using bind) so that they can be used without the instance\n\t this.validate = validate;\n\t this.compile = compile;\n\t this.addSchema = addSchema;\n\t this.addMetaSchema = addMetaSchema;\n\t this.validateSchema = validateSchema;\n\t this.getSchema = getSchema;\n\t this.removeSchema = removeSchema;\n\t this.addFormat = addFormat;\n\t this.errorsText = errorsText;\n\t\n\t this._addSchema = _addSchema;\n\t this._compile = _compile;\n\t\n\t opts.loopRequired = opts.loopRequired || Infinity;\n\t if (opts.async || opts.transpile) async.setup(opts);\n\t if (opts.beautify === true) opts.beautify = { indent_size: 2 };\n\t if (opts.errorDataPath == 'property') opts._errorDataPathProperty = true;\n\t this._metaOpts = getMetaSchemaOptions();\n\t\n\t addInitialSchemas();\n\t if (opts.formats) addInitialFormats();\n\t if (opts.v5) v5.enable(this);\n\t if (typeof opts.meta == 'object') addMetaSchema(opts.meta);\n\t\n\t\n\t /**\n\t * Validate data using schema\n\t * Schema will be compiled and cached (using serialized JSON as key. [json-stable-stringify](https://github.com/substack/json-stable-stringify) is used to serialize.\n\t * @param {String|Object} schemaKeyRef key, ref or schema object\n\t * @param {Any} data to be validated\n\t * @return {Boolean} validation result. Errors from the last validation will be available in `ajv.errors` (and also in compiled schema: `schema.errors`).\n\t */\n\t function validate(schemaKeyRef, data) {\n\t var v;\n\t if (typeof schemaKeyRef == 'string') {\n\t v = getSchema(schemaKeyRef);\n\t if (!v) throw new Error('no schema with key or ref \"' + schemaKeyRef + '\"');\n\t } else {\n\t var schemaObj = _addSchema(schemaKeyRef);\n\t v = schemaObj.validate || _compile(schemaObj);\n\t }\n\t\n\t var valid = v(data);\n\t if (v.async) return self._opts.async == '*' ? co(valid) : valid;\n\t self.errors = v.errors;\n\t return valid;\n\t }\n\t\n\t\n\t /**\n\t * Create validating function for passed schema.\n\t * @param {Object} schema schema object\n\t * @return {Function} validating function\n\t */\n\t function compile(schema) {\n\t var schemaObj = _addSchema(schema);\n\t return schemaObj.validate || _compile(schemaObj);\n\t }\n\t\n\t\n\t /**\n\t * Adds schema to the instance.\n\t * @param {Object|Array} schema schema or array of schemas. If array is passed, `key` and other parameters will be ignored.\n\t * @param {String} key Optional schema key. Can be passed to `validate` method instead of schema object or id/ref. One schema per instance can have empty `id` and `key`.\n\t * @param {Boolean} _skipValidation true to skip schema validation. Used internally, option validateSchema should be used instead.\n\t * @param {Boolean} _meta true if schema is a meta-schema. Used internally, addMetaSchema should be used instead.\n\t */\n\t function addSchema(schema, key, _skipValidation, _meta) {\n\t if (Array.isArray(schema)){\n\t for (var i=0; i} errors optional array of validation errors, if not passed errors from the instance are used.\n\t * @param {Object} options optional options with properties `separator` and `dataVar`.\n\t * @return {String} human readable string with all errors descriptions\n\t */\n\t function errorsText(errors, options) {\n\t errors = errors || self.errors;\n\t if (!errors) return 'No errors';\n\t options = options || {};\n\t var separator = options.separator || ', ';\n\t var dataVar = options.dataVar || 'data';\n\t\n\t var text = '';\n\t for (var i=0; i= 0\n || format === 'transparent';\n }\n });\n\n // TODO: add more types here\n\n return function Decorator(target) {\n const proxyConfig = target.prototype.config;\n target.prototype.config = function proxy(name, value) {\n if (schema.hasOwnProperty(name)) {\n const valid = ajv.validate(schema[name], value);\n if (valid) {\n return proxyConfig.call(this, name, value);\n }\n\n // TODO: handle errors\n throw Error('invald config');\n } else {\n return proxyConfig.call(this, name, value);\n }\n };\n };\n}\n\nif (ON_TEST) {\n require('./index.spec.js')(KotoConfig);\n}\n\nexport default KotoConfig;\n\n\n\n/** WEBPACK FOOTER **\n ** ./index.js\n **/","(function(f){if(typeof exports===\"object\"&&typeof module!==\"undefined\"){module.exports=f()}else if(typeof define===\"function\"&&define.amd){define([],f)}else{var g;if(typeof window!==\"undefined\"){g=window}else if(typeof global!==\"undefined\"){g=global}else if(typeof self!==\"undefined\"){g=self}else{g=this}g.Ajv = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require==\"function\"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error(\"Cannot find module '\"+o+\"'\");throw f.code=\"MODULE_NOT_FOUND\",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require==\"function\"&&require;for(var o=0;o= 1 && month <= 12 && day >= 1 && day <= DAYS[month];\n}\n\n\nfunction time(str, full) {\n var matches = str.match(TIME);\n if (!matches) return false;\n\n var hour = matches[1];\n var minute = matches[2];\n var second = matches[3];\n var timeZone = matches[5];\n return hour <= 23 && minute <= 59 && second <= 59 && (!full || timeZone);\n}\n\n\nvar DATE_TIME_SEPARATOR = /t|\\s/i;\nfunction date_time(str) {\n // http://tools.ietf.org/html/rfc3339#section-5.6\n var dateTime = str.split(DATE_TIME_SEPARATOR);\n return date(dateTime[0]) && time(dateTime[1], true);\n}\n\n\nfunction hostname(str) {\n // http://tools.ietf.org/html/rfc1034#section-3.5\n return str.length <= 255 && HOSTNAME.test(str);\n}\n\n\nvar NOT_URI_FRAGMENT = /\\/|\\:/;\nfunction uri(str) {\n // http://jmrware.com/articles/2009/uri_regexp/URI_regex.html + optional protocol + required \".\"\n return NOT_URI_FRAGMENT.test(str) && URI.test(str);\n}\n\n\nfunction regex(str) {\n try {\n new RegExp(str);\n return true;\n } catch(e) {\n return false;\n }\n}\n\n\nfunction compareDate(d1, d2) {\n if (!(d1 && d2)) return;\n if (d1 > d2) return 1;\n if (d1 < d2) return -1;\n if (d1 === d2) return 0;\n}\n\n\nfunction compareTime(t1, t2) {\n if (!(t1 && t2)) return;\n t1 = t1.match(TIME);\n t2 = t2.match(TIME);\n if (!(t1 && t2)) return;\n t1 = t1[1] + t1[2] + t1[3] + (t1[4]||'');\n t2 = t2[1] + t2[2] + t2[3] + (t2[4]||'');\n if (t1 > t2) return 1;\n if (t1 < t2) return -1;\n if (t1 === t2) return 0;\n}\n\n\nfunction compareDateTime(dt1, dt2) {\n if (!(dt1 && dt2)) return;\n dt1 = dt1.split(DATE_TIME_SEPARATOR);\n dt2 = dt2.split(DATE_TIME_SEPARATOR);\n var res = compareDate(dt1[0], dt2[0]);\n if (res === undefined) return;\n return res || compareTime(dt1[1], dt2[1]);\n}\n\n},{\"./util\":10}],6:[function(require,module,exports){\n'use strict';\n\nvar resolve = require('./resolve')\n , util = require('./util')\n , stableStringify = require('json-stable-stringify')\n , async = require('../async');\n\nvar beautify = (function() { try { return require('' + 'js-beautify').js_beautify; } catch(e) {/*empty*/} })();\n\nvar validateGenerator = require('../dotjs/validate');\n\nmodule.exports = compile;\n\n\n/**\n * Compiles schema to validation function\n * @this Ajv\n * @param {Object} schema schema object\n * @param {Object} root object with information about the root schema for this schema\n * @param {Object} localRefs the hash of local references inside the schema (created by resolve.id), used for inline resolution\n * @param {String} baseId base ID for IDs in the schema\n * @return {Function} validation function\n */\nfunction compile(schema, root, localRefs, baseId) {\n /* jshint validthis: true, evil: true */\n /* eslint no-shadow: 0 */\n var self = this\n , opts = this._opts\n , refVal = [ undefined ]\n , refs = {}\n , patterns = []\n , patternsHash = {}\n , defaults = []\n , defaultsHash = {}\n , customRules = [];\n\n root = root || { schema: schema, refVal: refVal, refs: refs };\n\n var formats = this._formats;\n var RULES = this.RULES;\n\n return localCompile(schema, root, localRefs, baseId);\n\n\n function localCompile(_schema, _root, localRefs, baseId) {\n var isRoot = !_root || (_root && _root.schema == _schema);\n if (_root.schema != root.schema)\n return compile.call(self, _schema, _root, localRefs, baseId);\n\n var $async = _schema.$async === true;\n if ($async && !opts.transpile) async.setup(opts);\n\n var sourceCode = validateGenerator({\n isTop: true,\n schema: _schema,\n isRoot: isRoot,\n baseId: baseId,\n root: _root,\n schemaPath: '',\n errSchemaPath: '#',\n errorPath: '\"\"',\n RULES: RULES,\n validate: validateGenerator,\n util: util,\n resolve: resolve,\n resolveRef: resolveRef,\n usePattern: usePattern,\n useDefault: useDefault,\n useCustomRule: useCustomRule,\n opts: opts,\n formats: formats,\n self: self\n });\n\n sourceCode = vars(refVal, refValCode) + vars(patterns, patternCode)\n + vars(defaults, defaultCode) + vars(customRules, customRuleCode)\n + sourceCode;\n\n if (opts.beautify) {\n /* istanbul ignore else */\n if (beautify) sourceCode = beautify(sourceCode, opts.beautify);\n else console.error('\"npm install js-beautify\" to use beautify option');\n }\n // console.log('\\n\\n\\n *** \\n', sourceCode);\n var validate, validateCode\n , transpile = opts._transpileFunc;\n try {\n validateCode = $async && transpile\n ? transpile(sourceCode)\n : sourceCode;\n eval(validateCode);\n refVal[0] = validate;\n } catch(e) {\n console.error('Error compiling schema, function code:', validateCode);\n throw e;\n }\n\n validate.schema = _schema;\n validate.errors = null;\n validate.refs = refs;\n validate.refVal = refVal;\n validate.root = isRoot ? validate : _root;\n if ($async) validate.async = true;\n if (transpile) validate.sourceCode = sourceCode;\n\n return validate;\n }\n\n function resolveRef(baseId, ref, isRoot) {\n ref = resolve.url(baseId, ref);\n var refIndex = refs[ref];\n var _refVal, refCode;\n if (refIndex !== undefined) {\n _refVal = refVal[refIndex];\n refCode = 'refVal[' + refIndex + ']';\n return resolvedRef(_refVal, refCode);\n }\n if (!isRoot) {\n var rootRefId = root.refs[ref];\n if (rootRefId !== undefined) {\n _refVal = root.refVal[rootRefId];\n refCode = addLocalRef(ref, _refVal);\n return resolvedRef(_refVal, refCode);\n }\n }\n\n refCode = addLocalRef(ref);\n var v = resolve.call(self, localCompile, root, ref);\n if (!v) {\n var localSchema = localRefs && localRefs[ref];\n if (localSchema) {\n v = resolve.inlineRef(localSchema, opts.inlineRefs)\n ? localSchema\n : compile.call(self, localSchema, root, localRefs, baseId);\n }\n }\n\n if (v) {\n replaceLocalRef(ref, v);\n return resolvedRef(v, refCode);\n }\n }\n\n function addLocalRef(ref, v) {\n var refId = refVal.length;\n refVal[refId] = v;\n refs[ref] = refId;\n return 'refVal' + refId;\n }\n\n function replaceLocalRef(ref, v) {\n var refId = refs[ref];\n refVal[refId] = v;\n }\n\n function resolvedRef(refVal, code) {\n return typeof refVal == 'object'\n ? { code: code, schema: refVal, inline: true }\n : { code: code, async: refVal && refVal.async };\n }\n\n function usePattern(regexStr) {\n var index = patternsHash[regexStr];\n if (index === undefined) {\n index = patternsHash[regexStr] = patterns.length;\n patterns[index] = regexStr;\n }\n return 'pattern' + index;\n }\n\n function useDefault(value) {\n switch (typeof value) {\n case 'boolean':\n case 'number':\n return '' + value;\n case 'string':\n return util.toQuotedString(value);\n case 'object':\n if (value === null) return 'null';\n var valueStr = stableStringify(value);\n var index = defaultsHash[valueStr];\n if (index === undefined) {\n index = defaultsHash[valueStr] = defaults.length;\n defaults[index] = value;\n }\n return 'default' + index;\n }\n }\n\n function useCustomRule(rule, schema, parentSchema, it) {\n var compile = rule.definition.compile\n , inline = rule.definition.inline\n , macro = rule.definition.macro;\n\n var validate;\n if (compile) {\n validate = compile.call(self, schema, parentSchema);\n } else if (macro) {\n validate = macro.call(self, schema, parentSchema);\n if (opts.validateSchema !== false) self.validateSchema(validate, true);\n } else if (inline) {\n validate = inline.call(self, it, rule.keyword, schema, parentSchema);\n } else {\n validate = rule.definition.validate;\n }\n\n var index = customRules.length;\n customRules[index] = validate;\n\n return {\n code: 'customRule' + index,\n validate: validate\n };\n }\n}\n\n\nfunction patternCode(i, patterns) {\n return 'var pattern' + i + ' = new RegExp(' + util.toQuotedString(patterns[i]) + ');';\n}\n\n\nfunction defaultCode(i) {\n return 'var default' + i + ' = defaults[' + i + '];';\n}\n\n\nfunction refValCode(i, refVal) {\n return refVal[i] ? 'var refVal' + i + ' = refVal[' + i + '];' : '';\n}\n\n\nfunction customRuleCode(i) {\n return 'var customRule' + i + ' = customRules[' + i + '];';\n}\n\n\nfunction vars(arr, statement) {\n if (!arr.length) return '';\n var code = '';\n for (var i=0; i= 0xD800 && value <= 0xDBFF && pos < len) {\n // high surrogate, and there is a next character\n value = str.charCodeAt(pos);\n if ((value & 0xFC00) == 0xDC00) pos++; // low surrogate\n }\n }\n return length;\n}\n\n\nfunction varOccurences(str, dataVar) {\n dataVar += '[^0-9]';\n var matches = str.match(new RegExp(dataVar, 'g'));\n return matches ? matches.length : 0;\n}\n\n\nfunction varReplace(str, dataVar, expr) {\n dataVar += '([^0-9])';\n expr = expr.replace(/\\$/g, '$$$$');\n return str.replace(new RegExp(dataVar, 'g'), expr + '$1');\n}\n\n\nvar EMPTY_ELSE = /else\\s*{\\s*}/g\n , EMPTY_IF_NO_ELSE = /if\\s*\\([^)]+\\)\\s*\\{\\s*\\}(?!\\s*else)/g\n , EMPTY_IF_WITH_ELSE = /if\\s*\\(([^)]+)\\)\\s*\\{\\s*\\}\\s*else(?!\\s*if)/g;\nfunction cleanUpCode(out) {\n return out.replace(EMPTY_ELSE, '')\n .replace(EMPTY_IF_NO_ELSE, '')\n .replace(EMPTY_IF_WITH_ELSE, 'if (!($1))');\n}\n\n\nvar ERRORS_REGEXP = /[^v\\.]errors/g\n , REMOVE_ERRORS = /var errors = 0;|var vErrors = null;|validate.errors = vErrors;/g\n , REMOVE_ERRORS_ASYNC = /var errors = 0;|var vErrors = null;/g\n , RETURN_VALID = 'return errors === 0;'\n , RETURN_TRUE = 'validate.errors = null; return true;'\n , RETURN_ASYNC = /if \\(errors === 0\\) return true;\\s*else throw new ValidationError\\(vErrors\\);/\n , RETURN_TRUE_ASYNC = 'return true;';\n\nfunction cleanUpVarErrors(out, async) {\n var matches = out.match(ERRORS_REGEXP);\n if (!matches || matches.length !== 2) return out;\n return async\n ? out.replace(REMOVE_ERRORS_ASYNC, '')\n .replace(RETURN_ASYNC, RETURN_TRUE_ASYNC)\n : out.replace(REMOVE_ERRORS, '')\n .replace(RETURN_VALID, RETURN_TRUE);\n}\n\n\nfunction schemaHasRules(schema, rules) {\n for (var key in schema) if (rules[key]) return true;\n}\n\n\nfunction toQuotedString(str) {\n return '\\'' + escapeQuotes(str) + '\\'';\n}\n\n\nfunction getPathExpr(currentPath, expr, jsonPointers, isNumber) {\n var path = jsonPointers // false by default\n ? '\\'/\\' + ' + expr + (isNumber ? '' : '.replace(/~/g, \\'~0\\').replace(/\\\\//g, \\'~1\\')')\n : (isNumber ? '\\'[\\' + ' + expr + ' + \\']\\'' : '\\'[\\\\\\'\\' + ' + expr + ' + \\'\\\\\\']\\'');\n return joinPaths(currentPath, path);\n}\n\n\nfunction getPath(currentPath, prop, jsonPointers) {\n var path = jsonPointers // false by default\n ? toQuotedString('/' + escapeJsonPointer(prop))\n : toQuotedString(getProperty(prop));\n return joinPaths(currentPath, path);\n}\n\n\nvar RELATIVE_JSON_POINTER = /^([0-9]+)(#|\\/(?:[^~]|~0|~1)*)?$/;\nfunction getData($data, lvl, paths) {\n var matches = $data.match(RELATIVE_JSON_POINTER);\n if (!matches) throw new Error('Invalid relative JSON-pointer: ' + $data);\n var up = +matches[1];\n var jsonPointer = matches[2];\n if (jsonPointer == '#') {\n if (up >= lvl) throw new Error('Cannot access property/index ' + up + ' levels up, current level is ' + lvl);\n return paths[lvl - up];\n }\n\n if (up > lvl) throw new Error('Cannot access data ' + up + ' levels up, current level is ' + lvl);\n var data = 'data' + ((lvl - up) || '');\n if (!jsonPointer) return data;\n\n var expr = data;\n var segments = jsonPointer.split('/');\n for (var i=0; i',\n $result = 'result' + $lvl;\n var $isData = it.opts.v5 && $schema.$data;\n var $schemaValue = $isData ? it.util.getData($schema.$data, $dataLvl, it.dataPathArr) : $schema;\n if ($isData) {\n out += ' var schema' + ($lvl) + ' = ' + ($schemaValue) + '; ';\n $schemaValue = 'schema' + $lvl;\n }\n if ($isDataExcl) {\n var $schemaValueExcl = it.util.getData($schemaExcl.$data, $dataLvl, it.dataPathArr),\n $exclusive = 'exclusive' + $lvl,\n $opExpr = 'op' + $lvl,\n $opStr = '\\' + ' + $opExpr + ' + \\'';\n out += ' var schemaExcl' + ($lvl) + ' = ' + ($schemaValueExcl) + '; ';\n $schemaValueExcl = 'schemaExcl' + $lvl;\n out += ' if (typeof ' + ($schemaValueExcl) + ' != \\'boolean\\' && ' + ($schemaValueExcl) + ' !== undefined) { ' + ($valid) + ' = false; ';\n var $errorKeyword = $exclusiveKeyword;\n var $$outStack = $$outStack || [];\n $$outStack.push(out);\n out = ''; /* istanbul ignore else */\n if (it.createErrors !== false) {\n out += ' { keyword: \\'' + ($errorKeyword || '_exclusiveFormatLimit') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: \"' + ($errSchemaPath) + '\" , params: {} ';\n if (it.opts.messages !== false) {\n out += ' , message: \\'' + ($exclusiveKeyword) + ' should be boolean\\' ';\n }\n if (it.opts.verbose) {\n out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n }\n out += ' } ';\n } else {\n out += ' {} ';\n }\n var __err = out;\n out = $$outStack.pop();\n if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */\n if (it.async) {\n out += ' throw new ValidationError([' + (__err) + ']); ';\n } else {\n out += ' validate.errors = [' + (__err) + ']; return false; ';\n }\n } else {\n out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n }\n out += ' } ';\n if ($breakOnError) {\n $closingBraces += '}';\n out += ' else { ';\n }\n if ($isData) {\n out += ' if (' + ($schemaValue) + ' === undefined) ' + ($valid) + ' = true; else if (typeof ' + ($schemaValue) + ' != \\'string\\') ' + ($valid) + ' = false; else { ';\n $closingBraces += '}';\n }\n if ($isDataFormat) {\n out += ' if (!' + ($compare) + ') ' + ($valid) + ' = true; else { ';\n $closingBraces += '}';\n }\n out += ' var ' + ($result) + ' = ' + ($compare) + '(' + ($data) + ', ';\n if ($isData) {\n out += '' + ($schemaValue);\n } else {\n out += '' + (it.util.toQuotedString($schema));\n }\n out += ' ); if (' + ($result) + ' === undefined) ' + ($valid) + ' = false; var exclusive' + ($lvl) + ' = ' + ($schemaValueExcl) + ' === true; if (' + ($valid) + ' === undefined) { ' + ($valid) + ' = exclusive' + ($lvl) + ' ? ' + ($result) + ' ' + ($op) + ' 0 : ' + ($result) + ' ' + ($op) + '= 0; } if (!' + ($valid) + ') var op' + ($lvl) + ' = exclusive' + ($lvl) + ' ? \\'' + ($op) + '\\' : \\'' + ($op) + '=\\';';\n } else {\n var $exclusive = $schemaExcl === true,\n $opStr = $op;\n if (!$exclusive) $opStr += '=';\n var $opExpr = '\\'' + $opStr + '\\'';\n if ($isData) {\n out += ' if (' + ($schemaValue) + ' === undefined) ' + ($valid) + ' = true; else if (typeof ' + ($schemaValue) + ' != \\'string\\') ' + ($valid) + ' = false; else { ';\n $closingBraces += '}';\n }\n if ($isDataFormat) {\n out += ' if (!' + ($compare) + ') ' + ($valid) + ' = true; else { ';\n $closingBraces += '}';\n }\n out += ' var ' + ($result) + ' = ' + ($compare) + '(' + ($data) + ', ';\n if ($isData) {\n out += '' + ($schemaValue);\n } else {\n out += '' + (it.util.toQuotedString($schema));\n }\n out += ' ); if (' + ($result) + ' === undefined) ' + ($valid) + ' = false; if (' + ($valid) + ' === undefined) ' + ($valid) + ' = ' + ($result) + ' ' + ($op);\n if (!$exclusive) {\n out += '=';\n }\n out += ' 0;';\n }\n out += '' + ($closingBraces) + 'if (!' + ($valid) + ') { ';\n var $errorKeyword = $keyword;\n var $$outStack = $$outStack || [];\n $$outStack.push(out);\n out = ''; /* istanbul ignore else */\n if (it.createErrors !== false) {\n out += ' { keyword: \\'' + ($errorKeyword || '_formatLimit') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: \"' + ($errSchemaPath) + '\" , params: { limit: ';\n if ($isData) {\n out += '' + ($schemaValue);\n } else {\n out += '' + (it.util.toQuotedString($schema));\n }\n out += ' } ';\n if (it.opts.messages !== false) {\n out += ' , message: \\'should be ' + ($opStr) + ' \"';\n if ($isData) {\n out += '\\' + ' + ($schemaValue) + ' + \\'';\n } else {\n out += '' + (it.util.escapeQuotes($schema));\n }\n out += '\"\\' ';\n }\n if (it.opts.verbose) {\n out += ' , schema: ';\n if ($isData) {\n out += 'validate.schema' + ($schemaPath);\n } else {\n out += '' + (it.util.toQuotedString($schema));\n }\n out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n }\n out += ' } ';\n } else {\n out += ' {} ';\n }\n var __err = out;\n out = $$outStack.pop();\n if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */\n if (it.async) {\n out += ' throw new ValidationError([' + (__err) + ']); ';\n } else {\n out += ' validate.errors = [' + (__err) + ']; return false; ';\n }\n } else {\n out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n }\n out += '}';\n return out;\n}\n\n},{}],13:[function(require,module,exports){\n'use strict';\nmodule.exports = function generate__limit(it, $keyword) {\n var out = ' ';\n var $lvl = it.level;\n var $dataLvl = it.dataLevel;\n var $schema = it.schema[$keyword];\n var $schemaPath = it.schemaPath + '.' + $keyword;\n var $errSchemaPath = it.errSchemaPath + '/' + $keyword;\n var $breakOnError = !it.opts.allErrors;\n var $errorKeyword;\n var $data = 'data' + ($dataLvl || '');\n var $isData = it.opts.v5 && $schema.$data;\n var $schemaValue = $isData ? it.util.getData($schema.$data, $dataLvl, it.dataPathArr) : $schema;\n if ($isData) {\n out += ' var schema' + ($lvl) + ' = ' + ($schemaValue) + '; ';\n $schemaValue = 'schema' + $lvl;\n }\n var $isMax = $keyword == 'maximum',\n $exclusiveKeyword = $isMax ? 'exclusiveMaximum' : 'exclusiveMinimum',\n $schemaExcl = it.schema[$exclusiveKeyword],\n $isDataExcl = it.opts.v5 && $schemaExcl && $schemaExcl.$data,\n $op = $isMax ? '<' : '>',\n $notOp = $isMax ? '>' : '<';\n if ($isDataExcl) {\n var $schemaValueExcl = it.util.getData($schemaExcl.$data, $dataLvl, it.dataPathArr),\n $exclusive = 'exclusive' + $lvl,\n $opExpr = 'op' + $lvl,\n $opStr = '\\' + ' + $opExpr + ' + \\'';\n out += ' var schemaExcl' + ($lvl) + ' = ' + ($schemaValueExcl) + '; ';\n $schemaValueExcl = 'schemaExcl' + $lvl;\n out += ' var exclusive' + ($lvl) + '; if (typeof ' + ($schemaValueExcl) + ' != \\'boolean\\' && typeof ' + ($schemaValueExcl) + ' != \\'undefined\\') { ';\n var $errorKeyword = $exclusiveKeyword;\n var $$outStack = $$outStack || [];\n $$outStack.push(out);\n out = ''; /* istanbul ignore else */\n if (it.createErrors !== false) {\n out += ' { keyword: \\'' + ($errorKeyword || '_exclusiveLimit') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: \"' + ($errSchemaPath) + '\" , params: {} ';\n if (it.opts.messages !== false) {\n out += ' , message: \\'' + ($exclusiveKeyword) + ' should be boolean\\' ';\n }\n if (it.opts.verbose) {\n out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n }\n out += ' } ';\n } else {\n out += ' {} ';\n }\n var __err = out;\n out = $$outStack.pop();\n if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */\n if (it.async) {\n out += ' throw new ValidationError([' + (__err) + ']); ';\n } else {\n out += ' validate.errors = [' + (__err) + ']; return false; ';\n }\n } else {\n out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n }\n out += ' } else if( ';\n if ($isData) {\n out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \\'number\\') || ';\n }\n out += ' ((exclusive' + ($lvl) + ' = ' + ($schemaValueExcl) + ' === true) ? ' + ($data) + ' ' + ($notOp) + '= ' + ($schemaValue) + ' : ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ')) { var op' + ($lvl) + ' = exclusive' + ($lvl) + ' ? \\'' + ($op) + '\\' : \\'' + ($op) + '=\\';';\n } else {\n var $exclusive = $schemaExcl === true,\n $opStr = $op;\n if (!$exclusive) $opStr += '=';\n var $opExpr = '\\'' + $opStr + '\\'';\n out += ' if ( ';\n if ($isData) {\n out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \\'number\\') || ';\n }\n out += ' ' + ($data) + ' ' + ($notOp);\n if ($exclusive) {\n out += '=';\n }\n out += ' ' + ($schemaValue) + ') {';\n }\n var $errorKeyword = $keyword;\n var $$outStack = $$outStack || [];\n $$outStack.push(out);\n out = ''; /* istanbul ignore else */\n if (it.createErrors !== false) {\n out += ' { keyword: \\'' + ($errorKeyword || '_limit') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: \"' + ($errSchemaPath) + '\" , params: { comparison: ' + ($opExpr) + ', limit: ' + ($schemaValue) + ', exclusive: ' + ($exclusive) + ' } ';\n if (it.opts.messages !== false) {\n out += ' , message: \\'should be ' + ($opStr) + ' ';\n if ($isData) {\n out += '\\' + ' + ($schemaValue);\n } else {\n out += '' + ($schema) + '\\'';\n }\n }\n if (it.opts.verbose) {\n out += ' , schema: ';\n if ($isData) {\n out += 'validate.schema' + ($schemaPath);\n } else {\n out += '' + ($schema);\n }\n out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n }\n out += ' } ';\n } else {\n out += ' {} ';\n }\n var __err = out;\n out = $$outStack.pop();\n if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */\n if (it.async) {\n out += ' throw new ValidationError([' + (__err) + ']); ';\n } else {\n out += ' validate.errors = [' + (__err) + ']; return false; ';\n }\n } else {\n out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n }\n out += ' } ';\n if ($breakOnError) {\n out += ' else { ';\n }\n return out;\n}\n\n},{}],14:[function(require,module,exports){\n'use strict';\nmodule.exports = function generate__limitItems(it, $keyword) {\n var out = ' ';\n var $lvl = it.level;\n var $dataLvl = it.dataLevel;\n var $schema = it.schema[$keyword];\n var $schemaPath = it.schemaPath + '.' + $keyword;\n var $errSchemaPath = it.errSchemaPath + '/' + $keyword;\n var $breakOnError = !it.opts.allErrors;\n var $errorKeyword;\n var $data = 'data' + ($dataLvl || '');\n var $isData = it.opts.v5 && $schema.$data;\n var $schemaValue = $isData ? it.util.getData($schema.$data, $dataLvl, it.dataPathArr) : $schema;\n if ($isData) {\n out += ' var schema' + ($lvl) + ' = ' + ($schemaValue) + '; ';\n $schemaValue = 'schema' + $lvl;\n }\n var $op = $keyword == 'maxItems' ? '>' : '<';\n out += 'if ( ';\n if ($isData) {\n out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \\'number\\') || ';\n }\n out += ' ' + ($data) + '.length ' + ($op) + ' ' + ($schemaValue) + ') { ';\n var $errorKeyword = $keyword;\n var $$outStack = $$outStack || [];\n $$outStack.push(out);\n out = ''; /* istanbul ignore else */\n if (it.createErrors !== false) {\n out += ' { keyword: \\'' + ($errorKeyword || '_limitItems') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: \"' + ($errSchemaPath) + '\" , params: { limit: ' + ($schemaValue) + ' } ';\n if (it.opts.messages !== false) {\n out += ' , message: \\'should NOT have ';\n if ($keyword == 'maxItems') {\n out += 'more';\n } else {\n out += 'less';\n }\n out += ' than ';\n if ($isData) {\n out += '\\' + ' + ($schemaValue) + ' + \\'';\n } else {\n out += '' + ($schema);\n }\n out += ' items\\' ';\n }\n if (it.opts.verbose) {\n out += ' , schema: ';\n if ($isData) {\n out += 'validate.schema' + ($schemaPath);\n } else {\n out += '' + ($schema);\n }\n out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n }\n out += ' } ';\n } else {\n out += ' {} ';\n }\n var __err = out;\n out = $$outStack.pop();\n if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */\n if (it.async) {\n out += ' throw new ValidationError([' + (__err) + ']); ';\n } else {\n out += ' validate.errors = [' + (__err) + ']; return false; ';\n }\n } else {\n out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n }\n out += '} ';\n if ($breakOnError) {\n out += ' else { ';\n }\n return out;\n}\n\n},{}],15:[function(require,module,exports){\n'use strict';\nmodule.exports = function generate__limitLength(it, $keyword) {\n var out = ' ';\n var $lvl = it.level;\n var $dataLvl = it.dataLevel;\n var $schema = it.schema[$keyword];\n var $schemaPath = it.schemaPath + '.' + $keyword;\n var $errSchemaPath = it.errSchemaPath + '/' + $keyword;\n var $breakOnError = !it.opts.allErrors;\n var $errorKeyword;\n var $data = 'data' + ($dataLvl || '');\n var $isData = it.opts.v5 && $schema.$data;\n var $schemaValue = $isData ? it.util.getData($schema.$data, $dataLvl, it.dataPathArr) : $schema;\n if ($isData) {\n out += ' var schema' + ($lvl) + ' = ' + ($schemaValue) + '; ';\n $schemaValue = 'schema' + $lvl;\n }\n var $op = $keyword == 'maxLength' ? '>' : '<';\n out += 'if ( ';\n if ($isData) {\n out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \\'number\\') || ';\n }\n if (it.opts.unicode === false) {\n out += ' ' + ($data) + '.length ';\n } else {\n out += ' ucs2length(' + ($data) + ') ';\n }\n out += ' ' + ($op) + ' ' + ($schemaValue) + ') { ';\n var $errorKeyword = $keyword;\n var $$outStack = $$outStack || [];\n $$outStack.push(out);\n out = ''; /* istanbul ignore else */\n if (it.createErrors !== false) {\n out += ' { keyword: \\'' + ($errorKeyword || '_limitLength') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: \"' + ($errSchemaPath) + '\" , params: { limit: ' + ($schemaValue) + ' } ';\n if (it.opts.messages !== false) {\n out += ' , message: \\'should NOT be ';\n if ($keyword == 'maxLength') {\n out += 'longer';\n } else {\n out += 'shorter';\n }\n out += ' than ';\n if ($isData) {\n out += '\\' + ' + ($schemaValue) + ' + \\'';\n } else {\n out += '' + ($schema);\n }\n out += ' characters\\' ';\n }\n if (it.opts.verbose) {\n out += ' , schema: ';\n if ($isData) {\n out += 'validate.schema' + ($schemaPath);\n } else {\n out += '' + ($schema);\n }\n out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n }\n out += ' } ';\n } else {\n out += ' {} ';\n }\n var __err = out;\n out = $$outStack.pop();\n if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */\n if (it.async) {\n out += ' throw new ValidationError([' + (__err) + ']); ';\n } else {\n out += ' validate.errors = [' + (__err) + ']; return false; ';\n }\n } else {\n out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n }\n out += '} ';\n if ($breakOnError) {\n out += ' else { ';\n }\n return out;\n}\n\n},{}],16:[function(require,module,exports){\n'use strict';\nmodule.exports = function generate__limitProperties(it, $keyword) {\n var out = ' ';\n var $lvl = it.level;\n var $dataLvl = it.dataLevel;\n var $schema = it.schema[$keyword];\n var $schemaPath = it.schemaPath + '.' + $keyword;\n var $errSchemaPath = it.errSchemaPath + '/' + $keyword;\n var $breakOnError = !it.opts.allErrors;\n var $errorKeyword;\n var $data = 'data' + ($dataLvl || '');\n var $isData = it.opts.v5 && $schema.$data;\n var $schemaValue = $isData ? it.util.getData($schema.$data, $dataLvl, it.dataPathArr) : $schema;\n if ($isData) {\n out += ' var schema' + ($lvl) + ' = ' + ($schemaValue) + '; ';\n $schemaValue = 'schema' + $lvl;\n }\n var $op = $keyword == 'maxProperties' ? '>' : '<';\n out += 'if ( ';\n if ($isData) {\n out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \\'number\\') || ';\n }\n out += ' Object.keys(' + ($data) + ').length ' + ($op) + ' ' + ($schemaValue) + ') { ';\n var $errorKeyword = $keyword;\n var $$outStack = $$outStack || [];\n $$outStack.push(out);\n out = ''; /* istanbul ignore else */\n if (it.createErrors !== false) {\n out += ' { keyword: \\'' + ($errorKeyword || '_limitProperties') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: \"' + ($errSchemaPath) + '\" , params: { limit: ' + ($schemaValue) + ' } ';\n if (it.opts.messages !== false) {\n out += ' , message: \\'should NOT have ';\n if ($keyword == 'maxProperties') {\n out += 'more';\n } else {\n out += 'less';\n }\n out += ' than ';\n if ($isData) {\n out += '\\' + ' + ($schemaValue) + ' + \\'';\n } else {\n out += '' + ($schema);\n }\n out += ' properties\\' ';\n }\n if (it.opts.verbose) {\n out += ' , schema: ';\n if ($isData) {\n out += 'validate.schema' + ($schemaPath);\n } else {\n out += '' + ($schema);\n }\n out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n }\n out += ' } ';\n } else {\n out += ' {} ';\n }\n var __err = out;\n out = $$outStack.pop();\n if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */\n if (it.async) {\n out += ' throw new ValidationError([' + (__err) + ']); ';\n } else {\n out += ' validate.errors = [' + (__err) + ']; return false; ';\n }\n } else {\n out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n }\n out += '} ';\n if ($breakOnError) {\n out += ' else { ';\n }\n return out;\n}\n\n},{}],17:[function(require,module,exports){\n'use strict';\nmodule.exports = function generate_allOf(it, $keyword) {\n var out = ' ';\n var $schema = it.schema[$keyword];\n var $schemaPath = it.schemaPath + '.' + $keyword;\n var $errSchemaPath = it.errSchemaPath + '/' + $keyword;\n var $breakOnError = !it.opts.allErrors;\n var $it = it.util.copy(it);\n var $closingBraces = '';\n $it.level++;\n var arr1 = $schema;\n if (arr1) {\n var $sch, $i = -1,\n l1 = arr1.length - 1;\n while ($i < l1) {\n $sch = arr1[$i += 1];\n if (it.util.schemaHasRules($sch, it.RULES.all)) {\n $it.schema = $sch;\n $it.schemaPath = $schemaPath + '[' + $i + ']';\n $it.errSchemaPath = $errSchemaPath + '/' + $i;\n out += ' ' + (it.validate($it)) + ' ';\n if ($breakOnError) {\n out += ' if (valid' + ($it.level) + ') { ';\n $closingBraces += '}';\n }\n }\n }\n }\n if ($breakOnError) {\n out += ' ' + ($closingBraces.slice(0, -1));\n }\n out = it.util.cleanUpCode(out);\n return out;\n}\n\n},{}],18:[function(require,module,exports){\n'use strict';\nmodule.exports = function generate_anyOf(it, $keyword) {\n var out = ' ';\n var $lvl = it.level;\n var $dataLvl = it.dataLevel;\n var $schema = it.schema[$keyword];\n var $schemaPath = it.schemaPath + '.' + $keyword;\n var $errSchemaPath = it.errSchemaPath + '/' + $keyword;\n var $breakOnError = !it.opts.allErrors;\n var $errorKeyword;\n var $data = 'data' + ($dataLvl || '');\n var $valid = 'valid' + $lvl;\n var $errs = 'errs__' + $lvl;\n var $it = it.util.copy(it);\n var $closingBraces = '';\n $it.level++;\n var $noEmptySchema = $schema.every(function($sch) {\n return it.util.schemaHasRules($sch, it.RULES.all);\n });\n if ($noEmptySchema) {\n out += ' var ' + ($errs) + ' = errors; var ' + ($valid) + ' = false; ';\n var $wasComposite = it.compositeRule;\n it.compositeRule = $it.compositeRule = true;\n var arr1 = $schema;\n if (arr1) {\n var $sch, $i = -1,\n l1 = arr1.length - 1;\n while ($i < l1) {\n $sch = arr1[$i += 1];\n $it.schema = $sch;\n $it.schemaPath = $schemaPath + '[' + $i + ']';\n $it.errSchemaPath = $errSchemaPath + '/' + $i;\n out += ' ' + (it.validate($it)) + ' ' + ($valid) + ' = ' + ($valid) + ' || valid' + ($it.level) + '; if (!' + ($valid) + ') { ';\n $closingBraces += '}';\n }\n }\n it.compositeRule = $it.compositeRule = $wasComposite;\n out += ' ' + ($closingBraces) + ' if (!' + ($valid) + ') { var err = '; /* istanbul ignore else */\n if (it.createErrors !== false) {\n out += ' { keyword: \\'' + ($errorKeyword || 'anyOf') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: \"' + ($errSchemaPath) + '\" , params: {} ';\n if (it.opts.messages !== false) {\n out += ' , message: \\'should match some schema in anyOf\\' ';\n }\n if (it.opts.verbose) {\n out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n }\n out += ' } ';\n } else {\n out += ' {} ';\n }\n out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } else { errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } ';\n if (it.opts.allErrors) {\n out += ' } ';\n }\n out = it.util.cleanUpCode(out);\n } else {\n if ($breakOnError) {\n out += ' if (true) { ';\n }\n }\n return out;\n}\n\n},{}],19:[function(require,module,exports){\n'use strict';\nmodule.exports = function generate_constant(it, $keyword) {\n var out = ' ';\n var $lvl = it.level;\n var $dataLvl = it.dataLevel;\n var $schema = it.schema[$keyword];\n var $schemaPath = it.schemaPath + '.' + $keyword;\n var $errSchemaPath = it.errSchemaPath + '/' + $keyword;\n var $breakOnError = !it.opts.allErrors;\n var $errorKeyword;\n var $data = 'data' + ($dataLvl || '');\n var $valid = 'valid' + $lvl;\n var $isData = it.opts.v5 && $schema.$data;\n var $schemaValue = $isData ? it.util.getData($schema.$data, $dataLvl, it.dataPathArr) : $schema;\n if ($isData) {\n out += ' var schema' + ($lvl) + ' = ' + ($schemaValue) + '; ';\n $schemaValue = 'schema' + $lvl;\n }\n if (!$isData) {\n out += ' var schema' + ($lvl) + ' = validate.schema' + ($schemaPath) + ';';\n }\n out += 'var ' + ($valid) + ' = equal(' + ($data) + ', schema' + ($lvl) + '); if (!' + ($valid) + ') { ';\n var $$outStack = $$outStack || [];\n $$outStack.push(out);\n out = ''; /* istanbul ignore else */\n if (it.createErrors !== false) {\n out += ' { keyword: \\'' + ($errorKeyword || 'constant') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: \"' + ($errSchemaPath) + '\" , params: {} ';\n if (it.opts.messages !== false) {\n out += ' , message: \\'should be equal to constant\\' ';\n }\n if (it.opts.verbose) {\n out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n }\n out += ' } ';\n } else {\n out += ' {} ';\n }\n var __err = out;\n out = $$outStack.pop();\n if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */\n if (it.async) {\n out += ' throw new ValidationError([' + (__err) + ']); ';\n } else {\n out += ' validate.errors = [' + (__err) + ']; return false; ';\n }\n } else {\n out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n }\n out += ' }';\n return out;\n}\n\n},{}],20:[function(require,module,exports){\n'use strict';\nmodule.exports = function generate_dependencies(it, $keyword) {\n var out = ' ';\n var $lvl = it.level;\n var $dataLvl = it.dataLevel;\n var $schema = it.schema[$keyword];\n var $schemaPath = it.schemaPath + '.' + $keyword;\n var $errSchemaPath = it.errSchemaPath + '/' + $keyword;\n var $breakOnError = !it.opts.allErrors;\n var $errorKeyword;\n var $data = 'data' + ($dataLvl || '');\n var $errs = 'errs__' + $lvl;\n var $it = it.util.copy(it);\n var $closingBraces = '';\n $it.level++;\n var $schemaDeps = {},\n $propertyDeps = {};\n for ($property in $schema) {\n var $sch = $schema[$property];\n var $deps = Array.isArray($sch) ? $propertyDeps : $schemaDeps;\n $deps[$property] = $sch;\n }\n out += 'var ' + ($errs) + ' = errors;';\n var $currentErrorPath = it.errorPath;\n out += 'var missing' + ($lvl) + ';';\n for (var $property in $propertyDeps) {\n $deps = $propertyDeps[$property];\n out += ' if (' + ($data) + (it.util.getProperty($property)) + ' !== undefined && ( ';\n var arr1 = $deps;\n if (arr1) {\n var _$property, $i = -1,\n l1 = arr1.length - 1;\n while ($i < l1) {\n _$property = arr1[$i += 1];\n if ($i) {\n out += ' || ';\n }\n var $prop = it.util.getProperty(_$property);\n out += ' ( ' + ($data) + ($prop) + ' === undefined && (missing' + ($lvl) + ' = ' + (it.util.toQuotedString(it.opts.jsonPointers ? _$property : $prop)) + ') ) ';\n }\n }\n out += ')) { ';\n var $propertyPath = 'missing' + $lvl,\n $missingProperty = '\\' + ' + $propertyPath + ' + \\'';\n if (it.opts._errorDataPathProperty) {\n it.errorPath = it.opts.jsonPointers ? it.util.getPathExpr($currentErrorPath, $propertyPath, true) : $currentErrorPath + ' + ' + $propertyPath;\n }\n var $$outStack = $$outStack || [];\n $$outStack.push(out);\n out = ''; /* istanbul ignore else */\n if (it.createErrors !== false) {\n out += ' { keyword: \\'' + ($errorKeyword || 'dependencies') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: \"' + ($errSchemaPath) + '\" , params: { property: \\'' + (it.util.escapeQuotes($property)) + '\\', missingProperty: \\'' + ($missingProperty) + '\\', depsCount: ' + ($deps.length) + ', deps: \\'' + (it.util.escapeQuotes($deps.length == 1 ? $deps[0] : $deps.join(\", \"))) + '\\' } ';\n if (it.opts.messages !== false) {\n out += ' , message: \\'should have ';\n if ($deps.length == 1) {\n out += 'property ' + (it.util.escapeQuotes($deps[0]));\n } else {\n out += 'properties ' + (it.util.escapeQuotes($deps.join(\", \")));\n }\n out += ' when property ' + (it.util.escapeQuotes($property)) + ' is present\\' ';\n }\n if (it.opts.verbose) {\n out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n }\n out += ' } ';\n } else {\n out += ' {} ';\n }\n var __err = out;\n out = $$outStack.pop();\n if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */\n if (it.async) {\n out += ' throw new ValidationError([' + (__err) + ']); ';\n } else {\n out += ' validate.errors = [' + (__err) + ']; return false; ';\n }\n } else {\n out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n }\n out += ' } ';\n if ($breakOnError) {\n $closingBraces += '}';\n out += ' else { ';\n }\n }\n it.errorPath = $currentErrorPath;\n for (var $property in $schemaDeps) {\n var $sch = $schemaDeps[$property];\n if (it.util.schemaHasRules($sch, it.RULES.all)) {\n out += ' valid' + ($it.level) + ' = true; if (' + ($data) + '[\\'' + ($property) + '\\'] !== undefined) { ';\n $it.schema = $sch;\n $it.schemaPath = $schemaPath + it.util.getProperty($property);\n $it.errSchemaPath = $errSchemaPath + '/' + it.util.escapeFragment($property);\n out += ' ' + (it.validate($it)) + ' } ';\n if ($breakOnError) {\n out += ' if (valid' + ($it.level) + ') { ';\n $closingBraces += '}';\n }\n }\n }\n if ($breakOnError) {\n out += ' ' + ($closingBraces) + ' if (' + ($errs) + ' == errors) {';\n }\n out = it.util.cleanUpCode(out);\n return out;\n}\n\n},{}],21:[function(require,module,exports){\n'use strict';\nmodule.exports = function generate_enum(it, $keyword) {\n var out = ' ';\n var $lvl = it.level;\n var $dataLvl = it.dataLevel;\n var $schema = it.schema[$keyword];\n var $schemaPath = it.schemaPath + '.' + $keyword;\n var $errSchemaPath = it.errSchemaPath + '/' + $keyword;\n var $breakOnError = !it.opts.allErrors;\n var $errorKeyword;\n var $data = 'data' + ($dataLvl || '');\n var $valid = 'valid' + $lvl;\n var $isData = it.opts.v5 && $schema.$data;\n var $schemaValue = $isData ? it.util.getData($schema.$data, $dataLvl, it.dataPathArr) : $schema;\n if ($isData) {\n out += ' var schema' + ($lvl) + ' = ' + ($schemaValue) + '; ';\n $schemaValue = 'schema' + $lvl;\n }\n var $i = 'i' + $lvl;\n if (!$isData) {\n out += ' var schema' + ($lvl) + ' = validate.schema' + ($schemaPath) + ';';\n }\n out += 'var ' + ($valid) + ';';\n if ($isData) {\n out += ' if (schema' + ($lvl) + ' === undefined) ' + ($valid) + ' = true; else if (!Array.isArray(schema' + ($lvl) + ')) ' + ($valid) + ' = false; else {';\n }\n out += '' + ($valid) + ' = false;for (var ' + ($i) + '=0; ' + ($i) + ' ' + ($i) + ') { ';\n var $passData = $data + '[' + $i + ']';\n $it.schema = $sch;\n $it.schemaPath = $schemaPath + '[' + $i + ']';\n $it.errSchemaPath = $errSchemaPath + '/' + $i;\n $it.errorPath = it.util.getPathExpr(it.errorPath, $i, it.opts.jsonPointers, true);\n $it.dataPathArr[$dataNxt] = $i;\n var $code = it.validate($it);\n if (it.util.varOccurences($code, $nextData) < 2) {\n out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' ';\n } else {\n out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' ';\n }\n out += ' } ';\n if ($breakOnError) {\n out += ' if (valid' + ($it.level) + ') { ';\n $closingBraces += '}';\n }\n }\n }\n }\n if (typeof $additionalItems == 'object' && it.util.schemaHasRules($additionalItems, it.RULES.all)) {\n $it.schema = $additionalItems;\n $it.schemaPath = it.schemaPath + '.additionalItems';\n $it.errSchemaPath = it.errSchemaPath + '/additionalItems';\n out += ' valid' + ($it.level) + ' = true; if (' + ($data) + '.length > ' + ($schema.length) + ') { for (var i' + ($lvl) + ' = ' + ($schema.length) + '; i' + ($lvl) + ' < ' + ($data) + '.length; i' + ($lvl) + '++) { ';\n $it.errorPath = it.util.getPathExpr(it.errorPath, 'i' + $lvl, it.opts.jsonPointers, true);\n var $passData = $data + '[i' + $lvl + ']';\n $it.dataPathArr[$dataNxt] = 'i' + $lvl;\n var $code = it.validate($it);\n if (it.util.varOccurences($code, $nextData) < 2) {\n out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' ';\n } else {\n out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' ';\n }\n if ($breakOnError) {\n out += ' if (!valid' + ($it.level) + ') break; ';\n }\n out += ' } } ';\n if ($breakOnError) {\n out += ' if (valid' + ($it.level) + ') { ';\n $closingBraces += '}';\n }\n }\n } else if (it.util.schemaHasRules($schema, it.RULES.all)) {\n $it.schema = $schema;\n $it.schemaPath = $schemaPath;\n $it.errSchemaPath = $errSchemaPath;\n out += ' for (var i' + ($lvl) + ' = ' + (0) + '; i' + ($lvl) + ' < ' + ($data) + '.length; i' + ($lvl) + '++) { ';\n $it.errorPath = it.util.getPathExpr(it.errorPath, 'i' + $lvl, it.opts.jsonPointers, true);\n var $passData = $data + '[i' + $lvl + ']';\n $it.dataPathArr[$dataNxt] = 'i' + $lvl;\n var $code = it.validate($it);\n if (it.util.varOccurences($code, $nextData) < 2) {\n out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' ';\n } else {\n out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' ';\n }\n if ($breakOnError) {\n out += ' if (!valid' + ($it.level) + ') break; ';\n }\n out += ' } ';\n if ($breakOnError) {\n out += ' if (valid' + ($it.level) + ') { ';\n $closingBraces += '}';\n }\n }\n if ($breakOnError) {\n out += ' ' + ($closingBraces) + ' if (' + ($errs) + ' == errors) {';\n }\n out = it.util.cleanUpCode(out);\n return out;\n}\n\n},{}],24:[function(require,module,exports){\n'use strict';\nmodule.exports = function generate_multipleOf(it, $keyword) {\n var out = ' ';\n var $lvl = it.level;\n var $dataLvl = it.dataLevel;\n var $schema = it.schema[$keyword];\n var $schemaPath = it.schemaPath + '.' + $keyword;\n var $errSchemaPath = it.errSchemaPath + '/' + $keyword;\n var $breakOnError = !it.opts.allErrors;\n var $errorKeyword;\n var $data = 'data' + ($dataLvl || '');\n var $isData = it.opts.v5 && $schema.$data;\n var $schemaValue = $isData ? it.util.getData($schema.$data, $dataLvl, it.dataPathArr) : $schema;\n if ($isData) {\n out += ' var schema' + ($lvl) + ' = ' + ($schemaValue) + '; ';\n $schemaValue = 'schema' + $lvl;\n }\n out += 'var division' + ($lvl) + ';if (';\n if ($isData) {\n out += ' ' + ($schemaValue) + ' !== undefined && ( typeof ' + ($schemaValue) + ' != \\'number\\' || ';\n }\n out += ' (division' + ($lvl) + ' = ' + ($data) + ' / ' + ($schemaValue) + ', ';\n if (it.opts.multipleOfPrecision) {\n out += ' Math.abs(Math.round(division' + ($lvl) + ') - division' + ($lvl) + ') > 1e-' + (it.opts.multipleOfPrecision) + ' ';\n } else {\n out += ' division' + ($lvl) + ' !== parseInt(division' + ($lvl) + ') ';\n }\n out += ' ) ';\n if ($isData) {\n out += ' ) ';\n }\n out += ' ) { ';\n var $$outStack = $$outStack || [];\n $$outStack.push(out);\n out = ''; /* istanbul ignore else */\n if (it.createErrors !== false) {\n out += ' { keyword: \\'' + ($errorKeyword || 'multipleOf') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: \"' + ($errSchemaPath) + '\" , params: { multipleOf: ' + ($schemaValue) + ' } ';\n if (it.opts.messages !== false) {\n out += ' , message: \\'should be multiple of ';\n if ($isData) {\n out += '\\' + ' + ($schemaValue);\n } else {\n out += '' + ($schema) + '\\'';\n }\n }\n if (it.opts.verbose) {\n out += ' , schema: ';\n if ($isData) {\n out += 'validate.schema' + ($schemaPath);\n } else {\n out += '' + ($schema);\n }\n out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n }\n out += ' } ';\n } else {\n out += ' {} ';\n }\n var __err = out;\n out = $$outStack.pop();\n if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */\n if (it.async) {\n out += ' throw new ValidationError([' + (__err) + ']); ';\n } else {\n out += ' validate.errors = [' + (__err) + ']; return false; ';\n }\n } else {\n out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n }\n out += '} ';\n if ($breakOnError) {\n out += ' else { ';\n }\n return out;\n}\n\n},{}],25:[function(require,module,exports){\n'use strict';\nmodule.exports = function generate_not(it, $keyword) {\n var out = ' ';\n var $lvl = it.level;\n var $dataLvl = it.dataLevel;\n var $schema = it.schema[$keyword];\n var $schemaPath = it.schemaPath + '.' + $keyword;\n var $errSchemaPath = it.errSchemaPath + '/' + $keyword;\n var $breakOnError = !it.opts.allErrors;\n var $errorKeyword;\n var $data = 'data' + ($dataLvl || '');\n var $errs = 'errs__' + $lvl;\n var $it = it.util.copy(it);\n $it.level++;\n if (it.util.schemaHasRules($schema, it.RULES.all)) {\n $it.schema = $schema;\n $it.schemaPath = $schemaPath;\n $it.errSchemaPath = $errSchemaPath;\n out += ' var ' + ($errs) + ' = errors; ';\n var $wasComposite = it.compositeRule;\n it.compositeRule = $it.compositeRule = true;\n $it.createErrors = false;\n var $allErrorsOption;\n if ($it.opts.allErrors) {\n $allErrorsOption = $it.opts.allErrors;\n $it.opts.allErrors = false;\n }\n out += ' ' + (it.validate($it)) + ' ';\n $it.createErrors = true;\n if ($allErrorsOption) $it.opts.allErrors = $allErrorsOption;\n it.compositeRule = $it.compositeRule = $wasComposite;\n out += ' if (valid' + ($it.level) + ') { ';\n var $$outStack = $$outStack || [];\n $$outStack.push(out);\n out = ''; /* istanbul ignore else */\n if (it.createErrors !== false) {\n out += ' { keyword: \\'' + ($errorKeyword || 'not') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: \"' + ($errSchemaPath) + '\" , params: {} ';\n if (it.opts.messages !== false) {\n out += ' , message: \\'should NOT be valid\\' ';\n }\n if (it.opts.verbose) {\n out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n }\n out += ' } ';\n } else {\n out += ' {} ';\n }\n var __err = out;\n out = $$outStack.pop();\n if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */\n if (it.async) {\n out += ' throw new ValidationError([' + (__err) + ']); ';\n } else {\n out += ' validate.errors = [' + (__err) + ']; return false; ';\n }\n } else {\n out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n }\n out += ' } else { errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } ';\n if (it.opts.allErrors) {\n out += ' } ';\n }\n } else {\n out += ' var err = '; /* istanbul ignore else */\n if (it.createErrors !== false) {\n out += ' { keyword: \\'' + ($errorKeyword || 'not') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: \"' + ($errSchemaPath) + '\" , params: {} ';\n if (it.opts.messages !== false) {\n out += ' , message: \\'should NOT be valid\\' ';\n }\n if (it.opts.verbose) {\n out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n }\n out += ' } ';\n } else {\n out += ' {} ';\n }\n out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n if ($breakOnError) {\n out += ' if (false) { ';\n }\n }\n return out;\n}\n\n},{}],26:[function(require,module,exports){\n'use strict';\nmodule.exports = function generate_oneOf(it, $keyword) {\n var out = ' ';\n var $lvl = it.level;\n var $dataLvl = it.dataLevel;\n var $schema = it.schema[$keyword];\n var $schemaPath = it.schemaPath + '.' + $keyword;\n var $errSchemaPath = it.errSchemaPath + '/' + $keyword;\n var $breakOnError = !it.opts.allErrors;\n var $errorKeyword;\n var $data = 'data' + ($dataLvl || '');\n var $valid = 'valid' + $lvl;\n var $errs = 'errs__' + $lvl;\n var $it = it.util.copy(it);\n var $closingBraces = '';\n $it.level++;\n out += 'var ' + ($errs) + ' = errors;var prevValid' + ($lvl) + ' = false;var ' + ($valid) + ' = false; ';\n var $wasComposite = it.compositeRule;\n it.compositeRule = $it.compositeRule = true;\n var arr1 = $schema;\n if (arr1) {\n var $sch, $i = -1,\n l1 = arr1.length - 1;\n while ($i < l1) {\n $sch = arr1[$i += 1];\n if (it.util.schemaHasRules($sch, it.RULES.all)) {\n $it.schema = $sch;\n $it.schemaPath = $schemaPath + '[' + $i + ']';\n $it.errSchemaPath = $errSchemaPath + '/' + $i;\n out += ' ' + (it.validate($it)) + ' ';\n } else {\n out += ' var valid' + ($it.level) + ' = true; ';\n }\n if ($i) {\n out += ' if (valid' + ($it.level) + ' && prevValid' + ($lvl) + ') ' + ($valid) + ' = false; else { ';\n $closingBraces += '}';\n }\n out += ' if (valid' + ($it.level) + ') ' + ($valid) + ' = prevValid' + ($lvl) + ' = true;';\n }\n }\n it.compositeRule = $it.compositeRule = $wasComposite;\n out += '' + ($closingBraces) + 'if (!' + ($valid) + ') { ';\n var $$outStack = $$outStack || [];\n $$outStack.push(out);\n out = ''; /* istanbul ignore else */\n if (it.createErrors !== false) {\n out += ' { keyword: \\'' + ($errorKeyword || 'oneOf') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: \"' + ($errSchemaPath) + '\" , params: {} ';\n if (it.opts.messages !== false) {\n out += ' , message: \\'should match exactly one schema in oneOf\\' ';\n }\n if (it.opts.verbose) {\n out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n }\n out += ' } ';\n } else {\n out += ' {} ';\n }\n var __err = out;\n out = $$outStack.pop();\n if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */\n if (it.async) {\n out += ' throw new ValidationError([' + (__err) + ']); ';\n } else {\n out += ' validate.errors = [' + (__err) + ']; return false; ';\n }\n } else {\n out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n }\n out += '} else { errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; }';\n if (it.opts.allErrors) {\n out += ' } ';\n }\n return out;\n}\n\n},{}],27:[function(require,module,exports){\n'use strict';\nmodule.exports = function generate_pattern(it, $keyword) {\n var out = ' ';\n var $lvl = it.level;\n var $dataLvl = it.dataLevel;\n var $schema = it.schema[$keyword];\n var $schemaPath = it.schemaPath + '.' + $keyword;\n var $errSchemaPath = it.errSchemaPath + '/' + $keyword;\n var $breakOnError = !it.opts.allErrors;\n var $errorKeyword;\n var $data = 'data' + ($dataLvl || '');\n var $isData = it.opts.v5 && $schema.$data;\n var $schemaValue = $isData ? it.util.getData($schema.$data, $dataLvl, it.dataPathArr) : $schema;\n if ($isData) {\n out += ' var schema' + ($lvl) + ' = ' + ($schemaValue) + '; ';\n $schemaValue = 'schema' + $lvl;\n }\n var $regexp = $isData ? '(new RegExp(' + $schemaValue + '))' : it.usePattern($schema);\n out += 'if ( ';\n if ($isData) {\n out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \\'string\\') || ';\n }\n out += ' !' + ($regexp) + '.test(' + ($data) + ') ) { ';\n var $$outStack = $$outStack || [];\n $$outStack.push(out);\n out = ''; /* istanbul ignore else */\n if (it.createErrors !== false) {\n out += ' { keyword: \\'' + ($errorKeyword || 'pattern') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: \"' + ($errSchemaPath) + '\" , params: { pattern: ';\n if ($isData) {\n out += '' + ($schemaValue);\n } else {\n out += '' + (it.util.toQuotedString($schema));\n }\n out += ' } ';\n if (it.opts.messages !== false) {\n out += ' , message: \\'should match pattern \"';\n if ($isData) {\n out += '\\' + ' + ($schemaValue) + ' + \\'';\n } else {\n out += '' + (it.util.escapeQuotes($schema));\n }\n out += '\"\\' ';\n }\n if (it.opts.verbose) {\n out += ' , schema: ';\n if ($isData) {\n out += 'validate.schema' + ($schemaPath);\n } else {\n out += '' + (it.util.toQuotedString($schema));\n }\n out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n }\n out += ' } ';\n } else {\n out += ' {} ';\n }\n var __err = out;\n out = $$outStack.pop();\n if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */\n if (it.async) {\n out += ' throw new ValidationError([' + (__err) + ']); ';\n } else {\n out += ' validate.errors = [' + (__err) + ']; return false; ';\n }\n } else {\n out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n }\n out += '} ';\n if ($breakOnError) {\n out += ' else { ';\n }\n return out;\n}\n\n},{}],28:[function(require,module,exports){\n'use strict';\nmodule.exports = function generate_patternRequired(it, $keyword) {\n var out = ' ';\n var $lvl = it.level;\n var $dataLvl = it.dataLevel;\n var $schema = it.schema[$keyword];\n var $schemaPath = it.schemaPath + '.' + $keyword;\n var $errSchemaPath = it.errSchemaPath + '/' + $keyword;\n var $breakOnError = !it.opts.allErrors;\n var $errorKeyword;\n var $data = 'data' + ($dataLvl || '');\n var $valid = 'valid' + $lvl;\n var $key = 'key' + $lvl,\n $matched = 'patternMatched' + $lvl,\n $closingBraces = '';\n out += 'var ' + ($valid) + ' = true;';\n var arr1 = $schema;\n if (arr1) {\n var $pProperty, i1 = -1,\n l1 = arr1.length - 1;\n while (i1 < l1) {\n $pProperty = arr1[i1 += 1];\n out += ' var ' + ($matched) + ' = false; for (var ' + ($key) + ' in ' + ($data) + ') { ' + ($matched) + ' = ' + (it.usePattern($pProperty)) + '.test(' + ($key) + '); if (' + ($matched) + ') break; } ';\n var $missingPattern = it.util.escapeQuotes($pProperty);\n out += ' if (!' + ($matched) + ') { ' + ($valid) + ' = false; var err = '; /* istanbul ignore else */\n if (it.createErrors !== false) {\n out += ' { keyword: \\'' + ($errorKeyword || 'patternRequired') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: \"' + ($errSchemaPath) + '\" , params: { missingPattern: \\'' + ($missingPattern) + '\\' } ';\n if (it.opts.messages !== false) {\n out += ' , message: \\'should have property matching pattern \\\\\\'' + ($missingPattern) + '\\\\\\'\\' ';\n }\n if (it.opts.verbose) {\n out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n }\n out += ' } ';\n } else {\n out += ' {} ';\n }\n out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } ';\n if ($breakOnError) {\n $closingBraces += '}';\n out += ' else { ';\n }\n }\n }\n out += '' + ($closingBraces);\n return out;\n}\n\n},{}],29:[function(require,module,exports){\n'use strict';\nmodule.exports = function generate_properties(it, $keyword) {\n var out = ' ';\n var $lvl = it.level;\n var $dataLvl = it.dataLevel;\n var $schema = it.schema[$keyword];\n var $schemaPath = it.schemaPath + '.' + $keyword;\n var $errSchemaPath = it.errSchemaPath + '/' + $keyword;\n var $breakOnError = !it.opts.allErrors;\n var $errorKeyword;\n var $data = 'data' + ($dataLvl || '');\n var $valid = 'valid' + $lvl;\n var $errs = 'errs__' + $lvl;\n var $it = it.util.copy(it);\n var $closingBraces = '';\n $it.level++;\n var $dataNxt = $it.dataLevel = it.dataLevel + 1,\n $nextData = 'data' + $dataNxt;\n var $schemaKeys = Object.keys($schema || {}),\n $pProperties = it.schema.patternProperties || {},\n $pPropertyKeys = Object.keys($pProperties),\n $aProperties = it.schema.additionalProperties,\n $someProperties = $schemaKeys.length || $pPropertyKeys.length,\n $noAdditional = $aProperties === false,\n $additionalIsSchema = typeof $aProperties == 'object' && Object.keys($aProperties).length,\n $removeAdditional = it.opts.removeAdditional,\n $checkAdditional = $noAdditional || $additionalIsSchema || $removeAdditional;\n var $required = it.schema.required;\n if ($required && !(it.opts.v5 && $required.$data) && $required.length < it.opts.loopRequired) var $requiredHash = it.util.toHash($required);\n if (it.opts.v5) {\n var $pgProperties = it.schema.patternGroups || {},\n $pgPropertyKeys = Object.keys($pgProperties);\n }\n out += 'var ' + ($errs) + ' = errors;var valid' + ($it.level) + ' = true;';\n if ($checkAdditional) {\n out += ' for (var key' + ($lvl) + ' in ' + ($data) + ') { ';\n if ($someProperties) {\n out += ' var isAdditional' + ($lvl) + ' = !(false ';\n if ($schemaKeys.length) {\n if ($schemaKeys.length > 5) {\n out += ' || validate.schema' + ($schemaPath) + '[key' + ($lvl) + '] ';\n } else {\n var arr1 = $schemaKeys;\n if (arr1) {\n var $propertyKey, i1 = -1,\n l1 = arr1.length - 1;\n while (i1 < l1) {\n $propertyKey = arr1[i1 += 1];\n out += ' || key' + ($lvl) + ' == ' + (it.util.toQuotedString($propertyKey)) + ' ';\n }\n }\n }\n }\n if ($pPropertyKeys.length) {\n var arr2 = $pPropertyKeys;\n if (arr2) {\n var $pProperty, $i = -1,\n l2 = arr2.length - 1;\n while ($i < l2) {\n $pProperty = arr2[$i += 1];\n out += ' || ' + (it.usePattern($pProperty)) + '.test(key' + ($lvl) + ') ';\n }\n }\n }\n if (it.opts.v5 && $pgPropertyKeys && $pgPropertyKeys.length) {\n var arr3 = $pgPropertyKeys;\n if (arr3) {\n var $pgProperty, $i = -1,\n l3 = arr3.length - 1;\n while ($i < l3) {\n $pgProperty = arr3[$i += 1];\n out += ' || ' + (it.usePattern($pgProperty)) + '.test(key' + ($lvl) + ') ';\n }\n }\n }\n out += ' ); if (isAdditional' + ($lvl) + ') { ';\n }\n if ($removeAdditional == 'all') {\n out += ' delete ' + ($data) + '[key' + ($lvl) + ']; ';\n } else {\n var $currentErrorPath = it.errorPath;\n var $additionalProperty = '\\' + key' + $lvl + ' + \\'';\n if (it.opts._errorDataPathProperty) {\n it.errorPath = it.util.getPathExpr(it.errorPath, 'key' + $lvl, it.opts.jsonPointers);\n }\n if ($noAdditional) {\n if ($removeAdditional) {\n out += ' delete ' + ($data) + '[key' + ($lvl) + ']; ';\n } else {\n out += ' valid' + ($it.level) + ' = false; ';\n var $currErrSchemaPath = $errSchemaPath;\n $errSchemaPath = it.errSchemaPath + '/additionalProperties';\n var $$outStack = $$outStack || [];\n $$outStack.push(out);\n out = ''; /* istanbul ignore else */\n if (it.createErrors !== false) {\n out += ' { keyword: \\'' + ($errorKeyword || 'additionalProperties') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: \"' + ($errSchemaPath) + '\" , params: { additionalProperty: \\'' + ($additionalProperty) + '\\' } ';\n if (it.opts.messages !== false) {\n out += ' , message: \\'should NOT have additional properties\\' ';\n }\n if (it.opts.verbose) {\n out += ' , schema: false , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n }\n out += ' } ';\n } else {\n out += ' {} ';\n }\n var __err = out;\n out = $$outStack.pop();\n if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */\n if (it.async) {\n out += ' throw new ValidationError([' + (__err) + ']); ';\n } else {\n out += ' validate.errors = [' + (__err) + ']; return false; ';\n }\n } else {\n out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n }\n $errSchemaPath = $currErrSchemaPath;\n if ($breakOnError) {\n out += ' break; ';\n }\n }\n } else if ($additionalIsSchema) {\n if ($removeAdditional == 'failing') {\n out += ' var ' + ($errs) + ' = errors; ';\n var $wasComposite = it.compositeRule;\n it.compositeRule = $it.compositeRule = true;\n $it.schema = $aProperties;\n $it.schemaPath = it.schemaPath + '.additionalProperties';\n $it.errSchemaPath = it.errSchemaPath + '/additionalProperties';\n $it.errorPath = it.opts._errorDataPathProperty ? it.errorPath : it.util.getPathExpr(it.errorPath, 'key' + $lvl, it.opts.jsonPointers);\n var $passData = $data + '[key' + $lvl + ']';\n $it.dataPathArr[$dataNxt] = 'key' + $lvl;\n var $code = it.validate($it);\n if (it.util.varOccurences($code, $nextData) < 2) {\n out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' ';\n } else {\n out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' ';\n }\n out += ' if (!valid' + ($it.level) + ') { errors = ' + ($errs) + '; if (validate.errors !== null) { if (errors) validate.errors.length = errors; else validate.errors = null; } delete ' + ($data) + '[key' + ($lvl) + ']; } ';\n it.compositeRule = $it.compositeRule = $wasComposite;\n } else {\n $it.schema = $aProperties;\n $it.schemaPath = it.schemaPath + '.additionalProperties';\n $it.errSchemaPath = it.errSchemaPath + '/additionalProperties';\n $it.errorPath = it.opts._errorDataPathProperty ? it.errorPath : it.util.getPathExpr(it.errorPath, 'key' + $lvl, it.opts.jsonPointers);\n var $passData = $data + '[key' + $lvl + ']';\n $it.dataPathArr[$dataNxt] = 'key' + $lvl;\n var $code = it.validate($it);\n if (it.util.varOccurences($code, $nextData) < 2) {\n out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' ';\n } else {\n out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' ';\n }\n if ($breakOnError) {\n out += ' if (!valid' + ($it.level) + ') break; ';\n }\n }\n }\n it.errorPath = $currentErrorPath;\n }\n if ($someProperties) {\n out += ' } ';\n }\n out += ' } ';\n if ($breakOnError) {\n out += ' if (valid' + ($it.level) + ') { ';\n $closingBraces += '}';\n }\n }\n var $useDefaults = it.opts.useDefaults && !it.compositeRule;\n if ($schemaKeys.length) {\n var arr4 = $schemaKeys;\n if (arr4) {\n var $propertyKey, i4 = -1,\n l4 = arr4.length - 1;\n while (i4 < l4) {\n $propertyKey = arr4[i4 += 1];\n var $sch = $schema[$propertyKey];\n if (it.util.schemaHasRules($sch, it.RULES.all)) {\n var $prop = it.util.getProperty($propertyKey),\n $passData = $data + $prop,\n $hasDefault = $useDefaults && $sch.default !== undefined;\n $it.schema = $sch;\n $it.schemaPath = $schemaPath + $prop;\n $it.errSchemaPath = $errSchemaPath + '/' + it.util.escapeFragment($propertyKey);\n $it.errorPath = it.util.getPath(it.errorPath, $propertyKey, it.opts.jsonPointers);\n $it.dataPathArr[$dataNxt] = it.util.toQuotedString($propertyKey);\n var $code = it.validate($it);\n if (it.util.varOccurences($code, $nextData) < 2) {\n $code = it.util.varReplace($code, $nextData, $passData);\n var $useData = $passData;\n } else {\n var $useData = $nextData;\n out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ';\n }\n if ($hasDefault) {\n out += ' ' + ($code) + ' ';\n } else {\n if ($requiredHash && $requiredHash[$propertyKey]) {\n out += ' if (' + ($useData) + ' === undefined) { valid' + ($it.level) + ' = false; ';\n var $currentErrorPath = it.errorPath,\n $currErrSchemaPath = $errSchemaPath,\n $missingProperty = it.util.escapeQuotes($propertyKey);\n if (it.opts._errorDataPathProperty) {\n it.errorPath = it.util.getPath($currentErrorPath, $propertyKey, it.opts.jsonPointers);\n }\n $errSchemaPath = it.errSchemaPath + '/required';\n var $$outStack = $$outStack || [];\n $$outStack.push(out);\n out = ''; /* istanbul ignore else */\n if (it.createErrors !== false) {\n out += ' { keyword: \\'' + ($errorKeyword || 'required') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: \"' + ($errSchemaPath) + '\" , params: { missingProperty: \\'' + ($missingProperty) + '\\' } ';\n if (it.opts.messages !== false) {\n out += ' , message: \\'';\n if (it.opts._errorDataPathProperty) {\n out += 'is a required property';\n } else {\n out += 'should have required property \\\\\\'' + ($missingProperty) + '\\\\\\'';\n }\n out += '\\' ';\n }\n if (it.opts.verbose) {\n out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n }\n out += ' } ';\n } else {\n out += ' {} ';\n }\n var __err = out;\n out = $$outStack.pop();\n if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */\n if (it.async) {\n out += ' throw new ValidationError([' + (__err) + ']); ';\n } else {\n out += ' validate.errors = [' + (__err) + ']; return false; ';\n }\n } else {\n out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n }\n $errSchemaPath = $currErrSchemaPath;\n it.errorPath = $currentErrorPath;\n out += ' } else { ';\n } else {\n if ($breakOnError) {\n out += ' if (' + ($useData) + ' === undefined) { valid' + ($it.level) + ' = true; } else { ';\n } else {\n out += ' if (' + ($useData) + ' !== undefined) { ';\n }\n }\n out += ' ' + ($code) + ' } ';\n }\n }\n if ($breakOnError) {\n out += ' if (valid' + ($it.level) + ') { ';\n $closingBraces += '}';\n }\n }\n }\n }\n var arr5 = $pPropertyKeys;\n if (arr5) {\n var $pProperty, i5 = -1,\n l5 = arr5.length - 1;\n while (i5 < l5) {\n $pProperty = arr5[i5 += 1];\n var $sch = $pProperties[$pProperty];\n if (it.util.schemaHasRules($sch, it.RULES.all)) {\n $it.schema = $sch;\n $it.schemaPath = it.schemaPath + '.patternProperties' + it.util.getProperty($pProperty);\n $it.errSchemaPath = it.errSchemaPath + '/patternProperties/' + it.util.escapeFragment($pProperty);\n out += ' for (var key' + ($lvl) + ' in ' + ($data) + ') { if (' + (it.usePattern($pProperty)) + '.test(key' + ($lvl) + ')) { ';\n $it.errorPath = it.util.getPathExpr(it.errorPath, 'key' + $lvl, it.opts.jsonPointers);\n var $passData = $data + '[key' + $lvl + ']';\n $it.dataPathArr[$dataNxt] = 'key' + $lvl;\n var $code = it.validate($it);\n if (it.util.varOccurences($code, $nextData) < 2) {\n out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' ';\n } else {\n out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' ';\n }\n if ($breakOnError) {\n out += ' if (!valid' + ($it.level) + ') break; ';\n }\n out += ' } ';\n if ($breakOnError) {\n out += ' else valid' + ($it.level) + ' = true; ';\n }\n out += ' } ';\n if ($breakOnError) {\n out += ' if (valid' + ($it.level) + ') { ';\n $closingBraces += '}';\n }\n }\n }\n }\n if (it.opts.v5) {\n var arr6 = $pgPropertyKeys;\n if (arr6) {\n var $pgProperty, i6 = -1,\n l6 = arr6.length - 1;\n while (i6 < l6) {\n $pgProperty = arr6[i6 += 1];\n var $pgSchema = $pgProperties[$pgProperty],\n $sch = $pgSchema.schema;\n if (it.util.schemaHasRules($sch, it.RULES.all)) {\n $it.schema = $sch;\n $it.schemaPath = it.schemaPath + '.patternGroups' + it.util.getProperty($pgProperty) + '.schema';\n $it.errSchemaPath = it.errSchemaPath + '/patternGroups/' + it.util.escapeFragment($pgProperty) + '/schema';\n out += ' var pgPropCount' + ($lvl) + ' = 0; for (var key' + ($lvl) + ' in ' + ($data) + ') { if (' + (it.usePattern($pgProperty)) + '.test(key' + ($lvl) + ')) { pgPropCount' + ($lvl) + '++; ';\n $it.errorPath = it.util.getPathExpr(it.errorPath, 'key' + $lvl, it.opts.jsonPointers);\n var $passData = $data + '[key' + $lvl + ']';\n $it.dataPathArr[$dataNxt] = 'key' + $lvl;\n var $code = it.validate($it);\n if (it.util.varOccurences($code, $nextData) < 2) {\n out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' ';\n } else {\n out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' ';\n }\n if ($breakOnError) {\n out += ' if (!valid' + ($it.level) + ') break; ';\n }\n out += ' } ';\n if ($breakOnError) {\n out += ' else valid' + ($it.level) + ' = true; ';\n }\n out += ' } ';\n if ($breakOnError) {\n out += ' if (valid' + ($it.level) + ') { ';\n $closingBraces += '}';\n }\n var $pgMin = $pgSchema.minimum,\n $pgMax = $pgSchema.maximum;\n if ($pgMin !== undefined || $pgMax !== undefined) {\n out += ' var ' + ($valid) + ' = true; ';\n var $currErrSchemaPath = $errSchemaPath;\n if ($pgMin !== undefined) {\n var $limit = $pgMin,\n $reason = 'minimum',\n $moreOrLess = 'less';\n out += ' ' + ($valid) + ' = pgPropCount' + ($lvl) + ' >= ' + ($pgMin) + '; ';\n $errSchemaPath = it.errSchemaPath + '/patternGroups/minimum';\n out += ' if (!' + ($valid) + ') { ';\n var $$outStack = $$outStack || [];\n $$outStack.push(out);\n out = ''; /* istanbul ignore else */\n if (it.createErrors !== false) {\n out += ' { keyword: \\'' + ($errorKeyword || 'patternGroups') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: \"' + ($errSchemaPath) + '\" , params: { reason: \\'' + ($reason) + '\\', limit: ' + ($limit) + ', pattern: \\'' + (it.util.escapeQuotes($pgProperty)) + '\\' } ';\n if (it.opts.messages !== false) {\n out += ' , message: \\'should NOT have ' + ($moreOrLess) + ' than ' + ($limit) + ' properties matching pattern \"' + (it.util.escapeQuotes($pgProperty)) + '\"\\' ';\n }\n if (it.opts.verbose) {\n out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n }\n out += ' } ';\n } else {\n out += ' {} ';\n }\n var __err = out;\n out = $$outStack.pop();\n if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */\n if (it.async) {\n out += ' throw new ValidationError([' + (__err) + ']); ';\n } else {\n out += ' validate.errors = [' + (__err) + ']; return false; ';\n }\n } else {\n out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n }\n out += ' } ';\n if ($pgMax !== undefined) {\n out += ' else ';\n }\n }\n if ($pgMax !== undefined) {\n var $limit = $pgMax,\n $reason = 'maximum',\n $moreOrLess = 'more';\n out += ' ' + ($valid) + ' = pgPropCount' + ($lvl) + ' <= ' + ($pgMax) + '; ';\n $errSchemaPath = it.errSchemaPath + '/patternGroups/maximum';\n out += ' if (!' + ($valid) + ') { ';\n var $$outStack = $$outStack || [];\n $$outStack.push(out);\n out = ''; /* istanbul ignore else */\n if (it.createErrors !== false) {\n out += ' { keyword: \\'' + ($errorKeyword || 'patternGroups') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: \"' + ($errSchemaPath) + '\" , params: { reason: \\'' + ($reason) + '\\', limit: ' + ($limit) + ', pattern: \\'' + (it.util.escapeQuotes($pgProperty)) + '\\' } ';\n if (it.opts.messages !== false) {\n out += ' , message: \\'should NOT have ' + ($moreOrLess) + ' than ' + ($limit) + ' properties matching pattern \"' + (it.util.escapeQuotes($pgProperty)) + '\"\\' ';\n }\n if (it.opts.verbose) {\n out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n }\n out += ' } ';\n } else {\n out += ' {} ';\n }\n var __err = out;\n out = $$outStack.pop();\n if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */\n if (it.async) {\n out += ' throw new ValidationError([' + (__err) + ']); ';\n } else {\n out += ' validate.errors = [' + (__err) + ']; return false; ';\n }\n } else {\n out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n }\n out += ' } ';\n }\n $errSchemaPath = $currErrSchemaPath;\n if ($breakOnError) {\n out += ' if (' + ($valid) + ') { ';\n $closingBraces += '}';\n }\n }\n }\n }\n }\n }\n if ($breakOnError) {\n out += ' ' + ($closingBraces) + ' if (' + ($errs) + ' == errors) {';\n }\n out = it.util.cleanUpCode(out);\n return out;\n}\n\n},{}],30:[function(require,module,exports){\n'use strict';\nmodule.exports = function generate_ref(it, $keyword) {\n var out = ' ';\n var $lvl = it.level;\n var $dataLvl = it.dataLevel;\n var $schema = it.schema[$keyword];\n var $errSchemaPath = it.errSchemaPath + '/' + $keyword;\n var $breakOnError = !it.opts.allErrors;\n var $errorKeyword;\n var $data = 'data' + ($dataLvl || '');\n var $valid = 'valid' + $lvl;\n var $async, $refCode;\n if ($schema == '#' || $schema == '#/') {\n if (it.isRoot) {\n $async = it.async;\n $refCode = 'validate';\n } else {\n $async = it.root.schema.$async === true;\n $refCode = 'root.refVal[0]';\n }\n } else {\n var $refVal = it.resolveRef(it.baseId, $schema, it.isRoot);\n if ($refVal === undefined) {\n var $message = 'can\\'t resolve reference ' + $schema + ' from id ' + it.baseId;\n if (it.opts.missingRefs == 'fail') {\n console.log($message);\n var $$outStack = $$outStack || [];\n $$outStack.push(out);\n out = ''; /* istanbul ignore else */\n if (it.createErrors !== false) {\n out += ' { keyword: \\'' + ($errorKeyword || '$ref') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: \"' + ($errSchemaPath) + '\" , params: { ref: \\'' + (it.util.escapeQuotes($schema)) + '\\' } ';\n if (it.opts.messages !== false) {\n out += ' , message: \\'can\\\\\\'t resolve reference ' + (it.util.escapeQuotes($schema)) + '\\' ';\n }\n if (it.opts.verbose) {\n out += ' , schema: ' + (it.util.toQuotedString($schema)) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n }\n out += ' } ';\n } else {\n out += ' {} ';\n }\n var __err = out;\n out = $$outStack.pop();\n if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */\n if (it.async) {\n out += ' throw new ValidationError([' + (__err) + ']); ';\n } else {\n out += ' validate.errors = [' + (__err) + ']; return false; ';\n }\n } else {\n out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n }\n if ($breakOnError) {\n out += ' if (false) { ';\n }\n } else if (it.opts.missingRefs == 'ignore') {\n console.log($message);\n if ($breakOnError) {\n out += ' if (true) { ';\n }\n } else {\n var $error = new Error($message);\n $error.missingRef = it.resolve.url(it.baseId, $schema);\n $error.missingSchema = it.resolve.normalizeId(it.resolve.fullPath($error.missingRef));\n throw $error;\n }\n } else if ($refVal.inline) {\n var $it = it.util.copy(it);\n $it.level++;\n $it.schema = $refVal.schema;\n $it.schemaPath = '';\n $it.errSchemaPath = $schema;\n var $code = it.validate($it).replace(/validate\\.schema/g, $refVal.code);\n out += ' ' + ($code) + ' ';\n if ($breakOnError) {\n out += ' if (valid' + ($it.level) + ') { ';\n }\n } else {\n $async = $refVal.async;\n $refCode = $refVal.code;\n }\n }\n if ($refCode) {\n var $$outStack = $$outStack || [];\n $$outStack.push(out);\n out = '';\n if (it.opts.passContext) {\n out += ' ' + ($refCode) + '.call(this, ';\n } else {\n out += ' ' + ($refCode) + '( ';\n }\n out += ' ' + ($data) + ', (dataPath || \\'\\')';\n if (it.errorPath != '\"\"') {\n out += ' + ' + (it.errorPath);\n }\n if ($dataLvl) {\n out += ' , data' + (($dataLvl - 1) || '') + ' , ' + (it.dataPathArr[$dataLvl]) + ' ';\n } else {\n out += ' , parentData , parentDataProperty ';\n }\n out += ') ';\n var __callValidate = out;\n out = $$outStack.pop();\n if ($async) {\n if (!it.async) throw new Error('async schema referenced by sync schema');\n out += ' try { ';\n if ($breakOnError) {\n out += 'var ' + ($valid) + ' =';\n }\n out += ' ' + (it.yieldAwait) + ' ' + (__callValidate) + '; } catch (e) { if (!(e instanceof ValidationError)) throw e; if (vErrors === null) vErrors = e.errors; else vErrors = vErrors.concat(e.errors); errors = vErrors.length; } ';\n if ($breakOnError) {\n out += ' if (' + ($valid) + ') { ';\n }\n } else {\n out += ' if (!' + (__callValidate) + ') { if (vErrors === null) vErrors = ' + ($refCode) + '.errors; else vErrors = vErrors.concat(' + ($refCode) + '.errors); errors = vErrors.length; } ';\n if ($breakOnError) {\n out += ' else { ';\n }\n }\n }\n return out;\n}\n\n},{}],31:[function(require,module,exports){\n'use strict';\nmodule.exports = function generate_required(it, $keyword) {\n var out = ' ';\n var $lvl = it.level;\n var $dataLvl = it.dataLevel;\n var $schema = it.schema[$keyword];\n var $schemaPath = it.schemaPath + '.' + $keyword;\n var $errSchemaPath = it.errSchemaPath + '/' + $keyword;\n var $breakOnError = !it.opts.allErrors;\n var $errorKeyword;\n var $data = 'data' + ($dataLvl || '');\n var $valid = 'valid' + $lvl;\n var $isData = it.opts.v5 && $schema.$data;\n var $schemaValue = $isData ? it.util.getData($schema.$data, $dataLvl, it.dataPathArr) : $schema;\n if ($isData) {\n out += ' var schema' + ($lvl) + ' = ' + ($schemaValue) + '; ';\n $schemaValue = 'schema' + $lvl;\n }\n if (!$isData) {\n if ($schema.length < it.opts.loopRequired && it.schema.properties && Object.keys(it.schema.properties).length) {\n var $required = [];\n var arr1 = $schema;\n if (arr1) {\n var $property, i1 = -1,\n l1 = arr1.length - 1;\n while (i1 < l1) {\n $property = arr1[i1 += 1];\n var $propertySch = it.schema.properties[$property];\n if (!($propertySch && it.util.schemaHasRules($propertySch, it.RULES.all))) {\n $required[$required.length] = $property;\n }\n }\n }\n } else {\n var $required = $schema;\n }\n }\n if ($isData || $required.length) {\n var $currentErrorPath = it.errorPath,\n $loopRequired = $isData || $required.length >= it.opts.loopRequired;\n if ($breakOnError) {\n out += ' var missing' + ($lvl) + '; ';\n if ($loopRequired) {\n if (!$isData) {\n out += ' var schema' + ($lvl) + ' = validate.schema' + ($schemaPath) + '; ';\n }\n var $i = 'i' + $lvl,\n $propertyPath = 'schema' + $lvl + '[' + $i + ']',\n $missingProperty = '\\' + ' + $propertyPath + ' + \\'';\n if (it.opts._errorDataPathProperty) {\n it.errorPath = it.util.getPathExpr($currentErrorPath, $propertyPath, it.opts.jsonPointers);\n }\n out += ' var ' + ($valid) + ' = true; ';\n if ($isData) {\n out += ' if (schema' + ($lvl) + ' === undefined) ' + ($valid) + ' = true; else if (!Array.isArray(schema' + ($lvl) + ')) ' + ($valid) + ' = false; else {';\n }\n out += ' for (var ' + ($i) + ' = 0; ' + ($i) + ' < schema' + ($lvl) + '.length; ' + ($i) + '++) { ' + ($valid) + ' = ' + ($data) + '[schema' + ($lvl) + '[' + ($i) + ']] !== undefined; if (!' + ($valid) + ') break; } ';\n if ($isData) {\n out += ' } ';\n }\n out += ' if (!' + ($valid) + ') { ';\n var $$outStack = $$outStack || [];\n $$outStack.push(out);\n out = ''; /* istanbul ignore else */\n if (it.createErrors !== false) {\n out += ' { keyword: \\'' + ($errorKeyword || 'required') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: \"' + ($errSchemaPath) + '\" , params: { missingProperty: \\'' + ($missingProperty) + '\\' } ';\n if (it.opts.messages !== false) {\n out += ' , message: \\'';\n if (it.opts._errorDataPathProperty) {\n out += 'is a required property';\n } else {\n out += 'should have required property \\\\\\'' + ($missingProperty) + '\\\\\\'';\n }\n out += '\\' ';\n }\n if (it.opts.verbose) {\n out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n }\n out += ' } ';\n } else {\n out += ' {} ';\n }\n var __err = out;\n out = $$outStack.pop();\n if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */\n if (it.async) {\n out += ' throw new ValidationError([' + (__err) + ']); ';\n } else {\n out += ' validate.errors = [' + (__err) + ']; return false; ';\n }\n } else {\n out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n }\n out += ' } else { ';\n } else {\n out += ' if ( ';\n var arr2 = $required;\n if (arr2) {\n var _$property, $i = -1,\n l2 = arr2.length - 1;\n while ($i < l2) {\n _$property = arr2[$i += 1];\n if ($i) {\n out += ' || ';\n }\n var $prop = it.util.getProperty(_$property);\n out += ' ( ' + ($data) + ($prop) + ' === undefined && (missing' + ($lvl) + ' = ' + (it.util.toQuotedString(it.opts.jsonPointers ? _$property : $prop)) + ') ) ';\n }\n }\n out += ') { ';\n var $propertyPath = 'missing' + $lvl,\n $missingProperty = '\\' + ' + $propertyPath + ' + \\'';\n if (it.opts._errorDataPathProperty) {\n it.errorPath = it.opts.jsonPointers ? it.util.getPathExpr($currentErrorPath, $propertyPath, true) : $currentErrorPath + ' + ' + $propertyPath;\n }\n var $$outStack = $$outStack || [];\n $$outStack.push(out);\n out = ''; /* istanbul ignore else */\n if (it.createErrors !== false) {\n out += ' { keyword: \\'' + ($errorKeyword || 'required') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: \"' + ($errSchemaPath) + '\" , params: { missingProperty: \\'' + ($missingProperty) + '\\' } ';\n if (it.opts.messages !== false) {\n out += ' , message: \\'';\n if (it.opts._errorDataPathProperty) {\n out += 'is a required property';\n } else {\n out += 'should have required property \\\\\\'' + ($missingProperty) + '\\\\\\'';\n }\n out += '\\' ';\n }\n if (it.opts.verbose) {\n out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n }\n out += ' } ';\n } else {\n out += ' {} ';\n }\n var __err = out;\n out = $$outStack.pop();\n if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */\n if (it.async) {\n out += ' throw new ValidationError([' + (__err) + ']); ';\n } else {\n out += ' validate.errors = [' + (__err) + ']; return false; ';\n }\n } else {\n out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n }\n out += ' } else { ';\n }\n } else {\n if ($loopRequired) {\n if (!$isData) {\n out += ' var schema' + ($lvl) + ' = validate.schema' + ($schemaPath) + '; ';\n }\n var $i = 'i' + $lvl,\n $propertyPath = 'schema' + $lvl + '[' + $i + ']',\n $missingProperty = '\\' + ' + $propertyPath + ' + \\'';\n if (it.opts._errorDataPathProperty) {\n it.errorPath = it.util.getPathExpr($currentErrorPath, $propertyPath, it.opts.jsonPointers);\n }\n if ($isData) {\n out += ' if (schema' + ($lvl) + ' && !Array.isArray(schema' + ($lvl) + ')) { var err = '; /* istanbul ignore else */\n if (it.createErrors !== false) {\n out += ' { keyword: \\'' + ($errorKeyword || 'required') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: \"' + ($errSchemaPath) + '\" , params: { missingProperty: \\'' + ($missingProperty) + '\\' } ';\n if (it.opts.messages !== false) {\n out += ' , message: \\'';\n if (it.opts._errorDataPathProperty) {\n out += 'is a required property';\n } else {\n out += 'should have required property \\\\\\'' + ($missingProperty) + '\\\\\\'';\n }\n out += '\\' ';\n }\n if (it.opts.verbose) {\n out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n }\n out += ' } ';\n } else {\n out += ' {} ';\n }\n out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } else if (schema' + ($lvl) + ' !== undefined) { ';\n }\n out += ' for (var ' + ($i) + ' = 0; ' + ($i) + ' < schema' + ($lvl) + '.length; ' + ($i) + '++) { if (' + ($data) + '[schema' + ($lvl) + '[' + ($i) + ']] === undefined) { var err = '; /* istanbul ignore else */\n if (it.createErrors !== false) {\n out += ' { keyword: \\'' + ($errorKeyword || 'required') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: \"' + ($errSchemaPath) + '\" , params: { missingProperty: \\'' + ($missingProperty) + '\\' } ';\n if (it.opts.messages !== false) {\n out += ' , message: \\'';\n if (it.opts._errorDataPathProperty) {\n out += 'is a required property';\n } else {\n out += 'should have required property \\\\\\'' + ($missingProperty) + '\\\\\\'';\n }\n out += '\\' ';\n }\n if (it.opts.verbose) {\n out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n }\n out += ' } ';\n } else {\n out += ' {} ';\n }\n out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } } ';\n if ($isData) {\n out += ' } ';\n }\n } else {\n var arr3 = $required;\n if (arr3) {\n var $property, $i = -1,\n l3 = arr3.length - 1;\n while ($i < l3) {\n $property = arr3[$i += 1];\n var $prop = it.util.getProperty($property),\n $missingProperty = it.util.escapeQuotes($property);\n if (it.opts._errorDataPathProperty) {\n it.errorPath = it.util.getPath($currentErrorPath, $property, it.opts.jsonPointers);\n }\n out += ' if (' + ($data) + ($prop) + ' === undefined) { var err = '; /* istanbul ignore else */\n if (it.createErrors !== false) {\n out += ' { keyword: \\'' + ($errorKeyword || 'required') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: \"' + ($errSchemaPath) + '\" , params: { missingProperty: \\'' + ($missingProperty) + '\\' } ';\n if (it.opts.messages !== false) {\n out += ' , message: \\'';\n if (it.opts._errorDataPathProperty) {\n out += 'is a required property';\n } else {\n out += 'should have required property \\\\\\'' + ($missingProperty) + '\\\\\\'';\n }\n out += '\\' ';\n }\n if (it.opts.verbose) {\n out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n }\n out += ' } ';\n } else {\n out += ' {} ';\n }\n out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } ';\n }\n }\n }\n }\n it.errorPath = $currentErrorPath;\n } else if ($breakOnError) {\n out += ' if (true) {';\n }\n return out;\n}\n\n},{}],32:[function(require,module,exports){\n'use strict';\nmodule.exports = function generate_switch(it, $keyword) {\n var out = ' ';\n var $lvl = it.level;\n var $dataLvl = it.dataLevel;\n var $schema = it.schema[$keyword];\n var $schemaPath = it.schemaPath + '.' + $keyword;\n var $errSchemaPath = it.errSchemaPath + '/' + $keyword;\n var $breakOnError = !it.opts.allErrors;\n var $errorKeyword;\n var $data = 'data' + ($dataLvl || '');\n var $valid = 'valid' + $lvl;\n var $errs = 'errs__' + $lvl;\n var $it = it.util.copy(it);\n var $closingBraces = '';\n $it.level++;\n var $ifPassed = 'ifPassed' + it.level,\n $shouldContinue;\n out += 'var ' + ($ifPassed) + ';';\n var arr1 = $schema;\n if (arr1) {\n var $sch, $caseIndex = -1,\n l1 = arr1.length - 1;\n while ($caseIndex < l1) {\n $sch = arr1[$caseIndex += 1];\n if ($caseIndex && !$shouldContinue) {\n out += ' if (!' + ($ifPassed) + ') { ';\n $closingBraces += '}';\n }\n if ($sch.if && it.util.schemaHasRules($sch.if, it.RULES.all)) {\n out += ' var ' + ($errs) + ' = errors; ';\n var $wasComposite = it.compositeRule;\n it.compositeRule = $it.compositeRule = true;\n $it.createErrors = false;\n $it.schema = $sch.if;\n $it.schemaPath = $schemaPath + '[' + $caseIndex + '].if';\n $it.errSchemaPath = $errSchemaPath + '/' + $caseIndex + '/if';\n out += ' ' + (it.validate($it)) + ' ';\n $it.createErrors = true;\n it.compositeRule = $it.compositeRule = $wasComposite;\n out += ' ' + ($ifPassed) + ' = valid' + ($it.level) + '; if (' + ($ifPassed) + ') { ';\n if (typeof $sch.then == 'boolean') {\n if ($sch.then === false) {\n var $$outStack = $$outStack || [];\n $$outStack.push(out);\n out = ''; /* istanbul ignore else */\n if (it.createErrors !== false) {\n out += ' { keyword: \\'' + ($errorKeyword || 'switch') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: \"' + ($errSchemaPath) + '\" , params: { caseIndex: ' + ($caseIndex) + ' } ';\n if (it.opts.messages !== false) {\n out += ' , message: \\'should pass \"switch\" keyword validation\\' ';\n }\n if (it.opts.verbose) {\n out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n }\n out += ' } ';\n } else {\n out += ' {} ';\n }\n var __err = out;\n out = $$outStack.pop();\n if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */\n if (it.async) {\n out += ' throw new ValidationError([' + (__err) + ']); ';\n } else {\n out += ' validate.errors = [' + (__err) + ']; return false; ';\n }\n } else {\n out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n }\n }\n out += ' var valid' + ($it.level) + ' = ' + ($sch.then) + '; ';\n } else {\n $it.schema = $sch.then;\n $it.schemaPath = $schemaPath + '[' + $caseIndex + '].then';\n $it.errSchemaPath = $errSchemaPath + '/' + $caseIndex + '/then';\n out += ' ' + (it.validate($it)) + ' ';\n }\n out += ' } else { errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } } ';\n } else {\n out += ' ' + ($ifPassed) + ' = true; ';\n if (typeof $sch.then == 'boolean') {\n if ($sch.then === false) {\n var $$outStack = $$outStack || [];\n $$outStack.push(out);\n out = ''; /* istanbul ignore else */\n if (it.createErrors !== false) {\n out += ' { keyword: \\'' + ($errorKeyword || 'switch') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: \"' + ($errSchemaPath) + '\" , params: { caseIndex: ' + ($caseIndex) + ' } ';\n if (it.opts.messages !== false) {\n out += ' , message: \\'should pass \"switch\" keyword validation\\' ';\n }\n if (it.opts.verbose) {\n out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n }\n out += ' } ';\n } else {\n out += ' {} ';\n }\n var __err = out;\n out = $$outStack.pop();\n if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */\n if (it.async) {\n out += ' throw new ValidationError([' + (__err) + ']); ';\n } else {\n out += ' validate.errors = [' + (__err) + ']; return false; ';\n }\n } else {\n out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n }\n }\n out += ' var valid' + ($it.level) + ' = ' + ($sch.then) + '; ';\n } else {\n $it.schema = $sch.then;\n $it.schemaPath = $schemaPath + '[' + $caseIndex + '].then';\n $it.errSchemaPath = $errSchemaPath + '/' + $caseIndex + '/then';\n out += ' ' + (it.validate($it)) + ' ';\n }\n }\n $shouldContinue = $sch.continue\n }\n }\n out += '' + ($closingBraces) + 'var ' + ($valid) + ' = valid' + ($it.level) + '; ';\n out = it.util.cleanUpCode(out);\n return out;\n}\n\n},{}],33:[function(require,module,exports){\n'use strict';\nmodule.exports = function generate_uniqueItems(it, $keyword) {\n var out = ' ';\n var $lvl = it.level;\n var $dataLvl = it.dataLevel;\n var $schema = it.schema[$keyword];\n var $schemaPath = it.schemaPath + '.' + $keyword;\n var $errSchemaPath = it.errSchemaPath + '/' + $keyword;\n var $breakOnError = !it.opts.allErrors;\n var $errorKeyword;\n var $data = 'data' + ($dataLvl || '');\n var $valid = 'valid' + $lvl;\n var $isData = it.opts.v5 && $schema.$data;\n var $schemaValue = $isData ? it.util.getData($schema.$data, $dataLvl, it.dataPathArr) : $schema;\n if ($isData) {\n out += ' var schema' + ($lvl) + ' = ' + ($schemaValue) + '; ';\n $schemaValue = 'schema' + $lvl;\n }\n if (($schema || $isData) && it.opts.uniqueItems !== false) {\n if ($isData) {\n out += ' var ' + ($valid) + '; if (' + ($schemaValue) + ' === false || ' + ($schemaValue) + ' === undefined) ' + ($valid) + ' = true; else if (typeof ' + ($schemaValue) + ' != \\'boolean\\') ' + ($valid) + ' = false; else { ';\n }\n out += ' var ' + ($valid) + ' = true; if (' + ($data) + '.length > 1) { var i = ' + ($data) + '.length, j; outer: for (;i--;) { for (j = i; j--;) { if (equal(' + ($data) + '[i], ' + ($data) + '[j])) { ' + ($valid) + ' = false; break outer; } } } } ';\n if ($isData) {\n out += ' } ';\n }\n out += ' if (!' + ($valid) + ') { ';\n var $$outStack = $$outStack || [];\n $$outStack.push(out);\n out = ''; /* istanbul ignore else */\n if (it.createErrors !== false) {\n out += ' { keyword: \\'' + ($errorKeyword || 'uniqueItems') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: \"' + ($errSchemaPath) + '\" , params: { i: i, j: j } ';\n if (it.opts.messages !== false) {\n out += ' , message: \\'should NOT have duplicate items (items ## \\' + j + \\' and \\' + i + \\' are identical)\\' ';\n }\n if (it.opts.verbose) {\n out += ' , schema: ';\n if ($isData) {\n out += 'validate.schema' + ($schemaPath);\n } else {\n out += '' + ($schema);\n }\n out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n }\n out += ' } ';\n } else {\n out += ' {} ';\n }\n var __err = out;\n out = $$outStack.pop();\n if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */\n if (it.async) {\n out += ' throw new ValidationError([' + (__err) + ']); ';\n } else {\n out += ' validate.errors = [' + (__err) + ']; return false; ';\n }\n } else {\n out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n }\n out += ' } ';\n if ($breakOnError) {\n out += ' else { ';\n }\n } else {\n if ($breakOnError) {\n out += ' if (true) { ';\n }\n }\n return out;\n}\n\n},{}],34:[function(require,module,exports){\n'use strict';\nmodule.exports = function generate_validate(it, $keyword) {\n var out = '';\n var $async = it.schema.$async === true;\n if (it.isTop) {\n var $top = it.isTop,\n $lvl = it.level = 0,\n $dataLvl = it.dataLevel = 0,\n $data = 'data';\n it.rootId = it.resolve.fullPath(it.root.schema.id);\n it.baseId = it.baseId || it.rootId;\n if ($async) {\n it.async = true;\n var $es7 = it.opts.async == 'es7';\n it.yieldAwait = $es7 ? 'await' : 'yield';\n }\n delete it.isTop;\n it.dataPathArr = [undefined];\n out += ' validate = ';\n if ($async) {\n if ($es7) {\n out += ' (async function ';\n } else {\n if (it.opts.async == 'co*') {\n out += 'co.wrap';\n }\n out += '(function* ';\n }\n } else {\n out += ' (function ';\n }\n out += ' (data, dataPath, parentData, parentDataProperty) { \\'use strict\\'; var vErrors = null; ';\n out += ' var errors = 0; ';\n } else {\n var $lvl = it.level,\n $dataLvl = it.dataLevel,\n $data = 'data' + ($dataLvl || '');\n if (it.schema.id) it.baseId = it.resolve.url(it.baseId, it.schema.id);\n if ($async && !it.async) throw new Error('async schema in sync schema');\n out += ' var errs_' + ($lvl) + ' = errors;';\n }\n var $valid = 'valid' + $lvl,\n $breakOnError = !it.opts.allErrors,\n $closingBraces1 = '',\n $closingBraces2 = '',\n $errorKeyword;\n var $typeSchema = it.schema.type,\n $typeIsArray = Array.isArray($typeSchema);\n if ($typeSchema && it.opts.coerceTypes) {\n var $coerceToTypes = it.util.coerceToTypes($typeSchema);\n if ($coerceToTypes) {\n var $schemaPath = it.schemaPath + '.type',\n $errSchemaPath = it.errSchemaPath + '/type',\n $method = $typeIsArray ? 'checkDataTypes' : 'checkDataType';\n out += ' if (' + (it.util[$method]($typeSchema, $data, true)) + ') { ';\n var $dataType = 'dataType' + $lvl,\n $coerced = 'coerced' + $lvl;\n out += ' var ' + ($dataType) + ' = typeof ' + ($data) + '; var ' + ($coerced) + '; ';\n var $bracesCoercion = '';\n var arr1 = $coerceToTypes;\n if (arr1) {\n var $type, $i = -1,\n l1 = arr1.length - 1;\n while ($i < l1) {\n $type = arr1[$i += 1];\n if ($i) {\n out += ' if (' + ($coerced) + ' === undefined) { ';\n $bracesCoercion += '}';\n }\n if ($type == 'string') {\n out += ' if (' + ($dataType) + ' == \\'number\\' || ' + ($dataType) + ' == \\'boolean\\') ' + ($coerced) + ' = \\'\\' + ' + ($data) + '; else if (' + ($data) + ' === null) ' + ($coerced) + ' = \\'\\'; ';\n } else if ($type == 'number' || $type == 'integer') {\n out += ' if (' + ($dataType) + ' == \\'boolean\\' || ' + ($data) + ' === null || (' + ($dataType) + ' == \\'string\\' && ' + ($data) + ' && ' + ($data) + ' == +' + ($data) + ' ';\n if ($type == 'integer') {\n out += ' && !(' + ($data) + ' % 1)';\n }\n out += ')) ' + ($coerced) + ' = +' + ($data) + '; ';\n } else if ($type == 'boolean') {\n out += ' if (' + ($data) + ' === \\'false\\' || ' + ($data) + ' === 0 || ' + ($data) + ' === null) ' + ($coerced) + ' = false; else if (' + ($data) + ' === \\'true\\' || ' + ($data) + ' === 1) ' + ($coerced) + ' = true; ';\n } else if ($type == 'null') {\n out += ' if (' + ($data) + ' === \\'\\' || ' + ($data) + ' === 0 || ' + ($data) + ' === false) ' + ($coerced) + ' = null; ';\n }\n }\n }\n out += ' ' + ($bracesCoercion) + ' if (' + ($coerced) + ' === undefined) { ';\n var $$outStack = $$outStack || [];\n $$outStack.push(out);\n out = ''; /* istanbul ignore else */\n if (it.createErrors !== false) {\n out += ' { keyword: \\'' + ($errorKeyword || 'type') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: \"' + ($errSchemaPath) + '\" , params: { type: \\'';\n if ($typeIsArray) {\n out += '' + ($typeSchema.join(\",\"));\n } else {\n out += '' + ($typeSchema);\n }\n out += '\\' } ';\n if (it.opts.messages !== false) {\n out += ' , message: \\'should be ';\n if ($typeIsArray) {\n out += '' + ($typeSchema.join(\",\"));\n } else {\n out += '' + ($typeSchema);\n }\n out += '\\' ';\n }\n if (it.opts.verbose) {\n out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n }\n out += ' } ';\n } else {\n out += ' {} ';\n }\n var __err = out;\n out = $$outStack.pop();\n if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */\n if (it.async) {\n out += ' throw new ValidationError([' + (__err) + ']); ';\n } else {\n out += ' validate.errors = [' + (__err) + ']; return false; ';\n }\n } else {\n out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n }\n out += ' } else { ';\n if ($dataLvl) {\n var $parentData = 'data' + (($dataLvl - 1) || ''),\n $dataProperty = it.dataPathArr[$dataLvl];\n out += ' ' + ($data) + ' = ' + ($parentData) + '[' + ($dataProperty) + '] = ' + ($coerced) + '; ';\n } else {\n out += ' data = ' + ($coerced) + '; if (parentData !== undefined) parentData[parentDataProperty] = ' + ($coerced) + '; ';\n }\n out += ' } } ';\n }\n }\n var arr2 = it.RULES;\n if (arr2) {\n var $rulesGroup, i2 = -1,\n l2 = arr2.length - 1;\n while (i2 < l2) {\n $rulesGroup = arr2[i2 += 1];\n if ($shouldUseGroup($rulesGroup)) {\n if ($rulesGroup.type) {\n out += ' if (' + (it.util.checkDataType($rulesGroup.type, $data)) + ') { ';\n }\n if (it.opts.useDefaults && !it.compositeRule) {\n if ($rulesGroup.type == 'object' && it.schema.properties) {\n var $schema = it.schema.properties,\n $schemaKeys = Object.keys($schema);\n var arr3 = $schemaKeys;\n if (arr3) {\n var $propertyKey, i3 = -1,\n l3 = arr3.length - 1;\n while (i3 < l3) {\n $propertyKey = arr3[i3 += 1];\n var $sch = $schema[$propertyKey];\n if ($sch.default !== undefined) {\n var $passData = $data + it.util.getProperty($propertyKey);\n out += ' if (' + ($passData) + ' === undefined) ' + ($passData) + ' = ';\n if (it.opts.useDefaults == 'clone') {\n out += ' ' + (JSON.stringify($sch.default)) + ' ';\n } else {\n out += ' ' + (it.useDefault($sch.default)) + ' ';\n }\n out += '; ';\n }\n }\n }\n } else if ($rulesGroup.type == 'array' && Array.isArray(it.schema.items)) {\n var arr4 = it.schema.items;\n if (arr4) {\n var $sch, $i = -1,\n l4 = arr4.length - 1;\n while ($i < l4) {\n $sch = arr4[$i += 1];\n if ($sch.default !== undefined) {\n var $passData = $data + '[' + $i + ']';\n out += ' if (' + ($passData) + ' === undefined) ' + ($passData) + ' = ';\n if (it.opts.useDefaults == 'clone') {\n out += ' ' + (JSON.stringify($sch.default)) + ' ';\n } else {\n out += ' ' + (it.useDefault($sch.default)) + ' ';\n }\n out += '; ';\n }\n }\n }\n }\n }\n var arr5 = $rulesGroup.rules;\n if (arr5) {\n var $rule, i5 = -1,\n l5 = arr5.length - 1;\n while (i5 < l5) {\n $rule = arr5[i5 += 1];\n if ($shouldUseRule($rule)) {\n if ($rule.custom) {\n var $schema = it.schema[$rule.keyword],\n $ruleValidate = it.useCustomRule($rule, $schema, it.schema, it),\n $ruleErrs = $ruleValidate.code + '.errors',\n $schemaPath = it.schemaPath + '.' + $rule.keyword,\n $errSchemaPath = it.errSchemaPath + '/' + $rule.keyword,\n $errs = 'errs' + $lvl,\n $i = 'i' + $lvl,\n $ruleErr = 'ruleErr' + $lvl,\n $rDef = $rule.definition,\n $asyncKeyword = $rDef.async,\n $inline = $rDef.inline,\n $macro = $rDef.macro;\n if ($asyncKeyword && !it.async) throw new Error('async keyword in sync schema');\n if (!($inline || $macro)) {\n out += '' + ($ruleErrs) + ' = null;';\n }\n out += 'var ' + ($errs) + ' = errors;var valid' + ($lvl) + ';';\n if ($inline && $rDef.statements) {\n out += ' ' + ($ruleValidate.validate);\n } else if ($macro) {\n var $it = it.util.copy(it);\n $it.level++;\n $it.schema = $ruleValidate.validate;\n $it.schemaPath = '';\n var $wasComposite = it.compositeRule;\n it.compositeRule = $it.compositeRule = true;\n var $code = it.validate($it).replace(/validate\\.schema/g, $ruleValidate.code);\n it.compositeRule = $it.compositeRule = $wasComposite;\n out += ' ' + ($code);\n } else if ($rDef.compile || $rDef.validate) {\n var $$outStack = $$outStack || [];\n $$outStack.push(out);\n out = '';\n out += ' ' + ($ruleValidate.code) + '.call( ';\n if (it.opts.passContext) {\n out += 'this';\n } else {\n out += 'self';\n }\n var $validateArgs = $ruleValidate.validate.length;\n if ($rDef.compile || $rDef.schema === false) {\n out += ' , ' + ($data) + ' ';\n } else {\n out += ' , validate.schema' + ($schemaPath) + ' , ' + ($data) + ' , validate.schema' + (it.schemaPath) + ' ';\n }\n out += ' , (dataPath || \\'\\')';\n if (it.errorPath != '\"\"') {\n out += ' + ' + (it.errorPath);\n }\n if ($dataLvl) {\n out += ' , data' + (($dataLvl - 1) || '') + ' , ' + (it.dataPathArr[$dataLvl]) + ' ';\n } else {\n out += ' , parentData , parentDataProperty ';\n }\n out += ' ) ';\n var def_callRuleValidate = out;\n out = $$outStack.pop();\n if ($rDef.errors !== false) {\n if ($asyncKeyword) {\n $ruleErrs = 'customErrors' + $lvl;\n out += ' var ' + ($ruleErrs) + ' = null; try { valid' + ($lvl) + ' = ' + (it.yieldAwait) + (def_callRuleValidate) + '; } catch (e) { valid' + ($lvl) + ' = false; if (e instanceof ValidationError) ' + ($ruleErrs) + ' = e.errors; else throw e; } ';\n } else {\n out += ' ' + ($ruleValidate.code) + '.errors = null; ';\n }\n }\n }\n out += 'if (! ';\n if ($inline) {\n if ($rDef.statements) {\n out += ' valid' + ($lvl) + ' ';\n } else {\n out += ' (' + ($ruleValidate.validate) + ') ';\n }\n } else if ($macro) {\n out += ' valid' + ($it.level) + ' ';\n } else {\n if ($asyncKeyword) {\n if ($rDef.errors === false) {\n out += ' (' + (it.yieldAwait) + (def_callRuleValidate) + ') ';\n } else {\n out += ' valid' + ($lvl) + ' ';\n }\n } else {\n out += ' ' + (def_callRuleValidate) + ' ';\n }\n }\n out += ') { ';\n $errorKeyword = $rule.keyword;\n var $$outStack = $$outStack || [];\n $$outStack.push(out);\n out = '';\n var $$outStack = $$outStack || [];\n $$outStack.push(out);\n out = ''; /* istanbul ignore else */\n if (it.createErrors !== false) {\n out += ' { keyword: \\'' + ($errorKeyword || 'custom') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: \"' + ($errSchemaPath) + '\" , params: { keyword: \\'' + ($rule.keyword) + '\\' } ';\n if (it.opts.messages !== false) {\n out += ' , message: \\'should pass \"' + ($rule.keyword) + '\" keyword validation\\' ';\n }\n if (it.opts.verbose) {\n out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n }\n out += ' } ';\n } else {\n out += ' {} ';\n }\n var __err = out;\n out = $$outStack.pop();\n if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */\n if (it.async) {\n out += ' throw new ValidationError([' + (__err) + ']); ';\n } else {\n out += ' validate.errors = [' + (__err) + ']; return false; ';\n }\n } else {\n out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n }\n var def_customError = out;\n out = $$outStack.pop();\n if ($inline) {\n if ($rDef.errors) {\n if ($rDef.errors != 'full') {\n out += ' for (var ' + ($i) + '=' + ($errs) + '; ' + ($i) + '= 0x80 (not a basic code point)',\n\t\t'invalid-input': 'Invalid input'\n\t},\n\n\t/** Convenience shortcuts */\n\tbaseMinusTMin = base - tMin,\n\tfloor = Math.floor,\n\tstringFromCharCode = String.fromCharCode,\n\n\t/** Temporary variable */\n\tkey;\n\n\t/*--------------------------------------------------------------------------*/\n\n\t/**\n\t * A generic error utility function.\n\t * @private\n\t * @param {String} type The error type.\n\t * @returns {Error} Throws a `RangeError` with the applicable error message.\n\t */\n\tfunction error(type) {\n\t\tthrow new RangeError(errors[type]);\n\t}\n\n\t/**\n\t * A generic `Array#map` utility function.\n\t * @private\n\t * @param {Array} array The array to iterate over.\n\t * @param {Function} callback The function that gets called for every array\n\t * item.\n\t * @returns {Array} A new array of values returned by the callback function.\n\t */\n\tfunction map(array, fn) {\n\t\tvar length = array.length;\n\t\tvar result = [];\n\t\twhile (length--) {\n\t\t\tresult[length] = fn(array[length]);\n\t\t}\n\t\treturn result;\n\t}\n\n\t/**\n\t * A simple `Array#map`-like wrapper to work with domain name strings or email\n\t * addresses.\n\t * @private\n\t * @param {String} domain The domain name or email address.\n\t * @param {Function} callback The function that gets called for every\n\t * character.\n\t * @returns {Array} A new string of characters returned by the callback\n\t * function.\n\t */\n\tfunction mapDomain(string, fn) {\n\t\tvar parts = string.split('@');\n\t\tvar result = '';\n\t\tif (parts.length > 1) {\n\t\t\t// In email addresses, only the domain name should be punycoded. Leave\n\t\t\t// the local part (i.e. everything up to `@`) intact.\n\t\t\tresult = parts[0] + '@';\n\t\t\tstring = parts[1];\n\t\t}\n\t\t// Avoid `split(regex)` for IE8 compatibility. See #17.\n\t\tstring = string.replace(regexSeparators, '\\x2E');\n\t\tvar labels = string.split('.');\n\t\tvar encoded = map(labels, fn).join('.');\n\t\treturn result + encoded;\n\t}\n\n\t/**\n\t * Creates an array containing the numeric code points of each Unicode\n\t * character in the string. While JavaScript uses UCS-2 internally,\n\t * this function will convert a pair of surrogate halves (each of which\n\t * UCS-2 exposes as separate characters) into a single code point,\n\t * matching UTF-16.\n\t * @see `punycode.ucs2.encode`\n\t * @see \n\t * @memberOf punycode.ucs2\n\t * @name decode\n\t * @param {String} string The Unicode input string (UCS-2).\n\t * @returns {Array} The new array of code points.\n\t */\n\tfunction ucs2decode(string) {\n\t\tvar output = [],\n\t\t counter = 0,\n\t\t length = string.length,\n\t\t value,\n\t\t extra;\n\t\twhile (counter < length) {\n\t\t\tvalue = string.charCodeAt(counter++);\n\t\t\tif (value >= 0xD800 && value <= 0xDBFF && counter < length) {\n\t\t\t\t// high surrogate, and there is a next character\n\t\t\t\textra = string.charCodeAt(counter++);\n\t\t\t\tif ((extra & 0xFC00) == 0xDC00) { // low surrogate\n\t\t\t\t\toutput.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);\n\t\t\t\t} else {\n\t\t\t\t\t// unmatched surrogate; only append this code unit, in case the next\n\t\t\t\t\t// code unit is the high surrogate of a surrogate pair\n\t\t\t\t\toutput.push(value);\n\t\t\t\t\tcounter--;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\toutput.push(value);\n\t\t\t}\n\t\t}\n\t\treturn output;\n\t}\n\n\t/**\n\t * Creates a string based on an array of numeric code points.\n\t * @see `punycode.ucs2.decode`\n\t * @memberOf punycode.ucs2\n\t * @name encode\n\t * @param {Array} codePoints The array of numeric code points.\n\t * @returns {String} The new Unicode string (UCS-2).\n\t */\n\tfunction ucs2encode(array) {\n\t\treturn map(array, function(value) {\n\t\t\tvar output = '';\n\t\t\tif (value > 0xFFFF) {\n\t\t\t\tvalue -= 0x10000;\n\t\t\t\toutput += stringFromCharCode(value >>> 10 & 0x3FF | 0xD800);\n\t\t\t\tvalue = 0xDC00 | value & 0x3FF;\n\t\t\t}\n\t\t\toutput += stringFromCharCode(value);\n\t\t\treturn output;\n\t\t}).join('');\n\t}\n\n\t/**\n\t * Converts a basic code point into a digit/integer.\n\t * @see `digitToBasic()`\n\t * @private\n\t * @param {Number} codePoint The basic numeric code point value.\n\t * @returns {Number} The numeric value of a basic code point (for use in\n\t * representing integers) in the range `0` to `base - 1`, or `base` if\n\t * the code point does not represent a value.\n\t */\n\tfunction basicToDigit(codePoint) {\n\t\tif (codePoint - 48 < 10) {\n\t\t\treturn codePoint - 22;\n\t\t}\n\t\tif (codePoint - 65 < 26) {\n\t\t\treturn codePoint - 65;\n\t\t}\n\t\tif (codePoint - 97 < 26) {\n\t\t\treturn codePoint - 97;\n\t\t}\n\t\treturn base;\n\t}\n\n\t/**\n\t * Converts a digit/integer into a basic code point.\n\t * @see `basicToDigit()`\n\t * @private\n\t * @param {Number} digit The numeric value of a basic code point.\n\t * @returns {Number} The basic code point whose value (when used for\n\t * representing integers) is `digit`, which needs to be in the range\n\t * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is\n\t * used; else, the lowercase form is used. The behavior is undefined\n\t * if `flag` is non-zero and `digit` has no uppercase form.\n\t */\n\tfunction digitToBasic(digit, flag) {\n\t\t// 0..25 map to ASCII a..z or A..Z\n\t\t// 26..35 map to ASCII 0..9\n\t\treturn digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5);\n\t}\n\n\t/**\n\t * Bias adaptation function as per section 3.4 of RFC 3492.\n\t * https://tools.ietf.org/html/rfc3492#section-3.4\n\t * @private\n\t */\n\tfunction adapt(delta, numPoints, firstTime) {\n\t\tvar k = 0;\n\t\tdelta = firstTime ? floor(delta / damp) : delta >> 1;\n\t\tdelta += floor(delta / numPoints);\n\t\tfor (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) {\n\t\t\tdelta = floor(delta / baseMinusTMin);\n\t\t}\n\t\treturn floor(k + (baseMinusTMin + 1) * delta / (delta + skew));\n\t}\n\n\t/**\n\t * Converts a Punycode string of ASCII-only symbols to a string of Unicode\n\t * symbols.\n\t * @memberOf punycode\n\t * @param {String} input The Punycode string of ASCII-only symbols.\n\t * @returns {String} The resulting string of Unicode symbols.\n\t */\n\tfunction decode(input) {\n\t\t// Don't use UCS-2\n\t\tvar output = [],\n\t\t inputLength = input.length,\n\t\t out,\n\t\t i = 0,\n\t\t n = initialN,\n\t\t bias = initialBias,\n\t\t basic,\n\t\t j,\n\t\t index,\n\t\t oldi,\n\t\t w,\n\t\t k,\n\t\t digit,\n\t\t t,\n\t\t /** Cached calculation results */\n\t\t baseMinusT;\n\n\t\t// Handle the basic code points: let `basic` be the number of input code\n\t\t// points before the last delimiter, or `0` if there is none, then copy\n\t\t// the first basic code points to the output.\n\n\t\tbasic = input.lastIndexOf(delimiter);\n\t\tif (basic < 0) {\n\t\t\tbasic = 0;\n\t\t}\n\n\t\tfor (j = 0; j < basic; ++j) {\n\t\t\t// if it's not a basic code point\n\t\t\tif (input.charCodeAt(j) >= 0x80) {\n\t\t\t\terror('not-basic');\n\t\t\t}\n\t\t\toutput.push(input.charCodeAt(j));\n\t\t}\n\n\t\t// Main decoding loop: start just after the last delimiter if any basic code\n\t\t// points were copied; start at the beginning otherwise.\n\n\t\tfor (index = basic > 0 ? basic + 1 : 0; index < inputLength; /* no final expression */) {\n\n\t\t\t// `index` is the index of the next character to be consumed.\n\t\t\t// Decode a generalized variable-length integer into `delta`,\n\t\t\t// which gets added to `i`. The overflow checking is easier\n\t\t\t// if we increase `i` as we go, then subtract off its starting\n\t\t\t// value at the end to obtain `delta`.\n\t\t\tfor (oldi = i, w = 1, k = base; /* no condition */; k += base) {\n\n\t\t\t\tif (index >= inputLength) {\n\t\t\t\t\terror('invalid-input');\n\t\t\t\t}\n\n\t\t\t\tdigit = basicToDigit(input.charCodeAt(index++));\n\n\t\t\t\tif (digit >= base || digit > floor((maxInt - i) / w)) {\n\t\t\t\t\terror('overflow');\n\t\t\t\t}\n\n\t\t\t\ti += digit * w;\n\t\t\t\tt = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);\n\n\t\t\t\tif (digit < t) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tbaseMinusT = base - t;\n\t\t\t\tif (w > floor(maxInt / baseMinusT)) {\n\t\t\t\t\terror('overflow');\n\t\t\t\t}\n\n\t\t\t\tw *= baseMinusT;\n\n\t\t\t}\n\n\t\t\tout = output.length + 1;\n\t\t\tbias = adapt(i - oldi, out, oldi == 0);\n\n\t\t\t// `i` was supposed to wrap around from `out` to `0`,\n\t\t\t// incrementing `n` each time, so we'll fix that now:\n\t\t\tif (floor(i / out) > maxInt - n) {\n\t\t\t\terror('overflow');\n\t\t\t}\n\n\t\t\tn += floor(i / out);\n\t\t\ti %= out;\n\n\t\t\t// Insert `n` at position `i` of the output\n\t\t\toutput.splice(i++, 0, n);\n\n\t\t}\n\n\t\treturn ucs2encode(output);\n\t}\n\n\t/**\n\t * Converts a string of Unicode symbols (e.g. a domain name label) to a\n\t * Punycode string of ASCII-only symbols.\n\t * @memberOf punycode\n\t * @param {String} input The string of Unicode symbols.\n\t * @returns {String} The resulting Punycode string of ASCII-only symbols.\n\t */\n\tfunction encode(input) {\n\t\tvar n,\n\t\t delta,\n\t\t handledCPCount,\n\t\t basicLength,\n\t\t bias,\n\t\t j,\n\t\t m,\n\t\t q,\n\t\t k,\n\t\t t,\n\t\t currentValue,\n\t\t output = [],\n\t\t /** `inputLength` will hold the number of code points in `input`. */\n\t\t inputLength,\n\t\t /** Cached calculation results */\n\t\t handledCPCountPlusOne,\n\t\t baseMinusT,\n\t\t qMinusT;\n\n\t\t// Convert the input in UCS-2 to Unicode\n\t\tinput = ucs2decode(input);\n\n\t\t// Cache the length\n\t\tinputLength = input.length;\n\n\t\t// Initialize the state\n\t\tn = initialN;\n\t\tdelta = 0;\n\t\tbias = initialBias;\n\n\t\t// Handle the basic code points\n\t\tfor (j = 0; j < inputLength; ++j) {\n\t\t\tcurrentValue = input[j];\n\t\t\tif (currentValue < 0x80) {\n\t\t\t\toutput.push(stringFromCharCode(currentValue));\n\t\t\t}\n\t\t}\n\n\t\thandledCPCount = basicLength = output.length;\n\n\t\t// `handledCPCount` is the number of code points that have been handled;\n\t\t// `basicLength` is the number of basic code points.\n\n\t\t// Finish the basic string - if it is not empty - with a delimiter\n\t\tif (basicLength) {\n\t\t\toutput.push(delimiter);\n\t\t}\n\n\t\t// Main encoding loop:\n\t\twhile (handledCPCount < inputLength) {\n\n\t\t\t// All non-basic code points < n have been handled already. Find the next\n\t\t\t// larger one:\n\t\t\tfor (m = maxInt, j = 0; j < inputLength; ++j) {\n\t\t\t\tcurrentValue = input[j];\n\t\t\t\tif (currentValue >= n && currentValue < m) {\n\t\t\t\t\tm = currentValue;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Increase `delta` enough to advance the decoder's state to ,\n\t\t\t// but guard against overflow\n\t\t\thandledCPCountPlusOne = handledCPCount + 1;\n\t\t\tif (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) {\n\t\t\t\terror('overflow');\n\t\t\t}\n\n\t\t\tdelta += (m - n) * handledCPCountPlusOne;\n\t\t\tn = m;\n\n\t\t\tfor (j = 0; j < inputLength; ++j) {\n\t\t\t\tcurrentValue = input[j];\n\n\t\t\t\tif (currentValue < n && ++delta > maxInt) {\n\t\t\t\t\terror('overflow');\n\t\t\t\t}\n\n\t\t\t\tif (currentValue == n) {\n\t\t\t\t\t// Represent delta as a generalized variable-length integer\n\t\t\t\t\tfor (q = delta, k = base; /* no condition */; k += base) {\n\t\t\t\t\t\tt = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);\n\t\t\t\t\t\tif (q < t) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tqMinusT = q - t;\n\t\t\t\t\t\tbaseMinusT = base - t;\n\t\t\t\t\t\toutput.push(\n\t\t\t\t\t\t\tstringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0))\n\t\t\t\t\t\t);\n\t\t\t\t\t\tq = floor(qMinusT / baseMinusT);\n\t\t\t\t\t}\n\n\t\t\t\t\toutput.push(stringFromCharCode(digitToBasic(q, 0)));\n\t\t\t\t\tbias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength);\n\t\t\t\t\tdelta = 0;\n\t\t\t\t\t++handledCPCount;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t++delta;\n\t\t\t++n;\n\n\t\t}\n\t\treturn output.join('');\n\t}\n\n\t/**\n\t * Converts a Punycode string representing a domain name or an email address\n\t * to Unicode. Only the Punycoded parts of the input will be converted, i.e.\n\t * it doesn't matter if you call it on a string that has already been\n\t * converted to Unicode.\n\t * @memberOf punycode\n\t * @param {String} input The Punycoded domain name or email address to\n\t * convert to Unicode.\n\t * @returns {String} The Unicode representation of the given Punycode\n\t * string.\n\t */\n\tfunction toUnicode(input) {\n\t\treturn mapDomain(input, function(string) {\n\t\t\treturn regexPunycode.test(string)\n\t\t\t\t? decode(string.slice(4).toLowerCase())\n\t\t\t\t: string;\n\t\t});\n\t}\n\n\t/**\n\t * Converts a Unicode string representing a domain name or an email address to\n\t * Punycode. Only the non-ASCII parts of the domain name will be converted,\n\t * i.e. it doesn't matter if you call it with a domain that's already in\n\t * ASCII.\n\t * @memberOf punycode\n\t * @param {String} input The domain name or email address to convert, as a\n\t * Unicode string.\n\t * @returns {String} The Punycode representation of the given domain name or\n\t * email address.\n\t */\n\tfunction toASCII(input) {\n\t\treturn mapDomain(input, function(string) {\n\t\t\treturn regexNonASCII.test(string)\n\t\t\t\t? 'xn--' + encode(string)\n\t\t\t\t: string;\n\t\t});\n\t}\n\n\t/*--------------------------------------------------------------------------*/\n\n\t/** Define the public API */\n\tpunycode = {\n\t\t/**\n\t\t * A string representing the current Punycode.js version number.\n\t\t * @memberOf punycode\n\t\t * @type String\n\t\t */\n\t\t'version': '1.3.2',\n\t\t/**\n\t\t * An object of methods to convert from JavaScript's internal character\n\t\t * representation (UCS-2) to Unicode code points, and back.\n\t\t * @see \n\t\t * @memberOf punycode\n\t\t * @type Object\n\t\t */\n\t\t'ucs2': {\n\t\t\t'decode': ucs2decode,\n\t\t\t'encode': ucs2encode\n\t\t},\n\t\t'decode': decode,\n\t\t'encode': encode,\n\t\t'toASCII': toASCII,\n\t\t'toUnicode': toUnicode\n\t};\n\n\t/** Expose `punycode` */\n\t// Some AMD build optimizers, like r.js, check for specific condition patterns\n\t// like the following:\n\tif (\n\t\ttypeof define == 'function' &&\n\t\ttypeof define.amd == 'object' &&\n\t\tdefine.amd\n\t) {\n\t\tdefine('punycode', function() {\n\t\t\treturn punycode;\n\t\t});\n\t} else if (freeExports && freeModule) {\n\t\tif (module.exports == freeExports) {\n\t\t\t// in Node.js, io.js, or RingoJS v0.8.0+\n\t\t\tfreeModule.exports = punycode;\n\t\t} else {\n\t\t\t// in Narwhal or RingoJS v0.7.0-\n\t\t\tfor (key in punycode) {\n\t\t\t\tpunycode.hasOwnProperty(key) && (freeExports[key] = punycode[key]);\n\t\t\t}\n\t\t}\n\t} else {\n\t\t// in Rhino or a web browser\n\t\troot.punycode = punycode;\n\t}\n\n}(this));\n\n}).call(this,typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : {})\n},{}],40:[function(require,module,exports){\n// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\n// If obj.hasOwnProperty has been overridden, then calling\n// obj.hasOwnProperty(prop) will break.\n// See: https://github.com/joyent/node/issues/1707\nfunction hasOwnProperty(obj, prop) {\n return Object.prototype.hasOwnProperty.call(obj, prop);\n}\n\nmodule.exports = function(qs, sep, eq, options) {\n sep = sep || '&';\n eq = eq || '=';\n var obj = {};\n\n if (typeof qs !== 'string' || qs.length === 0) {\n return obj;\n }\n\n var regexp = /\\+/g;\n qs = qs.split(sep);\n\n var maxKeys = 1000;\n if (options && typeof options.maxKeys === 'number') {\n maxKeys = options.maxKeys;\n }\n\n var len = qs.length;\n // maxKeys <= 0 means that we should not limit keys count\n if (maxKeys > 0 && len > maxKeys) {\n len = maxKeys;\n }\n\n for (var i = 0; i < len; ++i) {\n var x = qs[i].replace(regexp, '%20'),\n idx = x.indexOf(eq),\n kstr, vstr, k, v;\n\n if (idx >= 0) {\n kstr = x.substr(0, idx);\n vstr = x.substr(idx + 1);\n } else {\n kstr = x;\n vstr = '';\n }\n\n k = decodeURIComponent(kstr);\n v = decodeURIComponent(vstr);\n\n if (!hasOwnProperty(obj, k)) {\n obj[k] = v;\n } else if (isArray(obj[k])) {\n obj[k].push(v);\n } else {\n obj[k] = [obj[k], v];\n }\n }\n\n return obj;\n};\n\nvar isArray = Array.isArray || function (xs) {\n return Object.prototype.toString.call(xs) === '[object Array]';\n};\n\n},{}],41:[function(require,module,exports){\n// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\nvar stringifyPrimitive = function(v) {\n switch (typeof v) {\n case 'string':\n return v;\n\n case 'boolean':\n return v ? 'true' : 'false';\n\n case 'number':\n return isFinite(v) ? v : '';\n\n default:\n return '';\n }\n};\n\nmodule.exports = function(obj, sep, eq, name) {\n sep = sep || '&';\n eq = eq || '=';\n if (obj === null) {\n obj = undefined;\n }\n\n if (typeof obj === 'object') {\n return map(objectKeys(obj), function(k) {\n var ks = encodeURIComponent(stringifyPrimitive(k)) + eq;\n if (isArray(obj[k])) {\n return map(obj[k], function(v) {\n return ks + encodeURIComponent(stringifyPrimitive(v));\n }).join(sep);\n } else {\n return ks + encodeURIComponent(stringifyPrimitive(obj[k]));\n }\n }).join(sep);\n\n }\n\n if (!name) return '';\n return encodeURIComponent(stringifyPrimitive(name)) + eq +\n encodeURIComponent(stringifyPrimitive(obj));\n};\n\nvar isArray = Array.isArray || function (xs) {\n return Object.prototype.toString.call(xs) === '[object Array]';\n};\n\nfunction map (xs, f) {\n if (xs.map) return xs.map(f);\n var res = [];\n for (var i = 0; i < xs.length; i++) {\n res.push(f(xs[i], i));\n }\n return res;\n}\n\nvar objectKeys = Object.keys || function (obj) {\n var res = [];\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) res.push(key);\n }\n return res;\n};\n\n},{}],42:[function(require,module,exports){\n'use strict';\n\nexports.decode = exports.parse = require('./decode');\nexports.encode = exports.stringify = require('./encode');\n\n},{\"./decode\":40,\"./encode\":41}],43:[function(require,module,exports){\n// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\nvar punycode = require('punycode');\nvar util = require('./util');\n\nexports.parse = urlParse;\nexports.resolve = urlResolve;\nexports.resolveObject = urlResolveObject;\nexports.format = urlFormat;\n\nexports.Url = Url;\n\nfunction Url() {\n this.protocol = null;\n this.slashes = null;\n this.auth = null;\n this.host = null;\n this.port = null;\n this.hostname = null;\n this.hash = null;\n this.search = null;\n this.query = null;\n this.pathname = null;\n this.path = null;\n this.href = null;\n}\n\n// Reference: RFC 3986, RFC 1808, RFC 2396\n\n// define these here so at least they only have to be\n// compiled once on the first module load.\nvar protocolPattern = /^([a-z0-9.+-]+:)/i,\n portPattern = /:[0-9]*$/,\n\n // Special case for a simple path URL\n simplePathPattern = /^(\\/\\/?(?!\\/)[^\\?\\s]*)(\\?[^\\s]*)?$/,\n\n // RFC 2396: characters reserved for delimiting URLs.\n // We actually just auto-escape these.\n delims = ['<', '>', '\"', '`', ' ', '\\r', '\\n', '\\t'],\n\n // RFC 2396: characters not allowed for various reasons.\n unwise = ['{', '}', '|', '\\\\', '^', '`'].concat(delims),\n\n // Allowed by RFCs, but cause of XSS attacks. Always escape these.\n autoEscape = ['\\''].concat(unwise),\n // Characters that are never ever allowed in a hostname.\n // Note that any invalid chars are also handled, but these\n // are the ones that are *expected* to be seen, so we fast-path\n // them.\n nonHostChars = ['%', '/', '?', ';', '#'].concat(autoEscape),\n hostEndingChars = ['/', '?', '#'],\n hostnameMaxLen = 255,\n hostnamePartPattern = /^[+a-z0-9A-Z_-]{0,63}$/,\n hostnamePartStart = /^([+a-z0-9A-Z_-]{0,63})(.*)$/,\n // protocols that can allow \"unsafe\" and \"unwise\" chars.\n unsafeProtocol = {\n 'javascript': true,\n 'javascript:': true\n },\n // protocols that never have a hostname.\n hostlessProtocol = {\n 'javascript': true,\n 'javascript:': true\n },\n // protocols that always contain a // bit.\n slashedProtocol = {\n 'http': true,\n 'https': true,\n 'ftp': true,\n 'gopher': true,\n 'file': true,\n 'http:': true,\n 'https:': true,\n 'ftp:': true,\n 'gopher:': true,\n 'file:': true\n },\n querystring = require('querystring');\n\nfunction urlParse(url, parseQueryString, slashesDenoteHost) {\n if (url && util.isObject(url) && url instanceof Url) return url;\n\n var u = new Url;\n u.parse(url, parseQueryString, slashesDenoteHost);\n return u;\n}\n\nUrl.prototype.parse = function(url, parseQueryString, slashesDenoteHost) {\n if (!util.isString(url)) {\n throw new TypeError(\"Parameter 'url' must be a string, not \" + typeof url);\n }\n\n // Copy chrome, IE, opera backslash-handling behavior.\n // Back slashes before the query string get converted to forward slashes\n // See: https://code.google.com/p/chromium/issues/detail?id=25916\n var queryIndex = url.indexOf('?'),\n splitter =\n (queryIndex !== -1 && queryIndex < url.indexOf('#')) ? '?' : '#',\n uSplit = url.split(splitter),\n slashRegex = /\\\\/g;\n uSplit[0] = uSplit[0].replace(slashRegex, '/');\n url = uSplit.join(splitter);\n\n var rest = url;\n\n // trim before proceeding.\n // This is to support parse stuff like \" http://foo.com \\n\"\n rest = rest.trim();\n\n if (!slashesDenoteHost && url.split('#').length === 1) {\n // Try fast path regexp\n var simplePath = simplePathPattern.exec(rest);\n if (simplePath) {\n this.path = rest;\n this.href = rest;\n this.pathname = simplePath[1];\n if (simplePath[2]) {\n this.search = simplePath[2];\n if (parseQueryString) {\n this.query = querystring.parse(this.search.substr(1));\n } else {\n this.query = this.search.substr(1);\n }\n } else if (parseQueryString) {\n this.search = '';\n this.query = {};\n }\n return this;\n }\n }\n\n var proto = protocolPattern.exec(rest);\n if (proto) {\n proto = proto[0];\n var lowerProto = proto.toLowerCase();\n this.protocol = lowerProto;\n rest = rest.substr(proto.length);\n }\n\n // figure out if it's got a host\n // user@server is *always* interpreted as a hostname, and url\n // resolution will treat //foo/bar as host=foo,path=bar because that's\n // how the browser resolves relative URLs.\n if (slashesDenoteHost || proto || rest.match(/^\\/\\/[^@\\/]+@[^@\\/]+/)) {\n var slashes = rest.substr(0, 2) === '//';\n if (slashes && !(proto && hostlessProtocol[proto])) {\n rest = rest.substr(2);\n this.slashes = true;\n }\n }\n\n if (!hostlessProtocol[proto] &&\n (slashes || (proto && !slashedProtocol[proto]))) {\n\n // there's a hostname.\n // the first instance of /, ?, ;, or # ends the host.\n //\n // If there is an @ in the hostname, then non-host chars *are* allowed\n // to the left of the last @ sign, unless some host-ending character\n // comes *before* the @-sign.\n // URLs are obnoxious.\n //\n // ex:\n // http://a@b@c/ => user:a@b host:c\n // http://a@b?@c => user:a host:c path:/?@c\n\n // v0.12 TODO(isaacs): This is not quite how Chrome does things.\n // Review our test case against browsers more comprehensively.\n\n // find the first instance of any hostEndingChars\n var hostEnd = -1;\n for (var i = 0; i < hostEndingChars.length; i++) {\n var hec = rest.indexOf(hostEndingChars[i]);\n if (hec !== -1 && (hostEnd === -1 || hec < hostEnd))\n hostEnd = hec;\n }\n\n // at this point, either we have an explicit point where the\n // auth portion cannot go past, or the last @ char is the decider.\n var auth, atSign;\n if (hostEnd === -1) {\n // atSign can be anywhere.\n atSign = rest.lastIndexOf('@');\n } else {\n // atSign must be in auth portion.\n // http://a@b/c@d => host:b auth:a path:/c@d\n atSign = rest.lastIndexOf('@', hostEnd);\n }\n\n // Now we have a portion which is definitely the auth.\n // Pull that off.\n if (atSign !== -1) {\n auth = rest.slice(0, atSign);\n rest = rest.slice(atSign + 1);\n this.auth = decodeURIComponent(auth);\n }\n\n // the host is the remaining to the left of the first non-host char\n hostEnd = -1;\n for (var i = 0; i < nonHostChars.length; i++) {\n var hec = rest.indexOf(nonHostChars[i]);\n if (hec !== -1 && (hostEnd === -1 || hec < hostEnd))\n hostEnd = hec;\n }\n // if we still have not hit it, then the entire thing is a host.\n if (hostEnd === -1)\n hostEnd = rest.length;\n\n this.host = rest.slice(0, hostEnd);\n rest = rest.slice(hostEnd);\n\n // pull out port.\n this.parseHost();\n\n // we've indicated that there is a hostname,\n // so even if it's empty, it has to be present.\n this.hostname = this.hostname || '';\n\n // if hostname begins with [ and ends with ]\n // assume that it's an IPv6 address.\n var ipv6Hostname = this.hostname[0] === '[' &&\n this.hostname[this.hostname.length - 1] === ']';\n\n // validate a little.\n if (!ipv6Hostname) {\n var hostparts = this.hostname.split(/\\./);\n for (var i = 0, l = hostparts.length; i < l; i++) {\n var part = hostparts[i];\n if (!part) continue;\n if (!part.match(hostnamePartPattern)) {\n var newpart = '';\n for (var j = 0, k = part.length; j < k; j++) {\n if (part.charCodeAt(j) > 127) {\n // we replace non-ASCII char with a temporary placeholder\n // we need this to make sure size of hostname is not\n // broken by replacing non-ASCII by nothing\n newpart += 'x';\n } else {\n newpart += part[j];\n }\n }\n // we test again with ASCII char only\n if (!newpart.match(hostnamePartPattern)) {\n var validParts = hostparts.slice(0, i);\n var notHost = hostparts.slice(i + 1);\n var bit = part.match(hostnamePartStart);\n if (bit) {\n validParts.push(bit[1]);\n notHost.unshift(bit[2]);\n }\n if (notHost.length) {\n rest = '/' + notHost.join('.') + rest;\n }\n this.hostname = validParts.join('.');\n break;\n }\n }\n }\n }\n\n if (this.hostname.length > hostnameMaxLen) {\n this.hostname = '';\n } else {\n // hostnames are always lower case.\n this.hostname = this.hostname.toLowerCase();\n }\n\n if (!ipv6Hostname) {\n // IDNA Support: Returns a punycoded representation of \"domain\".\n // It only converts parts of the domain name that\n // have non-ASCII characters, i.e. it doesn't matter if\n // you call it with a domain that already is ASCII-only.\n this.hostname = punycode.toASCII(this.hostname);\n }\n\n var p = this.port ? ':' + this.port : '';\n var h = this.hostname || '';\n this.host = h + p;\n this.href += this.host;\n\n // strip [ and ] from the hostname\n // the host field still retains them, though\n if (ipv6Hostname) {\n this.hostname = this.hostname.substr(1, this.hostname.length - 2);\n if (rest[0] !== '/') {\n rest = '/' + rest;\n }\n }\n }\n\n // now rest is set to the post-host stuff.\n // chop off any delim chars.\n if (!unsafeProtocol[lowerProto]) {\n\n // First, make 100% sure that any \"autoEscape\" chars get\n // escaped, even if encodeURIComponent doesn't think they\n // need to be.\n for (var i = 0, l = autoEscape.length; i < l; i++) {\n var ae = autoEscape[i];\n if (rest.indexOf(ae) === -1)\n continue;\n var esc = encodeURIComponent(ae);\n if (esc === ae) {\n esc = escape(ae);\n }\n rest = rest.split(ae).join(esc);\n }\n }\n\n\n // chop off from the tail first.\n var hash = rest.indexOf('#');\n if (hash !== -1) {\n // got a fragment string.\n this.hash = rest.substr(hash);\n rest = rest.slice(0, hash);\n }\n var qm = rest.indexOf('?');\n if (qm !== -1) {\n this.search = rest.substr(qm);\n this.query = rest.substr(qm + 1);\n if (parseQueryString) {\n this.query = querystring.parse(this.query);\n }\n rest = rest.slice(0, qm);\n } else if (parseQueryString) {\n // no query string, but parseQueryString still requested\n this.search = '';\n this.query = {};\n }\n if (rest) this.pathname = rest;\n if (slashedProtocol[lowerProto] &&\n this.hostname && !this.pathname) {\n this.pathname = '/';\n }\n\n //to support http.request\n if (this.pathname || this.search) {\n var p = this.pathname || '';\n var s = this.search || '';\n this.path = p + s;\n }\n\n // finally, reconstruct the href based on what has been validated.\n this.href = this.format();\n return this;\n};\n\n// format a parsed object into a url string\nfunction urlFormat(obj) {\n // ensure it's an object, and not a string url.\n // If it's an obj, this is a no-op.\n // this way, you can call url_format() on strings\n // to clean up potentially wonky urls.\n if (util.isString(obj)) obj = urlParse(obj);\n if (!(obj instanceof Url)) return Url.prototype.format.call(obj);\n return obj.format();\n}\n\nUrl.prototype.format = function() {\n var auth = this.auth || '';\n if (auth) {\n auth = encodeURIComponent(auth);\n auth = auth.replace(/%3A/i, ':');\n auth += '@';\n }\n\n var protocol = this.protocol || '',\n pathname = this.pathname || '',\n hash = this.hash || '',\n host = false,\n query = '';\n\n if (this.host) {\n host = auth + this.host;\n } else if (this.hostname) {\n host = auth + (this.hostname.indexOf(':') === -1 ?\n this.hostname :\n '[' + this.hostname + ']');\n if (this.port) {\n host += ':' + this.port;\n }\n }\n\n if (this.query &&\n util.isObject(this.query) &&\n Object.keys(this.query).length) {\n query = querystring.stringify(this.query);\n }\n\n var search = this.search || (query && ('?' + query)) || '';\n\n if (protocol && protocol.substr(-1) !== ':') protocol += ':';\n\n // only the slashedProtocols get the //. Not mailto:, xmpp:, etc.\n // unless they had them to begin with.\n if (this.slashes ||\n (!protocol || slashedProtocol[protocol]) && host !== false) {\n host = '//' + (host || '');\n if (pathname && pathname.charAt(0) !== '/') pathname = '/' + pathname;\n } else if (!host) {\n host = '';\n }\n\n if (hash && hash.charAt(0) !== '#') hash = '#' + hash;\n if (search && search.charAt(0) !== '?') search = '?' + search;\n\n pathname = pathname.replace(/[?#]/g, function(match) {\n return encodeURIComponent(match);\n });\n search = search.replace('#', '%23');\n\n return protocol + host + pathname + search + hash;\n};\n\nfunction urlResolve(source, relative) {\n return urlParse(source, false, true).resolve(relative);\n}\n\nUrl.prototype.resolve = function(relative) {\n return this.resolveObject(urlParse(relative, false, true)).format();\n};\n\nfunction urlResolveObject(source, relative) {\n if (!source) return relative;\n return urlParse(source, false, true).resolveObject(relative);\n}\n\nUrl.prototype.resolveObject = function(relative) {\n if (util.isString(relative)) {\n var rel = new Url();\n rel.parse(relative, false, true);\n relative = rel;\n }\n\n var result = new Url();\n var tkeys = Object.keys(this);\n for (var tk = 0; tk < tkeys.length; tk++) {\n var tkey = tkeys[tk];\n result[tkey] = this[tkey];\n }\n\n // hash is always overridden, no matter what.\n // even href=\"\" will remove it.\n result.hash = relative.hash;\n\n // if the relative url is empty, then there's nothing left to do here.\n if (relative.href === '') {\n result.href = result.format();\n return result;\n }\n\n // hrefs like //foo/bar always cut to the protocol.\n if (relative.slashes && !relative.protocol) {\n // take everything except the protocol from relative\n var rkeys = Object.keys(relative);\n for (var rk = 0; rk < rkeys.length; rk++) {\n var rkey = rkeys[rk];\n if (rkey !== 'protocol')\n result[rkey] = relative[rkey];\n }\n\n //urlParse appends trailing / to urls like http://www.example.com\n if (slashedProtocol[result.protocol] &&\n result.hostname && !result.pathname) {\n result.path = result.pathname = '/';\n }\n\n result.href = result.format();\n return result;\n }\n\n if (relative.protocol && relative.protocol !== result.protocol) {\n // if it's a known url protocol, then changing\n // the protocol does weird things\n // first, if it's not file:, then we MUST have a host,\n // and if there was a path\n // to begin with, then we MUST have a path.\n // if it is file:, then the host is dropped,\n // because that's known to be hostless.\n // anything else is assumed to be absolute.\n if (!slashedProtocol[relative.protocol]) {\n var keys = Object.keys(relative);\n for (var v = 0; v < keys.length; v++) {\n var k = keys[v];\n result[k] = relative[k];\n }\n result.href = result.format();\n return result;\n }\n\n result.protocol = relative.protocol;\n if (!relative.host && !hostlessProtocol[relative.protocol]) {\n var relPath = (relative.pathname || '').split('/');\n while (relPath.length && !(relative.host = relPath.shift()));\n if (!relative.host) relative.host = '';\n if (!relative.hostname) relative.hostname = '';\n if (relPath[0] !== '') relPath.unshift('');\n if (relPath.length < 2) relPath.unshift('');\n result.pathname = relPath.join('/');\n } else {\n result.pathname = relative.pathname;\n }\n result.search = relative.search;\n result.query = relative.query;\n result.host = relative.host || '';\n result.auth = relative.auth;\n result.hostname = relative.hostname || relative.host;\n result.port = relative.port;\n // to support http.request\n if (result.pathname || result.search) {\n var p = result.pathname || '';\n var s = result.search || '';\n result.path = p + s;\n }\n result.slashes = result.slashes || relative.slashes;\n result.href = result.format();\n return result;\n }\n\n var isSourceAbs = (result.pathname && result.pathname.charAt(0) === '/'),\n isRelAbs = (\n relative.host ||\n relative.pathname && relative.pathname.charAt(0) === '/'\n ),\n mustEndAbs = (isRelAbs || isSourceAbs ||\n (result.host && relative.pathname)),\n removeAllDots = mustEndAbs,\n srcPath = result.pathname && result.pathname.split('/') || [],\n relPath = relative.pathname && relative.pathname.split('/') || [],\n psychotic = result.protocol && !slashedProtocol[result.protocol];\n\n // if the url is a non-slashed url, then relative\n // links like ../.. should be able\n // to crawl up to the hostname, as well. This is strange.\n // result.protocol has already been set by now.\n // Later on, put the first path part into the host field.\n if (psychotic) {\n result.hostname = '';\n result.port = null;\n if (result.host) {\n if (srcPath[0] === '') srcPath[0] = result.host;\n else srcPath.unshift(result.host);\n }\n result.host = '';\n if (relative.protocol) {\n relative.hostname = null;\n relative.port = null;\n if (relative.host) {\n if (relPath[0] === '') relPath[0] = relative.host;\n else relPath.unshift(relative.host);\n }\n relative.host = null;\n }\n mustEndAbs = mustEndAbs && (relPath[0] === '' || srcPath[0] === '');\n }\n\n if (isRelAbs) {\n // it's absolute.\n result.host = (relative.host || relative.host === '') ?\n relative.host : result.host;\n result.hostname = (relative.hostname || relative.hostname === '') ?\n relative.hostname : result.hostname;\n result.search = relative.search;\n result.query = relative.query;\n srcPath = relPath;\n // fall through to the dot-handling below.\n } else if (relPath.length) {\n // it's relative\n // throw away the existing file, and take the new path instead.\n if (!srcPath) srcPath = [];\n srcPath.pop();\n srcPath = srcPath.concat(relPath);\n result.search = relative.search;\n result.query = relative.query;\n } else if (!util.isNullOrUndefined(relative.search)) {\n // just pull out the search.\n // like href='?foo'.\n // Put this after the other two cases because it simplifies the booleans\n if (psychotic) {\n result.hostname = result.host = srcPath.shift();\n //occationaly the auth can get stuck only in host\n //this especially happens in cases like\n //url.resolveObject('mailto:local1@domain1', 'local2@domain2')\n var authInHost = result.host && result.host.indexOf('@') > 0 ?\n result.host.split('@') : false;\n if (authInHost) {\n result.auth = authInHost.shift();\n result.host = result.hostname = authInHost.shift();\n }\n }\n result.search = relative.search;\n result.query = relative.query;\n //to support http.request\n if (!util.isNull(result.pathname) || !util.isNull(result.search)) {\n result.path = (result.pathname ? result.pathname : '') +\n (result.search ? result.search : '');\n }\n result.href = result.format();\n return result;\n }\n\n if (!srcPath.length) {\n // no path at all. easy.\n // we've already handled the other stuff above.\n result.pathname = null;\n //to support http.request\n if (result.search) {\n result.path = '/' + result.search;\n } else {\n result.path = null;\n }\n result.href = result.format();\n return result;\n }\n\n // if a url ENDs in . or .., then it must get a trailing slash.\n // however, if it ends in anything else non-slashy,\n // then it must NOT get a trailing slash.\n var last = srcPath.slice(-1)[0];\n var hasTrailingSlash = (\n (result.host || relative.host || srcPath.length > 1) &&\n (last === '.' || last === '..') || last === '');\n\n // strip single dots, resolve double dots to parent dir\n // if the path tries to go above the root, `up` ends up > 0\n var up = 0;\n for (var i = srcPath.length; i >= 0; i--) {\n last = srcPath[i];\n if (last === '.') {\n srcPath.splice(i, 1);\n } else if (last === '..') {\n srcPath.splice(i, 1);\n up++;\n } else if (up) {\n srcPath.splice(i, 1);\n up--;\n }\n }\n\n // if the path is allowed to go above the root, restore leading ..s\n if (!mustEndAbs && !removeAllDots) {\n for (; up--; up) {\n srcPath.unshift('..');\n }\n }\n\n if (mustEndAbs && srcPath[0] !== '' &&\n (!srcPath[0] || srcPath[0].charAt(0) !== '/')) {\n srcPath.unshift('');\n }\n\n if (hasTrailingSlash && (srcPath.join('/').substr(-1) !== '/')) {\n srcPath.push('');\n }\n\n var isAbsolute = srcPath[0] === '' ||\n (srcPath[0] && srcPath[0].charAt(0) === '/');\n\n // put the host back\n if (psychotic) {\n result.hostname = result.host = isAbsolute ? '' :\n srcPath.length ? srcPath.shift() : '';\n //occationaly the auth can get stuck only in host\n //this especially happens in cases like\n //url.resolveObject('mailto:local1@domain1', 'local2@domain2')\n var authInHost = result.host && result.host.indexOf('@') > 0 ?\n result.host.split('@') : false;\n if (authInHost) {\n result.auth = authInHost.shift();\n result.host = result.hostname = authInHost.shift();\n }\n }\n\n mustEndAbs = mustEndAbs || (result.host && srcPath.length);\n\n if (mustEndAbs && !isAbsolute) {\n srcPath.unshift('');\n }\n\n if (!srcPath.length) {\n result.pathname = null;\n result.path = null;\n } else {\n result.pathname = srcPath.join('/');\n }\n\n //to support request.http\n if (!util.isNull(result.pathname) || !util.isNull(result.search)) {\n result.path = (result.pathname ? result.pathname : '') +\n (result.search ? result.search : '');\n }\n result.auth = relative.auth || result.auth;\n result.slashes = result.slashes || relative.slashes;\n result.href = result.format();\n return result;\n};\n\nUrl.prototype.parseHost = function() {\n var host = this.host;\n var port = portPattern.exec(host);\n if (port) {\n port = port[0];\n if (port !== ':') {\n this.port = port.substr(1);\n }\n host = host.substr(0, host.length - port.length);\n }\n if (host) this.hostname = host;\n};\n\n},{\"./util\":44,\"punycode\":39,\"querystring\":42}],44:[function(require,module,exports){\n'use strict';\n\nmodule.exports = {\n isString: function(arg) {\n return typeof(arg) === 'string';\n },\n isObject: function(arg) {\n return typeof(arg) === 'object' && arg !== null;\n },\n isNull: function(arg) {\n return arg === null;\n },\n isNullOrUndefined: function(arg) {\n return arg == null;\n }\n};\n\n},{}],45:[function(require,module,exports){\n\n/**\n * slice() reference.\n */\n\nvar slice = Array.prototype.slice;\n\n/**\n * Expose `co`.\n */\n\nmodule.exports = co['default'] = co.co = co;\n\n/**\n * Wrap the given generator `fn` into a\n * function that returns a promise.\n * This is a separate function so that\n * every `co()` call doesn't create a new,\n * unnecessary closure.\n *\n * @param {GeneratorFunction} fn\n * @return {Function}\n * @api public\n */\n\nco.wrap = function (fn) {\n createPromise.__generatorFunction__ = fn;\n return createPromise;\n function createPromise() {\n return co.call(this, fn.apply(this, arguments));\n }\n};\n\n/**\n * Execute the generator function or a generator\n * and return a promise.\n *\n * @param {Function} fn\n * @return {Promise}\n * @api public\n */\n\nfunction co(gen) {\n var ctx = this;\n var args = slice.call(arguments, 1)\n\n // we wrap everything in a promise to avoid promise chaining,\n // which leads to memory leak errors.\n // see https://github.com/tj/co/issues/180\n return new Promise(function(resolve, reject) {\n if (typeof gen === 'function') gen = gen.apply(ctx, args);\n if (!gen || typeof gen.next !== 'function') return resolve(gen);\n\n onFulfilled();\n\n /**\n * @param {Mixed} res\n * @return {Promise}\n * @api private\n */\n\n function onFulfilled(res) {\n var ret;\n try {\n ret = gen.next(res);\n } catch (e) {\n return reject(e);\n }\n next(ret);\n }\n\n /**\n * @param {Error} err\n * @return {Promise}\n * @api private\n */\n\n function onRejected(err) {\n var ret;\n try {\n ret = gen.throw(err);\n } catch (e) {\n return reject(e);\n }\n next(ret);\n }\n\n /**\n * Get the next value in the generator,\n * return a promise.\n *\n * @param {Object} ret\n * @return {Promise}\n * @api private\n */\n\n function next(ret) {\n if (ret.done) return resolve(ret.value);\n var value = toPromise.call(ctx, ret.value);\n if (value && isPromise(value)) return value.then(onFulfilled, onRejected);\n return onRejected(new TypeError('You may only yield a function, promise, generator, array, or object, '\n + 'but the following object was passed: \"' + String(ret.value) + '\"'));\n }\n });\n}\n\n/**\n * Convert a `yield`ed value into a promise.\n *\n * @param {Mixed} obj\n * @return {Promise}\n * @api private\n */\n\nfunction toPromise(obj) {\n if (!obj) return obj;\n if (isPromise(obj)) return obj;\n if (isGeneratorFunction(obj) || isGenerator(obj)) return co.call(this, obj);\n if ('function' == typeof obj) return thunkToPromise.call(this, obj);\n if (Array.isArray(obj)) return arrayToPromise.call(this, obj);\n if (isObject(obj)) return objectToPromise.call(this, obj);\n return obj;\n}\n\n/**\n * Convert a thunk to a promise.\n *\n * @param {Function}\n * @return {Promise}\n * @api private\n */\n\nfunction thunkToPromise(fn) {\n var ctx = this;\n return new Promise(function (resolve, reject) {\n fn.call(ctx, function (err, res) {\n if (err) return reject(err);\n if (arguments.length > 2) res = slice.call(arguments, 1);\n resolve(res);\n });\n });\n}\n\n/**\n * Convert an array of \"yieldables\" to a promise.\n * Uses `Promise.all()` internally.\n *\n * @param {Array} obj\n * @return {Promise}\n * @api private\n */\n\nfunction arrayToPromise(obj) {\n return Promise.all(obj.map(toPromise, this));\n}\n\n/**\n * Convert an object of \"yieldables\" to a promise.\n * Uses `Promise.all()` internally.\n *\n * @param {Object} obj\n * @return {Promise}\n * @api private\n */\n\nfunction objectToPromise(obj){\n var results = new obj.constructor();\n var keys = Object.keys(obj);\n var promises = [];\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n var promise = toPromise.call(this, obj[key]);\n if (promise && isPromise(promise)) defer(promise, key);\n else results[key] = obj[key];\n }\n return Promise.all(promises).then(function () {\n return results;\n });\n\n function defer(promise, key) {\n // predefine the key in the result\n results[key] = undefined;\n promises.push(promise.then(function (res) {\n results[key] = res;\n }));\n }\n}\n\n/**\n * Check if `obj` is a promise.\n *\n * @param {Object} obj\n * @return {Boolean}\n * @api private\n */\n\nfunction isPromise(obj) {\n return 'function' == typeof obj.then;\n}\n\n/**\n * Check if `obj` is a generator.\n *\n * @param {Mixed} obj\n * @return {Boolean}\n * @api private\n */\n\nfunction isGenerator(obj) {\n return 'function' == typeof obj.next && 'function' == typeof obj.throw;\n}\n\n/**\n * Check if `obj` is a generator function.\n *\n * @param {Mixed} obj\n * @return {Boolean}\n * @api private\n */\nfunction isGeneratorFunction(obj) {\n var constructor = obj.constructor;\n if (!constructor) return false;\n if ('GeneratorFunction' === constructor.name || 'GeneratorFunction' === constructor.displayName) return true;\n return isGenerator(constructor.prototype);\n}\n\n/**\n * Check for plain object.\n *\n * @param {Mixed} val\n * @return {Boolean}\n * @api private\n */\n\nfunction isObject(val) {\n return Object == val.constructor;\n}\n\n},{}],46:[function(require,module,exports){\nvar json = typeof JSON !== 'undefined' ? JSON : require('jsonify');\n\nmodule.exports = function (obj, opts) {\n if (!opts) opts = {};\n if (typeof opts === 'function') opts = { cmp: opts };\n var space = opts.space || '';\n if (typeof space === 'number') space = Array(space+1).join(' ');\n var cycles = (typeof opts.cycles === 'boolean') ? opts.cycles : false;\n var replacer = opts.replacer || function(key, value) { return value; };\n\n var cmp = opts.cmp && (function (f) {\n return function (node) {\n return function (a, b) {\n var aobj = { key: a, value: node[a] };\n var bobj = { key: b, value: node[b] };\n return f(aobj, bobj);\n };\n };\n })(opts.cmp);\n\n var seen = [];\n return (function stringify (parent, key, node, level) {\n var indent = space ? ('\\n' + new Array(level + 1).join(space)) : '';\n var colonSeparator = space ? ': ' : ':';\n\n if (node && node.toJSON && typeof node.toJSON === 'function') {\n node = node.toJSON();\n }\n\n node = replacer.call(parent, key, node);\n\n if (node === undefined) {\n return;\n }\n if (typeof node !== 'object' || node === null) {\n return json.stringify(node);\n }\n if (isArray(node)) {\n var out = [];\n for (var i = 0; i < node.length; i++) {\n var item = stringify(node, i, node[i], level+1) || json.stringify(null);\n out.push(indent + space + item);\n }\n return '[' + out.join(',') + indent + ']';\n }\n else {\n if (seen.indexOf(node) !== -1) {\n if (cycles) return json.stringify('__cycle__');\n throw new TypeError('Converting circular structure to JSON');\n }\n else seen.push(node);\n\n var keys = objectKeys(node).sort(cmp && cmp(node));\n var out = [];\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n var value = stringify(node, key, node[key], level+1);\n\n if(!value) continue;\n\n var keyValue = json.stringify(key)\n + colonSeparator\n + value;\n ;\n out.push(indent + space + keyValue);\n }\n seen.splice(seen.indexOf(node), 1);\n return '{' + out.join(',') + indent + '}';\n }\n })({ '': obj }, '', obj, 0);\n};\n\nvar isArray = Array.isArray || function (x) {\n return {}.toString.call(x) === '[object Array]';\n};\n\nvar objectKeys = Object.keys || function (obj) {\n var has = Object.prototype.hasOwnProperty || function () { return true };\n var keys = [];\n for (var key in obj) {\n if (has.call(obj, key)) keys.push(key);\n }\n return keys;\n};\n\n},{\"jsonify\":47}],47:[function(require,module,exports){\nexports.parse = require('./lib/parse');\nexports.stringify = require('./lib/stringify');\n\n},{\"./lib/parse\":48,\"./lib/stringify\":49}],48:[function(require,module,exports){\nvar at, // The index of the current character\n ch, // The current character\n escapee = {\n '\"': '\"',\n '\\\\': '\\\\',\n '/': '/',\n b: '\\b',\n f: '\\f',\n n: '\\n',\n r: '\\r',\n t: '\\t'\n },\n text,\n\n error = function (m) {\n // Call error when something is wrong.\n throw {\n name: 'SyntaxError',\n message: m,\n at: at,\n text: text\n };\n },\n \n next = function (c) {\n // If a c parameter is provided, verify that it matches the current character.\n if (c && c !== ch) {\n error(\"Expected '\" + c + \"' instead of '\" + ch + \"'\");\n }\n \n // Get the next character. When there are no more characters,\n // return the empty string.\n \n ch = text.charAt(at);\n at += 1;\n return ch;\n },\n \n number = function () {\n // Parse a number value.\n var number,\n string = '';\n \n if (ch === '-') {\n string = '-';\n next('-');\n }\n while (ch >= '0' && ch <= '9') {\n string += ch;\n next();\n }\n if (ch === '.') {\n string += '.';\n while (next() && ch >= '0' && ch <= '9') {\n string += ch;\n }\n }\n if (ch === 'e' || ch === 'E') {\n string += ch;\n next();\n if (ch === '-' || ch === '+') {\n string += ch;\n next();\n }\n while (ch >= '0' && ch <= '9') {\n string += ch;\n next();\n }\n }\n number = +string;\n if (!isFinite(number)) {\n error(\"Bad number\");\n } else {\n return number;\n }\n },\n \n string = function () {\n // Parse a string value.\n var hex,\n i,\n string = '',\n uffff;\n \n // When parsing for string values, we must look for \" and \\ characters.\n if (ch === '\"') {\n while (next()) {\n if (ch === '\"') {\n next();\n return string;\n } else if (ch === '\\\\') {\n next();\n if (ch === 'u') {\n uffff = 0;\n for (i = 0; i < 4; i += 1) {\n hex = parseInt(next(), 16);\n if (!isFinite(hex)) {\n break;\n }\n uffff = uffff * 16 + hex;\n }\n string += String.fromCharCode(uffff);\n } else if (typeof escapee[ch] === 'string') {\n string += escapee[ch];\n } else {\n break;\n }\n } else {\n string += ch;\n }\n }\n }\n error(\"Bad string\");\n },\n\n white = function () {\n\n// Skip whitespace.\n\n while (ch && ch <= ' ') {\n next();\n }\n },\n\n word = function () {\n\n// true, false, or null.\n\n switch (ch) {\n case 't':\n next('t');\n next('r');\n next('u');\n next('e');\n return true;\n case 'f':\n next('f');\n next('a');\n next('l');\n next('s');\n next('e');\n return false;\n case 'n':\n next('n');\n next('u');\n next('l');\n next('l');\n return null;\n }\n error(\"Unexpected '\" + ch + \"'\");\n },\n\n value, // Place holder for the value function.\n\n array = function () {\n\n// Parse an array value.\n\n var array = [];\n\n if (ch === '[') {\n next('[');\n white();\n if (ch === ']') {\n next(']');\n return array; // empty array\n }\n while (ch) {\n array.push(value());\n white();\n if (ch === ']') {\n next(']');\n return array;\n }\n next(',');\n white();\n }\n }\n error(\"Bad array\");\n },\n\n object = function () {\n\n// Parse an object value.\n\n var key,\n object = {};\n\n if (ch === '{') {\n next('{');\n white();\n if (ch === '}') {\n next('}');\n return object; // empty object\n }\n while (ch) {\n key = string();\n white();\n next(':');\n if (Object.hasOwnProperty.call(object, key)) {\n error('Duplicate key \"' + key + '\"');\n }\n object[key] = value();\n white();\n if (ch === '}') {\n next('}');\n return object;\n }\n next(',');\n white();\n }\n }\n error(\"Bad object\");\n };\n\nvalue = function () {\n\n// Parse a JSON value. It could be an object, an array, a string, a number,\n// or a word.\n\n white();\n switch (ch) {\n case '{':\n return object();\n case '[':\n return array();\n case '\"':\n return string();\n case '-':\n return number();\n default:\n return ch >= '0' && ch <= '9' ? number() : word();\n }\n};\n\n// Return the json_parse function. It will have access to all of the above\n// functions and variables.\n\nmodule.exports = function (source, reviver) {\n var result;\n \n text = source;\n at = 0;\n ch = ' ';\n result = value();\n white();\n if (ch) {\n error(\"Syntax error\");\n }\n\n // If there is a reviver function, we recursively walk the new structure,\n // passing each name/value pair to the reviver function for possible\n // transformation, starting with a temporary root object that holds the result\n // in an empty key. If there is not a reviver function, we simply return the\n // result.\n\n return typeof reviver === 'function' ? (function walk(holder, key) {\n var k, v, value = holder[key];\n if (value && typeof value === 'object') {\n for (k in value) {\n if (Object.prototype.hasOwnProperty.call(value, k)) {\n v = walk(value, k);\n if (v !== undefined) {\n value[k] = v;\n } else {\n delete value[k];\n }\n }\n }\n }\n return reviver.call(holder, key, value);\n }({'': result}, '')) : result;\n};\n\n},{}],49:[function(require,module,exports){\nvar cx = /[\\u0000\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]/g,\n escapable = /[\\\\\\\"\\x00-\\x1f\\x7f-\\x9f\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]/g,\n gap,\n indent,\n meta = { // table of character substitutions\n '\\b': '\\\\b',\n '\\t': '\\\\t',\n '\\n': '\\\\n',\n '\\f': '\\\\f',\n '\\r': '\\\\r',\n '\"' : '\\\\\"',\n '\\\\': '\\\\\\\\'\n },\n rep;\n\nfunction quote(string) {\n // If the string contains no control characters, no quote characters, and no\n // backslash characters, then we can safely slap some quotes around it.\n // Otherwise we must also replace the offending characters with safe escape\n // sequences.\n \n escapable.lastIndex = 0;\n return escapable.test(string) ? '\"' + string.replace(escapable, function (a) {\n var c = meta[a];\n return typeof c === 'string' ? c :\n '\\\\u' + ('0000' + a.charCodeAt(0).toString(16)).slice(-4);\n }) + '\"' : '\"' + string + '\"';\n}\n\nfunction str(key, holder) {\n // Produce a string from holder[key].\n var i, // The loop counter.\n k, // The member key.\n v, // The member value.\n length,\n mind = gap,\n partial,\n value = holder[key];\n \n // If the value has a toJSON method, call it to obtain a replacement value.\n if (value && typeof value === 'object' &&\n typeof value.toJSON === 'function') {\n value = value.toJSON(key);\n }\n \n // If we were called with a replacer function, then call the replacer to\n // obtain a replacement value.\n if (typeof rep === 'function') {\n value = rep.call(holder, key, value);\n }\n \n // What happens next depends on the value's type.\n switch (typeof value) {\n case 'string':\n return quote(value);\n \n case 'number':\n // JSON numbers must be finite. Encode non-finite numbers as null.\n return isFinite(value) ? String(value) : 'null';\n \n case 'boolean':\n case 'null':\n // If the value is a boolean or null, convert it to a string. Note:\n // typeof null does not produce 'null'. The case is included here in\n // the remote chance that this gets fixed someday.\n return String(value);\n \n case 'object':\n if (!value) return 'null';\n gap += indent;\n partial = [];\n \n // Array.isArray\n if (Object.prototype.toString.apply(value) === '[object Array]') {\n length = value.length;\n for (i = 0; i < length; i += 1) {\n partial[i] = str(i, value) || 'null';\n }\n \n // Join all of the elements together, separated with commas, and\n // wrap them in brackets.\n v = partial.length === 0 ? '[]' : gap ?\n '[\\n' + gap + partial.join(',\\n' + gap) + '\\n' + mind + ']' :\n '[' + partial.join(',') + ']';\n gap = mind;\n return v;\n }\n \n // If the replacer is an array, use it to select the members to be\n // stringified.\n if (rep && typeof rep === 'object') {\n length = rep.length;\n for (i = 0; i < length; i += 1) {\n k = rep[i];\n if (typeof k === 'string') {\n v = str(k, value);\n if (v) {\n partial.push(quote(k) + (gap ? ': ' : ':') + v);\n }\n }\n }\n }\n else {\n // Otherwise, iterate through all of the keys in the object.\n for (k in value) {\n if (Object.prototype.hasOwnProperty.call(value, k)) {\n v = str(k, value);\n if (v) {\n partial.push(quote(k) + (gap ? ': ' : ':') + v);\n }\n }\n }\n }\n \n // Join all of the member texts together, separated with commas,\n // and wrap them in braces.\n\n v = partial.length === 0 ? '{}' : gap ?\n '{\\n' + gap + partial.join(',\\n' + gap) + '\\n' + mind + '}' :\n '{' + partial.join(',') + '}';\n gap = mind;\n return v;\n }\n}\n\nmodule.exports = function (value, replacer, space) {\n var i;\n gap = '';\n indent = '';\n \n // If the space parameter is a number, make an indent string containing that\n // many spaces.\n if (typeof space === 'number') {\n for (i = 0; i < space; i += 1) {\n indent += ' ';\n }\n }\n // If the space parameter is a string, it will be used as the indent string.\n else if (typeof space === 'string') {\n indent = space;\n }\n\n // If there is a replacer, it must be a function or an array.\n // Otherwise, throw an error.\n rep = replacer;\n if (replacer && typeof replacer !== 'function'\n && (typeof replacer !== 'object' || typeof replacer.length !== 'number')) {\n throw new Error('JSON.stringify');\n }\n \n // Make a fake root object containing our value under the key of ''.\n // Return the result of stringifying the value.\n return str('', {'': value});\n};\n\n},{}],\"ajv\":[function(require,module,exports){\n'use strict';\n\nvar compileSchema = require('./compile')\n , resolve = require('./compile/resolve')\n , Cache = require('./cache')\n , SchemaObject = require('./compile/schema_obj')\n , stableStringify = require('json-stable-stringify')\n , formats = require('./compile/formats')\n , rules = require('./compile/rules')\n , v5 = require('./v5')\n , util = require('./compile/util')\n , async = require('./async')\n , co = require('co');\n\nmodule.exports = Ajv;\n\nAjv.prototype.compileAsync = async.compile;\nAjv.prototype.addKeyword = require('./keyword');\nAjv.ValidationError = require('./compile/validation_error');\n\nvar META_SCHEMA_ID = 'http://json-schema.org/draft-04/schema';\nvar SCHEMA_URI_FORMAT = /^(?:(?:[a-z][a-z0-9+-.]*:)?\\/\\/)?[^\\s]*$/i;\nfunction SCHEMA_URI_FORMAT_FUNC(str) {\n return SCHEMA_URI_FORMAT.test(str);\n}\n\nvar META_IGNORE_OPTIONS = [ 'removeAdditional', 'useDefaults', 'coerceTypes' ];\n\n/**\n * Creates validator instance.\n * Usage: `Ajv(opts)`\n * @param {Object} opts optional options\n * @return {Object} ajv instance\n */\nfunction Ajv(opts) {\n if (!(this instanceof Ajv)) return new Ajv(opts);\n var self = this;\n\n opts = this._opts = util.copy(opts) || {};\n this._schemas = {};\n this._refs = {};\n this._formats = formats(opts.format);\n this._cache = opts.cache || new Cache;\n this._loadingSchemas = {};\n this.RULES = rules();\n\n // this is done on purpose, so that methods are bound to the instance\n // (without using bind) so that they can be used without the instance\n this.validate = validate;\n this.compile = compile;\n this.addSchema = addSchema;\n this.addMetaSchema = addMetaSchema;\n this.validateSchema = validateSchema;\n this.getSchema = getSchema;\n this.removeSchema = removeSchema;\n this.addFormat = addFormat;\n this.errorsText = errorsText;\n\n this._addSchema = _addSchema;\n this._compile = _compile;\n\n opts.loopRequired = opts.loopRequired || Infinity;\n if (opts.async || opts.transpile) async.setup(opts);\n if (opts.beautify === true) opts.beautify = { indent_size: 2 };\n if (opts.errorDataPath == 'property') opts._errorDataPathProperty = true;\n this._metaOpts = getMetaSchemaOptions();\n\n addInitialSchemas();\n if (opts.formats) addInitialFormats();\n if (opts.v5) v5.enable(this);\n if (typeof opts.meta == 'object') addMetaSchema(opts.meta);\n\n\n /**\n * Validate data using schema\n * Schema will be compiled and cached (using serialized JSON as key. [json-stable-stringify](https://github.com/substack/json-stable-stringify) is used to serialize.\n * @param {String|Object} schemaKeyRef key, ref or schema object\n * @param {Any} data to be validated\n * @return {Boolean} validation result. Errors from the last validation will be available in `ajv.errors` (and also in compiled schema: `schema.errors`).\n */\n function validate(schemaKeyRef, data) {\n var v;\n if (typeof schemaKeyRef == 'string') {\n v = getSchema(schemaKeyRef);\n if (!v) throw new Error('no schema with key or ref \"' + schemaKeyRef + '\"');\n } else {\n var schemaObj = _addSchema(schemaKeyRef);\n v = schemaObj.validate || _compile(schemaObj);\n }\n\n var valid = v(data);\n if (v.async) return self._opts.async == '*' ? co(valid) : valid;\n self.errors = v.errors;\n return valid;\n }\n\n\n /**\n * Create validating function for passed schema.\n * @param {Object} schema schema object\n * @return {Function} validating function\n */\n function compile(schema) {\n var schemaObj = _addSchema(schema);\n return schemaObj.validate || _compile(schemaObj);\n }\n\n\n /**\n * Adds schema to the instance.\n * @param {Object|Array} schema schema or array of schemas. If array is passed, `key` and other parameters will be ignored.\n * @param {String} key Optional schema key. Can be passed to `validate` method instead of schema object or id/ref. One schema per instance can have empty `id` and `key`.\n * @param {Boolean} _skipValidation true to skip schema validation. Used internally, option validateSchema should be used instead.\n * @param {Boolean} _meta true if schema is a meta-schema. Used internally, addMetaSchema should be used instead.\n */\n function addSchema(schema, key, _skipValidation, _meta) {\n if (Array.isArray(schema)){\n for (var i=0; i} errors optional array of validation errors, if not passed errors from the instance are used.\n * @param {Object} options optional options with properties `separator` and `dataVar`.\n * @return {String} human readable string with all errors descriptions\n */\n function errorsText(errors, options) {\n errors = errors || self.errors;\n if (!errors) return 'No errors';\n options = options || {};\n var separator = options.separator || ', ';\n var dataVar = options.dataVar || 'data';\n\n var text = '';\n for (var i=0; i= 0 || format === 'transparent';\n\t }\n\t });\n\t\n\t // TODO: add more types here\n\t\n\t return function Decorator(target) {\n\t var proxyConfig = target.prototype.config;\n\t target.prototype.config = function proxy(name, value) {\n\t if (schema.hasOwnProperty(name)) {\n\t var valid = ajv.validate(schema[name], value);\n\t if (valid) {\n\t return proxyConfig.call(this, name, value);\n\t }\n\t\n\t // TODO: handle errors\n\t // console.log(`${name} config ${ajv.errorsText()}`);\n\t throw Error(name + ' config ' + ajv.errorsText());\n\t } else {\n\t return proxyConfig.call(this, name, value);\n\t }\n\t };\n\t };\n\t}\n\t\n\tif (false) {\n\t require('./index.spec.js')(KotoConfig);\n\t}\n\t\n\texports.default = KotoConfig;\n\n/***/ },\n/* 1 */\n/***/ function(module, exports, __webpack_require__) {\n\n\tvar require;var require;/* WEBPACK VAR INJECTION */(function(global) {(function(f){if(true){module.exports=f()}else if(typeof define===\"function\"&&define.amd){define([],f)}else{var g;if(typeof window!==\"undefined\"){g=window}else if(typeof global!==\"undefined\"){g=global}else if(typeof self!==\"undefined\"){g=self}else{g=this}g.Ajv = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require==\"function\"&&require;if(!u&&a)return require(o,!0);if(i)return i(o,!0);var f=new Error(\"Cannot find module '\"+o+\"'\");throw f.code=\"MODULE_NOT_FOUND\",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require==\"function\"&&require;for(var o=0;o= 1 && month <= 12 && day >= 1 && day <= DAYS[month];\n\t}\n\t\n\t\n\tfunction time(str, full) {\n\t var matches = str.match(TIME);\n\t if (!matches) return false;\n\t\n\t var hour = matches[1];\n\t var minute = matches[2];\n\t var second = matches[3];\n\t var timeZone = matches[5];\n\t return hour <= 23 && minute <= 59 && second <= 59 && (!full || timeZone);\n\t}\n\t\n\t\n\tvar DATE_TIME_SEPARATOR = /t|\\s/i;\n\tfunction date_time(str) {\n\t // http://tools.ietf.org/html/rfc3339#section-5.6\n\t var dateTime = str.split(DATE_TIME_SEPARATOR);\n\t return date(dateTime[0]) && time(dateTime[1], true);\n\t}\n\t\n\t\n\tfunction hostname(str) {\n\t // http://tools.ietf.org/html/rfc1034#section-3.5\n\t return str.length <= 255 && HOSTNAME.test(str);\n\t}\n\t\n\t\n\tvar NOT_URI_FRAGMENT = /\\/|\\:/;\n\tfunction uri(str) {\n\t // http://jmrware.com/articles/2009/uri_regexp/URI_regex.html + optional protocol + required \".\"\n\t return NOT_URI_FRAGMENT.test(str) && URI.test(str);\n\t}\n\t\n\t\n\tfunction regex(str) {\n\t try {\n\t new RegExp(str);\n\t return true;\n\t } catch(e) {\n\t return false;\n\t }\n\t}\n\t\n\t\n\tfunction compareDate(d1, d2) {\n\t if (!(d1 && d2)) return;\n\t if (d1 > d2) return 1;\n\t if (d1 < d2) return -1;\n\t if (d1 === d2) return 0;\n\t}\n\t\n\t\n\tfunction compareTime(t1, t2) {\n\t if (!(t1 && t2)) return;\n\t t1 = t1.match(TIME);\n\t t2 = t2.match(TIME);\n\t if (!(t1 && t2)) return;\n\t t1 = t1[1] + t1[2] + t1[3] + (t1[4]||'');\n\t t2 = t2[1] + t2[2] + t2[3] + (t2[4]||'');\n\t if (t1 > t2) return 1;\n\t if (t1 < t2) return -1;\n\t if (t1 === t2) return 0;\n\t}\n\t\n\t\n\tfunction compareDateTime(dt1, dt2) {\n\t if (!(dt1 && dt2)) return;\n\t dt1 = dt1.split(DATE_TIME_SEPARATOR);\n\t dt2 = dt2.split(DATE_TIME_SEPARATOR);\n\t var res = compareDate(dt1[0], dt2[0]);\n\t if (res === undefined) return;\n\t return res || compareTime(dt1[1], dt2[1]);\n\t}\n\t\n\t},{\"./util\":10}],6:[function(require,module,exports){\n\t'use strict';\n\t\n\tvar resolve = require('./resolve')\n\t , util = require('./util')\n\t , stableStringify = require('json-stable-stringify')\n\t , async = require('../async');\n\t\n\tvar beautify = (function() { try { return require('' + 'js-beautify').js_beautify; } catch(e) {/*empty*/} })();\n\t\n\tvar validateGenerator = require('../dotjs/validate');\n\t\n\tmodule.exports = compile;\n\t\n\t\n\t/**\n\t * Compiles schema to validation function\n\t * @this Ajv\n\t * @param {Object} schema schema object\n\t * @param {Object} root object with information about the root schema for this schema\n\t * @param {Object} localRefs the hash of local references inside the schema (created by resolve.id), used for inline resolution\n\t * @param {String} baseId base ID for IDs in the schema\n\t * @return {Function} validation function\n\t */\n\tfunction compile(schema, root, localRefs, baseId) {\n\t /* jshint validthis: true, evil: true */\n\t /* eslint no-shadow: 0 */\n\t var self = this\n\t , opts = this._opts\n\t , refVal = [ undefined ]\n\t , refs = {}\n\t , patterns = []\n\t , patternsHash = {}\n\t , defaults = []\n\t , defaultsHash = {}\n\t , customRules = [];\n\t\n\t root = root || { schema: schema, refVal: refVal, refs: refs };\n\t\n\t var formats = this._formats;\n\t var RULES = this.RULES;\n\t\n\t return localCompile(schema, root, localRefs, baseId);\n\t\n\t\n\t function localCompile(_schema, _root, localRefs, baseId) {\n\t var isRoot = !_root || (_root && _root.schema == _schema);\n\t if (_root.schema != root.schema)\n\t return compile.call(self, _schema, _root, localRefs, baseId);\n\t\n\t var $async = _schema.$async === true;\n\t if ($async && !opts.transpile) async.setup(opts);\n\t\n\t var sourceCode = validateGenerator({\n\t isTop: true,\n\t schema: _schema,\n\t isRoot: isRoot,\n\t baseId: baseId,\n\t root: _root,\n\t schemaPath: '',\n\t errSchemaPath: '#',\n\t errorPath: '\"\"',\n\t RULES: RULES,\n\t validate: validateGenerator,\n\t util: util,\n\t resolve: resolve,\n\t resolveRef: resolveRef,\n\t usePattern: usePattern,\n\t useDefault: useDefault,\n\t useCustomRule: useCustomRule,\n\t opts: opts,\n\t formats: formats,\n\t self: self\n\t });\n\t\n\t sourceCode = vars(refVal, refValCode) + vars(patterns, patternCode)\n\t + vars(defaults, defaultCode) + vars(customRules, customRuleCode)\n\t + sourceCode;\n\t\n\t if (opts.beautify) {\n\t /* istanbul ignore else */\n\t if (beautify) sourceCode = beautify(sourceCode, opts.beautify);\n\t else console.error('\"npm install js-beautify\" to use beautify option');\n\t }\n\t // console.log('\\n\\n\\n *** \\n', sourceCode);\n\t var validate, validateCode\n\t , transpile = opts._transpileFunc;\n\t try {\n\t validateCode = $async && transpile\n\t ? transpile(sourceCode)\n\t : sourceCode;\n\t eval(validateCode);\n\t refVal[0] = validate;\n\t } catch(e) {\n\t console.error('Error compiling schema, function code:', validateCode);\n\t throw e;\n\t }\n\t\n\t validate.schema = _schema;\n\t validate.errors = null;\n\t validate.refs = refs;\n\t validate.refVal = refVal;\n\t validate.root = isRoot ? validate : _root;\n\t if ($async) validate.async = true;\n\t if (transpile) validate.sourceCode = sourceCode;\n\t\n\t return validate;\n\t }\n\t\n\t function resolveRef(baseId, ref, isRoot) {\n\t ref = resolve.url(baseId, ref);\n\t var refIndex = refs[ref];\n\t var _refVal, refCode;\n\t if (refIndex !== undefined) {\n\t _refVal = refVal[refIndex];\n\t refCode = 'refVal[' + refIndex + ']';\n\t return resolvedRef(_refVal, refCode);\n\t }\n\t if (!isRoot) {\n\t var rootRefId = root.refs[ref];\n\t if (rootRefId !== undefined) {\n\t _refVal = root.refVal[rootRefId];\n\t refCode = addLocalRef(ref, _refVal);\n\t return resolvedRef(_refVal, refCode);\n\t }\n\t }\n\t\n\t refCode = addLocalRef(ref);\n\t var v = resolve.call(self, localCompile, root, ref);\n\t if (!v) {\n\t var localSchema = localRefs && localRefs[ref];\n\t if (localSchema) {\n\t v = resolve.inlineRef(localSchema, opts.inlineRefs)\n\t ? localSchema\n\t : compile.call(self, localSchema, root, localRefs, baseId);\n\t }\n\t }\n\t\n\t if (v) {\n\t replaceLocalRef(ref, v);\n\t return resolvedRef(v, refCode);\n\t }\n\t }\n\t\n\t function addLocalRef(ref, v) {\n\t var refId = refVal.length;\n\t refVal[refId] = v;\n\t refs[ref] = refId;\n\t return 'refVal' + refId;\n\t }\n\t\n\t function replaceLocalRef(ref, v) {\n\t var refId = refs[ref];\n\t refVal[refId] = v;\n\t }\n\t\n\t function resolvedRef(refVal, code) {\n\t return typeof refVal == 'object'\n\t ? { code: code, schema: refVal, inline: true }\n\t : { code: code, async: refVal && refVal.async };\n\t }\n\t\n\t function usePattern(regexStr) {\n\t var index = patternsHash[regexStr];\n\t if (index === undefined) {\n\t index = patternsHash[regexStr] = patterns.length;\n\t patterns[index] = regexStr;\n\t }\n\t return 'pattern' + index;\n\t }\n\t\n\t function useDefault(value) {\n\t switch (typeof value) {\n\t case 'boolean':\n\t case 'number':\n\t return '' + value;\n\t case 'string':\n\t return util.toQuotedString(value);\n\t case 'object':\n\t if (value === null) return 'null';\n\t var valueStr = stableStringify(value);\n\t var index = defaultsHash[valueStr];\n\t if (index === undefined) {\n\t index = defaultsHash[valueStr] = defaults.length;\n\t defaults[index] = value;\n\t }\n\t return 'default' + index;\n\t }\n\t }\n\t\n\t function useCustomRule(rule, schema, parentSchema, it) {\n\t var compile = rule.definition.compile\n\t , inline = rule.definition.inline\n\t , macro = rule.definition.macro;\n\t\n\t var validate;\n\t if (compile) {\n\t validate = compile.call(self, schema, parentSchema);\n\t } else if (macro) {\n\t validate = macro.call(self, schema, parentSchema);\n\t if (opts.validateSchema !== false) self.validateSchema(validate, true);\n\t } else if (inline) {\n\t validate = inline.call(self, it, rule.keyword, schema, parentSchema);\n\t } else {\n\t validate = rule.definition.validate;\n\t }\n\t\n\t var index = customRules.length;\n\t customRules[index] = validate;\n\t\n\t return {\n\t code: 'customRule' + index,\n\t validate: validate\n\t };\n\t }\n\t}\n\t\n\t\n\tfunction patternCode(i, patterns) {\n\t return 'var pattern' + i + ' = new RegExp(' + util.toQuotedString(patterns[i]) + ');';\n\t}\n\t\n\t\n\tfunction defaultCode(i) {\n\t return 'var default' + i + ' = defaults[' + i + '];';\n\t}\n\t\n\t\n\tfunction refValCode(i, refVal) {\n\t return refVal[i] ? 'var refVal' + i + ' = refVal[' + i + '];' : '';\n\t}\n\t\n\t\n\tfunction customRuleCode(i) {\n\t return 'var customRule' + i + ' = customRules[' + i + '];';\n\t}\n\t\n\t\n\tfunction vars(arr, statement) {\n\t if (!arr.length) return '';\n\t var code = '';\n\t for (var i=0; i= 0xD800 && value <= 0xDBFF && pos < len) {\n\t // high surrogate, and there is a next character\n\t value = str.charCodeAt(pos);\n\t if ((value & 0xFC00) == 0xDC00) pos++; // low surrogate\n\t }\n\t }\n\t return length;\n\t}\n\t\n\t\n\tfunction varOccurences(str, dataVar) {\n\t dataVar += '[^0-9]';\n\t var matches = str.match(new RegExp(dataVar, 'g'));\n\t return matches ? matches.length : 0;\n\t}\n\t\n\t\n\tfunction varReplace(str, dataVar, expr) {\n\t dataVar += '([^0-9])';\n\t expr = expr.replace(/\\$/g, '$$$$');\n\t return str.replace(new RegExp(dataVar, 'g'), expr + '$1');\n\t}\n\t\n\t\n\tvar EMPTY_ELSE = /else\\s*{\\s*}/g\n\t , EMPTY_IF_NO_ELSE = /if\\s*\\([^)]+\\)\\s*\\{\\s*\\}(?!\\s*else)/g\n\t , EMPTY_IF_WITH_ELSE = /if\\s*\\(([^)]+)\\)\\s*\\{\\s*\\}\\s*else(?!\\s*if)/g;\n\tfunction cleanUpCode(out) {\n\t return out.replace(EMPTY_ELSE, '')\n\t .replace(EMPTY_IF_NO_ELSE, '')\n\t .replace(EMPTY_IF_WITH_ELSE, 'if (!($1))');\n\t}\n\t\n\t\n\tvar ERRORS_REGEXP = /[^v\\.]errors/g\n\t , REMOVE_ERRORS = /var errors = 0;|var vErrors = null;|validate.errors = vErrors;/g\n\t , REMOVE_ERRORS_ASYNC = /var errors = 0;|var vErrors = null;/g\n\t , RETURN_VALID = 'return errors === 0;'\n\t , RETURN_TRUE = 'validate.errors = null; return true;'\n\t , RETURN_ASYNC = /if \\(errors === 0\\) return true;\\s*else throw new ValidationError\\(vErrors\\);/\n\t , RETURN_TRUE_ASYNC = 'return true;';\n\t\n\tfunction cleanUpVarErrors(out, async) {\n\t var matches = out.match(ERRORS_REGEXP);\n\t if (!matches || matches.length !== 2) return out;\n\t return async\n\t ? out.replace(REMOVE_ERRORS_ASYNC, '')\n\t .replace(RETURN_ASYNC, RETURN_TRUE_ASYNC)\n\t : out.replace(REMOVE_ERRORS, '')\n\t .replace(RETURN_VALID, RETURN_TRUE);\n\t}\n\t\n\t\n\tfunction schemaHasRules(schema, rules) {\n\t for (var key in schema) if (rules[key]) return true;\n\t}\n\t\n\t\n\tfunction toQuotedString(str) {\n\t return '\\'' + escapeQuotes(str) + '\\'';\n\t}\n\t\n\t\n\tfunction getPathExpr(currentPath, expr, jsonPointers, isNumber) {\n\t var path = jsonPointers // false by default\n\t ? '\\'/\\' + ' + expr + (isNumber ? '' : '.replace(/~/g, \\'~0\\').replace(/\\\\//g, \\'~1\\')')\n\t : (isNumber ? '\\'[\\' + ' + expr + ' + \\']\\'' : '\\'[\\\\\\'\\' + ' + expr + ' + \\'\\\\\\']\\'');\n\t return joinPaths(currentPath, path);\n\t}\n\t\n\t\n\tfunction getPath(currentPath, prop, jsonPointers) {\n\t var path = jsonPointers // false by default\n\t ? toQuotedString('/' + escapeJsonPointer(prop))\n\t : toQuotedString(getProperty(prop));\n\t return joinPaths(currentPath, path);\n\t}\n\t\n\t\n\tvar RELATIVE_JSON_POINTER = /^([0-9]+)(#|\\/(?:[^~]|~0|~1)*)?$/;\n\tfunction getData($data, lvl, paths) {\n\t var matches = $data.match(RELATIVE_JSON_POINTER);\n\t if (!matches) throw new Error('Invalid relative JSON-pointer: ' + $data);\n\t var up = +matches[1];\n\t var jsonPointer = matches[2];\n\t if (jsonPointer == '#') {\n\t if (up >= lvl) throw new Error('Cannot access property/index ' + up + ' levels up, current level is ' + lvl);\n\t return paths[lvl - up];\n\t }\n\t\n\t if (up > lvl) throw new Error('Cannot access data ' + up + ' levels up, current level is ' + lvl);\n\t var data = 'data' + ((lvl - up) || '');\n\t if (!jsonPointer) return data;\n\t\n\t var expr = data;\n\t var segments = jsonPointer.split('/');\n\t for (var i=0; i',\n\t $result = 'result' + $lvl;\n\t var $isData = it.opts.v5 && $schema.$data;\n\t var $schemaValue = $isData ? it.util.getData($schema.$data, $dataLvl, it.dataPathArr) : $schema;\n\t if ($isData) {\n\t out += ' var schema' + ($lvl) + ' = ' + ($schemaValue) + '; ';\n\t $schemaValue = 'schema' + $lvl;\n\t }\n\t if ($isDataExcl) {\n\t var $schemaValueExcl = it.util.getData($schemaExcl.$data, $dataLvl, it.dataPathArr),\n\t $exclusive = 'exclusive' + $lvl,\n\t $opExpr = 'op' + $lvl,\n\t $opStr = '\\' + ' + $opExpr + ' + \\'';\n\t out += ' var schemaExcl' + ($lvl) + ' = ' + ($schemaValueExcl) + '; ';\n\t $schemaValueExcl = 'schemaExcl' + $lvl;\n\t out += ' if (typeof ' + ($schemaValueExcl) + ' != \\'boolean\\' && ' + ($schemaValueExcl) + ' !== undefined) { ' + ($valid) + ' = false; ';\n\t var $errorKeyword = $exclusiveKeyword;\n\t var $$outStack = $$outStack || [];\n\t $$outStack.push(out);\n\t out = ''; /* istanbul ignore else */\n\t if (it.createErrors !== false) {\n\t out += ' { keyword: \\'' + ($errorKeyword || '_exclusiveFormatLimit') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: \"' + ($errSchemaPath) + '\" , params: {} ';\n\t if (it.opts.messages !== false) {\n\t out += ' , message: \\'' + ($exclusiveKeyword) + ' should be boolean\\' ';\n\t }\n\t if (it.opts.verbose) {\n\t out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n\t }\n\t out += ' } ';\n\t } else {\n\t out += ' {} ';\n\t }\n\t var __err = out;\n\t out = $$outStack.pop();\n\t if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */\n\t if (it.async) {\n\t out += ' throw new ValidationError([' + (__err) + ']); ';\n\t } else {\n\t out += ' validate.errors = [' + (__err) + ']; return false; ';\n\t }\n\t } else {\n\t out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n\t }\n\t out += ' } ';\n\t if ($breakOnError) {\n\t $closingBraces += '}';\n\t out += ' else { ';\n\t }\n\t if ($isData) {\n\t out += ' if (' + ($schemaValue) + ' === undefined) ' + ($valid) + ' = true; else if (typeof ' + ($schemaValue) + ' != \\'string\\') ' + ($valid) + ' = false; else { ';\n\t $closingBraces += '}';\n\t }\n\t if ($isDataFormat) {\n\t out += ' if (!' + ($compare) + ') ' + ($valid) + ' = true; else { ';\n\t $closingBraces += '}';\n\t }\n\t out += ' var ' + ($result) + ' = ' + ($compare) + '(' + ($data) + ', ';\n\t if ($isData) {\n\t out += '' + ($schemaValue);\n\t } else {\n\t out += '' + (it.util.toQuotedString($schema));\n\t }\n\t out += ' ); if (' + ($result) + ' === undefined) ' + ($valid) + ' = false; var exclusive' + ($lvl) + ' = ' + ($schemaValueExcl) + ' === true; if (' + ($valid) + ' === undefined) { ' + ($valid) + ' = exclusive' + ($lvl) + ' ? ' + ($result) + ' ' + ($op) + ' 0 : ' + ($result) + ' ' + ($op) + '= 0; } if (!' + ($valid) + ') var op' + ($lvl) + ' = exclusive' + ($lvl) + ' ? \\'' + ($op) + '\\' : \\'' + ($op) + '=\\';';\n\t } else {\n\t var $exclusive = $schemaExcl === true,\n\t $opStr = $op;\n\t if (!$exclusive) $opStr += '=';\n\t var $opExpr = '\\'' + $opStr + '\\'';\n\t if ($isData) {\n\t out += ' if (' + ($schemaValue) + ' === undefined) ' + ($valid) + ' = true; else if (typeof ' + ($schemaValue) + ' != \\'string\\') ' + ($valid) + ' = false; else { ';\n\t $closingBraces += '}';\n\t }\n\t if ($isDataFormat) {\n\t out += ' if (!' + ($compare) + ') ' + ($valid) + ' = true; else { ';\n\t $closingBraces += '}';\n\t }\n\t out += ' var ' + ($result) + ' = ' + ($compare) + '(' + ($data) + ', ';\n\t if ($isData) {\n\t out += '' + ($schemaValue);\n\t } else {\n\t out += '' + (it.util.toQuotedString($schema));\n\t }\n\t out += ' ); if (' + ($result) + ' === undefined) ' + ($valid) + ' = false; if (' + ($valid) + ' === undefined) ' + ($valid) + ' = ' + ($result) + ' ' + ($op);\n\t if (!$exclusive) {\n\t out += '=';\n\t }\n\t out += ' 0;';\n\t }\n\t out += '' + ($closingBraces) + 'if (!' + ($valid) + ') { ';\n\t var $errorKeyword = $keyword;\n\t var $$outStack = $$outStack || [];\n\t $$outStack.push(out);\n\t out = ''; /* istanbul ignore else */\n\t if (it.createErrors !== false) {\n\t out += ' { keyword: \\'' + ($errorKeyword || '_formatLimit') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: \"' + ($errSchemaPath) + '\" , params: { limit: ';\n\t if ($isData) {\n\t out += '' + ($schemaValue);\n\t } else {\n\t out += '' + (it.util.toQuotedString($schema));\n\t }\n\t out += ' } ';\n\t if (it.opts.messages !== false) {\n\t out += ' , message: \\'should be ' + ($opStr) + ' \"';\n\t if ($isData) {\n\t out += '\\' + ' + ($schemaValue) + ' + \\'';\n\t } else {\n\t out += '' + (it.util.escapeQuotes($schema));\n\t }\n\t out += '\"\\' ';\n\t }\n\t if (it.opts.verbose) {\n\t out += ' , schema: ';\n\t if ($isData) {\n\t out += 'validate.schema' + ($schemaPath);\n\t } else {\n\t out += '' + (it.util.toQuotedString($schema));\n\t }\n\t out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n\t }\n\t out += ' } ';\n\t } else {\n\t out += ' {} ';\n\t }\n\t var __err = out;\n\t out = $$outStack.pop();\n\t if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */\n\t if (it.async) {\n\t out += ' throw new ValidationError([' + (__err) + ']); ';\n\t } else {\n\t out += ' validate.errors = [' + (__err) + ']; return false; ';\n\t }\n\t } else {\n\t out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n\t }\n\t out += '}';\n\t return out;\n\t}\n\t\n\t},{}],13:[function(require,module,exports){\n\t'use strict';\n\tmodule.exports = function generate__limit(it, $keyword) {\n\t var out = ' ';\n\t var $lvl = it.level;\n\t var $dataLvl = it.dataLevel;\n\t var $schema = it.schema[$keyword];\n\t var $schemaPath = it.schemaPath + '.' + $keyword;\n\t var $errSchemaPath = it.errSchemaPath + '/' + $keyword;\n\t var $breakOnError = !it.opts.allErrors;\n\t var $errorKeyword;\n\t var $data = 'data' + ($dataLvl || '');\n\t var $isData = it.opts.v5 && $schema.$data;\n\t var $schemaValue = $isData ? it.util.getData($schema.$data, $dataLvl, it.dataPathArr) : $schema;\n\t if ($isData) {\n\t out += ' var schema' + ($lvl) + ' = ' + ($schemaValue) + '; ';\n\t $schemaValue = 'schema' + $lvl;\n\t }\n\t var $isMax = $keyword == 'maximum',\n\t $exclusiveKeyword = $isMax ? 'exclusiveMaximum' : 'exclusiveMinimum',\n\t $schemaExcl = it.schema[$exclusiveKeyword],\n\t $isDataExcl = it.opts.v5 && $schemaExcl && $schemaExcl.$data,\n\t $op = $isMax ? '<' : '>',\n\t $notOp = $isMax ? '>' : '<';\n\t if ($isDataExcl) {\n\t var $schemaValueExcl = it.util.getData($schemaExcl.$data, $dataLvl, it.dataPathArr),\n\t $exclusive = 'exclusive' + $lvl,\n\t $opExpr = 'op' + $lvl,\n\t $opStr = '\\' + ' + $opExpr + ' + \\'';\n\t out += ' var schemaExcl' + ($lvl) + ' = ' + ($schemaValueExcl) + '; ';\n\t $schemaValueExcl = 'schemaExcl' + $lvl;\n\t out += ' var exclusive' + ($lvl) + '; if (typeof ' + ($schemaValueExcl) + ' != \\'boolean\\' && typeof ' + ($schemaValueExcl) + ' != \\'undefined\\') { ';\n\t var $errorKeyword = $exclusiveKeyword;\n\t var $$outStack = $$outStack || [];\n\t $$outStack.push(out);\n\t out = ''; /* istanbul ignore else */\n\t if (it.createErrors !== false) {\n\t out += ' { keyword: \\'' + ($errorKeyword || '_exclusiveLimit') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: \"' + ($errSchemaPath) + '\" , params: {} ';\n\t if (it.opts.messages !== false) {\n\t out += ' , message: \\'' + ($exclusiveKeyword) + ' should be boolean\\' ';\n\t }\n\t if (it.opts.verbose) {\n\t out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n\t }\n\t out += ' } ';\n\t } else {\n\t out += ' {} ';\n\t }\n\t var __err = out;\n\t out = $$outStack.pop();\n\t if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */\n\t if (it.async) {\n\t out += ' throw new ValidationError([' + (__err) + ']); ';\n\t } else {\n\t out += ' validate.errors = [' + (__err) + ']; return false; ';\n\t }\n\t } else {\n\t out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n\t }\n\t out += ' } else if( ';\n\t if ($isData) {\n\t out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \\'number\\') || ';\n\t }\n\t out += ' ((exclusive' + ($lvl) + ' = ' + ($schemaValueExcl) + ' === true) ? ' + ($data) + ' ' + ($notOp) + '= ' + ($schemaValue) + ' : ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ')) { var op' + ($lvl) + ' = exclusive' + ($lvl) + ' ? \\'' + ($op) + '\\' : \\'' + ($op) + '=\\';';\n\t } else {\n\t var $exclusive = $schemaExcl === true,\n\t $opStr = $op;\n\t if (!$exclusive) $opStr += '=';\n\t var $opExpr = '\\'' + $opStr + '\\'';\n\t out += ' if ( ';\n\t if ($isData) {\n\t out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \\'number\\') || ';\n\t }\n\t out += ' ' + ($data) + ' ' + ($notOp);\n\t if ($exclusive) {\n\t out += '=';\n\t }\n\t out += ' ' + ($schemaValue) + ') {';\n\t }\n\t var $errorKeyword = $keyword;\n\t var $$outStack = $$outStack || [];\n\t $$outStack.push(out);\n\t out = ''; /* istanbul ignore else */\n\t if (it.createErrors !== false) {\n\t out += ' { keyword: \\'' + ($errorKeyword || '_limit') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: \"' + ($errSchemaPath) + '\" , params: { comparison: ' + ($opExpr) + ', limit: ' + ($schemaValue) + ', exclusive: ' + ($exclusive) + ' } ';\n\t if (it.opts.messages !== false) {\n\t out += ' , message: \\'should be ' + ($opStr) + ' ';\n\t if ($isData) {\n\t out += '\\' + ' + ($schemaValue);\n\t } else {\n\t out += '' + ($schema) + '\\'';\n\t }\n\t }\n\t if (it.opts.verbose) {\n\t out += ' , schema: ';\n\t if ($isData) {\n\t out += 'validate.schema' + ($schemaPath);\n\t } else {\n\t out += '' + ($schema);\n\t }\n\t out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n\t }\n\t out += ' } ';\n\t } else {\n\t out += ' {} ';\n\t }\n\t var __err = out;\n\t out = $$outStack.pop();\n\t if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */\n\t if (it.async) {\n\t out += ' throw new ValidationError([' + (__err) + ']); ';\n\t } else {\n\t out += ' validate.errors = [' + (__err) + ']; return false; ';\n\t }\n\t } else {\n\t out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n\t }\n\t out += ' } ';\n\t if ($breakOnError) {\n\t out += ' else { ';\n\t }\n\t return out;\n\t}\n\t\n\t},{}],14:[function(require,module,exports){\n\t'use strict';\n\tmodule.exports = function generate__limitItems(it, $keyword) {\n\t var out = ' ';\n\t var $lvl = it.level;\n\t var $dataLvl = it.dataLevel;\n\t var $schema = it.schema[$keyword];\n\t var $schemaPath = it.schemaPath + '.' + $keyword;\n\t var $errSchemaPath = it.errSchemaPath + '/' + $keyword;\n\t var $breakOnError = !it.opts.allErrors;\n\t var $errorKeyword;\n\t var $data = 'data' + ($dataLvl || '');\n\t var $isData = it.opts.v5 && $schema.$data;\n\t var $schemaValue = $isData ? it.util.getData($schema.$data, $dataLvl, it.dataPathArr) : $schema;\n\t if ($isData) {\n\t out += ' var schema' + ($lvl) + ' = ' + ($schemaValue) + '; ';\n\t $schemaValue = 'schema' + $lvl;\n\t }\n\t var $op = $keyword == 'maxItems' ? '>' : '<';\n\t out += 'if ( ';\n\t if ($isData) {\n\t out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \\'number\\') || ';\n\t }\n\t out += ' ' + ($data) + '.length ' + ($op) + ' ' + ($schemaValue) + ') { ';\n\t var $errorKeyword = $keyword;\n\t var $$outStack = $$outStack || [];\n\t $$outStack.push(out);\n\t out = ''; /* istanbul ignore else */\n\t if (it.createErrors !== false) {\n\t out += ' { keyword: \\'' + ($errorKeyword || '_limitItems') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: \"' + ($errSchemaPath) + '\" , params: { limit: ' + ($schemaValue) + ' } ';\n\t if (it.opts.messages !== false) {\n\t out += ' , message: \\'should NOT have ';\n\t if ($keyword == 'maxItems') {\n\t out += 'more';\n\t } else {\n\t out += 'less';\n\t }\n\t out += ' than ';\n\t if ($isData) {\n\t out += '\\' + ' + ($schemaValue) + ' + \\'';\n\t } else {\n\t out += '' + ($schema);\n\t }\n\t out += ' items\\' ';\n\t }\n\t if (it.opts.verbose) {\n\t out += ' , schema: ';\n\t if ($isData) {\n\t out += 'validate.schema' + ($schemaPath);\n\t } else {\n\t out += '' + ($schema);\n\t }\n\t out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n\t }\n\t out += ' } ';\n\t } else {\n\t out += ' {} ';\n\t }\n\t var __err = out;\n\t out = $$outStack.pop();\n\t if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */\n\t if (it.async) {\n\t out += ' throw new ValidationError([' + (__err) + ']); ';\n\t } else {\n\t out += ' validate.errors = [' + (__err) + ']; return false; ';\n\t }\n\t } else {\n\t out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n\t }\n\t out += '} ';\n\t if ($breakOnError) {\n\t out += ' else { ';\n\t }\n\t return out;\n\t}\n\t\n\t},{}],15:[function(require,module,exports){\n\t'use strict';\n\tmodule.exports = function generate__limitLength(it, $keyword) {\n\t var out = ' ';\n\t var $lvl = it.level;\n\t var $dataLvl = it.dataLevel;\n\t var $schema = it.schema[$keyword];\n\t var $schemaPath = it.schemaPath + '.' + $keyword;\n\t var $errSchemaPath = it.errSchemaPath + '/' + $keyword;\n\t var $breakOnError = !it.opts.allErrors;\n\t var $errorKeyword;\n\t var $data = 'data' + ($dataLvl || '');\n\t var $isData = it.opts.v5 && $schema.$data;\n\t var $schemaValue = $isData ? it.util.getData($schema.$data, $dataLvl, it.dataPathArr) : $schema;\n\t if ($isData) {\n\t out += ' var schema' + ($lvl) + ' = ' + ($schemaValue) + '; ';\n\t $schemaValue = 'schema' + $lvl;\n\t }\n\t var $op = $keyword == 'maxLength' ? '>' : '<';\n\t out += 'if ( ';\n\t if ($isData) {\n\t out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \\'number\\') || ';\n\t }\n\t if (it.opts.unicode === false) {\n\t out += ' ' + ($data) + '.length ';\n\t } else {\n\t out += ' ucs2length(' + ($data) + ') ';\n\t }\n\t out += ' ' + ($op) + ' ' + ($schemaValue) + ') { ';\n\t var $errorKeyword = $keyword;\n\t var $$outStack = $$outStack || [];\n\t $$outStack.push(out);\n\t out = ''; /* istanbul ignore else */\n\t if (it.createErrors !== false) {\n\t out += ' { keyword: \\'' + ($errorKeyword || '_limitLength') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: \"' + ($errSchemaPath) + '\" , params: { limit: ' + ($schemaValue) + ' } ';\n\t if (it.opts.messages !== false) {\n\t out += ' , message: \\'should NOT be ';\n\t if ($keyword == 'maxLength') {\n\t out += 'longer';\n\t } else {\n\t out += 'shorter';\n\t }\n\t out += ' than ';\n\t if ($isData) {\n\t out += '\\' + ' + ($schemaValue) + ' + \\'';\n\t } else {\n\t out += '' + ($schema);\n\t }\n\t out += ' characters\\' ';\n\t }\n\t if (it.opts.verbose) {\n\t out += ' , schema: ';\n\t if ($isData) {\n\t out += 'validate.schema' + ($schemaPath);\n\t } else {\n\t out += '' + ($schema);\n\t }\n\t out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n\t }\n\t out += ' } ';\n\t } else {\n\t out += ' {} ';\n\t }\n\t var __err = out;\n\t out = $$outStack.pop();\n\t if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */\n\t if (it.async) {\n\t out += ' throw new ValidationError([' + (__err) + ']); ';\n\t } else {\n\t out += ' validate.errors = [' + (__err) + ']; return false; ';\n\t }\n\t } else {\n\t out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n\t }\n\t out += '} ';\n\t if ($breakOnError) {\n\t out += ' else { ';\n\t }\n\t return out;\n\t}\n\t\n\t},{}],16:[function(require,module,exports){\n\t'use strict';\n\tmodule.exports = function generate__limitProperties(it, $keyword) {\n\t var out = ' ';\n\t var $lvl = it.level;\n\t var $dataLvl = it.dataLevel;\n\t var $schema = it.schema[$keyword];\n\t var $schemaPath = it.schemaPath + '.' + $keyword;\n\t var $errSchemaPath = it.errSchemaPath + '/' + $keyword;\n\t var $breakOnError = !it.opts.allErrors;\n\t var $errorKeyword;\n\t var $data = 'data' + ($dataLvl || '');\n\t var $isData = it.opts.v5 && $schema.$data;\n\t var $schemaValue = $isData ? it.util.getData($schema.$data, $dataLvl, it.dataPathArr) : $schema;\n\t if ($isData) {\n\t out += ' var schema' + ($lvl) + ' = ' + ($schemaValue) + '; ';\n\t $schemaValue = 'schema' + $lvl;\n\t }\n\t var $op = $keyword == 'maxProperties' ? '>' : '<';\n\t out += 'if ( ';\n\t if ($isData) {\n\t out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \\'number\\') || ';\n\t }\n\t out += ' Object.keys(' + ($data) + ').length ' + ($op) + ' ' + ($schemaValue) + ') { ';\n\t var $errorKeyword = $keyword;\n\t var $$outStack = $$outStack || [];\n\t $$outStack.push(out);\n\t out = ''; /* istanbul ignore else */\n\t if (it.createErrors !== false) {\n\t out += ' { keyword: \\'' + ($errorKeyword || '_limitProperties') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: \"' + ($errSchemaPath) + '\" , params: { limit: ' + ($schemaValue) + ' } ';\n\t if (it.opts.messages !== false) {\n\t out += ' , message: \\'should NOT have ';\n\t if ($keyword == 'maxProperties') {\n\t out += 'more';\n\t } else {\n\t out += 'less';\n\t }\n\t out += ' than ';\n\t if ($isData) {\n\t out += '\\' + ' + ($schemaValue) + ' + \\'';\n\t } else {\n\t out += '' + ($schema);\n\t }\n\t out += ' properties\\' ';\n\t }\n\t if (it.opts.verbose) {\n\t out += ' , schema: ';\n\t if ($isData) {\n\t out += 'validate.schema' + ($schemaPath);\n\t } else {\n\t out += '' + ($schema);\n\t }\n\t out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n\t }\n\t out += ' } ';\n\t } else {\n\t out += ' {} ';\n\t }\n\t var __err = out;\n\t out = $$outStack.pop();\n\t if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */\n\t if (it.async) {\n\t out += ' throw new ValidationError([' + (__err) + ']); ';\n\t } else {\n\t out += ' validate.errors = [' + (__err) + ']; return false; ';\n\t }\n\t } else {\n\t out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n\t }\n\t out += '} ';\n\t if ($breakOnError) {\n\t out += ' else { ';\n\t }\n\t return out;\n\t}\n\t\n\t},{}],17:[function(require,module,exports){\n\t'use strict';\n\tmodule.exports = function generate_allOf(it, $keyword) {\n\t var out = ' ';\n\t var $schema = it.schema[$keyword];\n\t var $schemaPath = it.schemaPath + '.' + $keyword;\n\t var $errSchemaPath = it.errSchemaPath + '/' + $keyword;\n\t var $breakOnError = !it.opts.allErrors;\n\t var $it = it.util.copy(it);\n\t var $closingBraces = '';\n\t $it.level++;\n\t var arr1 = $schema;\n\t if (arr1) {\n\t var $sch, $i = -1,\n\t l1 = arr1.length - 1;\n\t while ($i < l1) {\n\t $sch = arr1[$i += 1];\n\t if (it.util.schemaHasRules($sch, it.RULES.all)) {\n\t $it.schema = $sch;\n\t $it.schemaPath = $schemaPath + '[' + $i + ']';\n\t $it.errSchemaPath = $errSchemaPath + '/' + $i;\n\t out += ' ' + (it.validate($it)) + ' ';\n\t if ($breakOnError) {\n\t out += ' if (valid' + ($it.level) + ') { ';\n\t $closingBraces += '}';\n\t }\n\t }\n\t }\n\t }\n\t if ($breakOnError) {\n\t out += ' ' + ($closingBraces.slice(0, -1));\n\t }\n\t out = it.util.cleanUpCode(out);\n\t return out;\n\t}\n\t\n\t},{}],18:[function(require,module,exports){\n\t'use strict';\n\tmodule.exports = function generate_anyOf(it, $keyword) {\n\t var out = ' ';\n\t var $lvl = it.level;\n\t var $dataLvl = it.dataLevel;\n\t var $schema = it.schema[$keyword];\n\t var $schemaPath = it.schemaPath + '.' + $keyword;\n\t var $errSchemaPath = it.errSchemaPath + '/' + $keyword;\n\t var $breakOnError = !it.opts.allErrors;\n\t var $errorKeyword;\n\t var $data = 'data' + ($dataLvl || '');\n\t var $valid = 'valid' + $lvl;\n\t var $errs = 'errs__' + $lvl;\n\t var $it = it.util.copy(it);\n\t var $closingBraces = '';\n\t $it.level++;\n\t var $noEmptySchema = $schema.every(function($sch) {\n\t return it.util.schemaHasRules($sch, it.RULES.all);\n\t });\n\t if ($noEmptySchema) {\n\t out += ' var ' + ($errs) + ' = errors; var ' + ($valid) + ' = false; ';\n\t var $wasComposite = it.compositeRule;\n\t it.compositeRule = $it.compositeRule = true;\n\t var arr1 = $schema;\n\t if (arr1) {\n\t var $sch, $i = -1,\n\t l1 = arr1.length - 1;\n\t while ($i < l1) {\n\t $sch = arr1[$i += 1];\n\t $it.schema = $sch;\n\t $it.schemaPath = $schemaPath + '[' + $i + ']';\n\t $it.errSchemaPath = $errSchemaPath + '/' + $i;\n\t out += ' ' + (it.validate($it)) + ' ' + ($valid) + ' = ' + ($valid) + ' || valid' + ($it.level) + '; if (!' + ($valid) + ') { ';\n\t $closingBraces += '}';\n\t }\n\t }\n\t it.compositeRule = $it.compositeRule = $wasComposite;\n\t out += ' ' + ($closingBraces) + ' if (!' + ($valid) + ') { var err = '; /* istanbul ignore else */\n\t if (it.createErrors !== false) {\n\t out += ' { keyword: \\'' + ($errorKeyword || 'anyOf') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: \"' + ($errSchemaPath) + '\" , params: {} ';\n\t if (it.opts.messages !== false) {\n\t out += ' , message: \\'should match some schema in anyOf\\' ';\n\t }\n\t if (it.opts.verbose) {\n\t out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n\t }\n\t out += ' } ';\n\t } else {\n\t out += ' {} ';\n\t }\n\t out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } else { errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } ';\n\t if (it.opts.allErrors) {\n\t out += ' } ';\n\t }\n\t out = it.util.cleanUpCode(out);\n\t } else {\n\t if ($breakOnError) {\n\t out += ' if (true) { ';\n\t }\n\t }\n\t return out;\n\t}\n\t\n\t},{}],19:[function(require,module,exports){\n\t'use strict';\n\tmodule.exports = function generate_constant(it, $keyword) {\n\t var out = ' ';\n\t var $lvl = it.level;\n\t var $dataLvl = it.dataLevel;\n\t var $schema = it.schema[$keyword];\n\t var $schemaPath = it.schemaPath + '.' + $keyword;\n\t var $errSchemaPath = it.errSchemaPath + '/' + $keyword;\n\t var $breakOnError = !it.opts.allErrors;\n\t var $errorKeyword;\n\t var $data = 'data' + ($dataLvl || '');\n\t var $valid = 'valid' + $lvl;\n\t var $isData = it.opts.v5 && $schema.$data;\n\t var $schemaValue = $isData ? it.util.getData($schema.$data, $dataLvl, it.dataPathArr) : $schema;\n\t if ($isData) {\n\t out += ' var schema' + ($lvl) + ' = ' + ($schemaValue) + '; ';\n\t $schemaValue = 'schema' + $lvl;\n\t }\n\t if (!$isData) {\n\t out += ' var schema' + ($lvl) + ' = validate.schema' + ($schemaPath) + ';';\n\t }\n\t out += 'var ' + ($valid) + ' = equal(' + ($data) + ', schema' + ($lvl) + '); if (!' + ($valid) + ') { ';\n\t var $$outStack = $$outStack || [];\n\t $$outStack.push(out);\n\t out = ''; /* istanbul ignore else */\n\t if (it.createErrors !== false) {\n\t out += ' { keyword: \\'' + ($errorKeyword || 'constant') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: \"' + ($errSchemaPath) + '\" , params: {} ';\n\t if (it.opts.messages !== false) {\n\t out += ' , message: \\'should be equal to constant\\' ';\n\t }\n\t if (it.opts.verbose) {\n\t out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n\t }\n\t out += ' } ';\n\t } else {\n\t out += ' {} ';\n\t }\n\t var __err = out;\n\t out = $$outStack.pop();\n\t if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */\n\t if (it.async) {\n\t out += ' throw new ValidationError([' + (__err) + ']); ';\n\t } else {\n\t out += ' validate.errors = [' + (__err) + ']; return false; ';\n\t }\n\t } else {\n\t out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n\t }\n\t out += ' }';\n\t return out;\n\t}\n\t\n\t},{}],20:[function(require,module,exports){\n\t'use strict';\n\tmodule.exports = function generate_dependencies(it, $keyword) {\n\t var out = ' ';\n\t var $lvl = it.level;\n\t var $dataLvl = it.dataLevel;\n\t var $schema = it.schema[$keyword];\n\t var $schemaPath = it.schemaPath + '.' + $keyword;\n\t var $errSchemaPath = it.errSchemaPath + '/' + $keyword;\n\t var $breakOnError = !it.opts.allErrors;\n\t var $errorKeyword;\n\t var $data = 'data' + ($dataLvl || '');\n\t var $errs = 'errs__' + $lvl;\n\t var $it = it.util.copy(it);\n\t var $closingBraces = '';\n\t $it.level++;\n\t var $schemaDeps = {},\n\t $propertyDeps = {};\n\t for ($property in $schema) {\n\t var $sch = $schema[$property];\n\t var $deps = Array.isArray($sch) ? $propertyDeps : $schemaDeps;\n\t $deps[$property] = $sch;\n\t }\n\t out += 'var ' + ($errs) + ' = errors;';\n\t var $currentErrorPath = it.errorPath;\n\t out += 'var missing' + ($lvl) + ';';\n\t for (var $property in $propertyDeps) {\n\t $deps = $propertyDeps[$property];\n\t out += ' if (' + ($data) + (it.util.getProperty($property)) + ' !== undefined && ( ';\n\t var arr1 = $deps;\n\t if (arr1) {\n\t var _$property, $i = -1,\n\t l1 = arr1.length - 1;\n\t while ($i < l1) {\n\t _$property = arr1[$i += 1];\n\t if ($i) {\n\t out += ' || ';\n\t }\n\t var $prop = it.util.getProperty(_$property);\n\t out += ' ( ' + ($data) + ($prop) + ' === undefined && (missing' + ($lvl) + ' = ' + (it.util.toQuotedString(it.opts.jsonPointers ? _$property : $prop)) + ') ) ';\n\t }\n\t }\n\t out += ')) { ';\n\t var $propertyPath = 'missing' + $lvl,\n\t $missingProperty = '\\' + ' + $propertyPath + ' + \\'';\n\t if (it.opts._errorDataPathProperty) {\n\t it.errorPath = it.opts.jsonPointers ? it.util.getPathExpr($currentErrorPath, $propertyPath, true) : $currentErrorPath + ' + ' + $propertyPath;\n\t }\n\t var $$outStack = $$outStack || [];\n\t $$outStack.push(out);\n\t out = ''; /* istanbul ignore else */\n\t if (it.createErrors !== false) {\n\t out += ' { keyword: \\'' + ($errorKeyword || 'dependencies') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: \"' + ($errSchemaPath) + '\" , params: { property: \\'' + (it.util.escapeQuotes($property)) + '\\', missingProperty: \\'' + ($missingProperty) + '\\', depsCount: ' + ($deps.length) + ', deps: \\'' + (it.util.escapeQuotes($deps.length == 1 ? $deps[0] : $deps.join(\", \"))) + '\\' } ';\n\t if (it.opts.messages !== false) {\n\t out += ' , message: \\'should have ';\n\t if ($deps.length == 1) {\n\t out += 'property ' + (it.util.escapeQuotes($deps[0]));\n\t } else {\n\t out += 'properties ' + (it.util.escapeQuotes($deps.join(\", \")));\n\t }\n\t out += ' when property ' + (it.util.escapeQuotes($property)) + ' is present\\' ';\n\t }\n\t if (it.opts.verbose) {\n\t out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n\t }\n\t out += ' } ';\n\t } else {\n\t out += ' {} ';\n\t }\n\t var __err = out;\n\t out = $$outStack.pop();\n\t if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */\n\t if (it.async) {\n\t out += ' throw new ValidationError([' + (__err) + ']); ';\n\t } else {\n\t out += ' validate.errors = [' + (__err) + ']; return false; ';\n\t }\n\t } else {\n\t out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n\t }\n\t out += ' } ';\n\t if ($breakOnError) {\n\t $closingBraces += '}';\n\t out += ' else { ';\n\t }\n\t }\n\t it.errorPath = $currentErrorPath;\n\t for (var $property in $schemaDeps) {\n\t var $sch = $schemaDeps[$property];\n\t if (it.util.schemaHasRules($sch, it.RULES.all)) {\n\t out += ' valid' + ($it.level) + ' = true; if (' + ($data) + '[\\'' + ($property) + '\\'] !== undefined) { ';\n\t $it.schema = $sch;\n\t $it.schemaPath = $schemaPath + it.util.getProperty($property);\n\t $it.errSchemaPath = $errSchemaPath + '/' + it.util.escapeFragment($property);\n\t out += ' ' + (it.validate($it)) + ' } ';\n\t if ($breakOnError) {\n\t out += ' if (valid' + ($it.level) + ') { ';\n\t $closingBraces += '}';\n\t }\n\t }\n\t }\n\t if ($breakOnError) {\n\t out += ' ' + ($closingBraces) + ' if (' + ($errs) + ' == errors) {';\n\t }\n\t out = it.util.cleanUpCode(out);\n\t return out;\n\t}\n\t\n\t},{}],21:[function(require,module,exports){\n\t'use strict';\n\tmodule.exports = function generate_enum(it, $keyword) {\n\t var out = ' ';\n\t var $lvl = it.level;\n\t var $dataLvl = it.dataLevel;\n\t var $schema = it.schema[$keyword];\n\t var $schemaPath = it.schemaPath + '.' + $keyword;\n\t var $errSchemaPath = it.errSchemaPath + '/' + $keyword;\n\t var $breakOnError = !it.opts.allErrors;\n\t var $errorKeyword;\n\t var $data = 'data' + ($dataLvl || '');\n\t var $valid = 'valid' + $lvl;\n\t var $isData = it.opts.v5 && $schema.$data;\n\t var $schemaValue = $isData ? it.util.getData($schema.$data, $dataLvl, it.dataPathArr) : $schema;\n\t if ($isData) {\n\t out += ' var schema' + ($lvl) + ' = ' + ($schemaValue) + '; ';\n\t $schemaValue = 'schema' + $lvl;\n\t }\n\t var $i = 'i' + $lvl;\n\t if (!$isData) {\n\t out += ' var schema' + ($lvl) + ' = validate.schema' + ($schemaPath) + ';';\n\t }\n\t out += 'var ' + ($valid) + ';';\n\t if ($isData) {\n\t out += ' if (schema' + ($lvl) + ' === undefined) ' + ($valid) + ' = true; else if (!Array.isArray(schema' + ($lvl) + ')) ' + ($valid) + ' = false; else {';\n\t }\n\t out += '' + ($valid) + ' = false;for (var ' + ($i) + '=0; ' + ($i) + ' ' + ($i) + ') { ';\n\t var $passData = $data + '[' + $i + ']';\n\t $it.schema = $sch;\n\t $it.schemaPath = $schemaPath + '[' + $i + ']';\n\t $it.errSchemaPath = $errSchemaPath + '/' + $i;\n\t $it.errorPath = it.util.getPathExpr(it.errorPath, $i, it.opts.jsonPointers, true);\n\t $it.dataPathArr[$dataNxt] = $i;\n\t var $code = it.validate($it);\n\t if (it.util.varOccurences($code, $nextData) < 2) {\n\t out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' ';\n\t } else {\n\t out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' ';\n\t }\n\t out += ' } ';\n\t if ($breakOnError) {\n\t out += ' if (valid' + ($it.level) + ') { ';\n\t $closingBraces += '}';\n\t }\n\t }\n\t }\n\t }\n\t if (typeof $additionalItems == 'object' && it.util.schemaHasRules($additionalItems, it.RULES.all)) {\n\t $it.schema = $additionalItems;\n\t $it.schemaPath = it.schemaPath + '.additionalItems';\n\t $it.errSchemaPath = it.errSchemaPath + '/additionalItems';\n\t out += ' valid' + ($it.level) + ' = true; if (' + ($data) + '.length > ' + ($schema.length) + ') { for (var i' + ($lvl) + ' = ' + ($schema.length) + '; i' + ($lvl) + ' < ' + ($data) + '.length; i' + ($lvl) + '++) { ';\n\t $it.errorPath = it.util.getPathExpr(it.errorPath, 'i' + $lvl, it.opts.jsonPointers, true);\n\t var $passData = $data + '[i' + $lvl + ']';\n\t $it.dataPathArr[$dataNxt] = 'i' + $lvl;\n\t var $code = it.validate($it);\n\t if (it.util.varOccurences($code, $nextData) < 2) {\n\t out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' ';\n\t } else {\n\t out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' ';\n\t }\n\t if ($breakOnError) {\n\t out += ' if (!valid' + ($it.level) + ') break; ';\n\t }\n\t out += ' } } ';\n\t if ($breakOnError) {\n\t out += ' if (valid' + ($it.level) + ') { ';\n\t $closingBraces += '}';\n\t }\n\t }\n\t } else if (it.util.schemaHasRules($schema, it.RULES.all)) {\n\t $it.schema = $schema;\n\t $it.schemaPath = $schemaPath;\n\t $it.errSchemaPath = $errSchemaPath;\n\t out += ' for (var i' + ($lvl) + ' = ' + (0) + '; i' + ($lvl) + ' < ' + ($data) + '.length; i' + ($lvl) + '++) { ';\n\t $it.errorPath = it.util.getPathExpr(it.errorPath, 'i' + $lvl, it.opts.jsonPointers, true);\n\t var $passData = $data + '[i' + $lvl + ']';\n\t $it.dataPathArr[$dataNxt] = 'i' + $lvl;\n\t var $code = it.validate($it);\n\t if (it.util.varOccurences($code, $nextData) < 2) {\n\t out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' ';\n\t } else {\n\t out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' ';\n\t }\n\t if ($breakOnError) {\n\t out += ' if (!valid' + ($it.level) + ') break; ';\n\t }\n\t out += ' } ';\n\t if ($breakOnError) {\n\t out += ' if (valid' + ($it.level) + ') { ';\n\t $closingBraces += '}';\n\t }\n\t }\n\t if ($breakOnError) {\n\t out += ' ' + ($closingBraces) + ' if (' + ($errs) + ' == errors) {';\n\t }\n\t out = it.util.cleanUpCode(out);\n\t return out;\n\t}\n\t\n\t},{}],24:[function(require,module,exports){\n\t'use strict';\n\tmodule.exports = function generate_multipleOf(it, $keyword) {\n\t var out = ' ';\n\t var $lvl = it.level;\n\t var $dataLvl = it.dataLevel;\n\t var $schema = it.schema[$keyword];\n\t var $schemaPath = it.schemaPath + '.' + $keyword;\n\t var $errSchemaPath = it.errSchemaPath + '/' + $keyword;\n\t var $breakOnError = !it.opts.allErrors;\n\t var $errorKeyword;\n\t var $data = 'data' + ($dataLvl || '');\n\t var $isData = it.opts.v5 && $schema.$data;\n\t var $schemaValue = $isData ? it.util.getData($schema.$data, $dataLvl, it.dataPathArr) : $schema;\n\t if ($isData) {\n\t out += ' var schema' + ($lvl) + ' = ' + ($schemaValue) + '; ';\n\t $schemaValue = 'schema' + $lvl;\n\t }\n\t out += 'var division' + ($lvl) + ';if (';\n\t if ($isData) {\n\t out += ' ' + ($schemaValue) + ' !== undefined && ( typeof ' + ($schemaValue) + ' != \\'number\\' || ';\n\t }\n\t out += ' (division' + ($lvl) + ' = ' + ($data) + ' / ' + ($schemaValue) + ', ';\n\t if (it.opts.multipleOfPrecision) {\n\t out += ' Math.abs(Math.round(division' + ($lvl) + ') - division' + ($lvl) + ') > 1e-' + (it.opts.multipleOfPrecision) + ' ';\n\t } else {\n\t out += ' division' + ($lvl) + ' !== parseInt(division' + ($lvl) + ') ';\n\t }\n\t out += ' ) ';\n\t if ($isData) {\n\t out += ' ) ';\n\t }\n\t out += ' ) { ';\n\t var $$outStack = $$outStack || [];\n\t $$outStack.push(out);\n\t out = ''; /* istanbul ignore else */\n\t if (it.createErrors !== false) {\n\t out += ' { keyword: \\'' + ($errorKeyword || 'multipleOf') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: \"' + ($errSchemaPath) + '\" , params: { multipleOf: ' + ($schemaValue) + ' } ';\n\t if (it.opts.messages !== false) {\n\t out += ' , message: \\'should be multiple of ';\n\t if ($isData) {\n\t out += '\\' + ' + ($schemaValue);\n\t } else {\n\t out += '' + ($schema) + '\\'';\n\t }\n\t }\n\t if (it.opts.verbose) {\n\t out += ' , schema: ';\n\t if ($isData) {\n\t out += 'validate.schema' + ($schemaPath);\n\t } else {\n\t out += '' + ($schema);\n\t }\n\t out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n\t }\n\t out += ' } ';\n\t } else {\n\t out += ' {} ';\n\t }\n\t var __err = out;\n\t out = $$outStack.pop();\n\t if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */\n\t if (it.async) {\n\t out += ' throw new ValidationError([' + (__err) + ']); ';\n\t } else {\n\t out += ' validate.errors = [' + (__err) + ']; return false; ';\n\t }\n\t } else {\n\t out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n\t }\n\t out += '} ';\n\t if ($breakOnError) {\n\t out += ' else { ';\n\t }\n\t return out;\n\t}\n\t\n\t},{}],25:[function(require,module,exports){\n\t'use strict';\n\tmodule.exports = function generate_not(it, $keyword) {\n\t var out = ' ';\n\t var $lvl = it.level;\n\t var $dataLvl = it.dataLevel;\n\t var $schema = it.schema[$keyword];\n\t var $schemaPath = it.schemaPath + '.' + $keyword;\n\t var $errSchemaPath = it.errSchemaPath + '/' + $keyword;\n\t var $breakOnError = !it.opts.allErrors;\n\t var $errorKeyword;\n\t var $data = 'data' + ($dataLvl || '');\n\t var $errs = 'errs__' + $lvl;\n\t var $it = it.util.copy(it);\n\t $it.level++;\n\t if (it.util.schemaHasRules($schema, it.RULES.all)) {\n\t $it.schema = $schema;\n\t $it.schemaPath = $schemaPath;\n\t $it.errSchemaPath = $errSchemaPath;\n\t out += ' var ' + ($errs) + ' = errors; ';\n\t var $wasComposite = it.compositeRule;\n\t it.compositeRule = $it.compositeRule = true;\n\t $it.createErrors = false;\n\t var $allErrorsOption;\n\t if ($it.opts.allErrors) {\n\t $allErrorsOption = $it.opts.allErrors;\n\t $it.opts.allErrors = false;\n\t }\n\t out += ' ' + (it.validate($it)) + ' ';\n\t $it.createErrors = true;\n\t if ($allErrorsOption) $it.opts.allErrors = $allErrorsOption;\n\t it.compositeRule = $it.compositeRule = $wasComposite;\n\t out += ' if (valid' + ($it.level) + ') { ';\n\t var $$outStack = $$outStack || [];\n\t $$outStack.push(out);\n\t out = ''; /* istanbul ignore else */\n\t if (it.createErrors !== false) {\n\t out += ' { keyword: \\'' + ($errorKeyword || 'not') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: \"' + ($errSchemaPath) + '\" , params: {} ';\n\t if (it.opts.messages !== false) {\n\t out += ' , message: \\'should NOT be valid\\' ';\n\t }\n\t if (it.opts.verbose) {\n\t out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n\t }\n\t out += ' } ';\n\t } else {\n\t out += ' {} ';\n\t }\n\t var __err = out;\n\t out = $$outStack.pop();\n\t if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */\n\t if (it.async) {\n\t out += ' throw new ValidationError([' + (__err) + ']); ';\n\t } else {\n\t out += ' validate.errors = [' + (__err) + ']; return false; ';\n\t }\n\t } else {\n\t out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n\t }\n\t out += ' } else { errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } ';\n\t if (it.opts.allErrors) {\n\t out += ' } ';\n\t }\n\t } else {\n\t out += ' var err = '; /* istanbul ignore else */\n\t if (it.createErrors !== false) {\n\t out += ' { keyword: \\'' + ($errorKeyword || 'not') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: \"' + ($errSchemaPath) + '\" , params: {} ';\n\t if (it.opts.messages !== false) {\n\t out += ' , message: \\'should NOT be valid\\' ';\n\t }\n\t if (it.opts.verbose) {\n\t out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n\t }\n\t out += ' } ';\n\t } else {\n\t out += ' {} ';\n\t }\n\t out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n\t if ($breakOnError) {\n\t out += ' if (false) { ';\n\t }\n\t }\n\t return out;\n\t}\n\t\n\t},{}],26:[function(require,module,exports){\n\t'use strict';\n\tmodule.exports = function generate_oneOf(it, $keyword) {\n\t var out = ' ';\n\t var $lvl = it.level;\n\t var $dataLvl = it.dataLevel;\n\t var $schema = it.schema[$keyword];\n\t var $schemaPath = it.schemaPath + '.' + $keyword;\n\t var $errSchemaPath = it.errSchemaPath + '/' + $keyword;\n\t var $breakOnError = !it.opts.allErrors;\n\t var $errorKeyword;\n\t var $data = 'data' + ($dataLvl || '');\n\t var $valid = 'valid' + $lvl;\n\t var $errs = 'errs__' + $lvl;\n\t var $it = it.util.copy(it);\n\t var $closingBraces = '';\n\t $it.level++;\n\t out += 'var ' + ($errs) + ' = errors;var prevValid' + ($lvl) + ' = false;var ' + ($valid) + ' = false; ';\n\t var $wasComposite = it.compositeRule;\n\t it.compositeRule = $it.compositeRule = true;\n\t var arr1 = $schema;\n\t if (arr1) {\n\t var $sch, $i = -1,\n\t l1 = arr1.length - 1;\n\t while ($i < l1) {\n\t $sch = arr1[$i += 1];\n\t if (it.util.schemaHasRules($sch, it.RULES.all)) {\n\t $it.schema = $sch;\n\t $it.schemaPath = $schemaPath + '[' + $i + ']';\n\t $it.errSchemaPath = $errSchemaPath + '/' + $i;\n\t out += ' ' + (it.validate($it)) + ' ';\n\t } else {\n\t out += ' var valid' + ($it.level) + ' = true; ';\n\t }\n\t if ($i) {\n\t out += ' if (valid' + ($it.level) + ' && prevValid' + ($lvl) + ') ' + ($valid) + ' = false; else { ';\n\t $closingBraces += '}';\n\t }\n\t out += ' if (valid' + ($it.level) + ') ' + ($valid) + ' = prevValid' + ($lvl) + ' = true;';\n\t }\n\t }\n\t it.compositeRule = $it.compositeRule = $wasComposite;\n\t out += '' + ($closingBraces) + 'if (!' + ($valid) + ') { ';\n\t var $$outStack = $$outStack || [];\n\t $$outStack.push(out);\n\t out = ''; /* istanbul ignore else */\n\t if (it.createErrors !== false) {\n\t out += ' { keyword: \\'' + ($errorKeyword || 'oneOf') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: \"' + ($errSchemaPath) + '\" , params: {} ';\n\t if (it.opts.messages !== false) {\n\t out += ' , message: \\'should match exactly one schema in oneOf\\' ';\n\t }\n\t if (it.opts.verbose) {\n\t out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n\t }\n\t out += ' } ';\n\t } else {\n\t out += ' {} ';\n\t }\n\t var __err = out;\n\t out = $$outStack.pop();\n\t if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */\n\t if (it.async) {\n\t out += ' throw new ValidationError([' + (__err) + ']); ';\n\t } else {\n\t out += ' validate.errors = [' + (__err) + ']; return false; ';\n\t }\n\t } else {\n\t out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n\t }\n\t out += '} else { errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; }';\n\t if (it.opts.allErrors) {\n\t out += ' } ';\n\t }\n\t return out;\n\t}\n\t\n\t},{}],27:[function(require,module,exports){\n\t'use strict';\n\tmodule.exports = function generate_pattern(it, $keyword) {\n\t var out = ' ';\n\t var $lvl = it.level;\n\t var $dataLvl = it.dataLevel;\n\t var $schema = it.schema[$keyword];\n\t var $schemaPath = it.schemaPath + '.' + $keyword;\n\t var $errSchemaPath = it.errSchemaPath + '/' + $keyword;\n\t var $breakOnError = !it.opts.allErrors;\n\t var $errorKeyword;\n\t var $data = 'data' + ($dataLvl || '');\n\t var $isData = it.opts.v5 && $schema.$data;\n\t var $schemaValue = $isData ? it.util.getData($schema.$data, $dataLvl, it.dataPathArr) : $schema;\n\t if ($isData) {\n\t out += ' var schema' + ($lvl) + ' = ' + ($schemaValue) + '; ';\n\t $schemaValue = 'schema' + $lvl;\n\t }\n\t var $regexp = $isData ? '(new RegExp(' + $schemaValue + '))' : it.usePattern($schema);\n\t out += 'if ( ';\n\t if ($isData) {\n\t out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \\'string\\') || ';\n\t }\n\t out += ' !' + ($regexp) + '.test(' + ($data) + ') ) { ';\n\t var $$outStack = $$outStack || [];\n\t $$outStack.push(out);\n\t out = ''; /* istanbul ignore else */\n\t if (it.createErrors !== false) {\n\t out += ' { keyword: \\'' + ($errorKeyword || 'pattern') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: \"' + ($errSchemaPath) + '\" , params: { pattern: ';\n\t if ($isData) {\n\t out += '' + ($schemaValue);\n\t } else {\n\t out += '' + (it.util.toQuotedString($schema));\n\t }\n\t out += ' } ';\n\t if (it.opts.messages !== false) {\n\t out += ' , message: \\'should match pattern \"';\n\t if ($isData) {\n\t out += '\\' + ' + ($schemaValue) + ' + \\'';\n\t } else {\n\t out += '' + (it.util.escapeQuotes($schema));\n\t }\n\t out += '\"\\' ';\n\t }\n\t if (it.opts.verbose) {\n\t out += ' , schema: ';\n\t if ($isData) {\n\t out += 'validate.schema' + ($schemaPath);\n\t } else {\n\t out += '' + (it.util.toQuotedString($schema));\n\t }\n\t out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n\t }\n\t out += ' } ';\n\t } else {\n\t out += ' {} ';\n\t }\n\t var __err = out;\n\t out = $$outStack.pop();\n\t if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */\n\t if (it.async) {\n\t out += ' throw new ValidationError([' + (__err) + ']); ';\n\t } else {\n\t out += ' validate.errors = [' + (__err) + ']; return false; ';\n\t }\n\t } else {\n\t out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n\t }\n\t out += '} ';\n\t if ($breakOnError) {\n\t out += ' else { ';\n\t }\n\t return out;\n\t}\n\t\n\t},{}],28:[function(require,module,exports){\n\t'use strict';\n\tmodule.exports = function generate_patternRequired(it, $keyword) {\n\t var out = ' ';\n\t var $lvl = it.level;\n\t var $dataLvl = it.dataLevel;\n\t var $schema = it.schema[$keyword];\n\t var $schemaPath = it.schemaPath + '.' + $keyword;\n\t var $errSchemaPath = it.errSchemaPath + '/' + $keyword;\n\t var $breakOnError = !it.opts.allErrors;\n\t var $errorKeyword;\n\t var $data = 'data' + ($dataLvl || '');\n\t var $valid = 'valid' + $lvl;\n\t var $key = 'key' + $lvl,\n\t $matched = 'patternMatched' + $lvl,\n\t $closingBraces = '';\n\t out += 'var ' + ($valid) + ' = true;';\n\t var arr1 = $schema;\n\t if (arr1) {\n\t var $pProperty, i1 = -1,\n\t l1 = arr1.length - 1;\n\t while (i1 < l1) {\n\t $pProperty = arr1[i1 += 1];\n\t out += ' var ' + ($matched) + ' = false; for (var ' + ($key) + ' in ' + ($data) + ') { ' + ($matched) + ' = ' + (it.usePattern($pProperty)) + '.test(' + ($key) + '); if (' + ($matched) + ') break; } ';\n\t var $missingPattern = it.util.escapeQuotes($pProperty);\n\t out += ' if (!' + ($matched) + ') { ' + ($valid) + ' = false; var err = '; /* istanbul ignore else */\n\t if (it.createErrors !== false) {\n\t out += ' { keyword: \\'' + ($errorKeyword || 'patternRequired') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: \"' + ($errSchemaPath) + '\" , params: { missingPattern: \\'' + ($missingPattern) + '\\' } ';\n\t if (it.opts.messages !== false) {\n\t out += ' , message: \\'should have property matching pattern \\\\\\'' + ($missingPattern) + '\\\\\\'\\' ';\n\t }\n\t if (it.opts.verbose) {\n\t out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n\t }\n\t out += ' } ';\n\t } else {\n\t out += ' {} ';\n\t }\n\t out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } ';\n\t if ($breakOnError) {\n\t $closingBraces += '}';\n\t out += ' else { ';\n\t }\n\t }\n\t }\n\t out += '' + ($closingBraces);\n\t return out;\n\t}\n\t\n\t},{}],29:[function(require,module,exports){\n\t'use strict';\n\tmodule.exports = function generate_properties(it, $keyword) {\n\t var out = ' ';\n\t var $lvl = it.level;\n\t var $dataLvl = it.dataLevel;\n\t var $schema = it.schema[$keyword];\n\t var $schemaPath = it.schemaPath + '.' + $keyword;\n\t var $errSchemaPath = it.errSchemaPath + '/' + $keyword;\n\t var $breakOnError = !it.opts.allErrors;\n\t var $errorKeyword;\n\t var $data = 'data' + ($dataLvl || '');\n\t var $valid = 'valid' + $lvl;\n\t var $errs = 'errs__' + $lvl;\n\t var $it = it.util.copy(it);\n\t var $closingBraces = '';\n\t $it.level++;\n\t var $dataNxt = $it.dataLevel = it.dataLevel + 1,\n\t $nextData = 'data' + $dataNxt;\n\t var $schemaKeys = Object.keys($schema || {}),\n\t $pProperties = it.schema.patternProperties || {},\n\t $pPropertyKeys = Object.keys($pProperties),\n\t $aProperties = it.schema.additionalProperties,\n\t $someProperties = $schemaKeys.length || $pPropertyKeys.length,\n\t $noAdditional = $aProperties === false,\n\t $additionalIsSchema = typeof $aProperties == 'object' && Object.keys($aProperties).length,\n\t $removeAdditional = it.opts.removeAdditional,\n\t $checkAdditional = $noAdditional || $additionalIsSchema || $removeAdditional;\n\t var $required = it.schema.required;\n\t if ($required && !(it.opts.v5 && $required.$data) && $required.length < it.opts.loopRequired) var $requiredHash = it.util.toHash($required);\n\t if (it.opts.v5) {\n\t var $pgProperties = it.schema.patternGroups || {},\n\t $pgPropertyKeys = Object.keys($pgProperties);\n\t }\n\t out += 'var ' + ($errs) + ' = errors;var valid' + ($it.level) + ' = true;';\n\t if ($checkAdditional) {\n\t out += ' for (var key' + ($lvl) + ' in ' + ($data) + ') { ';\n\t if ($someProperties) {\n\t out += ' var isAdditional' + ($lvl) + ' = !(false ';\n\t if ($schemaKeys.length) {\n\t if ($schemaKeys.length > 5) {\n\t out += ' || validate.schema' + ($schemaPath) + '[key' + ($lvl) + '] ';\n\t } else {\n\t var arr1 = $schemaKeys;\n\t if (arr1) {\n\t var $propertyKey, i1 = -1,\n\t l1 = arr1.length - 1;\n\t while (i1 < l1) {\n\t $propertyKey = arr1[i1 += 1];\n\t out += ' || key' + ($lvl) + ' == ' + (it.util.toQuotedString($propertyKey)) + ' ';\n\t }\n\t }\n\t }\n\t }\n\t if ($pPropertyKeys.length) {\n\t var arr2 = $pPropertyKeys;\n\t if (arr2) {\n\t var $pProperty, $i = -1,\n\t l2 = arr2.length - 1;\n\t while ($i < l2) {\n\t $pProperty = arr2[$i += 1];\n\t out += ' || ' + (it.usePattern($pProperty)) + '.test(key' + ($lvl) + ') ';\n\t }\n\t }\n\t }\n\t if (it.opts.v5 && $pgPropertyKeys && $pgPropertyKeys.length) {\n\t var arr3 = $pgPropertyKeys;\n\t if (arr3) {\n\t var $pgProperty, $i = -1,\n\t l3 = arr3.length - 1;\n\t while ($i < l3) {\n\t $pgProperty = arr3[$i += 1];\n\t out += ' || ' + (it.usePattern($pgProperty)) + '.test(key' + ($lvl) + ') ';\n\t }\n\t }\n\t }\n\t out += ' ); if (isAdditional' + ($lvl) + ') { ';\n\t }\n\t if ($removeAdditional == 'all') {\n\t out += ' delete ' + ($data) + '[key' + ($lvl) + ']; ';\n\t } else {\n\t var $currentErrorPath = it.errorPath;\n\t var $additionalProperty = '\\' + key' + $lvl + ' + \\'';\n\t if (it.opts._errorDataPathProperty) {\n\t it.errorPath = it.util.getPathExpr(it.errorPath, 'key' + $lvl, it.opts.jsonPointers);\n\t }\n\t if ($noAdditional) {\n\t if ($removeAdditional) {\n\t out += ' delete ' + ($data) + '[key' + ($lvl) + ']; ';\n\t } else {\n\t out += ' valid' + ($it.level) + ' = false; ';\n\t var $currErrSchemaPath = $errSchemaPath;\n\t $errSchemaPath = it.errSchemaPath + '/additionalProperties';\n\t var $$outStack = $$outStack || [];\n\t $$outStack.push(out);\n\t out = ''; /* istanbul ignore else */\n\t if (it.createErrors !== false) {\n\t out += ' { keyword: \\'' + ($errorKeyword || 'additionalProperties') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: \"' + ($errSchemaPath) + '\" , params: { additionalProperty: \\'' + ($additionalProperty) + '\\' } ';\n\t if (it.opts.messages !== false) {\n\t out += ' , message: \\'should NOT have additional properties\\' ';\n\t }\n\t if (it.opts.verbose) {\n\t out += ' , schema: false , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n\t }\n\t out += ' } ';\n\t } else {\n\t out += ' {} ';\n\t }\n\t var __err = out;\n\t out = $$outStack.pop();\n\t if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */\n\t if (it.async) {\n\t out += ' throw new ValidationError([' + (__err) + ']); ';\n\t } else {\n\t out += ' validate.errors = [' + (__err) + ']; return false; ';\n\t }\n\t } else {\n\t out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n\t }\n\t $errSchemaPath = $currErrSchemaPath;\n\t if ($breakOnError) {\n\t out += ' break; ';\n\t }\n\t }\n\t } else if ($additionalIsSchema) {\n\t if ($removeAdditional == 'failing') {\n\t out += ' var ' + ($errs) + ' = errors; ';\n\t var $wasComposite = it.compositeRule;\n\t it.compositeRule = $it.compositeRule = true;\n\t $it.schema = $aProperties;\n\t $it.schemaPath = it.schemaPath + '.additionalProperties';\n\t $it.errSchemaPath = it.errSchemaPath + '/additionalProperties';\n\t $it.errorPath = it.opts._errorDataPathProperty ? it.errorPath : it.util.getPathExpr(it.errorPath, 'key' + $lvl, it.opts.jsonPointers);\n\t var $passData = $data + '[key' + $lvl + ']';\n\t $it.dataPathArr[$dataNxt] = 'key' + $lvl;\n\t var $code = it.validate($it);\n\t if (it.util.varOccurences($code, $nextData) < 2) {\n\t out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' ';\n\t } else {\n\t out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' ';\n\t }\n\t out += ' if (!valid' + ($it.level) + ') { errors = ' + ($errs) + '; if (validate.errors !== null) { if (errors) validate.errors.length = errors; else validate.errors = null; } delete ' + ($data) + '[key' + ($lvl) + ']; } ';\n\t it.compositeRule = $it.compositeRule = $wasComposite;\n\t } else {\n\t $it.schema = $aProperties;\n\t $it.schemaPath = it.schemaPath + '.additionalProperties';\n\t $it.errSchemaPath = it.errSchemaPath + '/additionalProperties';\n\t $it.errorPath = it.opts._errorDataPathProperty ? it.errorPath : it.util.getPathExpr(it.errorPath, 'key' + $lvl, it.opts.jsonPointers);\n\t var $passData = $data + '[key' + $lvl + ']';\n\t $it.dataPathArr[$dataNxt] = 'key' + $lvl;\n\t var $code = it.validate($it);\n\t if (it.util.varOccurences($code, $nextData) < 2) {\n\t out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' ';\n\t } else {\n\t out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' ';\n\t }\n\t if ($breakOnError) {\n\t out += ' if (!valid' + ($it.level) + ') break; ';\n\t }\n\t }\n\t }\n\t it.errorPath = $currentErrorPath;\n\t }\n\t if ($someProperties) {\n\t out += ' } ';\n\t }\n\t out += ' } ';\n\t if ($breakOnError) {\n\t out += ' if (valid' + ($it.level) + ') { ';\n\t $closingBraces += '}';\n\t }\n\t }\n\t var $useDefaults = it.opts.useDefaults && !it.compositeRule;\n\t if ($schemaKeys.length) {\n\t var arr4 = $schemaKeys;\n\t if (arr4) {\n\t var $propertyKey, i4 = -1,\n\t l4 = arr4.length - 1;\n\t while (i4 < l4) {\n\t $propertyKey = arr4[i4 += 1];\n\t var $sch = $schema[$propertyKey];\n\t if (it.util.schemaHasRules($sch, it.RULES.all)) {\n\t var $prop = it.util.getProperty($propertyKey),\n\t $passData = $data + $prop,\n\t $hasDefault = $useDefaults && $sch.default !== undefined;\n\t $it.schema = $sch;\n\t $it.schemaPath = $schemaPath + $prop;\n\t $it.errSchemaPath = $errSchemaPath + '/' + it.util.escapeFragment($propertyKey);\n\t $it.errorPath = it.util.getPath(it.errorPath, $propertyKey, it.opts.jsonPointers);\n\t $it.dataPathArr[$dataNxt] = it.util.toQuotedString($propertyKey);\n\t var $code = it.validate($it);\n\t if (it.util.varOccurences($code, $nextData) < 2) {\n\t $code = it.util.varReplace($code, $nextData, $passData);\n\t var $useData = $passData;\n\t } else {\n\t var $useData = $nextData;\n\t out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ';\n\t }\n\t if ($hasDefault) {\n\t out += ' ' + ($code) + ' ';\n\t } else {\n\t if ($requiredHash && $requiredHash[$propertyKey]) {\n\t out += ' if (' + ($useData) + ' === undefined) { valid' + ($it.level) + ' = false; ';\n\t var $currentErrorPath = it.errorPath,\n\t $currErrSchemaPath = $errSchemaPath,\n\t $missingProperty = it.util.escapeQuotes($propertyKey);\n\t if (it.opts._errorDataPathProperty) {\n\t it.errorPath = it.util.getPath($currentErrorPath, $propertyKey, it.opts.jsonPointers);\n\t }\n\t $errSchemaPath = it.errSchemaPath + '/required';\n\t var $$outStack = $$outStack || [];\n\t $$outStack.push(out);\n\t out = ''; /* istanbul ignore else */\n\t if (it.createErrors !== false) {\n\t out += ' { keyword: \\'' + ($errorKeyword || 'required') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: \"' + ($errSchemaPath) + '\" , params: { missingProperty: \\'' + ($missingProperty) + '\\' } ';\n\t if (it.opts.messages !== false) {\n\t out += ' , message: \\'';\n\t if (it.opts._errorDataPathProperty) {\n\t out += 'is a required property';\n\t } else {\n\t out += 'should have required property \\\\\\'' + ($missingProperty) + '\\\\\\'';\n\t }\n\t out += '\\' ';\n\t }\n\t if (it.opts.verbose) {\n\t out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n\t }\n\t out += ' } ';\n\t } else {\n\t out += ' {} ';\n\t }\n\t var __err = out;\n\t out = $$outStack.pop();\n\t if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */\n\t if (it.async) {\n\t out += ' throw new ValidationError([' + (__err) + ']); ';\n\t } else {\n\t out += ' validate.errors = [' + (__err) + ']; return false; ';\n\t }\n\t } else {\n\t out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n\t }\n\t $errSchemaPath = $currErrSchemaPath;\n\t it.errorPath = $currentErrorPath;\n\t out += ' } else { ';\n\t } else {\n\t if ($breakOnError) {\n\t out += ' if (' + ($useData) + ' === undefined) { valid' + ($it.level) + ' = true; } else { ';\n\t } else {\n\t out += ' if (' + ($useData) + ' !== undefined) { ';\n\t }\n\t }\n\t out += ' ' + ($code) + ' } ';\n\t }\n\t }\n\t if ($breakOnError) {\n\t out += ' if (valid' + ($it.level) + ') { ';\n\t $closingBraces += '}';\n\t }\n\t }\n\t }\n\t }\n\t var arr5 = $pPropertyKeys;\n\t if (arr5) {\n\t var $pProperty, i5 = -1,\n\t l5 = arr5.length - 1;\n\t while (i5 < l5) {\n\t $pProperty = arr5[i5 += 1];\n\t var $sch = $pProperties[$pProperty];\n\t if (it.util.schemaHasRules($sch, it.RULES.all)) {\n\t $it.schema = $sch;\n\t $it.schemaPath = it.schemaPath + '.patternProperties' + it.util.getProperty($pProperty);\n\t $it.errSchemaPath = it.errSchemaPath + '/patternProperties/' + it.util.escapeFragment($pProperty);\n\t out += ' for (var key' + ($lvl) + ' in ' + ($data) + ') { if (' + (it.usePattern($pProperty)) + '.test(key' + ($lvl) + ')) { ';\n\t $it.errorPath = it.util.getPathExpr(it.errorPath, 'key' + $lvl, it.opts.jsonPointers);\n\t var $passData = $data + '[key' + $lvl + ']';\n\t $it.dataPathArr[$dataNxt] = 'key' + $lvl;\n\t var $code = it.validate($it);\n\t if (it.util.varOccurences($code, $nextData) < 2) {\n\t out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' ';\n\t } else {\n\t out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' ';\n\t }\n\t if ($breakOnError) {\n\t out += ' if (!valid' + ($it.level) + ') break; ';\n\t }\n\t out += ' } ';\n\t if ($breakOnError) {\n\t out += ' else valid' + ($it.level) + ' = true; ';\n\t }\n\t out += ' } ';\n\t if ($breakOnError) {\n\t out += ' if (valid' + ($it.level) + ') { ';\n\t $closingBraces += '}';\n\t }\n\t }\n\t }\n\t }\n\t if (it.opts.v5) {\n\t var arr6 = $pgPropertyKeys;\n\t if (arr6) {\n\t var $pgProperty, i6 = -1,\n\t l6 = arr6.length - 1;\n\t while (i6 < l6) {\n\t $pgProperty = arr6[i6 += 1];\n\t var $pgSchema = $pgProperties[$pgProperty],\n\t $sch = $pgSchema.schema;\n\t if (it.util.schemaHasRules($sch, it.RULES.all)) {\n\t $it.schema = $sch;\n\t $it.schemaPath = it.schemaPath + '.patternGroups' + it.util.getProperty($pgProperty) + '.schema';\n\t $it.errSchemaPath = it.errSchemaPath + '/patternGroups/' + it.util.escapeFragment($pgProperty) + '/schema';\n\t out += ' var pgPropCount' + ($lvl) + ' = 0; for (var key' + ($lvl) + ' in ' + ($data) + ') { if (' + (it.usePattern($pgProperty)) + '.test(key' + ($lvl) + ')) { pgPropCount' + ($lvl) + '++; ';\n\t $it.errorPath = it.util.getPathExpr(it.errorPath, 'key' + $lvl, it.opts.jsonPointers);\n\t var $passData = $data + '[key' + $lvl + ']';\n\t $it.dataPathArr[$dataNxt] = 'key' + $lvl;\n\t var $code = it.validate($it);\n\t if (it.util.varOccurences($code, $nextData) < 2) {\n\t out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' ';\n\t } else {\n\t out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' ';\n\t }\n\t if ($breakOnError) {\n\t out += ' if (!valid' + ($it.level) + ') break; ';\n\t }\n\t out += ' } ';\n\t if ($breakOnError) {\n\t out += ' else valid' + ($it.level) + ' = true; ';\n\t }\n\t out += ' } ';\n\t if ($breakOnError) {\n\t out += ' if (valid' + ($it.level) + ') { ';\n\t $closingBraces += '}';\n\t }\n\t var $pgMin = $pgSchema.minimum,\n\t $pgMax = $pgSchema.maximum;\n\t if ($pgMin !== undefined || $pgMax !== undefined) {\n\t out += ' var ' + ($valid) + ' = true; ';\n\t var $currErrSchemaPath = $errSchemaPath;\n\t if ($pgMin !== undefined) {\n\t var $limit = $pgMin,\n\t $reason = 'minimum',\n\t $moreOrLess = 'less';\n\t out += ' ' + ($valid) + ' = pgPropCount' + ($lvl) + ' >= ' + ($pgMin) + '; ';\n\t $errSchemaPath = it.errSchemaPath + '/patternGroups/minimum';\n\t out += ' if (!' + ($valid) + ') { ';\n\t var $$outStack = $$outStack || [];\n\t $$outStack.push(out);\n\t out = ''; /* istanbul ignore else */\n\t if (it.createErrors !== false) {\n\t out += ' { keyword: \\'' + ($errorKeyword || 'patternGroups') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: \"' + ($errSchemaPath) + '\" , params: { reason: \\'' + ($reason) + '\\', limit: ' + ($limit) + ', pattern: \\'' + (it.util.escapeQuotes($pgProperty)) + '\\' } ';\n\t if (it.opts.messages !== false) {\n\t out += ' , message: \\'should NOT have ' + ($moreOrLess) + ' than ' + ($limit) + ' properties matching pattern \"' + (it.util.escapeQuotes($pgProperty)) + '\"\\' ';\n\t }\n\t if (it.opts.verbose) {\n\t out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n\t }\n\t out += ' } ';\n\t } else {\n\t out += ' {} ';\n\t }\n\t var __err = out;\n\t out = $$outStack.pop();\n\t if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */\n\t if (it.async) {\n\t out += ' throw new ValidationError([' + (__err) + ']); ';\n\t } else {\n\t out += ' validate.errors = [' + (__err) + ']; return false; ';\n\t }\n\t } else {\n\t out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n\t }\n\t out += ' } ';\n\t if ($pgMax !== undefined) {\n\t out += ' else ';\n\t }\n\t }\n\t if ($pgMax !== undefined) {\n\t var $limit = $pgMax,\n\t $reason = 'maximum',\n\t $moreOrLess = 'more';\n\t out += ' ' + ($valid) + ' = pgPropCount' + ($lvl) + ' <= ' + ($pgMax) + '; ';\n\t $errSchemaPath = it.errSchemaPath + '/patternGroups/maximum';\n\t out += ' if (!' + ($valid) + ') { ';\n\t var $$outStack = $$outStack || [];\n\t $$outStack.push(out);\n\t out = ''; /* istanbul ignore else */\n\t if (it.createErrors !== false) {\n\t out += ' { keyword: \\'' + ($errorKeyword || 'patternGroups') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: \"' + ($errSchemaPath) + '\" , params: { reason: \\'' + ($reason) + '\\', limit: ' + ($limit) + ', pattern: \\'' + (it.util.escapeQuotes($pgProperty)) + '\\' } ';\n\t if (it.opts.messages !== false) {\n\t out += ' , message: \\'should NOT have ' + ($moreOrLess) + ' than ' + ($limit) + ' properties matching pattern \"' + (it.util.escapeQuotes($pgProperty)) + '\"\\' ';\n\t }\n\t if (it.opts.verbose) {\n\t out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n\t }\n\t out += ' } ';\n\t } else {\n\t out += ' {} ';\n\t }\n\t var __err = out;\n\t out = $$outStack.pop();\n\t if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */\n\t if (it.async) {\n\t out += ' throw new ValidationError([' + (__err) + ']); ';\n\t } else {\n\t out += ' validate.errors = [' + (__err) + ']; return false; ';\n\t }\n\t } else {\n\t out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n\t }\n\t out += ' } ';\n\t }\n\t $errSchemaPath = $currErrSchemaPath;\n\t if ($breakOnError) {\n\t out += ' if (' + ($valid) + ') { ';\n\t $closingBraces += '}';\n\t }\n\t }\n\t }\n\t }\n\t }\n\t }\n\t if ($breakOnError) {\n\t out += ' ' + ($closingBraces) + ' if (' + ($errs) + ' == errors) {';\n\t }\n\t out = it.util.cleanUpCode(out);\n\t return out;\n\t}\n\t\n\t},{}],30:[function(require,module,exports){\n\t'use strict';\n\tmodule.exports = function generate_ref(it, $keyword) {\n\t var out = ' ';\n\t var $lvl = it.level;\n\t var $dataLvl = it.dataLevel;\n\t var $schema = it.schema[$keyword];\n\t var $errSchemaPath = it.errSchemaPath + '/' + $keyword;\n\t var $breakOnError = !it.opts.allErrors;\n\t var $errorKeyword;\n\t var $data = 'data' + ($dataLvl || '');\n\t var $valid = 'valid' + $lvl;\n\t var $async, $refCode;\n\t if ($schema == '#' || $schema == '#/') {\n\t if (it.isRoot) {\n\t $async = it.async;\n\t $refCode = 'validate';\n\t } else {\n\t $async = it.root.schema.$async === true;\n\t $refCode = 'root.refVal[0]';\n\t }\n\t } else {\n\t var $refVal = it.resolveRef(it.baseId, $schema, it.isRoot);\n\t if ($refVal === undefined) {\n\t var $message = 'can\\'t resolve reference ' + $schema + ' from id ' + it.baseId;\n\t if (it.opts.missingRefs == 'fail') {\n\t console.log($message);\n\t var $$outStack = $$outStack || [];\n\t $$outStack.push(out);\n\t out = ''; /* istanbul ignore else */\n\t if (it.createErrors !== false) {\n\t out += ' { keyword: \\'' + ($errorKeyword || '$ref') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: \"' + ($errSchemaPath) + '\" , params: { ref: \\'' + (it.util.escapeQuotes($schema)) + '\\' } ';\n\t if (it.opts.messages !== false) {\n\t out += ' , message: \\'can\\\\\\'t resolve reference ' + (it.util.escapeQuotes($schema)) + '\\' ';\n\t }\n\t if (it.opts.verbose) {\n\t out += ' , schema: ' + (it.util.toQuotedString($schema)) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n\t }\n\t out += ' } ';\n\t } else {\n\t out += ' {} ';\n\t }\n\t var __err = out;\n\t out = $$outStack.pop();\n\t if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */\n\t if (it.async) {\n\t out += ' throw new ValidationError([' + (__err) + ']); ';\n\t } else {\n\t out += ' validate.errors = [' + (__err) + ']; return false; ';\n\t }\n\t } else {\n\t out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n\t }\n\t if ($breakOnError) {\n\t out += ' if (false) { ';\n\t }\n\t } else if (it.opts.missingRefs == 'ignore') {\n\t console.log($message);\n\t if ($breakOnError) {\n\t out += ' if (true) { ';\n\t }\n\t } else {\n\t var $error = new Error($message);\n\t $error.missingRef = it.resolve.url(it.baseId, $schema);\n\t $error.missingSchema = it.resolve.normalizeId(it.resolve.fullPath($error.missingRef));\n\t throw $error;\n\t }\n\t } else if ($refVal.inline) {\n\t var $it = it.util.copy(it);\n\t $it.level++;\n\t $it.schema = $refVal.schema;\n\t $it.schemaPath = '';\n\t $it.errSchemaPath = $schema;\n\t var $code = it.validate($it).replace(/validate\\.schema/g, $refVal.code);\n\t out += ' ' + ($code) + ' ';\n\t if ($breakOnError) {\n\t out += ' if (valid' + ($it.level) + ') { ';\n\t }\n\t } else {\n\t $async = $refVal.async;\n\t $refCode = $refVal.code;\n\t }\n\t }\n\t if ($refCode) {\n\t var $$outStack = $$outStack || [];\n\t $$outStack.push(out);\n\t out = '';\n\t if (it.opts.passContext) {\n\t out += ' ' + ($refCode) + '.call(this, ';\n\t } else {\n\t out += ' ' + ($refCode) + '( ';\n\t }\n\t out += ' ' + ($data) + ', (dataPath || \\'\\')';\n\t if (it.errorPath != '\"\"') {\n\t out += ' + ' + (it.errorPath);\n\t }\n\t if ($dataLvl) {\n\t out += ' , data' + (($dataLvl - 1) || '') + ' , ' + (it.dataPathArr[$dataLvl]) + ' ';\n\t } else {\n\t out += ' , parentData , parentDataProperty ';\n\t }\n\t out += ') ';\n\t var __callValidate = out;\n\t out = $$outStack.pop();\n\t if ($async) {\n\t if (!it.async) throw new Error('async schema referenced by sync schema');\n\t out += ' try { ';\n\t if ($breakOnError) {\n\t out += 'var ' + ($valid) + ' =';\n\t }\n\t out += ' ' + (it.yieldAwait) + ' ' + (__callValidate) + '; } catch (e) { if (!(e instanceof ValidationError)) throw e; if (vErrors === null) vErrors = e.errors; else vErrors = vErrors.concat(e.errors); errors = vErrors.length; } ';\n\t if ($breakOnError) {\n\t out += ' if (' + ($valid) + ') { ';\n\t }\n\t } else {\n\t out += ' if (!' + (__callValidate) + ') { if (vErrors === null) vErrors = ' + ($refCode) + '.errors; else vErrors = vErrors.concat(' + ($refCode) + '.errors); errors = vErrors.length; } ';\n\t if ($breakOnError) {\n\t out += ' else { ';\n\t }\n\t }\n\t }\n\t return out;\n\t}\n\t\n\t},{}],31:[function(require,module,exports){\n\t'use strict';\n\tmodule.exports = function generate_required(it, $keyword) {\n\t var out = ' ';\n\t var $lvl = it.level;\n\t var $dataLvl = it.dataLevel;\n\t var $schema = it.schema[$keyword];\n\t var $schemaPath = it.schemaPath + '.' + $keyword;\n\t var $errSchemaPath = it.errSchemaPath + '/' + $keyword;\n\t var $breakOnError = !it.opts.allErrors;\n\t var $errorKeyword;\n\t var $data = 'data' + ($dataLvl || '');\n\t var $valid = 'valid' + $lvl;\n\t var $isData = it.opts.v5 && $schema.$data;\n\t var $schemaValue = $isData ? it.util.getData($schema.$data, $dataLvl, it.dataPathArr) : $schema;\n\t if ($isData) {\n\t out += ' var schema' + ($lvl) + ' = ' + ($schemaValue) + '; ';\n\t $schemaValue = 'schema' + $lvl;\n\t }\n\t if (!$isData) {\n\t if ($schema.length < it.opts.loopRequired && it.schema.properties && Object.keys(it.schema.properties).length) {\n\t var $required = [];\n\t var arr1 = $schema;\n\t if (arr1) {\n\t var $property, i1 = -1,\n\t l1 = arr1.length - 1;\n\t while (i1 < l1) {\n\t $property = arr1[i1 += 1];\n\t var $propertySch = it.schema.properties[$property];\n\t if (!($propertySch && it.util.schemaHasRules($propertySch, it.RULES.all))) {\n\t $required[$required.length] = $property;\n\t }\n\t }\n\t }\n\t } else {\n\t var $required = $schema;\n\t }\n\t }\n\t if ($isData || $required.length) {\n\t var $currentErrorPath = it.errorPath,\n\t $loopRequired = $isData || $required.length >= it.opts.loopRequired;\n\t if ($breakOnError) {\n\t out += ' var missing' + ($lvl) + '; ';\n\t if ($loopRequired) {\n\t if (!$isData) {\n\t out += ' var schema' + ($lvl) + ' = validate.schema' + ($schemaPath) + '; ';\n\t }\n\t var $i = 'i' + $lvl,\n\t $propertyPath = 'schema' + $lvl + '[' + $i + ']',\n\t $missingProperty = '\\' + ' + $propertyPath + ' + \\'';\n\t if (it.opts._errorDataPathProperty) {\n\t it.errorPath = it.util.getPathExpr($currentErrorPath, $propertyPath, it.opts.jsonPointers);\n\t }\n\t out += ' var ' + ($valid) + ' = true; ';\n\t if ($isData) {\n\t out += ' if (schema' + ($lvl) + ' === undefined) ' + ($valid) + ' = true; else if (!Array.isArray(schema' + ($lvl) + ')) ' + ($valid) + ' = false; else {';\n\t }\n\t out += ' for (var ' + ($i) + ' = 0; ' + ($i) + ' < schema' + ($lvl) + '.length; ' + ($i) + '++) { ' + ($valid) + ' = ' + ($data) + '[schema' + ($lvl) + '[' + ($i) + ']] !== undefined; if (!' + ($valid) + ') break; } ';\n\t if ($isData) {\n\t out += ' } ';\n\t }\n\t out += ' if (!' + ($valid) + ') { ';\n\t var $$outStack = $$outStack || [];\n\t $$outStack.push(out);\n\t out = ''; /* istanbul ignore else */\n\t if (it.createErrors !== false) {\n\t out += ' { keyword: \\'' + ($errorKeyword || 'required') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: \"' + ($errSchemaPath) + '\" , params: { missingProperty: \\'' + ($missingProperty) + '\\' } ';\n\t if (it.opts.messages !== false) {\n\t out += ' , message: \\'';\n\t if (it.opts._errorDataPathProperty) {\n\t out += 'is a required property';\n\t } else {\n\t out += 'should have required property \\\\\\'' + ($missingProperty) + '\\\\\\'';\n\t }\n\t out += '\\' ';\n\t }\n\t if (it.opts.verbose) {\n\t out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n\t }\n\t out += ' } ';\n\t } else {\n\t out += ' {} ';\n\t }\n\t var __err = out;\n\t out = $$outStack.pop();\n\t if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */\n\t if (it.async) {\n\t out += ' throw new ValidationError([' + (__err) + ']); ';\n\t } else {\n\t out += ' validate.errors = [' + (__err) + ']; return false; ';\n\t }\n\t } else {\n\t out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n\t }\n\t out += ' } else { ';\n\t } else {\n\t out += ' if ( ';\n\t var arr2 = $required;\n\t if (arr2) {\n\t var _$property, $i = -1,\n\t l2 = arr2.length - 1;\n\t while ($i < l2) {\n\t _$property = arr2[$i += 1];\n\t if ($i) {\n\t out += ' || ';\n\t }\n\t var $prop = it.util.getProperty(_$property);\n\t out += ' ( ' + ($data) + ($prop) + ' === undefined && (missing' + ($lvl) + ' = ' + (it.util.toQuotedString(it.opts.jsonPointers ? _$property : $prop)) + ') ) ';\n\t }\n\t }\n\t out += ') { ';\n\t var $propertyPath = 'missing' + $lvl,\n\t $missingProperty = '\\' + ' + $propertyPath + ' + \\'';\n\t if (it.opts._errorDataPathProperty) {\n\t it.errorPath = it.opts.jsonPointers ? it.util.getPathExpr($currentErrorPath, $propertyPath, true) : $currentErrorPath + ' + ' + $propertyPath;\n\t }\n\t var $$outStack = $$outStack || [];\n\t $$outStack.push(out);\n\t out = ''; /* istanbul ignore else */\n\t if (it.createErrors !== false) {\n\t out += ' { keyword: \\'' + ($errorKeyword || 'required') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: \"' + ($errSchemaPath) + '\" , params: { missingProperty: \\'' + ($missingProperty) + '\\' } ';\n\t if (it.opts.messages !== false) {\n\t out += ' , message: \\'';\n\t if (it.opts._errorDataPathProperty) {\n\t out += 'is a required property';\n\t } else {\n\t out += 'should have required property \\\\\\'' + ($missingProperty) + '\\\\\\'';\n\t }\n\t out += '\\' ';\n\t }\n\t if (it.opts.verbose) {\n\t out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n\t }\n\t out += ' } ';\n\t } else {\n\t out += ' {} ';\n\t }\n\t var __err = out;\n\t out = $$outStack.pop();\n\t if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */\n\t if (it.async) {\n\t out += ' throw new ValidationError([' + (__err) + ']); ';\n\t } else {\n\t out += ' validate.errors = [' + (__err) + ']; return false; ';\n\t }\n\t } else {\n\t out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n\t }\n\t out += ' } else { ';\n\t }\n\t } else {\n\t if ($loopRequired) {\n\t if (!$isData) {\n\t out += ' var schema' + ($lvl) + ' = validate.schema' + ($schemaPath) + '; ';\n\t }\n\t var $i = 'i' + $lvl,\n\t $propertyPath = 'schema' + $lvl + '[' + $i + ']',\n\t $missingProperty = '\\' + ' + $propertyPath + ' + \\'';\n\t if (it.opts._errorDataPathProperty) {\n\t it.errorPath = it.util.getPathExpr($currentErrorPath, $propertyPath, it.opts.jsonPointers);\n\t }\n\t if ($isData) {\n\t out += ' if (schema' + ($lvl) + ' && !Array.isArray(schema' + ($lvl) + ')) { var err = '; /* istanbul ignore else */\n\t if (it.createErrors !== false) {\n\t out += ' { keyword: \\'' + ($errorKeyword || 'required') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: \"' + ($errSchemaPath) + '\" , params: { missingProperty: \\'' + ($missingProperty) + '\\' } ';\n\t if (it.opts.messages !== false) {\n\t out += ' , message: \\'';\n\t if (it.opts._errorDataPathProperty) {\n\t out += 'is a required property';\n\t } else {\n\t out += 'should have required property \\\\\\'' + ($missingProperty) + '\\\\\\'';\n\t }\n\t out += '\\' ';\n\t }\n\t if (it.opts.verbose) {\n\t out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n\t }\n\t out += ' } ';\n\t } else {\n\t out += ' {} ';\n\t }\n\t out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } else if (schema' + ($lvl) + ' !== undefined) { ';\n\t }\n\t out += ' for (var ' + ($i) + ' = 0; ' + ($i) + ' < schema' + ($lvl) + '.length; ' + ($i) + '++) { if (' + ($data) + '[schema' + ($lvl) + '[' + ($i) + ']] === undefined) { var err = '; /* istanbul ignore else */\n\t if (it.createErrors !== false) {\n\t out += ' { keyword: \\'' + ($errorKeyword || 'required') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: \"' + ($errSchemaPath) + '\" , params: { missingProperty: \\'' + ($missingProperty) + '\\' } ';\n\t if (it.opts.messages !== false) {\n\t out += ' , message: \\'';\n\t if (it.opts._errorDataPathProperty) {\n\t out += 'is a required property';\n\t } else {\n\t out += 'should have required property \\\\\\'' + ($missingProperty) + '\\\\\\'';\n\t }\n\t out += '\\' ';\n\t }\n\t if (it.opts.verbose) {\n\t out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n\t }\n\t out += ' } ';\n\t } else {\n\t out += ' {} ';\n\t }\n\t out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } } ';\n\t if ($isData) {\n\t out += ' } ';\n\t }\n\t } else {\n\t var arr3 = $required;\n\t if (arr3) {\n\t var $property, $i = -1,\n\t l3 = arr3.length - 1;\n\t while ($i < l3) {\n\t $property = arr3[$i += 1];\n\t var $prop = it.util.getProperty($property),\n\t $missingProperty = it.util.escapeQuotes($property);\n\t if (it.opts._errorDataPathProperty) {\n\t it.errorPath = it.util.getPath($currentErrorPath, $property, it.opts.jsonPointers);\n\t }\n\t out += ' if (' + ($data) + ($prop) + ' === undefined) { var err = '; /* istanbul ignore else */\n\t if (it.createErrors !== false) {\n\t out += ' { keyword: \\'' + ($errorKeyword || 'required') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: \"' + ($errSchemaPath) + '\" , params: { missingProperty: \\'' + ($missingProperty) + '\\' } ';\n\t if (it.opts.messages !== false) {\n\t out += ' , message: \\'';\n\t if (it.opts._errorDataPathProperty) {\n\t out += 'is a required property';\n\t } else {\n\t out += 'should have required property \\\\\\'' + ($missingProperty) + '\\\\\\'';\n\t }\n\t out += '\\' ';\n\t }\n\t if (it.opts.verbose) {\n\t out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n\t }\n\t out += ' } ';\n\t } else {\n\t out += ' {} ';\n\t }\n\t out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } ';\n\t }\n\t }\n\t }\n\t }\n\t it.errorPath = $currentErrorPath;\n\t } else if ($breakOnError) {\n\t out += ' if (true) {';\n\t }\n\t return out;\n\t}\n\t\n\t},{}],32:[function(require,module,exports){\n\t'use strict';\n\tmodule.exports = function generate_switch(it, $keyword) {\n\t var out = ' ';\n\t var $lvl = it.level;\n\t var $dataLvl = it.dataLevel;\n\t var $schema = it.schema[$keyword];\n\t var $schemaPath = it.schemaPath + '.' + $keyword;\n\t var $errSchemaPath = it.errSchemaPath + '/' + $keyword;\n\t var $breakOnError = !it.opts.allErrors;\n\t var $errorKeyword;\n\t var $data = 'data' + ($dataLvl || '');\n\t var $valid = 'valid' + $lvl;\n\t var $errs = 'errs__' + $lvl;\n\t var $it = it.util.copy(it);\n\t var $closingBraces = '';\n\t $it.level++;\n\t var $ifPassed = 'ifPassed' + it.level,\n\t $shouldContinue;\n\t out += 'var ' + ($ifPassed) + ';';\n\t var arr1 = $schema;\n\t if (arr1) {\n\t var $sch, $caseIndex = -1,\n\t l1 = arr1.length - 1;\n\t while ($caseIndex < l1) {\n\t $sch = arr1[$caseIndex += 1];\n\t if ($caseIndex && !$shouldContinue) {\n\t out += ' if (!' + ($ifPassed) + ') { ';\n\t $closingBraces += '}';\n\t }\n\t if ($sch.if && it.util.schemaHasRules($sch.if, it.RULES.all)) {\n\t out += ' var ' + ($errs) + ' = errors; ';\n\t var $wasComposite = it.compositeRule;\n\t it.compositeRule = $it.compositeRule = true;\n\t $it.createErrors = false;\n\t $it.schema = $sch.if;\n\t $it.schemaPath = $schemaPath + '[' + $caseIndex + '].if';\n\t $it.errSchemaPath = $errSchemaPath + '/' + $caseIndex + '/if';\n\t out += ' ' + (it.validate($it)) + ' ';\n\t $it.createErrors = true;\n\t it.compositeRule = $it.compositeRule = $wasComposite;\n\t out += ' ' + ($ifPassed) + ' = valid' + ($it.level) + '; if (' + ($ifPassed) + ') { ';\n\t if (typeof $sch.then == 'boolean') {\n\t if ($sch.then === false) {\n\t var $$outStack = $$outStack || [];\n\t $$outStack.push(out);\n\t out = ''; /* istanbul ignore else */\n\t if (it.createErrors !== false) {\n\t out += ' { keyword: \\'' + ($errorKeyword || 'switch') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: \"' + ($errSchemaPath) + '\" , params: { caseIndex: ' + ($caseIndex) + ' } ';\n\t if (it.opts.messages !== false) {\n\t out += ' , message: \\'should pass \"switch\" keyword validation\\' ';\n\t }\n\t if (it.opts.verbose) {\n\t out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n\t }\n\t out += ' } ';\n\t } else {\n\t out += ' {} ';\n\t }\n\t var __err = out;\n\t out = $$outStack.pop();\n\t if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */\n\t if (it.async) {\n\t out += ' throw new ValidationError([' + (__err) + ']); ';\n\t } else {\n\t out += ' validate.errors = [' + (__err) + ']; return false; ';\n\t }\n\t } else {\n\t out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n\t }\n\t }\n\t out += ' var valid' + ($it.level) + ' = ' + ($sch.then) + '; ';\n\t } else {\n\t $it.schema = $sch.then;\n\t $it.schemaPath = $schemaPath + '[' + $caseIndex + '].then';\n\t $it.errSchemaPath = $errSchemaPath + '/' + $caseIndex + '/then';\n\t out += ' ' + (it.validate($it)) + ' ';\n\t }\n\t out += ' } else { errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } } ';\n\t } else {\n\t out += ' ' + ($ifPassed) + ' = true; ';\n\t if (typeof $sch.then == 'boolean') {\n\t if ($sch.then === false) {\n\t var $$outStack = $$outStack || [];\n\t $$outStack.push(out);\n\t out = ''; /* istanbul ignore else */\n\t if (it.createErrors !== false) {\n\t out += ' { keyword: \\'' + ($errorKeyword || 'switch') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: \"' + ($errSchemaPath) + '\" , params: { caseIndex: ' + ($caseIndex) + ' } ';\n\t if (it.opts.messages !== false) {\n\t out += ' , message: \\'should pass \"switch\" keyword validation\\' ';\n\t }\n\t if (it.opts.verbose) {\n\t out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n\t }\n\t out += ' } ';\n\t } else {\n\t out += ' {} ';\n\t }\n\t var __err = out;\n\t out = $$outStack.pop();\n\t if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */\n\t if (it.async) {\n\t out += ' throw new ValidationError([' + (__err) + ']); ';\n\t } else {\n\t out += ' validate.errors = [' + (__err) + ']; return false; ';\n\t }\n\t } else {\n\t out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n\t }\n\t }\n\t out += ' var valid' + ($it.level) + ' = ' + ($sch.then) + '; ';\n\t } else {\n\t $it.schema = $sch.then;\n\t $it.schemaPath = $schemaPath + '[' + $caseIndex + '].then';\n\t $it.errSchemaPath = $errSchemaPath + '/' + $caseIndex + '/then';\n\t out += ' ' + (it.validate($it)) + ' ';\n\t }\n\t }\n\t $shouldContinue = $sch.continue\n\t }\n\t }\n\t out += '' + ($closingBraces) + 'var ' + ($valid) + ' = valid' + ($it.level) + '; ';\n\t out = it.util.cleanUpCode(out);\n\t return out;\n\t}\n\t\n\t},{}],33:[function(require,module,exports){\n\t'use strict';\n\tmodule.exports = function generate_uniqueItems(it, $keyword) {\n\t var out = ' ';\n\t var $lvl = it.level;\n\t var $dataLvl = it.dataLevel;\n\t var $schema = it.schema[$keyword];\n\t var $schemaPath = it.schemaPath + '.' + $keyword;\n\t var $errSchemaPath = it.errSchemaPath + '/' + $keyword;\n\t var $breakOnError = !it.opts.allErrors;\n\t var $errorKeyword;\n\t var $data = 'data' + ($dataLvl || '');\n\t var $valid = 'valid' + $lvl;\n\t var $isData = it.opts.v5 && $schema.$data;\n\t var $schemaValue = $isData ? it.util.getData($schema.$data, $dataLvl, it.dataPathArr) : $schema;\n\t if ($isData) {\n\t out += ' var schema' + ($lvl) + ' = ' + ($schemaValue) + '; ';\n\t $schemaValue = 'schema' + $lvl;\n\t }\n\t if (($schema || $isData) && it.opts.uniqueItems !== false) {\n\t if ($isData) {\n\t out += ' var ' + ($valid) + '; if (' + ($schemaValue) + ' === false || ' + ($schemaValue) + ' === undefined) ' + ($valid) + ' = true; else if (typeof ' + ($schemaValue) + ' != \\'boolean\\') ' + ($valid) + ' = false; else { ';\n\t }\n\t out += ' var ' + ($valid) + ' = true; if (' + ($data) + '.length > 1) { var i = ' + ($data) + '.length, j; outer: for (;i--;) { for (j = i; j--;) { if (equal(' + ($data) + '[i], ' + ($data) + '[j])) { ' + ($valid) + ' = false; break outer; } } } } ';\n\t if ($isData) {\n\t out += ' } ';\n\t }\n\t out += ' if (!' + ($valid) + ') { ';\n\t var $$outStack = $$outStack || [];\n\t $$outStack.push(out);\n\t out = ''; /* istanbul ignore else */\n\t if (it.createErrors !== false) {\n\t out += ' { keyword: \\'' + ($errorKeyword || 'uniqueItems') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: \"' + ($errSchemaPath) + '\" , params: { i: i, j: j } ';\n\t if (it.opts.messages !== false) {\n\t out += ' , message: \\'should NOT have duplicate items (items ## \\' + j + \\' and \\' + i + \\' are identical)\\' ';\n\t }\n\t if (it.opts.verbose) {\n\t out += ' , schema: ';\n\t if ($isData) {\n\t out += 'validate.schema' + ($schemaPath);\n\t } else {\n\t out += '' + ($schema);\n\t }\n\t out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n\t }\n\t out += ' } ';\n\t } else {\n\t out += ' {} ';\n\t }\n\t var __err = out;\n\t out = $$outStack.pop();\n\t if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */\n\t if (it.async) {\n\t out += ' throw new ValidationError([' + (__err) + ']); ';\n\t } else {\n\t out += ' validate.errors = [' + (__err) + ']; return false; ';\n\t }\n\t } else {\n\t out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n\t }\n\t out += ' } ';\n\t if ($breakOnError) {\n\t out += ' else { ';\n\t }\n\t } else {\n\t if ($breakOnError) {\n\t out += ' if (true) { ';\n\t }\n\t }\n\t return out;\n\t}\n\t\n\t},{}],34:[function(require,module,exports){\n\t'use strict';\n\tmodule.exports = function generate_validate(it, $keyword) {\n\t var out = '';\n\t var $async = it.schema.$async === true;\n\t if (it.isTop) {\n\t var $top = it.isTop,\n\t $lvl = it.level = 0,\n\t $dataLvl = it.dataLevel = 0,\n\t $data = 'data';\n\t it.rootId = it.resolve.fullPath(it.root.schema.id);\n\t it.baseId = it.baseId || it.rootId;\n\t if ($async) {\n\t it.async = true;\n\t var $es7 = it.opts.async == 'es7';\n\t it.yieldAwait = $es7 ? 'await' : 'yield';\n\t }\n\t delete it.isTop;\n\t it.dataPathArr = [undefined];\n\t out += ' validate = ';\n\t if ($async) {\n\t if ($es7) {\n\t out += ' (async function ';\n\t } else {\n\t if (it.opts.async == 'co*') {\n\t out += 'co.wrap';\n\t }\n\t out += '(function* ';\n\t }\n\t } else {\n\t out += ' (function ';\n\t }\n\t out += ' (data, dataPath, parentData, parentDataProperty) { \\'use strict\\'; var vErrors = null; ';\n\t out += ' var errors = 0; ';\n\t } else {\n\t var $lvl = it.level,\n\t $dataLvl = it.dataLevel,\n\t $data = 'data' + ($dataLvl || '');\n\t if (it.schema.id) it.baseId = it.resolve.url(it.baseId, it.schema.id);\n\t if ($async && !it.async) throw new Error('async schema in sync schema');\n\t out += ' var errs_' + ($lvl) + ' = errors;';\n\t }\n\t var $valid = 'valid' + $lvl,\n\t $breakOnError = !it.opts.allErrors,\n\t $closingBraces1 = '',\n\t $closingBraces2 = '',\n\t $errorKeyword;\n\t var $typeSchema = it.schema.type,\n\t $typeIsArray = Array.isArray($typeSchema);\n\t if ($typeSchema && it.opts.coerceTypes) {\n\t var $coerceToTypes = it.util.coerceToTypes($typeSchema);\n\t if ($coerceToTypes) {\n\t var $schemaPath = it.schemaPath + '.type',\n\t $errSchemaPath = it.errSchemaPath + '/type',\n\t $method = $typeIsArray ? 'checkDataTypes' : 'checkDataType';\n\t out += ' if (' + (it.util[$method]($typeSchema, $data, true)) + ') { ';\n\t var $dataType = 'dataType' + $lvl,\n\t $coerced = 'coerced' + $lvl;\n\t out += ' var ' + ($dataType) + ' = typeof ' + ($data) + '; var ' + ($coerced) + '; ';\n\t var $bracesCoercion = '';\n\t var arr1 = $coerceToTypes;\n\t if (arr1) {\n\t var $type, $i = -1,\n\t l1 = arr1.length - 1;\n\t while ($i < l1) {\n\t $type = arr1[$i += 1];\n\t if ($i) {\n\t out += ' if (' + ($coerced) + ' === undefined) { ';\n\t $bracesCoercion += '}';\n\t }\n\t if ($type == 'string') {\n\t out += ' if (' + ($dataType) + ' == \\'number\\' || ' + ($dataType) + ' == \\'boolean\\') ' + ($coerced) + ' = \\'\\' + ' + ($data) + '; else if (' + ($data) + ' === null) ' + ($coerced) + ' = \\'\\'; ';\n\t } else if ($type == 'number' || $type == 'integer') {\n\t out += ' if (' + ($dataType) + ' == \\'boolean\\' || ' + ($data) + ' === null || (' + ($dataType) + ' == \\'string\\' && ' + ($data) + ' && ' + ($data) + ' == +' + ($data) + ' ';\n\t if ($type == 'integer') {\n\t out += ' && !(' + ($data) + ' % 1)';\n\t }\n\t out += ')) ' + ($coerced) + ' = +' + ($data) + '; ';\n\t } else if ($type == 'boolean') {\n\t out += ' if (' + ($data) + ' === \\'false\\' || ' + ($data) + ' === 0 || ' + ($data) + ' === null) ' + ($coerced) + ' = false; else if (' + ($data) + ' === \\'true\\' || ' + ($data) + ' === 1) ' + ($coerced) + ' = true; ';\n\t } else if ($type == 'null') {\n\t out += ' if (' + ($data) + ' === \\'\\' || ' + ($data) + ' === 0 || ' + ($data) + ' === false) ' + ($coerced) + ' = null; ';\n\t }\n\t }\n\t }\n\t out += ' ' + ($bracesCoercion) + ' if (' + ($coerced) + ' === undefined) { ';\n\t var $$outStack = $$outStack || [];\n\t $$outStack.push(out);\n\t out = ''; /* istanbul ignore else */\n\t if (it.createErrors !== false) {\n\t out += ' { keyword: \\'' + ($errorKeyword || 'type') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: \"' + ($errSchemaPath) + '\" , params: { type: \\'';\n\t if ($typeIsArray) {\n\t out += '' + ($typeSchema.join(\",\"));\n\t } else {\n\t out += '' + ($typeSchema);\n\t }\n\t out += '\\' } ';\n\t if (it.opts.messages !== false) {\n\t out += ' , message: \\'should be ';\n\t if ($typeIsArray) {\n\t out += '' + ($typeSchema.join(\",\"));\n\t } else {\n\t out += '' + ($typeSchema);\n\t }\n\t out += '\\' ';\n\t }\n\t if (it.opts.verbose) {\n\t out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n\t }\n\t out += ' } ';\n\t } else {\n\t out += ' {} ';\n\t }\n\t var __err = out;\n\t out = $$outStack.pop();\n\t if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */\n\t if (it.async) {\n\t out += ' throw new ValidationError([' + (__err) + ']); ';\n\t } else {\n\t out += ' validate.errors = [' + (__err) + ']; return false; ';\n\t }\n\t } else {\n\t out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n\t }\n\t out += ' } else { ';\n\t if ($dataLvl) {\n\t var $parentData = 'data' + (($dataLvl - 1) || ''),\n\t $dataProperty = it.dataPathArr[$dataLvl];\n\t out += ' ' + ($data) + ' = ' + ($parentData) + '[' + ($dataProperty) + '] = ' + ($coerced) + '; ';\n\t } else {\n\t out += ' data = ' + ($coerced) + '; if (parentData !== undefined) parentData[parentDataProperty] = ' + ($coerced) + '; ';\n\t }\n\t out += ' } } ';\n\t }\n\t }\n\t var arr2 = it.RULES;\n\t if (arr2) {\n\t var $rulesGroup, i2 = -1,\n\t l2 = arr2.length - 1;\n\t while (i2 < l2) {\n\t $rulesGroup = arr2[i2 += 1];\n\t if ($shouldUseGroup($rulesGroup)) {\n\t if ($rulesGroup.type) {\n\t out += ' if (' + (it.util.checkDataType($rulesGroup.type, $data)) + ') { ';\n\t }\n\t if (it.opts.useDefaults && !it.compositeRule) {\n\t if ($rulesGroup.type == 'object' && it.schema.properties) {\n\t var $schema = it.schema.properties,\n\t $schemaKeys = Object.keys($schema);\n\t var arr3 = $schemaKeys;\n\t if (arr3) {\n\t var $propertyKey, i3 = -1,\n\t l3 = arr3.length - 1;\n\t while (i3 < l3) {\n\t $propertyKey = arr3[i3 += 1];\n\t var $sch = $schema[$propertyKey];\n\t if ($sch.default !== undefined) {\n\t var $passData = $data + it.util.getProperty($propertyKey);\n\t out += ' if (' + ($passData) + ' === undefined) ' + ($passData) + ' = ';\n\t if (it.opts.useDefaults == 'clone') {\n\t out += ' ' + (JSON.stringify($sch.default)) + ' ';\n\t } else {\n\t out += ' ' + (it.useDefault($sch.default)) + ' ';\n\t }\n\t out += '; ';\n\t }\n\t }\n\t }\n\t } else if ($rulesGroup.type == 'array' && Array.isArray(it.schema.items)) {\n\t var arr4 = it.schema.items;\n\t if (arr4) {\n\t var $sch, $i = -1,\n\t l4 = arr4.length - 1;\n\t while ($i < l4) {\n\t $sch = arr4[$i += 1];\n\t if ($sch.default !== undefined) {\n\t var $passData = $data + '[' + $i + ']';\n\t out += ' if (' + ($passData) + ' === undefined) ' + ($passData) + ' = ';\n\t if (it.opts.useDefaults == 'clone') {\n\t out += ' ' + (JSON.stringify($sch.default)) + ' ';\n\t } else {\n\t out += ' ' + (it.useDefault($sch.default)) + ' ';\n\t }\n\t out += '; ';\n\t }\n\t }\n\t }\n\t }\n\t }\n\t var arr5 = $rulesGroup.rules;\n\t if (arr5) {\n\t var $rule, i5 = -1,\n\t l5 = arr5.length - 1;\n\t while (i5 < l5) {\n\t $rule = arr5[i5 += 1];\n\t if ($shouldUseRule($rule)) {\n\t if ($rule.custom) {\n\t var $schema = it.schema[$rule.keyword],\n\t $ruleValidate = it.useCustomRule($rule, $schema, it.schema, it),\n\t $ruleErrs = $ruleValidate.code + '.errors',\n\t $schemaPath = it.schemaPath + '.' + $rule.keyword,\n\t $errSchemaPath = it.errSchemaPath + '/' + $rule.keyword,\n\t $errs = 'errs' + $lvl,\n\t $i = 'i' + $lvl,\n\t $ruleErr = 'ruleErr' + $lvl,\n\t $rDef = $rule.definition,\n\t $asyncKeyword = $rDef.async,\n\t $inline = $rDef.inline,\n\t $macro = $rDef.macro;\n\t if ($asyncKeyword && !it.async) throw new Error('async keyword in sync schema');\n\t if (!($inline || $macro)) {\n\t out += '' + ($ruleErrs) + ' = null;';\n\t }\n\t out += 'var ' + ($errs) + ' = errors;var valid' + ($lvl) + ';';\n\t if ($inline && $rDef.statements) {\n\t out += ' ' + ($ruleValidate.validate);\n\t } else if ($macro) {\n\t var $it = it.util.copy(it);\n\t $it.level++;\n\t $it.schema = $ruleValidate.validate;\n\t $it.schemaPath = '';\n\t var $wasComposite = it.compositeRule;\n\t it.compositeRule = $it.compositeRule = true;\n\t var $code = it.validate($it).replace(/validate\\.schema/g, $ruleValidate.code);\n\t it.compositeRule = $it.compositeRule = $wasComposite;\n\t out += ' ' + ($code);\n\t } else if ($rDef.compile || $rDef.validate) {\n\t var $$outStack = $$outStack || [];\n\t $$outStack.push(out);\n\t out = '';\n\t out += ' ' + ($ruleValidate.code) + '.call( ';\n\t if (it.opts.passContext) {\n\t out += 'this';\n\t } else {\n\t out += 'self';\n\t }\n\t var $validateArgs = $ruleValidate.validate.length;\n\t if ($rDef.compile || $rDef.schema === false) {\n\t out += ' , ' + ($data) + ' ';\n\t } else {\n\t out += ' , validate.schema' + ($schemaPath) + ' , ' + ($data) + ' , validate.schema' + (it.schemaPath) + ' ';\n\t }\n\t out += ' , (dataPath || \\'\\')';\n\t if (it.errorPath != '\"\"') {\n\t out += ' + ' + (it.errorPath);\n\t }\n\t if ($dataLvl) {\n\t out += ' , data' + (($dataLvl - 1) || '') + ' , ' + (it.dataPathArr[$dataLvl]) + ' ';\n\t } else {\n\t out += ' , parentData , parentDataProperty ';\n\t }\n\t out += ' ) ';\n\t var def_callRuleValidate = out;\n\t out = $$outStack.pop();\n\t if ($rDef.errors !== false) {\n\t if ($asyncKeyword) {\n\t $ruleErrs = 'customErrors' + $lvl;\n\t out += ' var ' + ($ruleErrs) + ' = null; try { valid' + ($lvl) + ' = ' + (it.yieldAwait) + (def_callRuleValidate) + '; } catch (e) { valid' + ($lvl) + ' = false; if (e instanceof ValidationError) ' + ($ruleErrs) + ' = e.errors; else throw e; } ';\n\t } else {\n\t out += ' ' + ($ruleValidate.code) + '.errors = null; ';\n\t }\n\t }\n\t }\n\t out += 'if (! ';\n\t if ($inline) {\n\t if ($rDef.statements) {\n\t out += ' valid' + ($lvl) + ' ';\n\t } else {\n\t out += ' (' + ($ruleValidate.validate) + ') ';\n\t }\n\t } else if ($macro) {\n\t out += ' valid' + ($it.level) + ' ';\n\t } else {\n\t if ($asyncKeyword) {\n\t if ($rDef.errors === false) {\n\t out += ' (' + (it.yieldAwait) + (def_callRuleValidate) + ') ';\n\t } else {\n\t out += ' valid' + ($lvl) + ' ';\n\t }\n\t } else {\n\t out += ' ' + (def_callRuleValidate) + ' ';\n\t }\n\t }\n\t out += ') { ';\n\t $errorKeyword = $rule.keyword;\n\t var $$outStack = $$outStack || [];\n\t $$outStack.push(out);\n\t out = '';\n\t var $$outStack = $$outStack || [];\n\t $$outStack.push(out);\n\t out = ''; /* istanbul ignore else */\n\t if (it.createErrors !== false) {\n\t out += ' { keyword: \\'' + ($errorKeyword || 'custom') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: \"' + ($errSchemaPath) + '\" , params: { keyword: \\'' + ($rule.keyword) + '\\' } ';\n\t if (it.opts.messages !== false) {\n\t out += ' , message: \\'should pass \"' + ($rule.keyword) + '\" keyword validation\\' ';\n\t }\n\t if (it.opts.verbose) {\n\t out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n\t }\n\t out += ' } ';\n\t } else {\n\t out += ' {} ';\n\t }\n\t var __err = out;\n\t out = $$outStack.pop();\n\t if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */\n\t if (it.async) {\n\t out += ' throw new ValidationError([' + (__err) + ']); ';\n\t } else {\n\t out += ' validate.errors = [' + (__err) + ']; return false; ';\n\t }\n\t } else {\n\t out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n\t }\n\t var def_customError = out;\n\t out = $$outStack.pop();\n\t if ($inline) {\n\t if ($rDef.errors) {\n\t if ($rDef.errors != 'full') {\n\t out += ' for (var ' + ($i) + '=' + ($errs) + '; ' + ($i) + '= 0x80 (not a basic code point)',\n\t\t\t'invalid-input': 'Invalid input'\n\t\t},\n\t\n\t\t/** Convenience shortcuts */\n\t\tbaseMinusTMin = base - tMin,\n\t\tfloor = Math.floor,\n\t\tstringFromCharCode = String.fromCharCode,\n\t\n\t\t/** Temporary variable */\n\t\tkey;\n\t\n\t\t/*--------------------------------------------------------------------------*/\n\t\n\t\t/**\n\t\t * A generic error utility function.\n\t\t * @private\n\t\t * @param {String} type The error type.\n\t\t * @returns {Error} Throws a `RangeError` with the applicable error message.\n\t\t */\n\t\tfunction error(type) {\n\t\t\tthrow new RangeError(errors[type]);\n\t\t}\n\t\n\t\t/**\n\t\t * A generic `Array#map` utility function.\n\t\t * @private\n\t\t * @param {Array} array The array to iterate over.\n\t\t * @param {Function} callback The function that gets called for every array\n\t\t * item.\n\t\t * @returns {Array} A new array of values returned by the callback function.\n\t\t */\n\t\tfunction map(array, fn) {\n\t\t\tvar length = array.length;\n\t\t\tvar result = [];\n\t\t\twhile (length--) {\n\t\t\t\tresult[length] = fn(array[length]);\n\t\t\t}\n\t\t\treturn result;\n\t\t}\n\t\n\t\t/**\n\t\t * A simple `Array#map`-like wrapper to work with domain name strings or email\n\t\t * addresses.\n\t\t * @private\n\t\t * @param {String} domain The domain name or email address.\n\t\t * @param {Function} callback The function that gets called for every\n\t\t * character.\n\t\t * @returns {Array} A new string of characters returned by the callback\n\t\t * function.\n\t\t */\n\t\tfunction mapDomain(string, fn) {\n\t\t\tvar parts = string.split('@');\n\t\t\tvar result = '';\n\t\t\tif (parts.length > 1) {\n\t\t\t\t// In email addresses, only the domain name should be punycoded. Leave\n\t\t\t\t// the local part (i.e. everything up to `@`) intact.\n\t\t\t\tresult = parts[0] + '@';\n\t\t\t\tstring = parts[1];\n\t\t\t}\n\t\t\t// Avoid `split(regex)` for IE8 compatibility. See #17.\n\t\t\tstring = string.replace(regexSeparators, '\\x2E');\n\t\t\tvar labels = string.split('.');\n\t\t\tvar encoded = map(labels, fn).join('.');\n\t\t\treturn result + encoded;\n\t\t}\n\t\n\t\t/**\n\t\t * Creates an array containing the numeric code points of each Unicode\n\t\t * character in the string. While JavaScript uses UCS-2 internally,\n\t\t * this function will convert a pair of surrogate halves (each of which\n\t\t * UCS-2 exposes as separate characters) into a single code point,\n\t\t * matching UTF-16.\n\t\t * @see `punycode.ucs2.encode`\n\t\t * @see \n\t\t * @memberOf punycode.ucs2\n\t\t * @name decode\n\t\t * @param {String} string The Unicode input string (UCS-2).\n\t\t * @returns {Array} The new array of code points.\n\t\t */\n\t\tfunction ucs2decode(string) {\n\t\t\tvar output = [],\n\t\t\t counter = 0,\n\t\t\t length = string.length,\n\t\t\t value,\n\t\t\t extra;\n\t\t\twhile (counter < length) {\n\t\t\t\tvalue = string.charCodeAt(counter++);\n\t\t\t\tif (value >= 0xD800 && value <= 0xDBFF && counter < length) {\n\t\t\t\t\t// high surrogate, and there is a next character\n\t\t\t\t\textra = string.charCodeAt(counter++);\n\t\t\t\t\tif ((extra & 0xFC00) == 0xDC00) { // low surrogate\n\t\t\t\t\t\toutput.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// unmatched surrogate; only append this code unit, in case the next\n\t\t\t\t\t\t// code unit is the high surrogate of a surrogate pair\n\t\t\t\t\t\toutput.push(value);\n\t\t\t\t\t\tcounter--;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\toutput.push(value);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn output;\n\t\t}\n\t\n\t\t/**\n\t\t * Creates a string based on an array of numeric code points.\n\t\t * @see `punycode.ucs2.decode`\n\t\t * @memberOf punycode.ucs2\n\t\t * @name encode\n\t\t * @param {Array} codePoints The array of numeric code points.\n\t\t * @returns {String} The new Unicode string (UCS-2).\n\t\t */\n\t\tfunction ucs2encode(array) {\n\t\t\treturn map(array, function(value) {\n\t\t\t\tvar output = '';\n\t\t\t\tif (value > 0xFFFF) {\n\t\t\t\t\tvalue -= 0x10000;\n\t\t\t\t\toutput += stringFromCharCode(value >>> 10 & 0x3FF | 0xD800);\n\t\t\t\t\tvalue = 0xDC00 | value & 0x3FF;\n\t\t\t\t}\n\t\t\t\toutput += stringFromCharCode(value);\n\t\t\t\treturn output;\n\t\t\t}).join('');\n\t\t}\n\t\n\t\t/**\n\t\t * Converts a basic code point into a digit/integer.\n\t\t * @see `digitToBasic()`\n\t\t * @private\n\t\t * @param {Number} codePoint The basic numeric code point value.\n\t\t * @returns {Number} The numeric value of a basic code point (for use in\n\t\t * representing integers) in the range `0` to `base - 1`, or `base` if\n\t\t * the code point does not represent a value.\n\t\t */\n\t\tfunction basicToDigit(codePoint) {\n\t\t\tif (codePoint - 48 < 10) {\n\t\t\t\treturn codePoint - 22;\n\t\t\t}\n\t\t\tif (codePoint - 65 < 26) {\n\t\t\t\treturn codePoint - 65;\n\t\t\t}\n\t\t\tif (codePoint - 97 < 26) {\n\t\t\t\treturn codePoint - 97;\n\t\t\t}\n\t\t\treturn base;\n\t\t}\n\t\n\t\t/**\n\t\t * Converts a digit/integer into a basic code point.\n\t\t * @see `basicToDigit()`\n\t\t * @private\n\t\t * @param {Number} digit The numeric value of a basic code point.\n\t\t * @returns {Number} The basic code point whose value (when used for\n\t\t * representing integers) is `digit`, which needs to be in the range\n\t\t * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is\n\t\t * used; else, the lowercase form is used. The behavior is undefined\n\t\t * if `flag` is non-zero and `digit` has no uppercase form.\n\t\t */\n\t\tfunction digitToBasic(digit, flag) {\n\t\t\t// 0..25 map to ASCII a..z or A..Z\n\t\t\t// 26..35 map to ASCII 0..9\n\t\t\treturn digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5);\n\t\t}\n\t\n\t\t/**\n\t\t * Bias adaptation function as per section 3.4 of RFC 3492.\n\t\t * https://tools.ietf.org/html/rfc3492#section-3.4\n\t\t * @private\n\t\t */\n\t\tfunction adapt(delta, numPoints, firstTime) {\n\t\t\tvar k = 0;\n\t\t\tdelta = firstTime ? floor(delta / damp) : delta >> 1;\n\t\t\tdelta += floor(delta / numPoints);\n\t\t\tfor (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) {\n\t\t\t\tdelta = floor(delta / baseMinusTMin);\n\t\t\t}\n\t\t\treturn floor(k + (baseMinusTMin + 1) * delta / (delta + skew));\n\t\t}\n\t\n\t\t/**\n\t\t * Converts a Punycode string of ASCII-only symbols to a string of Unicode\n\t\t * symbols.\n\t\t * @memberOf punycode\n\t\t * @param {String} input The Punycode string of ASCII-only symbols.\n\t\t * @returns {String} The resulting string of Unicode symbols.\n\t\t */\n\t\tfunction decode(input) {\n\t\t\t// Don't use UCS-2\n\t\t\tvar output = [],\n\t\t\t inputLength = input.length,\n\t\t\t out,\n\t\t\t i = 0,\n\t\t\t n = initialN,\n\t\t\t bias = initialBias,\n\t\t\t basic,\n\t\t\t j,\n\t\t\t index,\n\t\t\t oldi,\n\t\t\t w,\n\t\t\t k,\n\t\t\t digit,\n\t\t\t t,\n\t\t\t /** Cached calculation results */\n\t\t\t baseMinusT;\n\t\n\t\t\t// Handle the basic code points: let `basic` be the number of input code\n\t\t\t// points before the last delimiter, or `0` if there is none, then copy\n\t\t\t// the first basic code points to the output.\n\t\n\t\t\tbasic = input.lastIndexOf(delimiter);\n\t\t\tif (basic < 0) {\n\t\t\t\tbasic = 0;\n\t\t\t}\n\t\n\t\t\tfor (j = 0; j < basic; ++j) {\n\t\t\t\t// if it's not a basic code point\n\t\t\t\tif (input.charCodeAt(j) >= 0x80) {\n\t\t\t\t\terror('not-basic');\n\t\t\t\t}\n\t\t\t\toutput.push(input.charCodeAt(j));\n\t\t\t}\n\t\n\t\t\t// Main decoding loop: start just after the last delimiter if any basic code\n\t\t\t// points were copied; start at the beginning otherwise.\n\t\n\t\t\tfor (index = basic > 0 ? basic + 1 : 0; index < inputLength; /* no final expression */) {\n\t\n\t\t\t\t// `index` is the index of the next character to be consumed.\n\t\t\t\t// Decode a generalized variable-length integer into `delta`,\n\t\t\t\t// which gets added to `i`. The overflow checking is easier\n\t\t\t\t// if we increase `i` as we go, then subtract off its starting\n\t\t\t\t// value at the end to obtain `delta`.\n\t\t\t\tfor (oldi = i, w = 1, k = base; /* no condition */; k += base) {\n\t\n\t\t\t\t\tif (index >= inputLength) {\n\t\t\t\t\t\terror('invalid-input');\n\t\t\t\t\t}\n\t\n\t\t\t\t\tdigit = basicToDigit(input.charCodeAt(index++));\n\t\n\t\t\t\t\tif (digit >= base || digit > floor((maxInt - i) / w)) {\n\t\t\t\t\t\terror('overflow');\n\t\t\t\t\t}\n\t\n\t\t\t\t\ti += digit * w;\n\t\t\t\t\tt = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);\n\t\n\t\t\t\t\tif (digit < t) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\n\t\t\t\t\tbaseMinusT = base - t;\n\t\t\t\t\tif (w > floor(maxInt / baseMinusT)) {\n\t\t\t\t\t\terror('overflow');\n\t\t\t\t\t}\n\t\n\t\t\t\t\tw *= baseMinusT;\n\t\n\t\t\t\t}\n\t\n\t\t\t\tout = output.length + 1;\n\t\t\t\tbias = adapt(i - oldi, out, oldi == 0);\n\t\n\t\t\t\t// `i` was supposed to wrap around from `out` to `0`,\n\t\t\t\t// incrementing `n` each time, so we'll fix that now:\n\t\t\t\tif (floor(i / out) > maxInt - n) {\n\t\t\t\t\terror('overflow');\n\t\t\t\t}\n\t\n\t\t\t\tn += floor(i / out);\n\t\t\t\ti %= out;\n\t\n\t\t\t\t// Insert `n` at position `i` of the output\n\t\t\t\toutput.splice(i++, 0, n);\n\t\n\t\t\t}\n\t\n\t\t\treturn ucs2encode(output);\n\t\t}\n\t\n\t\t/**\n\t\t * Converts a string of Unicode symbols (e.g. a domain name label) to a\n\t\t * Punycode string of ASCII-only symbols.\n\t\t * @memberOf punycode\n\t\t * @param {String} input The string of Unicode symbols.\n\t\t * @returns {String} The resulting Punycode string of ASCII-only symbols.\n\t\t */\n\t\tfunction encode(input) {\n\t\t\tvar n,\n\t\t\t delta,\n\t\t\t handledCPCount,\n\t\t\t basicLength,\n\t\t\t bias,\n\t\t\t j,\n\t\t\t m,\n\t\t\t q,\n\t\t\t k,\n\t\t\t t,\n\t\t\t currentValue,\n\t\t\t output = [],\n\t\t\t /** `inputLength` will hold the number of code points in `input`. */\n\t\t\t inputLength,\n\t\t\t /** Cached calculation results */\n\t\t\t handledCPCountPlusOne,\n\t\t\t baseMinusT,\n\t\t\t qMinusT;\n\t\n\t\t\t// Convert the input in UCS-2 to Unicode\n\t\t\tinput = ucs2decode(input);\n\t\n\t\t\t// Cache the length\n\t\t\tinputLength = input.length;\n\t\n\t\t\t// Initialize the state\n\t\t\tn = initialN;\n\t\t\tdelta = 0;\n\t\t\tbias = initialBias;\n\t\n\t\t\t// Handle the basic code points\n\t\t\tfor (j = 0; j < inputLength; ++j) {\n\t\t\t\tcurrentValue = input[j];\n\t\t\t\tif (currentValue < 0x80) {\n\t\t\t\t\toutput.push(stringFromCharCode(currentValue));\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t\thandledCPCount = basicLength = output.length;\n\t\n\t\t\t// `handledCPCount` is the number of code points that have been handled;\n\t\t\t// `basicLength` is the number of basic code points.\n\t\n\t\t\t// Finish the basic string - if it is not empty - with a delimiter\n\t\t\tif (basicLength) {\n\t\t\t\toutput.push(delimiter);\n\t\t\t}\n\t\n\t\t\t// Main encoding loop:\n\t\t\twhile (handledCPCount < inputLength) {\n\t\n\t\t\t\t// All non-basic code points < n have been handled already. Find the next\n\t\t\t\t// larger one:\n\t\t\t\tfor (m = maxInt, j = 0; j < inputLength; ++j) {\n\t\t\t\t\tcurrentValue = input[j];\n\t\t\t\t\tif (currentValue >= n && currentValue < m) {\n\t\t\t\t\t\tm = currentValue;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\n\t\t\t\t// Increase `delta` enough to advance the decoder's state to ,\n\t\t\t\t// but guard against overflow\n\t\t\t\thandledCPCountPlusOne = handledCPCount + 1;\n\t\t\t\tif (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) {\n\t\t\t\t\terror('overflow');\n\t\t\t\t}\n\t\n\t\t\t\tdelta += (m - n) * handledCPCountPlusOne;\n\t\t\t\tn = m;\n\t\n\t\t\t\tfor (j = 0; j < inputLength; ++j) {\n\t\t\t\t\tcurrentValue = input[j];\n\t\n\t\t\t\t\tif (currentValue < n && ++delta > maxInt) {\n\t\t\t\t\t\terror('overflow');\n\t\t\t\t\t}\n\t\n\t\t\t\t\tif (currentValue == n) {\n\t\t\t\t\t\t// Represent delta as a generalized variable-length integer\n\t\t\t\t\t\tfor (q = delta, k = base; /* no condition */; k += base) {\n\t\t\t\t\t\t\tt = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);\n\t\t\t\t\t\t\tif (q < t) {\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tqMinusT = q - t;\n\t\t\t\t\t\t\tbaseMinusT = base - t;\n\t\t\t\t\t\t\toutput.push(\n\t\t\t\t\t\t\t\tstringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0))\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\tq = floor(qMinusT / baseMinusT);\n\t\t\t\t\t\t}\n\t\n\t\t\t\t\t\toutput.push(stringFromCharCode(digitToBasic(q, 0)));\n\t\t\t\t\t\tbias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength);\n\t\t\t\t\t\tdelta = 0;\n\t\t\t\t\t\t++handledCPCount;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\n\t\t\t\t++delta;\n\t\t\t\t++n;\n\t\n\t\t\t}\n\t\t\treturn output.join('');\n\t\t}\n\t\n\t\t/**\n\t\t * Converts a Punycode string representing a domain name or an email address\n\t\t * to Unicode. Only the Punycoded parts of the input will be converted, i.e.\n\t\t * it doesn't matter if you call it on a string that has already been\n\t\t * converted to Unicode.\n\t\t * @memberOf punycode\n\t\t * @param {String} input The Punycoded domain name or email address to\n\t\t * convert to Unicode.\n\t\t * @returns {String} The Unicode representation of the given Punycode\n\t\t * string.\n\t\t */\n\t\tfunction toUnicode(input) {\n\t\t\treturn mapDomain(input, function(string) {\n\t\t\t\treturn regexPunycode.test(string)\n\t\t\t\t\t? decode(string.slice(4).toLowerCase())\n\t\t\t\t\t: string;\n\t\t\t});\n\t\t}\n\t\n\t\t/**\n\t\t * Converts a Unicode string representing a domain name or an email address to\n\t\t * Punycode. Only the non-ASCII parts of the domain name will be converted,\n\t\t * i.e. it doesn't matter if you call it with a domain that's already in\n\t\t * ASCII.\n\t\t * @memberOf punycode\n\t\t * @param {String} input The domain name or email address to convert, as a\n\t\t * Unicode string.\n\t\t * @returns {String} The Punycode representation of the given domain name or\n\t\t * email address.\n\t\t */\n\t\tfunction toASCII(input) {\n\t\t\treturn mapDomain(input, function(string) {\n\t\t\t\treturn regexNonASCII.test(string)\n\t\t\t\t\t? 'xn--' + encode(string)\n\t\t\t\t\t: string;\n\t\t\t});\n\t\t}\n\t\n\t\t/*--------------------------------------------------------------------------*/\n\t\n\t\t/** Define the public API */\n\t\tpunycode = {\n\t\t\t/**\n\t\t\t * A string representing the current Punycode.js version number.\n\t\t\t * @memberOf punycode\n\t\t\t * @type String\n\t\t\t */\n\t\t\t'version': '1.3.2',\n\t\t\t/**\n\t\t\t * An object of methods to convert from JavaScript's internal character\n\t\t\t * representation (UCS-2) to Unicode code points, and back.\n\t\t\t * @see \n\t\t\t * @memberOf punycode\n\t\t\t * @type Object\n\t\t\t */\n\t\t\t'ucs2': {\n\t\t\t\t'decode': ucs2decode,\n\t\t\t\t'encode': ucs2encode\n\t\t\t},\n\t\t\t'decode': decode,\n\t\t\t'encode': encode,\n\t\t\t'toASCII': toASCII,\n\t\t\t'toUnicode': toUnicode\n\t\t};\n\t\n\t\t/** Expose `punycode` */\n\t\t// Some AMD build optimizers, like r.js, check for specific condition patterns\n\t\t// like the following:\n\t\tif (\n\t\t\ttypeof define == 'function' &&\n\t\t\ttypeof define.amd == 'object' &&\n\t\t\tdefine.amd\n\t\t) {\n\t\t\tdefine('punycode', function() {\n\t\t\t\treturn punycode;\n\t\t\t});\n\t\t} else if (freeExports && freeModule) {\n\t\t\tif (module.exports == freeExports) {\n\t\t\t\t// in Node.js, io.js, or RingoJS v0.8.0+\n\t\t\t\tfreeModule.exports = punycode;\n\t\t\t} else {\n\t\t\t\t// in Narwhal or RingoJS v0.7.0-\n\t\t\t\tfor (key in punycode) {\n\t\t\t\t\tpunycode.hasOwnProperty(key) && (freeExports[key] = punycode[key]);\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\t// in Rhino or a web browser\n\t\t\troot.punycode = punycode;\n\t\t}\n\t\n\t}(this));\n\t\n\t}).call(this,typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : {})\n\t},{}],40:[function(require,module,exports){\n\t// Copyright Joyent, Inc. and other Node contributors.\n\t//\n\t// Permission is hereby granted, free of charge, to any person obtaining a\n\t// copy of this software and associated documentation files (the\n\t// \"Software\"), to deal in the Software without restriction, including\n\t// without limitation the rights to use, copy, modify, merge, publish,\n\t// distribute, sublicense, and/or sell copies of the Software, and to permit\n\t// persons to whom the Software is furnished to do so, subject to the\n\t// following conditions:\n\t//\n\t// The above copyright notice and this permission notice shall be included\n\t// in all copies or substantial portions of the Software.\n\t//\n\t// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n\t// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n\t// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n\t// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n\t// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n\t// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n\t// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\t\n\t'use strict';\n\t\n\t// If obj.hasOwnProperty has been overridden, then calling\n\t// obj.hasOwnProperty(prop) will break.\n\t// See: https://github.com/joyent/node/issues/1707\n\tfunction hasOwnProperty(obj, prop) {\n\t return Object.prototype.hasOwnProperty.call(obj, prop);\n\t}\n\t\n\tmodule.exports = function(qs, sep, eq, options) {\n\t sep = sep || '&';\n\t eq = eq || '=';\n\t var obj = {};\n\t\n\t if (typeof qs !== 'string' || qs.length === 0) {\n\t return obj;\n\t }\n\t\n\t var regexp = /\\+/g;\n\t qs = qs.split(sep);\n\t\n\t var maxKeys = 1000;\n\t if (options && typeof options.maxKeys === 'number') {\n\t maxKeys = options.maxKeys;\n\t }\n\t\n\t var len = qs.length;\n\t // maxKeys <= 0 means that we should not limit keys count\n\t if (maxKeys > 0 && len > maxKeys) {\n\t len = maxKeys;\n\t }\n\t\n\t for (var i = 0; i < len; ++i) {\n\t var x = qs[i].replace(regexp, '%20'),\n\t idx = x.indexOf(eq),\n\t kstr, vstr, k, v;\n\t\n\t if (idx >= 0) {\n\t kstr = x.substr(0, idx);\n\t vstr = x.substr(idx + 1);\n\t } else {\n\t kstr = x;\n\t vstr = '';\n\t }\n\t\n\t k = decodeURIComponent(kstr);\n\t v = decodeURIComponent(vstr);\n\t\n\t if (!hasOwnProperty(obj, k)) {\n\t obj[k] = v;\n\t } else if (isArray(obj[k])) {\n\t obj[k].push(v);\n\t } else {\n\t obj[k] = [obj[k], v];\n\t }\n\t }\n\t\n\t return obj;\n\t};\n\t\n\tvar isArray = Array.isArray || function (xs) {\n\t return Object.prototype.toString.call(xs) === '[object Array]';\n\t};\n\t\n\t},{}],41:[function(require,module,exports){\n\t// Copyright Joyent, Inc. and other Node contributors.\n\t//\n\t// Permission is hereby granted, free of charge, to any person obtaining a\n\t// copy of this software and associated documentation files (the\n\t// \"Software\"), to deal in the Software without restriction, including\n\t// without limitation the rights to use, copy, modify, merge, publish,\n\t// distribute, sublicense, and/or sell copies of the Software, and to permit\n\t// persons to whom the Software is furnished to do so, subject to the\n\t// following conditions:\n\t//\n\t// The above copyright notice and this permission notice shall be included\n\t// in all copies or substantial portions of the Software.\n\t//\n\t// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n\t// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n\t// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n\t// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n\t// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n\t// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n\t// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\t\n\t'use strict';\n\t\n\tvar stringifyPrimitive = function(v) {\n\t switch (typeof v) {\n\t case 'string':\n\t return v;\n\t\n\t case 'boolean':\n\t return v ? 'true' : 'false';\n\t\n\t case 'number':\n\t return isFinite(v) ? v : '';\n\t\n\t default:\n\t return '';\n\t }\n\t};\n\t\n\tmodule.exports = function(obj, sep, eq, name) {\n\t sep = sep || '&';\n\t eq = eq || '=';\n\t if (obj === null) {\n\t obj = undefined;\n\t }\n\t\n\t if (typeof obj === 'object') {\n\t return map(objectKeys(obj), function(k) {\n\t var ks = encodeURIComponent(stringifyPrimitive(k)) + eq;\n\t if (isArray(obj[k])) {\n\t return map(obj[k], function(v) {\n\t return ks + encodeURIComponent(stringifyPrimitive(v));\n\t }).join(sep);\n\t } else {\n\t return ks + encodeURIComponent(stringifyPrimitive(obj[k]));\n\t }\n\t }).join(sep);\n\t\n\t }\n\t\n\t if (!name) return '';\n\t return encodeURIComponent(stringifyPrimitive(name)) + eq +\n\t encodeURIComponent(stringifyPrimitive(obj));\n\t};\n\t\n\tvar isArray = Array.isArray || function (xs) {\n\t return Object.prototype.toString.call(xs) === '[object Array]';\n\t};\n\t\n\tfunction map (xs, f) {\n\t if (xs.map) return xs.map(f);\n\t var res = [];\n\t for (var i = 0; i < xs.length; i++) {\n\t res.push(f(xs[i], i));\n\t }\n\t return res;\n\t}\n\t\n\tvar objectKeys = Object.keys || function (obj) {\n\t var res = [];\n\t for (var key in obj) {\n\t if (Object.prototype.hasOwnProperty.call(obj, key)) res.push(key);\n\t }\n\t return res;\n\t};\n\t\n\t},{}],42:[function(require,module,exports){\n\t'use strict';\n\t\n\texports.decode = exports.parse = require('./decode');\n\texports.encode = exports.stringify = require('./encode');\n\t\n\t},{\"./decode\":40,\"./encode\":41}],43:[function(require,module,exports){\n\t// Copyright Joyent, Inc. and other Node contributors.\n\t//\n\t// Permission is hereby granted, free of charge, to any person obtaining a\n\t// copy of this software and associated documentation files (the\n\t// \"Software\"), to deal in the Software without restriction, including\n\t// without limitation the rights to use, copy, modify, merge, publish,\n\t// distribute, sublicense, and/or sell copies of the Software, and to permit\n\t// persons to whom the Software is furnished to do so, subject to the\n\t// following conditions:\n\t//\n\t// The above copyright notice and this permission notice shall be included\n\t// in all copies or substantial portions of the Software.\n\t//\n\t// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n\t// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n\t// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n\t// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n\t// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n\t// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n\t// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\t\n\t'use strict';\n\t\n\tvar punycode = require('punycode');\n\tvar util = require('./util');\n\t\n\texports.parse = urlParse;\n\texports.resolve = urlResolve;\n\texports.resolveObject = urlResolveObject;\n\texports.format = urlFormat;\n\t\n\texports.Url = Url;\n\t\n\tfunction Url() {\n\t this.protocol = null;\n\t this.slashes = null;\n\t this.auth = null;\n\t this.host = null;\n\t this.port = null;\n\t this.hostname = null;\n\t this.hash = null;\n\t this.search = null;\n\t this.query = null;\n\t this.pathname = null;\n\t this.path = null;\n\t this.href = null;\n\t}\n\t\n\t// Reference: RFC 3986, RFC 1808, RFC 2396\n\t\n\t// define these here so at least they only have to be\n\t// compiled once on the first module load.\n\tvar protocolPattern = /^([a-z0-9.+-]+:)/i,\n\t portPattern = /:[0-9]*$/,\n\t\n\t // Special case for a simple path URL\n\t simplePathPattern = /^(\\/\\/?(?!\\/)[^\\?\\s]*)(\\?[^\\s]*)?$/,\n\t\n\t // RFC 2396: characters reserved for delimiting URLs.\n\t // We actually just auto-escape these.\n\t delims = ['<', '>', '\"', '`', ' ', '\\r', '\\n', '\\t'],\n\t\n\t // RFC 2396: characters not allowed for various reasons.\n\t unwise = ['{', '}', '|', '\\\\', '^', '`'].concat(delims),\n\t\n\t // Allowed by RFCs, but cause of XSS attacks. Always escape these.\n\t autoEscape = ['\\''].concat(unwise),\n\t // Characters that are never ever allowed in a hostname.\n\t // Note that any invalid chars are also handled, but these\n\t // are the ones that are *expected* to be seen, so we fast-path\n\t // them.\n\t nonHostChars = ['%', '/', '?', ';', '#'].concat(autoEscape),\n\t hostEndingChars = ['/', '?', '#'],\n\t hostnameMaxLen = 255,\n\t hostnamePartPattern = /^[+a-z0-9A-Z_-]{0,63}$/,\n\t hostnamePartStart = /^([+a-z0-9A-Z_-]{0,63})(.*)$/,\n\t // protocols that can allow \"unsafe\" and \"unwise\" chars.\n\t unsafeProtocol = {\n\t 'javascript': true,\n\t 'javascript:': true\n\t },\n\t // protocols that never have a hostname.\n\t hostlessProtocol = {\n\t 'javascript': true,\n\t 'javascript:': true\n\t },\n\t // protocols that always contain a // bit.\n\t slashedProtocol = {\n\t 'http': true,\n\t 'https': true,\n\t 'ftp': true,\n\t 'gopher': true,\n\t 'file': true,\n\t 'http:': true,\n\t 'https:': true,\n\t 'ftp:': true,\n\t 'gopher:': true,\n\t 'file:': true\n\t },\n\t querystring = require('querystring');\n\t\n\tfunction urlParse(url, parseQueryString, slashesDenoteHost) {\n\t if (url && util.isObject(url) && url instanceof Url) return url;\n\t\n\t var u = new Url;\n\t u.parse(url, parseQueryString, slashesDenoteHost);\n\t return u;\n\t}\n\t\n\tUrl.prototype.parse = function(url, parseQueryString, slashesDenoteHost) {\n\t if (!util.isString(url)) {\n\t throw new TypeError(\"Parameter 'url' must be a string, not \" + typeof url);\n\t }\n\t\n\t // Copy chrome, IE, opera backslash-handling behavior.\n\t // Back slashes before the query string get converted to forward slashes\n\t // See: https://code.google.com/p/chromium/issues/detail?id=25916\n\t var queryIndex = url.indexOf('?'),\n\t splitter =\n\t (queryIndex !== -1 && queryIndex < url.indexOf('#')) ? '?' : '#',\n\t uSplit = url.split(splitter),\n\t slashRegex = /\\\\/g;\n\t uSplit[0] = uSplit[0].replace(slashRegex, '/');\n\t url = uSplit.join(splitter);\n\t\n\t var rest = url;\n\t\n\t // trim before proceeding.\n\t // This is to support parse stuff like \" http://foo.com \\n\"\n\t rest = rest.trim();\n\t\n\t if (!slashesDenoteHost && url.split('#').length === 1) {\n\t // Try fast path regexp\n\t var simplePath = simplePathPattern.exec(rest);\n\t if (simplePath) {\n\t this.path = rest;\n\t this.href = rest;\n\t this.pathname = simplePath[1];\n\t if (simplePath[2]) {\n\t this.search = simplePath[2];\n\t if (parseQueryString) {\n\t this.query = querystring.parse(this.search.substr(1));\n\t } else {\n\t this.query = this.search.substr(1);\n\t }\n\t } else if (parseQueryString) {\n\t this.search = '';\n\t this.query = {};\n\t }\n\t return this;\n\t }\n\t }\n\t\n\t var proto = protocolPattern.exec(rest);\n\t if (proto) {\n\t proto = proto[0];\n\t var lowerProto = proto.toLowerCase();\n\t this.protocol = lowerProto;\n\t rest = rest.substr(proto.length);\n\t }\n\t\n\t // figure out if it's got a host\n\t // user@server is *always* interpreted as a hostname, and url\n\t // resolution will treat //foo/bar as host=foo,path=bar because that's\n\t // how the browser resolves relative URLs.\n\t if (slashesDenoteHost || proto || rest.match(/^\\/\\/[^@\\/]+@[^@\\/]+/)) {\n\t var slashes = rest.substr(0, 2) === '//';\n\t if (slashes && !(proto && hostlessProtocol[proto])) {\n\t rest = rest.substr(2);\n\t this.slashes = true;\n\t }\n\t }\n\t\n\t if (!hostlessProtocol[proto] &&\n\t (slashes || (proto && !slashedProtocol[proto]))) {\n\t\n\t // there's a hostname.\n\t // the first instance of /, ?, ;, or # ends the host.\n\t //\n\t // If there is an @ in the hostname, then non-host chars *are* allowed\n\t // to the left of the last @ sign, unless some host-ending character\n\t // comes *before* the @-sign.\n\t // URLs are obnoxious.\n\t //\n\t // ex:\n\t // http://a@b@c/ => user:a@b host:c\n\t // http://a@b?@c => user:a host:c path:/?@c\n\t\n\t // v0.12 TODO(isaacs): This is not quite how Chrome does things.\n\t // Review our test case against browsers more comprehensively.\n\t\n\t // find the first instance of any hostEndingChars\n\t var hostEnd = -1;\n\t for (var i = 0; i < hostEndingChars.length; i++) {\n\t var hec = rest.indexOf(hostEndingChars[i]);\n\t if (hec !== -1 && (hostEnd === -1 || hec < hostEnd))\n\t hostEnd = hec;\n\t }\n\t\n\t // at this point, either we have an explicit point where the\n\t // auth portion cannot go past, or the last @ char is the decider.\n\t var auth, atSign;\n\t if (hostEnd === -1) {\n\t // atSign can be anywhere.\n\t atSign = rest.lastIndexOf('@');\n\t } else {\n\t // atSign must be in auth portion.\n\t // http://a@b/c@d => host:b auth:a path:/c@d\n\t atSign = rest.lastIndexOf('@', hostEnd);\n\t }\n\t\n\t // Now we have a portion which is definitely the auth.\n\t // Pull that off.\n\t if (atSign !== -1) {\n\t auth = rest.slice(0, atSign);\n\t rest = rest.slice(atSign + 1);\n\t this.auth = decodeURIComponent(auth);\n\t }\n\t\n\t // the host is the remaining to the left of the first non-host char\n\t hostEnd = -1;\n\t for (var i = 0; i < nonHostChars.length; i++) {\n\t var hec = rest.indexOf(nonHostChars[i]);\n\t if (hec !== -1 && (hostEnd === -1 || hec < hostEnd))\n\t hostEnd = hec;\n\t }\n\t // if we still have not hit it, then the entire thing is a host.\n\t if (hostEnd === -1)\n\t hostEnd = rest.length;\n\t\n\t this.host = rest.slice(0, hostEnd);\n\t rest = rest.slice(hostEnd);\n\t\n\t // pull out port.\n\t this.parseHost();\n\t\n\t // we've indicated that there is a hostname,\n\t // so even if it's empty, it has to be present.\n\t this.hostname = this.hostname || '';\n\t\n\t // if hostname begins with [ and ends with ]\n\t // assume that it's an IPv6 address.\n\t var ipv6Hostname = this.hostname[0] === '[' &&\n\t this.hostname[this.hostname.length - 1] === ']';\n\t\n\t // validate a little.\n\t if (!ipv6Hostname) {\n\t var hostparts = this.hostname.split(/\\./);\n\t for (var i = 0, l = hostparts.length; i < l; i++) {\n\t var part = hostparts[i];\n\t if (!part) continue;\n\t if (!part.match(hostnamePartPattern)) {\n\t var newpart = '';\n\t for (var j = 0, k = part.length; j < k; j++) {\n\t if (part.charCodeAt(j) > 127) {\n\t // we replace non-ASCII char with a temporary placeholder\n\t // we need this to make sure size of hostname is not\n\t // broken by replacing non-ASCII by nothing\n\t newpart += 'x';\n\t } else {\n\t newpart += part[j];\n\t }\n\t }\n\t // we test again with ASCII char only\n\t if (!newpart.match(hostnamePartPattern)) {\n\t var validParts = hostparts.slice(0, i);\n\t var notHost = hostparts.slice(i + 1);\n\t var bit = part.match(hostnamePartStart);\n\t if (bit) {\n\t validParts.push(bit[1]);\n\t notHost.unshift(bit[2]);\n\t }\n\t if (notHost.length) {\n\t rest = '/' + notHost.join('.') + rest;\n\t }\n\t this.hostname = validParts.join('.');\n\t break;\n\t }\n\t }\n\t }\n\t }\n\t\n\t if (this.hostname.length > hostnameMaxLen) {\n\t this.hostname = '';\n\t } else {\n\t // hostnames are always lower case.\n\t this.hostname = this.hostname.toLowerCase();\n\t }\n\t\n\t if (!ipv6Hostname) {\n\t // IDNA Support: Returns a punycoded representation of \"domain\".\n\t // It only converts parts of the domain name that\n\t // have non-ASCII characters, i.e. it doesn't matter if\n\t // you call it with a domain that already is ASCII-only.\n\t this.hostname = punycode.toASCII(this.hostname);\n\t }\n\t\n\t var p = this.port ? ':' + this.port : '';\n\t var h = this.hostname || '';\n\t this.host = h + p;\n\t this.href += this.host;\n\t\n\t // strip [ and ] from the hostname\n\t // the host field still retains them, though\n\t if (ipv6Hostname) {\n\t this.hostname = this.hostname.substr(1, this.hostname.length - 2);\n\t if (rest[0] !== '/') {\n\t rest = '/' + rest;\n\t }\n\t }\n\t }\n\t\n\t // now rest is set to the post-host stuff.\n\t // chop off any delim chars.\n\t if (!unsafeProtocol[lowerProto]) {\n\t\n\t // First, make 100% sure that any \"autoEscape\" chars get\n\t // escaped, even if encodeURIComponent doesn't think they\n\t // need to be.\n\t for (var i = 0, l = autoEscape.length; i < l; i++) {\n\t var ae = autoEscape[i];\n\t if (rest.indexOf(ae) === -1)\n\t continue;\n\t var esc = encodeURIComponent(ae);\n\t if (esc === ae) {\n\t esc = escape(ae);\n\t }\n\t rest = rest.split(ae).join(esc);\n\t }\n\t }\n\t\n\t\n\t // chop off from the tail first.\n\t var hash = rest.indexOf('#');\n\t if (hash !== -1) {\n\t // got a fragment string.\n\t this.hash = rest.substr(hash);\n\t rest = rest.slice(0, hash);\n\t }\n\t var qm = rest.indexOf('?');\n\t if (qm !== -1) {\n\t this.search = rest.substr(qm);\n\t this.query = rest.substr(qm + 1);\n\t if (parseQueryString) {\n\t this.query = querystring.parse(this.query);\n\t }\n\t rest = rest.slice(0, qm);\n\t } else if (parseQueryString) {\n\t // no query string, but parseQueryString still requested\n\t this.search = '';\n\t this.query = {};\n\t }\n\t if (rest) this.pathname = rest;\n\t if (slashedProtocol[lowerProto] &&\n\t this.hostname && !this.pathname) {\n\t this.pathname = '/';\n\t }\n\t\n\t //to support http.request\n\t if (this.pathname || this.search) {\n\t var p = this.pathname || '';\n\t var s = this.search || '';\n\t this.path = p + s;\n\t }\n\t\n\t // finally, reconstruct the href based on what has been validated.\n\t this.href = this.format();\n\t return this;\n\t};\n\t\n\t// format a parsed object into a url string\n\tfunction urlFormat(obj) {\n\t // ensure it's an object, and not a string url.\n\t // If it's an obj, this is a no-op.\n\t // this way, you can call url_format() on strings\n\t // to clean up potentially wonky urls.\n\t if (util.isString(obj)) obj = urlParse(obj);\n\t if (!(obj instanceof Url)) return Url.prototype.format.call(obj);\n\t return obj.format();\n\t}\n\t\n\tUrl.prototype.format = function() {\n\t var auth = this.auth || '';\n\t if (auth) {\n\t auth = encodeURIComponent(auth);\n\t auth = auth.replace(/%3A/i, ':');\n\t auth += '@';\n\t }\n\t\n\t var protocol = this.protocol || '',\n\t pathname = this.pathname || '',\n\t hash = this.hash || '',\n\t host = false,\n\t query = '';\n\t\n\t if (this.host) {\n\t host = auth + this.host;\n\t } else if (this.hostname) {\n\t host = auth + (this.hostname.indexOf(':') === -1 ?\n\t this.hostname :\n\t '[' + this.hostname + ']');\n\t if (this.port) {\n\t host += ':' + this.port;\n\t }\n\t }\n\t\n\t if (this.query &&\n\t util.isObject(this.query) &&\n\t Object.keys(this.query).length) {\n\t query = querystring.stringify(this.query);\n\t }\n\t\n\t var search = this.search || (query && ('?' + query)) || '';\n\t\n\t if (protocol && protocol.substr(-1) !== ':') protocol += ':';\n\t\n\t // only the slashedProtocols get the //. Not mailto:, xmpp:, etc.\n\t // unless they had them to begin with.\n\t if (this.slashes ||\n\t (!protocol || slashedProtocol[protocol]) && host !== false) {\n\t host = '//' + (host || '');\n\t if (pathname && pathname.charAt(0) !== '/') pathname = '/' + pathname;\n\t } else if (!host) {\n\t host = '';\n\t }\n\t\n\t if (hash && hash.charAt(0) !== '#') hash = '#' + hash;\n\t if (search && search.charAt(0) !== '?') search = '?' + search;\n\t\n\t pathname = pathname.replace(/[?#]/g, function(match) {\n\t return encodeURIComponent(match);\n\t });\n\t search = search.replace('#', '%23');\n\t\n\t return protocol + host + pathname + search + hash;\n\t};\n\t\n\tfunction urlResolve(source, relative) {\n\t return urlParse(source, false, true).resolve(relative);\n\t}\n\t\n\tUrl.prototype.resolve = function(relative) {\n\t return this.resolveObject(urlParse(relative, false, true)).format();\n\t};\n\t\n\tfunction urlResolveObject(source, relative) {\n\t if (!source) return relative;\n\t return urlParse(source, false, true).resolveObject(relative);\n\t}\n\t\n\tUrl.prototype.resolveObject = function(relative) {\n\t if (util.isString(relative)) {\n\t var rel = new Url();\n\t rel.parse(relative, false, true);\n\t relative = rel;\n\t }\n\t\n\t var result = new Url();\n\t var tkeys = Object.keys(this);\n\t for (var tk = 0; tk < tkeys.length; tk++) {\n\t var tkey = tkeys[tk];\n\t result[tkey] = this[tkey];\n\t }\n\t\n\t // hash is always overridden, no matter what.\n\t // even href=\"\" will remove it.\n\t result.hash = relative.hash;\n\t\n\t // if the relative url is empty, then there's nothing left to do here.\n\t if (relative.href === '') {\n\t result.href = result.format();\n\t return result;\n\t }\n\t\n\t // hrefs like //foo/bar always cut to the protocol.\n\t if (relative.slashes && !relative.protocol) {\n\t // take everything except the protocol from relative\n\t var rkeys = Object.keys(relative);\n\t for (var rk = 0; rk < rkeys.length; rk++) {\n\t var rkey = rkeys[rk];\n\t if (rkey !== 'protocol')\n\t result[rkey] = relative[rkey];\n\t }\n\t\n\t //urlParse appends trailing / to urls like http://www.example.com\n\t if (slashedProtocol[result.protocol] &&\n\t result.hostname && !result.pathname) {\n\t result.path = result.pathname = '/';\n\t }\n\t\n\t result.href = result.format();\n\t return result;\n\t }\n\t\n\t if (relative.protocol && relative.protocol !== result.protocol) {\n\t // if it's a known url protocol, then changing\n\t // the protocol does weird things\n\t // first, if it's not file:, then we MUST have a host,\n\t // and if there was a path\n\t // to begin with, then we MUST have a path.\n\t // if it is file:, then the host is dropped,\n\t // because that's known to be hostless.\n\t // anything else is assumed to be absolute.\n\t if (!slashedProtocol[relative.protocol]) {\n\t var keys = Object.keys(relative);\n\t for (var v = 0; v < keys.length; v++) {\n\t var k = keys[v];\n\t result[k] = relative[k];\n\t }\n\t result.href = result.format();\n\t return result;\n\t }\n\t\n\t result.protocol = relative.protocol;\n\t if (!relative.host && !hostlessProtocol[relative.protocol]) {\n\t var relPath = (relative.pathname || '').split('/');\n\t while (relPath.length && !(relative.host = relPath.shift()));\n\t if (!relative.host) relative.host = '';\n\t if (!relative.hostname) relative.hostname = '';\n\t if (relPath[0] !== '') relPath.unshift('');\n\t if (relPath.length < 2) relPath.unshift('');\n\t result.pathname = relPath.join('/');\n\t } else {\n\t result.pathname = relative.pathname;\n\t }\n\t result.search = relative.search;\n\t result.query = relative.query;\n\t result.host = relative.host || '';\n\t result.auth = relative.auth;\n\t result.hostname = relative.hostname || relative.host;\n\t result.port = relative.port;\n\t // to support http.request\n\t if (result.pathname || result.search) {\n\t var p = result.pathname || '';\n\t var s = result.search || '';\n\t result.path = p + s;\n\t }\n\t result.slashes = result.slashes || relative.slashes;\n\t result.href = result.format();\n\t return result;\n\t }\n\t\n\t var isSourceAbs = (result.pathname && result.pathname.charAt(0) === '/'),\n\t isRelAbs = (\n\t relative.host ||\n\t relative.pathname && relative.pathname.charAt(0) === '/'\n\t ),\n\t mustEndAbs = (isRelAbs || isSourceAbs ||\n\t (result.host && relative.pathname)),\n\t removeAllDots = mustEndAbs,\n\t srcPath = result.pathname && result.pathname.split('/') || [],\n\t relPath = relative.pathname && relative.pathname.split('/') || [],\n\t psychotic = result.protocol && !slashedProtocol[result.protocol];\n\t\n\t // if the url is a non-slashed url, then relative\n\t // links like ../.. should be able\n\t // to crawl up to the hostname, as well. This is strange.\n\t // result.protocol has already been set by now.\n\t // Later on, put the first path part into the host field.\n\t if (psychotic) {\n\t result.hostname = '';\n\t result.port = null;\n\t if (result.host) {\n\t if (srcPath[0] === '') srcPath[0] = result.host;\n\t else srcPath.unshift(result.host);\n\t }\n\t result.host = '';\n\t if (relative.protocol) {\n\t relative.hostname = null;\n\t relative.port = null;\n\t if (relative.host) {\n\t if (relPath[0] === '') relPath[0] = relative.host;\n\t else relPath.unshift(relative.host);\n\t }\n\t relative.host = null;\n\t }\n\t mustEndAbs = mustEndAbs && (relPath[0] === '' || srcPath[0] === '');\n\t }\n\t\n\t if (isRelAbs) {\n\t // it's absolute.\n\t result.host = (relative.host || relative.host === '') ?\n\t relative.host : result.host;\n\t result.hostname = (relative.hostname || relative.hostname === '') ?\n\t relative.hostname : result.hostname;\n\t result.search = relative.search;\n\t result.query = relative.query;\n\t srcPath = relPath;\n\t // fall through to the dot-handling below.\n\t } else if (relPath.length) {\n\t // it's relative\n\t // throw away the existing file, and take the new path instead.\n\t if (!srcPath) srcPath = [];\n\t srcPath.pop();\n\t srcPath = srcPath.concat(relPath);\n\t result.search = relative.search;\n\t result.query = relative.query;\n\t } else if (!util.isNullOrUndefined(relative.search)) {\n\t // just pull out the search.\n\t // like href='?foo'.\n\t // Put this after the other two cases because it simplifies the booleans\n\t if (psychotic) {\n\t result.hostname = result.host = srcPath.shift();\n\t //occationaly the auth can get stuck only in host\n\t //this especially happens in cases like\n\t //url.resolveObject('mailto:local1@domain1', 'local2@domain2')\n\t var authInHost = result.host && result.host.indexOf('@') > 0 ?\n\t result.host.split('@') : false;\n\t if (authInHost) {\n\t result.auth = authInHost.shift();\n\t result.host = result.hostname = authInHost.shift();\n\t }\n\t }\n\t result.search = relative.search;\n\t result.query = relative.query;\n\t //to support http.request\n\t if (!util.isNull(result.pathname) || !util.isNull(result.search)) {\n\t result.path = (result.pathname ? result.pathname : '') +\n\t (result.search ? result.search : '');\n\t }\n\t result.href = result.format();\n\t return result;\n\t }\n\t\n\t if (!srcPath.length) {\n\t // no path at all. easy.\n\t // we've already handled the other stuff above.\n\t result.pathname = null;\n\t //to support http.request\n\t if (result.search) {\n\t result.path = '/' + result.search;\n\t } else {\n\t result.path = null;\n\t }\n\t result.href = result.format();\n\t return result;\n\t }\n\t\n\t // if a url ENDs in . or .., then it must get a trailing slash.\n\t // however, if it ends in anything else non-slashy,\n\t // then it must NOT get a trailing slash.\n\t var last = srcPath.slice(-1)[0];\n\t var hasTrailingSlash = (\n\t (result.host || relative.host || srcPath.length > 1) &&\n\t (last === '.' || last === '..') || last === '');\n\t\n\t // strip single dots, resolve double dots to parent dir\n\t // if the path tries to go above the root, `up` ends up > 0\n\t var up = 0;\n\t for (var i = srcPath.length; i >= 0; i--) {\n\t last = srcPath[i];\n\t if (last === '.') {\n\t srcPath.splice(i, 1);\n\t } else if (last === '..') {\n\t srcPath.splice(i, 1);\n\t up++;\n\t } else if (up) {\n\t srcPath.splice(i, 1);\n\t up--;\n\t }\n\t }\n\t\n\t // if the path is allowed to go above the root, restore leading ..s\n\t if (!mustEndAbs && !removeAllDots) {\n\t for (; up--; up) {\n\t srcPath.unshift('..');\n\t }\n\t }\n\t\n\t if (mustEndAbs && srcPath[0] !== '' &&\n\t (!srcPath[0] || srcPath[0].charAt(0) !== '/')) {\n\t srcPath.unshift('');\n\t }\n\t\n\t if (hasTrailingSlash && (srcPath.join('/').substr(-1) !== '/')) {\n\t srcPath.push('');\n\t }\n\t\n\t var isAbsolute = srcPath[0] === '' ||\n\t (srcPath[0] && srcPath[0].charAt(0) === '/');\n\t\n\t // put the host back\n\t if (psychotic) {\n\t result.hostname = result.host = isAbsolute ? '' :\n\t srcPath.length ? srcPath.shift() : '';\n\t //occationaly the auth can get stuck only in host\n\t //this especially happens in cases like\n\t //url.resolveObject('mailto:local1@domain1', 'local2@domain2')\n\t var authInHost = result.host && result.host.indexOf('@') > 0 ?\n\t result.host.split('@') : false;\n\t if (authInHost) {\n\t result.auth = authInHost.shift();\n\t result.host = result.hostname = authInHost.shift();\n\t }\n\t }\n\t\n\t mustEndAbs = mustEndAbs || (result.host && srcPath.length);\n\t\n\t if (mustEndAbs && !isAbsolute) {\n\t srcPath.unshift('');\n\t }\n\t\n\t if (!srcPath.length) {\n\t result.pathname = null;\n\t result.path = null;\n\t } else {\n\t result.pathname = srcPath.join('/');\n\t }\n\t\n\t //to support request.http\n\t if (!util.isNull(result.pathname) || !util.isNull(result.search)) {\n\t result.path = (result.pathname ? result.pathname : '') +\n\t (result.search ? result.search : '');\n\t }\n\t result.auth = relative.auth || result.auth;\n\t result.slashes = result.slashes || relative.slashes;\n\t result.href = result.format();\n\t return result;\n\t};\n\t\n\tUrl.prototype.parseHost = function() {\n\t var host = this.host;\n\t var port = portPattern.exec(host);\n\t if (port) {\n\t port = port[0];\n\t if (port !== ':') {\n\t this.port = port.substr(1);\n\t }\n\t host = host.substr(0, host.length - port.length);\n\t }\n\t if (host) this.hostname = host;\n\t};\n\t\n\t},{\"./util\":44,\"punycode\":39,\"querystring\":42}],44:[function(require,module,exports){\n\t'use strict';\n\t\n\tmodule.exports = {\n\t isString: function(arg) {\n\t return typeof(arg) === 'string';\n\t },\n\t isObject: function(arg) {\n\t return typeof(arg) === 'object' && arg !== null;\n\t },\n\t isNull: function(arg) {\n\t return arg === null;\n\t },\n\t isNullOrUndefined: function(arg) {\n\t return arg == null;\n\t }\n\t};\n\t\n\t},{}],45:[function(require,module,exports){\n\t\n\t/**\n\t * slice() reference.\n\t */\n\t\n\tvar slice = Array.prototype.slice;\n\t\n\t/**\n\t * Expose `co`.\n\t */\n\t\n\tmodule.exports = co['default'] = co.co = co;\n\t\n\t/**\n\t * Wrap the given generator `fn` into a\n\t * function that returns a promise.\n\t * This is a separate function so that\n\t * every `co()` call doesn't create a new,\n\t * unnecessary closure.\n\t *\n\t * @param {GeneratorFunction} fn\n\t * @return {Function}\n\t * @api public\n\t */\n\t\n\tco.wrap = function (fn) {\n\t createPromise.__generatorFunction__ = fn;\n\t return createPromise;\n\t function createPromise() {\n\t return co.call(this, fn.apply(this, arguments));\n\t }\n\t};\n\t\n\t/**\n\t * Execute the generator function or a generator\n\t * and return a promise.\n\t *\n\t * @param {Function} fn\n\t * @return {Promise}\n\t * @api public\n\t */\n\t\n\tfunction co(gen) {\n\t var ctx = this;\n\t var args = slice.call(arguments, 1)\n\t\n\t // we wrap everything in a promise to avoid promise chaining,\n\t // which leads to memory leak errors.\n\t // see https://github.com/tj/co/issues/180\n\t return new Promise(function(resolve, reject) {\n\t if (typeof gen === 'function') gen = gen.apply(ctx, args);\n\t if (!gen || typeof gen.next !== 'function') return resolve(gen);\n\t\n\t onFulfilled();\n\t\n\t /**\n\t * @param {Mixed} res\n\t * @return {Promise}\n\t * @api private\n\t */\n\t\n\t function onFulfilled(res) {\n\t var ret;\n\t try {\n\t ret = gen.next(res);\n\t } catch (e) {\n\t return reject(e);\n\t }\n\t next(ret);\n\t }\n\t\n\t /**\n\t * @param {Error} err\n\t * @return {Promise}\n\t * @api private\n\t */\n\t\n\t function onRejected(err) {\n\t var ret;\n\t try {\n\t ret = gen.throw(err);\n\t } catch (e) {\n\t return reject(e);\n\t }\n\t next(ret);\n\t }\n\t\n\t /**\n\t * Get the next value in the generator,\n\t * return a promise.\n\t *\n\t * @param {Object} ret\n\t * @return {Promise}\n\t * @api private\n\t */\n\t\n\t function next(ret) {\n\t if (ret.done) return resolve(ret.value);\n\t var value = toPromise.call(ctx, ret.value);\n\t if (value && isPromise(value)) return value.then(onFulfilled, onRejected);\n\t return onRejected(new TypeError('You may only yield a function, promise, generator, array, or object, '\n\t + 'but the following object was passed: \"' + String(ret.value) + '\"'));\n\t }\n\t });\n\t}\n\t\n\t/**\n\t * Convert a `yield`ed value into a promise.\n\t *\n\t * @param {Mixed} obj\n\t * @return {Promise}\n\t * @api private\n\t */\n\t\n\tfunction toPromise(obj) {\n\t if (!obj) return obj;\n\t if (isPromise(obj)) return obj;\n\t if (isGeneratorFunction(obj) || isGenerator(obj)) return co.call(this, obj);\n\t if ('function' == typeof obj) return thunkToPromise.call(this, obj);\n\t if (Array.isArray(obj)) return arrayToPromise.call(this, obj);\n\t if (isObject(obj)) return objectToPromise.call(this, obj);\n\t return obj;\n\t}\n\t\n\t/**\n\t * Convert a thunk to a promise.\n\t *\n\t * @param {Function}\n\t * @return {Promise}\n\t * @api private\n\t */\n\t\n\tfunction thunkToPromise(fn) {\n\t var ctx = this;\n\t return new Promise(function (resolve, reject) {\n\t fn.call(ctx, function (err, res) {\n\t if (err) return reject(err);\n\t if (arguments.length > 2) res = slice.call(arguments, 1);\n\t resolve(res);\n\t });\n\t });\n\t}\n\t\n\t/**\n\t * Convert an array of \"yieldables\" to a promise.\n\t * Uses `Promise.all()` internally.\n\t *\n\t * @param {Array} obj\n\t * @return {Promise}\n\t * @api private\n\t */\n\t\n\tfunction arrayToPromise(obj) {\n\t return Promise.all(obj.map(toPromise, this));\n\t}\n\t\n\t/**\n\t * Convert an object of \"yieldables\" to a promise.\n\t * Uses `Promise.all()` internally.\n\t *\n\t * @param {Object} obj\n\t * @return {Promise}\n\t * @api private\n\t */\n\t\n\tfunction objectToPromise(obj){\n\t var results = new obj.constructor();\n\t var keys = Object.keys(obj);\n\t var promises = [];\n\t for (var i = 0; i < keys.length; i++) {\n\t var key = keys[i];\n\t var promise = toPromise.call(this, obj[key]);\n\t if (promise && isPromise(promise)) defer(promise, key);\n\t else results[key] = obj[key];\n\t }\n\t return Promise.all(promises).then(function () {\n\t return results;\n\t });\n\t\n\t function defer(promise, key) {\n\t // predefine the key in the result\n\t results[key] = undefined;\n\t promises.push(promise.then(function (res) {\n\t results[key] = res;\n\t }));\n\t }\n\t}\n\t\n\t/**\n\t * Check if `obj` is a promise.\n\t *\n\t * @param {Object} obj\n\t * @return {Boolean}\n\t * @api private\n\t */\n\t\n\tfunction isPromise(obj) {\n\t return 'function' == typeof obj.then;\n\t}\n\t\n\t/**\n\t * Check if `obj` is a generator.\n\t *\n\t * @param {Mixed} obj\n\t * @return {Boolean}\n\t * @api private\n\t */\n\t\n\tfunction isGenerator(obj) {\n\t return 'function' == typeof obj.next && 'function' == typeof obj.throw;\n\t}\n\t\n\t/**\n\t * Check if `obj` is a generator function.\n\t *\n\t * @param {Mixed} obj\n\t * @return {Boolean}\n\t * @api private\n\t */\n\tfunction isGeneratorFunction(obj) {\n\t var constructor = obj.constructor;\n\t if (!constructor) return false;\n\t if ('GeneratorFunction' === constructor.name || 'GeneratorFunction' === constructor.displayName) return true;\n\t return isGenerator(constructor.prototype);\n\t}\n\t\n\t/**\n\t * Check for plain object.\n\t *\n\t * @param {Mixed} val\n\t * @return {Boolean}\n\t * @api private\n\t */\n\t\n\tfunction isObject(val) {\n\t return Object == val.constructor;\n\t}\n\t\n\t},{}],46:[function(require,module,exports){\n\tvar json = typeof JSON !== 'undefined' ? JSON : require('jsonify');\n\t\n\tmodule.exports = function (obj, opts) {\n\t if (!opts) opts = {};\n\t if (typeof opts === 'function') opts = { cmp: opts };\n\t var space = opts.space || '';\n\t if (typeof space === 'number') space = Array(space+1).join(' ');\n\t var cycles = (typeof opts.cycles === 'boolean') ? opts.cycles : false;\n\t var replacer = opts.replacer || function(key, value) { return value; };\n\t\n\t var cmp = opts.cmp && (function (f) {\n\t return function (node) {\n\t return function (a, b) {\n\t var aobj = { key: a, value: node[a] };\n\t var bobj = { key: b, value: node[b] };\n\t return f(aobj, bobj);\n\t };\n\t };\n\t })(opts.cmp);\n\t\n\t var seen = [];\n\t return (function stringify (parent, key, node, level) {\n\t var indent = space ? ('\\n' + new Array(level + 1).join(space)) : '';\n\t var colonSeparator = space ? ': ' : ':';\n\t\n\t if (node && node.toJSON && typeof node.toJSON === 'function') {\n\t node = node.toJSON();\n\t }\n\t\n\t node = replacer.call(parent, key, node);\n\t\n\t if (node === undefined) {\n\t return;\n\t }\n\t if (typeof node !== 'object' || node === null) {\n\t return json.stringify(node);\n\t }\n\t if (isArray(node)) {\n\t var out = [];\n\t for (var i = 0; i < node.length; i++) {\n\t var item = stringify(node, i, node[i], level+1) || json.stringify(null);\n\t out.push(indent + space + item);\n\t }\n\t return '[' + out.join(',') + indent + ']';\n\t }\n\t else {\n\t if (seen.indexOf(node) !== -1) {\n\t if (cycles) return json.stringify('__cycle__');\n\t throw new TypeError('Converting circular structure to JSON');\n\t }\n\t else seen.push(node);\n\t\n\t var keys = objectKeys(node).sort(cmp && cmp(node));\n\t var out = [];\n\t for (var i = 0; i < keys.length; i++) {\n\t var key = keys[i];\n\t var value = stringify(node, key, node[key], level+1);\n\t\n\t if(!value) continue;\n\t\n\t var keyValue = json.stringify(key)\n\t + colonSeparator\n\t + value;\n\t ;\n\t out.push(indent + space + keyValue);\n\t }\n\t seen.splice(seen.indexOf(node), 1);\n\t return '{' + out.join(',') + indent + '}';\n\t }\n\t })({ '': obj }, '', obj, 0);\n\t};\n\t\n\tvar isArray = Array.isArray || function (x) {\n\t return {}.toString.call(x) === '[object Array]';\n\t};\n\t\n\tvar objectKeys = Object.keys || function (obj) {\n\t var has = Object.prototype.hasOwnProperty || function () { return true };\n\t var keys = [];\n\t for (var key in obj) {\n\t if (has.call(obj, key)) keys.push(key);\n\t }\n\t return keys;\n\t};\n\t\n\t},{\"jsonify\":47}],47:[function(require,module,exports){\n\texports.parse = require('./lib/parse');\n\texports.stringify = require('./lib/stringify');\n\t\n\t},{\"./lib/parse\":48,\"./lib/stringify\":49}],48:[function(require,module,exports){\n\tvar at, // The index of the current character\n\t ch, // The current character\n\t escapee = {\n\t '\"': '\"',\n\t '\\\\': '\\\\',\n\t '/': '/',\n\t b: '\\b',\n\t f: '\\f',\n\t n: '\\n',\n\t r: '\\r',\n\t t: '\\t'\n\t },\n\t text,\n\t\n\t error = function (m) {\n\t // Call error when something is wrong.\n\t throw {\n\t name: 'SyntaxError',\n\t message: m,\n\t at: at,\n\t text: text\n\t };\n\t },\n\t \n\t next = function (c) {\n\t // If a c parameter is provided, verify that it matches the current character.\n\t if (c && c !== ch) {\n\t error(\"Expected '\" + c + \"' instead of '\" + ch + \"'\");\n\t }\n\t \n\t // Get the next character. When there are no more characters,\n\t // return the empty string.\n\t \n\t ch = text.charAt(at);\n\t at += 1;\n\t return ch;\n\t },\n\t \n\t number = function () {\n\t // Parse a number value.\n\t var number,\n\t string = '';\n\t \n\t if (ch === '-') {\n\t string = '-';\n\t next('-');\n\t }\n\t while (ch >= '0' && ch <= '9') {\n\t string += ch;\n\t next();\n\t }\n\t if (ch === '.') {\n\t string += '.';\n\t while (next() && ch >= '0' && ch <= '9') {\n\t string += ch;\n\t }\n\t }\n\t if (ch === 'e' || ch === 'E') {\n\t string += ch;\n\t next();\n\t if (ch === '-' || ch === '+') {\n\t string += ch;\n\t next();\n\t }\n\t while (ch >= '0' && ch <= '9') {\n\t string += ch;\n\t next();\n\t }\n\t }\n\t number = +string;\n\t if (!isFinite(number)) {\n\t error(\"Bad number\");\n\t } else {\n\t return number;\n\t }\n\t },\n\t \n\t string = function () {\n\t // Parse a string value.\n\t var hex,\n\t i,\n\t string = '',\n\t uffff;\n\t \n\t // When parsing for string values, we must look for \" and \\ characters.\n\t if (ch === '\"') {\n\t while (next()) {\n\t if (ch === '\"') {\n\t next();\n\t return string;\n\t } else if (ch === '\\\\') {\n\t next();\n\t if (ch === 'u') {\n\t uffff = 0;\n\t for (i = 0; i < 4; i += 1) {\n\t hex = parseInt(next(), 16);\n\t if (!isFinite(hex)) {\n\t break;\n\t }\n\t uffff = uffff * 16 + hex;\n\t }\n\t string += String.fromCharCode(uffff);\n\t } else if (typeof escapee[ch] === 'string') {\n\t string += escapee[ch];\n\t } else {\n\t break;\n\t }\n\t } else {\n\t string += ch;\n\t }\n\t }\n\t }\n\t error(\"Bad string\");\n\t },\n\t\n\t white = function () {\n\t\n\t// Skip whitespace.\n\t\n\t while (ch && ch <= ' ') {\n\t next();\n\t }\n\t },\n\t\n\t word = function () {\n\t\n\t// true, false, or null.\n\t\n\t switch (ch) {\n\t case 't':\n\t next('t');\n\t next('r');\n\t next('u');\n\t next('e');\n\t return true;\n\t case 'f':\n\t next('f');\n\t next('a');\n\t next('l');\n\t next('s');\n\t next('e');\n\t return false;\n\t case 'n':\n\t next('n');\n\t next('u');\n\t next('l');\n\t next('l');\n\t return null;\n\t }\n\t error(\"Unexpected '\" + ch + \"'\");\n\t },\n\t\n\t value, // Place holder for the value function.\n\t\n\t array = function () {\n\t\n\t// Parse an array value.\n\t\n\t var array = [];\n\t\n\t if (ch === '[') {\n\t next('[');\n\t white();\n\t if (ch === ']') {\n\t next(']');\n\t return array; // empty array\n\t }\n\t while (ch) {\n\t array.push(value());\n\t white();\n\t if (ch === ']') {\n\t next(']');\n\t return array;\n\t }\n\t next(',');\n\t white();\n\t }\n\t }\n\t error(\"Bad array\");\n\t },\n\t\n\t object = function () {\n\t\n\t// Parse an object value.\n\t\n\t var key,\n\t object = {};\n\t\n\t if (ch === '{') {\n\t next('{');\n\t white();\n\t if (ch === '}') {\n\t next('}');\n\t return object; // empty object\n\t }\n\t while (ch) {\n\t key = string();\n\t white();\n\t next(':');\n\t if (Object.hasOwnProperty.call(object, key)) {\n\t error('Duplicate key \"' + key + '\"');\n\t }\n\t object[key] = value();\n\t white();\n\t if (ch === '}') {\n\t next('}');\n\t return object;\n\t }\n\t next(',');\n\t white();\n\t }\n\t }\n\t error(\"Bad object\");\n\t };\n\t\n\tvalue = function () {\n\t\n\t// Parse a JSON value. It could be an object, an array, a string, a number,\n\t// or a word.\n\t\n\t white();\n\t switch (ch) {\n\t case '{':\n\t return object();\n\t case '[':\n\t return array();\n\t case '\"':\n\t return string();\n\t case '-':\n\t return number();\n\t default:\n\t return ch >= '0' && ch <= '9' ? number() : word();\n\t }\n\t};\n\t\n\t// Return the json_parse function. It will have access to all of the above\n\t// functions and variables.\n\t\n\tmodule.exports = function (source, reviver) {\n\t var result;\n\t \n\t text = source;\n\t at = 0;\n\t ch = ' ';\n\t result = value();\n\t white();\n\t if (ch) {\n\t error(\"Syntax error\");\n\t }\n\t\n\t // If there is a reviver function, we recursively walk the new structure,\n\t // passing each name/value pair to the reviver function for possible\n\t // transformation, starting with a temporary root object that holds the result\n\t // in an empty key. If there is not a reviver function, we simply return the\n\t // result.\n\t\n\t return typeof reviver === 'function' ? (function walk(holder, key) {\n\t var k, v, value = holder[key];\n\t if (value && typeof value === 'object') {\n\t for (k in value) {\n\t if (Object.prototype.hasOwnProperty.call(value, k)) {\n\t v = walk(value, k);\n\t if (v !== undefined) {\n\t value[k] = v;\n\t } else {\n\t delete value[k];\n\t }\n\t }\n\t }\n\t }\n\t return reviver.call(holder, key, value);\n\t }({'': result}, '')) : result;\n\t};\n\t\n\t},{}],49:[function(require,module,exports){\n\tvar cx = /[\\u0000\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]/g,\n\t escapable = /[\\\\\\\"\\x00-\\x1f\\x7f-\\x9f\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]/g,\n\t gap,\n\t indent,\n\t meta = { // table of character substitutions\n\t '\\b': '\\\\b',\n\t '\\t': '\\\\t',\n\t '\\n': '\\\\n',\n\t '\\f': '\\\\f',\n\t '\\r': '\\\\r',\n\t '\"' : '\\\\\"',\n\t '\\\\': '\\\\\\\\'\n\t },\n\t rep;\n\t\n\tfunction quote(string) {\n\t // If the string contains no control characters, no quote characters, and no\n\t // backslash characters, then we can safely slap some quotes around it.\n\t // Otherwise we must also replace the offending characters with safe escape\n\t // sequences.\n\t \n\t escapable.lastIndex = 0;\n\t return escapable.test(string) ? '\"' + string.replace(escapable, function (a) {\n\t var c = meta[a];\n\t return typeof c === 'string' ? c :\n\t '\\\\u' + ('0000' + a.charCodeAt(0).toString(16)).slice(-4);\n\t }) + '\"' : '\"' + string + '\"';\n\t}\n\t\n\tfunction str(key, holder) {\n\t // Produce a string from holder[key].\n\t var i, // The loop counter.\n\t k, // The member key.\n\t v, // The member value.\n\t length,\n\t mind = gap,\n\t partial,\n\t value = holder[key];\n\t \n\t // If the value has a toJSON method, call it to obtain a replacement value.\n\t if (value && typeof value === 'object' &&\n\t typeof value.toJSON === 'function') {\n\t value = value.toJSON(key);\n\t }\n\t \n\t // If we were called with a replacer function, then call the replacer to\n\t // obtain a replacement value.\n\t if (typeof rep === 'function') {\n\t value = rep.call(holder, key, value);\n\t }\n\t \n\t // What happens next depends on the value's type.\n\t switch (typeof value) {\n\t case 'string':\n\t return quote(value);\n\t \n\t case 'number':\n\t // JSON numbers must be finite. Encode non-finite numbers as null.\n\t return isFinite(value) ? String(value) : 'null';\n\t \n\t case 'boolean':\n\t case 'null':\n\t // If the value is a boolean or null, convert it to a string. Note:\n\t // typeof null does not produce 'null'. The case is included here in\n\t // the remote chance that this gets fixed someday.\n\t return String(value);\n\t \n\t case 'object':\n\t if (!value) return 'null';\n\t gap += indent;\n\t partial = [];\n\t \n\t // Array.isArray\n\t if (Object.prototype.toString.apply(value) === '[object Array]') {\n\t length = value.length;\n\t for (i = 0; i < length; i += 1) {\n\t partial[i] = str(i, value) || 'null';\n\t }\n\t \n\t // Join all of the elements together, separated with commas, and\n\t // wrap them in brackets.\n\t v = partial.length === 0 ? '[]' : gap ?\n\t '[\\n' + gap + partial.join(',\\n' + gap) + '\\n' + mind + ']' :\n\t '[' + partial.join(',') + ']';\n\t gap = mind;\n\t return v;\n\t }\n\t \n\t // If the replacer is an array, use it to select the members to be\n\t // stringified.\n\t if (rep && typeof rep === 'object') {\n\t length = rep.length;\n\t for (i = 0; i < length; i += 1) {\n\t k = rep[i];\n\t if (typeof k === 'string') {\n\t v = str(k, value);\n\t if (v) {\n\t partial.push(quote(k) + (gap ? ': ' : ':') + v);\n\t }\n\t }\n\t }\n\t }\n\t else {\n\t // Otherwise, iterate through all of the keys in the object.\n\t for (k in value) {\n\t if (Object.prototype.hasOwnProperty.call(value, k)) {\n\t v = str(k, value);\n\t if (v) {\n\t partial.push(quote(k) + (gap ? ': ' : ':') + v);\n\t }\n\t }\n\t }\n\t }\n\t \n\t // Join all of the member texts together, separated with commas,\n\t // and wrap them in braces.\n\t\n\t v = partial.length === 0 ? '{}' : gap ?\n\t '{\\n' + gap + partial.join(',\\n' + gap) + '\\n' + mind + '}' :\n\t '{' + partial.join(',') + '}';\n\t gap = mind;\n\t return v;\n\t }\n\t}\n\t\n\tmodule.exports = function (value, replacer, space) {\n\t var i;\n\t gap = '';\n\t indent = '';\n\t \n\t // If the space parameter is a number, make an indent string containing that\n\t // many spaces.\n\t if (typeof space === 'number') {\n\t for (i = 0; i < space; i += 1) {\n\t indent += ' ';\n\t }\n\t }\n\t // If the space parameter is a string, it will be used as the indent string.\n\t else if (typeof space === 'string') {\n\t indent = space;\n\t }\n\t\n\t // If there is a replacer, it must be a function or an array.\n\t // Otherwise, throw an error.\n\t rep = replacer;\n\t if (replacer && typeof replacer !== 'function'\n\t && (typeof replacer !== 'object' || typeof replacer.length !== 'number')) {\n\t throw new Error('JSON.stringify');\n\t }\n\t \n\t // Make a fake root object containing our value under the key of ''.\n\t // Return the result of stringifying the value.\n\t return str('', {'': value});\n\t};\n\t\n\t},{}],\"ajv\":[function(require,module,exports){\n\t'use strict';\n\t\n\tvar compileSchema = require('./compile')\n\t , resolve = require('./compile/resolve')\n\t , Cache = require('./cache')\n\t , SchemaObject = require('./compile/schema_obj')\n\t , stableStringify = require('json-stable-stringify')\n\t , formats = require('./compile/formats')\n\t , rules = require('./compile/rules')\n\t , v5 = require('./v5')\n\t , util = require('./compile/util')\n\t , async = require('./async')\n\t , co = require('co');\n\t\n\tmodule.exports = Ajv;\n\t\n\tAjv.prototype.compileAsync = async.compile;\n\tAjv.prototype.addKeyword = require('./keyword');\n\tAjv.ValidationError = require('./compile/validation_error');\n\t\n\tvar META_SCHEMA_ID = 'http://json-schema.org/draft-04/schema';\n\tvar SCHEMA_URI_FORMAT = /^(?:(?:[a-z][a-z0-9+-.]*:)?\\/\\/)?[^\\s]*$/i;\n\tfunction SCHEMA_URI_FORMAT_FUNC(str) {\n\t return SCHEMA_URI_FORMAT.test(str);\n\t}\n\t\n\tvar META_IGNORE_OPTIONS = [ 'removeAdditional', 'useDefaults', 'coerceTypes' ];\n\t\n\t/**\n\t * Creates validator instance.\n\t * Usage: `Ajv(opts)`\n\t * @param {Object} opts optional options\n\t * @return {Object} ajv instance\n\t */\n\tfunction Ajv(opts) {\n\t if (!(this instanceof Ajv)) return new Ajv(opts);\n\t var self = this;\n\t\n\t opts = this._opts = util.copy(opts) || {};\n\t this._schemas = {};\n\t this._refs = {};\n\t this._formats = formats(opts.format);\n\t this._cache = opts.cache || new Cache;\n\t this._loadingSchemas = {};\n\t this.RULES = rules();\n\t\n\t // this is done on purpose, so that methods are bound to the instance\n\t // (without using bind) so that they can be used without the instance\n\t this.validate = validate;\n\t this.compile = compile;\n\t this.addSchema = addSchema;\n\t this.addMetaSchema = addMetaSchema;\n\t this.validateSchema = validateSchema;\n\t this.getSchema = getSchema;\n\t this.removeSchema = removeSchema;\n\t this.addFormat = addFormat;\n\t this.errorsText = errorsText;\n\t\n\t this._addSchema = _addSchema;\n\t this._compile = _compile;\n\t\n\t opts.loopRequired = opts.loopRequired || Infinity;\n\t if (opts.async || opts.transpile) async.setup(opts);\n\t if (opts.beautify === true) opts.beautify = { indent_size: 2 };\n\t if (opts.errorDataPath == 'property') opts._errorDataPathProperty = true;\n\t this._metaOpts = getMetaSchemaOptions();\n\t\n\t addInitialSchemas();\n\t if (opts.formats) addInitialFormats();\n\t if (opts.v5) v5.enable(this);\n\t if (typeof opts.meta == 'object') addMetaSchema(opts.meta);\n\t\n\t\n\t /**\n\t * Validate data using schema\n\t * Schema will be compiled and cached (using serialized JSON as key. [json-stable-stringify](https://github.com/substack/json-stable-stringify) is used to serialize.\n\t * @param {String|Object} schemaKeyRef key, ref or schema object\n\t * @param {Any} data to be validated\n\t * @return {Boolean} validation result. Errors from the last validation will be available in `ajv.errors` (and also in compiled schema: `schema.errors`).\n\t */\n\t function validate(schemaKeyRef, data) {\n\t var v;\n\t if (typeof schemaKeyRef == 'string') {\n\t v = getSchema(schemaKeyRef);\n\t if (!v) throw new Error('no schema with key or ref \"' + schemaKeyRef + '\"');\n\t } else {\n\t var schemaObj = _addSchema(schemaKeyRef);\n\t v = schemaObj.validate || _compile(schemaObj);\n\t }\n\t\n\t var valid = v(data);\n\t if (v.async) return self._opts.async == '*' ? co(valid) : valid;\n\t self.errors = v.errors;\n\t return valid;\n\t }\n\t\n\t\n\t /**\n\t * Create validating function for passed schema.\n\t * @param {Object} schema schema object\n\t * @return {Function} validating function\n\t */\n\t function compile(schema) {\n\t var schemaObj = _addSchema(schema);\n\t return schemaObj.validate || _compile(schemaObj);\n\t }\n\t\n\t\n\t /**\n\t * Adds schema to the instance.\n\t * @param {Object|Array} schema schema or array of schemas. If array is passed, `key` and other parameters will be ignored.\n\t * @param {String} key Optional schema key. Can be passed to `validate` method instead of schema object or id/ref. One schema per instance can have empty `id` and `key`.\n\t * @param {Boolean} _skipValidation true to skip schema validation. Used internally, option validateSchema should be used instead.\n\t * @param {Boolean} _meta true if schema is a meta-schema. Used internally, addMetaSchema should be used instead.\n\t */\n\t function addSchema(schema, key, _skipValidation, _meta) {\n\t if (Array.isArray(schema)){\n\t for (var i=0; i} errors optional array of validation errors, if not passed errors from the instance are used.\n\t * @param {Object} options optional options with properties `separator` and `dataVar`.\n\t * @return {String} human readable string with all errors descriptions\n\t */\n\t function errorsText(errors, options) {\n\t errors = errors || self.errors;\n\t if (!errors) return 'No errors';\n\t options = options || {};\n\t var separator = options.separator || ', ';\n\t var dataVar = options.dataVar || 'data';\n\t\n\t var text = '';\n\t for (var i=0; i= 0\n || format === 'transparent';\n }\n });\n\n // TODO: add more types here\n\n return function Decorator(target) {\n const proxyConfig = target.prototype.config;\n target.prototype.config = function proxy(name, value) {\n if (schema.hasOwnProperty(name)) {\n const valid = ajv.validate(schema[name], value);\n if (valid) {\n return proxyConfig.call(this, name, value);\n }\n\n // TODO: handle errors\n // console.log(`${name} config ${ajv.errorsText()}`);\n throw Error(`${name} config ${ajv.errorsText()}`);\n } else {\n return proxyConfig.call(this, name, value);\n }\n };\n };\n}\n\nif (ON_TEST) {\n require('./index.spec.js')(KotoConfig);\n}\n\nexport default KotoConfig;\n\n\n\n/** WEBPACK FOOTER **\n ** ./index.js\n **/","(function(f){if(typeof exports===\"object\"&&typeof module!==\"undefined\"){module.exports=f()}else if(typeof define===\"function\"&&define.amd){define([],f)}else{var g;if(typeof window!==\"undefined\"){g=window}else if(typeof global!==\"undefined\"){g=global}else if(typeof self!==\"undefined\"){g=self}else{g=this}g.Ajv = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require==\"function\"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error(\"Cannot find module '\"+o+\"'\");throw f.code=\"MODULE_NOT_FOUND\",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require==\"function\"&&require;for(var o=0;o= 1 && month <= 12 && day >= 1 && day <= DAYS[month];\n}\n\n\nfunction time(str, full) {\n var matches = str.match(TIME);\n if (!matches) return false;\n\n var hour = matches[1];\n var minute = matches[2];\n var second = matches[3];\n var timeZone = matches[5];\n return hour <= 23 && minute <= 59 && second <= 59 && (!full || timeZone);\n}\n\n\nvar DATE_TIME_SEPARATOR = /t|\\s/i;\nfunction date_time(str) {\n // http://tools.ietf.org/html/rfc3339#section-5.6\n var dateTime = str.split(DATE_TIME_SEPARATOR);\n return date(dateTime[0]) && time(dateTime[1], true);\n}\n\n\nfunction hostname(str) {\n // http://tools.ietf.org/html/rfc1034#section-3.5\n return str.length <= 255 && HOSTNAME.test(str);\n}\n\n\nvar NOT_URI_FRAGMENT = /\\/|\\:/;\nfunction uri(str) {\n // http://jmrware.com/articles/2009/uri_regexp/URI_regex.html + optional protocol + required \".\"\n return NOT_URI_FRAGMENT.test(str) && URI.test(str);\n}\n\n\nfunction regex(str) {\n try {\n new RegExp(str);\n return true;\n } catch(e) {\n return false;\n }\n}\n\n\nfunction compareDate(d1, d2) {\n if (!(d1 && d2)) return;\n if (d1 > d2) return 1;\n if (d1 < d2) return -1;\n if (d1 === d2) return 0;\n}\n\n\nfunction compareTime(t1, t2) {\n if (!(t1 && t2)) return;\n t1 = t1.match(TIME);\n t2 = t2.match(TIME);\n if (!(t1 && t2)) return;\n t1 = t1[1] + t1[2] + t1[3] + (t1[4]||'');\n t2 = t2[1] + t2[2] + t2[3] + (t2[4]||'');\n if (t1 > t2) return 1;\n if (t1 < t2) return -1;\n if (t1 === t2) return 0;\n}\n\n\nfunction compareDateTime(dt1, dt2) {\n if (!(dt1 && dt2)) return;\n dt1 = dt1.split(DATE_TIME_SEPARATOR);\n dt2 = dt2.split(DATE_TIME_SEPARATOR);\n var res = compareDate(dt1[0], dt2[0]);\n if (res === undefined) return;\n return res || compareTime(dt1[1], dt2[1]);\n}\n\n},{\"./util\":10}],6:[function(require,module,exports){\n'use strict';\n\nvar resolve = require('./resolve')\n , util = require('./util')\n , stableStringify = require('json-stable-stringify')\n , async = require('../async');\n\nvar beautify = (function() { try { return require('' + 'js-beautify').js_beautify; } catch(e) {/*empty*/} })();\n\nvar validateGenerator = require('../dotjs/validate');\n\nmodule.exports = compile;\n\n\n/**\n * Compiles schema to validation function\n * @this Ajv\n * @param {Object} schema schema object\n * @param {Object} root object with information about the root schema for this schema\n * @param {Object} localRefs the hash of local references inside the schema (created by resolve.id), used for inline resolution\n * @param {String} baseId base ID for IDs in the schema\n * @return {Function} validation function\n */\nfunction compile(schema, root, localRefs, baseId) {\n /* jshint validthis: true, evil: true */\n /* eslint no-shadow: 0 */\n var self = this\n , opts = this._opts\n , refVal = [ undefined ]\n , refs = {}\n , patterns = []\n , patternsHash = {}\n , defaults = []\n , defaultsHash = {}\n , customRules = [];\n\n root = root || { schema: schema, refVal: refVal, refs: refs };\n\n var formats = this._formats;\n var RULES = this.RULES;\n\n return localCompile(schema, root, localRefs, baseId);\n\n\n function localCompile(_schema, _root, localRefs, baseId) {\n var isRoot = !_root || (_root && _root.schema == _schema);\n if (_root.schema != root.schema)\n return compile.call(self, _schema, _root, localRefs, baseId);\n\n var $async = _schema.$async === true;\n if ($async && !opts.transpile) async.setup(opts);\n\n var sourceCode = validateGenerator({\n isTop: true,\n schema: _schema,\n isRoot: isRoot,\n baseId: baseId,\n root: _root,\n schemaPath: '',\n errSchemaPath: '#',\n errorPath: '\"\"',\n RULES: RULES,\n validate: validateGenerator,\n util: util,\n resolve: resolve,\n resolveRef: resolveRef,\n usePattern: usePattern,\n useDefault: useDefault,\n useCustomRule: useCustomRule,\n opts: opts,\n formats: formats,\n self: self\n });\n\n sourceCode = vars(refVal, refValCode) + vars(patterns, patternCode)\n + vars(defaults, defaultCode) + vars(customRules, customRuleCode)\n + sourceCode;\n\n if (opts.beautify) {\n /* istanbul ignore else */\n if (beautify) sourceCode = beautify(sourceCode, opts.beautify);\n else console.error('\"npm install js-beautify\" to use beautify option');\n }\n // console.log('\\n\\n\\n *** \\n', sourceCode);\n var validate, validateCode\n , transpile = opts._transpileFunc;\n try {\n validateCode = $async && transpile\n ? transpile(sourceCode)\n : sourceCode;\n eval(validateCode);\n refVal[0] = validate;\n } catch(e) {\n console.error('Error compiling schema, function code:', validateCode);\n throw e;\n }\n\n validate.schema = _schema;\n validate.errors = null;\n validate.refs = refs;\n validate.refVal = refVal;\n validate.root = isRoot ? validate : _root;\n if ($async) validate.async = true;\n if (transpile) validate.sourceCode = sourceCode;\n\n return validate;\n }\n\n function resolveRef(baseId, ref, isRoot) {\n ref = resolve.url(baseId, ref);\n var refIndex = refs[ref];\n var _refVal, refCode;\n if (refIndex !== undefined) {\n _refVal = refVal[refIndex];\n refCode = 'refVal[' + refIndex + ']';\n return resolvedRef(_refVal, refCode);\n }\n if (!isRoot) {\n var rootRefId = root.refs[ref];\n if (rootRefId !== undefined) {\n _refVal = root.refVal[rootRefId];\n refCode = addLocalRef(ref, _refVal);\n return resolvedRef(_refVal, refCode);\n }\n }\n\n refCode = addLocalRef(ref);\n var v = resolve.call(self, localCompile, root, ref);\n if (!v) {\n var localSchema = localRefs && localRefs[ref];\n if (localSchema) {\n v = resolve.inlineRef(localSchema, opts.inlineRefs)\n ? localSchema\n : compile.call(self, localSchema, root, localRefs, baseId);\n }\n }\n\n if (v) {\n replaceLocalRef(ref, v);\n return resolvedRef(v, refCode);\n }\n }\n\n function addLocalRef(ref, v) {\n var refId = refVal.length;\n refVal[refId] = v;\n refs[ref] = refId;\n return 'refVal' + refId;\n }\n\n function replaceLocalRef(ref, v) {\n var refId = refs[ref];\n refVal[refId] = v;\n }\n\n function resolvedRef(refVal, code) {\n return typeof refVal == 'object'\n ? { code: code, schema: refVal, inline: true }\n : { code: code, async: refVal && refVal.async };\n }\n\n function usePattern(regexStr) {\n var index = patternsHash[regexStr];\n if (index === undefined) {\n index = patternsHash[regexStr] = patterns.length;\n patterns[index] = regexStr;\n }\n return 'pattern' + index;\n }\n\n function useDefault(value) {\n switch (typeof value) {\n case 'boolean':\n case 'number':\n return '' + value;\n case 'string':\n return util.toQuotedString(value);\n case 'object':\n if (value === null) return 'null';\n var valueStr = stableStringify(value);\n var index = defaultsHash[valueStr];\n if (index === undefined) {\n index = defaultsHash[valueStr] = defaults.length;\n defaults[index] = value;\n }\n return 'default' + index;\n }\n }\n\n function useCustomRule(rule, schema, parentSchema, it) {\n var compile = rule.definition.compile\n , inline = rule.definition.inline\n , macro = rule.definition.macro;\n\n var validate;\n if (compile) {\n validate = compile.call(self, schema, parentSchema);\n } else if (macro) {\n validate = macro.call(self, schema, parentSchema);\n if (opts.validateSchema !== false) self.validateSchema(validate, true);\n } else if (inline) {\n validate = inline.call(self, it, rule.keyword, schema, parentSchema);\n } else {\n validate = rule.definition.validate;\n }\n\n var index = customRules.length;\n customRules[index] = validate;\n\n return {\n code: 'customRule' + index,\n validate: validate\n };\n }\n}\n\n\nfunction patternCode(i, patterns) {\n return 'var pattern' + i + ' = new RegExp(' + util.toQuotedString(patterns[i]) + ');';\n}\n\n\nfunction defaultCode(i) {\n return 'var default' + i + ' = defaults[' + i + '];';\n}\n\n\nfunction refValCode(i, refVal) {\n return refVal[i] ? 'var refVal' + i + ' = refVal[' + i + '];' : '';\n}\n\n\nfunction customRuleCode(i) {\n return 'var customRule' + i + ' = customRules[' + i + '];';\n}\n\n\nfunction vars(arr, statement) {\n if (!arr.length) return '';\n var code = '';\n for (var i=0; i= 0xD800 && value <= 0xDBFF && pos < len) {\n // high surrogate, and there is a next character\n value = str.charCodeAt(pos);\n if ((value & 0xFC00) == 0xDC00) pos++; // low surrogate\n }\n }\n return length;\n}\n\n\nfunction varOccurences(str, dataVar) {\n dataVar += '[^0-9]';\n var matches = str.match(new RegExp(dataVar, 'g'));\n return matches ? matches.length : 0;\n}\n\n\nfunction varReplace(str, dataVar, expr) {\n dataVar += '([^0-9])';\n expr = expr.replace(/\\$/g, '$$$$');\n return str.replace(new RegExp(dataVar, 'g'), expr + '$1');\n}\n\n\nvar EMPTY_ELSE = /else\\s*{\\s*}/g\n , EMPTY_IF_NO_ELSE = /if\\s*\\([^)]+\\)\\s*\\{\\s*\\}(?!\\s*else)/g\n , EMPTY_IF_WITH_ELSE = /if\\s*\\(([^)]+)\\)\\s*\\{\\s*\\}\\s*else(?!\\s*if)/g;\nfunction cleanUpCode(out) {\n return out.replace(EMPTY_ELSE, '')\n .replace(EMPTY_IF_NO_ELSE, '')\n .replace(EMPTY_IF_WITH_ELSE, 'if (!($1))');\n}\n\n\nvar ERRORS_REGEXP = /[^v\\.]errors/g\n , REMOVE_ERRORS = /var errors = 0;|var vErrors = null;|validate.errors = vErrors;/g\n , REMOVE_ERRORS_ASYNC = /var errors = 0;|var vErrors = null;/g\n , RETURN_VALID = 'return errors === 0;'\n , RETURN_TRUE = 'validate.errors = null; return true;'\n , RETURN_ASYNC = /if \\(errors === 0\\) return true;\\s*else throw new ValidationError\\(vErrors\\);/\n , RETURN_TRUE_ASYNC = 'return true;';\n\nfunction cleanUpVarErrors(out, async) {\n var matches = out.match(ERRORS_REGEXP);\n if (!matches || matches.length !== 2) return out;\n return async\n ? out.replace(REMOVE_ERRORS_ASYNC, '')\n .replace(RETURN_ASYNC, RETURN_TRUE_ASYNC)\n : out.replace(REMOVE_ERRORS, '')\n .replace(RETURN_VALID, RETURN_TRUE);\n}\n\n\nfunction schemaHasRules(schema, rules) {\n for (var key in schema) if (rules[key]) return true;\n}\n\n\nfunction toQuotedString(str) {\n return '\\'' + escapeQuotes(str) + '\\'';\n}\n\n\nfunction getPathExpr(currentPath, expr, jsonPointers, isNumber) {\n var path = jsonPointers // false by default\n ? '\\'/\\' + ' + expr + (isNumber ? '' : '.replace(/~/g, \\'~0\\').replace(/\\\\//g, \\'~1\\')')\n : (isNumber ? '\\'[\\' + ' + expr + ' + \\']\\'' : '\\'[\\\\\\'\\' + ' + expr + ' + \\'\\\\\\']\\'');\n return joinPaths(currentPath, path);\n}\n\n\nfunction getPath(currentPath, prop, jsonPointers) {\n var path = jsonPointers // false by default\n ? toQuotedString('/' + escapeJsonPointer(prop))\n : toQuotedString(getProperty(prop));\n return joinPaths(currentPath, path);\n}\n\n\nvar RELATIVE_JSON_POINTER = /^([0-9]+)(#|\\/(?:[^~]|~0|~1)*)?$/;\nfunction getData($data, lvl, paths) {\n var matches = $data.match(RELATIVE_JSON_POINTER);\n if (!matches) throw new Error('Invalid relative JSON-pointer: ' + $data);\n var up = +matches[1];\n var jsonPointer = matches[2];\n if (jsonPointer == '#') {\n if (up >= lvl) throw new Error('Cannot access property/index ' + up + ' levels up, current level is ' + lvl);\n return paths[lvl - up];\n }\n\n if (up > lvl) throw new Error('Cannot access data ' + up + ' levels up, current level is ' + lvl);\n var data = 'data' + ((lvl - up) || '');\n if (!jsonPointer) return data;\n\n var expr = data;\n var segments = jsonPointer.split('/');\n for (var i=0; i',\n $result = 'result' + $lvl;\n var $isData = it.opts.v5 && $schema.$data;\n var $schemaValue = $isData ? it.util.getData($schema.$data, $dataLvl, it.dataPathArr) : $schema;\n if ($isData) {\n out += ' var schema' + ($lvl) + ' = ' + ($schemaValue) + '; ';\n $schemaValue = 'schema' + $lvl;\n }\n if ($isDataExcl) {\n var $schemaValueExcl = it.util.getData($schemaExcl.$data, $dataLvl, it.dataPathArr),\n $exclusive = 'exclusive' + $lvl,\n $opExpr = 'op' + $lvl,\n $opStr = '\\' + ' + $opExpr + ' + \\'';\n out += ' var schemaExcl' + ($lvl) + ' = ' + ($schemaValueExcl) + '; ';\n $schemaValueExcl = 'schemaExcl' + $lvl;\n out += ' if (typeof ' + ($schemaValueExcl) + ' != \\'boolean\\' && ' + ($schemaValueExcl) + ' !== undefined) { ' + ($valid) + ' = false; ';\n var $errorKeyword = $exclusiveKeyword;\n var $$outStack = $$outStack || [];\n $$outStack.push(out);\n out = ''; /* istanbul ignore else */\n if (it.createErrors !== false) {\n out += ' { keyword: \\'' + ($errorKeyword || '_exclusiveFormatLimit') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: \"' + ($errSchemaPath) + '\" , params: {} ';\n if (it.opts.messages !== false) {\n out += ' , message: \\'' + ($exclusiveKeyword) + ' should be boolean\\' ';\n }\n if (it.opts.verbose) {\n out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n }\n out += ' } ';\n } else {\n out += ' {} ';\n }\n var __err = out;\n out = $$outStack.pop();\n if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */\n if (it.async) {\n out += ' throw new ValidationError([' + (__err) + ']); ';\n } else {\n out += ' validate.errors = [' + (__err) + ']; return false; ';\n }\n } else {\n out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n }\n out += ' } ';\n if ($breakOnError) {\n $closingBraces += '}';\n out += ' else { ';\n }\n if ($isData) {\n out += ' if (' + ($schemaValue) + ' === undefined) ' + ($valid) + ' = true; else if (typeof ' + ($schemaValue) + ' != \\'string\\') ' + ($valid) + ' = false; else { ';\n $closingBraces += '}';\n }\n if ($isDataFormat) {\n out += ' if (!' + ($compare) + ') ' + ($valid) + ' = true; else { ';\n $closingBraces += '}';\n }\n out += ' var ' + ($result) + ' = ' + ($compare) + '(' + ($data) + ', ';\n if ($isData) {\n out += '' + ($schemaValue);\n } else {\n out += '' + (it.util.toQuotedString($schema));\n }\n out += ' ); if (' + ($result) + ' === undefined) ' + ($valid) + ' = false; var exclusive' + ($lvl) + ' = ' + ($schemaValueExcl) + ' === true; if (' + ($valid) + ' === undefined) { ' + ($valid) + ' = exclusive' + ($lvl) + ' ? ' + ($result) + ' ' + ($op) + ' 0 : ' + ($result) + ' ' + ($op) + '= 0; } if (!' + ($valid) + ') var op' + ($lvl) + ' = exclusive' + ($lvl) + ' ? \\'' + ($op) + '\\' : \\'' + ($op) + '=\\';';\n } else {\n var $exclusive = $schemaExcl === true,\n $opStr = $op;\n if (!$exclusive) $opStr += '=';\n var $opExpr = '\\'' + $opStr + '\\'';\n if ($isData) {\n out += ' if (' + ($schemaValue) + ' === undefined) ' + ($valid) + ' = true; else if (typeof ' + ($schemaValue) + ' != \\'string\\') ' + ($valid) + ' = false; else { ';\n $closingBraces += '}';\n }\n if ($isDataFormat) {\n out += ' if (!' + ($compare) + ') ' + ($valid) + ' = true; else { ';\n $closingBraces += '}';\n }\n out += ' var ' + ($result) + ' = ' + ($compare) + '(' + ($data) + ', ';\n if ($isData) {\n out += '' + ($schemaValue);\n } else {\n out += '' + (it.util.toQuotedString($schema));\n }\n out += ' ); if (' + ($result) + ' === undefined) ' + ($valid) + ' = false; if (' + ($valid) + ' === undefined) ' + ($valid) + ' = ' + ($result) + ' ' + ($op);\n if (!$exclusive) {\n out += '=';\n }\n out += ' 0;';\n }\n out += '' + ($closingBraces) + 'if (!' + ($valid) + ') { ';\n var $errorKeyword = $keyword;\n var $$outStack = $$outStack || [];\n $$outStack.push(out);\n out = ''; /* istanbul ignore else */\n if (it.createErrors !== false) {\n out += ' { keyword: \\'' + ($errorKeyword || '_formatLimit') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: \"' + ($errSchemaPath) + '\" , params: { limit: ';\n if ($isData) {\n out += '' + ($schemaValue);\n } else {\n out += '' + (it.util.toQuotedString($schema));\n }\n out += ' } ';\n if (it.opts.messages !== false) {\n out += ' , message: \\'should be ' + ($opStr) + ' \"';\n if ($isData) {\n out += '\\' + ' + ($schemaValue) + ' + \\'';\n } else {\n out += '' + (it.util.escapeQuotes($schema));\n }\n out += '\"\\' ';\n }\n if (it.opts.verbose) {\n out += ' , schema: ';\n if ($isData) {\n out += 'validate.schema' + ($schemaPath);\n } else {\n out += '' + (it.util.toQuotedString($schema));\n }\n out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n }\n out += ' } ';\n } else {\n out += ' {} ';\n }\n var __err = out;\n out = $$outStack.pop();\n if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */\n if (it.async) {\n out += ' throw new ValidationError([' + (__err) + ']); ';\n } else {\n out += ' validate.errors = [' + (__err) + ']; return false; ';\n }\n } else {\n out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n }\n out += '}';\n return out;\n}\n\n},{}],13:[function(require,module,exports){\n'use strict';\nmodule.exports = function generate__limit(it, $keyword) {\n var out = ' ';\n var $lvl = it.level;\n var $dataLvl = it.dataLevel;\n var $schema = it.schema[$keyword];\n var $schemaPath = it.schemaPath + '.' + $keyword;\n var $errSchemaPath = it.errSchemaPath + '/' + $keyword;\n var $breakOnError = !it.opts.allErrors;\n var $errorKeyword;\n var $data = 'data' + ($dataLvl || '');\n var $isData = it.opts.v5 && $schema.$data;\n var $schemaValue = $isData ? it.util.getData($schema.$data, $dataLvl, it.dataPathArr) : $schema;\n if ($isData) {\n out += ' var schema' + ($lvl) + ' = ' + ($schemaValue) + '; ';\n $schemaValue = 'schema' + $lvl;\n }\n var $isMax = $keyword == 'maximum',\n $exclusiveKeyword = $isMax ? 'exclusiveMaximum' : 'exclusiveMinimum',\n $schemaExcl = it.schema[$exclusiveKeyword],\n $isDataExcl = it.opts.v5 && $schemaExcl && $schemaExcl.$data,\n $op = $isMax ? '<' : '>',\n $notOp = $isMax ? '>' : '<';\n if ($isDataExcl) {\n var $schemaValueExcl = it.util.getData($schemaExcl.$data, $dataLvl, it.dataPathArr),\n $exclusive = 'exclusive' + $lvl,\n $opExpr = 'op' + $lvl,\n $opStr = '\\' + ' + $opExpr + ' + \\'';\n out += ' var schemaExcl' + ($lvl) + ' = ' + ($schemaValueExcl) + '; ';\n $schemaValueExcl = 'schemaExcl' + $lvl;\n out += ' var exclusive' + ($lvl) + '; if (typeof ' + ($schemaValueExcl) + ' != \\'boolean\\' && typeof ' + ($schemaValueExcl) + ' != \\'undefined\\') { ';\n var $errorKeyword = $exclusiveKeyword;\n var $$outStack = $$outStack || [];\n $$outStack.push(out);\n out = ''; /* istanbul ignore else */\n if (it.createErrors !== false) {\n out += ' { keyword: \\'' + ($errorKeyword || '_exclusiveLimit') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: \"' + ($errSchemaPath) + '\" , params: {} ';\n if (it.opts.messages !== false) {\n out += ' , message: \\'' + ($exclusiveKeyword) + ' should be boolean\\' ';\n }\n if (it.opts.verbose) {\n out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n }\n out += ' } ';\n } else {\n out += ' {} ';\n }\n var __err = out;\n out = $$outStack.pop();\n if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */\n if (it.async) {\n out += ' throw new ValidationError([' + (__err) + ']); ';\n } else {\n out += ' validate.errors = [' + (__err) + ']; return false; ';\n }\n } else {\n out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n }\n out += ' } else if( ';\n if ($isData) {\n out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \\'number\\') || ';\n }\n out += ' ((exclusive' + ($lvl) + ' = ' + ($schemaValueExcl) + ' === true) ? ' + ($data) + ' ' + ($notOp) + '= ' + ($schemaValue) + ' : ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ')) { var op' + ($lvl) + ' = exclusive' + ($lvl) + ' ? \\'' + ($op) + '\\' : \\'' + ($op) + '=\\';';\n } else {\n var $exclusive = $schemaExcl === true,\n $opStr = $op;\n if (!$exclusive) $opStr += '=';\n var $opExpr = '\\'' + $opStr + '\\'';\n out += ' if ( ';\n if ($isData) {\n out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \\'number\\') || ';\n }\n out += ' ' + ($data) + ' ' + ($notOp);\n if ($exclusive) {\n out += '=';\n }\n out += ' ' + ($schemaValue) + ') {';\n }\n var $errorKeyword = $keyword;\n var $$outStack = $$outStack || [];\n $$outStack.push(out);\n out = ''; /* istanbul ignore else */\n if (it.createErrors !== false) {\n out += ' { keyword: \\'' + ($errorKeyword || '_limit') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: \"' + ($errSchemaPath) + '\" , params: { comparison: ' + ($opExpr) + ', limit: ' + ($schemaValue) + ', exclusive: ' + ($exclusive) + ' } ';\n if (it.opts.messages !== false) {\n out += ' , message: \\'should be ' + ($opStr) + ' ';\n if ($isData) {\n out += '\\' + ' + ($schemaValue);\n } else {\n out += '' + ($schema) + '\\'';\n }\n }\n if (it.opts.verbose) {\n out += ' , schema: ';\n if ($isData) {\n out += 'validate.schema' + ($schemaPath);\n } else {\n out += '' + ($schema);\n }\n out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n }\n out += ' } ';\n } else {\n out += ' {} ';\n }\n var __err = out;\n out = $$outStack.pop();\n if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */\n if (it.async) {\n out += ' throw new ValidationError([' + (__err) + ']); ';\n } else {\n out += ' validate.errors = [' + (__err) + ']; return false; ';\n }\n } else {\n out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n }\n out += ' } ';\n if ($breakOnError) {\n out += ' else { ';\n }\n return out;\n}\n\n},{}],14:[function(require,module,exports){\n'use strict';\nmodule.exports = function generate__limitItems(it, $keyword) {\n var out = ' ';\n var $lvl = it.level;\n var $dataLvl = it.dataLevel;\n var $schema = it.schema[$keyword];\n var $schemaPath = it.schemaPath + '.' + $keyword;\n var $errSchemaPath = it.errSchemaPath + '/' + $keyword;\n var $breakOnError = !it.opts.allErrors;\n var $errorKeyword;\n var $data = 'data' + ($dataLvl || '');\n var $isData = it.opts.v5 && $schema.$data;\n var $schemaValue = $isData ? it.util.getData($schema.$data, $dataLvl, it.dataPathArr) : $schema;\n if ($isData) {\n out += ' var schema' + ($lvl) + ' = ' + ($schemaValue) + '; ';\n $schemaValue = 'schema' + $lvl;\n }\n var $op = $keyword == 'maxItems' ? '>' : '<';\n out += 'if ( ';\n if ($isData) {\n out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \\'number\\') || ';\n }\n out += ' ' + ($data) + '.length ' + ($op) + ' ' + ($schemaValue) + ') { ';\n var $errorKeyword = $keyword;\n var $$outStack = $$outStack || [];\n $$outStack.push(out);\n out = ''; /* istanbul ignore else */\n if (it.createErrors !== false) {\n out += ' { keyword: \\'' + ($errorKeyword || '_limitItems') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: \"' + ($errSchemaPath) + '\" , params: { limit: ' + ($schemaValue) + ' } ';\n if (it.opts.messages !== false) {\n out += ' , message: \\'should NOT have ';\n if ($keyword == 'maxItems') {\n out += 'more';\n } else {\n out += 'less';\n }\n out += ' than ';\n if ($isData) {\n out += '\\' + ' + ($schemaValue) + ' + \\'';\n } else {\n out += '' + ($schema);\n }\n out += ' items\\' ';\n }\n if (it.opts.verbose) {\n out += ' , schema: ';\n if ($isData) {\n out += 'validate.schema' + ($schemaPath);\n } else {\n out += '' + ($schema);\n }\n out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n }\n out += ' } ';\n } else {\n out += ' {} ';\n }\n var __err = out;\n out = $$outStack.pop();\n if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */\n if (it.async) {\n out += ' throw new ValidationError([' + (__err) + ']); ';\n } else {\n out += ' validate.errors = [' + (__err) + ']; return false; ';\n }\n } else {\n out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n }\n out += '} ';\n if ($breakOnError) {\n out += ' else { ';\n }\n return out;\n}\n\n},{}],15:[function(require,module,exports){\n'use strict';\nmodule.exports = function generate__limitLength(it, $keyword) {\n var out = ' ';\n var $lvl = it.level;\n var $dataLvl = it.dataLevel;\n var $schema = it.schema[$keyword];\n var $schemaPath = it.schemaPath + '.' + $keyword;\n var $errSchemaPath = it.errSchemaPath + '/' + $keyword;\n var $breakOnError = !it.opts.allErrors;\n var $errorKeyword;\n var $data = 'data' + ($dataLvl || '');\n var $isData = it.opts.v5 && $schema.$data;\n var $schemaValue = $isData ? it.util.getData($schema.$data, $dataLvl, it.dataPathArr) : $schema;\n if ($isData) {\n out += ' var schema' + ($lvl) + ' = ' + ($schemaValue) + '; ';\n $schemaValue = 'schema' + $lvl;\n }\n var $op = $keyword == 'maxLength' ? '>' : '<';\n out += 'if ( ';\n if ($isData) {\n out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \\'number\\') || ';\n }\n if (it.opts.unicode === false) {\n out += ' ' + ($data) + '.length ';\n } else {\n out += ' ucs2length(' + ($data) + ') ';\n }\n out += ' ' + ($op) + ' ' + ($schemaValue) + ') { ';\n var $errorKeyword = $keyword;\n var $$outStack = $$outStack || [];\n $$outStack.push(out);\n out = ''; /* istanbul ignore else */\n if (it.createErrors !== false) {\n out += ' { keyword: \\'' + ($errorKeyword || '_limitLength') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: \"' + ($errSchemaPath) + '\" , params: { limit: ' + ($schemaValue) + ' } ';\n if (it.opts.messages !== false) {\n out += ' , message: \\'should NOT be ';\n if ($keyword == 'maxLength') {\n out += 'longer';\n } else {\n out += 'shorter';\n }\n out += ' than ';\n if ($isData) {\n out += '\\' + ' + ($schemaValue) + ' + \\'';\n } else {\n out += '' + ($schema);\n }\n out += ' characters\\' ';\n }\n if (it.opts.verbose) {\n out += ' , schema: ';\n if ($isData) {\n out += 'validate.schema' + ($schemaPath);\n } else {\n out += '' + ($schema);\n }\n out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n }\n out += ' } ';\n } else {\n out += ' {} ';\n }\n var __err = out;\n out = $$outStack.pop();\n if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */\n if (it.async) {\n out += ' throw new ValidationError([' + (__err) + ']); ';\n } else {\n out += ' validate.errors = [' + (__err) + ']; return false; ';\n }\n } else {\n out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n }\n out += '} ';\n if ($breakOnError) {\n out += ' else { ';\n }\n return out;\n}\n\n},{}],16:[function(require,module,exports){\n'use strict';\nmodule.exports = function generate__limitProperties(it, $keyword) {\n var out = ' ';\n var $lvl = it.level;\n var $dataLvl = it.dataLevel;\n var $schema = it.schema[$keyword];\n var $schemaPath = it.schemaPath + '.' + $keyword;\n var $errSchemaPath = it.errSchemaPath + '/' + $keyword;\n var $breakOnError = !it.opts.allErrors;\n var $errorKeyword;\n var $data = 'data' + ($dataLvl || '');\n var $isData = it.opts.v5 && $schema.$data;\n var $schemaValue = $isData ? it.util.getData($schema.$data, $dataLvl, it.dataPathArr) : $schema;\n if ($isData) {\n out += ' var schema' + ($lvl) + ' = ' + ($schemaValue) + '; ';\n $schemaValue = 'schema' + $lvl;\n }\n var $op = $keyword == 'maxProperties' ? '>' : '<';\n out += 'if ( ';\n if ($isData) {\n out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \\'number\\') || ';\n }\n out += ' Object.keys(' + ($data) + ').length ' + ($op) + ' ' + ($schemaValue) + ') { ';\n var $errorKeyword = $keyword;\n var $$outStack = $$outStack || [];\n $$outStack.push(out);\n out = ''; /* istanbul ignore else */\n if (it.createErrors !== false) {\n out += ' { keyword: \\'' + ($errorKeyword || '_limitProperties') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: \"' + ($errSchemaPath) + '\" , params: { limit: ' + ($schemaValue) + ' } ';\n if (it.opts.messages !== false) {\n out += ' , message: \\'should NOT have ';\n if ($keyword == 'maxProperties') {\n out += 'more';\n } else {\n out += 'less';\n }\n out += ' than ';\n if ($isData) {\n out += '\\' + ' + ($schemaValue) + ' + \\'';\n } else {\n out += '' + ($schema);\n }\n out += ' properties\\' ';\n }\n if (it.opts.verbose) {\n out += ' , schema: ';\n if ($isData) {\n out += 'validate.schema' + ($schemaPath);\n } else {\n out += '' + ($schema);\n }\n out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n }\n out += ' } ';\n } else {\n out += ' {} ';\n }\n var __err = out;\n out = $$outStack.pop();\n if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */\n if (it.async) {\n out += ' throw new ValidationError([' + (__err) + ']); ';\n } else {\n out += ' validate.errors = [' + (__err) + ']; return false; ';\n }\n } else {\n out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n }\n out += '} ';\n if ($breakOnError) {\n out += ' else { ';\n }\n return out;\n}\n\n},{}],17:[function(require,module,exports){\n'use strict';\nmodule.exports = function generate_allOf(it, $keyword) {\n var out = ' ';\n var $schema = it.schema[$keyword];\n var $schemaPath = it.schemaPath + '.' + $keyword;\n var $errSchemaPath = it.errSchemaPath + '/' + $keyword;\n var $breakOnError = !it.opts.allErrors;\n var $it = it.util.copy(it);\n var $closingBraces = '';\n $it.level++;\n var arr1 = $schema;\n if (arr1) {\n var $sch, $i = -1,\n l1 = arr1.length - 1;\n while ($i < l1) {\n $sch = arr1[$i += 1];\n if (it.util.schemaHasRules($sch, it.RULES.all)) {\n $it.schema = $sch;\n $it.schemaPath = $schemaPath + '[' + $i + ']';\n $it.errSchemaPath = $errSchemaPath + '/' + $i;\n out += ' ' + (it.validate($it)) + ' ';\n if ($breakOnError) {\n out += ' if (valid' + ($it.level) + ') { ';\n $closingBraces += '}';\n }\n }\n }\n }\n if ($breakOnError) {\n out += ' ' + ($closingBraces.slice(0, -1));\n }\n out = it.util.cleanUpCode(out);\n return out;\n}\n\n},{}],18:[function(require,module,exports){\n'use strict';\nmodule.exports = function generate_anyOf(it, $keyword) {\n var out = ' ';\n var $lvl = it.level;\n var $dataLvl = it.dataLevel;\n var $schema = it.schema[$keyword];\n var $schemaPath = it.schemaPath + '.' + $keyword;\n var $errSchemaPath = it.errSchemaPath + '/' + $keyword;\n var $breakOnError = !it.opts.allErrors;\n var $errorKeyword;\n var $data = 'data' + ($dataLvl || '');\n var $valid = 'valid' + $lvl;\n var $errs = 'errs__' + $lvl;\n var $it = it.util.copy(it);\n var $closingBraces = '';\n $it.level++;\n var $noEmptySchema = $schema.every(function($sch) {\n return it.util.schemaHasRules($sch, it.RULES.all);\n });\n if ($noEmptySchema) {\n out += ' var ' + ($errs) + ' = errors; var ' + ($valid) + ' = false; ';\n var $wasComposite = it.compositeRule;\n it.compositeRule = $it.compositeRule = true;\n var arr1 = $schema;\n if (arr1) {\n var $sch, $i = -1,\n l1 = arr1.length - 1;\n while ($i < l1) {\n $sch = arr1[$i += 1];\n $it.schema = $sch;\n $it.schemaPath = $schemaPath + '[' + $i + ']';\n $it.errSchemaPath = $errSchemaPath + '/' + $i;\n out += ' ' + (it.validate($it)) + ' ' + ($valid) + ' = ' + ($valid) + ' || valid' + ($it.level) + '; if (!' + ($valid) + ') { ';\n $closingBraces += '}';\n }\n }\n it.compositeRule = $it.compositeRule = $wasComposite;\n out += ' ' + ($closingBraces) + ' if (!' + ($valid) + ') { var err = '; /* istanbul ignore else */\n if (it.createErrors !== false) {\n out += ' { keyword: \\'' + ($errorKeyword || 'anyOf') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: \"' + ($errSchemaPath) + '\" , params: {} ';\n if (it.opts.messages !== false) {\n out += ' , message: \\'should match some schema in anyOf\\' ';\n }\n if (it.opts.verbose) {\n out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n }\n out += ' } ';\n } else {\n out += ' {} ';\n }\n out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } else { errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } ';\n if (it.opts.allErrors) {\n out += ' } ';\n }\n out = it.util.cleanUpCode(out);\n } else {\n if ($breakOnError) {\n out += ' if (true) { ';\n }\n }\n return out;\n}\n\n},{}],19:[function(require,module,exports){\n'use strict';\nmodule.exports = function generate_constant(it, $keyword) {\n var out = ' ';\n var $lvl = it.level;\n var $dataLvl = it.dataLevel;\n var $schema = it.schema[$keyword];\n var $schemaPath = it.schemaPath + '.' + $keyword;\n var $errSchemaPath = it.errSchemaPath + '/' + $keyword;\n var $breakOnError = !it.opts.allErrors;\n var $errorKeyword;\n var $data = 'data' + ($dataLvl || '');\n var $valid = 'valid' + $lvl;\n var $isData = it.opts.v5 && $schema.$data;\n var $schemaValue = $isData ? it.util.getData($schema.$data, $dataLvl, it.dataPathArr) : $schema;\n if ($isData) {\n out += ' var schema' + ($lvl) + ' = ' + ($schemaValue) + '; ';\n $schemaValue = 'schema' + $lvl;\n }\n if (!$isData) {\n out += ' var schema' + ($lvl) + ' = validate.schema' + ($schemaPath) + ';';\n }\n out += 'var ' + ($valid) + ' = equal(' + ($data) + ', schema' + ($lvl) + '); if (!' + ($valid) + ') { ';\n var $$outStack = $$outStack || [];\n $$outStack.push(out);\n out = ''; /* istanbul ignore else */\n if (it.createErrors !== false) {\n out += ' { keyword: \\'' + ($errorKeyword || 'constant') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: \"' + ($errSchemaPath) + '\" , params: {} ';\n if (it.opts.messages !== false) {\n out += ' , message: \\'should be equal to constant\\' ';\n }\n if (it.opts.verbose) {\n out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n }\n out += ' } ';\n } else {\n out += ' {} ';\n }\n var __err = out;\n out = $$outStack.pop();\n if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */\n if (it.async) {\n out += ' throw new ValidationError([' + (__err) + ']); ';\n } else {\n out += ' validate.errors = [' + (__err) + ']; return false; ';\n }\n } else {\n out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n }\n out += ' }';\n return out;\n}\n\n},{}],20:[function(require,module,exports){\n'use strict';\nmodule.exports = function generate_dependencies(it, $keyword) {\n var out = ' ';\n var $lvl = it.level;\n var $dataLvl = it.dataLevel;\n var $schema = it.schema[$keyword];\n var $schemaPath = it.schemaPath + '.' + $keyword;\n var $errSchemaPath = it.errSchemaPath + '/' + $keyword;\n var $breakOnError = !it.opts.allErrors;\n var $errorKeyword;\n var $data = 'data' + ($dataLvl || '');\n var $errs = 'errs__' + $lvl;\n var $it = it.util.copy(it);\n var $closingBraces = '';\n $it.level++;\n var $schemaDeps = {},\n $propertyDeps = {};\n for ($property in $schema) {\n var $sch = $schema[$property];\n var $deps = Array.isArray($sch) ? $propertyDeps : $schemaDeps;\n $deps[$property] = $sch;\n }\n out += 'var ' + ($errs) + ' = errors;';\n var $currentErrorPath = it.errorPath;\n out += 'var missing' + ($lvl) + ';';\n for (var $property in $propertyDeps) {\n $deps = $propertyDeps[$property];\n out += ' if (' + ($data) + (it.util.getProperty($property)) + ' !== undefined && ( ';\n var arr1 = $deps;\n if (arr1) {\n var _$property, $i = -1,\n l1 = arr1.length - 1;\n while ($i < l1) {\n _$property = arr1[$i += 1];\n if ($i) {\n out += ' || ';\n }\n var $prop = it.util.getProperty(_$property);\n out += ' ( ' + ($data) + ($prop) + ' === undefined && (missing' + ($lvl) + ' = ' + (it.util.toQuotedString(it.opts.jsonPointers ? _$property : $prop)) + ') ) ';\n }\n }\n out += ')) { ';\n var $propertyPath = 'missing' + $lvl,\n $missingProperty = '\\' + ' + $propertyPath + ' + \\'';\n if (it.opts._errorDataPathProperty) {\n it.errorPath = it.opts.jsonPointers ? it.util.getPathExpr($currentErrorPath, $propertyPath, true) : $currentErrorPath + ' + ' + $propertyPath;\n }\n var $$outStack = $$outStack || [];\n $$outStack.push(out);\n out = ''; /* istanbul ignore else */\n if (it.createErrors !== false) {\n out += ' { keyword: \\'' + ($errorKeyword || 'dependencies') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: \"' + ($errSchemaPath) + '\" , params: { property: \\'' + (it.util.escapeQuotes($property)) + '\\', missingProperty: \\'' + ($missingProperty) + '\\', depsCount: ' + ($deps.length) + ', deps: \\'' + (it.util.escapeQuotes($deps.length == 1 ? $deps[0] : $deps.join(\", \"))) + '\\' } ';\n if (it.opts.messages !== false) {\n out += ' , message: \\'should have ';\n if ($deps.length == 1) {\n out += 'property ' + (it.util.escapeQuotes($deps[0]));\n } else {\n out += 'properties ' + (it.util.escapeQuotes($deps.join(\", \")));\n }\n out += ' when property ' + (it.util.escapeQuotes($property)) + ' is present\\' ';\n }\n if (it.opts.verbose) {\n out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n }\n out += ' } ';\n } else {\n out += ' {} ';\n }\n var __err = out;\n out = $$outStack.pop();\n if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */\n if (it.async) {\n out += ' throw new ValidationError([' + (__err) + ']); ';\n } else {\n out += ' validate.errors = [' + (__err) + ']; return false; ';\n }\n } else {\n out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n }\n out += ' } ';\n if ($breakOnError) {\n $closingBraces += '}';\n out += ' else { ';\n }\n }\n it.errorPath = $currentErrorPath;\n for (var $property in $schemaDeps) {\n var $sch = $schemaDeps[$property];\n if (it.util.schemaHasRules($sch, it.RULES.all)) {\n out += ' valid' + ($it.level) + ' = true; if (' + ($data) + '[\\'' + ($property) + '\\'] !== undefined) { ';\n $it.schema = $sch;\n $it.schemaPath = $schemaPath + it.util.getProperty($property);\n $it.errSchemaPath = $errSchemaPath + '/' + it.util.escapeFragment($property);\n out += ' ' + (it.validate($it)) + ' } ';\n if ($breakOnError) {\n out += ' if (valid' + ($it.level) + ') { ';\n $closingBraces += '}';\n }\n }\n }\n if ($breakOnError) {\n out += ' ' + ($closingBraces) + ' if (' + ($errs) + ' == errors) {';\n }\n out = it.util.cleanUpCode(out);\n return out;\n}\n\n},{}],21:[function(require,module,exports){\n'use strict';\nmodule.exports = function generate_enum(it, $keyword) {\n var out = ' ';\n var $lvl = it.level;\n var $dataLvl = it.dataLevel;\n var $schema = it.schema[$keyword];\n var $schemaPath = it.schemaPath + '.' + $keyword;\n var $errSchemaPath = it.errSchemaPath + '/' + $keyword;\n var $breakOnError = !it.opts.allErrors;\n var $errorKeyword;\n var $data = 'data' + ($dataLvl || '');\n var $valid = 'valid' + $lvl;\n var $isData = it.opts.v5 && $schema.$data;\n var $schemaValue = $isData ? it.util.getData($schema.$data, $dataLvl, it.dataPathArr) : $schema;\n if ($isData) {\n out += ' var schema' + ($lvl) + ' = ' + ($schemaValue) + '; ';\n $schemaValue = 'schema' + $lvl;\n }\n var $i = 'i' + $lvl;\n if (!$isData) {\n out += ' var schema' + ($lvl) + ' = validate.schema' + ($schemaPath) + ';';\n }\n out += 'var ' + ($valid) + ';';\n if ($isData) {\n out += ' if (schema' + ($lvl) + ' === undefined) ' + ($valid) + ' = true; else if (!Array.isArray(schema' + ($lvl) + ')) ' + ($valid) + ' = false; else {';\n }\n out += '' + ($valid) + ' = false;for (var ' + ($i) + '=0; ' + ($i) + ' ' + ($i) + ') { ';\n var $passData = $data + '[' + $i + ']';\n $it.schema = $sch;\n $it.schemaPath = $schemaPath + '[' + $i + ']';\n $it.errSchemaPath = $errSchemaPath + '/' + $i;\n $it.errorPath = it.util.getPathExpr(it.errorPath, $i, it.opts.jsonPointers, true);\n $it.dataPathArr[$dataNxt] = $i;\n var $code = it.validate($it);\n if (it.util.varOccurences($code, $nextData) < 2) {\n out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' ';\n } else {\n out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' ';\n }\n out += ' } ';\n if ($breakOnError) {\n out += ' if (valid' + ($it.level) + ') { ';\n $closingBraces += '}';\n }\n }\n }\n }\n if (typeof $additionalItems == 'object' && it.util.schemaHasRules($additionalItems, it.RULES.all)) {\n $it.schema = $additionalItems;\n $it.schemaPath = it.schemaPath + '.additionalItems';\n $it.errSchemaPath = it.errSchemaPath + '/additionalItems';\n out += ' valid' + ($it.level) + ' = true; if (' + ($data) + '.length > ' + ($schema.length) + ') { for (var i' + ($lvl) + ' = ' + ($schema.length) + '; i' + ($lvl) + ' < ' + ($data) + '.length; i' + ($lvl) + '++) { ';\n $it.errorPath = it.util.getPathExpr(it.errorPath, 'i' + $lvl, it.opts.jsonPointers, true);\n var $passData = $data + '[i' + $lvl + ']';\n $it.dataPathArr[$dataNxt] = 'i' + $lvl;\n var $code = it.validate($it);\n if (it.util.varOccurences($code, $nextData) < 2) {\n out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' ';\n } else {\n out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' ';\n }\n if ($breakOnError) {\n out += ' if (!valid' + ($it.level) + ') break; ';\n }\n out += ' } } ';\n if ($breakOnError) {\n out += ' if (valid' + ($it.level) + ') { ';\n $closingBraces += '}';\n }\n }\n } else if (it.util.schemaHasRules($schema, it.RULES.all)) {\n $it.schema = $schema;\n $it.schemaPath = $schemaPath;\n $it.errSchemaPath = $errSchemaPath;\n out += ' for (var i' + ($lvl) + ' = ' + (0) + '; i' + ($lvl) + ' < ' + ($data) + '.length; i' + ($lvl) + '++) { ';\n $it.errorPath = it.util.getPathExpr(it.errorPath, 'i' + $lvl, it.opts.jsonPointers, true);\n var $passData = $data + '[i' + $lvl + ']';\n $it.dataPathArr[$dataNxt] = 'i' + $lvl;\n var $code = it.validate($it);\n if (it.util.varOccurences($code, $nextData) < 2) {\n out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' ';\n } else {\n out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' ';\n }\n if ($breakOnError) {\n out += ' if (!valid' + ($it.level) + ') break; ';\n }\n out += ' } ';\n if ($breakOnError) {\n out += ' if (valid' + ($it.level) + ') { ';\n $closingBraces += '}';\n }\n }\n if ($breakOnError) {\n out += ' ' + ($closingBraces) + ' if (' + ($errs) + ' == errors) {';\n }\n out = it.util.cleanUpCode(out);\n return out;\n}\n\n},{}],24:[function(require,module,exports){\n'use strict';\nmodule.exports = function generate_multipleOf(it, $keyword) {\n var out = ' ';\n var $lvl = it.level;\n var $dataLvl = it.dataLevel;\n var $schema = it.schema[$keyword];\n var $schemaPath = it.schemaPath + '.' + $keyword;\n var $errSchemaPath = it.errSchemaPath + '/' + $keyword;\n var $breakOnError = !it.opts.allErrors;\n var $errorKeyword;\n var $data = 'data' + ($dataLvl || '');\n var $isData = it.opts.v5 && $schema.$data;\n var $schemaValue = $isData ? it.util.getData($schema.$data, $dataLvl, it.dataPathArr) : $schema;\n if ($isData) {\n out += ' var schema' + ($lvl) + ' = ' + ($schemaValue) + '; ';\n $schemaValue = 'schema' + $lvl;\n }\n out += 'var division' + ($lvl) + ';if (';\n if ($isData) {\n out += ' ' + ($schemaValue) + ' !== undefined && ( typeof ' + ($schemaValue) + ' != \\'number\\' || ';\n }\n out += ' (division' + ($lvl) + ' = ' + ($data) + ' / ' + ($schemaValue) + ', ';\n if (it.opts.multipleOfPrecision) {\n out += ' Math.abs(Math.round(division' + ($lvl) + ') - division' + ($lvl) + ') > 1e-' + (it.opts.multipleOfPrecision) + ' ';\n } else {\n out += ' division' + ($lvl) + ' !== parseInt(division' + ($lvl) + ') ';\n }\n out += ' ) ';\n if ($isData) {\n out += ' ) ';\n }\n out += ' ) { ';\n var $$outStack = $$outStack || [];\n $$outStack.push(out);\n out = ''; /* istanbul ignore else */\n if (it.createErrors !== false) {\n out += ' { keyword: \\'' + ($errorKeyword || 'multipleOf') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: \"' + ($errSchemaPath) + '\" , params: { multipleOf: ' + ($schemaValue) + ' } ';\n if (it.opts.messages !== false) {\n out += ' , message: \\'should be multiple of ';\n if ($isData) {\n out += '\\' + ' + ($schemaValue);\n } else {\n out += '' + ($schema) + '\\'';\n }\n }\n if (it.opts.verbose) {\n out += ' , schema: ';\n if ($isData) {\n out += 'validate.schema' + ($schemaPath);\n } else {\n out += '' + ($schema);\n }\n out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n }\n out += ' } ';\n } else {\n out += ' {} ';\n }\n var __err = out;\n out = $$outStack.pop();\n if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */\n if (it.async) {\n out += ' throw new ValidationError([' + (__err) + ']); ';\n } else {\n out += ' validate.errors = [' + (__err) + ']; return false; ';\n }\n } else {\n out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n }\n out += '} ';\n if ($breakOnError) {\n out += ' else { ';\n }\n return out;\n}\n\n},{}],25:[function(require,module,exports){\n'use strict';\nmodule.exports = function generate_not(it, $keyword) {\n var out = ' ';\n var $lvl = it.level;\n var $dataLvl = it.dataLevel;\n var $schema = it.schema[$keyword];\n var $schemaPath = it.schemaPath + '.' + $keyword;\n var $errSchemaPath = it.errSchemaPath + '/' + $keyword;\n var $breakOnError = !it.opts.allErrors;\n var $errorKeyword;\n var $data = 'data' + ($dataLvl || '');\n var $errs = 'errs__' + $lvl;\n var $it = it.util.copy(it);\n $it.level++;\n if (it.util.schemaHasRules($schema, it.RULES.all)) {\n $it.schema = $schema;\n $it.schemaPath = $schemaPath;\n $it.errSchemaPath = $errSchemaPath;\n out += ' var ' + ($errs) + ' = errors; ';\n var $wasComposite = it.compositeRule;\n it.compositeRule = $it.compositeRule = true;\n $it.createErrors = false;\n var $allErrorsOption;\n if ($it.opts.allErrors) {\n $allErrorsOption = $it.opts.allErrors;\n $it.opts.allErrors = false;\n }\n out += ' ' + (it.validate($it)) + ' ';\n $it.createErrors = true;\n if ($allErrorsOption) $it.opts.allErrors = $allErrorsOption;\n it.compositeRule = $it.compositeRule = $wasComposite;\n out += ' if (valid' + ($it.level) + ') { ';\n var $$outStack = $$outStack || [];\n $$outStack.push(out);\n out = ''; /* istanbul ignore else */\n if (it.createErrors !== false) {\n out += ' { keyword: \\'' + ($errorKeyword || 'not') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: \"' + ($errSchemaPath) + '\" , params: {} ';\n if (it.opts.messages !== false) {\n out += ' , message: \\'should NOT be valid\\' ';\n }\n if (it.opts.verbose) {\n out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n }\n out += ' } ';\n } else {\n out += ' {} ';\n }\n var __err = out;\n out = $$outStack.pop();\n if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */\n if (it.async) {\n out += ' throw new ValidationError([' + (__err) + ']); ';\n } else {\n out += ' validate.errors = [' + (__err) + ']; return false; ';\n }\n } else {\n out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n }\n out += ' } else { errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } ';\n if (it.opts.allErrors) {\n out += ' } ';\n }\n } else {\n out += ' var err = '; /* istanbul ignore else */\n if (it.createErrors !== false) {\n out += ' { keyword: \\'' + ($errorKeyword || 'not') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: \"' + ($errSchemaPath) + '\" , params: {} ';\n if (it.opts.messages !== false) {\n out += ' , message: \\'should NOT be valid\\' ';\n }\n if (it.opts.verbose) {\n out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n }\n out += ' } ';\n } else {\n out += ' {} ';\n }\n out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n if ($breakOnError) {\n out += ' if (false) { ';\n }\n }\n return out;\n}\n\n},{}],26:[function(require,module,exports){\n'use strict';\nmodule.exports = function generate_oneOf(it, $keyword) {\n var out = ' ';\n var $lvl = it.level;\n var $dataLvl = it.dataLevel;\n var $schema = it.schema[$keyword];\n var $schemaPath = it.schemaPath + '.' + $keyword;\n var $errSchemaPath = it.errSchemaPath + '/' + $keyword;\n var $breakOnError = !it.opts.allErrors;\n var $errorKeyword;\n var $data = 'data' + ($dataLvl || '');\n var $valid = 'valid' + $lvl;\n var $errs = 'errs__' + $lvl;\n var $it = it.util.copy(it);\n var $closingBraces = '';\n $it.level++;\n out += 'var ' + ($errs) + ' = errors;var prevValid' + ($lvl) + ' = false;var ' + ($valid) + ' = false; ';\n var $wasComposite = it.compositeRule;\n it.compositeRule = $it.compositeRule = true;\n var arr1 = $schema;\n if (arr1) {\n var $sch, $i = -1,\n l1 = arr1.length - 1;\n while ($i < l1) {\n $sch = arr1[$i += 1];\n if (it.util.schemaHasRules($sch, it.RULES.all)) {\n $it.schema = $sch;\n $it.schemaPath = $schemaPath + '[' + $i + ']';\n $it.errSchemaPath = $errSchemaPath + '/' + $i;\n out += ' ' + (it.validate($it)) + ' ';\n } else {\n out += ' var valid' + ($it.level) + ' = true; ';\n }\n if ($i) {\n out += ' if (valid' + ($it.level) + ' && prevValid' + ($lvl) + ') ' + ($valid) + ' = false; else { ';\n $closingBraces += '}';\n }\n out += ' if (valid' + ($it.level) + ') ' + ($valid) + ' = prevValid' + ($lvl) + ' = true;';\n }\n }\n it.compositeRule = $it.compositeRule = $wasComposite;\n out += '' + ($closingBraces) + 'if (!' + ($valid) + ') { ';\n var $$outStack = $$outStack || [];\n $$outStack.push(out);\n out = ''; /* istanbul ignore else */\n if (it.createErrors !== false) {\n out += ' { keyword: \\'' + ($errorKeyword || 'oneOf') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: \"' + ($errSchemaPath) + '\" , params: {} ';\n if (it.opts.messages !== false) {\n out += ' , message: \\'should match exactly one schema in oneOf\\' ';\n }\n if (it.opts.verbose) {\n out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n }\n out += ' } ';\n } else {\n out += ' {} ';\n }\n var __err = out;\n out = $$outStack.pop();\n if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */\n if (it.async) {\n out += ' throw new ValidationError([' + (__err) + ']); ';\n } else {\n out += ' validate.errors = [' + (__err) + ']; return false; ';\n }\n } else {\n out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n }\n out += '} else { errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; }';\n if (it.opts.allErrors) {\n out += ' } ';\n }\n return out;\n}\n\n},{}],27:[function(require,module,exports){\n'use strict';\nmodule.exports = function generate_pattern(it, $keyword) {\n var out = ' ';\n var $lvl = it.level;\n var $dataLvl = it.dataLevel;\n var $schema = it.schema[$keyword];\n var $schemaPath = it.schemaPath + '.' + $keyword;\n var $errSchemaPath = it.errSchemaPath + '/' + $keyword;\n var $breakOnError = !it.opts.allErrors;\n var $errorKeyword;\n var $data = 'data' + ($dataLvl || '');\n var $isData = it.opts.v5 && $schema.$data;\n var $schemaValue = $isData ? it.util.getData($schema.$data, $dataLvl, it.dataPathArr) : $schema;\n if ($isData) {\n out += ' var schema' + ($lvl) + ' = ' + ($schemaValue) + '; ';\n $schemaValue = 'schema' + $lvl;\n }\n var $regexp = $isData ? '(new RegExp(' + $schemaValue + '))' : it.usePattern($schema);\n out += 'if ( ';\n if ($isData) {\n out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \\'string\\') || ';\n }\n out += ' !' + ($regexp) + '.test(' + ($data) + ') ) { ';\n var $$outStack = $$outStack || [];\n $$outStack.push(out);\n out = ''; /* istanbul ignore else */\n if (it.createErrors !== false) {\n out += ' { keyword: \\'' + ($errorKeyword || 'pattern') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: \"' + ($errSchemaPath) + '\" , params: { pattern: ';\n if ($isData) {\n out += '' + ($schemaValue);\n } else {\n out += '' + (it.util.toQuotedString($schema));\n }\n out += ' } ';\n if (it.opts.messages !== false) {\n out += ' , message: \\'should match pattern \"';\n if ($isData) {\n out += '\\' + ' + ($schemaValue) + ' + \\'';\n } else {\n out += '' + (it.util.escapeQuotes($schema));\n }\n out += '\"\\' ';\n }\n if (it.opts.verbose) {\n out += ' , schema: ';\n if ($isData) {\n out += 'validate.schema' + ($schemaPath);\n } else {\n out += '' + (it.util.toQuotedString($schema));\n }\n out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n }\n out += ' } ';\n } else {\n out += ' {} ';\n }\n var __err = out;\n out = $$outStack.pop();\n if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */\n if (it.async) {\n out += ' throw new ValidationError([' + (__err) + ']); ';\n } else {\n out += ' validate.errors = [' + (__err) + ']; return false; ';\n }\n } else {\n out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n }\n out += '} ';\n if ($breakOnError) {\n out += ' else { ';\n }\n return out;\n}\n\n},{}],28:[function(require,module,exports){\n'use strict';\nmodule.exports = function generate_patternRequired(it, $keyword) {\n var out = ' ';\n var $lvl = it.level;\n var $dataLvl = it.dataLevel;\n var $schema = it.schema[$keyword];\n var $schemaPath = it.schemaPath + '.' + $keyword;\n var $errSchemaPath = it.errSchemaPath + '/' + $keyword;\n var $breakOnError = !it.opts.allErrors;\n var $errorKeyword;\n var $data = 'data' + ($dataLvl || '');\n var $valid = 'valid' + $lvl;\n var $key = 'key' + $lvl,\n $matched = 'patternMatched' + $lvl,\n $closingBraces = '';\n out += 'var ' + ($valid) + ' = true;';\n var arr1 = $schema;\n if (arr1) {\n var $pProperty, i1 = -1,\n l1 = arr1.length - 1;\n while (i1 < l1) {\n $pProperty = arr1[i1 += 1];\n out += ' var ' + ($matched) + ' = false; for (var ' + ($key) + ' in ' + ($data) + ') { ' + ($matched) + ' = ' + (it.usePattern($pProperty)) + '.test(' + ($key) + '); if (' + ($matched) + ') break; } ';\n var $missingPattern = it.util.escapeQuotes($pProperty);\n out += ' if (!' + ($matched) + ') { ' + ($valid) + ' = false; var err = '; /* istanbul ignore else */\n if (it.createErrors !== false) {\n out += ' { keyword: \\'' + ($errorKeyword || 'patternRequired') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: \"' + ($errSchemaPath) + '\" , params: { missingPattern: \\'' + ($missingPattern) + '\\' } ';\n if (it.opts.messages !== false) {\n out += ' , message: \\'should have property matching pattern \\\\\\'' + ($missingPattern) + '\\\\\\'\\' ';\n }\n if (it.opts.verbose) {\n out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n }\n out += ' } ';\n } else {\n out += ' {} ';\n }\n out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } ';\n if ($breakOnError) {\n $closingBraces += '}';\n out += ' else { ';\n }\n }\n }\n out += '' + ($closingBraces);\n return out;\n}\n\n},{}],29:[function(require,module,exports){\n'use strict';\nmodule.exports = function generate_properties(it, $keyword) {\n var out = ' ';\n var $lvl = it.level;\n var $dataLvl = it.dataLevel;\n var $schema = it.schema[$keyword];\n var $schemaPath = it.schemaPath + '.' + $keyword;\n var $errSchemaPath = it.errSchemaPath + '/' + $keyword;\n var $breakOnError = !it.opts.allErrors;\n var $errorKeyword;\n var $data = 'data' + ($dataLvl || '');\n var $valid = 'valid' + $lvl;\n var $errs = 'errs__' + $lvl;\n var $it = it.util.copy(it);\n var $closingBraces = '';\n $it.level++;\n var $dataNxt = $it.dataLevel = it.dataLevel + 1,\n $nextData = 'data' + $dataNxt;\n var $schemaKeys = Object.keys($schema || {}),\n $pProperties = it.schema.patternProperties || {},\n $pPropertyKeys = Object.keys($pProperties),\n $aProperties = it.schema.additionalProperties,\n $someProperties = $schemaKeys.length || $pPropertyKeys.length,\n $noAdditional = $aProperties === false,\n $additionalIsSchema = typeof $aProperties == 'object' && Object.keys($aProperties).length,\n $removeAdditional = it.opts.removeAdditional,\n $checkAdditional = $noAdditional || $additionalIsSchema || $removeAdditional;\n var $required = it.schema.required;\n if ($required && !(it.opts.v5 && $required.$data) && $required.length < it.opts.loopRequired) var $requiredHash = it.util.toHash($required);\n if (it.opts.v5) {\n var $pgProperties = it.schema.patternGroups || {},\n $pgPropertyKeys = Object.keys($pgProperties);\n }\n out += 'var ' + ($errs) + ' = errors;var valid' + ($it.level) + ' = true;';\n if ($checkAdditional) {\n out += ' for (var key' + ($lvl) + ' in ' + ($data) + ') { ';\n if ($someProperties) {\n out += ' var isAdditional' + ($lvl) + ' = !(false ';\n if ($schemaKeys.length) {\n if ($schemaKeys.length > 5) {\n out += ' || validate.schema' + ($schemaPath) + '[key' + ($lvl) + '] ';\n } else {\n var arr1 = $schemaKeys;\n if (arr1) {\n var $propertyKey, i1 = -1,\n l1 = arr1.length - 1;\n while (i1 < l1) {\n $propertyKey = arr1[i1 += 1];\n out += ' || key' + ($lvl) + ' == ' + (it.util.toQuotedString($propertyKey)) + ' ';\n }\n }\n }\n }\n if ($pPropertyKeys.length) {\n var arr2 = $pPropertyKeys;\n if (arr2) {\n var $pProperty, $i = -1,\n l2 = arr2.length - 1;\n while ($i < l2) {\n $pProperty = arr2[$i += 1];\n out += ' || ' + (it.usePattern($pProperty)) + '.test(key' + ($lvl) + ') ';\n }\n }\n }\n if (it.opts.v5 && $pgPropertyKeys && $pgPropertyKeys.length) {\n var arr3 = $pgPropertyKeys;\n if (arr3) {\n var $pgProperty, $i = -1,\n l3 = arr3.length - 1;\n while ($i < l3) {\n $pgProperty = arr3[$i += 1];\n out += ' || ' + (it.usePattern($pgProperty)) + '.test(key' + ($lvl) + ') ';\n }\n }\n }\n out += ' ); if (isAdditional' + ($lvl) + ') { ';\n }\n if ($removeAdditional == 'all') {\n out += ' delete ' + ($data) + '[key' + ($lvl) + ']; ';\n } else {\n var $currentErrorPath = it.errorPath;\n var $additionalProperty = '\\' + key' + $lvl + ' + \\'';\n if (it.opts._errorDataPathProperty) {\n it.errorPath = it.util.getPathExpr(it.errorPath, 'key' + $lvl, it.opts.jsonPointers);\n }\n if ($noAdditional) {\n if ($removeAdditional) {\n out += ' delete ' + ($data) + '[key' + ($lvl) + ']; ';\n } else {\n out += ' valid' + ($it.level) + ' = false; ';\n var $currErrSchemaPath = $errSchemaPath;\n $errSchemaPath = it.errSchemaPath + '/additionalProperties';\n var $$outStack = $$outStack || [];\n $$outStack.push(out);\n out = ''; /* istanbul ignore else */\n if (it.createErrors !== false) {\n out += ' { keyword: \\'' + ($errorKeyword || 'additionalProperties') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: \"' + ($errSchemaPath) + '\" , params: { additionalProperty: \\'' + ($additionalProperty) + '\\' } ';\n if (it.opts.messages !== false) {\n out += ' , message: \\'should NOT have additional properties\\' ';\n }\n if (it.opts.verbose) {\n out += ' , schema: false , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n }\n out += ' } ';\n } else {\n out += ' {} ';\n }\n var __err = out;\n out = $$outStack.pop();\n if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */\n if (it.async) {\n out += ' throw new ValidationError([' + (__err) + ']); ';\n } else {\n out += ' validate.errors = [' + (__err) + ']; return false; ';\n }\n } else {\n out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n }\n $errSchemaPath = $currErrSchemaPath;\n if ($breakOnError) {\n out += ' break; ';\n }\n }\n } else if ($additionalIsSchema) {\n if ($removeAdditional == 'failing') {\n out += ' var ' + ($errs) + ' = errors; ';\n var $wasComposite = it.compositeRule;\n it.compositeRule = $it.compositeRule = true;\n $it.schema = $aProperties;\n $it.schemaPath = it.schemaPath + '.additionalProperties';\n $it.errSchemaPath = it.errSchemaPath + '/additionalProperties';\n $it.errorPath = it.opts._errorDataPathProperty ? it.errorPath : it.util.getPathExpr(it.errorPath, 'key' + $lvl, it.opts.jsonPointers);\n var $passData = $data + '[key' + $lvl + ']';\n $it.dataPathArr[$dataNxt] = 'key' + $lvl;\n var $code = it.validate($it);\n if (it.util.varOccurences($code, $nextData) < 2) {\n out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' ';\n } else {\n out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' ';\n }\n out += ' if (!valid' + ($it.level) + ') { errors = ' + ($errs) + '; if (validate.errors !== null) { if (errors) validate.errors.length = errors; else validate.errors = null; } delete ' + ($data) + '[key' + ($lvl) + ']; } ';\n it.compositeRule = $it.compositeRule = $wasComposite;\n } else {\n $it.schema = $aProperties;\n $it.schemaPath = it.schemaPath + '.additionalProperties';\n $it.errSchemaPath = it.errSchemaPath + '/additionalProperties';\n $it.errorPath = it.opts._errorDataPathProperty ? it.errorPath : it.util.getPathExpr(it.errorPath, 'key' + $lvl, it.opts.jsonPointers);\n var $passData = $data + '[key' + $lvl + ']';\n $it.dataPathArr[$dataNxt] = 'key' + $lvl;\n var $code = it.validate($it);\n if (it.util.varOccurences($code, $nextData) < 2) {\n out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' ';\n } else {\n out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' ';\n }\n if ($breakOnError) {\n out += ' if (!valid' + ($it.level) + ') break; ';\n }\n }\n }\n it.errorPath = $currentErrorPath;\n }\n if ($someProperties) {\n out += ' } ';\n }\n out += ' } ';\n if ($breakOnError) {\n out += ' if (valid' + ($it.level) + ') { ';\n $closingBraces += '}';\n }\n }\n var $useDefaults = it.opts.useDefaults && !it.compositeRule;\n if ($schemaKeys.length) {\n var arr4 = $schemaKeys;\n if (arr4) {\n var $propertyKey, i4 = -1,\n l4 = arr4.length - 1;\n while (i4 < l4) {\n $propertyKey = arr4[i4 += 1];\n var $sch = $schema[$propertyKey];\n if (it.util.schemaHasRules($sch, it.RULES.all)) {\n var $prop = it.util.getProperty($propertyKey),\n $passData = $data + $prop,\n $hasDefault = $useDefaults && $sch.default !== undefined;\n $it.schema = $sch;\n $it.schemaPath = $schemaPath + $prop;\n $it.errSchemaPath = $errSchemaPath + '/' + it.util.escapeFragment($propertyKey);\n $it.errorPath = it.util.getPath(it.errorPath, $propertyKey, it.opts.jsonPointers);\n $it.dataPathArr[$dataNxt] = it.util.toQuotedString($propertyKey);\n var $code = it.validate($it);\n if (it.util.varOccurences($code, $nextData) < 2) {\n $code = it.util.varReplace($code, $nextData, $passData);\n var $useData = $passData;\n } else {\n var $useData = $nextData;\n out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ';\n }\n if ($hasDefault) {\n out += ' ' + ($code) + ' ';\n } else {\n if ($requiredHash && $requiredHash[$propertyKey]) {\n out += ' if (' + ($useData) + ' === undefined) { valid' + ($it.level) + ' = false; ';\n var $currentErrorPath = it.errorPath,\n $currErrSchemaPath = $errSchemaPath,\n $missingProperty = it.util.escapeQuotes($propertyKey);\n if (it.opts._errorDataPathProperty) {\n it.errorPath = it.util.getPath($currentErrorPath, $propertyKey, it.opts.jsonPointers);\n }\n $errSchemaPath = it.errSchemaPath + '/required';\n var $$outStack = $$outStack || [];\n $$outStack.push(out);\n out = ''; /* istanbul ignore else */\n if (it.createErrors !== false) {\n out += ' { keyword: \\'' + ($errorKeyword || 'required') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: \"' + ($errSchemaPath) + '\" , params: { missingProperty: \\'' + ($missingProperty) + '\\' } ';\n if (it.opts.messages !== false) {\n out += ' , message: \\'';\n if (it.opts._errorDataPathProperty) {\n out += 'is a required property';\n } else {\n out += 'should have required property \\\\\\'' + ($missingProperty) + '\\\\\\'';\n }\n out += '\\' ';\n }\n if (it.opts.verbose) {\n out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n }\n out += ' } ';\n } else {\n out += ' {} ';\n }\n var __err = out;\n out = $$outStack.pop();\n if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */\n if (it.async) {\n out += ' throw new ValidationError([' + (__err) + ']); ';\n } else {\n out += ' validate.errors = [' + (__err) + ']; return false; ';\n }\n } else {\n out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n }\n $errSchemaPath = $currErrSchemaPath;\n it.errorPath = $currentErrorPath;\n out += ' } else { ';\n } else {\n if ($breakOnError) {\n out += ' if (' + ($useData) + ' === undefined) { valid' + ($it.level) + ' = true; } else { ';\n } else {\n out += ' if (' + ($useData) + ' !== undefined) { ';\n }\n }\n out += ' ' + ($code) + ' } ';\n }\n }\n if ($breakOnError) {\n out += ' if (valid' + ($it.level) + ') { ';\n $closingBraces += '}';\n }\n }\n }\n }\n var arr5 = $pPropertyKeys;\n if (arr5) {\n var $pProperty, i5 = -1,\n l5 = arr5.length - 1;\n while (i5 < l5) {\n $pProperty = arr5[i5 += 1];\n var $sch = $pProperties[$pProperty];\n if (it.util.schemaHasRules($sch, it.RULES.all)) {\n $it.schema = $sch;\n $it.schemaPath = it.schemaPath + '.patternProperties' + it.util.getProperty($pProperty);\n $it.errSchemaPath = it.errSchemaPath + '/patternProperties/' + it.util.escapeFragment($pProperty);\n out += ' for (var key' + ($lvl) + ' in ' + ($data) + ') { if (' + (it.usePattern($pProperty)) + '.test(key' + ($lvl) + ')) { ';\n $it.errorPath = it.util.getPathExpr(it.errorPath, 'key' + $lvl, it.opts.jsonPointers);\n var $passData = $data + '[key' + $lvl + ']';\n $it.dataPathArr[$dataNxt] = 'key' + $lvl;\n var $code = it.validate($it);\n if (it.util.varOccurences($code, $nextData) < 2) {\n out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' ';\n } else {\n out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' ';\n }\n if ($breakOnError) {\n out += ' if (!valid' + ($it.level) + ') break; ';\n }\n out += ' } ';\n if ($breakOnError) {\n out += ' else valid' + ($it.level) + ' = true; ';\n }\n out += ' } ';\n if ($breakOnError) {\n out += ' if (valid' + ($it.level) + ') { ';\n $closingBraces += '}';\n }\n }\n }\n }\n if (it.opts.v5) {\n var arr6 = $pgPropertyKeys;\n if (arr6) {\n var $pgProperty, i6 = -1,\n l6 = arr6.length - 1;\n while (i6 < l6) {\n $pgProperty = arr6[i6 += 1];\n var $pgSchema = $pgProperties[$pgProperty],\n $sch = $pgSchema.schema;\n if (it.util.schemaHasRules($sch, it.RULES.all)) {\n $it.schema = $sch;\n $it.schemaPath = it.schemaPath + '.patternGroups' + it.util.getProperty($pgProperty) + '.schema';\n $it.errSchemaPath = it.errSchemaPath + '/patternGroups/' + it.util.escapeFragment($pgProperty) + '/schema';\n out += ' var pgPropCount' + ($lvl) + ' = 0; for (var key' + ($lvl) + ' in ' + ($data) + ') { if (' + (it.usePattern($pgProperty)) + '.test(key' + ($lvl) + ')) { pgPropCount' + ($lvl) + '++; ';\n $it.errorPath = it.util.getPathExpr(it.errorPath, 'key' + $lvl, it.opts.jsonPointers);\n var $passData = $data + '[key' + $lvl + ']';\n $it.dataPathArr[$dataNxt] = 'key' + $lvl;\n var $code = it.validate($it);\n if (it.util.varOccurences($code, $nextData) < 2) {\n out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' ';\n } else {\n out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' ';\n }\n if ($breakOnError) {\n out += ' if (!valid' + ($it.level) + ') break; ';\n }\n out += ' } ';\n if ($breakOnError) {\n out += ' else valid' + ($it.level) + ' = true; ';\n }\n out += ' } ';\n if ($breakOnError) {\n out += ' if (valid' + ($it.level) + ') { ';\n $closingBraces += '}';\n }\n var $pgMin = $pgSchema.minimum,\n $pgMax = $pgSchema.maximum;\n if ($pgMin !== undefined || $pgMax !== undefined) {\n out += ' var ' + ($valid) + ' = true; ';\n var $currErrSchemaPath = $errSchemaPath;\n if ($pgMin !== undefined) {\n var $limit = $pgMin,\n $reason = 'minimum',\n $moreOrLess = 'less';\n out += ' ' + ($valid) + ' = pgPropCount' + ($lvl) + ' >= ' + ($pgMin) + '; ';\n $errSchemaPath = it.errSchemaPath + '/patternGroups/minimum';\n out += ' if (!' + ($valid) + ') { ';\n var $$outStack = $$outStack || [];\n $$outStack.push(out);\n out = ''; /* istanbul ignore else */\n if (it.createErrors !== false) {\n out += ' { keyword: \\'' + ($errorKeyword || 'patternGroups') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: \"' + ($errSchemaPath) + '\" , params: { reason: \\'' + ($reason) + '\\', limit: ' + ($limit) + ', pattern: \\'' + (it.util.escapeQuotes($pgProperty)) + '\\' } ';\n if (it.opts.messages !== false) {\n out += ' , message: \\'should NOT have ' + ($moreOrLess) + ' than ' + ($limit) + ' properties matching pattern \"' + (it.util.escapeQuotes($pgProperty)) + '\"\\' ';\n }\n if (it.opts.verbose) {\n out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n }\n out += ' } ';\n } else {\n out += ' {} ';\n }\n var __err = out;\n out = $$outStack.pop();\n if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */\n if (it.async) {\n out += ' throw new ValidationError([' + (__err) + ']); ';\n } else {\n out += ' validate.errors = [' + (__err) + ']; return false; ';\n }\n } else {\n out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n }\n out += ' } ';\n if ($pgMax !== undefined) {\n out += ' else ';\n }\n }\n if ($pgMax !== undefined) {\n var $limit = $pgMax,\n $reason = 'maximum',\n $moreOrLess = 'more';\n out += ' ' + ($valid) + ' = pgPropCount' + ($lvl) + ' <= ' + ($pgMax) + '; ';\n $errSchemaPath = it.errSchemaPath + '/patternGroups/maximum';\n out += ' if (!' + ($valid) + ') { ';\n var $$outStack = $$outStack || [];\n $$outStack.push(out);\n out = ''; /* istanbul ignore else */\n if (it.createErrors !== false) {\n out += ' { keyword: \\'' + ($errorKeyword || 'patternGroups') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: \"' + ($errSchemaPath) + '\" , params: { reason: \\'' + ($reason) + '\\', limit: ' + ($limit) + ', pattern: \\'' + (it.util.escapeQuotes($pgProperty)) + '\\' } ';\n if (it.opts.messages !== false) {\n out += ' , message: \\'should NOT have ' + ($moreOrLess) + ' than ' + ($limit) + ' properties matching pattern \"' + (it.util.escapeQuotes($pgProperty)) + '\"\\' ';\n }\n if (it.opts.verbose) {\n out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n }\n out += ' } ';\n } else {\n out += ' {} ';\n }\n var __err = out;\n out = $$outStack.pop();\n if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */\n if (it.async) {\n out += ' throw new ValidationError([' + (__err) + ']); ';\n } else {\n out += ' validate.errors = [' + (__err) + ']; return false; ';\n }\n } else {\n out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n }\n out += ' } ';\n }\n $errSchemaPath = $currErrSchemaPath;\n if ($breakOnError) {\n out += ' if (' + ($valid) + ') { ';\n $closingBraces += '}';\n }\n }\n }\n }\n }\n }\n if ($breakOnError) {\n out += ' ' + ($closingBraces) + ' if (' + ($errs) + ' == errors) {';\n }\n out = it.util.cleanUpCode(out);\n return out;\n}\n\n},{}],30:[function(require,module,exports){\n'use strict';\nmodule.exports = function generate_ref(it, $keyword) {\n var out = ' ';\n var $lvl = it.level;\n var $dataLvl = it.dataLevel;\n var $schema = it.schema[$keyword];\n var $errSchemaPath = it.errSchemaPath + '/' + $keyword;\n var $breakOnError = !it.opts.allErrors;\n var $errorKeyword;\n var $data = 'data' + ($dataLvl || '');\n var $valid = 'valid' + $lvl;\n var $async, $refCode;\n if ($schema == '#' || $schema == '#/') {\n if (it.isRoot) {\n $async = it.async;\n $refCode = 'validate';\n } else {\n $async = it.root.schema.$async === true;\n $refCode = 'root.refVal[0]';\n }\n } else {\n var $refVal = it.resolveRef(it.baseId, $schema, it.isRoot);\n if ($refVal === undefined) {\n var $message = 'can\\'t resolve reference ' + $schema + ' from id ' + it.baseId;\n if (it.opts.missingRefs == 'fail') {\n console.log($message);\n var $$outStack = $$outStack || [];\n $$outStack.push(out);\n out = ''; /* istanbul ignore else */\n if (it.createErrors !== false) {\n out += ' { keyword: \\'' + ($errorKeyword || '$ref') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: \"' + ($errSchemaPath) + '\" , params: { ref: \\'' + (it.util.escapeQuotes($schema)) + '\\' } ';\n if (it.opts.messages !== false) {\n out += ' , message: \\'can\\\\\\'t resolve reference ' + (it.util.escapeQuotes($schema)) + '\\' ';\n }\n if (it.opts.verbose) {\n out += ' , schema: ' + (it.util.toQuotedString($schema)) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n }\n out += ' } ';\n } else {\n out += ' {} ';\n }\n var __err = out;\n out = $$outStack.pop();\n if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */\n if (it.async) {\n out += ' throw new ValidationError([' + (__err) + ']); ';\n } else {\n out += ' validate.errors = [' + (__err) + ']; return false; ';\n }\n } else {\n out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n }\n if ($breakOnError) {\n out += ' if (false) { ';\n }\n } else if (it.opts.missingRefs == 'ignore') {\n console.log($message);\n if ($breakOnError) {\n out += ' if (true) { ';\n }\n } else {\n var $error = new Error($message);\n $error.missingRef = it.resolve.url(it.baseId, $schema);\n $error.missingSchema = it.resolve.normalizeId(it.resolve.fullPath($error.missingRef));\n throw $error;\n }\n } else if ($refVal.inline) {\n var $it = it.util.copy(it);\n $it.level++;\n $it.schema = $refVal.schema;\n $it.schemaPath = '';\n $it.errSchemaPath = $schema;\n var $code = it.validate($it).replace(/validate\\.schema/g, $refVal.code);\n out += ' ' + ($code) + ' ';\n if ($breakOnError) {\n out += ' if (valid' + ($it.level) + ') { ';\n }\n } else {\n $async = $refVal.async;\n $refCode = $refVal.code;\n }\n }\n if ($refCode) {\n var $$outStack = $$outStack || [];\n $$outStack.push(out);\n out = '';\n if (it.opts.passContext) {\n out += ' ' + ($refCode) + '.call(this, ';\n } else {\n out += ' ' + ($refCode) + '( ';\n }\n out += ' ' + ($data) + ', (dataPath || \\'\\')';\n if (it.errorPath != '\"\"') {\n out += ' + ' + (it.errorPath);\n }\n if ($dataLvl) {\n out += ' , data' + (($dataLvl - 1) || '') + ' , ' + (it.dataPathArr[$dataLvl]) + ' ';\n } else {\n out += ' , parentData , parentDataProperty ';\n }\n out += ') ';\n var __callValidate = out;\n out = $$outStack.pop();\n if ($async) {\n if (!it.async) throw new Error('async schema referenced by sync schema');\n out += ' try { ';\n if ($breakOnError) {\n out += 'var ' + ($valid) + ' =';\n }\n out += ' ' + (it.yieldAwait) + ' ' + (__callValidate) + '; } catch (e) { if (!(e instanceof ValidationError)) throw e; if (vErrors === null) vErrors = e.errors; else vErrors = vErrors.concat(e.errors); errors = vErrors.length; } ';\n if ($breakOnError) {\n out += ' if (' + ($valid) + ') { ';\n }\n } else {\n out += ' if (!' + (__callValidate) + ') { if (vErrors === null) vErrors = ' + ($refCode) + '.errors; else vErrors = vErrors.concat(' + ($refCode) + '.errors); errors = vErrors.length; } ';\n if ($breakOnError) {\n out += ' else { ';\n }\n }\n }\n return out;\n}\n\n},{}],31:[function(require,module,exports){\n'use strict';\nmodule.exports = function generate_required(it, $keyword) {\n var out = ' ';\n var $lvl = it.level;\n var $dataLvl = it.dataLevel;\n var $schema = it.schema[$keyword];\n var $schemaPath = it.schemaPath + '.' + $keyword;\n var $errSchemaPath = it.errSchemaPath + '/' + $keyword;\n var $breakOnError = !it.opts.allErrors;\n var $errorKeyword;\n var $data = 'data' + ($dataLvl || '');\n var $valid = 'valid' + $lvl;\n var $isData = it.opts.v5 && $schema.$data;\n var $schemaValue = $isData ? it.util.getData($schema.$data, $dataLvl, it.dataPathArr) : $schema;\n if ($isData) {\n out += ' var schema' + ($lvl) + ' = ' + ($schemaValue) + '; ';\n $schemaValue = 'schema' + $lvl;\n }\n if (!$isData) {\n if ($schema.length < it.opts.loopRequired && it.schema.properties && Object.keys(it.schema.properties).length) {\n var $required = [];\n var arr1 = $schema;\n if (arr1) {\n var $property, i1 = -1,\n l1 = arr1.length - 1;\n while (i1 < l1) {\n $property = arr1[i1 += 1];\n var $propertySch = it.schema.properties[$property];\n if (!($propertySch && it.util.schemaHasRules($propertySch, it.RULES.all))) {\n $required[$required.length] = $property;\n }\n }\n }\n } else {\n var $required = $schema;\n }\n }\n if ($isData || $required.length) {\n var $currentErrorPath = it.errorPath,\n $loopRequired = $isData || $required.length >= it.opts.loopRequired;\n if ($breakOnError) {\n out += ' var missing' + ($lvl) + '; ';\n if ($loopRequired) {\n if (!$isData) {\n out += ' var schema' + ($lvl) + ' = validate.schema' + ($schemaPath) + '; ';\n }\n var $i = 'i' + $lvl,\n $propertyPath = 'schema' + $lvl + '[' + $i + ']',\n $missingProperty = '\\' + ' + $propertyPath + ' + \\'';\n if (it.opts._errorDataPathProperty) {\n it.errorPath = it.util.getPathExpr($currentErrorPath, $propertyPath, it.opts.jsonPointers);\n }\n out += ' var ' + ($valid) + ' = true; ';\n if ($isData) {\n out += ' if (schema' + ($lvl) + ' === undefined) ' + ($valid) + ' = true; else if (!Array.isArray(schema' + ($lvl) + ')) ' + ($valid) + ' = false; else {';\n }\n out += ' for (var ' + ($i) + ' = 0; ' + ($i) + ' < schema' + ($lvl) + '.length; ' + ($i) + '++) { ' + ($valid) + ' = ' + ($data) + '[schema' + ($lvl) + '[' + ($i) + ']] !== undefined; if (!' + ($valid) + ') break; } ';\n if ($isData) {\n out += ' } ';\n }\n out += ' if (!' + ($valid) + ') { ';\n var $$outStack = $$outStack || [];\n $$outStack.push(out);\n out = ''; /* istanbul ignore else */\n if (it.createErrors !== false) {\n out += ' { keyword: \\'' + ($errorKeyword || 'required') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: \"' + ($errSchemaPath) + '\" , params: { missingProperty: \\'' + ($missingProperty) + '\\' } ';\n if (it.opts.messages !== false) {\n out += ' , message: \\'';\n if (it.opts._errorDataPathProperty) {\n out += 'is a required property';\n } else {\n out += 'should have required property \\\\\\'' + ($missingProperty) + '\\\\\\'';\n }\n out += '\\' ';\n }\n if (it.opts.verbose) {\n out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n }\n out += ' } ';\n } else {\n out += ' {} ';\n }\n var __err = out;\n out = $$outStack.pop();\n if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */\n if (it.async) {\n out += ' throw new ValidationError([' + (__err) + ']); ';\n } else {\n out += ' validate.errors = [' + (__err) + ']; return false; ';\n }\n } else {\n out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n }\n out += ' } else { ';\n } else {\n out += ' if ( ';\n var arr2 = $required;\n if (arr2) {\n var _$property, $i = -1,\n l2 = arr2.length - 1;\n while ($i < l2) {\n _$property = arr2[$i += 1];\n if ($i) {\n out += ' || ';\n }\n var $prop = it.util.getProperty(_$property);\n out += ' ( ' + ($data) + ($prop) + ' === undefined && (missing' + ($lvl) + ' = ' + (it.util.toQuotedString(it.opts.jsonPointers ? _$property : $prop)) + ') ) ';\n }\n }\n out += ') { ';\n var $propertyPath = 'missing' + $lvl,\n $missingProperty = '\\' + ' + $propertyPath + ' + \\'';\n if (it.opts._errorDataPathProperty) {\n it.errorPath = it.opts.jsonPointers ? it.util.getPathExpr($currentErrorPath, $propertyPath, true) : $currentErrorPath + ' + ' + $propertyPath;\n }\n var $$outStack = $$outStack || [];\n $$outStack.push(out);\n out = ''; /* istanbul ignore else */\n if (it.createErrors !== false) {\n out += ' { keyword: \\'' + ($errorKeyword || 'required') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: \"' + ($errSchemaPath) + '\" , params: { missingProperty: \\'' + ($missingProperty) + '\\' } ';\n if (it.opts.messages !== false) {\n out += ' , message: \\'';\n if (it.opts._errorDataPathProperty) {\n out += 'is a required property';\n } else {\n out += 'should have required property \\\\\\'' + ($missingProperty) + '\\\\\\'';\n }\n out += '\\' ';\n }\n if (it.opts.verbose) {\n out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n }\n out += ' } ';\n } else {\n out += ' {} ';\n }\n var __err = out;\n out = $$outStack.pop();\n if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */\n if (it.async) {\n out += ' throw new ValidationError([' + (__err) + ']); ';\n } else {\n out += ' validate.errors = [' + (__err) + ']; return false; ';\n }\n } else {\n out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n }\n out += ' } else { ';\n }\n } else {\n if ($loopRequired) {\n if (!$isData) {\n out += ' var schema' + ($lvl) + ' = validate.schema' + ($schemaPath) + '; ';\n }\n var $i = 'i' + $lvl,\n $propertyPath = 'schema' + $lvl + '[' + $i + ']',\n $missingProperty = '\\' + ' + $propertyPath + ' + \\'';\n if (it.opts._errorDataPathProperty) {\n it.errorPath = it.util.getPathExpr($currentErrorPath, $propertyPath, it.opts.jsonPointers);\n }\n if ($isData) {\n out += ' if (schema' + ($lvl) + ' && !Array.isArray(schema' + ($lvl) + ')) { var err = '; /* istanbul ignore else */\n if (it.createErrors !== false) {\n out += ' { keyword: \\'' + ($errorKeyword || 'required') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: \"' + ($errSchemaPath) + '\" , params: { missingProperty: \\'' + ($missingProperty) + '\\' } ';\n if (it.opts.messages !== false) {\n out += ' , message: \\'';\n if (it.opts._errorDataPathProperty) {\n out += 'is a required property';\n } else {\n out += 'should have required property \\\\\\'' + ($missingProperty) + '\\\\\\'';\n }\n out += '\\' ';\n }\n if (it.opts.verbose) {\n out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n }\n out += ' } ';\n } else {\n out += ' {} ';\n }\n out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } else if (schema' + ($lvl) + ' !== undefined) { ';\n }\n out += ' for (var ' + ($i) + ' = 0; ' + ($i) + ' < schema' + ($lvl) + '.length; ' + ($i) + '++) { if (' + ($data) + '[schema' + ($lvl) + '[' + ($i) + ']] === undefined) { var err = '; /* istanbul ignore else */\n if (it.createErrors !== false) {\n out += ' { keyword: \\'' + ($errorKeyword || 'required') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: \"' + ($errSchemaPath) + '\" , params: { missingProperty: \\'' + ($missingProperty) + '\\' } ';\n if (it.opts.messages !== false) {\n out += ' , message: \\'';\n if (it.opts._errorDataPathProperty) {\n out += 'is a required property';\n } else {\n out += 'should have required property \\\\\\'' + ($missingProperty) + '\\\\\\'';\n }\n out += '\\' ';\n }\n if (it.opts.verbose) {\n out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n }\n out += ' } ';\n } else {\n out += ' {} ';\n }\n out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } } ';\n if ($isData) {\n out += ' } ';\n }\n } else {\n var arr3 = $required;\n if (arr3) {\n var $property, $i = -1,\n l3 = arr3.length - 1;\n while ($i < l3) {\n $property = arr3[$i += 1];\n var $prop = it.util.getProperty($property),\n $missingProperty = it.util.escapeQuotes($property);\n if (it.opts._errorDataPathProperty) {\n it.errorPath = it.util.getPath($currentErrorPath, $property, it.opts.jsonPointers);\n }\n out += ' if (' + ($data) + ($prop) + ' === undefined) { var err = '; /* istanbul ignore else */\n if (it.createErrors !== false) {\n out += ' { keyword: \\'' + ($errorKeyword || 'required') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: \"' + ($errSchemaPath) + '\" , params: { missingProperty: \\'' + ($missingProperty) + '\\' } ';\n if (it.opts.messages !== false) {\n out += ' , message: \\'';\n if (it.opts._errorDataPathProperty) {\n out += 'is a required property';\n } else {\n out += 'should have required property \\\\\\'' + ($missingProperty) + '\\\\\\'';\n }\n out += '\\' ';\n }\n if (it.opts.verbose) {\n out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n }\n out += ' } ';\n } else {\n out += ' {} ';\n }\n out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } ';\n }\n }\n }\n }\n it.errorPath = $currentErrorPath;\n } else if ($breakOnError) {\n out += ' if (true) {';\n }\n return out;\n}\n\n},{}],32:[function(require,module,exports){\n'use strict';\nmodule.exports = function generate_switch(it, $keyword) {\n var out = ' ';\n var $lvl = it.level;\n var $dataLvl = it.dataLevel;\n var $schema = it.schema[$keyword];\n var $schemaPath = it.schemaPath + '.' + $keyword;\n var $errSchemaPath = it.errSchemaPath + '/' + $keyword;\n var $breakOnError = !it.opts.allErrors;\n var $errorKeyword;\n var $data = 'data' + ($dataLvl || '');\n var $valid = 'valid' + $lvl;\n var $errs = 'errs__' + $lvl;\n var $it = it.util.copy(it);\n var $closingBraces = '';\n $it.level++;\n var $ifPassed = 'ifPassed' + it.level,\n $shouldContinue;\n out += 'var ' + ($ifPassed) + ';';\n var arr1 = $schema;\n if (arr1) {\n var $sch, $caseIndex = -1,\n l1 = arr1.length - 1;\n while ($caseIndex < l1) {\n $sch = arr1[$caseIndex += 1];\n if ($caseIndex && !$shouldContinue) {\n out += ' if (!' + ($ifPassed) + ') { ';\n $closingBraces += '}';\n }\n if ($sch.if && it.util.schemaHasRules($sch.if, it.RULES.all)) {\n out += ' var ' + ($errs) + ' = errors; ';\n var $wasComposite = it.compositeRule;\n it.compositeRule = $it.compositeRule = true;\n $it.createErrors = false;\n $it.schema = $sch.if;\n $it.schemaPath = $schemaPath + '[' + $caseIndex + '].if';\n $it.errSchemaPath = $errSchemaPath + '/' + $caseIndex + '/if';\n out += ' ' + (it.validate($it)) + ' ';\n $it.createErrors = true;\n it.compositeRule = $it.compositeRule = $wasComposite;\n out += ' ' + ($ifPassed) + ' = valid' + ($it.level) + '; if (' + ($ifPassed) + ') { ';\n if (typeof $sch.then == 'boolean') {\n if ($sch.then === false) {\n var $$outStack = $$outStack || [];\n $$outStack.push(out);\n out = ''; /* istanbul ignore else */\n if (it.createErrors !== false) {\n out += ' { keyword: \\'' + ($errorKeyword || 'switch') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: \"' + ($errSchemaPath) + '\" , params: { caseIndex: ' + ($caseIndex) + ' } ';\n if (it.opts.messages !== false) {\n out += ' , message: \\'should pass \"switch\" keyword validation\\' ';\n }\n if (it.opts.verbose) {\n out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n }\n out += ' } ';\n } else {\n out += ' {} ';\n }\n var __err = out;\n out = $$outStack.pop();\n if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */\n if (it.async) {\n out += ' throw new ValidationError([' + (__err) + ']); ';\n } else {\n out += ' validate.errors = [' + (__err) + ']; return false; ';\n }\n } else {\n out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n }\n }\n out += ' var valid' + ($it.level) + ' = ' + ($sch.then) + '; ';\n } else {\n $it.schema = $sch.then;\n $it.schemaPath = $schemaPath + '[' + $caseIndex + '].then';\n $it.errSchemaPath = $errSchemaPath + '/' + $caseIndex + '/then';\n out += ' ' + (it.validate($it)) + ' ';\n }\n out += ' } else { errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } } ';\n } else {\n out += ' ' + ($ifPassed) + ' = true; ';\n if (typeof $sch.then == 'boolean') {\n if ($sch.then === false) {\n var $$outStack = $$outStack || [];\n $$outStack.push(out);\n out = ''; /* istanbul ignore else */\n if (it.createErrors !== false) {\n out += ' { keyword: \\'' + ($errorKeyword || 'switch') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: \"' + ($errSchemaPath) + '\" , params: { caseIndex: ' + ($caseIndex) + ' } ';\n if (it.opts.messages !== false) {\n out += ' , message: \\'should pass \"switch\" keyword validation\\' ';\n }\n if (it.opts.verbose) {\n out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n }\n out += ' } ';\n } else {\n out += ' {} ';\n }\n var __err = out;\n out = $$outStack.pop();\n if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */\n if (it.async) {\n out += ' throw new ValidationError([' + (__err) + ']); ';\n } else {\n out += ' validate.errors = [' + (__err) + ']; return false; ';\n }\n } else {\n out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n }\n }\n out += ' var valid' + ($it.level) + ' = ' + ($sch.then) + '; ';\n } else {\n $it.schema = $sch.then;\n $it.schemaPath = $schemaPath + '[' + $caseIndex + '].then';\n $it.errSchemaPath = $errSchemaPath + '/' + $caseIndex + '/then';\n out += ' ' + (it.validate($it)) + ' ';\n }\n }\n $shouldContinue = $sch.continue\n }\n }\n out += '' + ($closingBraces) + 'var ' + ($valid) + ' = valid' + ($it.level) + '; ';\n out = it.util.cleanUpCode(out);\n return out;\n}\n\n},{}],33:[function(require,module,exports){\n'use strict';\nmodule.exports = function generate_uniqueItems(it, $keyword) {\n var out = ' ';\n var $lvl = it.level;\n var $dataLvl = it.dataLevel;\n var $schema = it.schema[$keyword];\n var $schemaPath = it.schemaPath + '.' + $keyword;\n var $errSchemaPath = it.errSchemaPath + '/' + $keyword;\n var $breakOnError = !it.opts.allErrors;\n var $errorKeyword;\n var $data = 'data' + ($dataLvl || '');\n var $valid = 'valid' + $lvl;\n var $isData = it.opts.v5 && $schema.$data;\n var $schemaValue = $isData ? it.util.getData($schema.$data, $dataLvl, it.dataPathArr) : $schema;\n if ($isData) {\n out += ' var schema' + ($lvl) + ' = ' + ($schemaValue) + '; ';\n $schemaValue = 'schema' + $lvl;\n }\n if (($schema || $isData) && it.opts.uniqueItems !== false) {\n if ($isData) {\n out += ' var ' + ($valid) + '; if (' + ($schemaValue) + ' === false || ' + ($schemaValue) + ' === undefined) ' + ($valid) + ' = true; else if (typeof ' + ($schemaValue) + ' != \\'boolean\\') ' + ($valid) + ' = false; else { ';\n }\n out += ' var ' + ($valid) + ' = true; if (' + ($data) + '.length > 1) { var i = ' + ($data) + '.length, j; outer: for (;i--;) { for (j = i; j--;) { if (equal(' + ($data) + '[i], ' + ($data) + '[j])) { ' + ($valid) + ' = false; break outer; } } } } ';\n if ($isData) {\n out += ' } ';\n }\n out += ' if (!' + ($valid) + ') { ';\n var $$outStack = $$outStack || [];\n $$outStack.push(out);\n out = ''; /* istanbul ignore else */\n if (it.createErrors !== false) {\n out += ' { keyword: \\'' + ($errorKeyword || 'uniqueItems') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: \"' + ($errSchemaPath) + '\" , params: { i: i, j: j } ';\n if (it.opts.messages !== false) {\n out += ' , message: \\'should NOT have duplicate items (items ## \\' + j + \\' and \\' + i + \\' are identical)\\' ';\n }\n if (it.opts.verbose) {\n out += ' , schema: ';\n if ($isData) {\n out += 'validate.schema' + ($schemaPath);\n } else {\n out += '' + ($schema);\n }\n out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n }\n out += ' } ';\n } else {\n out += ' {} ';\n }\n var __err = out;\n out = $$outStack.pop();\n if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */\n if (it.async) {\n out += ' throw new ValidationError([' + (__err) + ']); ';\n } else {\n out += ' validate.errors = [' + (__err) + ']; return false; ';\n }\n } else {\n out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n }\n out += ' } ';\n if ($breakOnError) {\n out += ' else { ';\n }\n } else {\n if ($breakOnError) {\n out += ' if (true) { ';\n }\n }\n return out;\n}\n\n},{}],34:[function(require,module,exports){\n'use strict';\nmodule.exports = function generate_validate(it, $keyword) {\n var out = '';\n var $async = it.schema.$async === true;\n if (it.isTop) {\n var $top = it.isTop,\n $lvl = it.level = 0,\n $dataLvl = it.dataLevel = 0,\n $data = 'data';\n it.rootId = it.resolve.fullPath(it.root.schema.id);\n it.baseId = it.baseId || it.rootId;\n if ($async) {\n it.async = true;\n var $es7 = it.opts.async == 'es7';\n it.yieldAwait = $es7 ? 'await' : 'yield';\n }\n delete it.isTop;\n it.dataPathArr = [undefined];\n out += ' validate = ';\n if ($async) {\n if ($es7) {\n out += ' (async function ';\n } else {\n if (it.opts.async == 'co*') {\n out += 'co.wrap';\n }\n out += '(function* ';\n }\n } else {\n out += ' (function ';\n }\n out += ' (data, dataPath, parentData, parentDataProperty) { \\'use strict\\'; var vErrors = null; ';\n out += ' var errors = 0; ';\n } else {\n var $lvl = it.level,\n $dataLvl = it.dataLevel,\n $data = 'data' + ($dataLvl || '');\n if (it.schema.id) it.baseId = it.resolve.url(it.baseId, it.schema.id);\n if ($async && !it.async) throw new Error('async schema in sync schema');\n out += ' var errs_' + ($lvl) + ' = errors;';\n }\n var $valid = 'valid' + $lvl,\n $breakOnError = !it.opts.allErrors,\n $closingBraces1 = '',\n $closingBraces2 = '',\n $errorKeyword;\n var $typeSchema = it.schema.type,\n $typeIsArray = Array.isArray($typeSchema);\n if ($typeSchema && it.opts.coerceTypes) {\n var $coerceToTypes = it.util.coerceToTypes($typeSchema);\n if ($coerceToTypes) {\n var $schemaPath = it.schemaPath + '.type',\n $errSchemaPath = it.errSchemaPath + '/type',\n $method = $typeIsArray ? 'checkDataTypes' : 'checkDataType';\n out += ' if (' + (it.util[$method]($typeSchema, $data, true)) + ') { ';\n var $dataType = 'dataType' + $lvl,\n $coerced = 'coerced' + $lvl;\n out += ' var ' + ($dataType) + ' = typeof ' + ($data) + '; var ' + ($coerced) + '; ';\n var $bracesCoercion = '';\n var arr1 = $coerceToTypes;\n if (arr1) {\n var $type, $i = -1,\n l1 = arr1.length - 1;\n while ($i < l1) {\n $type = arr1[$i += 1];\n if ($i) {\n out += ' if (' + ($coerced) + ' === undefined) { ';\n $bracesCoercion += '}';\n }\n if ($type == 'string') {\n out += ' if (' + ($dataType) + ' == \\'number\\' || ' + ($dataType) + ' == \\'boolean\\') ' + ($coerced) + ' = \\'\\' + ' + ($data) + '; else if (' + ($data) + ' === null) ' + ($coerced) + ' = \\'\\'; ';\n } else if ($type == 'number' || $type == 'integer') {\n out += ' if (' + ($dataType) + ' == \\'boolean\\' || ' + ($data) + ' === null || (' + ($dataType) + ' == \\'string\\' && ' + ($data) + ' && ' + ($data) + ' == +' + ($data) + ' ';\n if ($type == 'integer') {\n out += ' && !(' + ($data) + ' % 1)';\n }\n out += ')) ' + ($coerced) + ' = +' + ($data) + '; ';\n } else if ($type == 'boolean') {\n out += ' if (' + ($data) + ' === \\'false\\' || ' + ($data) + ' === 0 || ' + ($data) + ' === null) ' + ($coerced) + ' = false; else if (' + ($data) + ' === \\'true\\' || ' + ($data) + ' === 1) ' + ($coerced) + ' = true; ';\n } else if ($type == 'null') {\n out += ' if (' + ($data) + ' === \\'\\' || ' + ($data) + ' === 0 || ' + ($data) + ' === false) ' + ($coerced) + ' = null; ';\n }\n }\n }\n out += ' ' + ($bracesCoercion) + ' if (' + ($coerced) + ' === undefined) { ';\n var $$outStack = $$outStack || [];\n $$outStack.push(out);\n out = ''; /* istanbul ignore else */\n if (it.createErrors !== false) {\n out += ' { keyword: \\'' + ($errorKeyword || 'type') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: \"' + ($errSchemaPath) + '\" , params: { type: \\'';\n if ($typeIsArray) {\n out += '' + ($typeSchema.join(\",\"));\n } else {\n out += '' + ($typeSchema);\n }\n out += '\\' } ';\n if (it.opts.messages !== false) {\n out += ' , message: \\'should be ';\n if ($typeIsArray) {\n out += '' + ($typeSchema.join(\",\"));\n } else {\n out += '' + ($typeSchema);\n }\n out += '\\' ';\n }\n if (it.opts.verbose) {\n out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n }\n out += ' } ';\n } else {\n out += ' {} ';\n }\n var __err = out;\n out = $$outStack.pop();\n if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */\n if (it.async) {\n out += ' throw new ValidationError([' + (__err) + ']); ';\n } else {\n out += ' validate.errors = [' + (__err) + ']; return false; ';\n }\n } else {\n out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n }\n out += ' } else { ';\n if ($dataLvl) {\n var $parentData = 'data' + (($dataLvl - 1) || ''),\n $dataProperty = it.dataPathArr[$dataLvl];\n out += ' ' + ($data) + ' = ' + ($parentData) + '[' + ($dataProperty) + '] = ' + ($coerced) + '; ';\n } else {\n out += ' data = ' + ($coerced) + '; if (parentData !== undefined) parentData[parentDataProperty] = ' + ($coerced) + '; ';\n }\n out += ' } } ';\n }\n }\n var arr2 = it.RULES;\n if (arr2) {\n var $rulesGroup, i2 = -1,\n l2 = arr2.length - 1;\n while (i2 < l2) {\n $rulesGroup = arr2[i2 += 1];\n if ($shouldUseGroup($rulesGroup)) {\n if ($rulesGroup.type) {\n out += ' if (' + (it.util.checkDataType($rulesGroup.type, $data)) + ') { ';\n }\n if (it.opts.useDefaults && !it.compositeRule) {\n if ($rulesGroup.type == 'object' && it.schema.properties) {\n var $schema = it.schema.properties,\n $schemaKeys = Object.keys($schema);\n var arr3 = $schemaKeys;\n if (arr3) {\n var $propertyKey, i3 = -1,\n l3 = arr3.length - 1;\n while (i3 < l3) {\n $propertyKey = arr3[i3 += 1];\n var $sch = $schema[$propertyKey];\n if ($sch.default !== undefined) {\n var $passData = $data + it.util.getProperty($propertyKey);\n out += ' if (' + ($passData) + ' === undefined) ' + ($passData) + ' = ';\n if (it.opts.useDefaults == 'clone') {\n out += ' ' + (JSON.stringify($sch.default)) + ' ';\n } else {\n out += ' ' + (it.useDefault($sch.default)) + ' ';\n }\n out += '; ';\n }\n }\n }\n } else if ($rulesGroup.type == 'array' && Array.isArray(it.schema.items)) {\n var arr4 = it.schema.items;\n if (arr4) {\n var $sch, $i = -1,\n l4 = arr4.length - 1;\n while ($i < l4) {\n $sch = arr4[$i += 1];\n if ($sch.default !== undefined) {\n var $passData = $data + '[' + $i + ']';\n out += ' if (' + ($passData) + ' === undefined) ' + ($passData) + ' = ';\n if (it.opts.useDefaults == 'clone') {\n out += ' ' + (JSON.stringify($sch.default)) + ' ';\n } else {\n out += ' ' + (it.useDefault($sch.default)) + ' ';\n }\n out += '; ';\n }\n }\n }\n }\n }\n var arr5 = $rulesGroup.rules;\n if (arr5) {\n var $rule, i5 = -1,\n l5 = arr5.length - 1;\n while (i5 < l5) {\n $rule = arr5[i5 += 1];\n if ($shouldUseRule($rule)) {\n if ($rule.custom) {\n var $schema = it.schema[$rule.keyword],\n $ruleValidate = it.useCustomRule($rule, $schema, it.schema, it),\n $ruleErrs = $ruleValidate.code + '.errors',\n $schemaPath = it.schemaPath + '.' + $rule.keyword,\n $errSchemaPath = it.errSchemaPath + '/' + $rule.keyword,\n $errs = 'errs' + $lvl,\n $i = 'i' + $lvl,\n $ruleErr = 'ruleErr' + $lvl,\n $rDef = $rule.definition,\n $asyncKeyword = $rDef.async,\n $inline = $rDef.inline,\n $macro = $rDef.macro;\n if ($asyncKeyword && !it.async) throw new Error('async keyword in sync schema');\n if (!($inline || $macro)) {\n out += '' + ($ruleErrs) + ' = null;';\n }\n out += 'var ' + ($errs) + ' = errors;var valid' + ($lvl) + ';';\n if ($inline && $rDef.statements) {\n out += ' ' + ($ruleValidate.validate);\n } else if ($macro) {\n var $it = it.util.copy(it);\n $it.level++;\n $it.schema = $ruleValidate.validate;\n $it.schemaPath = '';\n var $wasComposite = it.compositeRule;\n it.compositeRule = $it.compositeRule = true;\n var $code = it.validate($it).replace(/validate\\.schema/g, $ruleValidate.code);\n it.compositeRule = $it.compositeRule = $wasComposite;\n out += ' ' + ($code);\n } else if ($rDef.compile || $rDef.validate) {\n var $$outStack = $$outStack || [];\n $$outStack.push(out);\n out = '';\n out += ' ' + ($ruleValidate.code) + '.call( ';\n if (it.opts.passContext) {\n out += 'this';\n } else {\n out += 'self';\n }\n var $validateArgs = $ruleValidate.validate.length;\n if ($rDef.compile || $rDef.schema === false) {\n out += ' , ' + ($data) + ' ';\n } else {\n out += ' , validate.schema' + ($schemaPath) + ' , ' + ($data) + ' , validate.schema' + (it.schemaPath) + ' ';\n }\n out += ' , (dataPath || \\'\\')';\n if (it.errorPath != '\"\"') {\n out += ' + ' + (it.errorPath);\n }\n if ($dataLvl) {\n out += ' , data' + (($dataLvl - 1) || '') + ' , ' + (it.dataPathArr[$dataLvl]) + ' ';\n } else {\n out += ' , parentData , parentDataProperty ';\n }\n out += ' ) ';\n var def_callRuleValidate = out;\n out = $$outStack.pop();\n if ($rDef.errors !== false) {\n if ($asyncKeyword) {\n $ruleErrs = 'customErrors' + $lvl;\n out += ' var ' + ($ruleErrs) + ' = null; try { valid' + ($lvl) + ' = ' + (it.yieldAwait) + (def_callRuleValidate) + '; } catch (e) { valid' + ($lvl) + ' = false; if (e instanceof ValidationError) ' + ($ruleErrs) + ' = e.errors; else throw e; } ';\n } else {\n out += ' ' + ($ruleValidate.code) + '.errors = null; ';\n }\n }\n }\n out += 'if (! ';\n if ($inline) {\n if ($rDef.statements) {\n out += ' valid' + ($lvl) + ' ';\n } else {\n out += ' (' + ($ruleValidate.validate) + ') ';\n }\n } else if ($macro) {\n out += ' valid' + ($it.level) + ' ';\n } else {\n if ($asyncKeyword) {\n if ($rDef.errors === false) {\n out += ' (' + (it.yieldAwait) + (def_callRuleValidate) + ') ';\n } else {\n out += ' valid' + ($lvl) + ' ';\n }\n } else {\n out += ' ' + (def_callRuleValidate) + ' ';\n }\n }\n out += ') { ';\n $errorKeyword = $rule.keyword;\n var $$outStack = $$outStack || [];\n $$outStack.push(out);\n out = '';\n var $$outStack = $$outStack || [];\n $$outStack.push(out);\n out = ''; /* istanbul ignore else */\n if (it.createErrors !== false) {\n out += ' { keyword: \\'' + ($errorKeyword || 'custom') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: \"' + ($errSchemaPath) + '\" , params: { keyword: \\'' + ($rule.keyword) + '\\' } ';\n if (it.opts.messages !== false) {\n out += ' , message: \\'should pass \"' + ($rule.keyword) + '\" keyword validation\\' ';\n }\n if (it.opts.verbose) {\n out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n }\n out += ' } ';\n } else {\n out += ' {} ';\n }\n var __err = out;\n out = $$outStack.pop();\n if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */\n if (it.async) {\n out += ' throw new ValidationError([' + (__err) + ']); ';\n } else {\n out += ' validate.errors = [' + (__err) + ']; return false; ';\n }\n } else {\n out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n }\n var def_customError = out;\n out = $$outStack.pop();\n if ($inline) {\n if ($rDef.errors) {\n if ($rDef.errors != 'full') {\n out += ' for (var ' + ($i) + '=' + ($errs) + '; ' + ($i) + '= 0x80 (not a basic code point)',\n\t\t'invalid-input': 'Invalid input'\n\t},\n\n\t/** Convenience shortcuts */\n\tbaseMinusTMin = base - tMin,\n\tfloor = Math.floor,\n\tstringFromCharCode = String.fromCharCode,\n\n\t/** Temporary variable */\n\tkey;\n\n\t/*--------------------------------------------------------------------------*/\n\n\t/**\n\t * A generic error utility function.\n\t * @private\n\t * @param {String} type The error type.\n\t * @returns {Error} Throws a `RangeError` with the applicable error message.\n\t */\n\tfunction error(type) {\n\t\tthrow new RangeError(errors[type]);\n\t}\n\n\t/**\n\t * A generic `Array#map` utility function.\n\t * @private\n\t * @param {Array} array The array to iterate over.\n\t * @param {Function} callback The function that gets called for every array\n\t * item.\n\t * @returns {Array} A new array of values returned by the callback function.\n\t */\n\tfunction map(array, fn) {\n\t\tvar length = array.length;\n\t\tvar result = [];\n\t\twhile (length--) {\n\t\t\tresult[length] = fn(array[length]);\n\t\t}\n\t\treturn result;\n\t}\n\n\t/**\n\t * A simple `Array#map`-like wrapper to work with domain name strings or email\n\t * addresses.\n\t * @private\n\t * @param {String} domain The domain name or email address.\n\t * @param {Function} callback The function that gets called for every\n\t * character.\n\t * @returns {Array} A new string of characters returned by the callback\n\t * function.\n\t */\n\tfunction mapDomain(string, fn) {\n\t\tvar parts = string.split('@');\n\t\tvar result = '';\n\t\tif (parts.length > 1) {\n\t\t\t// In email addresses, only the domain name should be punycoded. Leave\n\t\t\t// the local part (i.e. everything up to `@`) intact.\n\t\t\tresult = parts[0] + '@';\n\t\t\tstring = parts[1];\n\t\t}\n\t\t// Avoid `split(regex)` for IE8 compatibility. See #17.\n\t\tstring = string.replace(regexSeparators, '\\x2E');\n\t\tvar labels = string.split('.');\n\t\tvar encoded = map(labels, fn).join('.');\n\t\treturn result + encoded;\n\t}\n\n\t/**\n\t * Creates an array containing the numeric code points of each Unicode\n\t * character in the string. While JavaScript uses UCS-2 internally,\n\t * this function will convert a pair of surrogate halves (each of which\n\t * UCS-2 exposes as separate characters) into a single code point,\n\t * matching UTF-16.\n\t * @see `punycode.ucs2.encode`\n\t * @see \n\t * @memberOf punycode.ucs2\n\t * @name decode\n\t * @param {String} string The Unicode input string (UCS-2).\n\t * @returns {Array} The new array of code points.\n\t */\n\tfunction ucs2decode(string) {\n\t\tvar output = [],\n\t\t counter = 0,\n\t\t length = string.length,\n\t\t value,\n\t\t extra;\n\t\twhile (counter < length) {\n\t\t\tvalue = string.charCodeAt(counter++);\n\t\t\tif (value >= 0xD800 && value <= 0xDBFF && counter < length) {\n\t\t\t\t// high surrogate, and there is a next character\n\t\t\t\textra = string.charCodeAt(counter++);\n\t\t\t\tif ((extra & 0xFC00) == 0xDC00) { // low surrogate\n\t\t\t\t\toutput.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);\n\t\t\t\t} else {\n\t\t\t\t\t// unmatched surrogate; only append this code unit, in case the next\n\t\t\t\t\t// code unit is the high surrogate of a surrogate pair\n\t\t\t\t\toutput.push(value);\n\t\t\t\t\tcounter--;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\toutput.push(value);\n\t\t\t}\n\t\t}\n\t\treturn output;\n\t}\n\n\t/**\n\t * Creates a string based on an array of numeric code points.\n\t * @see `punycode.ucs2.decode`\n\t * @memberOf punycode.ucs2\n\t * @name encode\n\t * @param {Array} codePoints The array of numeric code points.\n\t * @returns {String} The new Unicode string (UCS-2).\n\t */\n\tfunction ucs2encode(array) {\n\t\treturn map(array, function(value) {\n\t\t\tvar output = '';\n\t\t\tif (value > 0xFFFF) {\n\t\t\t\tvalue -= 0x10000;\n\t\t\t\toutput += stringFromCharCode(value >>> 10 & 0x3FF | 0xD800);\n\t\t\t\tvalue = 0xDC00 | value & 0x3FF;\n\t\t\t}\n\t\t\toutput += stringFromCharCode(value);\n\t\t\treturn output;\n\t\t}).join('');\n\t}\n\n\t/**\n\t * Converts a basic code point into a digit/integer.\n\t * @see `digitToBasic()`\n\t * @private\n\t * @param {Number} codePoint The basic numeric code point value.\n\t * @returns {Number} The numeric value of a basic code point (for use in\n\t * representing integers) in the range `0` to `base - 1`, or `base` if\n\t * the code point does not represent a value.\n\t */\n\tfunction basicToDigit(codePoint) {\n\t\tif (codePoint - 48 < 10) {\n\t\t\treturn codePoint - 22;\n\t\t}\n\t\tif (codePoint - 65 < 26) {\n\t\t\treturn codePoint - 65;\n\t\t}\n\t\tif (codePoint - 97 < 26) {\n\t\t\treturn codePoint - 97;\n\t\t}\n\t\treturn base;\n\t}\n\n\t/**\n\t * Converts a digit/integer into a basic code point.\n\t * @see `basicToDigit()`\n\t * @private\n\t * @param {Number} digit The numeric value of a basic code point.\n\t * @returns {Number} The basic code point whose value (when used for\n\t * representing integers) is `digit`, which needs to be in the range\n\t * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is\n\t * used; else, the lowercase form is used. The behavior is undefined\n\t * if `flag` is non-zero and `digit` has no uppercase form.\n\t */\n\tfunction digitToBasic(digit, flag) {\n\t\t// 0..25 map to ASCII a..z or A..Z\n\t\t// 26..35 map to ASCII 0..9\n\t\treturn digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5);\n\t}\n\n\t/**\n\t * Bias adaptation function as per section 3.4 of RFC 3492.\n\t * https://tools.ietf.org/html/rfc3492#section-3.4\n\t * @private\n\t */\n\tfunction adapt(delta, numPoints, firstTime) {\n\t\tvar k = 0;\n\t\tdelta = firstTime ? floor(delta / damp) : delta >> 1;\n\t\tdelta += floor(delta / numPoints);\n\t\tfor (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) {\n\t\t\tdelta = floor(delta / baseMinusTMin);\n\t\t}\n\t\treturn floor(k + (baseMinusTMin + 1) * delta / (delta + skew));\n\t}\n\n\t/**\n\t * Converts a Punycode string of ASCII-only symbols to a string of Unicode\n\t * symbols.\n\t * @memberOf punycode\n\t * @param {String} input The Punycode string of ASCII-only symbols.\n\t * @returns {String} The resulting string of Unicode symbols.\n\t */\n\tfunction decode(input) {\n\t\t// Don't use UCS-2\n\t\tvar output = [],\n\t\t inputLength = input.length,\n\t\t out,\n\t\t i = 0,\n\t\t n = initialN,\n\t\t bias = initialBias,\n\t\t basic,\n\t\t j,\n\t\t index,\n\t\t oldi,\n\t\t w,\n\t\t k,\n\t\t digit,\n\t\t t,\n\t\t /** Cached calculation results */\n\t\t baseMinusT;\n\n\t\t// Handle the basic code points: let `basic` be the number of input code\n\t\t// points before the last delimiter, or `0` if there is none, then copy\n\t\t// the first basic code points to the output.\n\n\t\tbasic = input.lastIndexOf(delimiter);\n\t\tif (basic < 0) {\n\t\t\tbasic = 0;\n\t\t}\n\n\t\tfor (j = 0; j < basic; ++j) {\n\t\t\t// if it's not a basic code point\n\t\t\tif (input.charCodeAt(j) >= 0x80) {\n\t\t\t\terror('not-basic');\n\t\t\t}\n\t\t\toutput.push(input.charCodeAt(j));\n\t\t}\n\n\t\t// Main decoding loop: start just after the last delimiter if any basic code\n\t\t// points were copied; start at the beginning otherwise.\n\n\t\tfor (index = basic > 0 ? basic + 1 : 0; index < inputLength; /* no final expression */) {\n\n\t\t\t// `index` is the index of the next character to be consumed.\n\t\t\t// Decode a generalized variable-length integer into `delta`,\n\t\t\t// which gets added to `i`. The overflow checking is easier\n\t\t\t// if we increase `i` as we go, then subtract off its starting\n\t\t\t// value at the end to obtain `delta`.\n\t\t\tfor (oldi = i, w = 1, k = base; /* no condition */; k += base) {\n\n\t\t\t\tif (index >= inputLength) {\n\t\t\t\t\terror('invalid-input');\n\t\t\t\t}\n\n\t\t\t\tdigit = basicToDigit(input.charCodeAt(index++));\n\n\t\t\t\tif (digit >= base || digit > floor((maxInt - i) / w)) {\n\t\t\t\t\terror('overflow');\n\t\t\t\t}\n\n\t\t\t\ti += digit * w;\n\t\t\t\tt = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);\n\n\t\t\t\tif (digit < t) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tbaseMinusT = base - t;\n\t\t\t\tif (w > floor(maxInt / baseMinusT)) {\n\t\t\t\t\terror('overflow');\n\t\t\t\t}\n\n\t\t\t\tw *= baseMinusT;\n\n\t\t\t}\n\n\t\t\tout = output.length + 1;\n\t\t\tbias = adapt(i - oldi, out, oldi == 0);\n\n\t\t\t// `i` was supposed to wrap around from `out` to `0`,\n\t\t\t// incrementing `n` each time, so we'll fix that now:\n\t\t\tif (floor(i / out) > maxInt - n) {\n\t\t\t\terror('overflow');\n\t\t\t}\n\n\t\t\tn += floor(i / out);\n\t\t\ti %= out;\n\n\t\t\t// Insert `n` at position `i` of the output\n\t\t\toutput.splice(i++, 0, n);\n\n\t\t}\n\n\t\treturn ucs2encode(output);\n\t}\n\n\t/**\n\t * Converts a string of Unicode symbols (e.g. a domain name label) to a\n\t * Punycode string of ASCII-only symbols.\n\t * @memberOf punycode\n\t * @param {String} input The string of Unicode symbols.\n\t * @returns {String} The resulting Punycode string of ASCII-only symbols.\n\t */\n\tfunction encode(input) {\n\t\tvar n,\n\t\t delta,\n\t\t handledCPCount,\n\t\t basicLength,\n\t\t bias,\n\t\t j,\n\t\t m,\n\t\t q,\n\t\t k,\n\t\t t,\n\t\t currentValue,\n\t\t output = [],\n\t\t /** `inputLength` will hold the number of code points in `input`. */\n\t\t inputLength,\n\t\t /** Cached calculation results */\n\t\t handledCPCountPlusOne,\n\t\t baseMinusT,\n\t\t qMinusT;\n\n\t\t// Convert the input in UCS-2 to Unicode\n\t\tinput = ucs2decode(input);\n\n\t\t// Cache the length\n\t\tinputLength = input.length;\n\n\t\t// Initialize the state\n\t\tn = initialN;\n\t\tdelta = 0;\n\t\tbias = initialBias;\n\n\t\t// Handle the basic code points\n\t\tfor (j = 0; j < inputLength; ++j) {\n\t\t\tcurrentValue = input[j];\n\t\t\tif (currentValue < 0x80) {\n\t\t\t\toutput.push(stringFromCharCode(currentValue));\n\t\t\t}\n\t\t}\n\n\t\thandledCPCount = basicLength = output.length;\n\n\t\t// `handledCPCount` is the number of code points that have been handled;\n\t\t// `basicLength` is the number of basic code points.\n\n\t\t// Finish the basic string - if it is not empty - with a delimiter\n\t\tif (basicLength) {\n\t\t\toutput.push(delimiter);\n\t\t}\n\n\t\t// Main encoding loop:\n\t\twhile (handledCPCount < inputLength) {\n\n\t\t\t// All non-basic code points < n have been handled already. Find the next\n\t\t\t// larger one:\n\t\t\tfor (m = maxInt, j = 0; j < inputLength; ++j) {\n\t\t\t\tcurrentValue = input[j];\n\t\t\t\tif (currentValue >= n && currentValue < m) {\n\t\t\t\t\tm = currentValue;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Increase `delta` enough to advance the decoder's state to ,\n\t\t\t// but guard against overflow\n\t\t\thandledCPCountPlusOne = handledCPCount + 1;\n\t\t\tif (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) {\n\t\t\t\terror('overflow');\n\t\t\t}\n\n\t\t\tdelta += (m - n) * handledCPCountPlusOne;\n\t\t\tn = m;\n\n\t\t\tfor (j = 0; j < inputLength; ++j) {\n\t\t\t\tcurrentValue = input[j];\n\n\t\t\t\tif (currentValue < n && ++delta > maxInt) {\n\t\t\t\t\terror('overflow');\n\t\t\t\t}\n\n\t\t\t\tif (currentValue == n) {\n\t\t\t\t\t// Represent delta as a generalized variable-length integer\n\t\t\t\t\tfor (q = delta, k = base; /* no condition */; k += base) {\n\t\t\t\t\t\tt = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);\n\t\t\t\t\t\tif (q < t) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tqMinusT = q - t;\n\t\t\t\t\t\tbaseMinusT = base - t;\n\t\t\t\t\t\toutput.push(\n\t\t\t\t\t\t\tstringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0))\n\t\t\t\t\t\t);\n\t\t\t\t\t\tq = floor(qMinusT / baseMinusT);\n\t\t\t\t\t}\n\n\t\t\t\t\toutput.push(stringFromCharCode(digitToBasic(q, 0)));\n\t\t\t\t\tbias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength);\n\t\t\t\t\tdelta = 0;\n\t\t\t\t\t++handledCPCount;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t++delta;\n\t\t\t++n;\n\n\t\t}\n\t\treturn output.join('');\n\t}\n\n\t/**\n\t * Converts a Punycode string representing a domain name or an email address\n\t * to Unicode. Only the Punycoded parts of the input will be converted, i.e.\n\t * it doesn't matter if you call it on a string that has already been\n\t * converted to Unicode.\n\t * @memberOf punycode\n\t * @param {String} input The Punycoded domain name or email address to\n\t * convert to Unicode.\n\t * @returns {String} The Unicode representation of the given Punycode\n\t * string.\n\t */\n\tfunction toUnicode(input) {\n\t\treturn mapDomain(input, function(string) {\n\t\t\treturn regexPunycode.test(string)\n\t\t\t\t? decode(string.slice(4).toLowerCase())\n\t\t\t\t: string;\n\t\t});\n\t}\n\n\t/**\n\t * Converts a Unicode string representing a domain name or an email address to\n\t * Punycode. Only the non-ASCII parts of the domain name will be converted,\n\t * i.e. it doesn't matter if you call it with a domain that's already in\n\t * ASCII.\n\t * @memberOf punycode\n\t * @param {String} input The domain name or email address to convert, as a\n\t * Unicode string.\n\t * @returns {String} The Punycode representation of the given domain name or\n\t * email address.\n\t */\n\tfunction toASCII(input) {\n\t\treturn mapDomain(input, function(string) {\n\t\t\treturn regexNonASCII.test(string)\n\t\t\t\t? 'xn--' + encode(string)\n\t\t\t\t: string;\n\t\t});\n\t}\n\n\t/*--------------------------------------------------------------------------*/\n\n\t/** Define the public API */\n\tpunycode = {\n\t\t/**\n\t\t * A string representing the current Punycode.js version number.\n\t\t * @memberOf punycode\n\t\t * @type String\n\t\t */\n\t\t'version': '1.3.2',\n\t\t/**\n\t\t * An object of methods to convert from JavaScript's internal character\n\t\t * representation (UCS-2) to Unicode code points, and back.\n\t\t * @see \n\t\t * @memberOf punycode\n\t\t * @type Object\n\t\t */\n\t\t'ucs2': {\n\t\t\t'decode': ucs2decode,\n\t\t\t'encode': ucs2encode\n\t\t},\n\t\t'decode': decode,\n\t\t'encode': encode,\n\t\t'toASCII': toASCII,\n\t\t'toUnicode': toUnicode\n\t};\n\n\t/** Expose `punycode` */\n\t// Some AMD build optimizers, like r.js, check for specific condition patterns\n\t// like the following:\n\tif (\n\t\ttypeof define == 'function' &&\n\t\ttypeof define.amd == 'object' &&\n\t\tdefine.amd\n\t) {\n\t\tdefine('punycode', function() {\n\t\t\treturn punycode;\n\t\t});\n\t} else if (freeExports && freeModule) {\n\t\tif (module.exports == freeExports) {\n\t\t\t// in Node.js, io.js, or RingoJS v0.8.0+\n\t\t\tfreeModule.exports = punycode;\n\t\t} else {\n\t\t\t// in Narwhal or RingoJS v0.7.0-\n\t\t\tfor (key in punycode) {\n\t\t\t\tpunycode.hasOwnProperty(key) && (freeExports[key] = punycode[key]);\n\t\t\t}\n\t\t}\n\t} else {\n\t\t// in Rhino or a web browser\n\t\troot.punycode = punycode;\n\t}\n\n}(this));\n\n}).call(this,typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : {})\n},{}],40:[function(require,module,exports){\n// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\n// If obj.hasOwnProperty has been overridden, then calling\n// obj.hasOwnProperty(prop) will break.\n// See: https://github.com/joyent/node/issues/1707\nfunction hasOwnProperty(obj, prop) {\n return Object.prototype.hasOwnProperty.call(obj, prop);\n}\n\nmodule.exports = function(qs, sep, eq, options) {\n sep = sep || '&';\n eq = eq || '=';\n var obj = {};\n\n if (typeof qs !== 'string' || qs.length === 0) {\n return obj;\n }\n\n var regexp = /\\+/g;\n qs = qs.split(sep);\n\n var maxKeys = 1000;\n if (options && typeof options.maxKeys === 'number') {\n maxKeys = options.maxKeys;\n }\n\n var len = qs.length;\n // maxKeys <= 0 means that we should not limit keys count\n if (maxKeys > 0 && len > maxKeys) {\n len = maxKeys;\n }\n\n for (var i = 0; i < len; ++i) {\n var x = qs[i].replace(regexp, '%20'),\n idx = x.indexOf(eq),\n kstr, vstr, k, v;\n\n if (idx >= 0) {\n kstr = x.substr(0, idx);\n vstr = x.substr(idx + 1);\n } else {\n kstr = x;\n vstr = '';\n }\n\n k = decodeURIComponent(kstr);\n v = decodeURIComponent(vstr);\n\n if (!hasOwnProperty(obj, k)) {\n obj[k] = v;\n } else if (isArray(obj[k])) {\n obj[k].push(v);\n } else {\n obj[k] = [obj[k], v];\n }\n }\n\n return obj;\n};\n\nvar isArray = Array.isArray || function (xs) {\n return Object.prototype.toString.call(xs) === '[object Array]';\n};\n\n},{}],41:[function(require,module,exports){\n// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\nvar stringifyPrimitive = function(v) {\n switch (typeof v) {\n case 'string':\n return v;\n\n case 'boolean':\n return v ? 'true' : 'false';\n\n case 'number':\n return isFinite(v) ? v : '';\n\n default:\n return '';\n }\n};\n\nmodule.exports = function(obj, sep, eq, name) {\n sep = sep || '&';\n eq = eq || '=';\n if (obj === null) {\n obj = undefined;\n }\n\n if (typeof obj === 'object') {\n return map(objectKeys(obj), function(k) {\n var ks = encodeURIComponent(stringifyPrimitive(k)) + eq;\n if (isArray(obj[k])) {\n return map(obj[k], function(v) {\n return ks + encodeURIComponent(stringifyPrimitive(v));\n }).join(sep);\n } else {\n return ks + encodeURIComponent(stringifyPrimitive(obj[k]));\n }\n }).join(sep);\n\n }\n\n if (!name) return '';\n return encodeURIComponent(stringifyPrimitive(name)) + eq +\n encodeURIComponent(stringifyPrimitive(obj));\n};\n\nvar isArray = Array.isArray || function (xs) {\n return Object.prototype.toString.call(xs) === '[object Array]';\n};\n\nfunction map (xs, f) {\n if (xs.map) return xs.map(f);\n var res = [];\n for (var i = 0; i < xs.length; i++) {\n res.push(f(xs[i], i));\n }\n return res;\n}\n\nvar objectKeys = Object.keys || function (obj) {\n var res = [];\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) res.push(key);\n }\n return res;\n};\n\n},{}],42:[function(require,module,exports){\n'use strict';\n\nexports.decode = exports.parse = require('./decode');\nexports.encode = exports.stringify = require('./encode');\n\n},{\"./decode\":40,\"./encode\":41}],43:[function(require,module,exports){\n// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\nvar punycode = require('punycode');\nvar util = require('./util');\n\nexports.parse = urlParse;\nexports.resolve = urlResolve;\nexports.resolveObject = urlResolveObject;\nexports.format = urlFormat;\n\nexports.Url = Url;\n\nfunction Url() {\n this.protocol = null;\n this.slashes = null;\n this.auth = null;\n this.host = null;\n this.port = null;\n this.hostname = null;\n this.hash = null;\n this.search = null;\n this.query = null;\n this.pathname = null;\n this.path = null;\n this.href = null;\n}\n\n// Reference: RFC 3986, RFC 1808, RFC 2396\n\n// define these here so at least they only have to be\n// compiled once on the first module load.\nvar protocolPattern = /^([a-z0-9.+-]+:)/i,\n portPattern = /:[0-9]*$/,\n\n // Special case for a simple path URL\n simplePathPattern = /^(\\/\\/?(?!\\/)[^\\?\\s]*)(\\?[^\\s]*)?$/,\n\n // RFC 2396: characters reserved for delimiting URLs.\n // We actually just auto-escape these.\n delims = ['<', '>', '\"', '`', ' ', '\\r', '\\n', '\\t'],\n\n // RFC 2396: characters not allowed for various reasons.\n unwise = ['{', '}', '|', '\\\\', '^', '`'].concat(delims),\n\n // Allowed by RFCs, but cause of XSS attacks. Always escape these.\n autoEscape = ['\\''].concat(unwise),\n // Characters that are never ever allowed in a hostname.\n // Note that any invalid chars are also handled, but these\n // are the ones that are *expected* to be seen, so we fast-path\n // them.\n nonHostChars = ['%', '/', '?', ';', '#'].concat(autoEscape),\n hostEndingChars = ['/', '?', '#'],\n hostnameMaxLen = 255,\n hostnamePartPattern = /^[+a-z0-9A-Z_-]{0,63}$/,\n hostnamePartStart = /^([+a-z0-9A-Z_-]{0,63})(.*)$/,\n // protocols that can allow \"unsafe\" and \"unwise\" chars.\n unsafeProtocol = {\n 'javascript': true,\n 'javascript:': true\n },\n // protocols that never have a hostname.\n hostlessProtocol = {\n 'javascript': true,\n 'javascript:': true\n },\n // protocols that always contain a // bit.\n slashedProtocol = {\n 'http': true,\n 'https': true,\n 'ftp': true,\n 'gopher': true,\n 'file': true,\n 'http:': true,\n 'https:': true,\n 'ftp:': true,\n 'gopher:': true,\n 'file:': true\n },\n querystring = require('querystring');\n\nfunction urlParse(url, parseQueryString, slashesDenoteHost) {\n if (url && util.isObject(url) && url instanceof Url) return url;\n\n var u = new Url;\n u.parse(url, parseQueryString, slashesDenoteHost);\n return u;\n}\n\nUrl.prototype.parse = function(url, parseQueryString, slashesDenoteHost) {\n if (!util.isString(url)) {\n throw new TypeError(\"Parameter 'url' must be a string, not \" + typeof url);\n }\n\n // Copy chrome, IE, opera backslash-handling behavior.\n // Back slashes before the query string get converted to forward slashes\n // See: https://code.google.com/p/chromium/issues/detail?id=25916\n var queryIndex = url.indexOf('?'),\n splitter =\n (queryIndex !== -1 && queryIndex < url.indexOf('#')) ? '?' : '#',\n uSplit = url.split(splitter),\n slashRegex = /\\\\/g;\n uSplit[0] = uSplit[0].replace(slashRegex, '/');\n url = uSplit.join(splitter);\n\n var rest = url;\n\n // trim before proceeding.\n // This is to support parse stuff like \" http://foo.com \\n\"\n rest = rest.trim();\n\n if (!slashesDenoteHost && url.split('#').length === 1) {\n // Try fast path regexp\n var simplePath = simplePathPattern.exec(rest);\n if (simplePath) {\n this.path = rest;\n this.href = rest;\n this.pathname = simplePath[1];\n if (simplePath[2]) {\n this.search = simplePath[2];\n if (parseQueryString) {\n this.query = querystring.parse(this.search.substr(1));\n } else {\n this.query = this.search.substr(1);\n }\n } else if (parseQueryString) {\n this.search = '';\n this.query = {};\n }\n return this;\n }\n }\n\n var proto = protocolPattern.exec(rest);\n if (proto) {\n proto = proto[0];\n var lowerProto = proto.toLowerCase();\n this.protocol = lowerProto;\n rest = rest.substr(proto.length);\n }\n\n // figure out if it's got a host\n // user@server is *always* interpreted as a hostname, and url\n // resolution will treat //foo/bar as host=foo,path=bar because that's\n // how the browser resolves relative URLs.\n if (slashesDenoteHost || proto || rest.match(/^\\/\\/[^@\\/]+@[^@\\/]+/)) {\n var slashes = rest.substr(0, 2) === '//';\n if (slashes && !(proto && hostlessProtocol[proto])) {\n rest = rest.substr(2);\n this.slashes = true;\n }\n }\n\n if (!hostlessProtocol[proto] &&\n (slashes || (proto && !slashedProtocol[proto]))) {\n\n // there's a hostname.\n // the first instance of /, ?, ;, or # ends the host.\n //\n // If there is an @ in the hostname, then non-host chars *are* allowed\n // to the left of the last @ sign, unless some host-ending character\n // comes *before* the @-sign.\n // URLs are obnoxious.\n //\n // ex:\n // http://a@b@c/ => user:a@b host:c\n // http://a@b?@c => user:a host:c path:/?@c\n\n // v0.12 TODO(isaacs): This is not quite how Chrome does things.\n // Review our test case against browsers more comprehensively.\n\n // find the first instance of any hostEndingChars\n var hostEnd = -1;\n for (var i = 0; i < hostEndingChars.length; i++) {\n var hec = rest.indexOf(hostEndingChars[i]);\n if (hec !== -1 && (hostEnd === -1 || hec < hostEnd))\n hostEnd = hec;\n }\n\n // at this point, either we have an explicit point where the\n // auth portion cannot go past, or the last @ char is the decider.\n var auth, atSign;\n if (hostEnd === -1) {\n // atSign can be anywhere.\n atSign = rest.lastIndexOf('@');\n } else {\n // atSign must be in auth portion.\n // http://a@b/c@d => host:b auth:a path:/c@d\n atSign = rest.lastIndexOf('@', hostEnd);\n }\n\n // Now we have a portion which is definitely the auth.\n // Pull that off.\n if (atSign !== -1) {\n auth = rest.slice(0, atSign);\n rest = rest.slice(atSign + 1);\n this.auth = decodeURIComponent(auth);\n }\n\n // the host is the remaining to the left of the first non-host char\n hostEnd = -1;\n for (var i = 0; i < nonHostChars.length; i++) {\n var hec = rest.indexOf(nonHostChars[i]);\n if (hec !== -1 && (hostEnd === -1 || hec < hostEnd))\n hostEnd = hec;\n }\n // if we still have not hit it, then the entire thing is a host.\n if (hostEnd === -1)\n hostEnd = rest.length;\n\n this.host = rest.slice(0, hostEnd);\n rest = rest.slice(hostEnd);\n\n // pull out port.\n this.parseHost();\n\n // we've indicated that there is a hostname,\n // so even if it's empty, it has to be present.\n this.hostname = this.hostname || '';\n\n // if hostname begins with [ and ends with ]\n // assume that it's an IPv6 address.\n var ipv6Hostname = this.hostname[0] === '[' &&\n this.hostname[this.hostname.length - 1] === ']';\n\n // validate a little.\n if (!ipv6Hostname) {\n var hostparts = this.hostname.split(/\\./);\n for (var i = 0, l = hostparts.length; i < l; i++) {\n var part = hostparts[i];\n if (!part) continue;\n if (!part.match(hostnamePartPattern)) {\n var newpart = '';\n for (var j = 0, k = part.length; j < k; j++) {\n if (part.charCodeAt(j) > 127) {\n // we replace non-ASCII char with a temporary placeholder\n // we need this to make sure size of hostname is not\n // broken by replacing non-ASCII by nothing\n newpart += 'x';\n } else {\n newpart += part[j];\n }\n }\n // we test again with ASCII char only\n if (!newpart.match(hostnamePartPattern)) {\n var validParts = hostparts.slice(0, i);\n var notHost = hostparts.slice(i + 1);\n var bit = part.match(hostnamePartStart);\n if (bit) {\n validParts.push(bit[1]);\n notHost.unshift(bit[2]);\n }\n if (notHost.length) {\n rest = '/' + notHost.join('.') + rest;\n }\n this.hostname = validParts.join('.');\n break;\n }\n }\n }\n }\n\n if (this.hostname.length > hostnameMaxLen) {\n this.hostname = '';\n } else {\n // hostnames are always lower case.\n this.hostname = this.hostname.toLowerCase();\n }\n\n if (!ipv6Hostname) {\n // IDNA Support: Returns a punycoded representation of \"domain\".\n // It only converts parts of the domain name that\n // have non-ASCII characters, i.e. it doesn't matter if\n // you call it with a domain that already is ASCII-only.\n this.hostname = punycode.toASCII(this.hostname);\n }\n\n var p = this.port ? ':' + this.port : '';\n var h = this.hostname || '';\n this.host = h + p;\n this.href += this.host;\n\n // strip [ and ] from the hostname\n // the host field still retains them, though\n if (ipv6Hostname) {\n this.hostname = this.hostname.substr(1, this.hostname.length - 2);\n if (rest[0] !== '/') {\n rest = '/' + rest;\n }\n }\n }\n\n // now rest is set to the post-host stuff.\n // chop off any delim chars.\n if (!unsafeProtocol[lowerProto]) {\n\n // First, make 100% sure that any \"autoEscape\" chars get\n // escaped, even if encodeURIComponent doesn't think they\n // need to be.\n for (var i = 0, l = autoEscape.length; i < l; i++) {\n var ae = autoEscape[i];\n if (rest.indexOf(ae) === -1)\n continue;\n var esc = encodeURIComponent(ae);\n if (esc === ae) {\n esc = escape(ae);\n }\n rest = rest.split(ae).join(esc);\n }\n }\n\n\n // chop off from the tail first.\n var hash = rest.indexOf('#');\n if (hash !== -1) {\n // got a fragment string.\n this.hash = rest.substr(hash);\n rest = rest.slice(0, hash);\n }\n var qm = rest.indexOf('?');\n if (qm !== -1) {\n this.search = rest.substr(qm);\n this.query = rest.substr(qm + 1);\n if (parseQueryString) {\n this.query = querystring.parse(this.query);\n }\n rest = rest.slice(0, qm);\n } else if (parseQueryString) {\n // no query string, but parseQueryString still requested\n this.search = '';\n this.query = {};\n }\n if (rest) this.pathname = rest;\n if (slashedProtocol[lowerProto] &&\n this.hostname && !this.pathname) {\n this.pathname = '/';\n }\n\n //to support http.request\n if (this.pathname || this.search) {\n var p = this.pathname || '';\n var s = this.search || '';\n this.path = p + s;\n }\n\n // finally, reconstruct the href based on what has been validated.\n this.href = this.format();\n return this;\n};\n\n// format a parsed object into a url string\nfunction urlFormat(obj) {\n // ensure it's an object, and not a string url.\n // If it's an obj, this is a no-op.\n // this way, you can call url_format() on strings\n // to clean up potentially wonky urls.\n if (util.isString(obj)) obj = urlParse(obj);\n if (!(obj instanceof Url)) return Url.prototype.format.call(obj);\n return obj.format();\n}\n\nUrl.prototype.format = function() {\n var auth = this.auth || '';\n if (auth) {\n auth = encodeURIComponent(auth);\n auth = auth.replace(/%3A/i, ':');\n auth += '@';\n }\n\n var protocol = this.protocol || '',\n pathname = this.pathname || '',\n hash = this.hash || '',\n host = false,\n query = '';\n\n if (this.host) {\n host = auth + this.host;\n } else if (this.hostname) {\n host = auth + (this.hostname.indexOf(':') === -1 ?\n this.hostname :\n '[' + this.hostname + ']');\n if (this.port) {\n host += ':' + this.port;\n }\n }\n\n if (this.query &&\n util.isObject(this.query) &&\n Object.keys(this.query).length) {\n query = querystring.stringify(this.query);\n }\n\n var search = this.search || (query && ('?' + query)) || '';\n\n if (protocol && protocol.substr(-1) !== ':') protocol += ':';\n\n // only the slashedProtocols get the //. Not mailto:, xmpp:, etc.\n // unless they had them to begin with.\n if (this.slashes ||\n (!protocol || slashedProtocol[protocol]) && host !== false) {\n host = '//' + (host || '');\n if (pathname && pathname.charAt(0) !== '/') pathname = '/' + pathname;\n } else if (!host) {\n host = '';\n }\n\n if (hash && hash.charAt(0) !== '#') hash = '#' + hash;\n if (search && search.charAt(0) !== '?') search = '?' + search;\n\n pathname = pathname.replace(/[?#]/g, function(match) {\n return encodeURIComponent(match);\n });\n search = search.replace('#', '%23');\n\n return protocol + host + pathname + search + hash;\n};\n\nfunction urlResolve(source, relative) {\n return urlParse(source, false, true).resolve(relative);\n}\n\nUrl.prototype.resolve = function(relative) {\n return this.resolveObject(urlParse(relative, false, true)).format();\n};\n\nfunction urlResolveObject(source, relative) {\n if (!source) return relative;\n return urlParse(source, false, true).resolveObject(relative);\n}\n\nUrl.prototype.resolveObject = function(relative) {\n if (util.isString(relative)) {\n var rel = new Url();\n rel.parse(relative, false, true);\n relative = rel;\n }\n\n var result = new Url();\n var tkeys = Object.keys(this);\n for (var tk = 0; tk < tkeys.length; tk++) {\n var tkey = tkeys[tk];\n result[tkey] = this[tkey];\n }\n\n // hash is always overridden, no matter what.\n // even href=\"\" will remove it.\n result.hash = relative.hash;\n\n // if the relative url is empty, then there's nothing left to do here.\n if (relative.href === '') {\n result.href = result.format();\n return result;\n }\n\n // hrefs like //foo/bar always cut to the protocol.\n if (relative.slashes && !relative.protocol) {\n // take everything except the protocol from relative\n var rkeys = Object.keys(relative);\n for (var rk = 0; rk < rkeys.length; rk++) {\n var rkey = rkeys[rk];\n if (rkey !== 'protocol')\n result[rkey] = relative[rkey];\n }\n\n //urlParse appends trailing / to urls like http://www.example.com\n if (slashedProtocol[result.protocol] &&\n result.hostname && !result.pathname) {\n result.path = result.pathname = '/';\n }\n\n result.href = result.format();\n return result;\n }\n\n if (relative.protocol && relative.protocol !== result.protocol) {\n // if it's a known url protocol, then changing\n // the protocol does weird things\n // first, if it's not file:, then we MUST have a host,\n // and if there was a path\n // to begin with, then we MUST have a path.\n // if it is file:, then the host is dropped,\n // because that's known to be hostless.\n // anything else is assumed to be absolute.\n if (!slashedProtocol[relative.protocol]) {\n var keys = Object.keys(relative);\n for (var v = 0; v < keys.length; v++) {\n var k = keys[v];\n result[k] = relative[k];\n }\n result.href = result.format();\n return result;\n }\n\n result.protocol = relative.protocol;\n if (!relative.host && !hostlessProtocol[relative.protocol]) {\n var relPath = (relative.pathname || '').split('/');\n while (relPath.length && !(relative.host = relPath.shift()));\n if (!relative.host) relative.host = '';\n if (!relative.hostname) relative.hostname = '';\n if (relPath[0] !== '') relPath.unshift('');\n if (relPath.length < 2) relPath.unshift('');\n result.pathname = relPath.join('/');\n } else {\n result.pathname = relative.pathname;\n }\n result.search = relative.search;\n result.query = relative.query;\n result.host = relative.host || '';\n result.auth = relative.auth;\n result.hostname = relative.hostname || relative.host;\n result.port = relative.port;\n // to support http.request\n if (result.pathname || result.search) {\n var p = result.pathname || '';\n var s = result.search || '';\n result.path = p + s;\n }\n result.slashes = result.slashes || relative.slashes;\n result.href = result.format();\n return result;\n }\n\n var isSourceAbs = (result.pathname && result.pathname.charAt(0) === '/'),\n isRelAbs = (\n relative.host ||\n relative.pathname && relative.pathname.charAt(0) === '/'\n ),\n mustEndAbs = (isRelAbs || isSourceAbs ||\n (result.host && relative.pathname)),\n removeAllDots = mustEndAbs,\n srcPath = result.pathname && result.pathname.split('/') || [],\n relPath = relative.pathname && relative.pathname.split('/') || [],\n psychotic = result.protocol && !slashedProtocol[result.protocol];\n\n // if the url is a non-slashed url, then relative\n // links like ../.. should be able\n // to crawl up to the hostname, as well. This is strange.\n // result.protocol has already been set by now.\n // Later on, put the first path part into the host field.\n if (psychotic) {\n result.hostname = '';\n result.port = null;\n if (result.host) {\n if (srcPath[0] === '') srcPath[0] = result.host;\n else srcPath.unshift(result.host);\n }\n result.host = '';\n if (relative.protocol) {\n relative.hostname = null;\n relative.port = null;\n if (relative.host) {\n if (relPath[0] === '') relPath[0] = relative.host;\n else relPath.unshift(relative.host);\n }\n relative.host = null;\n }\n mustEndAbs = mustEndAbs && (relPath[0] === '' || srcPath[0] === '');\n }\n\n if (isRelAbs) {\n // it's absolute.\n result.host = (relative.host || relative.host === '') ?\n relative.host : result.host;\n result.hostname = (relative.hostname || relative.hostname === '') ?\n relative.hostname : result.hostname;\n result.search = relative.search;\n result.query = relative.query;\n srcPath = relPath;\n // fall through to the dot-handling below.\n } else if (relPath.length) {\n // it's relative\n // throw away the existing file, and take the new path instead.\n if (!srcPath) srcPath = [];\n srcPath.pop();\n srcPath = srcPath.concat(relPath);\n result.search = relative.search;\n result.query = relative.query;\n } else if (!util.isNullOrUndefined(relative.search)) {\n // just pull out the search.\n // like href='?foo'.\n // Put this after the other two cases because it simplifies the booleans\n if (psychotic) {\n result.hostname = result.host = srcPath.shift();\n //occationaly the auth can get stuck only in host\n //this especially happens in cases like\n //url.resolveObject('mailto:local1@domain1', 'local2@domain2')\n var authInHost = result.host && result.host.indexOf('@') > 0 ?\n result.host.split('@') : false;\n if (authInHost) {\n result.auth = authInHost.shift();\n result.host = result.hostname = authInHost.shift();\n }\n }\n result.search = relative.search;\n result.query = relative.query;\n //to support http.request\n if (!util.isNull(result.pathname) || !util.isNull(result.search)) {\n result.path = (result.pathname ? result.pathname : '') +\n (result.search ? result.search : '');\n }\n result.href = result.format();\n return result;\n }\n\n if (!srcPath.length) {\n // no path at all. easy.\n // we've already handled the other stuff above.\n result.pathname = null;\n //to support http.request\n if (result.search) {\n result.path = '/' + result.search;\n } else {\n result.path = null;\n }\n result.href = result.format();\n return result;\n }\n\n // if a url ENDs in . or .., then it must get a trailing slash.\n // however, if it ends in anything else non-slashy,\n // then it must NOT get a trailing slash.\n var last = srcPath.slice(-1)[0];\n var hasTrailingSlash = (\n (result.host || relative.host || srcPath.length > 1) &&\n (last === '.' || last === '..') || last === '');\n\n // strip single dots, resolve double dots to parent dir\n // if the path tries to go above the root, `up` ends up > 0\n var up = 0;\n for (var i = srcPath.length; i >= 0; i--) {\n last = srcPath[i];\n if (last === '.') {\n srcPath.splice(i, 1);\n } else if (last === '..') {\n srcPath.splice(i, 1);\n up++;\n } else if (up) {\n srcPath.splice(i, 1);\n up--;\n }\n }\n\n // if the path is allowed to go above the root, restore leading ..s\n if (!mustEndAbs && !removeAllDots) {\n for (; up--; up) {\n srcPath.unshift('..');\n }\n }\n\n if (mustEndAbs && srcPath[0] !== '' &&\n (!srcPath[0] || srcPath[0].charAt(0) !== '/')) {\n srcPath.unshift('');\n }\n\n if (hasTrailingSlash && (srcPath.join('/').substr(-1) !== '/')) {\n srcPath.push('');\n }\n\n var isAbsolute = srcPath[0] === '' ||\n (srcPath[0] && srcPath[0].charAt(0) === '/');\n\n // put the host back\n if (psychotic) {\n result.hostname = result.host = isAbsolute ? '' :\n srcPath.length ? srcPath.shift() : '';\n //occationaly the auth can get stuck only in host\n //this especially happens in cases like\n //url.resolveObject('mailto:local1@domain1', 'local2@domain2')\n var authInHost = result.host && result.host.indexOf('@') > 0 ?\n result.host.split('@') : false;\n if (authInHost) {\n result.auth = authInHost.shift();\n result.host = result.hostname = authInHost.shift();\n }\n }\n\n mustEndAbs = mustEndAbs || (result.host && srcPath.length);\n\n if (mustEndAbs && !isAbsolute) {\n srcPath.unshift('');\n }\n\n if (!srcPath.length) {\n result.pathname = null;\n result.path = null;\n } else {\n result.pathname = srcPath.join('/');\n }\n\n //to support request.http\n if (!util.isNull(result.pathname) || !util.isNull(result.search)) {\n result.path = (result.pathname ? result.pathname : '') +\n (result.search ? result.search : '');\n }\n result.auth = relative.auth || result.auth;\n result.slashes = result.slashes || relative.slashes;\n result.href = result.format();\n return result;\n};\n\nUrl.prototype.parseHost = function() {\n var host = this.host;\n var port = portPattern.exec(host);\n if (port) {\n port = port[0];\n if (port !== ':') {\n this.port = port.substr(1);\n }\n host = host.substr(0, host.length - port.length);\n }\n if (host) this.hostname = host;\n};\n\n},{\"./util\":44,\"punycode\":39,\"querystring\":42}],44:[function(require,module,exports){\n'use strict';\n\nmodule.exports = {\n isString: function(arg) {\n return typeof(arg) === 'string';\n },\n isObject: function(arg) {\n return typeof(arg) === 'object' && arg !== null;\n },\n isNull: function(arg) {\n return arg === null;\n },\n isNullOrUndefined: function(arg) {\n return arg == null;\n }\n};\n\n},{}],45:[function(require,module,exports){\n\n/**\n * slice() reference.\n */\n\nvar slice = Array.prototype.slice;\n\n/**\n * Expose `co`.\n */\n\nmodule.exports = co['default'] = co.co = co;\n\n/**\n * Wrap the given generator `fn` into a\n * function that returns a promise.\n * This is a separate function so that\n * every `co()` call doesn't create a new,\n * unnecessary closure.\n *\n * @param {GeneratorFunction} fn\n * @return {Function}\n * @api public\n */\n\nco.wrap = function (fn) {\n createPromise.__generatorFunction__ = fn;\n return createPromise;\n function createPromise() {\n return co.call(this, fn.apply(this, arguments));\n }\n};\n\n/**\n * Execute the generator function or a generator\n * and return a promise.\n *\n * @param {Function} fn\n * @return {Promise}\n * @api public\n */\n\nfunction co(gen) {\n var ctx = this;\n var args = slice.call(arguments, 1)\n\n // we wrap everything in a promise to avoid promise chaining,\n // which leads to memory leak errors.\n // see https://github.com/tj/co/issues/180\n return new Promise(function(resolve, reject) {\n if (typeof gen === 'function') gen = gen.apply(ctx, args);\n if (!gen || typeof gen.next !== 'function') return resolve(gen);\n\n onFulfilled();\n\n /**\n * @param {Mixed} res\n * @return {Promise}\n * @api private\n */\n\n function onFulfilled(res) {\n var ret;\n try {\n ret = gen.next(res);\n } catch (e) {\n return reject(e);\n }\n next(ret);\n }\n\n /**\n * @param {Error} err\n * @return {Promise}\n * @api private\n */\n\n function onRejected(err) {\n var ret;\n try {\n ret = gen.throw(err);\n } catch (e) {\n return reject(e);\n }\n next(ret);\n }\n\n /**\n * Get the next value in the generator,\n * return a promise.\n *\n * @param {Object} ret\n * @return {Promise}\n * @api private\n */\n\n function next(ret) {\n if (ret.done) return resolve(ret.value);\n var value = toPromise.call(ctx, ret.value);\n if (value && isPromise(value)) return value.then(onFulfilled, onRejected);\n return onRejected(new TypeError('You may only yield a function, promise, generator, array, or object, '\n + 'but the following object was passed: \"' + String(ret.value) + '\"'));\n }\n });\n}\n\n/**\n * Convert a `yield`ed value into a promise.\n *\n * @param {Mixed} obj\n * @return {Promise}\n * @api private\n */\n\nfunction toPromise(obj) {\n if (!obj) return obj;\n if (isPromise(obj)) return obj;\n if (isGeneratorFunction(obj) || isGenerator(obj)) return co.call(this, obj);\n if ('function' == typeof obj) return thunkToPromise.call(this, obj);\n if (Array.isArray(obj)) return arrayToPromise.call(this, obj);\n if (isObject(obj)) return objectToPromise.call(this, obj);\n return obj;\n}\n\n/**\n * Convert a thunk to a promise.\n *\n * @param {Function}\n * @return {Promise}\n * @api private\n */\n\nfunction thunkToPromise(fn) {\n var ctx = this;\n return new Promise(function (resolve, reject) {\n fn.call(ctx, function (err, res) {\n if (err) return reject(err);\n if (arguments.length > 2) res = slice.call(arguments, 1);\n resolve(res);\n });\n });\n}\n\n/**\n * Convert an array of \"yieldables\" to a promise.\n * Uses `Promise.all()` internally.\n *\n * @param {Array} obj\n * @return {Promise}\n * @api private\n */\n\nfunction arrayToPromise(obj) {\n return Promise.all(obj.map(toPromise, this));\n}\n\n/**\n * Convert an object of \"yieldables\" to a promise.\n * Uses `Promise.all()` internally.\n *\n * @param {Object} obj\n * @return {Promise}\n * @api private\n */\n\nfunction objectToPromise(obj){\n var results = new obj.constructor();\n var keys = Object.keys(obj);\n var promises = [];\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n var promise = toPromise.call(this, obj[key]);\n if (promise && isPromise(promise)) defer(promise, key);\n else results[key] = obj[key];\n }\n return Promise.all(promises).then(function () {\n return results;\n });\n\n function defer(promise, key) {\n // predefine the key in the result\n results[key] = undefined;\n promises.push(promise.then(function (res) {\n results[key] = res;\n }));\n }\n}\n\n/**\n * Check if `obj` is a promise.\n *\n * @param {Object} obj\n * @return {Boolean}\n * @api private\n */\n\nfunction isPromise(obj) {\n return 'function' == typeof obj.then;\n}\n\n/**\n * Check if `obj` is a generator.\n *\n * @param {Mixed} obj\n * @return {Boolean}\n * @api private\n */\n\nfunction isGenerator(obj) {\n return 'function' == typeof obj.next && 'function' == typeof obj.throw;\n}\n\n/**\n * Check if `obj` is a generator function.\n *\n * @param {Mixed} obj\n * @return {Boolean}\n * @api private\n */\nfunction isGeneratorFunction(obj) {\n var constructor = obj.constructor;\n if (!constructor) return false;\n if ('GeneratorFunction' === constructor.name || 'GeneratorFunction' === constructor.displayName) return true;\n return isGenerator(constructor.prototype);\n}\n\n/**\n * Check for plain object.\n *\n * @param {Mixed} val\n * @return {Boolean}\n * @api private\n */\n\nfunction isObject(val) {\n return Object == val.constructor;\n}\n\n},{}],46:[function(require,module,exports){\nvar json = typeof JSON !== 'undefined' ? JSON : require('jsonify');\n\nmodule.exports = function (obj, opts) {\n if (!opts) opts = {};\n if (typeof opts === 'function') opts = { cmp: opts };\n var space = opts.space || '';\n if (typeof space === 'number') space = Array(space+1).join(' ');\n var cycles = (typeof opts.cycles === 'boolean') ? opts.cycles : false;\n var replacer = opts.replacer || function(key, value) { return value; };\n\n var cmp = opts.cmp && (function (f) {\n return function (node) {\n return function (a, b) {\n var aobj = { key: a, value: node[a] };\n var bobj = { key: b, value: node[b] };\n return f(aobj, bobj);\n };\n };\n })(opts.cmp);\n\n var seen = [];\n return (function stringify (parent, key, node, level) {\n var indent = space ? ('\\n' + new Array(level + 1).join(space)) : '';\n var colonSeparator = space ? ': ' : ':';\n\n if (node && node.toJSON && typeof node.toJSON === 'function') {\n node = node.toJSON();\n }\n\n node = replacer.call(parent, key, node);\n\n if (node === undefined) {\n return;\n }\n if (typeof node !== 'object' || node === null) {\n return json.stringify(node);\n }\n if (isArray(node)) {\n var out = [];\n for (var i = 0; i < node.length; i++) {\n var item = stringify(node, i, node[i], level+1) || json.stringify(null);\n out.push(indent + space + item);\n }\n return '[' + out.join(',') + indent + ']';\n }\n else {\n if (seen.indexOf(node) !== -1) {\n if (cycles) return json.stringify('__cycle__');\n throw new TypeError('Converting circular structure to JSON');\n }\n else seen.push(node);\n\n var keys = objectKeys(node).sort(cmp && cmp(node));\n var out = [];\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n var value = stringify(node, key, node[key], level+1);\n\n if(!value) continue;\n\n var keyValue = json.stringify(key)\n + colonSeparator\n + value;\n ;\n out.push(indent + space + keyValue);\n }\n seen.splice(seen.indexOf(node), 1);\n return '{' + out.join(',') + indent + '}';\n }\n })({ '': obj }, '', obj, 0);\n};\n\nvar isArray = Array.isArray || function (x) {\n return {}.toString.call(x) === '[object Array]';\n};\n\nvar objectKeys = Object.keys || function (obj) {\n var has = Object.prototype.hasOwnProperty || function () { return true };\n var keys = [];\n for (var key in obj) {\n if (has.call(obj, key)) keys.push(key);\n }\n return keys;\n};\n\n},{\"jsonify\":47}],47:[function(require,module,exports){\nexports.parse = require('./lib/parse');\nexports.stringify = require('./lib/stringify');\n\n},{\"./lib/parse\":48,\"./lib/stringify\":49}],48:[function(require,module,exports){\nvar at, // The index of the current character\n ch, // The current character\n escapee = {\n '\"': '\"',\n '\\\\': '\\\\',\n '/': '/',\n b: '\\b',\n f: '\\f',\n n: '\\n',\n r: '\\r',\n t: '\\t'\n },\n text,\n\n error = function (m) {\n // Call error when something is wrong.\n throw {\n name: 'SyntaxError',\n message: m,\n at: at,\n text: text\n };\n },\n \n next = function (c) {\n // If a c parameter is provided, verify that it matches the current character.\n if (c && c !== ch) {\n error(\"Expected '\" + c + \"' instead of '\" + ch + \"'\");\n }\n \n // Get the next character. When there are no more characters,\n // return the empty string.\n \n ch = text.charAt(at);\n at += 1;\n return ch;\n },\n \n number = function () {\n // Parse a number value.\n var number,\n string = '';\n \n if (ch === '-') {\n string = '-';\n next('-');\n }\n while (ch >= '0' && ch <= '9') {\n string += ch;\n next();\n }\n if (ch === '.') {\n string += '.';\n while (next() && ch >= '0' && ch <= '9') {\n string += ch;\n }\n }\n if (ch === 'e' || ch === 'E') {\n string += ch;\n next();\n if (ch === '-' || ch === '+') {\n string += ch;\n next();\n }\n while (ch >= '0' && ch <= '9') {\n string += ch;\n next();\n }\n }\n number = +string;\n if (!isFinite(number)) {\n error(\"Bad number\");\n } else {\n return number;\n }\n },\n \n string = function () {\n // Parse a string value.\n var hex,\n i,\n string = '',\n uffff;\n \n // When parsing for string values, we must look for \" and \\ characters.\n if (ch === '\"') {\n while (next()) {\n if (ch === '\"') {\n next();\n return string;\n } else if (ch === '\\\\') {\n next();\n if (ch === 'u') {\n uffff = 0;\n for (i = 0; i < 4; i += 1) {\n hex = parseInt(next(), 16);\n if (!isFinite(hex)) {\n break;\n }\n uffff = uffff * 16 + hex;\n }\n string += String.fromCharCode(uffff);\n } else if (typeof escapee[ch] === 'string') {\n string += escapee[ch];\n } else {\n break;\n }\n } else {\n string += ch;\n }\n }\n }\n error(\"Bad string\");\n },\n\n white = function () {\n\n// Skip whitespace.\n\n while (ch && ch <= ' ') {\n next();\n }\n },\n\n word = function () {\n\n// true, false, or null.\n\n switch (ch) {\n case 't':\n next('t');\n next('r');\n next('u');\n next('e');\n return true;\n case 'f':\n next('f');\n next('a');\n next('l');\n next('s');\n next('e');\n return false;\n case 'n':\n next('n');\n next('u');\n next('l');\n next('l');\n return null;\n }\n error(\"Unexpected '\" + ch + \"'\");\n },\n\n value, // Place holder for the value function.\n\n array = function () {\n\n// Parse an array value.\n\n var array = [];\n\n if (ch === '[') {\n next('[');\n white();\n if (ch === ']') {\n next(']');\n return array; // empty array\n }\n while (ch) {\n array.push(value());\n white();\n if (ch === ']') {\n next(']');\n return array;\n }\n next(',');\n white();\n }\n }\n error(\"Bad array\");\n },\n\n object = function () {\n\n// Parse an object value.\n\n var key,\n object = {};\n\n if (ch === '{') {\n next('{');\n white();\n if (ch === '}') {\n next('}');\n return object; // empty object\n }\n while (ch) {\n key = string();\n white();\n next(':');\n if (Object.hasOwnProperty.call(object, key)) {\n error('Duplicate key \"' + key + '\"');\n }\n object[key] = value();\n white();\n if (ch === '}') {\n next('}');\n return object;\n }\n next(',');\n white();\n }\n }\n error(\"Bad object\");\n };\n\nvalue = function () {\n\n// Parse a JSON value. It could be an object, an array, a string, a number,\n// or a word.\n\n white();\n switch (ch) {\n case '{':\n return object();\n case '[':\n return array();\n case '\"':\n return string();\n case '-':\n return number();\n default:\n return ch >= '0' && ch <= '9' ? number() : word();\n }\n};\n\n// Return the json_parse function. It will have access to all of the above\n// functions and variables.\n\nmodule.exports = function (source, reviver) {\n var result;\n \n text = source;\n at = 0;\n ch = ' ';\n result = value();\n white();\n if (ch) {\n error(\"Syntax error\");\n }\n\n // If there is a reviver function, we recursively walk the new structure,\n // passing each name/value pair to the reviver function for possible\n // transformation, starting with a temporary root object that holds the result\n // in an empty key. If there is not a reviver function, we simply return the\n // result.\n\n return typeof reviver === 'function' ? (function walk(holder, key) {\n var k, v, value = holder[key];\n if (value && typeof value === 'object') {\n for (k in value) {\n if (Object.prototype.hasOwnProperty.call(value, k)) {\n v = walk(value, k);\n if (v !== undefined) {\n value[k] = v;\n } else {\n delete value[k];\n }\n }\n }\n }\n return reviver.call(holder, key, value);\n }({'': result}, '')) : result;\n};\n\n},{}],49:[function(require,module,exports){\nvar cx = /[\\u0000\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]/g,\n escapable = /[\\\\\\\"\\x00-\\x1f\\x7f-\\x9f\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]/g,\n gap,\n indent,\n meta = { // table of character substitutions\n '\\b': '\\\\b',\n '\\t': '\\\\t',\n '\\n': '\\\\n',\n '\\f': '\\\\f',\n '\\r': '\\\\r',\n '\"' : '\\\\\"',\n '\\\\': '\\\\\\\\'\n },\n rep;\n\nfunction quote(string) {\n // If the string contains no control characters, no quote characters, and no\n // backslash characters, then we can safely slap some quotes around it.\n // Otherwise we must also replace the offending characters with safe escape\n // sequences.\n \n escapable.lastIndex = 0;\n return escapable.test(string) ? '\"' + string.replace(escapable, function (a) {\n var c = meta[a];\n return typeof c === 'string' ? c :\n '\\\\u' + ('0000' + a.charCodeAt(0).toString(16)).slice(-4);\n }) + '\"' : '\"' + string + '\"';\n}\n\nfunction str(key, holder) {\n // Produce a string from holder[key].\n var i, // The loop counter.\n k, // The member key.\n v, // The member value.\n length,\n mind = gap,\n partial,\n value = holder[key];\n \n // If the value has a toJSON method, call it to obtain a replacement value.\n if (value && typeof value === 'object' &&\n typeof value.toJSON === 'function') {\n value = value.toJSON(key);\n }\n \n // If we were called with a replacer function, then call the replacer to\n // obtain a replacement value.\n if (typeof rep === 'function') {\n value = rep.call(holder, key, value);\n }\n \n // What happens next depends on the value's type.\n switch (typeof value) {\n case 'string':\n return quote(value);\n \n case 'number':\n // JSON numbers must be finite. Encode non-finite numbers as null.\n return isFinite(value) ? String(value) : 'null';\n \n case 'boolean':\n case 'null':\n // If the value is a boolean or null, convert it to a string. Note:\n // typeof null does not produce 'null'. The case is included here in\n // the remote chance that this gets fixed someday.\n return String(value);\n \n case 'object':\n if (!value) return 'null';\n gap += indent;\n partial = [];\n \n // Array.isArray\n if (Object.prototype.toString.apply(value) === '[object Array]') {\n length = value.length;\n for (i = 0; i < length; i += 1) {\n partial[i] = str(i, value) || 'null';\n }\n \n // Join all of the elements together, separated with commas, and\n // wrap them in brackets.\n v = partial.length === 0 ? '[]' : gap ?\n '[\\n' + gap + partial.join(',\\n' + gap) + '\\n' + mind + ']' :\n '[' + partial.join(',') + ']';\n gap = mind;\n return v;\n }\n \n // If the replacer is an array, use it to select the members to be\n // stringified.\n if (rep && typeof rep === 'object') {\n length = rep.length;\n for (i = 0; i < length; i += 1) {\n k = rep[i];\n if (typeof k === 'string') {\n v = str(k, value);\n if (v) {\n partial.push(quote(k) + (gap ? ': ' : ':') + v);\n }\n }\n }\n }\n else {\n // Otherwise, iterate through all of the keys in the object.\n for (k in value) {\n if (Object.prototype.hasOwnProperty.call(value, k)) {\n v = str(k, value);\n if (v) {\n partial.push(quote(k) + (gap ? ': ' : ':') + v);\n }\n }\n }\n }\n \n // Join all of the member texts together, separated with commas,\n // and wrap them in braces.\n\n v = partial.length === 0 ? '{}' : gap ?\n '{\\n' + gap + partial.join(',\\n' + gap) + '\\n' + mind + '}' :\n '{' + partial.join(',') + '}';\n gap = mind;\n return v;\n }\n}\n\nmodule.exports = function (value, replacer, space) {\n var i;\n gap = '';\n indent = '';\n \n // If the space parameter is a number, make an indent string containing that\n // many spaces.\n if (typeof space === 'number') {\n for (i = 0; i < space; i += 1) {\n indent += ' ';\n }\n }\n // If the space parameter is a string, it will be used as the indent string.\n else if (typeof space === 'string') {\n indent = space;\n }\n\n // If there is a replacer, it must be a function or an array.\n // Otherwise, throw an error.\n rep = replacer;\n if (replacer && typeof replacer !== 'function'\n && (typeof replacer !== 'object' || typeof replacer.length !== 'number')) {\n throw new Error('JSON.stringify');\n }\n \n // Make a fake root object containing our value under the key of ''.\n // Return the result of stringifying the value.\n return str('', {'': value});\n};\n\n},{}],\"ajv\":[function(require,module,exports){\n'use strict';\n\nvar compileSchema = require('./compile')\n , resolve = require('./compile/resolve')\n , Cache = require('./cache')\n , SchemaObject = require('./compile/schema_obj')\n , stableStringify = require('json-stable-stringify')\n , formats = require('./compile/formats')\n , rules = require('./compile/rules')\n , v5 = require('./v5')\n , util = require('./compile/util')\n , async = require('./async')\n , co = require('co');\n\nmodule.exports = Ajv;\n\nAjv.prototype.compileAsync = async.compile;\nAjv.prototype.addKeyword = require('./keyword');\nAjv.ValidationError = require('./compile/validation_error');\n\nvar META_SCHEMA_ID = 'http://json-schema.org/draft-04/schema';\nvar SCHEMA_URI_FORMAT = /^(?:(?:[a-z][a-z0-9+-.]*:)?\\/\\/)?[^\\s]*$/i;\nfunction SCHEMA_URI_FORMAT_FUNC(str) {\n return SCHEMA_URI_FORMAT.test(str);\n}\n\nvar META_IGNORE_OPTIONS = [ 'removeAdditional', 'useDefaults', 'coerceTypes' ];\n\n/**\n * Creates validator instance.\n * Usage: `Ajv(opts)`\n * @param {Object} opts optional options\n * @return {Object} ajv instance\n */\nfunction Ajv(opts) {\n if (!(this instanceof Ajv)) return new Ajv(opts);\n var self = this;\n\n opts = this._opts = util.copy(opts) || {};\n this._schemas = {};\n this._refs = {};\n this._formats = formats(opts.format);\n this._cache = opts.cache || new Cache;\n this._loadingSchemas = {};\n this.RULES = rules();\n\n // this is done on purpose, so that methods are bound to the instance\n // (without using bind) so that they can be used without the instance\n this.validate = validate;\n this.compile = compile;\n this.addSchema = addSchema;\n this.addMetaSchema = addMetaSchema;\n this.validateSchema = validateSchema;\n this.getSchema = getSchema;\n this.removeSchema = removeSchema;\n this.addFormat = addFormat;\n this.errorsText = errorsText;\n\n this._addSchema = _addSchema;\n this._compile = _compile;\n\n opts.loopRequired = opts.loopRequired || Infinity;\n if (opts.async || opts.transpile) async.setup(opts);\n if (opts.beautify === true) opts.beautify = { indent_size: 2 };\n if (opts.errorDataPath == 'property') opts._errorDataPathProperty = true;\n this._metaOpts = getMetaSchemaOptions();\n\n addInitialSchemas();\n if (opts.formats) addInitialFormats();\n if (opts.v5) v5.enable(this);\n if (typeof opts.meta == 'object') addMetaSchema(opts.meta);\n\n\n /**\n * Validate data using schema\n * Schema will be compiled and cached (using serialized JSON as key. [json-stable-stringify](https://github.com/substack/json-stable-stringify) is used to serialize.\n * @param {String|Object} schemaKeyRef key, ref or schema object\n * @param {Any} data to be validated\n * @return {Boolean} validation result. Errors from the last validation will be available in `ajv.errors` (and also in compiled schema: `schema.errors`).\n */\n function validate(schemaKeyRef, data) {\n var v;\n if (typeof schemaKeyRef == 'string') {\n v = getSchema(schemaKeyRef);\n if (!v) throw new Error('no schema with key or ref \"' + schemaKeyRef + '\"');\n } else {\n var schemaObj = _addSchema(schemaKeyRef);\n v = schemaObj.validate || _compile(schemaObj);\n }\n\n var valid = v(data);\n if (v.async) return self._opts.async == '*' ? co(valid) : valid;\n self.errors = v.errors;\n return valid;\n }\n\n\n /**\n * Create validating function for passed schema.\n * @param {Object} schema schema object\n * @return {Function} validating function\n */\n function compile(schema) {\n var schemaObj = _addSchema(schema);\n return schemaObj.validate || _compile(schemaObj);\n }\n\n\n /**\n * Adds schema to the instance.\n * @param {Object|Array} schema schema or array of schemas. If array is passed, `key` and other parameters will be ignored.\n * @param {String} key Optional schema key. Can be passed to `validate` method instead of schema object or id/ref. One schema per instance can have empty `id` and `key`.\n * @param {Boolean} _skipValidation true to skip schema validation. Used internally, option validateSchema should be used instead.\n * @param {Boolean} _meta true if schema is a meta-schema. Used internally, addMetaSchema should be used instead.\n */\n function addSchema(schema, key, _skipValidation, _meta) {\n if (Array.isArray(schema)){\n for (var i=0; i} errors optional array of validation errors, if not passed errors from the instance are used.\n * @param {Object} options optional options with properties `separator` and `dataVar`.\n * @return {String} human readable string with all errors descriptions\n */\n function errorsText(errors, options) {\n errors = errors || self.errors;\n if (!errors) return 'No errors';\n options = options || {};\n var separator = options.separator || ', ';\n var dataVar = options.dataVar || 'data';\n\n var text = '';\n for (var i=0; i