text: /*!
   * Swagger Parser v4.0.1 (November 6th 2017)
   * 
   * http://bigstickcarpet.com/swagger-parser
   * 
   * @author  James Messinger (http://jamesmessinger.com)
   * @license MIT
   */
  (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.SwaggerParser=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<r.length;o++)s(r[o]);return s}({1:[function(require,module,exports){"use strict";function SwaggerParser(){$RefParser.apply(this,arguments)}var validateSchema=require("./validators/schema"),validateSpec=require("./validators/spec"),normalizeArgs=require("json-schema-ref-parser/lib/normalize-args"),util=require("./util"),Options=require("./options"),maybe=require("call-me-maybe"),ono=require("ono"),$RefParser=require("json-schema-ref-parser"),dereference=require("json-schema-ref-parser/lib/dereference");module.exports=SwaggerParser,util.inherits(SwaggerParser,$RefParser),SwaggerParser.YAML=$RefParser.YAML,SwaggerParser.parse=$RefParser.parse,SwaggerParser.resolve=$RefParser.resolve,SwaggerParser.bundle=$RefParser.bundle,SwaggerParser.dereference=$RefParser.dereference,Object.defineProperty(SwaggerParser.prototype,"api",{configurable:!0,enumerable:!0,get:function(){return this.schema}}),SwaggerParser.prototype.parse=function(e,r,a,s){var n=normalizeArgs(arguments);return n.options=new Options(n.options),$RefParser.prototype.parse.call(this,n.path,n.schema,n.options).then(function(e){var r=["2.0"];if(void 0===e.swagger||void 0===e.info||void 0===e.paths)throw ono.syntax("%s is not a valid Swagger API definition",n.path||n.schema);if("number"==typeof e.swagger)throw ono.syntax('Swagger version number must be a string (e.g. "2.0") not a number.');if("number"==typeof e.info.version)throw ono.syntax('API version number must be a string (e.g. "1.0.0") not a number.');if(-1===r.indexOf(e.swagger))throw ono.syntax("Unsupported Swagger version: %d. Swagger Parser only supports version %s",e.swagger,r.join(", "));return maybe(n.callback,Promise.resolve(e))}).catch(function(e){return maybe(n.callback,Promise.reject(e))})},SwaggerParser.validate=function(e,r,a,s){var n=this,o=new n;return o.validate.apply(o,arguments)},SwaggerParser.prototype.validate=function(e,r,a,s){var n=this,o=normalizeArgs(arguments);o.options=new Options(o.options);var i=o.options.dereference.circular;return o.options.validate.schema&&(o.options.dereference.circular="ignore"),this.dereference(o.path,o.schema,o.options).then(function(){if(o.options.dereference.circular=i,o.options.validate.schema&&(validateSchema(n.api),n.$refs.circular))if(!0===i)dereference(n,o.options);else if(!1===i)throw ono.reference("The API contains circular references");return o.options.validate.spec&&validateSpec(n.api),maybe(o.callback,Promise.resolve(n.schema))}).catch(function(e){return maybe(o.callback,Promise.reject(e))})}},{"./options":2,"./util":3,"./validators/schema":4,"./validators/spec":5,"call-me-maybe":10,"json-schema-ref-parser":53,"json-schema-ref-parser/lib/dereference":52,"json-schema-ref-parser/lib/normalize-args":54,ono:74}],2:[function(require,module,exports){"use strict";function ParserOptions(s){$RefParserOptions.call(this,ParserOptions.defaults),$RefParserOptions.apply(this,arguments)}var $RefParserOptions=require("json-schema-ref-parser/lib/options"),schemaValidator=require("./validators/schema"),specValidator=require("./validators/spec"),util=require("util");module.exports=ParserOptions,ParserOptions.defaults={validate:{schema:schemaValidator,spec:specValidator}},util.inherits(ParserOptions,$RefParserOptions)},{"./validators/schema":4,"./validators/spec":5,"json-schema-ref-parser/lib/options":55,util:104}],3:[function(require,module,exports){"use strict";var debug=require("debug"),util=require("util");exports.format=util.format,exports.inherits=util.inherits,exports.debug=debug("swagger:parser"),exports.swaggerParamRegExp=/\{([^\/}]+)}/g},{debug:12,util:104}],4:[function(require,module,exports){"use strict";function validateSchema(a){if(util.debug("Validating against the Swagger 2.0 schema"),!ZSchema.validate(a,swaggerSchema)){var e=ZSchema.getLastError(),r="Swagger schema validation failed. \n"+formatZSchemaError(e.details);throw ono.syntax(e,{details:e.details},r)}util.debug("    Validated successfully")}function initializeZSchema(){ZSchema=new ZSchema({breakOnFirstError:!0,noExtraKeywords:!0,ignoreUnknownFormats:!1,reportPathAsArray:!0})}function formatZSchemaError(a,e){e=e||"  ";var r="";return a.forEach(function(a,i){r+=util.format("%s%s at #/%s\n",e,a.message,a.path.join("/")),a.inner&&(r+=formatZSchemaError(a.inner,e+"  "))}),r}var util=require("../util"),ono=require("ono"),ZSchema=require("z-schema"),swaggerSchema=require("swagger-schema-official/schema.json");module.exports=validateSchema,initializeZSchema()},{"../util":3,ono:74,"swagger-schema-official/schema.json":97,"z-schema":183}],5:[function(require,module,exports){"use strict";function validateSpec(a){util.debug("Validating against the Swagger 2.0 spec"),Object.keys(a.paths||{}).forEach(function(e){var t=a.paths[e],i="/paths"+e;t&&0===e.indexOf("/")&&validatePath(a,t,i)}),util.debug("    Validated successfully")}function validatePath(a,e,t){swaggerMethods.forEach(function(i){var n=e[i],r=t+"/"+i;if(n){validateParameters(a,e,t,n,r);Object.keys(n.responses||{}).forEach(function(a){var e=n.responses[a],t=r+"/responses/"+a;validateResponse(a,e||{},t)})}})}function validateParameters(a,e,t,i,n){var r=e.parameters||[],s=i.parameters||[];try{checkForDuplicates(r)}catch(a){throw ono.syntax(a,"Validation failed. %s has duplicate parameters",t)}try{checkForDuplicates(s)}catch(a){throw ono.syntax(a,"Validation failed. %s has duplicate parameters",n)}var o=r.reduce(function(a,e){return a.some(function(a){return a.in===e.in&&a.name===e.name})||a.push(e),a},s.slice());validateBodyParameters(o,n),validatePathParameters(o,t,n),validateParameterTypes(o,a,i,n)}function validateBodyParameters(a,e){var t=a.filter(function(a){return"body"===a.in}),i=a.filter(function(a){return"formData"===a.in});if(t.length>1)throw ono.syntax("Validation failed. %s has %d body parameters. Only one is allowed.",e,t.length);if(t.length>0&&i.length>0)throw ono.syntax("Validation failed. %s has body parameters and formData parameters. Only one or the other is allowed.",e)}function validatePathParameters(a,e,t){for(var i=e.match(util.swaggerParamRegExp)||[],n=0;n<i.length;n++)for(var r=n+1;r<i.length;r++)if(i[n]===i[r])throw ono.syntax("Validation failed. %s has multiple path placeholders named %s",t,i[n]);if(a.filter(function(a){return"path"===a.in}).forEach(function(a){if(!0!==a.required)throw ono.syntax('Validation failed. Path parameters cannot be optional. Set required=true for the "%s" parameter at %s',a.name,t);var e=i.indexOf("{"+a.name+"}");if(-1===e)throw ono.syntax('Validation failed. %s has a path parameter named "%s", but there is no corresponding {%s} in the path string',t,a.name,a.name);i.splice(e,1)}),i.length>0)throw ono.syntax("Validation failed. %s is missing path parameter(s) for %s",t,i)}function validateParameterTypes(a,e,t,i){a.forEach(function(a){var n,r,s=i+"/parameters/"+a.name;switch(a.in){case"body":n=a.schema,r=schemaTypes;break;case"formData":n=a,r=primitiveTypes.concat("file");break;default:n=a,r=primitiveTypes}if(validateSchema(n,s,r),"file"===n.type){var o=t.consumes||e.consumes||[];if(-1===o.indexOf("multipart/form-data")&&-1===o.indexOf("application/x-www-form-urlencoded"))throw ono.syntax("Validation failed. %s has a file parameter, so it must consume multipart/form-data or application/x-www-form-urlencoded",i)}})}function checkForDuplicates(a){for(var e=0;e<a.length-1;e++)for(var t=a[e],i=e+1;i<a.length;i++){var n=a[i];if(t.name===n.name&&t.in===n.in)throw ono.syntax('Validation failed. Found multiple %s parameters named "%s"',t.in,t.name)}}function validateResponse(a,e,t){if("default"!==a&&(a<100||a>599))throw ono.syntax("Validation failed. %s has an invalid response code (%s)",t,a);if((Object.keys(e.headers||{}).forEach(function(a){validateSchema(e.headers[a],t+"/headers/"+a,primitiveTypes)}),e.schema)&&-1===schemaTypes.concat("file").indexOf(e.schema.type))throw ono.syntax("Validation failed. %s has an invalid response schema type (%s)",t,e.schema.type)}function validateSchema(a,e,t){if(-1===t.indexOf(a.type))throw ono.syntax("Validation failed. %s has an invalid type (%s)",e,a.type);if("array"===a.type&&!a.items)throw ono.syntax('Validation failed. %s is an array, so it must include an "items" schema',e)}var util=require("../util"),ono=require("ono"),swaggerMethods=require("swagger-methods"),primitiveTypes=["array","boolean","integer","number","string"],schemaTypes=["array","boolean","integer","number","string","object","null",void 0];module.exports=validateSpec},{"../util":3,ono:74,"swagger-methods":96}],6:[function(require,module,exports){"use strict";function placeHoldersCount(o){var r=o.length;if(r%4>0)throw new Error("Invalid string. Length must be a multiple of 4");return"="===o[r-2]?2:"="===o[r-1]?1:0}function byteLength(o){return 3*o.length/4-placeHoldersCount(o)}function toByteArray(o){var r,e,t,u,n,p=o.length;u=placeHoldersCount(o),n=new Arr(3*p/4-u),e=u>0?p-4:p;var a=0;for(r=0;r<e;r+=4)t=revLookup[o.charCodeAt(r)]<<18|revLookup[o.charCodeAt(r+1)]<<12|revLookup[o.charCodeAt(r+2)]<<6|revLookup[o.charCodeAt(r+3)],n[a++]=t>>16&255,n[a++]=t>>8&255,n[a++]=255&t;return 2===u?(t=revLookup[o.charCodeAt(r)]<<2|revLookup[o.charCodeAt(r+1)]>>4,n[a++]=255&t):1===u&&(t=revLookup[o.charCodeAt(r)]<<10|revLookup[o.charCodeAt(r+1)]<<4|revLookup[o.charCodeAt(r+2)]>>2,n[a++]=t>>8&255,n[a++]=255&t),n}function tripletToBase64(o){return lookup[o>>18&63]+lookup[o>>12&63]+lookup[o>>6&63]+lookup[63&o]}function encodeChunk(o,r,e){for(var t,u=[],n=r;n<e;n+=3)t=(o[n]<<16)+(o[n+1]<<8)+o[n+2],u.push(tripletToBase64(t));return u.join("")}function fromByteArray(o){for(var r,e=o.length,t=e%3,u="",n=[],p=0,a=e-t;p<a;p+=16383)n.push(encodeChunk(o,p,p+16383>a?a:p+16383));return 1===t?(r=o[e-1],u+=lookup[r>>2],u+=lookup[r<<4&63],u+="=="):2===t&&(r=(o[e-2]<<8)+o[e-1],u+=lookup[r>>10],u+=lookup[r>>4&63],u+=lookup[r<<2&63],u+="="),n.push(u),n.join("")}exports.byteLength=byteLength,exports.toByteArray=toByteArray,exports.fromByteArray=fromByteArray;for(var lookup=[],revLookup=[],Arr="undefined"!=typeof Uint8Array?Uint8Array:Array,code="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i=0,len=code.length;i<len;++i)lookup[i]=code[i],revLookup[code.charCodeAt(i)]=i;revLookup["-".charCodeAt(0)]=62,revLookup["_".charCodeAt(0)]=63},{}],7:[function(require,module,exports){},{}],8:[function(require,module,exports){/*!
   * The buffer module from node.js, for the browser.
   *
   * @author   Feross Aboukhadijeh <https://feross.org>
   * @license  MIT
   */
  "use strict";function typedArraySupport(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()}catch(e){return!1}}function createBuffer(e){if(e>K_MAX_LENGTH)throw new RangeError("Invalid typed array length");var t=new Uint8Array(e);return t.__proto__=Buffer.prototype,t}function Buffer(e,t,r){if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return allocUnsafe(e)}return from(e,t,r)}function from(e,t,r){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return isArrayBuffer(e)?fromArrayBuffer(e,t,r):"string"==typeof e?fromString(e,t):fromObject(e)}function assertSize(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function alloc(e,t,r){return assertSize(e),e<=0?createBuffer(e):void 0!==t?"string"==typeof r?createBuffer(e).fill(t,r):createBuffer(e).fill(t):createBuffer(e)}function allocUnsafe(e){return assertSize(e),createBuffer(e<0?0:0|checked(e))}function fromString(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!Buffer.isEncoding(t))throw new TypeError('"encoding" must be a valid string encoding');var r=0|byteLength(e,t),n=createBuffer(r),f=n.write(e,t);return f!==r&&(n=n.slice(0,f)),n}function fromArrayLike(e){for(var t=e.length<0?0:0|checked(e.length),r=createBuffer(t),n=0;n<t;n+=1)r[n]=255&e[n];return r}function fromArrayBuffer(e,t,r){if(t<0||e.byteLength<t)throw new RangeError("'offset' is out of bounds");if(e.byteLength<t+(r||0))throw new RangeError("'length' is out of bounds");var n;return n=void 0===t&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,t):new Uint8Array(e,t,r),n.__proto__=Buffer.prototype,n}function fromObject(e){if(Buffer.isBuffer(e)){var t=0|checked(e.length),r=createBuffer(t);return 0===r.length?r:(e.copy(r,0,0,t),r)}if(e){if(isArrayBufferView(e)||"length"in e)return"number"!=typeof e.length||numberIsNaN(e.length)?createBuffer(0):fromArrayLike(e);if("Buffer"===e.type&&Array.isArray(e.data))return fromArrayLike(e.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function checked(e){if(e>=K_MAX_LENGTH)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+K_MAX_LENGTH.toString(16)+" bytes");return 0|e}function SlowBuffer(e){return+e!=e&&(e=0),Buffer.alloc(+e)}function byteLength(e,t){if(Buffer.isBuffer(e))return e.length;if(isArrayBufferView(e)||isArrayBuffer(e))return e.byteLength;"string"!=typeof e&&(e=""+e);var r=e.length;if(0===r)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return utf8ToBytes(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return base64ToBytes(e).length;default:if(n)return utf8ToBytes(e).length;t=(""+t).toLowerCase(),n=!0}}function slowToString(e,t,r){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if(r>>>=0,t>>>=0,r<=t)return"";for(e||(e="utf8");;)switch(e){case"hex":return hexSlice(this,t,r);case"utf8":case"utf-8":return utf8Slice(this,t,r);case"ascii":return asciiSlice(this,t,r);case"latin1":case"binary":return latin1Slice(this,t,r);case"base64":return base64Slice(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return utf16leSlice(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function swap(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function bidirectionalIndexOf(e,t,r,n,f){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,numberIsNaN(r)&&(r=f?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(f)return-1;r=e.length-1}else if(r<0){if(!f)return-1;r=0}if("string"==typeof t&&(t=Buffer.from(t,n)),Buffer.isBuffer(t))return 0===t.length?-1:arrayIndexOf(e,t,r,n,f);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?f?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):arrayIndexOf(e,[t],r,n,f);throw new TypeError("val must be string, number or Buffer")}function arrayIndexOf(e,t,r,n,f){function i(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}var o=1,u=e.length,s=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;o=2,u/=2,s/=2,r/=2}var a;if(f){var h=-1;for(a=r;a<u;a++)if(i(e,a)===i(t,-1===h?0:a-h)){if(-1===h&&(h=a),a-h+1===s)return h*o}else-1!==h&&(a-=a-h),h=-1}else for(r+s>u&&(r=u-s),a=r;a>=0;a--){for(var c=!0,l=0;l<s;l++)if(i(e,a+l)!==i(t,l)){c=!1;break}if(c)return a}return-1}function hexWrite(e,t,r,n){r=Number(r)||0;var f=e.length-r;n?(n=Number(n))>f&&(n=f):n=f;var i=t.length;if(i%2!=0)throw new TypeError("Invalid hex string");n>i/2&&(n=i/2);for(var o=0;o<n;++o){var u=parseInt(t.substr(2*o,2),16);if(numberIsNaN(u))return o;e[r+o]=u}return o}function utf8Write(e,t,r,n){return blitBuffer(utf8ToBytes(t,e.length-r),e,r,n)}function asciiWrite(e,t,r,n){return blitBuffer(asciiToBytes(t),e,r,n)}function latin1Write(e,t,r,n){return asciiWrite(e,t,r,n)}function base64Write(e,t,r,n){return blitBuffer(base64ToBytes(t),e,r,n)}function ucs2Write(e,t,r,n){return blitBuffer(utf16leToBytes(t,e.length-r),e,r,n)}function base64Slice(e,t,r){return 0===t&&r===e.length?base64.fromByteArray(e):base64.fromByteArray(e.slice(t,r))}function utf8Slice(e,t,r){r=Math.min(e.length,r);for(var n=[],f=t;f<r;){var i=e[f],o=null,u=i>239?4:i>223?3:i>191?2:1;if(f+u<=r){var s,a,h,c;switch(u){case 1:i<128&&(o=i);break;case 2:s=e[f+1],128==(192&s)&&(c=(31&i)<<6|63&s)>127&&(o=c);break;case 3:s=e[f+1],a=e[f+2],128==(192&s)&&128==(192&a)&&(c=(15&i)<<12|(63&s)<<6|63&a)>2047&&(c<55296||c>57343)&&(o=c);break;case 4:s=e[f+1],a=e[f+2],h=e[f+3],128==(192&s)&&128==(192&a)&&128==(192&h)&&(c=(15&i)<<18|(63&s)<<12|(63&a)<<6|63&h)>65535&&c<1114112&&(o=c)}}null===o?(o=65533,u=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|1023&o),n.push(o),f+=u}return decodeCodePointsArray(n)}function decodeCodePointsArray(e){var t=e.length;if(t<=MAX_ARGUMENTS_LENGTH)return String.fromCharCode.apply(String,e);for(var r="",n=0;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=MAX_ARGUMENTS_LENGTH));return r}function asciiSlice(e,t,r){var n="";r=Math.min(e.length,r);for(var f=t;f<r;++f)n+=String.fromCharCode(127&e[f]);return n}function latin1Slice(e,t,r){var n="";r=Math.min(e.length,r);for(var f=t;f<r;++f)n+=String.fromCharCode(e[f]);return n}function hexSlice(e,t,r){var n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);for(var f="",i=t;i<r;++i)f+=toHex(e[i]);return f}function utf16leSlice(e,t,r){for(var n=e.slice(t,r),f="",i=0;i<n.length;i+=2)f+=String.fromCharCode(n[i]+256*n[i+1]);return f}function checkOffset(e,t,r){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function checkInt(e,t,r,n,f,i){if(!Buffer.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>f||t<i)throw new RangeError('"value" argument is out of bounds');if(r+n>e.length)throw new RangeError("Index out of range")}function checkIEEE754(e,t,r,n,f,i){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function writeFloat(e,t,r,n,f){return t=+t,r>>>=0,f||checkIEEE754(e,t,r,4,3.4028234663852886e38,-3.4028234663852886e38),ieee754.write(e,t,r,n,23,4),r+4}function writeDouble(e,t,r,n,f){return t=+t,r>>>=0,f||checkIEEE754(e,t,r,8,1.7976931348623157e308,-1.7976931348623157e308),ieee754.write(e,t,r,n,52,8),r+8}function base64clean(e){if(e=e.trim().replace(INVALID_BASE64_RE,""),e.length<2)return"";for(;e.length%4!=0;)e+="=";return e}function toHex(e){return e<16?"0"+e.toString(16):e.toString(16)}function utf8ToBytes(e,t){t=t||1/0;for(var r,n=e.length,f=null,i=[],o=0;o<n;++o){if((r=e.charCodeAt(o))>55295&&r<57344){if(!f){if(r>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(o+1===n){(t-=3)>-1&&i.push(239,191,189);continue}f=r;continue}if(r<56320){(t-=3)>-1&&i.push(239,191,189),f=r;continue}r=65536+(f-55296<<10|r-56320)}else f&&(t-=3)>-1&&i.push(239,191,189);if(f=null,r<128){if((t-=1)<0)break;i.push(r)}else if(r<2048){if((t-=2)<0)break;i.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;i.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return i}function asciiToBytes(e){for(var t=[],r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}function utf16leToBytes(e,t){for(var r,n,f,i=[],o=0;o<e.length&&!((t-=2)<0);++o)r=e.charCodeAt(o),n=r>>8,f=r%256,i.push(f),i.push(n);return i}function base64ToBytes(e){return base64.toByteArray(base64clean(e))}function blitBuffer(e,t,r,n){for(var f=0;f<n&&!(f+r>=t.length||f>=e.length);++f)t[f+r]=e[f];return f}function isArrayBuffer(e){return e instanceof ArrayBuffer||null!=e&&null!=e.constructor&&"ArrayBuffer"===e.constructor.name&&"number"==typeof e.byteLength}function isArrayBufferView(e){return"function"==typeof ArrayBuffer.isView&&ArrayBuffer.isView(e)}function numberIsNaN(e){return e!==e}var base64=require("base64-js"),ieee754=require("ieee754");exports.Buffer=Buffer,exports.SlowBuffer=SlowBuffer,exports.INSPECT_MAX_BYTES=50;var K_MAX_LENGTH=2147483647;exports.kMaxLength=K_MAX_LENGTH,Buffer.TYPED_ARRAY_SUPPORT=typedArraySupport(),Buffer.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),"undefined"!=typeof Symbol&&Symbol.species&&Buffer[Symbol.species]===Buffer&&Object.defineProperty(Buffer,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),Buffer.poolSize=8192,Buffer.from=function(e,t,r){return from(e,t,r)},Buffer.prototype.__proto__=Uint8Array.prototype,Buffer.__proto__=Uint8Array,Buffer.alloc=function(e,t,r){return alloc(e,t,r)},Buffer.allocUnsafe=function(e){return allocUnsafe(e)},Buffer.allocUnsafeSlow=function(e){return allocUnsafe(e)},Buffer.isBuffer=function(e){return null!=e&&!0===e._isBuffer},Buffer.compare=function(e,t){if(!Buffer.isBuffer(e)||!Buffer.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var r=e.length,n=t.length,f=0,i=Math.min(r,n);f<i;++f)if(e[f]!==t[f]){r=e[f],n=t[f];break}return r<n?-1:n<r?1:0},Buffer.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},Buffer.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return Buffer.alloc(0);var r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;var n=Buffer.allocUnsafe(t),f=0;for(r=0;r<e.length;++r){var i=e[r];if(!Buffer.isBuffer(i))throw new TypeError('"list" argument must be an Array of Buffers');i.copy(n,f),f+=i.length}return n},Buffer.byteLength=byteLength,Buffer.prototype._isBuffer=!0,Buffer.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)swap(this,t,t+1);return this},Buffer.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)swap(this,t,t+3),swap(this,t+1,t+2);return this},Buffer.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)swap(this,t,t+7),swap(this,t+1,t+6),swap(this,t+2,t+5),swap(this,t+3,t+4);return this},Buffer.prototype.toString=function(){var e=this.length;return 0===e?"":0===arguments.length?utf8Slice(this,0,e):slowToString.apply(this,arguments)},Buffer.prototype.equals=function(e){if(!Buffer.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===Buffer.compare(this,e)},Buffer.prototype.inspect=function(){var e="",t=exports.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,t).match(/.{2}/g).join(" "),this.length>t&&(e+=" ... ")),"<Buffer "+e+">"},Buffer.prototype.compare=function(e,t,r,n,f){if(!Buffer.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===f&&(f=this.length),t<0||r>e.length||n<0||f>this.length)throw new RangeError("out of range index");if(n>=f&&t>=r)return 0;if(n>=f)return-1;if(t>=r)return 1;if(t>>>=0,r>>>=0,n>>>=0,f>>>=0,this===e)return 0;for(var i=f-n,o=r-t,u=Math.min(i,o),s=this.slice(n,f),a=e.slice(t,r),h=0;h<u;++h)if(s[h]!==a[h]){i=s[h],o=a[h];break}return i<o?-1:o<i?1:0},Buffer.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},Buffer.prototype.indexOf=function(e,t,r){return bidirectionalIndexOf(this,e,t,r,!0)},Buffer.prototype.lastIndexOf=function(e,t,r){return bidirectionalIndexOf(this,e,t,r,!1)},Buffer.prototype.write=function(e,t,r,n){if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)n=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var f=this.length-t;if((void 0===r||r>f)&&(r=f),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var i=!1;;)switch(n){case"hex":return hexWrite(this,e,t,r);case"utf8":case"utf-8":return utf8Write(this,e,t,r);case"ascii":return asciiWrite(this,e,t,r);case"latin1":case"binary":return latin1Write(this,e,t,r);case"base64":return base64Write(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ucs2Write(this,e,t,r);default:if(i)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),i=!0}},Buffer.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var MAX_ARGUMENTS_LENGTH=4096;Buffer.prototype.slice=function(e,t){var r=this.length;e=~~e,t=void 0===t?r:~~t,e<0?(e+=r)<0&&(e=0):e>r&&(e=r),t<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e);var n=this.subarray(e,t);return n.__proto__=Buffer.prototype,n},Buffer.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||checkOffset(e,t,this.length);for(var n=this[e],f=1,i=0;++i<t&&(f*=256);)n+=this[e+i]*f;return n},Buffer.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||checkOffset(e,t,this.length);for(var n=this[e+--t],f=1;t>0&&(f*=256);)n+=this[e+--t]*f;return n},Buffer.prototype.readUInt8=function(e,t){return e>>>=0,t||checkOffset(e,1,this.length),this[e]},Buffer.prototype.readUInt16LE=function(e,t){return e>>>=0,t||checkOffset(e,2,this.length),this[e]|this[e+1]<<8},Buffer.prototype.readUInt16BE=function(e,t){return e>>>=0,t||checkOffset(e,2,this.length),this[e]<<8|this[e+1]},Buffer.prototype.readUInt32LE=function(e,t){return e>>>=0,t||checkOffset(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},Buffer.prototype.readUInt32BE=function(e,t){return e>>>=0,t||checkOffset(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},Buffer.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||checkOffset(e,t,this.length);for(var n=this[e],f=1,i=0;++i<t&&(f*=256);)n+=this[e+i]*f;return f*=128,n>=f&&(n-=Math.pow(2,8*t)),n},Buffer.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||checkOffset(e,t,this.length);for(var n=t,f=1,i=this[e+--n];n>0&&(f*=256);)i+=this[e+--n]*f;return f*=128,i>=f&&(i-=Math.pow(2,8*t)),i},Buffer.prototype.readInt8=function(e,t){return e>>>=0,t||checkOffset(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},Buffer.prototype.readInt16LE=function(e,t){e>>>=0,t||checkOffset(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},Buffer.prototype.readInt16BE=function(e,t){e>>>=0,t||checkOffset(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},Buffer.prototype.readInt32LE=function(e,t){return e>>>=0,t||checkOffset(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},Buffer.prototype.readInt32BE=function(e,t){return e>>>=0,t||checkOffset(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},Buffer.prototype.readFloatLE=function(e,t){return e>>>=0,t||checkOffset(e,4,this.length),ieee754.read(this,e,!0,23,4)},Buffer.prototype.readFloatBE=function(e,t){return e>>>=0,t||checkOffset(e,4,this.length),ieee754.read(this,e,!1,23,4)},Buffer.prototype.readDoubleLE=function(e,t){return e>>>=0,t||checkOffset(e,8,this.length),ieee754.read(this,e,!0,52,8)},Buffer.prototype.readDoubleBE=function(e,t){return e>>>=0,t||checkOffset(e,8,this.length),ieee754.read(this,e,!1,52,8)},Buffer.prototype.writeUIntLE=function(e,t,r,n){if(e=+e,t>>>=0,r>>>=0,!n){checkInt(this,e,t,r,Math.pow(2,8*r)-1,0)}var f=1,i=0;for(this[t]=255&e;++i<r&&(f*=256);)this[t+i]=e/f&255;return t+r},Buffer.prototype.writeUIntBE=function(e,t,r,n){if(e=+e,t>>>=0,r>>>=0,!n){checkInt(this,e,t,r,Math.pow(2,8*r)-1,0)}var f=r-1,i=1;for(this[t+f]=255&e;--f>=0&&(i*=256);)this[t+f]=e/i&255;return t+r},Buffer.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||checkInt(this,e,t,1,255,0),this[t]=255&e,t+1},Buffer.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||checkInt(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},Buffer.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||checkInt(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},Buffer.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||checkInt(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},Buffer.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||checkInt(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},Buffer.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var f=Math.pow(2,8*r-1);checkInt(this,e,t,r,f-1,-f)}var i=0,o=1,u=0;for(this[t]=255&e;++i<r&&(o*=256);)e<0&&0===u&&0!==this[t+i-1]&&(u=1),this[t+i]=(e/o>>0)-u&255;return t+r},Buffer.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var f=Math.pow(2,8*r-1);checkInt(this,e,t,r,f-1,-f)}var i=r-1,o=1,u=0;for(this[t+i]=255&e;--i>=0&&(o*=256);)e<0&&0===u&&0!==this[t+i+1]&&(u=1),this[t+i]=(e/o>>0)-u&255;return t+r},Buffer.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||checkInt(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},Buffer.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||checkInt(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},Buffer.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||checkInt(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},Buffer.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||checkInt(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},Buffer.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||checkInt(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},Buffer.prototype.writeFloatLE=function(e,t,r){return writeFloat(this,e,t,!0,r)},Buffer.prototype.writeFloatBE=function(e,t,r){return writeFloat(this,e,t,!1,r)},Buffer.prototype.writeDoubleLE=function(e,t,r){return writeDouble(this,e,t,!0,r)},Buffer.prototype.writeDoubleBE=function(e,t,r){return writeDouble(this,e,t,!1,r)},Buffer.prototype.copy=function(e,t,r,n){if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-r&&(n=e.length-t+r);var f,i=n-r;if(this===e&&r<t&&t<n)for(f=i-1;f>=0;--f)e[f+t]=this[f+r];else if(i<1e3)for(f=0;f<i;++f)e[f+t]=this[f+r];else Uint8Array.prototype.set.call(e,this.subarray(r,r+i),t);return i},Buffer.prototype.fill=function(e,t,r,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),1===e.length){var f=e.charCodeAt(0);f<256&&(e=f)}if(void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!Buffer.isEncoding(n))throw new TypeError("Unknown encoding: "+n)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0);var i;if("number"==typeof e)for(i=t;i<r;++i)this[i]=e;else{var o=Buffer.isBuffer(e)?e:new Buffer(e,n),u=o.length;for(i=0;i<r-t;++i)this[i+t]=o[i%u]}return this};var INVALID_BASE64_RE=/[^+\/0-9A-Za-z-_]/g},{"base64-js":6,ieee754:17}],9:[function(require,module,exports){module.exports={100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Unordered Collection",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"}},{}],10:[function(require,module,exports){(function(process,global){"use strict";var next=global.process&&process.nextTick||global.setImmediate||function(n){setTimeout(n,0)};module.exports=function(n,t){return n?void t.then(function(t){next(function(){n(null,t)})},function(t){next(function(){n(t)})}):t}}).call(this,require("_process"),typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{_process:76}],11:[function(require,module,exports){(function(Buffer){function isArray(r){return Array.isArray?Array.isArray(r):"[object Array]"===objectToString(r)}function isBoolean(r){return"boolean"==typeof r}function isNull(r){return null===r}function isNullOrUndefined(r){return null==r}function isNumber(r){return"number"==typeof r}function isString(r){return"string"==typeof r}function isSymbol(r){return"symbol"==typeof r}function isUndefined(r){return void 0===r}function isRegExp(r){return"[object RegExp]"===objectToString(r)}function isObject(r){return"object"==typeof r&&null!==r}function isDate(r){return"[object Date]"===objectToString(r)}function isError(r){return"[object Error]"===objectToString(r)||r instanceof Error}function isFunction(r){return"function"==typeof r}function isPrimitive(r){return null===r||"boolean"==typeof r||"number"==typeof r||"string"==typeof r||"symbol"==typeof r||void 0===r}function objectToString(r){return Object.prototype.toString.call(r)}exports.isArray=isArray,exports.isBoolean=isBoolean,exports.isNull=isNull,exports.isNullOrUndefined=isNullOrUndefined,exports.isNumber=isNumber,exports.isString=isString,exports.isSymbol=isSymbol,exports.isUndefined=isUndefined,exports.isRegExp=isRegExp,exports.isObject=isObject,exports.isDate=isDate,exports.isError=isError,exports.isFunction=isFunction,exports.isPrimitive=isPrimitive,exports.isBuffer=Buffer.isBuffer}).call(this,{isBuffer:require("../../is-buffer/index.js")})},{"../../is-buffer/index.js":19}],12:[function(require,module,exports){(function(process){function useColors(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type)||("undefined"==typeof navigator||!navigator.userAgent||!navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))}function formatArgs(e){var o=this.useColors;if(e[0]=(o?"%c":"")+this.namespace+(o?" %c":" ")+e[0]+(o?"%c ":" ")+"+"+exports.humanize(this.diff),o){var C="color: "+this.color;e.splice(1,0,C,"color: inherit");var t=0,r=0;e[0].replace(/%[a-zA-Z%]/g,function(e){"%%"!==e&&(t++,"%c"===e&&(r=t))}),e.splice(r,0,C)}}function log(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function save(e){try{null==e?exports.storage.removeItem("debug"):exports.storage.debug=e}catch(e){}}function load(){var e;try{e=exports.storage.debug}catch(e){}return!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG),e}function localstorage(){try{return window.localStorage}catch(e){}}exports=module.exports=require("./debug"),exports.log=log,exports.formatArgs=formatArgs,exports.save=save,exports.load=load,exports.useColors=useColors,exports.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:localstorage(),exports.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],exports.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}},exports.enable(load())}).call(this,require("_process"))},{"./debug":13,_process:76}],13:[function(require,module,exports){function selectColor(e){var r,t=0;for(r in e)t=(t<<5)-t+e.charCodeAt(r),t|=0;return exports.colors[Math.abs(t)%exports.colors.length]}function createDebug(e){function r(){if(r.enabled){var e=r,s=+new Date,o=s-(t||s);e.diff=o,e.prev=t,e.curr=s,t=s;for(var n=new Array(arguments.length),a=0;a<n.length;a++)n[a]=arguments[a];n[0]=exports.coerce(n[0]),"string"!=typeof n[0]&&n.unshift("%O");var p=0;n[0]=n[0].replace(/%([a-zA-Z%])/g,function(r,t){if("%%"===r)return r;p++;var s=exports.formatters[t];if("function"==typeof s){var o=n[p];r=s.call(e,o),n.splice(p,1),p--}return r}),exports.formatArgs.call(e,n);(r.log||exports.log||console.log.bind(console)).apply(e,n)}}var t;return r.namespace=e,r.enabled=exports.enabled(e),r.useColors=exports.useColors(),r.color=selectColor(e),r.destroy=destroy,"function"==typeof exports.init&&exports.init(r),exports.instances.push(r),r}function destroy(){var e=exports.instances.indexOf(this);return-1!==e&&(exports.instances.splice(e,1),!0)}function enable(e){exports.save(e),exports.names=[],exports.skips=[];var r,t=("string"==typeof e?e:"").split(/[\s,]+/),s=t.length;for(r=0;r<s;r++)t[r]&&(e=t[r].replace(/\*/g,".*?"),"-"===e[0]?exports.skips.push(new RegExp("^"+e.substr(1)+"$")):exports.names.push(new RegExp("^"+e+"$")));for(r=0;r<exports.instances.length;r++){var o=exports.instances[r];o.enabled=exports.enabled(o.namespace)}}function disable(){exports.enable("")}function enabled(e){if("*"===e[e.length-1])return!0;var r,t;for(r=0,t=exports.skips.length;r<t;r++)if(exports.skips[r].test(e))return!1;for(r=0,t=exports.names.length;r<t;r++)if(exports.names[r].test(e))return!0;return!1}function coerce(e){return e instanceof Error?e.stack||e.message:e}exports=module.exports=createDebug.debug=createDebug.default=createDebug,exports.coerce=coerce,exports.disable=disable,exports.enable=enable,exports.enabled=enabled,exports.humanize=require("ms"),exports.instances=[],exports.names=[],exports.skips=[],exports.formatters={}},{ms:73}],14:[function(require,module,exports){function EventEmitter(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function isFunction(e){return"function"==typeof e}function isNumber(e){return"number"==typeof e}function isObject(e){return"object"==typeof e&&null!==e}function isUndefined(e){return void 0===e}module.exports=EventEmitter,EventEmitter.EventEmitter=EventEmitter,EventEmitter.prototype._events=void 0,EventEmitter.prototype._maxListeners=void 0,EventEmitter.defaultMaxListeners=10,EventEmitter.prototype.setMaxListeners=function(e){if(!isNumber(e)||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},EventEmitter.prototype.emit=function(e){var t,i,n,s,r,o;if(this._events||(this._events={}),"error"===e&&(!this._events.error||isObject(this._events.error)&&!this._events.error.length)){if((t=arguments[1])instanceof Error)throw t;var h=new Error('Uncaught, unspecified "error" event. ('+t+")");throw h.context=t,h}if(i=this._events[e],isUndefined(i))return!1;if(isFunction(i))switch(arguments.length){case 1:i.call(this);break;case 2:i.call(this,arguments[1]);break;case 3:i.call(this,arguments[1],arguments[2]);break;default:s=Array.prototype.slice.call(arguments,1),i.apply(this,s)}else if(isObject(i))for(s=Array.prototype.slice.call(arguments,1),o=i.slice(),n=o.length,r=0;r<n;r++)o[r].apply(this,s);return!0},EventEmitter.prototype.addListener=function(e,t){var i;if(!isFunction(t))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,isFunction(t.listener)?t.listener:t),this._events[e]?isObject(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,isObject(this._events[e])&&!this._events[e].warned&&(i=isUndefined(this._maxListeners)?EventEmitter.defaultMaxListeners:this._maxListeners)&&i>0&&this._events[e].length>i&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace()),this},EventEmitter.prototype.on=EventEmitter.prototype.addListener,EventEmitter.prototype.once=function(e,t){function i(){this.removeListener(e,i),n||(n=!0,t.apply(this,arguments))}if(!isFunction(t))throw TypeError("listener must be a function");var n=!1;return i.listener=t,this.on(e,i),this},EventEmitter.prototype.removeListener=function(e,t){var i,n,s,r;if(!isFunction(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(i=this._events[e],s=i.length,n=-1,
  i===t||isFunction(i.listener)&&i.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(isObject(i)){for(r=s;r-- >0;)if(i[r]===t||i[r].listener&&i[r].listener===t){n=r;break}if(n<0)return this;1===i.length?(i.length=0,delete this._events[e]):i.splice(n,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},EventEmitter.prototype.removeAllListeners=function(e){var t,i;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(i=this._events[e],isFunction(i))this.removeListener(e,i);else if(i)for(;i.length;)this.removeListener(e,i[i.length-1]);return delete this._events[e],this},EventEmitter.prototype.listeners=function(e){return this._events&&this._events[e]?isFunction(this._events[e])?[this._events[e]]:this._events[e].slice():[]},EventEmitter.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(isFunction(t))return 1;if(t)return t.length}return 0},EventEmitter.listenerCount=function(e,t){return e.listenerCount(t)}},{}],15:[function(require,module,exports){function format(e){var r=/(%?)(%([jds]))/g,t=Array.prototype.slice.call(arguments,1);return t.length&&(e=e.replace(r,function(e,r,a,n){var s=t.shift();switch(n){case"s":s=""+s;break;case"d":s=Number(s);break;case"j":s=JSON.stringify(s)}return r?(t.unshift(s),e):s})),t.length&&(e+=" "+t.join(" ")),""+(e=e.replace(/%{2,2}/g,"%"))}module.exports=format},{}],16:[function(require,module,exports){function validateParams(t){if("string"==typeof t&&(t=url.parse(t)),t.protocol||(t.protocol="https:"),"https:"!==t.protocol)throw new Error('Protocol "'+t.protocol+'" not supported. Expected "https:"');return t}var http=require("http"),url=require("url"),https=module.exports;for(var key in http)http.hasOwnProperty(key)&&(https[key]=http[key]);https.request=function(t,r){return t=validateParams(t),http.request.call(this,t,r)},https.get=function(t,r){return t=validateParams(t),http.get.call(this,t,r)}},{http:91,url:99}],17:[function(require,module,exports){exports.read=function(a,o,t,r,h){var M,p,w=8*h-r-1,f=(1<<w)-1,e=f>>1,i=-7,N=t?h-1:0,n=t?-1:1,s=a[o+N];for(N+=n,M=s&(1<<-i)-1,s>>=-i,i+=w;i>0;M=256*M+a[o+N],N+=n,i-=8);for(p=M&(1<<-i)-1,M>>=-i,i+=r;i>0;p=256*p+a[o+N],N+=n,i-=8);if(0===M)M=1-e;else{if(M===f)return p?NaN:1/0*(s?-1:1);p+=Math.pow(2,r),M-=e}return(s?-1:1)*p*Math.pow(2,M-r)},exports.write=function(a,o,t,r,h,M){var p,w,f,e=8*M-h-1,i=(1<<e)-1,N=i>>1,n=23===h?Math.pow(2,-24)-Math.pow(2,-77):0,s=r?0:M-1,u=r?1:-1,l=o<0||0===o&&1/o<0?1:0;for(o=Math.abs(o),isNaN(o)||o===1/0?(w=isNaN(o)?1:0,p=i):(p=Math.floor(Math.log(o)/Math.LN2),o*(f=Math.pow(2,-p))<1&&(p--,f*=2),o+=p+N>=1?n/f:n*Math.pow(2,1-N),o*f>=2&&(p++,f/=2),p+N>=i?(w=0,p=i):p+N>=1?(w=(o*f-1)*Math.pow(2,h),p+=N):(w=o*Math.pow(2,N-1)*Math.pow(2,h),p=0));h>=8;a[t+s]=255&w,s+=u,w/=256,h-=8);for(p=p<<h|w,e+=h;e>0;a[t+s]=255&p,s+=u,p/=256,e-=8);a[t+s-u]|=128*l}},{}],18:[function(require,module,exports){"function"==typeof Object.create?module.exports=function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:module.exports=function(t,e){t.super_=e;var o=function(){};o.prototype=e.prototype,t.prototype=new o,t.prototype.constructor=t}},{}],19:[function(require,module,exports){/*!
   * Determine if an object is a Buffer
   *
   * @author   Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
   * @license  MIT
   */
  function isBuffer(f){return!!f.constructor&&"function"==typeof f.constructor.isBuffer&&f.constructor.isBuffer(f)}function isSlowBuffer(f){return"function"==typeof f.readFloatLE&&"function"==typeof f.slice&&isBuffer(f.slice(0,0))}module.exports=function(f){return null!=f&&(isBuffer(f)||isSlowBuffer(f)||!!f._isBuffer)}},{}],20:[function(require,module,exports){var toString={}.toString;module.exports=Array.isArray||function(r){return"[object Array]"==toString.call(r)}},{}],21:[function(require,module,exports){"use strict";var yaml=require("./lib/js-yaml.js");module.exports=yaml},{"./lib/js-yaml.js":22}],22:[function(require,module,exports){"use strict";function deprecated(e){return function(){throw new Error("Function "+e+" is deprecated and cannot be used.")}}var loader=require("./js-yaml/loader"),dumper=require("./js-yaml/dumper");module.exports.Type=require("./js-yaml/type"),module.exports.Schema=require("./js-yaml/schema"),module.exports.FAILSAFE_SCHEMA=require("./js-yaml/schema/failsafe"),module.exports.JSON_SCHEMA=require("./js-yaml/schema/json"),module.exports.CORE_SCHEMA=require("./js-yaml/schema/core"),module.exports.DEFAULT_SAFE_SCHEMA=require("./js-yaml/schema/default_safe"),module.exports.DEFAULT_FULL_SCHEMA=require("./js-yaml/schema/default_full"),module.exports.load=loader.load,module.exports.loadAll=loader.loadAll,module.exports.safeLoad=loader.safeLoad,module.exports.safeLoadAll=loader.safeLoadAll,module.exports.dump=dumper.dump,module.exports.safeDump=dumper.safeDump,module.exports.YAMLException=require("./js-yaml/exception"),module.exports.MINIMAL_SCHEMA=require("./js-yaml/schema/failsafe"),module.exports.SAFE_SCHEMA=require("./js-yaml/schema/default_safe"),module.exports.DEFAULT_SCHEMA=require("./js-yaml/schema/default_full"),module.exports.scan=deprecated("scan"),module.exports.parse=deprecated("parse"),module.exports.compose=deprecated("compose"),module.exports.addConstructor=deprecated("addConstructor")},{"./js-yaml/dumper":24,"./js-yaml/exception":25,"./js-yaml/loader":26,"./js-yaml/schema":28,"./js-yaml/schema/core":29,"./js-yaml/schema/default_full":30,"./js-yaml/schema/default_safe":31,"./js-yaml/schema/failsafe":32,"./js-yaml/schema/json":33,"./js-yaml/type":34}],23:[function(require,module,exports){"use strict";function isNothing(e){return void 0===e||null===e}function isObject(e){return"object"==typeof e&&null!==e}function toArray(e){return Array.isArray(e)?e:isNothing(e)?[]:[e]}function extend(e,t){var r,o,n,i;if(t)for(i=Object.keys(t),r=0,o=i.length;r<o;r+=1)n=i[r],e[n]=t[n];return e}function repeat(e,t){var r,o="";for(r=0;r<t;r+=1)o+=e;return o}function isNegativeZero(e){return 0===e&&Number.NEGATIVE_INFINITY===1/e}module.exports.isNothing=isNothing,module.exports.isObject=isObject,module.exports.toArray=toArray,module.exports.repeat=repeat,module.exports.isNegativeZero=isNegativeZero,module.exports.extend=extend},{}],24:[function(require,module,exports){"use strict";function compileStyleMap(e,t){var n,i,r,E,o,l,a;if(null===t)return{};for(n={},i=Object.keys(t),r=0,E=i.length;r<E;r+=1)o=i[r],l=String(t[o]),"!!"===o.slice(0,2)&&(o="tag:yaml.org,2002:"+o.slice(2)),a=e.compiledTypeMap.fallback[o],a&&_hasOwnProperty.call(a.styleAliases,l)&&(l=a.styleAliases[l]),n[o]=l;return n}function encodeHex(e){var t,n,i;if(t=e.toString(16).toUpperCase(),e<=255)n="x",i=2;else if(e<=65535)n="u",i=4;else{if(!(e<=4294967295))throw new YAMLException("code point within a string may not be greater than 0xFFFFFFFF");n="U",i=8}return"\\"+n+common.repeat("0",i-t.length)+t}function State(e){this.schema=e.schema||DEFAULT_FULL_SCHEMA,this.indent=Math.max(1,e.indent||2),this.skipInvalid=e.skipInvalid||!1,this.flowLevel=common.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=compileStyleMap(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.noRefs=e.noRefs||!1,this.noCompatMode=e.noCompatMode||!1,this.condenseFlow=e.condenseFlow||!1,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function indentString(e,t){for(var n,i=common.repeat(" ",t),r=0,E=-1,o="",l=e.length;r<l;)E=e.indexOf("\n",r),-1===E?(n=e.slice(r),r=l):(n=e.slice(r,E+1),r=E+1),n.length&&"\n"!==n&&(o+=i),o+=n;return o}function generateNextLine(e,t){return"\n"+common.repeat(" ",e.indent*t)}function testImplicitResolving(e,t){var n,i,r;for(n=0,i=e.implicitTypes.length;n<i;n+=1)if(r=e.implicitTypes[n],r.resolve(t))return!0;return!1}function isWhitespace(e){return e===CHAR_SPACE||e===CHAR_TAB}function isPrintable(e){return 32<=e&&e<=126||161<=e&&e<=55295&&8232!==e&&8233!==e||57344<=e&&e<=65533&&65279!==e||65536<=e&&e<=1114111}function isPlainSafe(e){return isPrintable(e)&&65279!==e&&e!==CHAR_COMMA&&e!==CHAR_LEFT_SQUARE_BRACKET&&e!==CHAR_RIGHT_SQUARE_BRACKET&&e!==CHAR_LEFT_CURLY_BRACKET&&e!==CHAR_RIGHT_CURLY_BRACKET&&e!==CHAR_COLON&&e!==CHAR_SHARP}function isPlainSafeFirst(e){return isPrintable(e)&&65279!==e&&!isWhitespace(e)&&e!==CHAR_MINUS&&e!==CHAR_QUESTION&&e!==CHAR_COLON&&e!==CHAR_COMMA&&e!==CHAR_LEFT_SQUARE_BRACKET&&e!==CHAR_RIGHT_SQUARE_BRACKET&&e!==CHAR_LEFT_CURLY_BRACKET&&e!==CHAR_RIGHT_CURLY_BRACKET&&e!==CHAR_SHARP&&e!==CHAR_AMPERSAND&&e!==CHAR_ASTERISK&&e!==CHAR_EXCLAMATION&&e!==CHAR_VERTICAL_LINE&&e!==CHAR_GREATER_THAN&&e!==CHAR_SINGLE_QUOTE&&e!==CHAR_DOUBLE_QUOTE&&e!==CHAR_PERCENT&&e!==CHAR_COMMERCIAL_AT&&e!==CHAR_GRAVE_ACCENT}function chooseScalarStyle(e,t,n,i,r){var E,o,l=!1,a=!1,s=-1!==i,c=-1,A=isPlainSafeFirst(e.charCodeAt(0))&&!isWhitespace(e.charCodeAt(e.length-1));if(t)for(E=0;E<e.length;E++){if(o=e.charCodeAt(E),!isPrintable(o))return STYLE_DOUBLE;A=A&&isPlainSafe(o)}else{for(E=0;E<e.length;E++){if((o=e.charCodeAt(E))===CHAR_LINE_FEED)l=!0,s&&(a=a||E-c-1>i&&" "!==e[c+1],c=E);else if(!isPrintable(o))return STYLE_DOUBLE;A=A&&isPlainSafe(o)}a=a||s&&E-c-1>i&&" "!==e[c+1]}return l||a?" "===e[0]&&n>9?STYLE_DOUBLE:a?STYLE_FOLDED:STYLE_LITERAL:A&&!r(e)?STYLE_PLAIN:STYLE_SINGLE}function writeScalar(e,t,n,i){e.dump=function(){function r(t){return testImplicitResolving(e,t)}if(0===t.length)return"''";if(!e.noCompatMode&&-1!==DEPRECATED_BOOLEANS_SYNTAX.indexOf(t))return"'"+t+"'";var E=e.indent*Math.max(1,n),o=-1===e.lineWidth?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-E),l=i||e.flowLevel>-1&&n>=e.flowLevel;switch(chooseScalarStyle(t,l,e.indent,o,r)){case STYLE_PLAIN:return t;case STYLE_SINGLE:return"'"+t.replace(/'/g,"''")+"'";case STYLE_LITERAL:return"|"+blockHeader(t,e.indent)+dropEndingNewline(indentString(t,E));case STYLE_FOLDED:return">"+blockHeader(t,e.indent)+dropEndingNewline(indentString(foldString(t,o),E));case STYLE_DOUBLE:return'"'+escapeString(t,o)+'"';default:throw new YAMLException("impossible error: invalid scalar style")}}()}function blockHeader(e,t){var n=" "===e[0]?String(t):"",i="\n"===e[e.length-1];return n+(!i||"\n"!==e[e.length-2]&&"\n"!==e?i?"":"-":"+")+"\n"}function dropEndingNewline(e){return"\n"===e[e.length-1]?e.slice(0,-1):e}function foldString(e,t){for(var n,i,r=/(\n+)([^\n]*)/g,E=function(){var n=e.indexOf("\n");return n=-1!==n?n:e.length,r.lastIndex=n,foldLine(e.slice(0,n),t)}(),o="\n"===e[0]||" "===e[0];i=r.exec(e);){var l=i[1],a=i[2];n=" "===a[0],E+=l+(o||n||""===a?"":"\n")+foldLine(a,t),o=n}return E}function foldLine(e,t){if(""===e||" "===e[0])return e;for(var n,i,r=/ [^ ]/g,E=0,o=0,l=0,a="";n=r.exec(e);)l=n.index,l-E>t&&(i=o>E?o:l,a+="\n"+e.slice(E,i),E=i+1),o=l;return a+="\n",e.length-E>t&&o>E?a+=e.slice(E,o)+"\n"+e.slice(o+1):a+=e.slice(E),a.slice(1)}function escapeString(e){for(var t,n,i,r="",E=0;E<e.length;E++)t=e.charCodeAt(E),t>=55296&&t<=56319&&(n=e.charCodeAt(E+1))>=56320&&n<=57343?(r+=encodeHex(1024*(t-55296)+n-56320+65536),E++):(i=ESCAPE_SEQUENCES[t],r+=!i&&isPrintable(t)?e[E]:i||encodeHex(t));return r}function writeFlowSequence(e,t,n){var i,r,E="",o=e.tag;for(i=0,r=n.length;i<r;i+=1)writeNode(e,t,n[i],!1,!1)&&(0!==i&&(E+=","+(e.condenseFlow?"":" ")),E+=e.dump);e.tag=o,e.dump="["+E+"]"}function writeBlockSequence(e,t,n,i){var r,E,o="",l=e.tag;for(r=0,E=n.length;r<E;r+=1)writeNode(e,t+1,n[r],!0,!0)&&(i&&0===r||(o+=generateNextLine(e,t)),e.dump&&CHAR_LINE_FEED===e.dump.charCodeAt(0)?o+="-":o+="- ",o+=e.dump);e.tag=l,e.dump=o||"[]"}function writeFlowMapping(e,t,n){var i,r,E,o,l,a="",s=e.tag,c=Object.keys(n);for(i=0,r=c.length;i<r;i+=1)l=e.condenseFlow?'"':"",0!==i&&(l+=", "),E=c[i],o=n[E],writeNode(e,t,E,!1,!1)&&(e.dump.length>1024&&(l+="? "),l+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),writeNode(e,t,o,!1,!1)&&(l+=e.dump,a+=l));e.tag=s,e.dump="{"+a+"}"}function writeBlockMapping(e,t,n,i){var r,E,o,l,a,s,c="",A=e.tag,u=Object.keys(n);if(!0===e.sortKeys)u.sort();else if("function"==typeof e.sortKeys)u.sort(e.sortKeys);else if(e.sortKeys)throw new YAMLException("sortKeys must be a boolean or a function");for(r=0,E=u.length;r<E;r+=1)s="",i&&0===r||(s+=generateNextLine(e,t)),o=u[r],l=n[o],writeNode(e,t+1,o,!0,!0,!0)&&(a=null!==e.tag&&"?"!==e.tag||e.dump&&e.dump.length>1024,a&&(e.dump&&CHAR_LINE_FEED===e.dump.charCodeAt(0)?s+="?":s+="? "),s+=e.dump,a&&(s+=generateNextLine(e,t)),writeNode(e,t+1,l,!0,a)&&(e.dump&&CHAR_LINE_FEED===e.dump.charCodeAt(0)?s+=":":s+=": ",s+=e.dump,c+=s));e.tag=A,e.dump=c||"{}"}function detectType(e,t,n){var i,r,E,o,l,a;for(r=n?e.explicitTypes:e.implicitTypes,E=0,o=r.length;E<o;E+=1)if(l=r[E],(l.instanceOf||l.predicate)&&(!l.instanceOf||"object"==typeof t&&t instanceof l.instanceOf)&&(!l.predicate||l.predicate(t))){if(e.tag=n?l.tag:"?",l.represent){if(a=e.styleMap[l.tag]||l.defaultStyle,"[object Function]"===_toString.call(l.represent))i=l.represent(t,a);else{if(!_hasOwnProperty.call(l.represent,a))throw new YAMLException("!<"+l.tag+'> tag resolver accepts not "'+a+'" style');i=l.represent[a](t,a)}e.dump=i}return!0}return!1}function writeNode(e,t,n,i,r,E){e.tag=null,e.dump=n,detectType(e,n,!1)||detectType(e,n,!0);var o=_toString.call(e.dump);i&&(i=e.flowLevel<0||e.flowLevel>t);var l,a,s="[object Object]"===o||"[object Array]"===o;if(s&&(l=e.duplicates.indexOf(n),a=-1!==l),(null!==e.tag&&"?"!==e.tag||a||2!==e.indent&&t>0)&&(r=!1),a&&e.usedDuplicates[l])e.dump="*ref_"+l;else{if(s&&a&&!e.usedDuplicates[l]&&(e.usedDuplicates[l]=!0),"[object Object]"===o)i&&0!==Object.keys(e.dump).length?(writeBlockMapping(e,t,e.dump,r),a&&(e.dump="&ref_"+l+e.dump)):(writeFlowMapping(e,t,e.dump),a&&(e.dump="&ref_"+l+" "+e.dump));else if("[object Array]"===o)i&&0!==e.dump.length?(writeBlockSequence(e,t,e.dump,r),a&&(e.dump="&ref_"+l+e.dump)):(writeFlowSequence(e,t,e.dump),a&&(e.dump="&ref_"+l+" "+e.dump));else{if("[object String]"!==o){if(e.skipInvalid)return!1;throw new YAMLException("unacceptable kind of an object to dump "+o)}"?"!==e.tag&&writeScalar(e,e.dump,t,E)}null!==e.tag&&"?"!==e.tag&&(e.dump="!<"+e.tag+"> "+e.dump)}return!0}function getDuplicateReferences(e,t){var n,i,r=[],E=[];for(inspectNode(e,r,E),n=0,i=E.length;n<i;n+=1)t.duplicates.push(r[E[n]]);t.usedDuplicates=new Array(i)}function inspectNode(e,t,n){var i,r,E;if(null!==e&&"object"==typeof e)if(-1!==(r=t.indexOf(e)))-1===n.indexOf(r)&&n.push(r);else if(t.push(e),Array.isArray(e))for(r=0,E=e.length;r<E;r+=1)inspectNode(e[r],t,n);else for(i=Object.keys(e),r=0,E=i.length;r<E;r+=1)inspectNode(e[i[r]],t,n)}function dump(e,t){t=t||{};var n=new State(t);return n.noRefs||getDuplicateReferences(e,n),writeNode(n,0,e,!0,!0)?n.dump+"\n":""}function safeDump(e,t){return dump(e,common.extend({schema:DEFAULT_SAFE_SCHEMA},t))}var common=require("./common"),YAMLException=require("./exception"),DEFAULT_FULL_SCHEMA=require("./schema/default_full"),DEFAULT_SAFE_SCHEMA=require("./schema/default_safe"),_toString=Object.prototype.toString,_hasOwnProperty=Object.prototype.hasOwnProperty,CHAR_TAB=9,CHAR_LINE_FEED=10,CHAR_SPACE=32,CHAR_EXCLAMATION=33,CHAR_DOUBLE_QUOTE=34,CHAR_SHARP=35,CHAR_PERCENT=37,CHAR_AMPERSAND=38,CHAR_SINGLE_QUOTE=39,CHAR_ASTERISK=42,CHAR_COMMA=44,CHAR_MINUS=45,CHAR_COLON=58,CHAR_GREATER_THAN=62,CHAR_QUESTION=63,CHAR_COMMERCIAL_AT=64,CHAR_LEFT_SQUARE_BRACKET=91,CHAR_RIGHT_SQUARE_BRACKET=93,CHAR_GRAVE_ACCENT=96,CHAR_LEFT_CURLY_BRACKET=123,CHAR_VERTICAL_LINE=124,CHAR_RIGHT_CURLY_BRACKET=125,ESCAPE_SEQUENCES={};ESCAPE_SEQUENCES[0]="\\0",ESCAPE_SEQUENCES[7]="\\a",ESCAPE_SEQUENCES[8]="\\b",ESCAPE_SEQUENCES[9]="\\t",ESCAPE_SEQUENCES[10]="\\n",ESCAPE_SEQUENCES[11]="\\v",ESCAPE_SEQUENCES[12]="\\f",ESCAPE_SEQUENCES[13]="\\r",ESCAPE_SEQUENCES[27]="\\e",ESCAPE_SEQUENCES[34]='\\"',ESCAPE_SEQUENCES[92]="\\\\",ESCAPE_SEQUENCES[133]="\\N",ESCAPE_SEQUENCES[160]="\\_",ESCAPE_SEQUENCES[8232]="\\L",ESCAPE_SEQUENCES[8233]="\\P";var DEPRECATED_BOOLEANS_SYNTAX=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],STYLE_PLAIN=1,STYLE_SINGLE=2,STYLE_LITERAL=3,STYLE_FOLDED=4,STYLE_DOUBLE=5;module.exports.dump=dump,module.exports.safeDump=safeDump},{"./common":23,"./exception":25,"./schema/default_full":30,"./schema/default_safe":31}],25:[function(require,module,exports){"use strict";function YAMLException(t,r){Error.call(this),this.name="YAMLException",this.reason=t,this.mark=r,this.message=(this.reason||"(unknown reason)")+(this.mark?" "+this.mark.toString():""),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack||""}YAMLException.prototype=Object.create(Error.prototype),YAMLException.prototype.constructor=YAMLException,YAMLException.prototype.toString=function(t){var r=this.name+": ";return r+=this.reason||"(unknown reason)",!t&&this.mark&&(r+=" "+this.mark.toString()),r},module.exports=YAMLException},{}],26:[function(require,module,exports){"use strict";function is_EOL(e){return 10===e||13===e}function is_WHITE_SPACE(e){return 9===e||32===e}function is_WS_OR_EOL(e){return 9===e||32===e||10===e||13===e}function is_FLOW_INDICATOR(e){return 44===e||91===e||93===e||123===e||125===e}function fromHexCode(e){var t;return 48<=e&&e<=57?e-48:(t=32|e,97<=t&&t<=102?t-97+10:-1)}function escapedHexLen(e){return 120===e?2:117===e?4:85===e?8:0}function fromDecimalCode(e){return 48<=e&&e<=57?e-48:-1}function simpleEscapeSequence(e){return 48===e?"\0":97===e?"":98===e?"\b":116===e?"\t":9===e?"\t":110===e?"\n":118===e?"\v":102===e?"\f":114===e?"\r":101===e?"":32===e?" ":34===e?'"':47===e?"/":92===e?"\\":78===e?"":95===e?" ":76===e?"\u2028":80===e?"\u2029":""}function charFromCodepoint(e){return e<=65535?String.fromCharCode(e):String.fromCharCode(55296+(e-65536>>10),56320+(e-65536&1023))}function State(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||DEFAULT_FULL_SCHEMA,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.documents=[]}function generateError(e,t){return new YAMLException(t,new Mark(e.filename,e.input,e.position,e.line,e.position-e.lineStart))}function throwError(e,t){throw generateError(e,t)}function throwWarning(e,t){e.onWarning&&e.onWarning.call(null,generateError(e,t))}function captureSegment(e,t,n,i){var o,r,a,s;if(t<n){if(s=e.input.slice(t,n),i)for(o=0,r=s.length;o<r;o+=1)9===(a=s.charCodeAt(o))||32<=a&&a<=1114111||throwError(e,"expected valid JSON character");else PATTERN_NON_PRINTABLE.test(s)&&throwError(e,"the stream contains non-printable characters");e.result+=s}}function mergeMappings(e,t,n,i){var o,r,a,s;for(common.isObject(n)||throwError(e,"cannot merge mappings; the provided source object is unacceptable"),o=Object.keys(n),a=0,s=o.length;a<s;a+=1)r=o[a],_hasOwnProperty.call(t,r)||(t[r]=n[r],i[r]=!0)}function storeMappingPair(e,t,n,i,o,r,a,s){var p,c;if(o=String(o),null===t&&(t={}),"tag:yaml.org,2002:merge"===i)if(Array.isArray(r))for(p=0,c=r.length;p<c;p+=1)mergeMappings(e,t,r[p],n);else mergeMappings(e,t,r,n);else e.json||_hasOwnProperty.call(n,o)||!_hasOwnProperty.call(t,o)||(e.line=a||e.line,e.position=s||e.position,throwError(e,"duplicated mapping key")),t[o]=r,delete n[o];return t}function readLineBreak(e){var t;t=e.input.charCodeAt(e.position),10===t?e.position++:13===t?(e.position++,10===e.input.charCodeAt(e.position)&&e.position++):throwError(e,"a line break is expected"),e.line+=1,e.lineStart=e.position}function skipSeparationSpace(e,t,n){for(var i=0,o=e.input.charCodeAt(e.position);0!==o;){for(;is_WHITE_SPACE(o);)o=e.input.charCodeAt(++e.position);if(t&&35===o)do{o=e.input.charCodeAt(++e.position)}while(10!==o&&13!==o&&0!==o);if(!is_EOL(o))break;for(readLineBreak(e),o=e.input.charCodeAt(e.position),i++,e.lineIndent=0;32===o;)e.lineIndent++,o=e.input.charCodeAt(++e.position)}return-1!==n&&0!==i&&e.lineIndent<n&&throwWarning(e,"deficient indentation"),i}function testDocumentSeparator(e){var t,n=e.position;return!(45!==(t=e.input.charCodeAt(n))&&46!==t||t!==e.input.charCodeAt(n+1)||t!==e.input.charCodeAt(n+2)||(n+=3,0!==(t=e.input.charCodeAt(n))&&!is_WS_OR_EOL(t)))}function writeFoldedLines(e,t){1===t?e.result+=" ":t>1&&(e.result+=common.repeat("\n",t-1))}function readPlainScalar(e,t,n){var i,o,r,a,s,p,c,l,u,d=e.kind,h=e.result;if(u=e.input.charCodeAt(e.position),is_WS_OR_EOL(u)||is_FLOW_INDICATOR(u)||35===u||38===u||42===u||33===u||124===u||62===u||39===u||34===u||37===u||64===u||96===u)return!1;if((63===u||45===u)&&(o=e.input.charCodeAt(e.position+1),is_WS_OR_EOL(o)||n&&is_FLOW_INDICATOR(o)))return!1;for(e.kind="scalar",e.result="",r=a=e.position,s=!1;0!==u;){if(58===u){if(o=e.input.charCodeAt(e.position+1),is_WS_OR_EOL(o)||n&&is_FLOW_INDICATOR(o))break}else if(35===u){if(i=e.input.charCodeAt(e.position-1),is_WS_OR_EOL(i))break}else{if(e.position===e.lineStart&&testDocumentSeparator(e)||n&&is_FLOW_INDICATOR(u))break;if(is_EOL(u)){if(p=e.line,c=e.lineStart,l=e.lineIndent,skipSeparationSpace(e,!1,-1),e.lineIndent>=t){s=!0,u=e.input.charCodeAt(e.position);continue}e.position=a,e.line=p,e.lineStart=c,e.lineIndent=l;break}}s&&(captureSegment(e,r,a,!1),writeFoldedLines(e,e.line-p),r=a=e.position,s=!1),is_WHITE_SPACE(u)||(a=e.position+1),u=e.input.charCodeAt(++e.position)}return captureSegment(e,r,a,!1),!!e.result||(e.kind=d,e.result=h,!1)}function readSingleQuotedScalar(e,t){var n,i,o;if(39!==(n=e.input.charCodeAt(e.position)))return!1;for(e.kind="scalar",e.result="",e.position++,i=o=e.position;0!==(n=e.input.charCodeAt(e.position));)if(39===n){if(captureSegment(e,i,e.position,!0),39!==(n=e.input.charCodeAt(++e.position)))return!0;i=e.position,e.position++,o=e.position}else is_EOL(n)?(captureSegment(e,i,o,!0),writeFoldedLines(e,skipSeparationSpace(e,!1,t)),i=o=e.position):e.position===e.lineStart&&testDocumentSeparator(e)?throwError(e,"unexpected end of the document within a single quoted scalar"):(e.position++,o=e.position);throwError(e,"unexpected end of the stream within a single quoted scalar")}function readDoubleQuotedScalar(e,t){var n,i,o,r,a,s;if(34!==(s=e.input.charCodeAt(e.position)))return!1;for(e.kind="scalar",e.result="",e.position++,n=i=e.position;0!==(s=e.input.charCodeAt(e.position));){if(34===s)return captureSegment(e,n,e.position,!0),e.position++,!0;if(92===s){if(captureSegment(e,n,e.position,!0),s=e.input.charCodeAt(++e.position),is_EOL(s))skipSeparationSpace(e,!1,t);else if(s<256&&simpleEscapeCheck[s])e.result+=simpleEscapeMap[s],e.position++;else if((a=escapedHexLen(s))>0){for(o=a,r=0;o>0;o--)s=e.input.charCodeAt(++e.position),(a=fromHexCode(s))>=0?r=(r<<4)+a:throwError(e,"expected hexadecimal character");e.result+=charFromCodepoint(r),e.position++}else throwError(e,"unknown escape sequence");n=i=e.position}else is_EOL(s)?(captureSegment(e,n,i,!0),writeFoldedLines(e,skipSeparationSpace(e,!1,t)),n=i=e.position):e.position===e.lineStart&&testDocumentSeparator(e)?throwError(e,"unexpected end of the document within a double quoted scalar"):(e.position++,i=e.position)}throwError(e,"unexpected end of the stream within a double quoted scalar")}function readFlowCollection(e,t){var n,i,o,r,a,s,p,c,l,u,d,h=!0,f=e.tag,_=e.anchor,A={};if(91===(d=e.input.charCodeAt(e.position)))r=93,p=!1,i=[];else{if(123!==d)return!1;r=125,p=!0,i={}}for(null!==e.anchor&&(e.anchorMap[e.anchor]=i),d=e.input.charCodeAt(++e.position);0!==d;){if(skipSeparationSpace(e,!0,t),(d=e.input.charCodeAt(e.position))===r)return e.position++,e.tag=f,e.anchor=_,e.kind=p?"mapping":"sequence",e.result=i,!0;h||throwError(e,"missed comma between flow collection entries"),l=c=u=null,a=s=!1,63===d&&(o=e.input.charCodeAt(e.position+1),is_WS_OR_EOL(o)&&(a=s=!0,e.position++,skipSeparationSpace(e,!0,t))),n=e.line,composeNode(e,t,CONTEXT_FLOW_IN,!1,!0),l=e.tag,c=e.result,skipSeparationSpace(e,!0,t),d=e.input.charCodeAt(e.position),!s&&e.line!==n||58!==d||(a=!0,d=e.input.charCodeAt(++e.position),skipSeparationSpace(e,!0,t),composeNode(e,t,CONTEXT_FLOW_IN,!1,!0),u=e.result),p?storeMappingPair(e,i,A,l,c,u):a?i.push(storeMappingPair(e,null,A,l,c,u)):i.push(c),skipSeparationSpace(e,!0,t),d=e.input.charCodeAt(e.position),44===d?(h=!0,d=e.input.charCodeAt(++e.position)):h=!1}throwError(e,"unexpected end of the stream within a flow collection")}function readBlockScalar(e,t){var n,i,o,r,a=CHOMPING_CLIP,s=!1,p=!1,c=t,l=0,u=!1;if(124===(r=e.input.charCodeAt(e.position)))i=!1;else{if(62!==r)return!1;i=!0}for(e.kind="scalar",e.result="";0!==r;)if(43===(r=e.input.charCodeAt(++e.position))||45===r)CHOMPING_CLIP===a?a=43===r?CHOMPING_KEEP:CHOMPING_STRIP:throwError(e,"repeat of a chomping mode identifier");else{if(!((o=fromDecimalCode(r))>=0))break;0===o?throwError(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):p?throwError(e,"repeat of an indentation width identifier"):(c=t+o-1,p=!0)}if(is_WHITE_SPACE(r)){do{r=e.input.charCodeAt(++e.position)}while(is_WHITE_SPACE(r));if(35===r)do{r=e.input.charCodeAt(++e.position)}while(!is_EOL(r)&&0!==r)}for(;0!==r;){for(readLineBreak(e),e.lineIndent=0,r=e.input.charCodeAt(e.position);(!p||e.lineIndent<c)&&32===r;)e.lineIndent++,r=e.input.charCodeAt(++e.position);if(!p&&e.lineIndent>c&&(c=e.lineIndent),is_EOL(r))l++;else{if(e.lineIndent<c){a===CHOMPING_KEEP?e.result+=common.repeat("\n",s?1+l:l):a===CHOMPING_CLIP&&s&&(e.result+="\n");break}for(i?is_WHITE_SPACE(r)?(u=!0,e.result+=common.repeat("\n",s?1+l:l)):u?(u=!1,e.result+=common.repeat("\n",l+1)):0===l?s&&(e.result+=" "):e.result+=common.repeat("\n",l):e.result+=common.repeat("\n",s?1+l:l),s=!0,p=!0,l=0,n=e.position;!is_EOL(r)&&0!==r;)r=e.input.charCodeAt(++e.position);captureSegment(e,n,e.position,!1)}}return!0}function readBlockSequence(e,t){var n,i,o,r=e.tag,a=e.anchor,s=[],p=!1;for(null!==e.anchor&&(e.anchorMap[e.anchor]=s),o=e.input.charCodeAt(e.position);0!==o&&45===o&&(i=e.input.charCodeAt(e.position+1),is_WS_OR_EOL(i));)if(p=!0,e.position++,skipSeparationSpace(e,!0,-1)&&e.lineIndent<=t)s.push(null),o=e.input.charCodeAt(e.position);else if(n=e.line,composeNode(e,t,CONTEXT_BLOCK_IN,!1,!0),s.push(e.result),skipSeparationSpace(e,!0,-1),o=e.input.charCodeAt(e.position),(e.line===n||e.lineIndent>t)&&0!==o)throwError(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break;return!!p&&(e.tag=r,e.anchor=a,e.kind="sequence",e.result=s,!0)}function readBlockMapping(e,t,n){var i,o,r,a,s,p=e.tag,c=e.anchor,l={},u={},d=null,h=null,f=null,_=!1,A=!1;for(null!==e.anchor&&(e.anchorMap[e.anchor]=l),s=e.input.charCodeAt(e.position);0!==s;){if(i=e.input.charCodeAt(e.position+1),r=e.line,a=e.position,63!==s&&58!==s||!is_WS_OR_EOL(i)){if(!composeNode(e,n,CONTEXT_FLOW_OUT,!1,!0))break;if(e.line===r){for(s=e.input.charCodeAt(e.position);is_WHITE_SPACE(s);)s=e.input.charCodeAt(++e.position);if(58===s)s=e.input.charCodeAt(++e.position),is_WS_OR_EOL(s)||throwError(e,"a whitespace character is expected after the key-value separator within a block mapping"),_&&(storeMappingPair(e,l,u,d,h,null),d=h=f=null),A=!0,_=!1,o=!1,d=e.tag,h=e.result;else{if(!A)return e.tag=p,e.anchor=c,!0;throwError(e,"can not read an implicit mapping pair; a colon is missed")}}else{if(!A)return e.tag=p,e.anchor=c,!0;throwError(e,"can not read a block mapping entry; a multiline key may not be an implicit key")}}else 63===s?(_&&(storeMappingPair(e,l,u,d,h,null),d=h=f=null),A=!0,_=!0,o=!0):_?(_=!1,o=!0):throwError(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,s=i;if((e.line===r||e.lineIndent>t)&&(composeNode(e,t,CONTEXT_BLOCK_OUT,!0,o)&&(_?h=e.result:f=e.result),_||(storeMappingPair(e,l,u,d,h,f,r,a),d=h=f=null),skipSeparationSpace(e,!0,-1),s=e.input.charCodeAt(e.position)),e.lineIndent>t&&0!==s)throwError(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return _&&storeMappingPair(e,l,u,d,h,null),A&&(e.tag=p,e.anchor=c,e.kind="mapping",e.result=l),A}function readTagProperty(e){var t,n,i,o,r=!1,a=!1;if(33!==(o=e.input.charCodeAt(e.position)))return!1;if(null!==e.tag&&throwError(e,"duplication of a tag property"),o=e.input.charCodeAt(++e.position),60===o?(r=!0,o=e.input.charCodeAt(++e.position)):33===o?(a=!0,n="!!",o=e.input.charCodeAt(++e.position)):n="!",t=e.position,r){do{o=e.input.charCodeAt(++e.position)}while(0!==o&&62!==o);e.position<e.length?(i=e.input.slice(t,e.position),o=e.input.charCodeAt(++e.position)):throwError(e,"unexpected end of the stream within a verbatim tag")}else{for(;0!==o&&!is_WS_OR_EOL(o);)33===o&&(a?throwError(e,"tag suffix cannot contain exclamation marks"):(n=e.input.slice(t-1,e.position+1),PATTERN_TAG_HANDLE.test(n)||throwError(e,"named tag handle cannot contain such characters"),a=!0,t=e.position+1)),o=e.input.charCodeAt(++e.position);i=e.input.slice(t,e.position),PATTERN_FLOW_INDICATORS.test(i)&&throwError(e,"tag suffix cannot contain flow indicator characters")}return i&&!PATTERN_TAG_URI.test(i)&&throwError(e,"tag name cannot contain such characters: "+i),r?e.tag=i:_hasOwnProperty.call(e.tagMap,n)?e.tag=e.tagMap[n]+i:"!"===n?e.tag="!"+i:"!!"===n?e.tag="tag:yaml.org,2002:"+i:throwError(e,'undeclared tag handle "'+n+'"'),!0}function readAnchorProperty(e){var t,n;if(38!==(n=e.input.charCodeAt(e.position)))return!1;for(null!==e.anchor&&throwError(e,"duplication of an anchor property"),n=e.input.charCodeAt(++e.position),t=e.position;0!==n&&!is_WS_OR_EOL(n)&&!is_FLOW_INDICATOR(n);)n=e.input.charCodeAt(++e.position);return e.position===t&&throwError(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}function readAlias(e){var t,n,i;if(42!==(i=e.input.charCodeAt(e.position)))return!1;for(i=e.input.charCodeAt(++e.position),t=e.position;0!==i&&!is_WS_OR_EOL(i)&&!is_FLOW_INDICATOR(i);)i=e.input.charCodeAt(++e.position);return e.position===t&&throwError(e,"name of an alias node must contain at least one character"),n=e.input.slice(t,e.position),e.anchorMap.hasOwnProperty(n)||throwError(e,'unidentified alias "'+n+'"'),e.result=e.anchorMap[n],skipSeparationSpace(e,!0,-1),!0}function composeNode(e,t,n,i,o){var r,a,s,p,c,l,u,d,h=1,f=!1,_=!1;if(null!==e.listener&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,r=a=s=CONTEXT_BLOCK_OUT===n||CONTEXT_BLOCK_IN===n,i&&skipSeparationSpace(e,!0,-1)&&(f=!0,e.lineIndent>t?h=1:e.lineIndent===t?h=0:e.lineIndent<t&&(h=-1)),1===h)for(;readTagProperty(e)||readAnchorProperty(e);)skipSeparationSpace(e,!0,-1)?(f=!0,s=r,e.lineIndent>t?h=1:e.lineIndent===t?h=0:e.lineIndent<t&&(h=-1)):s=!1;if(s&&(s=f||o),1!==h&&CONTEXT_BLOCK_OUT!==n||(u=CONTEXT_FLOW_IN===n||CONTEXT_FLOW_OUT===n?t:t+1,d=e.position-e.lineStart,1===h?s&&(readBlockSequence(e,d)||readBlockMapping(e,d,u))||readFlowCollection(e,u)?_=!0:(a&&readBlockScalar(e,u)||readSingleQuotedScalar(e,u)||readDoubleQuotedScalar(e,u)?_=!0:readAlias(e)?(_=!0,null===e.tag&&null===e.anchor||throwError(e,"alias node should not have any properties")):readPlainScalar(e,u,CONTEXT_FLOW_IN===n)&&(_=!0,null===e.tag&&(e.tag="?")),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):0===h&&(_=s&&readBlockSequence(e,d))),null!==e.tag&&"!"!==e.tag)if("?"===e.tag){for(p=0,c=e.implicitTypes.length;p<c;p+=1)if(l=e.implicitTypes[p],l.resolve(e.result)){e.result=l.construct(e.result),e.tag=l.tag,null!==e.anchor&&(e.anchorMap[e.anchor]=e.result);break}}else _hasOwnProperty.call(e.typeMap[e.kind||"fallback"],e.tag)?(l=e.typeMap[e.kind||"fallback"][e.tag],null!==e.result&&l.kind!==e.kind&&throwError(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+l.kind+'", not "'+e.kind+'"'),l.resolve(e.result)?(e.result=l.construct(e.result),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):throwError(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")):throwError(e,"unknown tag !<"+e.tag+">");return null!==e.listener&&e.listener("close",e),null!==e.tag||null!==e.anchor||_}function readDocument(e){var t,n,i,o,r=e.position,a=!1;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap={},e.anchorMap={};0!==(o=e.input.charCodeAt(e.position))&&(skipSeparationSpace(e,!0,-1),o=e.input.charCodeAt(e.position),!(e.lineIndent>0||37!==o));){for(a=!0,o=e.input.charCodeAt(++e.position),t=e.position;0!==o&&!is_WS_OR_EOL(o);)o=e.input.charCodeAt(++e.position);for(n=e.input.slice(t,e.position),i=[],n.length<1&&throwError(e,"directive name must not be less than one character in length");0!==o;){for(;is_WHITE_SPACE(o);)o=e.input.charCodeAt(++e.position);if(35===o){do{o=e.input.charCodeAt(++e.position)}while(0!==o&&!is_EOL(o));break}if(is_EOL(o))break;for(t=e.position;0!==o&&!is_WS_OR_EOL(o);)o=e.input.charCodeAt(++e.position);i.push(e.input.slice(t,e.position))}0!==o&&readLineBreak(e),_hasOwnProperty.call(directiveHandlers,n)?directiveHandlers[n](e,n,i):throwWarning(e,'unknown document directive "'+n+'"')}if(skipSeparationSpace(e,!0,-1),0===e.lineIndent&&45===e.input.charCodeAt(e.position)&&45===e.input.charCodeAt(e.position+1)&&45===e.input.charCodeAt(e.position+2)?(e.position+=3,skipSeparationSpace(e,!0,-1)):a&&throwError(e,"directives end mark is expected"),composeNode(e,e.lineIndent-1,CONTEXT_BLOCK_OUT,!1,!0),skipSeparationSpace(e,!0,-1),e.checkLineBreaks&&PATTERN_NON_ASCII_LINE_BREAKS.test(e.input.slice(r,e.position))&&throwWarning(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&testDocumentSeparator(e))return void(46===e.input.charCodeAt(e.position)&&(e.position+=3,skipSeparationSpace(e,!0,-1)));e.position<e.length-1&&throwError(e,"end of the stream or a document separator is expected")}function loadDocuments(e,t){e=String(e),t=t||{},0!==e.length&&(10!==e.charCodeAt(e.length-1)&&13!==e.charCodeAt(e.length-1)&&(e+="\n"),65279===e.charCodeAt(0)&&(e=e.slice(1)));var n=new State(e,t);for(n.input+="\0";32===n.input.charCodeAt(n.position);)n.lineIndent+=1,n.position+=1;for(;n.position<n.length-1;)readDocument(n);return n.documents}function loadAll(e,t,n){var i,o,r=loadDocuments(e,n);if("function"!=typeof t)return r;for(i=0,o=r.length;i<o;i+=1)t(r[i])}function load(e,t){var n=loadDocuments(e,t);if(0!==n.length){if(1===n.length)return n[0];throw new YAMLException("expected a single document in the stream, but found more")}}function safeLoadAll(e,t,n){if("function"!=typeof t)return loadAll(e,common.extend({schema:DEFAULT_SAFE_SCHEMA},n));loadAll(e,t,common.extend({schema:DEFAULT_SAFE_SCHEMA},n))}function safeLoad(e,t){return load(e,common.extend({schema:DEFAULT_SAFE_SCHEMA},t))}
  for(var common=require("./common"),YAMLException=require("./exception"),Mark=require("./mark"),DEFAULT_SAFE_SCHEMA=require("./schema/default_safe"),DEFAULT_FULL_SCHEMA=require("./schema/default_full"),_hasOwnProperty=Object.prototype.hasOwnProperty,CONTEXT_FLOW_IN=1,CONTEXT_FLOW_OUT=2,CONTEXT_BLOCK_IN=3,CONTEXT_BLOCK_OUT=4,CHOMPING_CLIP=1,CHOMPING_STRIP=2,CHOMPING_KEEP=3,PATTERN_NON_PRINTABLE=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,PATTERN_NON_ASCII_LINE_BREAKS=/[\x85\u2028\u2029]/,PATTERN_FLOW_INDICATORS=/[,\[\]\{\}]/,PATTERN_TAG_HANDLE=/^(?:!|!!|![a-z\-]+!)$/i,PATTERN_TAG_URI=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i,simpleEscapeCheck=new Array(256),simpleEscapeMap=new Array(256),i=0;i<256;i++)simpleEscapeCheck[i]=simpleEscapeSequence(i)?1:0,simpleEscapeMap[i]=simpleEscapeSequence(i);var directiveHandlers={YAML:function(e,t,n){var i,o,r;null!==e.version&&throwError(e,"duplication of %YAML directive"),1!==n.length&&throwError(e,"YAML directive accepts exactly one argument"),i=/^([0-9]+)\.([0-9]+)$/.exec(n[0]),null===i&&throwError(e,"ill-formed argument of the YAML directive"),o=parseInt(i[1],10),r=parseInt(i[2],10),1!==o&&throwError(e,"unacceptable YAML version of the document"),e.version=n[0],e.checkLineBreaks=r<2,1!==r&&2!==r&&throwWarning(e,"unsupported YAML version of the document")},TAG:function(e,t,n){var i,o;2!==n.length&&throwError(e,"TAG directive accepts exactly two arguments"),i=n[0],o=n[1],PATTERN_TAG_HANDLE.test(i)||throwError(e,"ill-formed tag handle (first argument) of the TAG directive"),_hasOwnProperty.call(e.tagMap,i)&&throwError(e,'there is a previously declared suffix for "'+i+'" tag handle'),PATTERN_TAG_URI.test(o)||throwError(e,"ill-formed tag prefix (second argument) of the TAG directive"),e.tagMap[i]=o}};module.exports.loadAll=loadAll,module.exports.load=load,module.exports.safeLoadAll=safeLoadAll,module.exports.safeLoad=safeLoad},{"./common":23,"./exception":25,"./mark":27,"./schema/default_full":30,"./schema/default_safe":31}],27:[function(require,module,exports){"use strict";function Mark(t,i,n,e,r){this.name=t,this.buffer=i,this.position=n,this.line=e,this.column=r}var common=require("./common");Mark.prototype.getSnippet=function(t,i){var n,e,r,o,s;if(!this.buffer)return null;for(t=t||4,i=i||75,n="",e=this.position;e>0&&-1==="\0\r\n\u2028\u2029".indexOf(this.buffer.charAt(e-1));)if(e-=1,this.position-e>i/2-1){n=" ... ",e+=5;break}for(r="",o=this.position;o<this.buffer.length&&-1==="\0\r\n\u2028\u2029".indexOf(this.buffer.charAt(o));)if((o+=1)-this.position>i/2-1){r=" ... ",o-=5;break}return s=this.buffer.slice(e,o),common.repeat(" ",t)+n+s+r+"\n"+common.repeat(" ",t+this.position-e+n.length)+"^"},Mark.prototype.toString=function(t){var i,n="";return this.name&&(n+='in "'+this.name+'" '),n+="at line "+(this.line+1)+", column "+(this.column+1),t||(i=this.getSnippet())&&(n+=":\n"+i),n},module.exports=Mark},{"./common":23}],28:[function(require,module,exports){"use strict";function compileList(i,e,t){var c=[];return i.include.forEach(function(i){t=compileList(i,e,t)}),i[e].forEach(function(i){t.forEach(function(e,t){e.tag===i.tag&&e.kind===i.kind&&c.push(t)}),t.push(i)}),t.filter(function(i,e){return-1===c.indexOf(e)})}function compileMap(){function i(i){c[i.kind][i.tag]=c.fallback[i.tag]=i}var e,t,c={scalar:{},sequence:{},mapping:{},fallback:{}};for(e=0,t=arguments.length;e<t;e+=1)arguments[e].forEach(i);return c}function Schema(i){this.include=i.include||[],this.implicit=i.implicit||[],this.explicit=i.explicit||[],this.implicit.forEach(function(i){if(i.loadKind&&"scalar"!==i.loadKind)throw new YAMLException("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.")}),this.compiledImplicit=compileList(this,"implicit",[]),this.compiledExplicit=compileList(this,"explicit",[]),this.compiledTypeMap=compileMap(this.compiledImplicit,this.compiledExplicit)}var common=require("./common"),YAMLException=require("./exception"),Type=require("./type");Schema.DEFAULT=null,Schema.create=function(){var i,e;switch(arguments.length){case 1:i=Schema.DEFAULT,e=arguments[0];break;case 2:i=arguments[0],e=arguments[1];break;default:throw new YAMLException("Wrong number of arguments for Schema.create function")}if(i=common.toArray(i),e=common.toArray(e),!i.every(function(i){return i instanceof Schema}))throw new YAMLException("Specified list of super schemas (or a single Schema object) contains a non-Schema object.");if(!e.every(function(i){return i instanceof Type}))throw new YAMLException("Specified list of YAML types (or a single Type object) contains a non-Type object.");return new Schema({include:i,explicit:e})},module.exports=Schema},{"./common":23,"./exception":25,"./type":34}],29:[function(require,module,exports){"use strict";var Schema=require("../schema");module.exports=new Schema({include:[require("./json")]})},{"../schema":28,"./json":33}],30:[function(require,module,exports){"use strict";var Schema=require("../schema");module.exports=Schema.DEFAULT=new Schema({include:[require("./default_safe")],explicit:[require("../type/js/undefined"),require("../type/js/regexp"),require("../type/js/function")]})},{"../schema":28,"../type/js/function":39,"../type/js/regexp":40,"../type/js/undefined":41,"./default_safe":31}],31:[function(require,module,exports){"use strict";var Schema=require("../schema");module.exports=new Schema({include:[require("./core")],implicit:[require("../type/timestamp"),require("../type/merge")],explicit:[require("../type/binary"),require("../type/omap"),require("../type/pairs"),require("../type/set")]})},{"../schema":28,"../type/binary":35,"../type/merge":43,"../type/omap":45,"../type/pairs":46,"../type/set":48,"../type/timestamp":50,"./core":29}],32:[function(require,module,exports){"use strict";var Schema=require("../schema");module.exports=new Schema({explicit:[require("../type/str"),require("../type/seq"),require("../type/map")]})},{"../schema":28,"../type/map":42,"../type/seq":47,"../type/str":49}],33:[function(require,module,exports){"use strict";var Schema=require("../schema");module.exports=new Schema({include:[require("./failsafe")],implicit:[require("../type/null"),require("../type/bool"),require("../type/int"),require("../type/float")]})},{"../schema":28,"../type/bool":36,"../type/float":37,"../type/int":38,"../type/null":44,"./failsafe":32}],34:[function(require,module,exports){"use strict";function compileStyleAliases(e){var t={};return null!==e&&Object.keys(e).forEach(function(n){e[n].forEach(function(e){t[String(e)]=n})}),t}function Type(e,t){if(t=t||{},Object.keys(t).forEach(function(t){if(-1===TYPE_CONSTRUCTOR_OPTIONS.indexOf(t))throw new YAMLException('Unknown option "'+t+'" is met in definition of "'+e+'" YAML type.')}),this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(e){return e},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.defaultStyle=t.defaultStyle||null,this.styleAliases=compileStyleAliases(t.styleAliases||null),-1===YAML_NODE_KINDS.indexOf(this.kind))throw new YAMLException('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}var YAMLException=require("./exception"),TYPE_CONSTRUCTOR_OPTIONS=["kind","resolve","construct","instanceOf","predicate","represent","defaultStyle","styleAliases"],YAML_NODE_KINDS=["scalar","sequence","mapping"];module.exports=Type},{"./exception":25}],35:[function(require,module,exports){"use strict";function resolveYamlBinary(r){if(null===r)return!1;var e,n,u=0,f=r.length,t=BASE64_MAP;for(n=0;n<f;n++)if(!((e=t.indexOf(r.charAt(n)))>64)){if(e<0)return!1;u+=6}return u%8==0}function constructYamlBinary(r){var e,n,u=r.replace(/[\r\n=]/g,""),f=u.length,t=BASE64_MAP,a=0,i=[];for(e=0;e<f;e++)e%4==0&&e&&(i.push(a>>16&255),i.push(a>>8&255),i.push(255&a)),a=a<<6|t.indexOf(u.charAt(e));return n=f%4*6,0===n?(i.push(a>>16&255),i.push(a>>8&255),i.push(255&a)):18===n?(i.push(a>>10&255),i.push(a>>2&255)):12===n&&i.push(a>>4&255),NodeBuffer?NodeBuffer.from?NodeBuffer.from(i):new NodeBuffer(i):i}function representYamlBinary(r){var e,n,u="",f=0,t=r.length,a=BASE64_MAP;for(e=0;e<t;e++)e%3==0&&e&&(u+=a[f>>18&63],u+=a[f>>12&63],u+=a[f>>6&63],u+=a[63&f]),f=(f<<8)+r[e];return n=t%3,0===n?(u+=a[f>>18&63],u+=a[f>>12&63],u+=a[f>>6&63],u+=a[63&f]):2===n?(u+=a[f>>10&63],u+=a[f>>4&63],u+=a[f<<2&63],u+=a[64]):1===n&&(u+=a[f>>2&63],u+=a[f<<4&63],u+=a[64],u+=a[64]),u}function isBinary(r){return NodeBuffer&&NodeBuffer.isBuffer(r)}var NodeBuffer;try{var _require=require;NodeBuffer=_require("buffer").Buffer}catch(r){}var Type=require("../type"),BASE64_MAP="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";module.exports=new Type("tag:yaml.org,2002:binary",{kind:"scalar",resolve:resolveYamlBinary,construct:constructYamlBinary,predicate:isBinary,represent:representYamlBinary})},{"../type":34}],36:[function(require,module,exports){"use strict";function resolveYamlBoolean(e){if(null===e)return!1;var r=e.length;return 4===r&&("true"===e||"True"===e||"TRUE"===e)||5===r&&("false"===e||"False"===e||"FALSE"===e)}function constructYamlBoolean(e){return"true"===e||"True"===e||"TRUE"===e}function isBoolean(e){return"[object Boolean]"===Object.prototype.toString.call(e)}var Type=require("../type");module.exports=new Type("tag:yaml.org,2002:bool",{kind:"scalar",resolve:resolveYamlBoolean,construct:constructYamlBoolean,predicate:isBoolean,represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"})},{"../type":34}],37:[function(require,module,exports){"use strict";function resolveYamlFloat(e){return null!==e&&!(!YAML_FLOAT_PATTERN.test(e)||"_"===e[e.length-1])}function constructYamlFloat(e){var r,t,a,n;return r=e.replace(/_/g,"").toLowerCase(),t="-"===r[0]?-1:1,n=[],"+-".indexOf(r[0])>=0&&(r=r.slice(1)),".inf"===r?1===t?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===r?NaN:r.indexOf(":")>=0?(r.split(":").forEach(function(e){n.unshift(parseFloat(e,10))}),r=0,a=1,n.forEach(function(e){r+=e*a,a*=60}),t*r):t*parseFloat(r,10)}function representYamlFloat(e,r){var t;if(isNaN(e))switch(r){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(r){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(r){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(common.isNegativeZero(e))return"-0.0";return t=e.toString(10),SCIENTIFIC_WITHOUT_DOT.test(t)?t.replace("e",".e"):t}function isFloat(e){return"[object Number]"===Object.prototype.toString.call(e)&&(e%1!=0||common.isNegativeZero(e))}var common=require("../common"),Type=require("../type"),YAML_FLOAT_PATTERN=new RegExp("^(?:[-+]?(?:0|[1-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),SCIENTIFIC_WITHOUT_DOT=/^[-+]?[0-9]+e/;module.exports=new Type("tag:yaml.org,2002:float",{kind:"scalar",resolve:resolveYamlFloat,construct:constructYamlFloat,predicate:isFloat,represent:representYamlFloat,defaultStyle:"lowercase"})},{"../common":23,"../type":34}],38:[function(require,module,exports){"use strict";function isHexCode(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}function isOctCode(e){return 48<=e&&e<=55}function isDecCode(e){return 48<=e&&e<=57}function resolveYamlInteger(e){if(null===e)return!1;var r,t=e.length,n=0,i=!1;if(!t)return!1;if(r=e[n],"-"!==r&&"+"!==r||(r=e[++n]),"0"===r){if(n+1===t)return!0;if("b"===(r=e[++n])){for(n++;n<t;n++)if("_"!==(r=e[n])){if("0"!==r&&"1"!==r)return!1;i=!0}return i&&"_"!==r}if("x"===r){for(n++;n<t;n++)if("_"!==(r=e[n])){if(!isHexCode(e.charCodeAt(n)))return!1;i=!0}return i&&"_"!==r}for(;n<t;n++)if("_"!==(r=e[n])){if(!isOctCode(e.charCodeAt(n)))return!1;i=!0}return i&&"_"!==r}if("_"===r)return!1;for(;n<t;n++)if("_"!==(r=e[n])){if(":"===r)break;if(!isDecCode(e.charCodeAt(n)))return!1;i=!0}return!(!i||"_"===r)&&(":"!==r||/^(:[0-5]?[0-9])+$/.test(e.slice(n)))}function constructYamlInteger(e){var r,t,n=e,i=1,o=[];return-1!==n.indexOf("_")&&(n=n.replace(/_/g,"")),r=n[0],"-"!==r&&"+"!==r||("-"===r&&(i=-1),n=n.slice(1),r=n[0]),"0"===n?0:"0"===r?"b"===n[1]?i*parseInt(n.slice(2),2):"x"===n[1]?i*parseInt(n,16):i*parseInt(n,8):-1!==n.indexOf(":")?(n.split(":").forEach(function(e){o.unshift(parseInt(e,10))}),n=0,t=1,o.forEach(function(e){n+=e*t,t*=60}),i*n):i*parseInt(n,10)}function isInteger(e){return"[object Number]"===Object.prototype.toString.call(e)&&e%1==0&&!common.isNegativeZero(e)}var common=require("../common"),Type=require("../type");module.exports=new Type("tag:yaml.org,2002:int",{kind:"scalar",resolve:resolveYamlInteger,construct:constructYamlInteger,predicate:isInteger,represent:{binary:function(e){return"0b"+e.toString(2)},octal:function(e){return"0"+e.toString(8)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return"0x"+e.toString(16).toUpperCase()}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}})},{"../common":23,"../type":34}],39:[function(require,module,exports){"use strict";function resolveJavascriptFunction(e){if(null===e)return!1;try{var r="("+e+")",n=esprima.parse(r,{range:!0});return"Program"===n.type&&1===n.body.length&&"ExpressionStatement"===n.body[0].type&&"FunctionExpression"===n.body[0].expression.type}catch(e){return!1}}function constructJavascriptFunction(e){var r,n="("+e+")",t=esprima.parse(n,{range:!0}),o=[];if("Program"!==t.type||1!==t.body.length||"ExpressionStatement"!==t.body[0].type||"FunctionExpression"!==t.body[0].expression.type)throw new Error("Failed to resolve function");return t.body[0].expression.params.forEach(function(e){o.push(e.name)}),r=t.body[0].expression.body.range,new Function(o,n.slice(r[0]+1,r[1]-1))}function representJavascriptFunction(e){return e.toString()}function isFunction(e){return"[object Function]"===Object.prototype.toString.call(e)}var esprima;try{var _require=require;esprima=_require("esprima")}catch(e){"undefined"!=typeof window&&(esprima=window.esprima)}var Type=require("../../type");module.exports=new Type("tag:yaml.org,2002:js/function",{kind:"scalar",resolve:resolveJavascriptFunction,construct:constructJavascriptFunction,predicate:isFunction,represent:representJavascriptFunction})},{"../../type":34}],40:[function(require,module,exports){"use strict";function resolveJavascriptRegExp(e){if(null===e)return!1;if(0===e.length)return!1;var r=e,t=/\/([gim]*)$/.exec(e),n="";if("/"===r[0]){if(t&&(n=t[1]),n.length>3)return!1;if("/"!==r[r.length-n.length-1])return!1}return!0}function constructJavascriptRegExp(e){var r=e,t=/\/([gim]*)$/.exec(e),n="";return"/"===r[0]&&(t&&(n=t[1]),r=r.slice(1,r.length-n.length-1)),new RegExp(r,n)}function representJavascriptRegExp(e){var r="/"+e.source+"/";return e.global&&(r+="g"),e.multiline&&(r+="m"),e.ignoreCase&&(r+="i"),r}function isRegExp(e){return"[object RegExp]"===Object.prototype.toString.call(e)}var Type=require("../../type");module.exports=new Type("tag:yaml.org,2002:js/regexp",{kind:"scalar",resolve:resolveJavascriptRegExp,construct:constructJavascriptRegExp,predicate:isRegExp,represent:representJavascriptRegExp})},{"../../type":34}],41:[function(require,module,exports){"use strict";function resolveJavascriptUndefined(){return!0}function constructJavascriptUndefined(){}function representJavascriptUndefined(){return""}function isUndefined(e){return void 0===e}var Type=require("../../type");module.exports=new Type("tag:yaml.org,2002:js/undefined",{kind:"scalar",resolve:resolveJavascriptUndefined,construct:constructJavascriptUndefined,predicate:isUndefined,represent:representJavascriptUndefined})},{"../../type":34}],42:[function(require,module,exports){"use strict";var Type=require("../type");module.exports=new Type("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return null!==e?e:{}}})},{"../type":34}],43:[function(require,module,exports){"use strict";function resolveYamlMerge(e){return"<<"===e||null===e}var Type=require("../type");module.exports=new Type("tag:yaml.org,2002:merge",{kind:"scalar",resolve:resolveYamlMerge})},{"../type":34}],44:[function(require,module,exports){"use strict";function resolveYamlNull(l){if(null===l)return!0;var e=l.length;return 1===e&&"~"===l||4===e&&("null"===l||"Null"===l||"NULL"===l)}function constructYamlNull(){return null}function isNull(l){return null===l}var Type=require("../type");module.exports=new Type("tag:yaml.org,2002:null",{kind:"scalar",resolve:resolveYamlNull,construct:constructYamlNull,predicate:isNull,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"}},defaultStyle:"lowercase"})},{"../type":34}],45:[function(require,module,exports){"use strict";function resolveYamlOmap(r){if(null===r)return!0;var t,e,n,o,u,a=[],l=r;for(t=0,e=l.length;t<e;t+=1){if(n=l[t],u=!1,"[object Object]"!==_toString.call(n))return!1;for(o in n)if(_hasOwnProperty.call(n,o)){if(u)return!1;u=!0}if(!u)return!1;if(-1!==a.indexOf(o))return!1;a.push(o)}return!0}function constructYamlOmap(r){return null!==r?r:[]}var Type=require("../type"),_hasOwnProperty=Object.prototype.hasOwnProperty,_toString=Object.prototype.toString;module.exports=new Type("tag:yaml.org,2002:omap",{kind:"sequence",resolve:resolveYamlOmap,construct:constructYamlOmap})},{"../type":34}],46:[function(require,module,exports){"use strict";function resolveYamlPairs(r){if(null===r)return!0;var e,t,n,l,o,a=r;for(o=new Array(a.length),e=0,t=a.length;e<t;e+=1){if(n=a[e],"[object Object]"!==_toString.call(n))return!1;if(l=Object.keys(n),1!==l.length)return!1;o[e]=[l[0],n[l[0]]]}return!0}function constructYamlPairs(r){if(null===r)return[];var e,t,n,l,o,a=r;for(o=new Array(a.length),e=0,t=a.length;e<t;e+=1)n=a[e],l=Object.keys(n),o[e]=[l[0],n[l[0]]];return o}var Type=require("../type"),_toString=Object.prototype.toString;module.exports=new Type("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:resolveYamlPairs,construct:constructYamlPairs})},{"../type":34}],47:[function(require,module,exports){"use strict";var Type=require("../type");module.exports=new Type("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return null!==e?e:[]}})},{"../type":34}],48:[function(require,module,exports){"use strict";function resolveYamlSet(e){if(null===e)return!0;var r,t=e;for(r in t)if(_hasOwnProperty.call(t,r)&&null!==t[r])return!1;return!0}function constructYamlSet(e){return null!==e?e:{}}var Type=require("../type"),_hasOwnProperty=Object.prototype.hasOwnProperty;module.exports=new Type("tag:yaml.org,2002:set",{kind:"mapping",resolve:resolveYamlSet,construct:constructYamlSet})},{"../type":34}],49:[function(require,module,exports){"use strict";var Type=require("../type");module.exports=new Type("tag:yaml.org,2002:str",{kind:"scalar",construct:function(r){return null!==r?r:""}})},{"../type":34}],50:[function(require,module,exports){"use strict";function resolveYamlTimestamp(e){return null!==e&&(null!==YAML_DATE_REGEXP.exec(e)||null!==YAML_TIMESTAMP_REGEXP.exec(e))}function constructYamlTimestamp(e){var t,r,n,l,a,m,s,T,i,E,u=0,o=null;if(t=YAML_DATE_REGEXP.exec(e),null===t&&(t=YAML_TIMESTAMP_REGEXP.exec(e)),null===t)throw new Error("Date resolve error");if(r=+t[1],n=+t[2]-1,l=+t[3],!t[4])return new Date(Date.UTC(r,n,l));if(a=+t[4],m=+t[5],s=+t[6],t[7]){for(u=t[7].slice(0,3);u.length<3;)u+="0";u=+u}return t[9]&&(T=+t[10],i=+(t[11]||0),o=6e4*(60*T+i),"-"===t[9]&&(o=-o)),E=new Date(Date.UTC(r,n,l,a,m,s,u)),o&&E.setTime(E.getTime()-o),E}function representYamlTimestamp(e){return e.toISOString()}var Type=require("../type"),YAML_DATE_REGEXP=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),YAML_TIMESTAMP_REGEXP=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");module.exports=new Type("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:resolveYamlTimestamp,construct:constructYamlTimestamp,instanceOf:Date,represent:representYamlTimestamp})},{"../type":34}],51:[function(require,module,exports){"use strict";function bundle(e,r){debug("Bundling $ref pointers in %s",e.$refs._root$Ref.path);var t=[];crawl(e,"schema",e.$refs._root$Ref.path+"#","#",t,e.$refs,r),remap(t)}function crawl(e,r,t,f,n,i,o){var a=null===r?e:e[r];if(a&&"object"==typeof a)if($Ref.isAllowed$Ref(a))inventory$Ref(e,r,t,f,n,i,o);else{var l=Object.keys(a),u=l.indexOf("definitions");u>0&&l.splice(0,0,l.splice(u,1)[0]),l.forEach(function(e){var r=Pointer.join(t,e),l=Pointer.join(f,e),u=a[e];$Ref.isAllowed$Ref(u)?inventory$Ref(a,e,t,l,n,i,o):crawl(a,e,r,l,n,i,o)})}}function inventory$Ref(e,r,t,f,n,i,o){if(!n.some(function(t){return t.parent===e&&t.key===r})){var a=null===r?e:e[r],l=url.resolve(t,a.$ref),u=i._resolve(l,o),h=Pointer.parse(f).length,s=url.stripHash(u.path),$=url.getHash(u.path),c=s!==i._root$Ref.path,p=$Ref.isExtended$Ref(a);n.push({$ref:a,parent:e,key:r,pathFromRoot:f,depth:h,file:s,hash:$,value:u.value,circular:u.circular,extended:p,external:c}),crawl(u.value,null,u.path,f,n,i,o)}}function remap(e){e.sort(function(e,r){return e.file!==r.file?e.file<r.file?-1:1:e.hash!==r.hash?e.hash<r.hash?-1:1:e.circular!==r.circular?e.circular?-1:1:e.extended!==r.extended?e.extended?1:-1:e.depth!==r.depth?e.depth-r.depth:r.pathFromRoot.lastIndexOf("/definitions")-e.pathFromRoot.lastIndexOf("/definitions")});var r,t,f;e.forEach(function(e){debug('Re-mapping $ref pointer "%s" at %s',e.$ref.$ref,e.pathFromRoot),e.external?e.file===r&&e.hash===t?e.$ref.$ref=f:e.file===r&&0===e.hash.indexOf(t+"/")?e.$ref.$ref=Pointer.join(f,Pointer.parse(e.hash)):(r=e.file,t=e.hash,f=e.pathFromRoot,e.$ref=e.parent[e.key]=$Ref.dereference(e.$ref,e.value),e.circular&&(e.$ref.$ref=e.pathFromRoot)):e.$ref.$ref=e.hash,debug("    new value: %s",e.$ref&&e.$ref.$ref?e.$ref.$ref:"[object Object]")})}var $Ref=require("./ref"),Pointer=require("./pointer"),debug=require("./util/debug"),url=require("./util/url");module.exports=bundle},{"./pointer":61,"./ref":62,"./util/debug":67,"./util/url":69}],52:[function(require,module,exports){"use strict";function dereference(e,r){debug("Dereferencing $ref pointers in %s",e.$refs._root$Ref.path);var c=crawl(e.schema,e.$refs._root$Ref.path,"#",[],e.$refs,r);e.$refs.circular=c.circular,e.schema=c.value}function crawl(e,r,c,u,f,i){var n,a={value:e,circular:!1};return e&&"object"==typeof e&&(u.push(e),$Ref.isAllowed$Ref(e,i)?(n=dereference$Ref(e,r,c,u,f,i),a.circular=n.circular,a.value=n.value):Object.keys(e).forEach(function(l){var o=Pointer.join(r,l),t=Pointer.join(c,l),d=e[l],$=!1;$Ref.isAllowed$Ref(d,i)?(n=dereference$Ref(d,o,t,u,f,i),$=n.circular,e[l]=n.value):-1===u.indexOf(d)?(n=crawl(d,o,t,u,f,i),$=n.circular,e[l]=n.value):$=foundCircularReference(o,f,i),a.circular=a.circular||$}),u.pop()),a}function dereference$Ref(e,r,c,u,f,i){debug('Dereferencing $ref pointer "%s" at %s',e.$ref,r);var n=url.resolve(r,e.$ref),a=f._resolve(n,i),l=a.circular,o=l||-1!==u.indexOf(a.value);o&&foundCircularReference(r,f,i);var t=$Ref.dereference(e,a.value);if(!o){var d=crawl(t,a.path,c,u,f,i);o=d.circular,t=d.value}return o&&!l&&"ignore"===i.dereference.circular&&(t=e),l&&(t.$ref=c),{circular:o,value:t}}function foundCircularReference(e,r,c){if(r.circular=!0,!c.dereference.circular)throw ono.reference("Circular $ref pointer found at %s",e);return!0}var $Ref=require("./ref"),Pointer=require("./pointer"),ono=require("ono"),debug=require("./util/debug"),url=require("./util/url");module.exports=dereference},{"./pointer":61,"./ref":62,"./util/debug":67,"./util/url":69,ono:74}],53:[function(require,module,exports){(function(Buffer){"use strict";function $RefParser(){this.schema=null,this.$refs=new $Refs}var Options=require("./options"),$Refs=require("./refs"),parse=require("./parse"),normalizeArgs=require("./normalize-args"),resolveExternal=require("./resolve-external"),bundle=require("./bundle"),dereference=require("./dereference"),url=require("./util/url"),maybe=require("call-me-maybe"),ono=require("ono");module.exports=$RefParser,module.exports.YAML=require("./util/yaml"),$RefParser.parse=function(e,r,t,a){var s=this,n=new s;return n.parse.apply(n,arguments)},$RefParser.prototype.parse=function(e,r,t,a){var s,n=normalizeArgs(arguments);if(!n.path&&!n.schema){var o=ono("Expected a file path, URL, or object. Got %s",n.path||n.schema);return maybe(n.callback,Promise.reject(o))}this.schema=null,this.$refs=new $Refs,url.isFileSystemPath(n.path)&&(n.path=url.fromFileSystemPath(n.path)),n.path=url.resolve(url.cwd(),n.path),n.schema&&"object"==typeof n.schema?(this.$refs._add(n.path,n.schema),s=Promise.resolve(n.schema)):s=parse(n.path,this.$refs,n.options);var i=this;return s.then(function(e){if(!e||"object"!=typeof e||Buffer.isBuffer(e))throw ono.syntax('"%s" is not a valid JSON Schema',i.$refs._root$Ref.path||e);return i.schema=e,maybe(n.callback,Promise.resolve(i.schema))}).catch(function(e){return maybe(n.callback,Promise.reject(e))})},$RefParser.resolve=function(e,r,t,a){var s=this,n=new s;return n.resolve.apply(n,arguments)},$RefParser.prototype.resolve=function(e,r,t,a){var s=this,n=normalizeArgs(arguments);return this.parse(n.path,n.schema,n.options).then(function(){return resolveExternal(s,n.options)}).then(function(){return maybe(n.callback,Promise.resolve(s.$refs))}).catch(function(e){return maybe(n.callback,Promise.reject(e))})},$RefParser.bundle=function(e,r,t,a){var s=this,n=new s;return n.bundle.apply(n,arguments)},$RefParser.prototype.bundle=function(e,r,t,a){var s=this,n=normalizeArgs(arguments);return this.resolve(n.path,n.schema,n.options).then(function(){return bundle(s,n.options),maybe(n.callback,Promise.resolve(s.schema))}).catch(function(e){return maybe(n.callback,Promise.reject(e))})},$RefParser.dereference=function(e,r,t,a){var s=this,n=new s;return n.dereference.apply(n,arguments)},$RefParser.prototype.dereference=function(e,r,t,a){var s=this,n=normalizeArgs(arguments);return this.resolve(n.path,n.schema,n.options).then(function(){return dereference(s,n.options),maybe(n.callback,Promise.resolve(s.schema))}).catch(function(e){return maybe(n.callback,Promise.reject(e))})}}).call(this,{isBuffer:require("../../is-buffer/index.js")})},{"../../is-buffer/index.js":19,"./bundle":51,"./dereference":52,"./normalize-args":54,"./options":55,"./parse":56,"./refs":63,"./resolve-external":64,"./util/url":69,"./util/yaml":70,"call-me-maybe":10,ono:74}],54:[function(require,module,exports){"use strict";function normalizeArgs(o){var t,e,n,r;return o=Array.prototype.slice.call(o),"function"==typeof o[o.length-1]&&(r=o.pop()),"string"==typeof o[0]?(t=o[0],"object"==typeof o[2]?(e=o[1],n=o[2]):(e=void 0,n=o[1])):(t="",e=o[0],n=o[1]),n instanceof Options||(n=new Options(n)),{path:t,schema:e,options:n,callback:r}}var Options=require("./options");module.exports=normalizeArgs},{"./options":55}],55:[function(require,module,exports){"use strict";function $RefParserOptions(e){merge(this,$RefParserOptions.defaults),merge(this,e)}function merge(e,r){if(isMergeable(r))for(var s=Object.keys(r),a=0;a<s.length;a++){var t=s[a],i=r[t],n=e[t];isMergeable(i)?e[t]=merge(n||{},i):void 0!==i&&(e[t]=i)}return e}function isMergeable(e){return e&&"object"==typeof e&&!Array.isArray(e)&&!(e instanceof RegExp)&&!(e instanceof Date)}var jsonParser=require("./parsers/json"),yamlParser=require("./parsers/yaml"),textParser=require("./parsers/text"),binaryParser=require("./parsers/binary"),fileResolver=require("./resolvers/file"),httpResolver=require("./resolvers/http");module.exports=$RefParserOptions,$RefParserOptions.defaults={parse:{json:jsonParser,yaml:yamlParser,text:textParser,binary:binaryParser},resolve:{file:fileResolver,http:httpResolver,external:!0},dereference:{circular:!0}}},{"./parsers/binary":57,"./parsers/json":58,"./parsers/text":59,"./parsers/yaml":60,"./resolvers/file":65,"./resolvers/http":66}],56:[function(require,module,exports){(function(Buffer){"use strict";function parse(r,e,n){try{r=url.stripHash(r);var t=e._add(r),u={url:r,extension:url.getExtension(r)};return readFile(u,n).then(function(r){return t.pathType=r.plugin.name,u.data=r.result,parseFile(u,n)}).then(function(r){return t.value=r.result,r.result})}catch(r){return Promise.reject(r)}}function readFile(r,e){return new Promise(function(n,t){function u(e){t(!e||e instanceof SyntaxError?ono.syntax('Unable to resolve $ref pointer "%s"',r.url):e)}debug("Reading %s",r.url);var s=plugins.all(e.resolve);s=plugins.filter(s,"canRead",r),plugins.sort(s),plugins.run(s,"read",r).then(n,u)})}function parseFile(r,e){return new Promise(function(n,t){function u(e){!e.plugin.allowEmpty&&isEmpty(e.result)?t(ono.syntax('Error parsing "%s" as %s. \nParsed value is empty',r.url,e.plugin.name)):n(e)}function s(e){e?(e=e instanceof Error?e:new Error(e),t(ono.syntax(e,"Error parsing %s",r.url))):t(ono.syntax("Unable to parse %s",r.url))}debug("Parsing %s",r.url);var i=plugins.all(e.parse),l=plugins.filter(i,"canParse",r),o=l.length>0?l:i;plugins.sort(o),plugins.run(o,"parse",r).then(u,s)})}function isEmpty(r){return void 0===r||"object"==typeof r&&0===Object.keys(r).length||"string"==typeof r&&0===r.trim().length||Buffer.isBuffer(r)&&0===r.length}var ono=require("ono"),debug=require("./util/debug"),url=require("./util/url"),plugins=require("./util/plugins");module.exports=parse}).call(this,{isBuffer:require("../../is-buffer/index.js")})},{"../../is-buffer/index.js":19,"./util/debug":67,"./util/plugins":68,"./util/url":69,ono:74}],57:[function(require,module,exports){(function(Buffer){"use strict";var BINARY_REGEXP=/\.(jpeg|jpg|gif|png|bmp|ico)$/i;module.exports={order:400,allowEmpty:!0,canParse:function(r){return Buffer.isBuffer(r.data)&&BINARY_REGEXP.test(r.url)},parse:function(r){return Buffer.isBuffer(r.data)?r.data:new Buffer(r.data)}}}).call(this,require("buffer").Buffer)},{buffer:8}],58:[function(require,module,exports){(function(Buffer){"use strict";module.exports={order:100,allowEmpty:!0,canParse:".json",parse:function(r){return new Promise(function(e,t){var n=r.data;Buffer.isBuffer(n)&&(n=n.toString()),e("string"==typeof n?0===n.trim().length?void 0:JSON.parse(n):n)})}}}).call(this,{isBuffer:require("../../../is-buffer/index.js")})},{"../../../is-buffer/index.js":19}],59:[function(require,module,exports){(function(Buffer){"use strict";var TEXT_REGEXP=/\.(txt|htm|html|md|xml|js|min|map|css|scss|less|svg)$/i;module.exports={order:300,allowEmpty:!0,encoding:"utf8",canParse:function(t){return("string"==typeof t.data||Buffer.isBuffer(t.data))&&TEXT_REGEXP.test(t.url)},parse:function(t){if("string"==typeof t.data)return t.data;if(Buffer.isBuffer(t.data))return t.data.toString(this.encoding);throw new Error("data is not text")}}}).call(this,{isBuffer:require("../../../is-buffer/index.js")})},{"../../../is-buffer/index.js":19}],60:[function(require,module,exports){(function(Buffer){"use strict";var YAML=require("../util/yaml");module.exports={order:200,allowEmpty:!0,canParse:[".yaml",".yml",".json"],parse:function(r){return new Promise(function(e,t){var a=r.data;Buffer.isBuffer(a)&&(a=a.toString()),e("string"==typeof a?YAML.parse(a):a)})}}}).call(this,{isBuffer:require("../../../is-buffer/index.js")})},{"../../../is-buffer/index.js":19,"../util/yaml":70}],61:[function(require,module,exports){"use strict";function Pointer(e,r){this.$ref=e,this.path=r,this.value=void 0,this.circular=!1}function resolveIf$Ref(e,r){if($Ref.isAllowed$Ref(e.value,r)){var t=url.resolve(e.path,e.value.$ref);if(t!==e.path){
  var s=e.$ref.$refs._resolve(t,r);return $Ref.isExtended$Ref(e.value)?(e.value=$Ref.dereference(e.value,s.value),!1):(e.$ref=s.$ref,e.path=s.path,e.value=s.value,!0)}e.circular=!0}}function setValue(e,r,t){if(!e.value||"object"!=typeof e.value)throw ono.syntax('Error assigning $ref pointer "%s". \nCannot set "%s" of a non-object.',e.path,r);return"-"===r&&Array.isArray(e.value)?e.value.push(t):e.value[r]=t,t}module.exports=Pointer;var $Ref=require("./ref"),url=require("./util/url"),ono=require("ono"),slashes=/\//g,tildes=/~/g,escapedSlash=/~1/g,escapedTilde=/~0/g;Pointer.prototype.resolve=function(e,r){var t=Pointer.parse(this.path);this.value=e;for(var s=0;s<t.length;s++){resolveIf$Ref(this,r)&&(this.path=Pointer.join(this.path,t.slice(s)));var i=t[s];if(void 0===this.value[i]){/*throw ono.syntax('Error resolving $ref pointer "%s". \nToken "%s" does not exist.',this.path,i)*/};this.value=this.value[i]}return resolveIf$Ref(this,r),this},Pointer.prototype.set=function(e,r,t){var s,i=Pointer.parse(this.path);if(0===i.length)return this.value=r,r;this.value=e;for(var a=0;a<i.length-1;a++)resolveIf$Ref(this,t),s=i[a],this.value&&void 0!==this.value[s]?this.value=this.value[s]:this.value=setValue(this,s,{});return resolveIf$Ref(this,t),s=i[i.length-1],setValue(this,s,r),e},Pointer.parse=function(e){var r=url.getHash(e).substr(1);if(!r)return[];r=r.split("/");for(var t=0;t<r.length;t++)r[t]=decodeURI(r[t].replace(escapedSlash,"/").replace(escapedTilde,"~"));if(""!==r[0])throw ono.syntax('Invalid $ref pointer "%s". Pointers must begin with "#/"',r);return r.slice(1)},Pointer.join=function(e,r){-1===e.indexOf("#")&&(e+="#"),r=Array.isArray(r)?r:[r];for(var t=0;t<r.length;t++){var s=r[t];e+="/"+encodeURI(s.replace(tildes,"~0").replace(slashes,"~1"))}return e}},{"./ref":62,"./util/url":69,ono:74}],62:[function(require,module,exports){"use strict";function $Ref(){this.path=void 0,this.value=void 0,this.$refs=void 0,this.pathType=void 0}module.exports=$Ref;var Pointer=require("./pointer");$Ref.prototype.exists=function(e,t){try{return this.resolve(e,t),!0}catch(e){return!1}},$Ref.prototype.get=function(e,t){return this.resolve(e,t).value},$Ref.prototype.resolve=function(e,t){return new Pointer(this,e).resolve(this.value,t)},$Ref.prototype.set=function(e,t){var r=new Pointer(this,e);this.value=r.set(this.value,t)},$Ref.is$Ref=function(e){return e&&"object"==typeof e&&"string"==typeof e.$ref&&e.$ref.length>0},$Ref.isExternal$Ref=function(e){return $Ref.is$Ref(e)&&"#"!==e.$ref[0]},$Ref.isAllowed$Ref=function(e,t){if($Ref.is$Ref(e)){if("#/"===e.$ref.substr(0,2)||"#"===e.$ref)return!0;if("#"!==e.$ref[0]&&(!t||t.resolve.external))return!0}},$Ref.isExtended$Ref=function(e){return $Ref.is$Ref(e)&&Object.keys(e).length>1},$Ref.dereference=function(e,t){if(t&&"object"==typeof t&&$Ref.isExtended$Ref(e)){var r={};return Object.keys(e).forEach(function(t){"$ref"!==t&&(r[t]=e[t])}),Object.keys(t).forEach(function(e){e in r||(r[e]=t[e])}),r}return t}},{"./pointer":61}],63:[function(require,module,exports){"use strict";function $Refs(){this.circular=!1,this._$refs={},this._root$Ref=null}function getPaths(e,r){var t=Object.keys(e);return r=Array.isArray(r[0])?r[0]:Array.prototype.slice.call(r),r.length>0&&r[0]&&(t=t.filter(function(t){return-1!==r.indexOf(e[t].pathType)})),t.map(function(r){return{encoded:r,decoded:"file"===e[r].pathType?url.toFileSystemPath(r,!0):r}})}var ono=require("ono"),$Ref=require("./ref"),url=require("./util/url");module.exports=$Refs,$Refs.prototype.paths=function(e){return getPaths(this._$refs,arguments).map(function(e){return e.decoded})},$Refs.prototype.values=function(e){var r=this._$refs;return getPaths(r,arguments).reduce(function(e,t){return e[t.decoded]=r[t.encoded].value,e},{})},$Refs.prototype.toJSON=$Refs.prototype.values,$Refs.prototype.exists=function(e,r){try{return this._resolve(e,r),!0}catch(e){return!1}},$Refs.prototype.get=function(e,r){return this._resolve(e,r).value},$Refs.prototype.set=function(e,r){e=url.resolve(this._root$Ref.path,e);var t=url.stripHash(e),o=this._$refs[t];if(!o)throw ono('Error resolving $ref pointer "%s". \n"%s" not found.',e,t);o.set(e,r)},$Refs.prototype._add=function(e,r){var t=url.stripHash(e),o=new $Ref;return o.path=t,o.value=r,o.$refs=this,this._$refs[t]=o,this._root$Ref=this._root$Ref||o,o},$Refs.prototype._resolve=function(e,r){e=url.resolve(this._root$Ref.path,e);var t=url.stripHash(e),o=this._$refs[t];if(!o)throw ono('Error resolving $ref pointer "%s". \n"%s" not found.',e,t);return o.resolve(e,r)},$Refs.prototype._get$Ref=function(e){e=url.resolve(this._root$Ref.path,e);var r=url.stripHash(e);return this._$refs[r]}},{"./ref":62,"./util/url":69,ono:74}],64:[function(require,module,exports){"use strict";function resolveExternal(e,r){if(!r.resolve.external)return Promise.resolve();try{debug("Resolving $ref pointers in %s",e.$refs._root$Ref.path);var s=crawl(e.schema,e.$refs._root$Ref.path+"#",e.$refs,r);return Promise.all(s)}catch(e){return Promise.reject(e)}}function crawl(e,r,s,t){var o=[];return e&&"object"==typeof e&&($Ref.isExternal$Ref(e)?o.push(resolve$Ref(e,r,s,t)):Object.keys(e).forEach(function(n){var i=Pointer.join(r,n),l=e[n];$Ref.isExternal$Ref(l)?o.push(resolve$Ref(l,i,s,t)):o=o.concat(crawl(l,i,s,t))})),o}function resolve$Ref(e,r,s,t){debug('Resolving $ref pointer "%s" at %s',e.$ref,r);var o=url.resolve(r,e.$ref),n=url.stripHash(o);return e=s._$refs[n],e?Promise.resolve(e.value):parse(o,s,t).then(function(e){debug("Resolving $ref pointers in %s",n);var r=crawl(e,n+"#",s,t);return Promise.all(r)})}var $Ref=require("./ref"),Pointer=require("./pointer"),parse=require("./parse"),debug=require("./util/debug"),url=require("./util/url");module.exports=resolveExternal},{"./parse":56,"./pointer":61,"./ref":62,"./util/debug":67,"./util/url":69}],65:[function(require,module,exports){"use strict";var fs=require("fs"),ono=require("ono"),url=require("../util/url"),debug=require("../util/debug");module.exports={order:100,canRead:function(r){return url.isFileSystemPath(r.url)},read:function(r){return new Promise(function(e,u){var o;try{o=url.toFileSystemPath(r.url)}catch(e){u(ono.uri(e,"Malformed URI: %s",r.url))}debug("Opening file: %s",o);try{fs.readFile(o,function(r,i){r?u(ono(r,'Error opening file "%s"',o)):e(i)})}catch(r){u(ono(r,'Error opening file "%s"',o))}})}}},{"../util/debug":67,"../util/url":69,fs:7,ono:74}],66:[function(require,module,exports){(function(process,Buffer){"use strict";function download(t,e,o){return new Promise(function(r,n){t=url.parse(t),o=o||[],o.push(t.href),get(t,e).then(function(s){if(s.statusCode>=400)throw ono({status:s.statusCode},"HTTP ERROR %d",s.statusCode);if(s.statusCode>=300)if(o.length>e.redirects)n(ono({status:s.statusCode},"Error downloading %s. \nToo many redirects: \n  %s",o[0],o.join(" \n  ")));else{if(!s.headers.location)throw ono({status:s.statusCode},"HTTP %d redirect with no location header",s.statusCode);debug("HTTP %d redirect %s -> %s",s.statusCode,t.href,s.headers.location);var u=url.resolve(t,s.headers.location);download(u,e,o).then(r,n)}else r(s.body||new Buffer(0))}).catch(function(e){n(ono(e,"Error downloading",t.href))})})}function get(t,e){return new Promise(function(o,r){debug("GET",t.href);var n="https:"===t.protocol?https:http,s=n.get({hostname:t.hostname,port:t.port,path:t.path,auth:t.auth,protocol:t.protocol,headers:e.headers||{},withCredentials:e.withCredentials});"function"==typeof s.setTimeout&&s.setTimeout(e.timeout),s.on("timeout",function(){s.abort()}),s.on("error",r),s.once("response",function(t){t.body=new Buffer(0),t.on("data",function(e){t.body=Buffer.concat([t.body,new Buffer(e)])}),t.on("error",r),t.on("end",function(){o(t)})})})}var http=require("http"),https=require("https"),ono=require("ono"),url=require("../util/url"),debug=require("../util/debug");module.exports={order:200,headers:null,timeout:5e3,redirects:5,withCredentials:!1,canRead:function(t){return url.isHttp(t.url)},read:function(t){var e=url.parse(t.url);return process.browser&&!e.protocol&&(e.protocol=url.parse(location.href).protocol),download(e,this)}}}).call(this,require("_process"),require("buffer").Buffer)},{"../util/debug":67,"../util/url":69,_process:76,buffer:8,http:91,https:16,ono:74}],67:[function(require,module,exports){"use strict";var debug=require("debug");module.exports=debug("json-schema-ref-parser")},{debug:12}],68:[function(require,module,exports){"use strict";function getResult(e,t,r,n){var u=e[t];if("function"==typeof u)return u.apply(e,[r,n]);if(!n){if(u instanceof RegExp)return u.test(r.url);if("string"==typeof u)return u===r.extension;if(Array.isArray(u))return-1!==u.indexOf(r.extension)}return u}var debug=require("./debug");exports.all=function(e){return Object.keys(e).filter(function(t){return"object"==typeof e[t]}).map(function(t){return e[t].name=t,e[t]})},exports.filter=function(e,t,r){return e.filter(function(e){return!!getResult(e,t,r)})},exports.sort=function(e){return e.forEach(function(e){e.order=e.order||Number.MAX_SAFE_INTEGER}),e.sort(function(e,t){return e.order-t.order})},exports.run=function(e,t,r){var n,u,o=0;return new Promise(function(i,f){function s(){if(!(n=e[o++]))return f(u);try{debug("  %s",n.name);var i=getResult(n,t,r,c);i&&"function"==typeof i.then?i.then(a,p):void 0!==i&&a(i)}catch(e){p(e)}}function c(e,t){e?p(e):a(t)}function a(e){debug("    success"),i({plugin:n,result:e})}function p(e){debug("    %s",e.message||e),u=e,s()}s()})}},{"./debug":67}],69:[function(require,module,exports){(function(process){"use strict";var isWindows=/^win/.test(process.platform),forwardSlashPattern=/\//g,protocolPattern=/^([a-z0-9.+-]+):\/\//i,url=module.exports,urlEncodePatterns=[/\?/g,"%3F",/\#/g,"%23",isWindows?/\\/g:/\//,"/"],urlDecodePatterns=[/\%23/g,"#",/\%24/g,"$",/\%26/g,"&",/\%2C/g,",",/\%40/g,"@"];exports.parse=require("url").parse,exports.resolve=require("url").resolve,exports.cwd=function(){return process.browser?location.href:process.cwd()+"/"},exports.getProtocol=function(r){var e=protocolPattern.exec(r);if(e)return e[1].toLowerCase()},exports.getExtension=function(r){var e=r.lastIndexOf(".");return e>=0?r.substr(e).toLowerCase():""},exports.getHash=function(r){var e=r.indexOf("#");return e>=0?r.substr(e):"#"},exports.stripHash=function(r){var e=r.indexOf("#");return e>=0&&(r=r.substr(0,e)),r},exports.isHttp=function(r){var e=url.getProtocol(r);return"http"===e||"https"===e||void 0===e&&process.browser},exports.isFileSystemPath=function(r){if(process.browser)return!1;var e=url.getProtocol(r);return void 0===e||"file"===e},exports.fromFileSystemPath=function(r){for(var e=0;e<urlEncodePatterns.length;e+=2)r=r.replace(urlEncodePatterns[e],urlEncodePatterns[e+1]);return encodeURI(r)},exports.toFileSystemPath=function(r,e){r=decodeURI(r);for(var t=0;t<urlDecodePatterns.length;t+=2)r=r.replace(urlDecodePatterns[t],urlDecodePatterns[t+1]);var o="file://"===r.substr(0,7).toLowerCase();return o&&(r="/"===r[7]?r.substr(8):r.substr(7),isWindows&&"/"===r[1]&&(r=r[0]+":"+r.substr(1)),e?r="file:///"+r:(o=!1,r=isWindows?r:"/"+r)),isWindows&&!o&&(r=r.replace(forwardSlashPattern,"\\")),r}}).call(this,require("_process"))},{_process:76,url:99}],70:[function(require,module,exports){"use strict";var yaml=require("js-yaml"),ono=require("ono");module.exports={parse:function(r,e){try{return yaml.safeLoad(r)}catch(r){throw r instanceof Error?r:ono(r,r.message)}},stringify:function(r,e,o){try{var t=("string"==typeof o?o.length:o)||2;return yaml.safeDump(r,{indent:t})}catch(r){throw r instanceof Error?r:ono(r,r.message)}}}},{"js-yaml":21,ono:74}],71:[function(require,module,exports){(function(global){function getValue(t,e){return null==t?void 0:t[e]}function isHostObject(t){var e=!1;if(null!=t&&"function"!=typeof t.toString)try{e=!!(t+"")}catch(t){}return e}function Hash(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var a=t[e];this.set(a[0],a[1])}}function hashClear(){this.__data__=nativeCreate?nativeCreate(null):{}}function hashDelete(t){return this.has(t)&&delete this.__data__[t]}function hashGet(t){var e=this.__data__;if(nativeCreate){var r=e[t];return r===HASH_UNDEFINED?void 0:r}return hasOwnProperty.call(e,t)?e[t]:void 0}function hashHas(t){var e=this.__data__;return nativeCreate?void 0!==e[t]:hasOwnProperty.call(e,t)}function hashSet(t,e){return this.__data__[t]=nativeCreate&&void 0===e?HASH_UNDEFINED:e,this}function ListCache(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var a=t[e];this.set(a[0],a[1])}}function listCacheClear(){this.__data__=[]}function listCacheDelete(t){var e=this.__data__,r=assocIndexOf(e,t);return!(r<0)&&(r==e.length-1?e.pop():splice.call(e,r,1),!0)}function listCacheGet(t){var e=this.__data__,r=assocIndexOf(e,t);return r<0?void 0:e[r][1]}function listCacheHas(t){return assocIndexOf(this.__data__,t)>-1}function listCacheSet(t,e){var r=this.__data__,a=assocIndexOf(r,t);return a<0?r.push([t,e]):r[a][1]=e,this}function MapCache(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var a=t[e];this.set(a[0],a[1])}}function mapCacheClear(){this.__data__={hash:new Hash,map:new(Map||ListCache),string:new Hash}}function mapCacheDelete(t){return getMapData(this,t).delete(t)}function mapCacheGet(t){return getMapData(this,t).get(t)}function mapCacheHas(t){return getMapData(this,t).has(t)}function mapCacheSet(t,e){return getMapData(this,t).set(t,e),this}function assocIndexOf(t,e){for(var r=t.length;r--;)if(eq(t[r][0],e))return r;return-1}function baseGet(t,e){e=isKey(e,t)?[e]:castPath(e);for(var r=0,a=e.length;null!=t&&r<a;)t=t[toKey(e[r++])];return r&&r==a?t:void 0}function baseIsNative(t){return!(!isObject(t)||isMasked(t))&&(isFunction(t)||isHostObject(t)?reIsNative:reIsHostCtor).test(toSource(t))}function baseToString(t){if("string"==typeof t)return t;if(isSymbol(t))return symbolToString?symbolToString.call(t):"";var e=t+"";return"0"==e&&1/t==-INFINITY?"-0":e}function castPath(t){return isArray(t)?t:stringToPath(t)}function getMapData(t,e){var r=t.__data__;return isKeyable(e)?r["string"==typeof e?"string":"hash"]:r.map}function getNative(t,e){var r=getValue(t,e);return baseIsNative(r)?r:void 0}function isKey(t,e){if(isArray(t))return!1;var r=typeof t;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=t&&!isSymbol(t))||(reIsPlainProp.test(t)||!reIsDeepProp.test(t)||null!=e&&t in Object(e))}function isKeyable(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}function isMasked(t){return!!maskSrcKey&&maskSrcKey in t}function toKey(t){if("string"==typeof t||isSymbol(t))return t;var e=t+"";return"0"==e&&1/t==-INFINITY?"-0":e}function toSource(t){if(null!=t){try{return funcToString.call(t)}catch(t){}try{return t+""}catch(t){}}return""}function memoize(t,e){if("function"!=typeof t||e&&"function"!=typeof e)throw new TypeError(FUNC_ERROR_TEXT);var r=function(){var a=arguments,o=e?e.apply(this,a):a[0],n=r.cache;if(n.has(o))return n.get(o);var i=t.apply(this,a);return r.cache=n.set(o,i),i};return r.cache=new(memoize.Cache||MapCache),r}function eq(t,e){return t===e||t!==t&&e!==e}function isFunction(t){var e=isObject(t)?objectToString.call(t):"";return e==funcTag||e==genTag}function isObject(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function isObjectLike(t){return!!t&&"object"==typeof t}function isSymbol(t){return"symbol"==typeof t||isObjectLike(t)&&objectToString.call(t)==symbolTag}function toString(t){return null==t?"":baseToString(t)}function get(t,e,r){var a=null==t?void 0:baseGet(t,e);return void 0===a?r:a}var FUNC_ERROR_TEXT="Expected a function",HASH_UNDEFINED="__lodash_hash_undefined__",INFINITY=1/0,funcTag="[object Function]",genTag="[object GeneratorFunction]",symbolTag="[object Symbol]",reIsDeepProp=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,reIsPlainProp=/^\w*$/,reLeadingDot=/^\./,rePropName=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,reRegExpChar=/[\\^$.*+?()[\]{}|]/g,reEscapeChar=/\\(\\)?/g,reIsHostCtor=/^\[object .+?Constructor\]$/,freeGlobal="object"==typeof global&&global&&global.Object===Object&&global,freeSelf="object"==typeof self&&self&&self.Object===Object&&self,root=freeGlobal||freeSelf||Function("return this")(),arrayProto=Array.prototype,funcProto=Function.prototype,objectProto=Object.prototype,coreJsData=root["__core-js_shared__"],maskSrcKey=function(){var t=/[^.]+$/.exec(coreJsData&&coreJsData.keys&&coreJsData.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),funcToString=funcProto.toString,hasOwnProperty=objectProto.hasOwnProperty,objectToString=objectProto.toString,reIsNative=RegExp("^"+funcToString.call(hasOwnProperty).replace(reRegExpChar,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Symbol=root.Symbol,splice=arrayProto.splice,Map=getNative(root,"Map"),nativeCreate=getNative(Object,"create"),symbolProto=Symbol?Symbol.prototype:void 0,symbolToString=symbolProto?symbolProto.toString:void 0;Hash.prototype.clear=hashClear,Hash.prototype.delete=hashDelete,Hash.prototype.get=hashGet,Hash.prototype.has=hashHas,Hash.prototype.set=hashSet,ListCache.prototype.clear=listCacheClear,ListCache.prototype.delete=listCacheDelete,ListCache.prototype.get=listCacheGet,ListCache.prototype.has=listCacheHas,ListCache.prototype.set=listCacheSet,MapCache.prototype.clear=mapCacheClear,MapCache.prototype.delete=mapCacheDelete,MapCache.prototype.get=mapCacheGet,MapCache.prototype.has=mapCacheHas,MapCache.prototype.set=mapCacheSet;var stringToPath=memoize(function(t){t=toString(t);var e=[];return reLeadingDot.test(t)&&e.push(""),t.replace(rePropName,function(t,r,a,o){e.push(a?o.replace(reEscapeChar,"$1"):r||t)}),e});memoize.Cache=MapCache;var isArray=Array.isArray;module.exports=get}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{}],72:[function(require,module,exports){(function(global){function arrayFilter(e,t){for(var a=-1,r=null==e?0:e.length,n=0,o=[];++a<r;){var s=e[a];t(s,a,e)&&(o[n++]=s)}return o}function arrayPush(e,t){for(var a=-1,r=t.length,n=e.length;++a<r;)e[n+a]=t[a];return e}function arraySome(e,t){for(var a=-1,r=null==e?0:e.length;++a<r;)if(t(e[a],a,e))return!0;return!1}function baseTimes(e,t){for(var a=-1,r=Array(e);++a<e;)r[a]=t(a);return r}function baseUnary(e){return function(t){return e(t)}}function cacheHas(e,t){return e.has(t)}function getValue(e,t){return null==e?void 0:e[t]}function mapToArray(e){var t=-1,a=Array(e.size);return e.forEach(function(e,r){a[++t]=[r,e]}),a}function overArg(e,t){return function(a){return e(t(a))}}function setToArray(e){var t=-1,a=Array(e.size);return e.forEach(function(e){a[++t]=e}),a}function Hash(e){var t=-1,a=null==e?0:e.length;for(this.clear();++t<a;){var r=e[t];this.set(r[0],r[1])}}function hashClear(){this.__data__=nativeCreate?nativeCreate(null):{},this.size=0}function hashDelete(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}function hashGet(e){var t=this.__data__;if(nativeCreate){var a=t[e];return a===HASH_UNDEFINED?void 0:a}return hasOwnProperty.call(t,e)?t[e]:void 0}function hashHas(e){var t=this.__data__;return nativeCreate?void 0!==t[e]:hasOwnProperty.call(t,e)}function hashSet(e,t){var a=this.__data__;return this.size+=this.has(e)?0:1,a[e]=nativeCreate&&void 0===t?HASH_UNDEFINED:t,this}function ListCache(e){var t=-1,a=null==e?0:e.length;for(this.clear();++t<a;){var r=e[t];this.set(r[0],r[1])}}function listCacheClear(){this.__data__=[],this.size=0}function listCacheDelete(e){var t=this.__data__,a=assocIndexOf(t,e);return!(a<0)&&(a==t.length-1?t.pop():splice.call(t,a,1),--this.size,!0)}function listCacheGet(e){var t=this.__data__,a=assocIndexOf(t,e);return a<0?void 0:t[a][1]}function listCacheHas(e){return assocIndexOf(this.__data__,e)>-1}function listCacheSet(e,t){var a=this.__data__,r=assocIndexOf(a,e);return r<0?(++this.size,a.push([e,t])):a[r][1]=t,this}function MapCache(e){var t=-1,a=null==e?0:e.length;for(this.clear();++t<a;){var r=e[t];this.set(r[0],r[1])}}function mapCacheClear(){this.size=0,this.__data__={hash:new Hash,map:new(Map||ListCache),string:new Hash}}function mapCacheDelete(e){var t=getMapData(this,e).delete(e);return this.size-=t?1:0,t}function mapCacheGet(e){return getMapData(this,e).get(e)}function mapCacheHas(e){return getMapData(this,e).has(e)}function mapCacheSet(e,t){var a=getMapData(this,e),r=a.size;return a.set(e,t),this.size+=a.size==r?0:1,this}function SetCache(e){var t=-1,a=null==e?0:e.length;for(this.__data__=new MapCache;++t<a;)this.add(e[t])}function setCacheAdd(e){return this.__data__.set(e,HASH_UNDEFINED),this}function setCacheHas(e){return this.__data__.has(e)}function Stack(e){var t=this.__data__=new ListCache(e);this.size=t.size}function stackClear(){this.__data__=new ListCache,this.size=0}function stackDelete(e){var t=this.__data__,a=t.delete(e);return this.size=t.size,a}function stackGet(e){return this.__data__.get(e)}function stackHas(e){return this.__data__.has(e)}function stackSet(e,t){var a=this.__data__;if(a instanceof ListCache){var r=a.__data__;if(!Map||r.length<LARGE_ARRAY_SIZE-1)return r.push([e,t]),this.size=++a.size,this;a=this.__data__=new MapCache(r)}return a.set(e,t),this.size=a.size,this}function arrayLikeKeys(e,t){var a=isArray(e),r=!a&&isArguments(e),n=!a&&!r&&isBuffer(e),o=!a&&!r&&!n&&isTypedArray(e),s=a||r||n||o,i=s?baseTimes(e.length,String):[],c=i.length;for(var u in e)!t&&!hasOwnProperty.call(e,u)||s&&("length"==u||n&&("offset"==u||"parent"==u)||o&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||isIndex(u,c))||i.push(u);return i}function assocIndexOf(e,t){for(var a=e.length;a--;)if(eq(e[a][0],t))return a;return-1}function baseGetAllKeys(e,t,a){var r=t(e);return isArray(e)?r:arrayPush(r,a(e))}function baseGetTag(e){return null==e?void 0===e?undefinedTag:nullTag:symToStringTag&&symToStringTag in Object(e)?getRawTag(e):objectToString(e)}function baseIsArguments(e){return isObjectLike(e)&&baseGetTag(e)==argsTag}function baseIsEqual(e,t,a,r,n){return e===t||(null==e||null==t||!isObjectLike(e)&&!isObjectLike(t)?e!==e&&t!==t:baseIsEqualDeep(e,t,a,r,baseIsEqual,n))}function baseIsEqualDeep(e,t,a,r,n,o){var s=isArray(e),i=isArray(t),c=s?arrayTag:getTag(e),u=i?arrayTag:getTag(t);c=c==argsTag?objectTag:c,u=u==argsTag?objectTag:u;var g=c==objectTag,l=u==objectTag,y=c==u;if(y&&isBuffer(e)){if(!isBuffer(t))return!1;s=!0,g=!1}if(y&&!g)return o||(o=new Stack),s||isTypedArray(e)?equalArrays(e,t,a,r,n,o):equalByTag(e,t,c,a,r,n,o);if(!(a&COMPARE_PARTIAL_FLAG)){var f=g&&hasOwnProperty.call(e,"__wrapped__"),p=l&&hasOwnProperty.call(t,"__wrapped__");if(f||p){var h=f?e.value():e,T=p?t.value():t;return o||(o=new Stack),n(h,T,a,r,o)}}return!!y&&(o||(o=new Stack),equalObjects(e,t,a,r,n,o))}function baseIsNative(e){return!(!isObject(e)||isMasked(e))&&(isFunction(e)?reIsNative:reIsHostCtor).test(toSource(e))}function baseIsTypedArray(e){return isObjectLike(e)&&isLength(e.length)&&!!typedArrayTags[baseGetTag(e)]}function baseKeys(e){if(!isPrototype(e))return nativeKeys(e);var t=[];for(var a in Object(e))hasOwnProperty.call(e,a)&&"constructor"!=a&&t.push(a);return t}function equalArrays(e,t,a,r,n,o){var s=a&COMPARE_PARTIAL_FLAG,i=e.length,c=t.length;if(i!=c&&!(s&&c>i))return!1;var u=o.get(e);if(u&&o.get(t))return u==t;var g=-1,l=!0,y=a&COMPARE_UNORDERED_FLAG?new SetCache:void 0;for(o.set(e,t),o.set(t,e);++g<i;){var f=e[g],p=t[g];if(r)var h=s?r(p,f,g,t,e,o):r(f,p,g,e,t,o);if(void 0!==h){if(h)continue;l=!1;break}if(y){if(!arraySome(t,function(e,t){if(!cacheHas(y,t)&&(f===e||n(f,e,a,r,o)))return y.push(t)})){l=!1;break}}else if(f!==p&&!n(f,p,a,r,o)){l=!1;break}}return o.delete(e),o.delete(t),l}function equalByTag(e,t,a,r,n,o,s){switch(a){case dataViewTag:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case arrayBufferTag:return!(e.byteLength!=t.byteLength||!o(new Uint8Array(e),new Uint8Array(t)));case boolTag:case dateTag:case numberTag:return eq(+e,+t);case errorTag:return e.name==t.name&&e.message==t.message;case regexpTag:case stringTag:return e==t+"";case mapTag:var i=mapToArray;case setTag:var c=r&COMPARE_PARTIAL_FLAG;if(i||(i=setToArray),e.size!=t.size&&!c)return!1;var u=s.get(e);if(u)return u==t;r|=COMPARE_UNORDERED_FLAG,s.set(e,t);var g=equalArrays(i(e),i(t),r,n,o,s);return s.delete(e),g;case symbolTag:if(symbolValueOf)return symbolValueOf.call(e)==symbolValueOf.call(t)}return!1}function equalObjects(e,t,a,r,n,o){var s=a&COMPARE_PARTIAL_FLAG,i=getAllKeys(e),c=i.length;if(c!=getAllKeys(t).length&&!s)return!1;for(var u=c;u--;){var g=i[u];if(!(s?g in t:hasOwnProperty.call(t,g)))return!1}var l=o.get(e);if(l&&o.get(t))return l==t;var y=!0;o.set(e,t),o.set(t,e);for(var f=s;++u<c;){g=i[u];var p=e[g],h=t[g];if(r)var T=s?r(h,p,g,t,e,o):r(p,h,g,e,t,o);if(!(void 0===T?p===h||n(p,h,a,r,o):T)){y=!1;break}f||(f="constructor"==g)}if(y&&!f){var b=e.constructor,d=t.constructor;b!=d&&"constructor"in e&&"constructor"in t&&!("function"==typeof b&&b instanceof b&&"function"==typeof d&&d instanceof d)&&(y=!1)}return o.delete(e),o.delete(t),y}function getAllKeys(e){return baseGetAllKeys(e,keys,getSymbols)}function getMapData(e,t){var a=e.__data__;return isKeyable(t)?a["string"==typeof t?"string":"hash"]:a.map}function getNative(e,t){var a=getValue(e,t);return baseIsNative(a)?a:void 0}function getRawTag(e){var t=hasOwnProperty.call(e,symToStringTag),a=e[symToStringTag];try{e[symToStringTag]=void 0;var r=!0}catch(e){}var n=nativeObjectToString.call(e);return r&&(t?e[symToStringTag]=a:delete e[symToStringTag]),n}function isIndex(e,t){return!!(t=null==t?MAX_SAFE_INTEGER:t)&&("number"==typeof e||reIsUint.test(e))&&e>-1&&e%1==0&&e<t}function isKeyable(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}function isMasked(e){return!!maskSrcKey&&maskSrcKey in e}function isPrototype(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||objectProto)}function objectToString(e){return nativeObjectToString.call(e)}function toSource(e){if(null!=e){try{return funcToString.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function eq(e,t){return e===t||e!==e&&t!==t}function isArrayLike(e){return null!=e&&isLength(e.length)&&!isFunction(e)}function isEqual(e,t){return baseIsEqual(e,t)}function isFunction(e){if(!isObject(e))return!1;var t=baseGetTag(e);return t==funcTag||t==genTag||t==asyncTag||t==proxyTag}function isLength(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=MAX_SAFE_INTEGER}function isObject(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function isObjectLike(e){return null!=e&&"object"==typeof e}function keys(e){return isArrayLike(e)?arrayLikeKeys(e):baseKeys(e)}function stubArray(){return[]}function stubFalse(){return!1}var LARGE_ARRAY_SIZE=200,HASH_UNDEFINED="__lodash_hash_undefined__",COMPARE_PARTIAL_FLAG=1,COMPARE_UNORDERED_FLAG=2,MAX_SAFE_INTEGER=9007199254740991,argsTag="[object Arguments]",arrayTag="[object Array]",asyncTag="[object AsyncFunction]",boolTag="[object Boolean]",dateTag="[object Date]",errorTag="[object Error]",funcTag="[object Function]",genTag="[object GeneratorFunction]",mapTag="[object Map]",numberTag="[object Number]",nullTag="[object Null]",objectTag="[object Object]",promiseTag="[object Promise]",proxyTag="[object Proxy]",regexpTag="[object RegExp]",setTag="[object Set]",stringTag="[object String]",symbolTag="[object Symbol]",undefinedTag="[object Undefined]",weakMapTag="[object WeakMap]",arrayBufferTag="[object ArrayBuffer]",dataViewTag="[object DataView]",float32Tag="[object Float32Array]",float64Tag="[object Float64Array]",int8Tag="[object Int8Array]",int16Tag="[object Int16Array]",int32Tag="[object Int32Array]",uint8Tag="[object Uint8Array]",uint8ClampedTag="[object Uint8ClampedArray]",uint16Tag="[object Uint16Array]",uint32Tag="[object Uint32Array]",reRegExpChar=/[\\^$.*+?()[\]{}|]/g,reIsHostCtor=/^\[object .+?Constructor\]$/,reIsUint=/^(?:0|[1-9]\d*)$/,typedArrayTags={};typedArrayTags[float32Tag]=typedArrayTags[float64Tag]=typedArrayTags[int8Tag]=typedArrayTags[int16Tag]=typedArrayTags[int32Tag]=typedArrayTags[uint8Tag]=typedArrayTags[uint8ClampedTag]=typedArrayTags[uint16Tag]=typedArrayTags[uint32Tag]=!0,typedArrayTags[argsTag]=typedArrayTags[arrayTag]=typedArrayTags[arrayBufferTag]=typedArrayTags[boolTag]=typedArrayTags[dataViewTag]=typedArrayTags[dateTag]=typedArrayTags[errorTag]=typedArrayTags[funcTag]=typedArrayTags[mapTag]=typedArrayTags[numberTag]=typedArrayTags[objectTag]=typedArrayTags[regexpTag]=typedArrayTags[setTag]=typedArrayTags[stringTag]=typedArrayTags[weakMapTag]=!1;var freeGlobal="object"==typeof global&&global&&global.Object===Object&&global,freeSelf="object"==typeof self&&self&&self.Object===Object&&self,root=freeGlobal||freeSelf||Function("return this")(),freeExports="object"==typeof exports&&exports&&!exports.nodeType&&exports,freeModule=freeExports&&"object"==typeof module&&module&&!module.nodeType&&module,moduleExports=freeModule&&freeModule.exports===freeExports,freeProcess=moduleExports&&freeGlobal.process,nodeUtil=function(){try{return freeProcess&&freeProcess.binding&&freeProcess.binding("util")}catch(e){}}(),nodeIsTypedArray=nodeUtil&&nodeUtil.isTypedArray,arrayProto=Array.prototype,funcProto=Function.prototype,objectProto=Object.prototype,coreJsData=root["__core-js_shared__"],funcToString=funcProto.toString,hasOwnProperty=objectProto.hasOwnProperty,maskSrcKey=function(){var e=/[^.]+$/.exec(coreJsData&&coreJsData.keys&&coreJsData.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),nativeObjectToString=objectProto.toString,reIsNative=RegExp("^"+funcToString.call(hasOwnProperty).replace(reRegExpChar,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Buffer=moduleExports?root.Buffer:void 0,Symbol=root.Symbol,Uint8Array=root.Uint8Array,propertyIsEnumerable=objectProto.propertyIsEnumerable,splice=arrayProto.splice,symToStringTag=Symbol?Symbol.toStringTag:void 0,nativeGetSymbols=Object.getOwnPropertySymbols,nativeIsBuffer=Buffer?Buffer.isBuffer:void 0,nativeKeys=overArg(Object.keys,Object),DataView=getNative(root,"DataView"),Map=getNative(root,"Map"),Promise=getNative(root,"Promise"),Set=getNative(root,"Set"),WeakMap=getNative(root,"WeakMap"),nativeCreate=getNative(Object,"create"),dataViewCtorString=toSource(DataView),mapCtorString=toSource(Map),promiseCtorString=toSource(Promise),setCtorString=toSource(Set),weakMapCtorString=toSource(WeakMap),symbolProto=Symbol?Symbol.prototype:void 0,symbolValueOf=symbolProto?symbolProto.valueOf:void 0;Hash.prototype.clear=hashClear,Hash.prototype.delete=hashDelete,Hash.prototype.get=hashGet,Hash.prototype.has=hashHas,Hash.prototype.set=hashSet,ListCache.prototype.clear=listCacheClear,ListCache.prototype.delete=listCacheDelete,ListCache.prototype.get=listCacheGet,ListCache.prototype.has=listCacheHas,ListCache.prototype.set=listCacheSet,MapCache.prototype.clear=mapCacheClear,MapCache.prototype.delete=mapCacheDelete,MapCache.prototype.get=mapCacheGet,MapCache.prototype.has=mapCacheHas,MapCache.prototype.set=mapCacheSet,SetCache.prototype.add=SetCache.prototype.push=setCacheAdd,SetCache.prototype.has=setCacheHas,Stack.prototype.clear=stackClear,Stack.prototype.delete=stackDelete,Stack.prototype.get=stackGet,Stack.prototype.has=stackHas,Stack.prototype.set=stackSet;var getSymbols=nativeGetSymbols?function(e){return null==e?[]:(e=Object(e),arrayFilter(nativeGetSymbols(e),function(t){return propertyIsEnumerable.call(e,t)}))}:stubArray,getTag=baseGetTag;(DataView&&getTag(new DataView(new ArrayBuffer(1)))!=dataViewTag||Map&&getTag(new Map)!=mapTag||Promise&&getTag(Promise.resolve())!=promiseTag||Set&&getTag(new Set)!=setTag||WeakMap&&getTag(new WeakMap)!=weakMapTag)&&(getTag=function(e){var t=baseGetTag(e),a=t==objectTag?e.constructor:void 0,r=a?toSource(a):"";if(r)switch(r){case dataViewCtorString:return dataViewTag;case mapCtorString:return mapTag;case promiseCtorString:return promiseTag;case setCtorString:return setTag;case weakMapCtorString:return weakMapTag}return t})
  ;var isArguments=baseIsArguments(function(){return arguments}())?baseIsArguments:function(e){return isObjectLike(e)&&hasOwnProperty.call(e,"callee")&&!propertyIsEnumerable.call(e,"callee")},isArray=Array.isArray,isBuffer=nativeIsBuffer||stubFalse,isTypedArray=nodeIsTypedArray?baseUnary(nodeIsTypedArray):baseIsTypedArray;module.exports=isEqual}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{}],73:[function(require,module,exports){function parse(e){if(e=String(e),!(e.length>100)){var r=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(r){var a=parseFloat(r[1]);switch((r[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return a*y;case"days":case"day":case"d":return a*d;case"hours":case"hour":case"hrs":case"hr":case"h":return a*h;case"minutes":case"minute":case"mins":case"min":case"m":return a*m;case"seconds":case"second":case"secs":case"sec":case"s":return a*s;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return a;default:return}}}}function fmtShort(e){return e>=d?Math.round(e/d)+"d":e>=h?Math.round(e/h)+"h":e>=m?Math.round(e/m)+"m":e>=s?Math.round(e/s)+"s":e+"ms"}function fmtLong(e){return plural(e,d,"day")||plural(e,h,"hour")||plural(e,m,"minute")||plural(e,s,"second")||e+" ms"}function plural(s,e,r){if(!(s<e))return s<1.5*e?Math.floor(s/e)+" "+r:Math.ceil(s/e)+" "+r+"s"}var s=1e3,m=60*s,h=60*m,d=24*h,y=365.25*d;module.exports=function(s,e){e=e||{};var r=typeof s;if("string"===r&&s.length>0)return parse(s);if("number"===r&&!1===isNaN(s))return e.long?fmtLong(s):fmtShort(s);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(s))}},{}],74:[function(require,module,exports){"use strict";function create(e){return function(r,t,o,n){var a=[],c="";"string"==typeof r?(a=slice.call(arguments),r=t=void 0):"string"==typeof t?(a=slice.call(arguments,1),t=void 0):"string"==typeof o&&(a=slice.call(arguments,2)),a.length>0&&(c=module.exports.formatter.apply(null,a)),r&&r.message&&(c+=(c?" \n":"")+r.message);var i=new e(c);return extendError(i,r),extendToJSON(i),extend(i,t),i}}function extendError(e,r){extendStack(e,r),extend(e,r)}function extendToJSON(e){e.toJSON=errorToJSON,e.inspect=errorToString}function extend(e,r){if(r&&"object"==typeof r)for(var t=Object.keys(r),o=0;o<t.length;o++){var n=t[o];if(!(protectedProperties.indexOf(n)>=0))try{e[n]=r[n]}catch(e){}}}function errorToJSON(){var e={},r=Object.keys(this);r=r.concat(errorPrototypeProperties);for(var t=0;t<r.length;t++){var o=r[t],n=this[o],a=typeof n;"undefined"!==a&&"function"!==a&&(e[o]=n)}return e}function errorToString(){return JSON.stringify(this,null,2).replace(/\\n/g,"\n")}function extendStack(e,r){hasLazyStack(e)?r?lazyJoinStacks(e,r):lazyPopStack(e):e.stack=r?joinStacks(e.stack,r.stack):popStack(e.stack)}function joinStacks(e,r){return e=popStack(e),e&&r?e+"\n\n"+r:e||r}function popStack(e){if(e){var r=e.split("\n");if(r.length<2)return e;for(var t=0;t<r.length;t++){if(r[t].indexOf("onoFactory")>=0)return r.splice(t,1),r.join("\n")}return e}}function hasLazyStack(e){if(!supportsLazyStack)return!1;var r=Object.getOwnPropertyDescriptor(e,"stack");return!!r&&"function"==typeof r.get}function lazyJoinStacks(e,r){var t=Object.getOwnPropertyDescriptor(e,"stack");Object.defineProperty(e,"stack",{get:function(){return joinStacks(t.get.apply(e),r.stack)},enumerable:!1,configurable:!0})}function lazyPopStack(e){var r=Object.getOwnPropertyDescriptor(e,"stack");Object.defineProperty(e,"stack",{get:function(){return popStack(r.get.apply(e))},enumerable:!1,configurable:!0})}var format=require("format-util"),slice=Array.prototype.slice,protectedProperties=["name","message","stack"],errorPrototypeProperties=["name","message","description","number","code","fileName","lineNumber","columnNumber","sourceURL","line","column","stack"];module.exports=create(Error),module.exports.error=create(Error),module.exports.eval=create(EvalError),module.exports.range=create(RangeError),module.exports.reference=create(ReferenceError),module.exports.syntax=create(SyntaxError),module.exports.type=create(TypeError),module.exports.uri=create(URIError),module.exports.formatter=format;var supportsLazyStack=function(){return!(!Object.getOwnPropertyDescriptor||!Object.defineProperty||"undefined"!=typeof navigator&&/Android/.test(navigator.userAgent))}()},{"format-util":15}],75:[function(require,module,exports){(function(process){"use strict";function nextTick(e,n,c,r){if("function"!=typeof e)throw new TypeError('"callback" argument must be a function');var s,t,o=arguments.length;switch(o){case 0:case 1:return process.nextTick(e);case 2:return process.nextTick(function(){e.call(null,n)});case 3:return process.nextTick(function(){e.call(null,n,c)});case 4:return process.nextTick(function(){e.call(null,n,c,r)});default:for(s=new Array(o-1),t=0;t<s.length;)s[t++]=arguments[t];return process.nextTick(function(){e.apply(null,s)})}}!process.version||0===process.version.indexOf("v0.")||0===process.version.indexOf("v1.")&&0!==process.version.indexOf("v1.8.")?module.exports=nextTick:module.exports=process.nextTick}).call(this,require("_process"))},{_process:76}],76:[function(require,module,exports){function defaultSetTimout(){throw new Error("setTimeout has not been defined")}function defaultClearTimeout(){throw new Error("clearTimeout has not been defined")}function runTimeout(e){if(cachedSetTimeout===setTimeout)return setTimeout(e,0);if((cachedSetTimeout===defaultSetTimout||!cachedSetTimeout)&&setTimeout)return cachedSetTimeout=setTimeout,setTimeout(e,0);try{return cachedSetTimeout(e,0)}catch(t){try{return cachedSetTimeout.call(null,e,0)}catch(t){return cachedSetTimeout.call(this,e,0)}}}function runClearTimeout(e){if(cachedClearTimeout===clearTimeout)return clearTimeout(e);if((cachedClearTimeout===defaultClearTimeout||!cachedClearTimeout)&&clearTimeout)return cachedClearTimeout=clearTimeout,clearTimeout(e);try{return cachedClearTimeout(e)}catch(t){try{return cachedClearTimeout.call(null,e)}catch(t){return cachedClearTimeout.call(this,e)}}}function cleanUpNextTick(){draining&&currentQueue&&(draining=!1,currentQueue.length?queue=currentQueue.concat(queue):queueIndex=-1,queue.length&&drainQueue())}function drainQueue(){if(!draining){var e=runTimeout(cleanUpNextTick);draining=!0;for(var t=queue.length;t;){for(currentQueue=queue,queue=[];++queueIndex<t;)currentQueue&&currentQueue[queueIndex].run();queueIndex=-1,t=queue.length}currentQueue=null,draining=!1,runClearTimeout(e)}}function Item(e,t){this.fun=e,this.array=t}function noop(){}var process=module.exports={},cachedSetTimeout,cachedClearTimeout;!function(){try{cachedSetTimeout="function"==typeof setTimeout?setTimeout:defaultSetTimout}catch(e){cachedSetTimeout=defaultSetTimout}try{cachedClearTimeout="function"==typeof clearTimeout?clearTimeout:defaultClearTimeout}catch(e){cachedClearTimeout=defaultClearTimeout}}();var queue=[],draining=!1,currentQueue,queueIndex=-1;process.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];queue.push(new Item(e,t)),1!==queue.length||draining||runTimeout(drainQueue)},Item.prototype.run=function(){this.fun.apply(null,this.array)},process.title="browser",process.browser=!0,process.env={},process.argv=[],process.version="",process.versions={},process.on=noop,process.addListener=noop,process.once=noop,process.off=noop,process.removeListener=noop,process.removeAllListeners=noop,process.emit=noop,process.prependListener=noop,process.prependOnceListener=noop,process.listeners=function(e){return[]},process.binding=function(e){throw new Error("process.binding is not supported")},process.cwd=function(){return"/"},process.chdir=function(e){throw new Error("process.chdir is not supported")},process.umask=function(){return 0}},{}],77:[function(require,module,exports){(function(global){/*! https://mths.be/punycode v1.4.1 by @mathias */
  !function(e){function o(e){throw new RangeError(T[e])}function n(e,o){for(var n=e.length,t=[];n--;)t[n]=o(e[n]);return t}function t(e,o){var t=e.split("@"),r="";return t.length>1&&(r=t[0]+"@",e=t[1]),e=e.replace(S,"."),r+n(e.split("."),o).join(".")}function r(e){for(var o,n,t=[],r=0,u=e.length;r<u;)o=e.charCodeAt(r++),o>=55296&&o<=56319&&r<u?(n=e.charCodeAt(r++),56320==(64512&n)?t.push(((1023&o)<<10)+(1023&n)+65536):(t.push(o),r--)):t.push(o);return t}function u(e){return n(e,function(e){var o="";return e>65535&&(e-=65536,o+=P(e>>>10&1023|55296),e=56320|1023&e),o+=P(e)}).join("")}function i(e){return e-48<10?e-22:e-65<26?e-65:e-97<26?e-97:b}function f(e,o){return e+22+75*(e<26)-((0!=o)<<5)}function c(e,o,n){var t=0;for(e=n?M(e/j):e>>1,e+=M(e/o);e>L*C>>1;t+=b)e=M(e/L);return M(t+(L+1)*e/(e+m))}function l(e){var n,t,r,f,l,s,d,p,a,h,v=[],g=e.length,w=0,m=I,j=A;for(t=e.lastIndexOf(E),t<0&&(t=0),r=0;r<t;++r)e.charCodeAt(r)>=128&&o("not-basic"),v.push(e.charCodeAt(r));for(f=t>0?t+1:0;f<g;){for(l=w,s=1,d=b;f>=g&&o("invalid-input"),p=i(e.charCodeAt(f++)),(p>=b||p>M((x-w)/s))&&o("overflow"),w+=p*s,a=d<=j?y:d>=j+C?C:d-j,!(p<a);d+=b)h=b-a,s>M(x/h)&&o("overflow"),s*=h;n=v.length+1,j=c(w-l,n,0==l),M(w/n)>x-m&&o("overflow"),m+=M(w/n),w%=n,v.splice(w++,0,m)}return u(v)}function s(e){var n,t,u,i,l,s,d,p,a,h,v,g,w,m,j,F=[];for(e=r(e),g=e.length,n=I,t=0,l=A,s=0;s<g;++s)(v=e[s])<128&&F.push(P(v));for(u=i=F.length,i&&F.push(E);u<g;){for(d=x,s=0;s<g;++s)(v=e[s])>=n&&v<d&&(d=v);for(w=u+1,d-n>M((x-t)/w)&&o("overflow"),t+=(d-n)*w,n=d,s=0;s<g;++s)if(v=e[s],v<n&&++t>x&&o("overflow"),v==n){for(p=t,a=b;h=a<=l?y:a>=l+C?C:a-l,!(p<h);a+=b)j=p-h,m=b-h,F.push(P(f(h+j%m,0))),p=M(j/m);F.push(P(f(p,0))),l=c(t,w,u==i),t=0,++u}++t,++n}return F.join("")}function d(e){return t(e,function(e){return F.test(e)?l(e.slice(4).toLowerCase()):e})}function p(e){return t(e,function(e){return O.test(e)?"xn--"+s(e):e})}var a="object"==typeof exports&&exports&&!exports.nodeType&&exports,h="object"==typeof module&&module&&!module.nodeType&&module,v="object"==typeof global&&global;v.global!==v&&v.window!==v&&v.self!==v||(e=v);var g,w,x=2147483647,b=36,y=1,C=26,m=38,j=700,A=72,I=128,E="-",F=/^xn--/,O=/[^\x20-\x7E]/,S=/[\x2E\u3002\uFF0E\uFF61]/g,T={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},L=b-y,M=Math.floor,P=String.fromCharCode;if(g={version:"1.4.1",ucs2:{decode:r,encode:u},decode:l,encode:s,toASCII:p,toUnicode:d},"function"==typeof define&&"object"==typeof define.amd&&define.amd)define("punycode",function(){return g});else if(a&&h)if(module.exports==a)h.exports=g;else for(w in g)g.hasOwnProperty(w)&&(a[w]=g[w]);else e.punycode=g}(this)}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{}],78:[function(require,module,exports){"use strict";function hasOwnProperty(r,e){return Object.prototype.hasOwnProperty.call(r,e)}module.exports=function(r,e,t,n){e=e||"&",t=t||"=";var o={};if("string"!=typeof r||0===r.length)return o;var a=/\+/g;r=r.split(e);var s=1e3;n&&"number"==typeof n.maxKeys&&(s=n.maxKeys);var p=r.length;s>0&&p>s&&(p=s);for(var y=0;y<p;++y){var u,c,i,l,f=r[y].replace(a,"%20"),v=f.indexOf(t);v>=0?(u=f.substr(0,v),c=f.substr(v+1)):(u=f,c=""),i=decodeURIComponent(u),l=decodeURIComponent(c),hasOwnProperty(o,i)?isArray(o[i])?o[i].push(l):o[i]=[o[i],l]:o[i]=l}return o};var isArray=Array.isArray||function(r){return"[object Array]"===Object.prototype.toString.call(r)}},{}],79:[function(require,module,exports){"use strict";function map(r,e){if(r.map)return r.map(e);for(var t=[],n=0;n<r.length;n++)t.push(e(r[n],n));return t}var stringifyPrimitive=function(r){switch(typeof r){case"string":return r;case"boolean":return r?"true":"false";case"number":return isFinite(r)?r:"";default:return""}};module.exports=function(r,e,t,n){return e=e||"&",t=t||"=",null===r&&(r=void 0),"object"==typeof r?map(objectKeys(r),function(n){var i=encodeURIComponent(stringifyPrimitive(n))+t;return isArray(r[n])?map(r[n],function(r){return i+encodeURIComponent(stringifyPrimitive(r))}).join(e):i+encodeURIComponent(stringifyPrimitive(r[n]))}).join(e):n?encodeURIComponent(stringifyPrimitive(n))+t+encodeURIComponent(stringifyPrimitive(r)):""};var isArray=Array.isArray||function(r){return"[object Array]"===Object.prototype.toString.call(r)},objectKeys=Object.keys||function(r){var e=[];for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&e.push(t);return e}},{}],80:[function(require,module,exports){"use strict";exports.decode=exports.parse=require("./decode"),exports.encode=exports.stringify=require("./encode")},{"./decode":78,"./encode":79}],81:[function(require,module,exports){"use strict";function Duplex(e){if(!(this instanceof Duplex))return new Duplex(e);Readable.call(this,e),Writable.call(this,e),e&&!1===e.readable&&(this.readable=!1),e&&!1===e.writable&&(this.writable=!1),this.allowHalfOpen=!0,e&&!1===e.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",onend)}function onend(){this.allowHalfOpen||this._writableState.ended||processNextTick(onEndNT,this)}function onEndNT(e){e.end()}function forEach(e,t){for(var r=0,i=e.length;r<i;r++)t(e[r],r)}var processNextTick=require("process-nextick-args"),objectKeys=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};module.exports=Duplex;var util=require("core-util-is");util.inherits=require("inherits");var Readable=require("./_stream_readable"),Writable=require("./_stream_writable");util.inherits(Duplex,Readable);for(var keys=objectKeys(Writable.prototype),v=0;v<keys.length;v++){var method=keys[v];Duplex.prototype[method]||(Duplex.prototype[method]=Writable.prototype[method])}Object.defineProperty(Duplex.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}}),Duplex.prototype._destroy=function(e,t){this.push(null),this.end(),processNextTick(t,e)}},{"./_stream_readable":83,"./_stream_writable":85,"core-util-is":11,inherits:18,"process-nextick-args":75}],82:[function(require,module,exports){"use strict";function PassThrough(r){if(!(this instanceof PassThrough))return new PassThrough(r);Transform.call(this,r)}module.exports=PassThrough;var Transform=require("./_stream_transform"),util=require("core-util-is");util.inherits=require("inherits"),util.inherits(PassThrough,Transform),PassThrough.prototype._transform=function(r,s,i){i(null,r)}},{"./_stream_transform":84,"core-util-is":11,inherits:18}],83:[function(require,module,exports){(function(process,global){"use strict";function _uint8ArrayToBuffer(e){return Buffer.from(e)}function _isUint8Array(e){return Buffer.isBuffer(e)||e instanceof OurUint8Array}function prependListener(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?isArray(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}function ReadableState(e,t){Duplex=Duplex||require("./_stream_duplex"),e=e||{},this.objectMode=!!e.objectMode,t instanceof Duplex&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var r=e.highWaterMark,n=this.objectMode?16:16384;this.highWaterMark=r||0===r?r:n,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new BufferList,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(StringDecoder||(StringDecoder=require("string_decoder/").StringDecoder),this.decoder=new StringDecoder(e.encoding),this.encoding=e.encoding)}function Readable(e){if(Duplex=Duplex||require("./_stream_duplex"),!(this instanceof Readable))return new Readable(e);this._readableState=new ReadableState(e,this),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),Stream.call(this)}function readableAddChunk(e,t,r,n,a){var i=e._readableState;if(null===t)i.reading=!1,onEofChunk(e,i);else{var d;a||(d=chunkInvalid(i,t)),d?e.emit("error",d):i.objectMode||t&&t.length>0?("string"==typeof t||i.objectMode||Object.getPrototypeOf(t)===Buffer.prototype||(t=_uint8ArrayToBuffer(t)),n?i.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):addChunk(e,i,t,!0):i.ended?e.emit("error",new Error("stream.push() after EOF")):(i.reading=!1,i.decoder&&!r?(t=i.decoder.write(t),i.objectMode||0!==t.length?addChunk(e,i,t,!1):maybeReadMore(e,i)):addChunk(e,i,t,!1))):n||(i.reading=!1)}return needMoreData(i)}function addChunk(e,t,r,n){t.flowing&&0===t.length&&!t.sync?(e.emit("data",r),e.read(0)):(t.length+=t.objectMode?1:r.length,n?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&emitReadable(e)),maybeReadMore(e,t)}function chunkInvalid(e,t){var r;return _isUint8Array(t)||"string"==typeof t||void 0===t||e.objectMode||(r=new TypeError("Invalid non-string/buffer chunk")),r}function needMoreData(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||0===e.length)}function computeNewHighWaterMark(e){return e>=MAX_HWM?e=MAX_HWM:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function howMuchToRead(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!==e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=computeNewHighWaterMark(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function onEofChunk(e,t){if(!t.ended){if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,emitReadable(e)}}function emitReadable(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(debug("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?processNextTick(emitReadable_,e):emitReadable_(e))}function emitReadable_(e){debug("emit readable"),e.emit("readable"),flow(e)}function maybeReadMore(e,t){t.readingMore||(t.readingMore=!0,processNextTick(maybeReadMore_,e,t))}function maybeReadMore_(e,t){for(var r=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(debug("maybeReadMore read 0"),e.read(0),r!==t.length);)r=t.length;t.readingMore=!1}function pipeOnDrain(e){return function(){var t=e._readableState;debug("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&EElistenerCount(e,"data")&&(t.flowing=!0,flow(e))}}function nReadingNextTick(e){debug("readable nexttick read 0"),e.read(0)}function resume(e,t){t.resumeScheduled||(t.resumeScheduled=!0,processNextTick(resume_,e,t))}function resume_(e,t){t.reading||(debug("resume read 0"),e.read(0)),t.resumeScheduled=!1,t.awaitDrain=0,e.emit("resume"),flow(e),t.flowing&&!t.reading&&e.read(0)}function flow(e){var t=e._readableState;for(debug("flow",t.flowing);t.flowing&&null!==e.read(););}function fromList(e,t){if(0===t.length)return null;var r;return t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):r=fromListPartial(e,t.buffer,t.decoder),r}function fromListPartial(e,t,r){var n;return e<t.head.data.length?(n=t.head.data.slice(0,e),t.head.data=t.head.data.slice(e)):n=e===t.head.data.length?t.shift():r?copyFromBufferString(e,t):copyFromBuffer(e,t),n}function copyFromBufferString(e,t){var r=t.head,n=1,a=r.data;for(e-=a.length;r=r.next;){var i=r.data,d=e>i.length?i.length:e;if(d===i.length?a+=i:a+=i.slice(0,e),0===(e-=d)){d===i.length?(++n,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=i.slice(d));break}++n}return t.length-=n,a}function copyFromBuffer(e,t){var r=Buffer.allocUnsafe(e),n=t.head,a=1;for(n.data.copy(r),e-=n.data.length;n=n.next;){var i=n.data,d=e>i.length?i.length:e;if(i.copy(r,r.length-e,0,d),0===(e-=d)){d===i.length?(++a,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=i.slice(d));break}++a}return t.length-=a,r}function endReadable(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,processNextTick(endReadableNT,t,e))}function endReadableNT(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function forEach(e,t){for(var r=0,n=e.length;r<n;r++)t(e[r],r)}function indexOf(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}var processNextTick=require("process-nextick-args");module.exports=Readable;var isArray=require("isarray"),Duplex;Readable.ReadableState=ReadableState;var EE=require("events").EventEmitter,EElistenerCount=function(e,t){return e.listeners(t).length},Stream=require("./internal/streams/stream"),Buffer=require("safe-buffer").Buffer,OurUint8Array=global.Uint8Array||function(){},util=require("core-util-is");util.inherits=require("inherits");var debugUtil=require("util"),debug=void 0;debug=debugUtil&&debugUtil.debuglog?debugUtil.debuglog("stream"):function(){};var BufferList=require("./internal/streams/BufferList"),destroyImpl=require("./internal/streams/destroy"),StringDecoder;util.inherits(Readable,Stream);var kProxyEvents=["error","close","destroy","pause","resume"];Object.defineProperty(Readable.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),Readable.prototype.destroy=destroyImpl.destroy,Readable.prototype._undestroy=destroyImpl.undestroy,Readable.prototype._destroy=function(e,t){this.push(null),t(e)},Readable.prototype.push=function(e,t){var r,n=this._readableState;return n.objectMode?r=!0:"string"==typeof e&&(t=t||n.defaultEncoding,t!==n.encoding&&(e=Buffer.from(e,t),t=""),r=!0),readableAddChunk(this,e,t,!1,r)},Readable.prototype.unshift=function(e){return readableAddChunk(this,e,null,!0,!1)},Readable.prototype.isPaused=function(){return!1===this._readableState.flowing},Readable.prototype.setEncoding=function(e){return StringDecoder||(StringDecoder=require("string_decoder/").StringDecoder),this._readableState.decoder=new StringDecoder(e),this._readableState.encoding=e,this};var MAX_HWM=8388608;Readable.prototype.read=function(e){debug("read",e),e=parseInt(e,10);var t=this._readableState,r=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return debug("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?endReadable(this):emitReadable(this),null;if(0===(e=howMuchToRead(e,t))&&t.ended)return 0===t.length&&endReadable(this),null;var n=t.needReadable;debug("need readable",n),(0===t.length||t.length-e<t.highWaterMark)&&(n=!0,debug("length less than watermark",n)),t.ended||t.reading?(n=!1,debug("reading or ended",n)):n&&(debug("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=howMuchToRead(r,t)));var a;return a=e>0?fromList(e,t):null,null===a?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&endReadable(this)),null!==a&&this.emit("data",a),a},Readable.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},Readable.prototype.pipe=function(e,t){function r(e,t){debug("onunpipe"),e===l&&t&&!1===t.hasUnpiped&&(t.hasUnpiped=!0,a())}function n(){debug("onend"),e.end()}function a(){debug("cleanup"),e.removeListener("close",o),e.removeListener("finish",u),e.removeListener("drain",c),e.removeListener("error",d),e.removeListener("unpipe",r),l.removeListener("end",n),l.removeListener("end",s),l.removeListener("data",i),b=!0,!h.awaitDrain||e._writableState&&!e._writableState.needDrain||c()}function i(t){debug("ondata"),g=!1,!1!==e.write(t)||g||((1===h.pipesCount&&h.pipes===e||h.pipesCount>1&&-1!==indexOf(h.pipes,e))&&!b&&(debug("false write response, pause",l._readableState.awaitDrain),l._readableState.awaitDrain++,g=!0),l.pause())}function d(t){debug("onerror",t),s(),e.removeListener("error",d),0===EElistenerCount(e,"error")&&e.emit("error",t)}function o(){e.removeListener("finish",u),s()}function u(){debug("onfinish"),e.removeListener("close",o),s()}function s(){debug("unpipe"),l.unpipe(e)}var l=this,h=this._readableState;switch(h.pipesCount){case 0:h.pipes=e;break;case 1:h.pipes=[h.pipes,e];break;default:h.pipes.push(e)}h.pipesCount+=1,debug("pipe count=%d opts=%j",h.pipesCount,t);var f=(!t||!1!==t.end)&&e!==process.stdout&&e!==process.stderr,p=f?n:s;h.endEmitted?processNextTick(p):l.once("end",p),e.on("unpipe",r);var c=pipeOnDrain(l);e.on("drain",c);var b=!1,g=!1;return l.on("data",i),prependListener(e,"error",d),e.once("close",o),e.once("finish",u),e.emit("pipe",l),h.flowing||(debug("pipe resume"),l.resume()),e},Readable.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r),this);if(!e){var n=t.pipes,a=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var i=0;i<a;i++)n[i].emit("unpipe",this,r);return this}var d=indexOf(t.pipes,e);return-1===d?this:(t.pipes.splice(d,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,r),this)},Readable.prototype.on=function(e,t){var r=Stream.prototype.on.call(this,e,t);if("data"===e)!1!==this._readableState.flowing&&this.resume();else if("readable"===e){var n=this._readableState;n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.emittedReadable=!1,n.reading?n.length&&emitReadable(this):processNextTick(nReadingNextTick,this))}return r},Readable.prototype.addListener=Readable.prototype.on,Readable.prototype.resume=function(){var e=this._readableState;return e.flowing||(debug("resume"),e.flowing=!0,resume(this,e)),this},Readable.prototype.pause=function(){return debug("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(debug("pause"),this._readableState.flowing=!1,this.emit("pause")),this},Readable.prototype.wrap=function(e){var t=this._readableState,r=!1,n=this;e.on("end",function(){if(debug("wrapped end"),t.decoder&&!t.ended){var e=t.decoder.end();e&&e.length&&n.push(e)}n.push(null)}),e.on("data",function(a){if(debug("wrapped data"),t.decoder&&(a=t.decoder.write(a)),(!t.objectMode||null!==a&&void 0!==a)&&(t.objectMode||a&&a.length)){n.push(a)||(r=!0,e.pause())}});for(var a in e)void 0===this[a]&&"function"==typeof e[a]&&(this[a]=function(t){return function(){return e[t].apply(e,arguments)}}(a));for(var i=0;i<kProxyEvents.length;i++)e.on(kProxyEvents[i],n.emit.bind(n,kProxyEvents[i]));return n._read=function(t){debug("wrapped _read",t),r&&(r=!1,e.resume())},n},Readable._fromList=fromList}).call(this,require("_process"),typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{"./_stream_duplex":81,"./internal/streams/BufferList":86,"./internal/streams/destroy":87,"./internal/streams/stream":88,_process:76,"core-util-is":11,events:14,inherits:18,isarray:20,"process-nextick-args":75,"safe-buffer":90,"string_decoder/":95,util:7}],84:[function(require,module,exports){"use strict";function TransformState(r){this.afterTransform=function(t,n){return afterTransform(r,t,n)},this.needTransform=!1,this.transforming=!1,this.writecb=null,this.writechunk=null,this.writeencoding=null}function afterTransform(r,t,n){var e=r._transformState;e.transforming=!1;var i=e.writecb;if(!i)return r.emit("error",new Error("write callback called multiple times"));e.writechunk=null,e.writecb=null,null!==n&&void 0!==n&&r.push(n),i(t);var a=r._readableState;a.reading=!1,(a.needReadable||a.length<a.highWaterMark)&&r._read(a.highWaterMark)}function Transform(r){if(!(this instanceof Transform))return new Transform(r);Duplex.call(this,r),this._transformState=new TransformState(this);var t=this;this._readableState.needReadable=!0,this._readableState.sync=!1,r&&("function"==typeof r.transform&&(this._transform=r.transform),"function"==typeof r.flush&&(this._flush=r.flush)),this.once("prefinish",function(){"function"==typeof this._flush?this._flush(function(r,n){done(t,r,n)}):done(t)})}function done(r,t,n){if(t)return r.emit("error",t);null!==n&&void 0!==n&&r.push(n);var e=r._writableState,i=r._transformState;if(e.length)throw new Error("Calling transform done when ws.length != 0");if(i.transforming)throw new Error("Calling transform done when still transforming");return r.push(null)}module.exports=Transform;var Duplex=require("./_stream_duplex"),util=require("core-util-is");util.inherits=require("inherits"),util.inherits(Transform,Duplex),Transform.prototype.push=function(r,t){return this._transformState.needTransform=!1,Duplex.prototype.push.call(this,r,t)},Transform.prototype._transform=function(r,t,n){throw new Error("_transform() is not implemented")},Transform.prototype._write=function(r,t,n){var e=this._transformState;if(e.writecb=n,e.writechunk=r,e.writeencoding=t,!e.transforming){var i=this._readableState;(e.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},Transform.prototype._read=function(r){var t=this._transformState;null!==t.writechunk&&t.writecb&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0},Transform.prototype._destroy=function(r,t){var n=this;Duplex.prototype._destroy.call(this,r,function(r){t(r),n.emit("close")})}},{"./_stream_duplex":81,"core-util-is":11,inherits:18}],85:[function(require,module,exports){(function(process,global){"use strict";function WriteReq(e,t,r){this.chunk=e,this.encoding=t,this.callback=r,this.next=null}function CorkedRequest(e){var t=this;this.next=null,this.entry=null,this.finish=function(){onCorkedFinish(t,e)}}function _uint8ArrayToBuffer(e){return Buffer.from(e)}function _isUint8Array(e){return Buffer.isBuffer(e)||e instanceof OurUint8Array}function nop(){}function WritableState(e,t){Duplex=Duplex||require("./_stream_duplex"),e=e||{},this.objectMode=!!e.objectMode,t instanceof Duplex&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var r=e.highWaterMark,i=this.objectMode?16:16384;this.highWaterMark=r||0===r?r:i,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var n=!1===e.decodeStrings;this.decodeStrings=!n,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){onwrite(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new CorkedRequest(this)}function Writable(e){if(Duplex=Duplex||require("./_stream_duplex"),!(realHasInstance.call(Writable,this)||this instanceof Duplex))return new Writable(e);this._writableState=new WritableState(e,this),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),Stream.call(this)}function writeAfterEnd(e,t){var r=new Error("write after end");e.emit("error",r),processNextTick(t,r)}function validChunk(e,t,r,i){var n=!0,o=!1;return null===r?o=new TypeError("May not write null values to stream"):"string"==typeof r||void 0===r||t.objectMode||(o=new TypeError("Invalid non-string/buffer chunk")),o&&(e.emit("error",o),processNextTick(i,o),n=!1),n}function decodeChunk(e,t,r){return e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=Buffer.from(t,r)),t}function writeOrBuffer(e,t,r,i,n,o){if(!r){var s=decodeChunk(t,i,n);i!==s&&(r=!0,n="buffer",i=s)}var a=t.objectMode?1:i.length;t.length+=a;var f=t.length<t.highWaterMark;if(f||(t.needDrain=!0),t.writing||t.corked){var u=t.lastBufferedRequest;t.lastBufferedRequest={chunk:i,encoding:n,isBuf:r,callback:o,next:null},u?u.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else doWrite(e,t,!1,a,i,n,o);return f}function doWrite(e,t,r,i,n,o,s){t.writelen=i,t.writecb=s,t.writing=!0,t.sync=!0,r?e._writev(n,t.onwrite):e._write(n,o,t.onwrite),t.sync=!1}function onwriteError(e,t,r,i,n){--t.pendingcb,r?(processNextTick(n,i),processNextTick(finishMaybe,e,t),e._writableState.errorEmitted=!0,e.emit("error",i)):(n(i),e._writableState.errorEmitted=!0,e.emit("error",i),finishMaybe(e,t))}function onwriteStateUpdate(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}function onwrite(e,t){var r=e._writableState,i=r.sync,n=r.writecb;if(onwriteStateUpdate(r),t)onwriteError(e,r,i,t,n);else{var o=needFinish(r);o||r.corked||r.bufferProcessing||!r.bufferedRequest||clearBuffer(e,r),i?asyncWrite(afterWrite,e,r,o,n):afterWrite(e,r,o,n)}}function afterWrite(e,t,r,i){r||onwriteDrain(e,t),t.pendingcb--,i(),finishMaybe(e,t)}function onwriteDrain(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}function clearBuffer(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var i=t.bufferedRequestCount,n=new Array(i),o=t.corkedRequestsFree;o.entry=r;for(var s=0,a=!0;r;)n[s]=r,r.isBuf||(a=!1),r=r.next,s+=1;n.allBuffers=a,doWrite(e,t,!0,t.length,n,"",o.finish),t.pendingcb++,t.lastBufferedRequest=null,o.next?(t.corkedRequestsFree=o.next,o.next=null):t.corkedRequestsFree=new CorkedRequest(t)}else{for(;r;){var f=r.chunk,u=r.encoding,l=r.callback;if(doWrite(e,t,!1,t.objectMode?1:f.length,f,u,l),r=r.next,t.writing)break}null===r&&(t.lastBufferedRequest=null)}t.bufferedRequestCount=0,t.bufferedRequest=r,t.bufferProcessing=!1}function needFinish(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function callFinal(e,t){e._final(function(r){t.pendingcb--,r&&e.emit("error",r),t.prefinished=!0,e.emit("prefinish"),finishMaybe(e,t)})}function prefinish(e,t){t.prefinished||t.finalCalled||("function"==typeof e._final?(t.pendingcb++,t.finalCalled=!0,processNextTick(callFinal,e,t)):(t.prefinished=!0,e.emit("prefinish")))}function finishMaybe(e,t){var r=needFinish(t);return r&&(prefinish(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"))),r}function endWritable(e,t,r){t.ending=!0,finishMaybe(e,t),r&&(t.finished?processNextTick(r):e.once("finish",r)),t.ended=!0,e.writable=!1}function onCorkedFinish(e,t,r){var i=e.entry;for(e.entry=null;i;){var n=i.callback;t.pendingcb--,n(r),i=i.next}t.corkedRequestsFree?t.corkedRequestsFree.next=e:t.corkedRequestsFree=e}var processNextTick=require("process-nextick-args");module.exports=Writable;var asyncWrite=!process.browser&&["v0.10","v0.9."].indexOf(process.version.slice(0,5))>-1?setImmediate:processNextTick,Duplex;Writable.WritableState=WritableState;var util=require("core-util-is");util.inherits=require("inherits");var internalUtil={deprecate:require("util-deprecate")},Stream=require("./internal/streams/stream"),Buffer=require("safe-buffer").Buffer,OurUint8Array=global.Uint8Array||function(){},destroyImpl=require("./internal/streams/destroy");util.inherits(Writable,Stream),WritableState.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(WritableState.prototype,"buffer",{get:internalUtil.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}();var realHasInstance;"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(realHasInstance=Function.prototype[Symbol.hasInstance],Object.defineProperty(Writable,Symbol.hasInstance,{value:function(e){return!!realHasInstance.call(this,e)||e&&e._writableState instanceof WritableState}})):realHasInstance=function(e){return e instanceof this},Writable.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},Writable.prototype.write=function(e,t,r){var i=this._writableState,n=!1,o=_isUint8Array(e)&&!i.objectMode;return o&&!Buffer.isBuffer(e)&&(e=_uint8ArrayToBuffer(e)),"function"==typeof t&&(r=t,t=null),o?t="buffer":t||(t=i.defaultEncoding),"function"!=typeof r&&(r=nop),i.ended?writeAfterEnd(this,r):(o||validChunk(this,i,e,r))&&(i.pendingcb++,n=writeOrBuffer(this,i,o,e,t,r)),n},Writable.prototype.cork=function(){this._writableState.corked++},Writable.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.finished||e.bufferProcessing||!e.bufferedRequest||clearBuffer(this,e))},Writable.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},Writable.prototype._write=function(e,t,r){r(new Error("_write() is not implemented"))},Writable.prototype._writev=null,Writable.prototype.end=function(e,t,r){var i=this._writableState;"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!==e&&void 0!==e&&this.write(e,t),i.corked&&(i.corked=1,this.uncork()),i.ending||i.finished||endWritable(this,i,r)},Object.defineProperty(Writable.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),Writable.prototype.destroy=destroyImpl.destroy,Writable.prototype._undestroy=destroyImpl.undestroy,Writable.prototype._destroy=function(e,t){this.end(),t(e)}}).call(this,require("_process"),typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{"./_stream_duplex":81,"./internal/streams/destroy":87,"./internal/streams/stream":88,_process:76,"core-util-is":11,inherits:18,"process-nextick-args":75,"safe-buffer":90,"util-deprecate":101}],86:[function(require,module,exports){"use strict";function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function copyBuffer(t,e,h){t.copy(e,h)}var Buffer=require("safe-buffer").Buffer;module.exports=function(){function t(){_classCallCheck(this,t),this.head=null,this.tail=null,this.length=0}return t.prototype.push=function(t){var e={data:t,next:null};this.length>0?this.tail.next=e:this.head=e,this.tail=e,++this.length},t.prototype.unshift=function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length},t.prototype.shift=function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}},t.prototype.clear=function(){this.head=this.tail=null,this.length=0},t.prototype.join=function(t){if(0===this.length)return"";for(var e=this.head,h=""+e.data;e=e.next;)h+=t+e.data;return h},t.prototype.concat=function(t){if(0===this.length)return Buffer.alloc(0);if(1===this.length)return this.head.data;for(var e=Buffer.allocUnsafe(t>>>0),h=this.head,n=0;h;)copyBuffer(h.data,e,n),n+=h.data.length,h=h.next;return e},t}()},{"safe-buffer":90}],87:[function(require,module,exports){"use strict";function destroy(t,e){var r=this,i=this._readableState&&this._readableState.destroyed,a=this._writableState&&this._writableState.destroyed;if(i||a)return void(e?e(t):!t||this._writableState&&this._writableState.errorEmitted||processNextTick(emitErrorNT,this,t));this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,function(t){!e&&t?(processNextTick(emitErrorNT,r,t),
  r._writableState&&(r._writableState.errorEmitted=!0)):e&&e(t)})}function undestroy(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function emitErrorNT(t,e){t.emit("error",e)}var processNextTick=require("process-nextick-args");module.exports={destroy:destroy,undestroy:undestroy}},{"process-nextick-args":75}],88:[function(require,module,exports){module.exports=require("events").EventEmitter},{events:14}],89:[function(require,module,exports){exports=module.exports=require("./lib/_stream_readable.js"),exports.Stream=exports,exports.Readable=exports,exports.Writable=require("./lib/_stream_writable.js"),exports.Duplex=require("./lib/_stream_duplex.js"),exports.Transform=require("./lib/_stream_transform.js"),exports.PassThrough=require("./lib/_stream_passthrough.js")},{"./lib/_stream_duplex.js":81,"./lib/_stream_passthrough.js":82,"./lib/_stream_readable.js":83,"./lib/_stream_transform.js":84,"./lib/_stream_writable.js":85}],90:[function(require,module,exports){function copyProps(f,r){for(var e in f)r[e]=f[e]}function SafeBuffer(f,r,e){return Buffer(f,r,e)}var buffer=require("buffer"),Buffer=buffer.Buffer;Buffer.from&&Buffer.alloc&&Buffer.allocUnsafe&&Buffer.allocUnsafeSlow?module.exports=buffer:(copyProps(buffer,exports),exports.Buffer=SafeBuffer),copyProps(Buffer,SafeBuffer),SafeBuffer.from=function(f,r,e){if("number"==typeof f)throw new TypeError("Argument must not be a number");return Buffer(f,r,e)},SafeBuffer.alloc=function(f,r,e){if("number"!=typeof f)throw new TypeError("Argument must be a number");var u=Buffer(f);return void 0!==r?"string"==typeof e?u.fill(r,e):u.fill(r):u.fill(0),u},SafeBuffer.allocUnsafe=function(f){if("number"!=typeof f)throw new TypeError("Argument must be a number");return Buffer(f)},SafeBuffer.allocUnsafeSlow=function(f){if("number"!=typeof f)throw new TypeError("Argument must be a number");return buffer.SlowBuffer(f)}},{buffer:8}],91:[function(require,module,exports){(function(global){var ClientRequest=require("./lib/request"),extend=require("xtend"),statusCodes=require("builtin-status-codes"),url=require("url"),http=exports;http.request=function(t,e){t="string"==typeof t?url.parse(t):extend(t);var r=-1===global.location.protocol.search(/^https?:$/)?"http:":"",s=t.protocol||r,o=t.hostname||t.host,n=t.port,u=t.path||"/";o&&-1!==o.indexOf(":")&&(o="["+o+"]"),t.url=(o?s+"//"+o:"")+(n?":"+n:"")+u,t.method=(t.method||"GET").toUpperCase(),t.headers=t.headers||{};var C=new ClientRequest(t);return e&&C.on("response",e),C},http.get=function(t,e){var r=http.request(t,e);return r.end(),r},http.Agent=function(){},http.Agent.defaultMaxSockets=4,http.STATUS_CODES=statusCodes,http.METHODS=["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"]}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{"./lib/request":93,"builtin-status-codes":9,url:99,xtend:173}],92:[function(require,module,exports){(function(global){function getXHR(){if(void 0!==xhr)return xhr;if(global.XMLHttpRequest){xhr=new global.XMLHttpRequest;try{xhr.open("GET",global.XDomainRequest?"/":"https://example.com")}catch(e){xhr=null}}else xhr=null;return xhr}function checkTypeSupport(e){var r=getXHR();if(!r)return!1;try{return r.responseType=e,r.responseType===e}catch(e){}return!1}function isFunction(e){return"function"==typeof e}exports.fetch=isFunction(global.fetch)&&isFunction(global.ReadableStream),exports.blobConstructor=!1;try{new Blob([new ArrayBuffer(1)]),exports.blobConstructor=!0}catch(e){}var xhr,haveArrayBuffer=void 0!==global.ArrayBuffer,haveSlice=haveArrayBuffer&&isFunction(global.ArrayBuffer.prototype.slice);exports.arraybuffer=exports.fetch||haveArrayBuffer&&checkTypeSupport("arraybuffer"),exports.msstream=!exports.fetch&&haveSlice&&checkTypeSupport("ms-stream"),exports.mozchunkedarraybuffer=!exports.fetch&&haveArrayBuffer&&checkTypeSupport("moz-chunked-arraybuffer"),exports.overrideMimeType=exports.fetch||!!getXHR()&&isFunction(getXHR().overrideMimeType),exports.vbArray=isFunction(global.VBArray),xhr=null}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{}],93:[function(require,module,exports){(function(process,global,Buffer){function decideMode(e,t){return capability.fetch&&t?"fetch":capability.mozchunkedarraybuffer?"moz-chunked-arraybuffer":capability.msstream?"ms-stream":capability.arraybuffer&&e?"arraybuffer":capability.vbArray&&e?"text:vbarray":"text"}function statusValid(e){try{var t=e.status;return null!==t&&0!==t}catch(e){return!1}}var capability=require("./capability"),inherits=require("inherits"),response=require("./response"),stream=require("readable-stream"),toArrayBuffer=require("to-arraybuffer"),IncomingMessage=response.IncomingMessage,rStates=response.readyStates,ClientRequest=module.exports=function(e){var t=this;stream.Writable.call(t),t._opts=e,t._body=[],t._headers={},e.auth&&t.setHeader("Authorization","Basic "+new Buffer(e.auth).toString("base64")),Object.keys(e.headers).forEach(function(r){t.setHeader(r,e.headers[r])});var r,o=!0;if("disable-fetch"===e.mode||"timeout"in e)o=!1,r=!0;else if("prefer-streaming"===e.mode)r=!1;else if("allow-wrong-content-type"===e.mode)r=!capability.overrideMimeType;else{if(e.mode&&"default"!==e.mode&&"prefer-fast"!==e.mode)throw new Error("Invalid value for opts.mode");r=!0}t._mode=decideMode(r,o),t.on("finish",function(){t._onFinish()})};inherits(ClientRequest,stream.Writable),ClientRequest.prototype.setHeader=function(e,t){var r=this,o=e.toLowerCase();-1===unsafeHeaders.indexOf(o)&&(r._headers[o]={name:e,value:t})},ClientRequest.prototype.getHeader=function(e){var t=this._headers[e.toLowerCase()];return t?t.value:null},ClientRequest.prototype.removeHeader=function(e){delete this._headers[e.toLowerCase()]},ClientRequest.prototype._onFinish=function(){var e=this;if(!e._destroyed){var t=e._opts,r=e._headers,o=null;"GET"!==t.method&&"HEAD"!==t.method&&(o=capability.blobConstructor?new global.Blob(e._body.map(function(e){return toArrayBuffer(e)}),{type:(r["content-type"]||{}).value||""}):Buffer.concat(e._body).toString());var n=[];if(Object.keys(r).forEach(function(e){var t=r[e].name,o=r[e].value;Array.isArray(o)?o.forEach(function(e){n.push([t,e])}):n.push([t,o])}),"fetch"===e._mode)global.fetch(e._opts.url,{method:e._opts.method,headers:n,body:o||void 0,mode:"cors",credentials:t.withCredentials?"include":"same-origin"}).then(function(t){e._fetchResponse=t,e._connect()},function(t){e.emit("error",t)});else{var s=e._xhr=new global.XMLHttpRequest;try{s.open(e._opts.method,e._opts.url,!0)}catch(t){return void process.nextTick(function(){e.emit("error",t)})}"responseType"in s&&(s.responseType=e._mode.split(":")[0]),"withCredentials"in s&&(s.withCredentials=!!t.withCredentials),"text"===e._mode&&"overrideMimeType"in s&&s.overrideMimeType("text/plain; charset=x-user-defined"),"timeout"in t&&(s.timeout=t.timeout,s.ontimeout=function(){e.emit("timeout")}),n.forEach(function(e){s.setRequestHeader(e[0],e[1])}),e._response=null,s.onreadystatechange=function(){switch(s.readyState){case rStates.LOADING:case rStates.DONE:e._onXHRProgress()}},"moz-chunked-arraybuffer"===e._mode&&(s.onprogress=function(){e._onXHRProgress()}),s.onerror=function(){e._destroyed||e.emit("error",new Error("XHR error"))};try{s.send(o)}catch(t){return void process.nextTick(function(){e.emit("error",t)})}}}},ClientRequest.prototype._onXHRProgress=function(){var e=this;statusValid(e._xhr)&&!e._destroyed&&(e._response||e._connect(),e._response._onXHRProgress())},ClientRequest.prototype._connect=function(){var e=this;e._destroyed||(e._response=new IncomingMessage(e._xhr,e._fetchResponse,e._mode),e._response.on("error",function(t){e.emit("error",t)}),e.emit("response",e._response))},ClientRequest.prototype._write=function(e,t,r){this._body.push(e),r()},ClientRequest.prototype.abort=ClientRequest.prototype.destroy=function(){var e=this;e._destroyed=!0,e._response&&(e._response._destroyed=!0),e._xhr&&e._xhr.abort()},ClientRequest.prototype.end=function(e,t,r){var o=this;"function"==typeof e&&(r=e,e=void 0),stream.Writable.prototype.end.call(o,e,t,r)},ClientRequest.prototype.flushHeaders=function(){},ClientRequest.prototype.setTimeout=function(){},ClientRequest.prototype.setNoDelay=function(){},ClientRequest.prototype.setSocketKeepAlive=function(){};var unsafeHeaders=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","user-agent","via"]}).call(this,require("_process"),typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{},require("buffer").Buffer)},{"./capability":92,"./response":94,_process:76,buffer:8,inherits:18,"readable-stream":89,"to-arraybuffer":98}],94:[function(require,module,exports){(function(process,global,Buffer){var capability=require("./capability"),inherits=require("inherits"),stream=require("readable-stream"),rStates=exports.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},IncomingMessage=exports.IncomingMessage=function(e,r,s){function a(){n.read().then(function(e){if(!t._destroyed){if(e.done)return void t.push(null);t.push(new Buffer(e.value)),a()}}).catch(function(e){t.emit("error",e)})}var t=this;if(stream.Readable.call(t),t._mode=s,t.headers={},t.rawHeaders=[],t.trailers={},t.rawTrailers=[],t.on("end",function(){process.nextTick(function(){t.emit("close")})}),"fetch"===s){t._fetchResponse=r,t.url=r.url,t.statusCode=r.status,t.statusMessage=r.statusText,r.headers.forEach(function(e,r){t.headers[r.toLowerCase()]=e,t.rawHeaders.push(r,e)});var n=r.body.getReader();a()}else{t._xhr=e,t._pos=0,t.url=e.responseURL,t.statusCode=e.status,t.statusMessage=e.statusText;if(e.getAllResponseHeaders().split(/\r?\n/).forEach(function(e){var r=e.match(/^([^:]+):\s*(.*)/);if(r){var s=r[1].toLowerCase();"set-cookie"===s?(void 0===t.headers[s]&&(t.headers[s]=[]),t.headers[s].push(r[2])):void 0!==t.headers[s]?t.headers[s]+=", "+r[2]:t.headers[s]=r[2],t.rawHeaders.push(r[1],r[2])}}),t._charset="x-user-defined",!capability.overrideMimeType){var o=t.rawHeaders["mime-type"];if(o){var i=o.match(/;\s*charset=([^;])(;|$)/);i&&(t._charset=i[1].toLowerCase())}t._charset||(t._charset="utf-8")}}};inherits(IncomingMessage,stream.Readable),IncomingMessage.prototype._read=function(){},IncomingMessage.prototype._onXHRProgress=function(){var e=this,r=e._xhr,s=null;switch(e._mode){case"text:vbarray":if(r.readyState!==rStates.DONE)break;try{s=new global.VBArray(r.responseBody).toArray()}catch(e){}if(null!==s){e.push(new Buffer(s));break}case"text":try{s=r.responseText}catch(r){e._mode="text:vbarray";break}if(s.length>e._pos){var a=s.substr(e._pos);if("x-user-defined"===e._charset){for(var t=new Buffer(a.length),n=0;n<a.length;n++)t[n]=255&a.charCodeAt(n);e.push(t)}else e.push(a,e._charset);e._pos=s.length}break;case"arraybuffer":if(r.readyState!==rStates.DONE||!r.response)break;s=r.response,e.push(new Buffer(new Uint8Array(s)));break;case"moz-chunked-arraybuffer":if(s=r.response,r.readyState!==rStates.LOADING||!s)break;e.push(new Buffer(new Uint8Array(s)));break;case"ms-stream":if(s=r.response,r.readyState!==rStates.LOADING)break;var o=new global.MSStreamReader;o.onprogress=function(){o.result.byteLength>e._pos&&(e.push(new Buffer(new Uint8Array(o.result.slice(e._pos)))),e._pos=o.result.byteLength)},o.onload=function(){e.push(null)},o.readAsArrayBuffer(s)}e._xhr.readyState===rStates.DONE&&"ms-stream"!==e._mode&&e.push(null)}}).call(this,require("_process"),typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{},require("buffer").Buffer)},{"./capability":92,_process:76,buffer:8,inherits:18,"readable-stream":89}],95:[function(require,module,exports){"use strict";function _normalizeEncoding(t){if(!t)return"utf8";for(var e;;)switch(t){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}function normalizeEncoding(t){var e=_normalizeEncoding(t);if("string"!=typeof e&&(Buffer.isEncoding===isEncoding||!isEncoding(t)))throw new Error("Unknown encoding: "+t);return e||t}function StringDecoder(t){this.encoding=normalizeEncoding(t);var e;switch(this.encoding){case"utf16le":this.text=utf16Text,this.end=utf16End,e=4;break;case"utf8":this.fillLast=utf8FillLast,e=4;break;case"base64":this.text=base64Text,this.end=base64End,e=3;break;default:return this.write=simpleWrite,void(this.end=simpleEnd)}this.lastNeed=0,this.lastTotal=0,this.lastChar=Buffer.allocUnsafe(e)}function utf8CheckByte(t){return t<=127?0:t>>5==6?2:t>>4==14?3:t>>3==30?4:-1}function utf8CheckIncomplete(t,e,s){var i=e.length-1;if(i<s)return 0;var a=utf8CheckByte(e[i]);return a>=0?(a>0&&(t.lastNeed=a-1),a):--i<s?0:(a=utf8CheckByte(e[i]))>=0?(a>0&&(t.lastNeed=a-2),a):--i<s?0:(a=utf8CheckByte(e[i]),a>=0?(a>0&&(2===a?a=0:t.lastNeed=a-3),a):0)}function utf8CheckExtraBytes(t,e,s){if(128!=(192&e[0]))return t.lastNeed=0,"�".repeat(s);if(t.lastNeed>1&&e.length>1){if(128!=(192&e[1]))return t.lastNeed=1,"�".repeat(s+1);if(t.lastNeed>2&&e.length>2&&128!=(192&e[2]))return t.lastNeed=2,"�".repeat(s+2)}}function utf8FillLast(t){var e=this.lastTotal-this.lastNeed,s=utf8CheckExtraBytes(this,t,e);return void 0!==s?s:this.lastNeed<=t.length?(t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(t.copy(this.lastChar,e,0,t.length),void(this.lastNeed-=t.length))}function utf8Text(t,e){var s=utf8CheckIncomplete(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=s;var i=t.length-(s-this.lastNeed);return t.copy(this.lastChar,0,i),t.toString("utf8",e,i)}function utf8End(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"�".repeat(this.lastTotal-this.lastNeed):e}function utf16Text(t,e){if((t.length-e)%2==0){var s=t.toString("utf16le",e);if(s){var i=s.charCodeAt(s.length-1);if(i>=55296&&i<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],s.slice(0,-1)}return s}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function utf16End(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var s=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,s)}return e}function base64Text(t,e){var s=(t.length-e)%3;return 0===s?t.toString("base64",e):(this.lastNeed=3-s,this.lastTotal=3,1===s?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-s))}function base64End(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function simpleWrite(t){return t.toString(this.encoding)}function simpleEnd(t){return t&&t.length?this.write(t):""}var Buffer=require("safe-buffer").Buffer,isEncoding=Buffer.isEncoding||function(t){switch((t=""+t)&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};exports.StringDecoder=StringDecoder,StringDecoder.prototype.write=function(t){if(0===t.length)return"";var e,s;if(this.lastNeed){if(void 0===(e=this.fillLast(t)))return"";s=this.lastNeed,this.lastNeed=0}else s=0;return s<t.length?e?e+this.text(t,s):this.text(t,s):e||""},StringDecoder.prototype.end=utf8End,StringDecoder.prototype.text=utf8Text,StringDecoder.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length}},{"safe-buffer":90}],96:[function(require,module,exports){module.exports=["get","put","post","delete","options","head","patch"]},{}],97:[function(require,module,exports){module.exports={title:"A JSON Schema for Swagger 2.0 API.",id:"http://swagger.io/v2/schema.json#",$schema:"http://json-schema.org/draft-04/schema#",type:"object",required:["swagger","info","paths"],additionalProperties:false,patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}},properties:{swagger:{type:"string",enum:["2.0"],description:"The Swagger version of this document."},info:{$ref:"#/definitions/info"},host:{type:"string",pattern:"^[^{}/ :\\\\]+(?::\\d+)?$",description:"The host (name or ip) of the API. Example: 'swagger.io'"},basePath:{type:"string",pattern:"^/",description:"The base path to the API. Example: '/api'."},schemes:{$ref:"#/definitions/schemesList"},consumes:{description:"A list of MIME types accepted by the API.",$ref:"#/definitions/mediaTypeList"},produces:{description:"A list of MIME types the API can produce.",$ref:"#/definitions/mediaTypeList"},paths:{$ref:"#/definitions/paths"},definitions:{$ref:"#/definitions/definitions"},parameters:{$ref:"#/definitions/parameterDefinitions"},responses:{$ref:"#/definitions/responseDefinitions"},security:{$ref:"#/definitions/security"},securityDefinitions:{$ref:"#/definitions/securityDefinitions"},tags:{type:"array",items:{$ref:"#/definitions/tag"},uniqueItems:true},externalDocs:{$ref:"#/definitions/externalDocs"}},definitions:{info:{type:"object",description:"General information about the API.",required:["version","title"],additionalProperties:false,patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}},properties:{title:{type:"string",description:"A unique and precise title of the API."},version:{type:"string",description:"A semantic version number of the API."},description:{type:"string",description:"A longer description of the API. Should be different from the title.  GitHub Flavored Markdown is allowed."},termsOfService:{type:"string",description:"The terms of service for the API."},contact:{$ref:"#/definitions/contact"},license:{$ref:"#/definitions/license"}}},contact:{type:"object",description:"Contact information for the owners of the API.",additionalProperties:false,properties:{name:{type:"string",description:"The identifying name of the contact person/organization."},url:{type:"string",description:"The URL pointing to the contact information.",format:"uri"},email:{type:"string",description:"The email address of the contact person/organization.",format:"email"}},patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}}},license:{type:"object",required:["name"],additionalProperties:false,properties:{name:{type:"string",description:"The name of the license type. It's encouraged to use an OSI compatible license."},url:{type:"string",description:"The URL pointing to the license.",format:"uri"}},patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}}},paths:{type:"object",description:"Relative paths to the individual endpoints. They must be relative to the 'basePath'.",patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"},"^/":{$ref:"#/definitions/pathItem"}},additionalProperties:false},definitions:{type:"object",additionalProperties:{$ref:"#/definitions/schema"},description:"One or more JSON objects describing the schemas being consumed and produced by the API."},parameterDefinitions:{type:"object",additionalProperties:{$ref:"#/definitions/parameter"},description:"One or more JSON representations for parameters"},responseDefinitions:{type:"object",additionalProperties:{$ref:"#/definitions/response"},description:"One or more JSON representations for parameters"},externalDocs:{type:"object",additionalProperties:false,description:"information about external documentation",required:["url"],properties:{description:{type:"string"},url:{type:"string",format:"uri"}},patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}}},examples:{type:"object",additionalProperties:true},mimeType:{type:"string",description:"The MIME type of the HTTP message."},operation:{type:"object",required:["responses"],additionalProperties:false,patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}},properties:{tags:{type:"array",items:{type:"string"},uniqueItems:true},summary:{type:"string",description:"A brief summary of the operation."},description:{type:"string",description:"A longer description of the operation, GitHub Flavored Markdown is allowed."},externalDocs:{$ref:"#/definitions/externalDocs"},operationId:{type:"string",description:"A unique identifier of the operation."},produces:{description:"A list of MIME types the API can produce.",$ref:"#/definitions/mediaTypeList"},consumes:{description:"A list of MIME types the API can consume.",$ref:"#/definitions/mediaTypeList"},parameters:{$ref:"#/definitions/parametersList"},responses:{$ref:"#/definitions/responses"},schemes:{$ref:"#/definitions/schemesList"},deprecated:{type:"boolean",default:false},security:{$ref:"#/definitions/security"}}},pathItem:{type:"object",additionalProperties:false,patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}},properties:{$ref:{type:"string"},get:{$ref:"#/definitions/operation"},put:{$ref:"#/definitions/operation"},post:{$ref:"#/definitions/operation"},delete:{$ref:"#/definitions/operation"},options:{$ref:"#/definitions/operation"},head:{$ref:"#/definitions/operation"},patch:{$ref:"#/definitions/operation"},parameters:{$ref:"#/definitions/parametersList"}}},responses:{type:"object",description:"Response objects names can either be any valid HTTP status code or 'default'.",minProperties:1,additionalProperties:false,patternProperties:{"^([0-9]{3})$|^(default)$":{$ref:"#/definitions/responseValue"},"^x-":{$ref:"#/definitions/vendorExtension"}},not:{type:"object",additionalProperties:false,patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}}}},responseValue:{oneOf:[{$ref:"#/definitions/response"},{$ref:"#/definitions/jsonReference"}]},response:{type:"object",required:["description"],properties:{description:{type:"string"},schema:{oneOf:[{$ref:"#/definitions/schema"},{$ref:"#/definitions/fileSchema"}]},headers:{$ref:"#/definitions/headers"},examples:{$ref:"#/definitions/examples"}},additionalProperties:false,patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}}},headers:{type:"object",additionalProperties:{$ref:"#/definitions/header"}},header:{type:"object",additionalProperties:false,required:["type"],properties:{type:{type:"string",enum:["string","number","integer","boolean","array"]},format:{type:"string"},items:{$ref:"#/definitions/primitivesItems"},collectionFormat:{$ref:"#/definitions/collectionFormat"},default:{$ref:"#/definitions/default"},maximum:{$ref:"#/definitions/maximum"},exclusiveMaximum:{$ref:"#/definitions/exclusiveMaximum"},minimum:{$ref:"#/definitions/minimum"},exclusiveMinimum:{$ref:"#/definitions/exclusiveMinimum"},maxLength:{$ref:"#/definitions/maxLength"},minLength:{$ref:"#/definitions/minLength"},pattern:{$ref:"#/definitions/pattern"},maxItems:{$ref:"#/definitions/maxItems"},minItems:{$ref:"#/definitions/minItems"},uniqueItems:{$ref:"#/definitions/uniqueItems"},enum:{$ref:"#/definitions/enum"},multipleOf:{$ref:"#/definitions/multipleOf"},description:{type:"string"}},patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}}},vendorExtension:{description:"Any property starting with x- is valid.",additionalProperties:true,additionalItems:true},bodyParameter:{type:"object",required:["name","in","schema"],patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}},properties:{description:{type:"string",description:"A brief description of the parameter. This could contain examples of use.  GitHub Flavored Markdown is allowed."},name:{type:"string",description:"The name of the parameter."},in:{type:"string",description:"Determines the location of the parameter.",enum:["body"]},required:{type:"boolean",description:"Determines whether or not this parameter is required or optional.",default:false},schema:{$ref:"#/definitions/schema"}},additionalProperties:false},headerParameterSubSchema:{additionalProperties:false,patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}},properties:{required:{type:"boolean",description:"Determines whether or not this parameter is required or optional.",default:false},in:{type:"string",description:"Determines the location of the parameter.",enum:["header"]},description:{type:"string",description:"A brief description of the parameter. This could contain examples of use.  GitHub Flavored Markdown is allowed."},name:{type:"string",description:"The name of the parameter."},type:{type:"string",enum:["string","number","boolean","integer","array"]},format:{type:"string"},items:{$ref:"#/definitions/primitivesItems"},collectionFormat:{$ref:"#/definitions/collectionFormat"},default:{$ref:"#/definitions/default"},maximum:{$ref:"#/definitions/maximum"},exclusiveMaximum:{$ref:"#/definitions/exclusiveMaximum"},minimum:{$ref:"#/definitions/minimum"},exclusiveMinimum:{$ref:"#/definitions/exclusiveMinimum"},maxLength:{$ref:"#/definitions/maxLength"},minLength:{$ref:"#/definitions/minLength"},pattern:{$ref:"#/definitions/pattern"},maxItems:{$ref:"#/definitions/maxItems"},minItems:{$ref:"#/definitions/minItems"},uniqueItems:{$ref:"#/definitions/uniqueItems"},enum:{$ref:"#/definitions/enum"},multipleOf:{$ref:"#/definitions/multipleOf"}}},queryParameterSubSchema:{additionalProperties:false,patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}},properties:{required:{type:"boolean",description:"Determines whether or not this parameter is required or optional.",default:false},in:{type:"string",description:"Determines the location of the parameter.",enum:["query"]},description:{type:"string",description:"A brief description of the parameter. This could contain examples of use.  GitHub Flavored Markdown is allowed."},name:{type:"string",description:"The name of the parameter."},allowEmptyValue:{type:"boolean",default:false,description:"allows sending a parameter by name only or with an empty value."},type:{type:"string",enum:["string","number","boolean","integer","array"]},format:{type:"string"},items:{$ref:"#/definitions/primitivesItems"},collectionFormat:{$ref:"#/definitions/collectionFormatWithMulti"},default:{$ref:"#/definitions/default"},maximum:{$ref:"#/definitions/maximum"},exclusiveMaximum:{$ref:"#/definitions/exclusiveMaximum"},minimum:{$ref:"#/definitions/minimum"},exclusiveMinimum:{$ref:"#/definitions/exclusiveMinimum"},maxLength:{$ref:"#/definitions/maxLength"},minLength:{$ref:"#/definitions/minLength"},pattern:{$ref:"#/definitions/pattern"},maxItems:{$ref:"#/definitions/maxItems"},minItems:{$ref:"#/definitions/minItems"},uniqueItems:{$ref:"#/definitions/uniqueItems"},enum:{$ref:"#/definitions/enum"},multipleOf:{$ref:"#/definitions/multipleOf"}}},formDataParameterSubSchema:{additionalProperties:false,patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}},properties:{required:{type:"boolean",description:"Determines whether or not this parameter is required or optional.",default:false},in:{type:"string",description:"Determines the location of the parameter.",enum:["formData"]},description:{type:"string",description:"A brief description of the parameter. This could contain examples of use.  GitHub Flavored Markdown is allowed."},name:{type:"string",description:"The name of the parameter."},allowEmptyValue:{type:"boolean",default:false,description:"allows sending a parameter by name only or with an empty value."},type:{type:"string",enum:["string","number","boolean","integer","array","file"]},format:{type:"string"},items:{$ref:"#/definitions/primitivesItems"},collectionFormat:{$ref:"#/definitions/collectionFormatWithMulti"},default:{$ref:"#/definitions/default"},maximum:{$ref:"#/definitions/maximum"},exclusiveMaximum:{$ref:"#/definitions/exclusiveMaximum"},minimum:{$ref:"#/definitions/minimum"},exclusiveMinimum:{$ref:"#/definitions/exclusiveMinimum"},maxLength:{$ref:"#/definitions/maxLength"},minLength:{$ref:"#/definitions/minLength"},pattern:{$ref:"#/definitions/pattern"},maxItems:{$ref:"#/definitions/maxItems"},minItems:{$ref:"#/definitions/minItems"},uniqueItems:{$ref:"#/definitions/uniqueItems"},enum:{$ref:"#/definitions/enum"},multipleOf:{$ref:"#/definitions/multipleOf"}}},pathParameterSubSchema:{additionalProperties:false,patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}},required:["required"],properties:{required:{type:"boolean",enum:[true],description:"Determines whether or not this parameter is required or optional."},in:{type:"string",description:"Determines the location of the parameter.",enum:["path"]},description:{type:"string",description:"A brief description of the parameter. This could contain examples of use.  GitHub Flavored Markdown is allowed."},name:{type:"string",description:"The name of the parameter."},type:{type:"string",enum:["string","number","boolean","integer","array"]},format:{type:"string"},items:{$ref:"#/definitions/primitivesItems"},collectionFormat:{$ref:"#/definitions/collectionFormat"},default:{$ref:"#/definitions/default"},maximum:{$ref:"#/definitions/maximum"},exclusiveMaximum:{$ref:"#/definitions/exclusiveMaximum"},minimum:{$ref:"#/definitions/minimum"},exclusiveMinimum:{$ref:"#/definitions/exclusiveMinimum"},maxLength:{$ref:"#/definitions/maxLength"},minLength:{$ref:"#/definitions/minLength"},pattern:{$ref:"#/definitions/pattern"},maxItems:{$ref:"#/definitions/maxItems"},minItems:{$ref:"#/definitions/minItems"},uniqueItems:{$ref:"#/definitions/uniqueItems"},enum:{$ref:"#/definitions/enum"},multipleOf:{$ref:"#/definitions/multipleOf"}}},nonBodyParameter:{type:"object",required:["name","in","type"],oneOf:[{$ref:"#/definitions/headerParameterSubSchema"},{$ref:"#/definitions/formDataParameterSubSchema"},{$ref:"#/definitions/queryParameterSubSchema"},{$ref:"#/definitions/pathParameterSubSchema"}]},parameter:{oneOf:[{$ref:"#/definitions/bodyParameter"},{$ref:"#/definitions/nonBodyParameter"}]},schema:{type:"object",description:"A deterministic version of a JSON Schema object.",patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}},properties:{$ref:{type:"string"},format:{type:"string"},title:{$ref:"http://json-schema.org/draft-04/schema#/properties/title"},description:{$ref:"http://json-schema.org/draft-04/schema#/properties/description"},default:{$ref:"http://json-schema.org/draft-04/schema#/properties/default"},multipleOf:{$ref:"http://json-schema.org/draft-04/schema#/properties/multipleOf"},maximum:{$ref:"http://json-schema.org/draft-04/schema#/properties/maximum"},exclusiveMaximum:{$ref:"http://json-schema.org/draft-04/schema#/properties/exclusiveMaximum"},minimum:{$ref:"http://json-schema.org/draft-04/schema#/properties/minimum"},exclusiveMinimum:{$ref:"http://json-schema.org/draft-04/schema#/properties/exclusiveMinimum"},maxLength:{$ref:"http://json-schema.org/draft-04/schema#/definitions/positiveInteger"},minLength:{$ref:"http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0"},pattern:{$ref:"http://json-schema.org/draft-04/schema#/properties/pattern"},maxItems:{$ref:"http://json-schema.org/draft-04/schema#/definitions/positiveInteger"},minItems:{$ref:"http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0"},uniqueItems:{$ref:"http://json-schema.org/draft-04/schema#/properties/uniqueItems"},maxProperties:{$ref:"http://json-schema.org/draft-04/schema#/definitions/positiveInteger"},minProperties:{
  $ref:"http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0"},required:{$ref:"http://json-schema.org/draft-04/schema#/definitions/stringArray"},enum:{$ref:"http://json-schema.org/draft-04/schema#/properties/enum"},additionalProperties:{anyOf:[{$ref:"#/definitions/schema"},{type:"boolean"}],default:{}},type:{$ref:"http://json-schema.org/draft-04/schema#/properties/type"},items:{anyOf:[{$ref:"#/definitions/schema"},{type:"array",minItems:1,items:{$ref:"#/definitions/schema"}}],default:{}},allOf:{type:"array",minItems:1,items:{$ref:"#/definitions/schema"}},properties:{type:"object",additionalProperties:{$ref:"#/definitions/schema"},default:{}},discriminator:{type:"string"},readOnly:{type:"boolean",default:false},xml:{$ref:"#/definitions/xml"},externalDocs:{$ref:"#/definitions/externalDocs"},example:{}},additionalProperties:false},fileSchema:{type:"object",description:"A deterministic version of a JSON Schema object.",patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}},required:["type"],properties:{format:{type:"string"},title:{$ref:"http://json-schema.org/draft-04/schema#/properties/title"},description:{$ref:"http://json-schema.org/draft-04/schema#/properties/description"},default:{$ref:"http://json-schema.org/draft-04/schema#/properties/default"},required:{$ref:"http://json-schema.org/draft-04/schema#/definitions/stringArray"},type:{type:"string",enum:["file"]},readOnly:{type:"boolean",default:false},externalDocs:{$ref:"#/definitions/externalDocs"},example:{}},additionalProperties:false},primitivesItems:{type:"object",additionalProperties:false,properties:{type:{type:"string",enum:["string","number","integer","boolean","array"]},format:{type:"string"},items:{$ref:"#/definitions/primitivesItems"},collectionFormat:{$ref:"#/definitions/collectionFormat"},default:{$ref:"#/definitions/default"},maximum:{$ref:"#/definitions/maximum"},exclusiveMaximum:{$ref:"#/definitions/exclusiveMaximum"},minimum:{$ref:"#/definitions/minimum"},exclusiveMinimum:{$ref:"#/definitions/exclusiveMinimum"},maxLength:{$ref:"#/definitions/maxLength"},minLength:{$ref:"#/definitions/minLength"},pattern:{$ref:"#/definitions/pattern"},maxItems:{$ref:"#/definitions/maxItems"},minItems:{$ref:"#/definitions/minItems"},uniqueItems:{$ref:"#/definitions/uniqueItems"},enum:{$ref:"#/definitions/enum"},multipleOf:{$ref:"#/definitions/multipleOf"}},patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}}},security:{type:"array",items:{$ref:"#/definitions/securityRequirement"},uniqueItems:true},securityRequirement:{type:"object",additionalProperties:{type:"array",items:{type:"string"},uniqueItems:true}},xml:{type:"object",additionalProperties:false,properties:{name:{type:"string"},namespace:{type:"string"},prefix:{type:"string"},attribute:{type:"boolean",default:false},wrapped:{type:"boolean",default:false}},patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}}},tag:{type:"object",additionalProperties:false,required:["name"],properties:{name:{type:"string"},description:{type:"string"},externalDocs:{$ref:"#/definitions/externalDocs"}},patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}}},securityDefinitions:{type:"object",additionalProperties:{oneOf:[{$ref:"#/definitions/basicAuthenticationSecurity"},{$ref:"#/definitions/apiKeySecurity"},{$ref:"#/definitions/oauth2ImplicitSecurity"},{$ref:"#/definitions/oauth2PasswordSecurity"},{$ref:"#/definitions/oauth2ApplicationSecurity"},{$ref:"#/definitions/oauth2AccessCodeSecurity"}]}},basicAuthenticationSecurity:{type:"object",additionalProperties:false,required:["type"],properties:{type:{type:"string",enum:["basic"]},description:{type:"string"}},patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}}},apiKeySecurity:{type:"object",additionalProperties:false,required:["type","name","in"],properties:{type:{type:"string",enum:["apiKey"]},name:{type:"string"},in:{type:"string",enum:["header","query"]},description:{type:"string"}},patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}}},oauth2ImplicitSecurity:{type:"object",additionalProperties:false,required:["type","flow","authorizationUrl"],properties:{type:{type:"string",enum:["oauth2"]},flow:{type:"string",enum:["implicit"]},scopes:{$ref:"#/definitions/oauth2Scopes"},authorizationUrl:{type:"string",format:"uri"},description:{type:"string"}},patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}}},oauth2PasswordSecurity:{type:"object",additionalProperties:false,required:["type","flow","tokenUrl"],properties:{type:{type:"string",enum:["oauth2"]},flow:{type:"string",enum:["password"]},scopes:{$ref:"#/definitions/oauth2Scopes"},tokenUrl:{type:"string",format:"uri"},description:{type:"string"}},patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}}},oauth2ApplicationSecurity:{type:"object",additionalProperties:false,required:["type","flow","tokenUrl"],properties:{type:{type:"string",enum:["oauth2"]},flow:{type:"string",enum:["application"]},scopes:{$ref:"#/definitions/oauth2Scopes"},tokenUrl:{type:"string",format:"uri"},description:{type:"string"}},patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}}},oauth2AccessCodeSecurity:{type:"object",additionalProperties:false,required:["type","flow","authorizationUrl","tokenUrl"],properties:{type:{type:"string",enum:["oauth2"]},flow:{type:"string",enum:["accessCode"]},scopes:{$ref:"#/definitions/oauth2Scopes"},authorizationUrl:{type:"string",format:"uri"},tokenUrl:{type:"string",format:"uri"},description:{type:"string"}},patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}}},oauth2Scopes:{type:"object",additionalProperties:{type:"string"}},mediaTypeList:{type:"array",items:{$ref:"#/definitions/mimeType"},uniqueItems:true},parametersList:{type:"array",description:"The parameters needed to send a valid API call.",additionalItems:false,items:{oneOf:[{$ref:"#/definitions/parameter"},{$ref:"#/definitions/jsonReference"}]},uniqueItems:true},schemesList:{type:"array",description:"The transfer protocol of the API.",items:{type:"string",enum:["http","https","ws","wss"]},uniqueItems:true},collectionFormat:{type:"string",enum:["csv","ssv","tsv","pipes"],default:"csv"},collectionFormatWithMulti:{type:"string",enum:["csv","ssv","tsv","pipes","multi"],default:"csv"},title:{$ref:"http://json-schema.org/draft-04/schema#/properties/title"},description:{$ref:"http://json-schema.org/draft-04/schema#/properties/description"},default:{$ref:"http://json-schema.org/draft-04/schema#/properties/default"},multipleOf:{$ref:"http://json-schema.org/draft-04/schema#/properties/multipleOf"},maximum:{$ref:"http://json-schema.org/draft-04/schema#/properties/maximum"},exclusiveMaximum:{$ref:"http://json-schema.org/draft-04/schema#/properties/exclusiveMaximum"},minimum:{$ref:"http://json-schema.org/draft-04/schema#/properties/minimum"},exclusiveMinimum:{$ref:"http://json-schema.org/draft-04/schema#/properties/exclusiveMinimum"},maxLength:{$ref:"http://json-schema.org/draft-04/schema#/definitions/positiveInteger"},minLength:{$ref:"http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0"},pattern:{$ref:"http://json-schema.org/draft-04/schema#/properties/pattern"},maxItems:{$ref:"http://json-schema.org/draft-04/schema#/definitions/positiveInteger"},minItems:{$ref:"http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0"},uniqueItems:{$ref:"http://json-schema.org/draft-04/schema#/properties/uniqueItems"},enum:{$ref:"http://json-schema.org/draft-04/schema#/properties/enum"},jsonReference:{type:"object",required:["$ref"],additionalProperties:false,properties:{$ref:{type:"string"}}}}}},{}],98:[function(require,module,exports){var Buffer=require("buffer").Buffer;module.exports=function(e){if(e instanceof Uint8Array){if(0===e.byteOffset&&e.byteLength===e.buffer.byteLength)return e.buffer;if("function"==typeof e.buffer.slice)return e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength)}if(Buffer.isBuffer(e)){for(var f=new Uint8Array(e.length),r=e.length,t=0;t<r;t++)f[t]=e[t];return f.buffer}throw new Error("Argument must be a Buffer")}},{buffer:8}],99:[function(require,module,exports){"use strict";function Url(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}function urlParse(t,s,e){if(t&&util.isObject(t)&&t instanceof Url)return t;var h=new Url;return h.parse(t,s,e),h}function urlFormat(t){return util.isString(t)&&(t=urlParse(t)),t instanceof Url?t.format():Url.prototype.format.call(t)}function urlResolve(t,s){return urlParse(t,!1,!0).resolve(s)}function urlResolveObject(t,s){return t?urlParse(t,!1,!0).resolveObject(s):s}var punycode=require("punycode"),util=require("./util");exports.parse=urlParse,exports.resolve=urlResolve,exports.resolveObject=urlResolveObject,exports.format=urlFormat,exports.Url=Url;var protocolPattern=/^([a-z0-9.+-]+:)/i,portPattern=/:[0-9]*$/,simplePathPattern=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,delims=["<",">",'"',"`"," ","\r","\n","\t"],unwise=["{","}","|","\\","^","`"].concat(delims),autoEscape=["'"].concat(unwise),nonHostChars=["%","/","?",";","#"].concat(autoEscape),hostEndingChars=["/","?","#"],hostnameMaxLen=255,hostnamePartPattern=/^[+a-z0-9A-Z_-]{0,63}$/,hostnamePartStart=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,unsafeProtocol={javascript:!0,"javascript:":!0},hostlessProtocol={javascript:!0,"javascript:":!0},slashedProtocol={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},querystring=require("querystring");Url.prototype.parse=function(t,s,e){if(!util.isString(t))throw new TypeError("Parameter 'url' must be a string, not "+typeof t);var h=t.indexOf("?"),r=-1!==h&&h<t.indexOf("#")?"?":"#",a=t.split(r),o=/\\/g;a[0]=a[0].replace(o,"/"),t=a.join(r);var n=t;if(n=n.trim(),!e&&1===t.split("#").length){var i=simplePathPattern.exec(n);if(i)return this.path=n,this.href=n,this.pathname=i[1],i[2]?(this.search=i[2],this.query=s?querystring.parse(this.search.substr(1)):this.search.substr(1)):s&&(this.search="",this.query={}),this}var l=protocolPattern.exec(n);if(l){l=l[0];var u=l.toLowerCase();this.protocol=u,n=n.substr(l.length)}if(e||l||n.match(/^\/\/[^@\/]+@[^@\/]+/)){var p="//"===n.substr(0,2);!p||l&&hostlessProtocol[l]||(n=n.substr(2),this.slashes=!0)}if(!hostlessProtocol[l]&&(p||l&&!slashedProtocol[l])){for(var c=-1,f=0;f<hostEndingChars.length;f++){var m=n.indexOf(hostEndingChars[f]);-1!==m&&(-1===c||m<c)&&(c=m)}var v,g;g=-1===c?n.lastIndexOf("@"):n.lastIndexOf("@",c),-1!==g&&(v=n.slice(0,g),n=n.slice(g+1),this.auth=decodeURIComponent(v)),c=-1;for(var f=0;f<nonHostChars.length;f++){var m=n.indexOf(nonHostChars[f]);-1!==m&&(-1===c||m<c)&&(c=m)}-1===c&&(c=n.length),this.host=n.slice(0,c),n=n.slice(c),this.parseHost(),this.hostname=this.hostname||"";var y="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!y)for(var P=this.hostname.split(/\./),f=0,d=P.length;f<d;f++){var b=P[f];if(b&&!b.match(hostnamePartPattern)){for(var q="",O=0,j=b.length;O<j;O++)b.charCodeAt(O)>127?q+="x":q+=b[O];if(!q.match(hostnamePartPattern)){var x=P.slice(0,f),U=P.slice(f+1),C=b.match(hostnamePartStart);C&&(x.push(C[1]),U.unshift(C[2])),U.length&&(n="/"+U.join(".")+n),this.hostname=x.join(".");break}}}this.hostname.length>hostnameMaxLen?this.hostname="":this.hostname=this.hostname.toLowerCase(),y||(this.hostname=punycode.toASCII(this.hostname));var A=this.port?":"+this.port:"",w=this.hostname||"";this.host=w+A,this.href+=this.host,y&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==n[0]&&(n="/"+n))}if(!unsafeProtocol[u])for(var f=0,d=autoEscape.length;f<d;f++){var E=autoEscape[f];if(-1!==n.indexOf(E)){var I=encodeURIComponent(E);I===E&&(I=escape(E)),n=n.split(E).join(I)}}var R=n.indexOf("#");-1!==R&&(this.hash=n.substr(R),n=n.slice(0,R));var S=n.indexOf("?");if(-1!==S?(this.search=n.substr(S),this.query=n.substr(S+1),s&&(this.query=querystring.parse(this.query)),n=n.slice(0,S)):s&&(this.search="",this.query={}),n&&(this.pathname=n),slashedProtocol[u]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var A=this.pathname||"",k=this.search||"";this.path=A+k}return this.href=this.format(),this},Url.prototype.format=function(){var t=this.auth||"";t&&(t=encodeURIComponent(t),t=t.replace(/%3A/i,":"),t+="@");var s=this.protocol||"",e=this.pathname||"",h=this.hash||"",r=!1,a="";this.host?r=t+this.host:this.hostname&&(r=t+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(r+=":"+this.port)),this.query&&util.isObject(this.query)&&Object.keys(this.query).length&&(a=querystring.stringify(this.query));var o=this.search||a&&"?"+a||"";return s&&":"!==s.substr(-1)&&(s+=":"),this.slashes||(!s||slashedProtocol[s])&&!1!==r?(r="//"+(r||""),e&&"/"!==e.charAt(0)&&(e="/"+e)):r||(r=""),h&&"#"!==h.charAt(0)&&(h="#"+h),o&&"?"!==o.charAt(0)&&(o="?"+o),e=e.replace(/[?#]/g,function(t){return encodeURIComponent(t)}),o=o.replace("#","%23"),s+r+e+o+h},Url.prototype.resolve=function(t){return this.resolveObject(urlParse(t,!1,!0)).format()},Url.prototype.resolveObject=function(t){if(util.isString(t)){var s=new Url;s.parse(t,!1,!0),t=s}for(var e=new Url,h=Object.keys(this),r=0;r<h.length;r++){var a=h[r];e[a]=this[a]}if(e.hash=t.hash,""===t.href)return e.href=e.format(),e;if(t.slashes&&!t.protocol){for(var o=Object.keys(t),n=0;n<o.length;n++){var i=o[n];"protocol"!==i&&(e[i]=t[i])}return slashedProtocol[e.protocol]&&e.hostname&&!e.pathname&&(e.path=e.pathname="/"),e.href=e.format(),e}if(t.protocol&&t.protocol!==e.protocol){if(!slashedProtocol[t.protocol]){for(var l=Object.keys(t),u=0;u<l.length;u++){var p=l[u];e[p]=t[p]}return e.href=e.format(),e}if(e.protocol=t.protocol,t.host||hostlessProtocol[t.protocol])e.pathname=t.pathname;else{for(var c=(t.pathname||"").split("/");c.length&&!(t.host=c.shift()););t.host||(t.host=""),t.hostname||(t.hostname=""),""!==c[0]&&c.unshift(""),c.length<2&&c.unshift(""),e.pathname=c.join("/")}if(e.search=t.search,e.query=t.query,e.host=t.host||"",e.auth=t.auth,e.hostname=t.hostname||t.host,e.port=t.port,e.pathname||e.search){var f=e.pathname||"",m=e.search||"";e.path=f+m}return e.slashes=e.slashes||t.slashes,e.href=e.format(),e}var v=e.pathname&&"/"===e.pathname.charAt(0),g=t.host||t.pathname&&"/"===t.pathname.charAt(0),y=g||v||e.host&&t.pathname,P=y,d=e.pathname&&e.pathname.split("/")||[],c=t.pathname&&t.pathname.split("/")||[],b=e.protocol&&!slashedProtocol[e.protocol];if(b&&(e.hostname="",e.port=null,e.host&&(""===d[0]?d[0]=e.host:d.unshift(e.host)),e.host="",t.protocol&&(t.hostname=null,t.port=null,t.host&&(""===c[0]?c[0]=t.host:c.unshift(t.host)),t.host=null),y=y&&(""===c[0]||""===d[0])),g)e.host=t.host||""===t.host?t.host:e.host,e.hostname=t.hostname||""===t.hostname?t.hostname:e.hostname,e.search=t.search,e.query=t.query,d=c;else if(c.length)d||(d=[]),d.pop(),d=d.concat(c),e.search=t.search,e.query=t.query;else if(!util.isNullOrUndefined(t.search)){if(b){e.hostname=e.host=d.shift();var q=!!(e.host&&e.host.indexOf("@")>0)&&e.host.split("@");q&&(e.auth=q.shift(),e.host=e.hostname=q.shift())}return e.search=t.search,e.query=t.query,util.isNull(e.pathname)&&util.isNull(e.search)||(e.path=(e.pathname?e.pathname:"")+(e.search?e.search:"")),e.href=e.format(),e}if(!d.length)return e.pathname=null,e.search?e.path="/"+e.search:e.path=null,e.href=e.format(),e;for(var O=d.slice(-1)[0],j=(e.host||t.host||d.length>1)&&("."===O||".."===O)||""===O,x=0,U=d.length;U>=0;U--)O=d[U],"."===O?d.splice(U,1):".."===O?(d.splice(U,1),x++):x&&(d.splice(U,1),x--);if(!y&&!P)for(;x--;x)d.unshift("..");!y||""===d[0]||d[0]&&"/"===d[0].charAt(0)||d.unshift(""),j&&"/"!==d.join("/").substr(-1)&&d.push("");var C=""===d[0]||d[0]&&"/"===d[0].charAt(0);if(b){e.hostname=e.host=C?"":d.length?d.shift():"";var q=!!(e.host&&e.host.indexOf("@")>0)&&e.host.split("@");q&&(e.auth=q.shift(),e.host=e.hostname=q.shift())}return y=y||e.host&&d.length,y&&!C&&d.unshift(""),d.length?e.pathname=d.join("/"):(e.pathname=null,e.path=null),util.isNull(e.pathname)&&util.isNull(e.search)||(e.path=(e.pathname?e.pathname:"")+(e.search?e.search:"")),e.auth=t.auth||e.auth,e.slashes=e.slashes||t.slashes,e.href=e.format(),e},Url.prototype.parseHost=function(){var t=this.host,s=portPattern.exec(t);s&&(s=s[0],":"!==s&&(this.port=s.substr(1)),t=t.substr(0,t.length-s.length)),t&&(this.hostname=t)}},{"./util":100,punycode:77,querystring:80}],100:[function(require,module,exports){"use strict";module.exports={isString:function(n){return"string"==typeof n},isObject:function(n){return"object"==typeof n&&null!==n},isNull:function(n){return null===n},isNullOrUndefined:function(n){return null==n}}},{}],101:[function(require,module,exports){(function(global){function deprecate(r,e){function o(){if(!t){if(config("throwDeprecation"))throw new Error(e);config("traceDeprecation")?console.trace(e):console.warn(e),t=!0}return r.apply(this,arguments)}if(config("noDeprecation"))return r;var t=!1;return o}function config(r){try{if(!global.localStorage)return!1}catch(r){return!1}var e=global.localStorage[r];return null!=e&&"true"===String(e).toLowerCase()}module.exports=deprecate}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{}],102:[function(require,module,exports){arguments[4][18][0].apply(exports,arguments)},{dup:18}],103:[function(require,module,exports){module.exports=function(o){return o&&"object"==typeof o&&"function"==typeof o.copy&&"function"==typeof o.fill&&"function"==typeof o.readUInt8}},{}],104:[function(require,module,exports){(function(process,global){function inspect(e,r){var t={seen:[],stylize:stylizeNoColor};return arguments.length>=3&&(t.depth=arguments[2]),arguments.length>=4&&(t.colors=arguments[3]),isBoolean(r)?t.showHidden=r:r&&exports._extend(t,r),isUndefined(t.showHidden)&&(t.showHidden=!1),isUndefined(t.depth)&&(t.depth=2),isUndefined(t.colors)&&(t.colors=!1),isUndefined(t.customInspect)&&(t.customInspect=!0),t.colors&&(t.stylize=stylizeWithColor),formatValue(t,e,t.depth)}function stylizeWithColor(e,r){var t=inspect.styles[r];return t?"["+inspect.colors[t][0]+"m"+e+"["+inspect.colors[t][1]+"m":e}function stylizeNoColor(e,r){return e}function arrayToHash(e){var r={};return e.forEach(function(e,t){r[e]=!0}),r}function formatValue(e,r,t){if(e.customInspect&&r&&isFunction(r.inspect)&&r.inspect!==exports.inspect&&(!r.constructor||r.constructor.prototype!==r)){var n=r.inspect(t,e);return isString(n)||(n=formatValue(e,n,t)),n}var i=formatPrimitive(e,r);if(i)return i;var o=Object.keys(r),s=arrayToHash(o);if(e.showHidden&&(o=Object.getOwnPropertyNames(r)),isError(r)&&(o.indexOf("message")>=0||o.indexOf("description")>=0))return formatError(r);if(0===o.length){if(isFunction(r)){var u=r.name?": "+r.name:"";return e.stylize("[Function"+u+"]","special")}if(isRegExp(r))return e.stylize(RegExp.prototype.toString.call(r),"regexp");if(isDate(r))return e.stylize(Date.prototype.toString.call(r),"date");if(isError(r))return formatError(r)}var c="",a=!1,l=["{","}"];if(isArray(r)&&(a=!0,l=["[","]"]),isFunction(r)){c=" [Function"+(r.name?": "+r.name:"")+"]"}if(isRegExp(r)&&(c=" "+RegExp.prototype.toString.call(r)),isDate(r)&&(c=" "+Date.prototype.toUTCString.call(r)),isError(r)&&(c=" "+formatError(r)),0===o.length&&(!a||0==r.length))return l[0]+c+l[1];if(t<0)return isRegExp(r)?e.stylize(RegExp.prototype.toString.call(r),"regexp"):e.stylize("[Object]","special");e.seen.push(r);var p;return p=a?formatArray(e,r,t,s,o):o.map(function(n){return formatProperty(e,r,t,s,n,a)}),e.seen.pop(),reduceToSingleString(p,c,l)}function formatPrimitive(e,r){if(isUndefined(r))return e.stylize("undefined","undefined");if(isString(r)){var t="'"+JSON.stringify(r).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(t,"string")}return isNumber(r)?e.stylize(""+r,"number"):isBoolean(r)?e.stylize(""+r,"boolean"):isNull(r)?e.stylize("null","null"):void 0}function formatError(e){return"["+Error.prototype.toString.call(e)+"]"}function formatArray(e,r,t,n,i){for(var o=[],s=0,u=r.length;s<u;++s)hasOwnProperty(r,String(s))?o.push(formatProperty(e,r,t,n,String(s),!0)):o.push("");return i.forEach(function(i){i.match(/^\d+$/)||o.push(formatProperty(e,r,t,n,i,!0))}),o}function formatProperty(e,r,t,n,i,o){var s,u,c;if(c=Object.getOwnPropertyDescriptor(r,i)||{value:r[i]},c.get?u=c.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):c.set&&(u=e.stylize("[Setter]","special")),hasOwnProperty(n,i)||(s="["+i+"]"),u||(e.seen.indexOf(c.value)<0?(u=isNull(t)?formatValue(e,c.value,null):formatValue(e,c.value,t-1),u.indexOf("\n")>-1&&(u=o?u.split("\n").map(function(e){return"  "+e}).join("\n").substr(2):"\n"+u.split("\n").map(function(e){return"   "+e}).join("\n"))):u=e.stylize("[Circular]","special")),isUndefined(s)){if(o&&i.match(/^\d+$/))return u;s=JSON.stringify(""+i),s.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(s=s.substr(1,s.length-2),s=e.stylize(s,"name")):(s=s.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),s=e.stylize(s,"string"))}return s+": "+u}function reduceToSingleString(e,r,t){var n=0;return e.reduce(function(e,r){return n++,r.indexOf("\n")>=0&&n++,e+r.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60?t[0]+(""===r?"":r+"\n ")+" "+e.join(",\n  ")+" "+t[1]:t[0]+r+" "+e.join(", ")+" "+t[1]}function isArray(e){return Array.isArray(e)}function isBoolean(e){return"boolean"==typeof e}function isNull(e){return null===e}function isNullOrUndefined(e){return null==e}function isNumber(e){return"number"==typeof e}function isString(e){return"string"==typeof e}function isSymbol(e){return"symbol"==typeof e}function isUndefined(e){return void 0===e}function isRegExp(e){return isObject(e)&&"[object RegExp]"===objectToString(e)}function isObject(e){return"object"==typeof e&&null!==e}function isDate(e){return isObject(e)&&"[object Date]"===objectToString(e)}function isError(e){return isObject(e)&&("[object Error]"===objectToString(e)||e instanceof Error)}function isFunction(e){return"function"==typeof e}function isPrimitive(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e}function objectToString(e){return Object.prototype.toString.call(e)}function pad(e){return e<10?"0"+e.toString(10):e.toString(10)}function timestamp(){var e=new Date,r=[pad(e.getHours()),pad(e.getMinutes()),pad(e.getSeconds())].join(":");return[e.getDate(),months[e.getMonth()],r].join(" ")}function hasOwnProperty(e,r){return Object.prototype.hasOwnProperty.call(e,r)}var formatRegExp=/%[sdj%]/g;exports.format=function(e){if(!isString(e)){for(var r=[],t=0;t<arguments.length;t++)r.push(inspect(arguments[t]));return r.join(" ")}for(var t=1,n=arguments,i=n.length,o=String(e).replace(formatRegExp,function(e){if("%%"===e)return"%";if(t>=i)return e;switch(e){case"%s":return String(n[t++]);case"%d":return Number(n[t++]);case"%j":try{return JSON.stringify(n[t++])}catch(e){return"[Circular]"}default:return e}}),s=n[t];t<i;s=n[++t])isNull(s)||!isObject(s)?o+=" "+s:o+=" "+inspect(s);return o},exports.deprecate=function(e,r){function t(){if(!n){if(process.throwDeprecation)throw new Error(r);process.traceDeprecation?console.trace(r):console.error(r),n=!0}return e.apply(this,arguments)}if(isUndefined(global.process))return function(){return exports.deprecate(e,r).apply(this,arguments)};if(!0===process.noDeprecation)return e;var n=!1;return t};var debugs={},debugEnviron;exports.debuglog=function(e){if(isUndefined(debugEnviron)&&(debugEnviron=process.env.NODE_DEBUG||""),e=e.toUpperCase(),!debugs[e])if(new RegExp("\\b"+e+"\\b","i").test(debugEnviron)){var r=process.pid;debugs[e]=function(){var t=exports.format.apply(exports,arguments);console.error("%s %d: %s",e,r,t)}}else debugs[e]=function(){};return debugs[e]},exports.inspect=inspect,inspect.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},inspect.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},exports.isArray=isArray,exports.isBoolean=isBoolean,exports.isNull=isNull,exports.isNullOrUndefined=isNullOrUndefined,exports.isNumber=isNumber,exports.isString=isString,exports.isSymbol=isSymbol,exports.isUndefined=isUndefined,exports.isRegExp=isRegExp,exports.isObject=isObject,exports.isDate=isDate,exports.isError=isError,exports.isFunction=isFunction,exports.isPrimitive=isPrimitive,exports.isBuffer=require("./support/isBuffer");var months=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];exports.log=function(){console.log("%s - %s",timestamp(),exports.format.apply(exports,arguments))},exports.inherits=require("inherits"),exports._extend=function(e,r){if(!r||!isObject(r))return e;for(var t=Object.keys(r),n=t.length;n--;)e[t[n]]=r[t[n]];return e}}).call(this,require("_process"),typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{"./support/isBuffer":103,_process:76,inherits:102}],105:[function(require,module,exports){"use strict";function _interopRequireDefault(i){return i&&i.__esModule?i:{default:i}}Object.defineProperty(exports,"__esModule",{value:!0});var _toDate=require("./lib/toDate"),_toDate2=_interopRequireDefault(_toDate),_toFloat=require("./lib/toFloat"),_toFloat2=_interopRequireDefault(_toFloat),_toInt=require("./lib/toInt"),_toInt2=_interopRequireDefault(_toInt),_toBoolean=require("./lib/toBoolean"),_toBoolean2=_interopRequireDefault(_toBoolean),_equals=require("./lib/equals"),_equals2=_interopRequireDefault(_equals),_contains=require("./lib/contains"),_contains2=_interopRequireDefault(_contains),_matches=require("./lib/matches"),_matches2=_interopRequireDefault(_matches),_isEmail=require("./lib/isEmail"),_isEmail2=_interopRequireDefault(_isEmail),_isURL=require("./lib/isURL"),_isURL2=_interopRequireDefault(_isURL),_isMACAddress=require("./lib/isMACAddress"),_isMACAddress2=_interopRequireDefault(_isMACAddress),_isIP=require("./lib/isIP"),_isIP2=_interopRequireDefault(_isIP),_isFQDN=require("./lib/isFQDN"),_isFQDN2=_interopRequireDefault(_isFQDN),_isBoolean=require("./lib/isBoolean"),_isBoolean2=_interopRequireDefault(_isBoolean),_isAlpha=require("./lib/isAlpha"),_isAlpha2=_interopRequireDefault(_isAlpha),_isAlphanumeric=require("./lib/isAlphanumeric"),_isAlphanumeric2=_interopRequireDefault(_isAlphanumeric),_isNumeric=require("./lib/isNumeric"),_isNumeric2=_interopRequireDefault(_isNumeric),_isLowercase=require("./lib/isLowercase"),_isLowercase2=_interopRequireDefault(_isLowercase),_isUppercase=require("./lib/isUppercase"),_isUppercase2=_interopRequireDefault(_isUppercase),_isAscii=require("./lib/isAscii"),_isAscii2=_interopRequireDefault(_isAscii),_isFullWidth=require("./lib/isFullWidth"),_isFullWidth2=_interopRequireDefault(_isFullWidth),_isHalfWidth=require("./lib/isHalfWidth"),_isHalfWidth2=_interopRequireDefault(_isHalfWidth),_isVariableWidth=require("./lib/isVariableWidth"),_isVariableWidth2=_interopRequireDefault(_isVariableWidth),_isMultibyte=require("./lib/isMultibyte"),_isMultibyte2=_interopRequireDefault(_isMultibyte),_isSurrogatePair=require("./lib/isSurrogatePair"),_isSurrogatePair2=_interopRequireDefault(_isSurrogatePair),_isInt=require("./lib/isInt"),_isInt2=_interopRequireDefault(_isInt),_isFloat=require("./lib/isFloat"),_isFloat2=_interopRequireDefault(_isFloat),_isDecimal=require("./lib/isDecimal"),_isDecimal2=_interopRequireDefault(_isDecimal),_isHexadecimal=require("./lib/isHexadecimal"),_isHexadecimal2=_interopRequireDefault(_isHexadecimal),_isDivisibleBy=require("./lib/isDivisibleBy"),_isDivisibleBy2=_interopRequireDefault(_isDivisibleBy),_isHexColor=require("./lib/isHexColor"),_isHexColor2=_interopRequireDefault(_isHexColor),_isISRC=require("./lib/isISRC"),_isISRC2=_interopRequireDefault(_isISRC),_isMD=require("./lib/isMD5"),_isMD2=_interopRequireDefault(_isMD),_isHash=require("./lib/isHash"),_isHash2=_interopRequireDefault(_isHash),_isJSON=require("./lib/isJSON"),_isJSON2=_interopRequireDefault(_isJSON),_isEmpty=require("./lib/isEmpty"),_isEmpty2=_interopRequireDefault(_isEmpty),_isLength=require("./lib/isLength"),_isLength2=_interopRequireDefault(_isLength),_isByteLength=require("./lib/isByteLength"),_isByteLength2=_interopRequireDefault(_isByteLength),_isUUID=require("./lib/isUUID"),_isUUID2=_interopRequireDefault(_isUUID),_isMongoId=require("./lib/isMongoId"),_isMongoId2=_interopRequireDefault(_isMongoId),_isAfter=require("./lib/isAfter"),_isAfter2=_interopRequireDefault(_isAfter),_isBefore=require("./lib/isBefore"),_isBefore2=_interopRequireDefault(_isBefore),_isIn=require("./lib/isIn"),_isIn2=_interopRequireDefault(_isIn),_isCreditCard=require("./lib/isCreditCard"),_isCreditCard2=_interopRequireDefault(_isCreditCard),_isISIN=require("./lib/isISIN"),_isISIN2=_interopRequireDefault(_isISIN),_isISBN=require("./lib/isISBN"),_isISBN2=_interopRequireDefault(_isISBN),_isISSN=require("./lib/isISSN"),_isISSN2=_interopRequireDefault(_isISSN),_isMobilePhone=require("./lib/isMobilePhone"),_isMobilePhone2=_interopRequireDefault(_isMobilePhone),_isCurrency=require("./lib/isCurrency"),_isCurrency2=_interopRequireDefault(_isCurrency),_isISO=require("./lib/isISO8601"),_isISO2=_interopRequireDefault(_isISO),_isBase=require("./lib/isBase64"),_isBase2=_interopRequireDefault(_isBase),_isDataURI=require("./lib/isDataURI"),_isDataURI2=_interopRequireDefault(_isDataURI),_isLatLong=require("./lib/isLatLong"),_isLatLong2=_interopRequireDefault(_isLatLong),_isPostalCode=require("./lib/isPostalCode"),_isPostalCode2=_interopRequireDefault(_isPostalCode),_ltrim=require("./lib/ltrim"),_ltrim2=_interopRequireDefault(_ltrim),_rtrim=require("./lib/rtrim"),_rtrim2=_interopRequireDefault(_rtrim),_trim=require("./lib/trim"),_trim2=_interopRequireDefault(_trim),_escape=require("./lib/escape"),_escape2=_interopRequireDefault(_escape),_unescape=require("./lib/unescape"),_unescape2=_interopRequireDefault(_unescape),_stripLow=require("./lib/stripLow"),_stripLow2=_interopRequireDefault(_stripLow),_whitelist=require("./lib/whitelist"),_whitelist2=_interopRequireDefault(_whitelist),_blacklist=require("./lib/blacklist"),_blacklist2=_interopRequireDefault(_blacklist),_isWhitelisted=require("./lib/isWhitelisted"),_isWhitelisted2=_interopRequireDefault(_isWhitelisted),_normalizeEmail=require("./lib/normalizeEmail"),_normalizeEmail2=_interopRequireDefault(_normalizeEmail),_toString=require("./lib/util/toString"),_toString2=_interopRequireDefault(_toString),version="8.2.0",validator={version:version,toDate:_toDate2.default,toFloat:_toFloat2.default,toInt:_toInt2.default,toBoolean:_toBoolean2.default,equals:_equals2.default,contains:_contains2.default,matches:_matches2.default,isEmail:_isEmail2.default,isURL:_isURL2.default,isMACAddress:_isMACAddress2.default,isIP:_isIP2.default,isFQDN:_isFQDN2.default,isBoolean:_isBoolean2.default,isAlpha:_isAlpha2.default,isAlphanumeric:_isAlphanumeric2.default,isNumeric:_isNumeric2.default,isLowercase:_isLowercase2.default,isUppercase:_isUppercase2.default,isAscii:_isAscii2.default,isFullWidth:_isFullWidth2.default,isHalfWidth:_isHalfWidth2.default,isVariableWidth:_isVariableWidth2.default,isMultibyte:_isMultibyte2.default,isSurrogatePair:_isSurrogatePair2.default,isInt:_isInt2.default,isFloat:_isFloat2.default,isDecimal:_isDecimal2.default,isHexadecimal:_isHexadecimal2.default,isDivisibleBy:_isDivisibleBy2.default,isHexColor:_isHexColor2.default,isISRC:_isISRC2.default,isMD5:_isMD2.default,isHash:_isHash2.default,isJSON:_isJSON2.default,isEmpty:_isEmpty2.default,isLength:_isLength2.default,isByteLength:_isByteLength2.default,isUUID:_isUUID2.default,isMongoId:_isMongoId2.default,isAfter:_isAfter2.default,isBefore:_isBefore2.default,isIn:_isIn2.default,isCreditCard:_isCreditCard2.default,isISIN:_isISIN2.default,
  isISBN:_isISBN2.default,isISSN:_isISSN2.default,isMobilePhone:_isMobilePhone2.default,isPostalCode:_isPostalCode2.default,isCurrency:_isCurrency2.default,isISO8601:_isISO2.default,isBase64:_isBase2.default,isDataURI:_isDataURI2.default,isLatLong:_isLatLong2.default,ltrim:_ltrim2.default,rtrim:_rtrim2.default,trim:_trim2.default,escape:_escape2.default,unescape:_unescape2.default,stripLow:_stripLow2.default,whitelist:_whitelist2.default,blacklist:_blacklist2.default,isWhitelisted:_isWhitelisted2.default,normalizeEmail:_normalizeEmail2.default,toString:_toString2.default};exports.default=validator,module.exports=exports.default},{"./lib/blacklist":107,"./lib/contains":108,"./lib/equals":109,"./lib/escape":110,"./lib/isAfter":111,"./lib/isAlpha":112,"./lib/isAlphanumeric":113,"./lib/isAscii":114,"./lib/isBase64":115,"./lib/isBefore":116,"./lib/isBoolean":117,"./lib/isByteLength":118,"./lib/isCreditCard":119,"./lib/isCurrency":120,"./lib/isDataURI":121,"./lib/isDecimal":122,"./lib/isDivisibleBy":123,"./lib/isEmail":124,"./lib/isEmpty":125,"./lib/isFQDN":126,"./lib/isFloat":127,"./lib/isFullWidth":128,"./lib/isHalfWidth":129,"./lib/isHash":130,"./lib/isHexColor":131,"./lib/isHexadecimal":132,"./lib/isIP":133,"./lib/isISBN":134,"./lib/isISIN":135,"./lib/isISO8601":136,"./lib/isISRC":137,"./lib/isISSN":138,"./lib/isIn":139,"./lib/isInt":140,"./lib/isJSON":141,"./lib/isLatLong":142,"./lib/isLength":143,"./lib/isLowercase":144,"./lib/isMACAddress":145,"./lib/isMD5":146,"./lib/isMobilePhone":147,"./lib/isMongoId":148,"./lib/isMultibyte":149,"./lib/isNumeric":150,"./lib/isPostalCode":151,"./lib/isSurrogatePair":152,"./lib/isURL":153,"./lib/isUUID":154,"./lib/isUppercase":155,"./lib/isVariableWidth":156,"./lib/isWhitelisted":157,"./lib/ltrim":158,"./lib/matches":159,"./lib/normalizeEmail":160,"./lib/rtrim":161,"./lib/stripLow":162,"./lib/toBoolean":163,"./lib/toDate":164,"./lib/toFloat":165,"./lib/toInt":166,"./lib/trim":167,"./lib/unescape":168,"./lib/util/toString":171,"./lib/whitelist":172}],106:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});for(var alpha=exports.alpha={"en-US":/^[A-Z]+$/i,"cs-CZ":/^[A-ZÁČĎÉĚÍŇÓŘŠŤÚŮÝŽ]+$/i,"da-DK":/^[A-ZÆØÅ]+$/i,"de-DE":/^[A-ZÄÖÜß]+$/i,"es-ES":/^[A-ZÁÉÍÑÓÚÜ]+$/i,"fr-FR":/^[A-ZÀÂÆÇÉÈÊËÏÎÔŒÙÛÜŸ]+$/i,"it-IT":/^[A-ZÀÉÈÌÎÓÒÙ]+$/i,"nb-NO":/^[A-ZÆØÅ]+$/i,"nl-NL":/^[A-ZÁÉËÏÓÖÜÚ]+$/i,"nn-NO":/^[A-ZÆØÅ]+$/i,"hu-HU":/^[A-ZÁÉÍÓÖŐÚÜŰ]+$/i,"pl-PL":/^[A-ZĄĆĘŚŁŃÓŻŹ]+$/i,"pt-PT":/^[A-ZÃÁÀÂÇÉÊÍÕÓÔÚÜ]+$/i,"ru-RU":/^[А-ЯЁ]+$/i,"sr-RS@latin":/^[A-ZČĆŽŠĐ]+$/i,"sr-RS":/^[А-ЯЂЈЉЊЋЏ]+$/i,"sv-SE":/^[A-ZÅÄÖ]+$/i,"tr-TR":/^[A-ZÇĞİıÖŞÜ]+$/i,"uk-UA":/^[А-ЩЬЮЯЄIЇҐ]+$/i,ar:/^[ءآأؤإئابةتثجحخدذرزسشصضطظعغفقكلمنهوىيًٌٍَُِّْٰ]+$/},alphanumeric=exports.alphanumeric={"en-US":/^[0-9A-Z]+$/i,"cs-CZ":/^[0-9A-ZÁČĎÉĚÍŇÓŘŠŤÚŮÝŽ]+$/i,"da-DK":/^[0-9A-ZÆØÅ]+$/i,"de-DE":/^[0-9A-ZÄÖÜß]+$/i,"es-ES":/^[0-9A-ZÁÉÍÑÓÚÜ]+$/i,"fr-FR":/^[0-9A-ZÀÂÆÇÉÈÊËÏÎÔŒÙÛÜŸ]+$/i,"it-IT":/^[0-9A-ZÀÉÈÌÎÓÒÙ]+$/i,"hu-HU":/^[0-9A-ZÁÉÍÓÖŐÚÜŰ]+$/i,"nb-NO":/^[0-9A-ZÆØÅ]+$/i,"nl-NL":/^[0-9A-ZÁÉËÏÓÖÜÚ]+$/i,"nn-NO":/^[0-9A-ZÆØÅ]+$/i,"pl-PL":/^[0-9A-ZĄĆĘŚŁŃÓŻŹ]+$/i,"pt-PT":/^[0-9A-ZÃÁÀÂÇÉÊÍÕÓÔÚÜ]+$/i,"ru-RU":/^[0-9А-ЯЁ]+$/i,"sr-RS@latin":/^[0-9A-ZČĆŽŠĐ]+$/i,"sr-RS":/^[0-9А-ЯЂЈЉЊЋЏ]+$/i,"sv-SE":/^[0-9A-ZÅÄÖ]+$/i,"tr-TR":/^[0-9A-ZÇĞİıÖŞÜ]+$/i,"uk-UA":/^[0-9А-ЩЬЮЯЄIЇҐ]+$/i,ar:/^[٠١٢٣٤٥٦٧٨٩0-9ءآأؤإئابةتثجحخدذرزسشصضطظعغفقكلمنهوىيًٌٍَُِّْٰ]+$/},englishLocales=exports.englishLocales=["AU","GB","HK","IN","NZ","ZA","ZM"],locale,i=0;i<englishLocales.length;i++)locale="en-"+englishLocales[i],alpha[locale]=alpha["en-US"],alphanumeric[locale]=alphanumeric["en-US"];alpha["pt-BR"]=alpha["pt-PT"],alphanumeric["pt-BR"]=alphanumeric["pt-PT"];for(var arabicLocales=exports.arabicLocales=["AE","BH","DZ","EG","IQ","JO","KW","LB","LY","MA","QM","QA","SA","SD","SY","TN","YE"],_locale,_i=0;_i<arabicLocales.length;_i++)_locale="ar-"+arabicLocales[_i],alpha[_locale]=alpha.ar,alphanumeric[_locale]=alphanumeric.ar},{}],107:[function(require,module,exports){"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function blacklist(e,t){return(0,_assertString2.default)(e),e.replace(new RegExp("["+t+"]+","g"),"")}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=blacklist;var _assertString=require("./util/assertString"),_assertString2=_interopRequireDefault(_assertString);module.exports=exports.default},{"./util/assertString":169}],108:[function(require,module,exports){"use strict";function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}function contains(t,e){return(0,_assertString2.default)(t),t.indexOf((0,_toString2.default)(e))>=0}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=contains;var _assertString=require("./util/assertString"),_assertString2=_interopRequireDefault(_assertString),_toString=require("./util/toString"),_toString2=_interopRequireDefault(_toString);module.exports=exports.default},{"./util/assertString":169,"./util/toString":171}],109:[function(require,module,exports){"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function equals(e,t){return(0,_assertString2.default)(e),e===t}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=equals;var _assertString=require("./util/assertString"),_assertString2=_interopRequireDefault(_assertString);module.exports=exports.default},{"./util/assertString":169}],110:[function(require,module,exports){"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function escape(e){return(0,_assertString2.default)(e),e.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\//g,"&#x2F;").replace(/\\/g,"&#x5C;").replace(/`/g,"&#96;")}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=escape;var _assertString=require("./util/assertString"),_assertString2=_interopRequireDefault(_assertString);module.exports=exports.default},{"./util/assertString":169}],111:[function(require,module,exports){"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function isAfter(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:String(new Date);(0,_assertString2.default)(e);var r=(0,_toDate2.default)(t),a=(0,_toDate2.default)(e);return!!(a&&r&&a>r)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=isAfter;var _assertString=require("./util/assertString"),_assertString2=_interopRequireDefault(_assertString),_toDate=require("./toDate"),_toDate2=_interopRequireDefault(_toDate);module.exports=exports.default},{"./toDate":164,"./util/assertString":169}],112:[function(require,module,exports){"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function isAlpha(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"en-US";if((0,_assertString2.default)(e),r in _alpha.alpha)return _alpha.alpha[r].test(e);throw new Error("Invalid locale '"+r+"'")}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=isAlpha;var _assertString=require("./util/assertString"),_assertString2=_interopRequireDefault(_assertString),_alpha=require("./alpha");module.exports=exports.default},{"./alpha":106,"./util/assertString":169}],113:[function(require,module,exports){"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function isAlphanumeric(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"en-US";if((0,_assertString2.default)(e),r in _alpha.alphanumeric)return _alpha.alphanumeric[r].test(e);throw new Error("Invalid locale '"+r+"'")}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=isAlphanumeric;var _assertString=require("./util/assertString"),_assertString2=_interopRequireDefault(_assertString),_alpha=require("./alpha");module.exports=exports.default},{"./alpha":106,"./util/assertString":169}],114:[function(require,module,exports){"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function isAscii(e){return(0,_assertString2.default)(e),ascii.test(e)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=isAscii;var _assertString=require("./util/assertString"),_assertString2=_interopRequireDefault(_assertString),ascii=/^[\x00-\x7F]+$/;module.exports=exports.default},{"./util/assertString":169}],115:[function(require,module,exports){"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function isBase64(e){(0,_assertString2.default)(e);var t=e.length;if(!t||t%4!=0||notBase64.test(e))return!1;var r=e.indexOf("=");return-1===r||r===t-1||r===t-2&&"="===e[t-1]}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=isBase64;var _assertString=require("./util/assertString"),_assertString2=_interopRequireDefault(_assertString),notBase64=/[^A-Z0-9+\/=]/i;module.exports=exports.default},{"./util/assertString":169}],116:[function(require,module,exports){"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function isBefore(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:String(new Date);(0,_assertString2.default)(e);var r=(0,_toDate2.default)(t),a=(0,_toDate2.default)(e);return!!(a&&r&&a<r)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=isBefore;var _assertString=require("./util/assertString"),_assertString2=_interopRequireDefault(_assertString),_toDate=require("./toDate"),_toDate2=_interopRequireDefault(_toDate);module.exports=exports.default},{"./toDate":164,"./util/assertString":169}],117:[function(require,module,exports){"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function isBoolean(e){return(0,_assertString2.default)(e),["true","false","1","0"].indexOf(e)>=0}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=isBoolean;var _assertString=require("./util/assertString"),_assertString2=_interopRequireDefault(_assertString);module.exports=exports.default},{"./util/assertString":169}],118:[function(require,module,exports){"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function isByteLength(e,t){(0,_assertString2.default)(e);var o=void 0,r=void 0;"object"===(void 0===t?"undefined":_typeof(t))?(o=t.min||0,r=t.max):(o=arguments[1],r=arguments[2]);var n=encodeURI(e).split(/%..|./).length-1;return n>=o&&(void 0===r||n<=r)}Object.defineProperty(exports,"__esModule",{value:!0});var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};exports.default=isByteLength;var _assertString=require("./util/assertString"),_assertString2=_interopRequireDefault(_assertString);module.exports=exports.default},{"./util/assertString":169}],119:[function(require,module,exports){"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function isCreditCard(e){(0,_assertString2.default)(e);var r=e.replace(/[- ]+/g,"");if(!creditCard.test(r))return!1;for(var t=0,i=void 0,s=void 0,a=void 0,d=r.length-1;d>=0;d--)i=r.substring(d,d+1),s=parseInt(i,10),a?(s*=2,t+=s>=10?s%10+1:s):t+=s,a=!a;return!(t%10!=0||!r)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=isCreditCard;var _assertString=require("./util/assertString"),_assertString2=_interopRequireDefault(_assertString),creditCard=/^(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|(222[1-9]|22[3-9][0-9]|2[3-6][0-9]{2}|27[01][0-9]|2720)[0-9]{12}|6(?:011|5[0-9][0-9])[0-9]{12}|3[47][0-9]{13}|3(?:0[0-5]|[68][0-9])[0-9]{11}|(?:2131|1800|35\d{3})\d{11}|62[0-9]{14})$/;module.exports=exports.default},{"./util/assertString":169}],120:[function(require,module,exports){"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function currencyRegex(e){var r="\\d{"+e.digits_after_decimal[0]+"}";e.digits_after_decimal.forEach(function(e,i){0!==i&&(r=r+"|\\d{"+e+"}")});var i="(\\"+e.symbol.replace(/\./g,"\\.")+")"+(e.require_symbol?"":"?"),t="[1-9]\\d{0,2}(\\"+e.thousands_separator+"\\d{3})*",a=["0","[1-9]\\d*",t],_="("+a.join("|")+")?",s="(\\"+e.decimal_separator+"("+r+"))"+(e.require_decimal?"":"?"),l=_+(e.allow_decimal||e.require_decimal?s:"");return e.allow_negatives&&!e.parens_for_negatives&&(e.negative_sign_after_digits?l+="-?":e.negative_sign_before_digits&&(l="-?"+l)),e.allow_negative_sign_placeholder?l="( (?!\\-))?"+l:e.allow_space_after_symbol?l=" ?"+l:e.allow_space_after_digits&&(l+="( (?!$))?"),e.symbol_after_digits?l+=i:l=i+l,e.allow_negatives&&(e.parens_for_negatives?l="(\\("+l+"\\)|"+l+")":e.negative_sign_before_digits||e.negative_sign_after_digits||(l="-?"+l)),new RegExp("^(?!-? )(?=.*\\d)"+l+"$")}function isCurrency(e,r){return(0,_assertString2.default)(e),r=(0,_merge2.default)(r,default_currency_options),currencyRegex(r).test(e)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=isCurrency;var _merge=require("./util/merge"),_merge2=_interopRequireDefault(_merge),_assertString=require("./util/assertString"),_assertString2=_interopRequireDefault(_assertString),default_currency_options={symbol:"$",require_symbol:!1,allow_space_after_symbol:!1,symbol_after_digits:!1,allow_negatives:!0,parens_for_negatives:!1,negative_sign_before_digits:!1,negative_sign_after_digits:!1,allow_negative_sign_placeholder:!1,thousands_separator:",",decimal_separator:".",allow_decimal:!0,require_decimal:!1,digits_after_decimal:[2],allow_space_after_digits:!1};module.exports=exports.default},{"./util/assertString":169,"./util/merge":170}],121:[function(require,module,exports){"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function isDataURI(e){return(0,_assertString2.default)(e),dataURI.test(e)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=isDataURI;var _assertString=require("./util/assertString"),_assertString2=_interopRequireDefault(_assertString),dataURI=/^\s*data:([a-z]+\/[a-z0-9\-\+]+(;[a-z\-]+=[a-z0-9\-]+)?)?(;base64)?,[a-z0-9!\$&',\(\)\*\+,;=\-\._~:@\/\?%\s]*\s*$/i;module.exports=exports.default},{"./util/assertString":169}],122:[function(require,module,exports){"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function isDecimal(e){return(0,_assertString2.default)(e),""!==e&&decimal.test(e)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=isDecimal;var _assertString=require("./util/assertString"),_assertString2=_interopRequireDefault(_assertString),decimal=/^[-+]?([0-9]+|\.[0-9]+|[0-9]+\.[0-9]+)$/;module.exports=exports.default},{"./util/assertString":169}],123:[function(require,module,exports){"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function isDivisibleBy(e,t){return(0,_assertString2.default)(e),(0,_toFloat2.default)(e)%parseInt(t,10)==0}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=isDivisibleBy;var _assertString=require("./util/assertString"),_assertString2=_interopRequireDefault(_assertString),_toFloat=require("./toFloat"),_toFloat2=_interopRequireDefault(_toFloat);module.exports=exports.default},{"./toFloat":165,"./util/assertString":169}],124:[function(require,module,exports){"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function isEmail(e,t){if((0,_assertString2.default)(e),t=(0,_merge2.default)(t,default_email_options),t.require_display_name||t.allow_display_name){var r=e.match(displayName);if(r)e=r[1];else if(t.require_display_name)return!1}var i=e.split("@"),u=i.pop(),a=i.join("@"),l=u.toLowerCase();if("gmail.com"!==l&&"googlemail.com"!==l||(a=a.replace(/\./g,"").toLowerCase()),!(0,_isByteLength2.default)(a,{max:64})||!(0,_isByteLength2.default)(u,{max:254}))return!1;if(!(0,_isFQDN2.default)(u,{require_tld:t.require_tld}))return!1;if('"'===a[0])return a=a.slice(1,a.length-1),t.allow_utf8_local_part?quotedEmailUserUtf8.test(a):quotedEmailUser.test(a);for(var s=t.allow_utf8_local_part?emailUserUtf8Part:emailUserPart,_=a.split("."),F=0;F<_.length;F++)if(!s.test(_[F]))return!1;return!0}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=isEmail;var _assertString=require("./util/assertString"),_assertString2=_interopRequireDefault(_assertString),_merge=require("./util/merge"),_merge2=_interopRequireDefault(_merge),_isByteLength=require("./isByteLength"),_isByteLength2=_interopRequireDefault(_isByteLength),_isFQDN=require("./isFQDN"),_isFQDN2=_interopRequireDefault(_isFQDN),default_email_options={allow_display_name:!1,require_display_name:!1,allow_utf8_local_part:!0,require_tld:!0},displayName=/^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~\.\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~\,\.\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF\s]*<(.+)>$/i,emailUserPart=/^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~]+$/i,quotedEmailUser=/^([\s\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21\x23-\x5b\x5d-\x7e]|(\\[\x01-\x09\x0b\x0c\x0d-\x7f]))*$/i,emailUserUtf8Part=/^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+$/i,quotedEmailUserUtf8=/^([\s\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21\x23-\x5b\x5d-\x7e\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]|(\\[\x01-\x09\x0b\x0c\x0d-\x7f\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))*$/i;module.exports=exports.default},{"./isByteLength":118,"./isFQDN":126,"./util/assertString":169,"./util/merge":170}],125:[function(require,module,exports){"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function isEmpty(e){return(0,_assertString2.default)(e),0===e.length}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=isEmpty;var _assertString=require("./util/assertString"),_assertString2=_interopRequireDefault(_assertString);module.exports=exports.default},{"./util/assertString":169}],126:[function(require,module,exports){"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function isFDQN(e,t){(0,_assertString2.default)(e),t=(0,_merge2.default)(t,default_fqdn_options),t.allow_trailing_dot&&"."===e[e.length-1]&&(e=e.substring(0,e.length-1));var r=e.split(".");if(t.require_tld){var u=r.pop();if(!r.length||!/^([a-z\u00a1-\uffff]{2,}|xn[a-z0-9-]{2,})$/i.test(u))return!1;if(/[\s\u2002-\u200B\u202F\u205F\u3000\uFEFF\uDB40\uDC20]/.test(u))return!1}for(var i,l=0;l<r.length;l++){if(i=r[l],t.allow_underscores&&(i=i.replace(/_/g,"")),!/^[a-z\u00a1-\uffff0-9-]+$/i.test(i))return!1;if(/[\uff01-\uff5e]/.test(i))return!1;if("-"===i[0]||"-"===i[i.length-1])return!1}return!0}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=isFDQN;var _assertString=require("./util/assertString"),_assertString2=_interopRequireDefault(_assertString),_merge=require("./util/merge"),_merge2=_interopRequireDefault(_merge),default_fqdn_options={require_tld:!0,allow_underscores:!1,allow_trailing_dot:!1};module.exports=exports.default},{"./util/assertString":169,"./util/merge":170}],127:[function(require,module,exports){"use strict";function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}function isFloat(t,e){return(0,_assertString2.default)(t),e=e||{},""!==t&&"."!==t&&(float.test(t)&&(!e.hasOwnProperty("min")||t>=e.min)&&(!e.hasOwnProperty("max")||t<=e.max)&&(!e.hasOwnProperty("lt")||t<e.lt)&&(!e.hasOwnProperty("gt")||t>e.gt))}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=isFloat;var _assertString=require("./util/assertString"),_assertString2=_interopRequireDefault(_assertString),float=/^(?:[-+])?(?:[0-9]+)?(?:\.[0-9]*)?(?:[eE][\+\-]?(?:[0-9]+))?$/;module.exports=exports.default},{"./util/assertString":169}],128:[function(require,module,exports){"use strict";function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}function isFullWidth(t){return(0,_assertString2.default)(t),fullWidth.test(t)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.fullWidth=void 0,exports.default=isFullWidth;var _assertString=require("./util/assertString"),_assertString2=_interopRequireDefault(_assertString),fullWidth=exports.fullWidth=/[^\u0020-\u007E\uFF61-\uFF9F\uFFA0-\uFFDC\uFFE8-\uFFEE0-9a-zA-Z]/},{"./util/assertString":169}],129:[function(require,module,exports){"use strict";function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}function isHalfWidth(t){return(0,_assertString2.default)(t),halfWidth.test(t)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.halfWidth=void 0,exports.default=isHalfWidth;var _assertString=require("./util/assertString"),_assertString2=_interopRequireDefault(_assertString),halfWidth=exports.halfWidth=/[\u0020-\u007E\uFF61-\uFF9F\uFFA0-\uFFDC\uFFE8-\uFFEE0-9a-zA-Z]/},{"./util/assertString":169}],130:[function(require,module,exports){"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function isHash(e,t){return(0,_assertString2.default)(e),new RegExp("^[a-f0-9]{"+lengths[t]+"}$").test(e)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=isHash;var _assertString=require("./util/assertString"),_assertString2=_interopRequireDefault(_assertString),lengths={md5:32,md4:32,sha1:40,sha256:64,sha384:96,sha512:128,ripemd128:32,ripemd160:40,tiger128:32,tiger160:40,tiger192:48,crc32:8,crc32b:8};module.exports=exports.default},{"./util/assertString":169}],131:[function(require,module,exports){"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function isHexColor(e){return(0,_assertString2.default)(e),hexcolor.test(e)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=isHexColor;var _assertString=require("./util/assertString"),_assertString2=_interopRequireDefault(_assertString),hexcolor=/^#?([0-9A-F]{3}|[0-9A-F]{6})$/i;module.exports=exports.default},{"./util/assertString":169}],132:[function(require,module,exports){"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function isHexadecimal(e){return(0,_assertString2.default)(e),hexadecimal.test(e)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=isHexadecimal;var _assertString=require("./util/assertString"),_assertString2=_interopRequireDefault(_assertString),hexadecimal=/^[0-9A-F]+$/i;module.exports=exports.default},{"./util/assertString":169}],133:[function(require,module,exports){"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function isIP(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if((0,_assertString2.default)(e),!(t=String(t)))return isIP(e,4)||isIP(e,6);if("4"===t){if(!ipv4Maybe.test(e))return!1;return e.split(".").sort(function(e,t){return e-t})[3]<=255}if("6"===t){var r=e.split(":"),i=!1,s=isIP(r[r.length-1],4),n=s?7:8;if(r.length>n)return!1;if("::"===e)return!0;"::"===e.substr(0,2)?(r.shift(),r.shift(),i=!0):"::"===e.substr(e.length-2)&&(r.pop(),r.pop(),i=!0);for(var u=0;u<r.length;++u)if(""===r[u]&&u>0&&u<r.length-1){if(i)return!1;i=!0}else if(s&&u===r.length-1);else if(!ipv6Block.test(r[u]))return!1;return i?r.length>=1:r.length===n}return!1}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=isIP;var _assertString=require("./util/assertString"),_assertString2=_interopRequireDefault(_assertString),ipv4Maybe=/^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/,ipv6Block=/^[0-9A-F]{1,4}$/i;module.exports=exports.default},{"./util/assertString":169}],134:[function(require,module,exports){"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function isISBN(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if((0,_assertString2.default)(e),!(r=String(r)))return isISBN(e,10)||isISBN(e,13);var t=e.replace(/[\s-]+/g,""),i=0,s=void 0;if("10"===r){if(!isbn10Maybe.test(t))return!1;for(s=0;s<9;s++)i+=(s+1)*t.charAt(s);if("X"===t.charAt(9)?i+=100:i+=10*t.charAt(9),i%11==0)return!!t}else if("13"===r){if(!isbn13Maybe.test(t))return!1;for(s=0;s<12;s++)i+=factor[s%2]*t.charAt(s);if(t.charAt(12)-(10-i%10)%10==0)return!!t}return!1}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=isISBN;var _assertString=require("./util/assertString"),_assertString2=_interopRequireDefault(_assertString),isbn10Maybe=/^(?:[0-9]{9}X|[0-9]{10})$/,isbn13Maybe=/^(?:[0-9]{13})$/,factor=[1,3];module.exports=exports.default},{"./util/assertString":169}],135:[function(require,module,exports){"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function isISIN(e){if((0,_assertString2.default)(e),!isin.test(e))return!1;for(var t=e.replace(/[A-Z]/g,function(e){return parseInt(e,36)}),r=0,s=void 0,i=void 0,n=!0,u=t.length-2;u>=0;u--)s=t.substring(u,u+1),i=parseInt(s,10),n?(i*=2,r+=i>=10?i+1:i):r+=i,n=!n;return parseInt(e.substr(e.length-1),10)===(1e4-r)%10}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=isISIN;var _assertString=require("./util/assertString"),_assertString2=_interopRequireDefault(_assertString),isin=/^[A-Z]{2}[0-9A-Z]{9}[0-9]$/;module.exports=exports.default},{"./util/assertString":169}],136:[function(require,module,exports){"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function isISO8601(e){return(0,_assertString2.default)(e),iso8601.test(e)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=isISO8601;var _assertString=require("./util/assertString"),_assertString2=_interopRequireDefault(_assertString),iso8601=/^([\+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2])(\3([12]\d|0[1-9]|3[01]))?|W([0-4]\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\d|[12]\d{2}|3([0-5]\d|6[1-6])))([T\s]((([01]\d|2[0-3])((:?)[0-5]\d)?|24:?00)([\.,]\d+(?!:))?)?(\17[0-5]\d([\.,]\d+)?)?([zZ]|([\+-])([01]\d|2[0-3]):?([0-5]\d)?)?)?)?$/;module.exports=exports.default},{"./util/assertString":169}],137:[function(require,module,exports){"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function isISRC(e){return(0,_assertString2.default)(e),isrc.test(e)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=isISRC;var _assertString=require("./util/assertString"),_assertString2=_interopRequireDefault(_assertString),isrc=/^[A-Z]{2}[0-9A-Z]{3}\d{2}\d{5}$/;module.exports=exports.default},{"./util/assertString":169}],138:[function(require,module,exports){"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function isISSN(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,_assertString2.default)(e);var t=issn;if(t=r.require_hyphen?t.replace("?",""):t,t=r.case_sensitive?new RegExp(t):new RegExp(t,"i"),!t.test(e))return!1;var i=e.replace("-",""),s=8,n=0,a=!0,u=!1,l=void 0;try{for(var o,d=i[Symbol.iterator]();!(a=(o=d.next()).done);a=!0){var f=o.value;n+=("X"===f.toUpperCase()?10:+f)*s,--s}}catch(e){u=!0,l=e}finally{try{!a&&d.return&&d.return()}finally{if(u)throw l}}return n%11==0}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=isISSN;var _assertString=require("./util/assertString"),_assertString2=_interopRequireDefault(_assertString),issn="^\\d{4}-?\\d{3}[\\dX]$";module.exports=exports.default},{"./util/assertString":169}],139:[function(require,module,exports){"use strict";function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}function isIn(t,e){(0,_assertString2.default)(t);var r=void 0;if("[object Array]"===Object.prototype.toString.call(e)){var o=[];for(r in e)({}).hasOwnProperty.call(e,r)&&(o[r]=(0,_toString2.default)(e[r]));return o.indexOf(t)>=0}return"object"===(void 0===e?"undefined":_typeof(e))?e.hasOwnProperty(t):!(!e||"function"!=typeof e.indexOf)&&e.indexOf(t)>=0}Object.defineProperty(exports,"__esModule",{value:!0});var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};exports.default=isIn;var _assertString=require("./util/assertString"),_assertString2=_interopRequireDefault(_assertString),_toString=require("./util/toString"),_toString2=_interopRequireDefault(_toString);module.exports=exports.default},{"./util/assertString":169,"./util/toString":171}],140:[function(require,module,exports){"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function isInt(e,t){(0,_assertString2.default)(e),t=t||{};var r=t.hasOwnProperty("allow_leading_zeroes")&&!t.allow_leading_zeroes?int:intLeadingZeroes,n=!t.hasOwnProperty("min")||e>=t.min,s=!t.hasOwnProperty("max")||e<=t.max,a=!t.hasOwnProperty("lt")||e<t.lt,i=!t.hasOwnProperty("gt")||e>t.gt;return r.test(e)&&n&&s&&a&&i}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=isInt;var _assertString=require("./util/assertString"),_assertString2=_interopRequireDefault(_assertString),int=/^(?:[-+]?(?:0|[1-9][0-9]*))$/,intLeadingZeroes=/^[-+]?[0-9]+$/;module.exports=exports.default},{"./util/assertString":169}],141:[function(require,module,exports){"use strict";function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}function isJSON(t){(0,_assertString2.default)(t);try{var e=JSON.parse(t);return!!e&&"object"===(void 0===e?"undefined":_typeof(e))}catch(t){}return!1}Object.defineProperty(exports,"__esModule",{value:!0});var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};exports.default=isJSON;var _assertString=require("./util/assertString"),_assertString2=_interopRequireDefault(_assertString);module.exports=exports.default},{"./util/assertString":169}],142:[function(require,module,exports){"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=function(e){if((0,_assertString2.default)(e),!e.includes(","))return!1;var t=e.split(",");return lat.test(t[0])&&long.test(t[1])};var _assertString=require("./util/assertString"),_assertString2=_interopRequireDefault(_assertString),lat=/^\(?[+-]?(90(\.0+)?|[1-8]?\d(\.\d+)?)$/,long=/^\s?[+-]?(180(\.0+)?|1[0-7]\d(\.\d+)?|\d{1,2}(\.\d+)?)\)?$/;module.exports=exports.default},{"./util/assertString":169}],143:[function(require,module,exports){"use strict";function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}function isLength(t,e){(0,_assertString2.default)(t);var o=void 0,r=void 0;"object"===(void 0===e?"undefined":_typeof(e))?(o=e.min||0,r=e.max):(o=arguments[1],r=arguments[2]);var n=t.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g)||[],u=t.length-n.length;return u>=o&&(void 0===r||u<=r)}Object.defineProperty(exports,"__esModule",{value:!0});var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};exports.default=isLength;var _assertString=require("./util/assertString"),_assertString2=_interopRequireDefault(_assertString);module.exports=exports.default},{"./util/assertString":169}],144:[function(require,module,exports){"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function isLowercase(e){return(0,_assertString2.default)(e),e===e.toLowerCase()}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=isLowercase;var _assertString=require("./util/assertString"),_assertString2=_interopRequireDefault(_assertString);module.exports=exports.default},{"./util/assertString":169}],145:[function(require,module,exports){"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function isMACAddress(e){return(0,_assertString2.default)(e),macAddress.test(e)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=isMACAddress
  ;var _assertString=require("./util/assertString"),_assertString2=_interopRequireDefault(_assertString),macAddress=/^([0-9a-fA-F][0-9a-fA-F]:){5}([0-9a-fA-F][0-9a-fA-F])$/;module.exports=exports.default},{"./util/assertString":169}],146:[function(require,module,exports){"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function isMD5(e){return(0,_assertString2.default)(e),md5.test(e)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=isMD5;var _assertString=require("./util/assertString"),_assertString2=_interopRequireDefault(_assertString),md5=/^[a-f0-9]{32}$/;module.exports=exports.default},{"./util/assertString":169}],147:[function(require,module,exports){"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function isMobilePhone(e,d){if((0,_assertString2.default)(e),d in phones)return phones[d].test(e);if("any"===d){for(var n in phones)if(phones.hasOwnProperty(n)){var s=phones[n];if(s.test(e))return!0}return!1}throw new Error("Invalid locale '"+d+"'")}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=isMobilePhone;var _assertString=require("./util/assertString"),_assertString2=_interopRequireDefault(_assertString),phones={"ar-AE":/^((\+?971)|0)?5[024568]\d{7}$/,"ar-DZ":/^(\+?213|0)(5|6|7)\d{8}$/,"ar-EG":/^((\+?20)|0)?1[012]\d{8}$/,"ar-JO":/^(\+?962|0)?7[789]\d{7}$/,"ar-SY":/^(!?(\+?963)|0)?9\d{8}$/,"ar-SA":/^(!?(\+?966)|0)?5\d{8}$/,"en-US":/^(\+?1)?[2-9]\d{2}[2-9](?!11)\d{6}$/,"cs-CZ":/^(\+?420)? ?[1-9][0-9]{2} ?[0-9]{3} ?[0-9]{3}$/,"sk-SK":/^(\+?421)? ?[1-9][0-9]{2} ?[0-9]{3} ?[0-9]{3}$/,"de-DE":/^(\+?49[ \.\-])?([\(]{1}[0-9]{1,6}[\)])?([0-9 \.\-\/]{3,20})((x|ext|extension)[ ]?[0-9]{1,4})?$/,"da-DK":/^(\+?45)?(\d{8})$/,"el-GR":/^(\+?30)?(69\d{8})$/,"en-AU":/^(\+?61|0)4\d{8}$/,"en-GB":/^(\+?44|0)7\d{9}$/,"en-HK":/^(\+?852\-?)?[569]\d{3}\-?\d{4}$/,"en-IN":/^(\+?91|0)?[789]\d{9}$/,"en-KE":/^(\+?254|0)?[7]\d{8}$/,"en-NG":/^(\+?234|0)?[789]\d{9}$/,"en-NZ":/^(\+?64|0)2\d{7,9}$/,"en-UG":/^(\+?256|0)?[7]\d{8}$/,"en-RW":/^(\+?250|0)?[7]\d{8}$/,"en-TZ":/^(\+?255|0)?[67]\d{8}$/,"en-ZA":/^(\+?27|0)\d{9}$/,"en-ZM":/^(\+?26)?09[567]\d{7}$/,"es-ES":/^(\+?34)?(6\d{1}|7[1234])\d{7}$/,"fi-FI":/^(\+?358|0)\s?(4(0|1|2|4|5|6)?|50)\s?(\d\s?){4,8}\d$/,"fa-IR":/^(\+?98[\-\s]?|0)9[0-39]\d[\-\s]?\d{3}[\-\s]?\d{4}$/,"fr-FR":/^(\+?33|0)[67]\d{8}$/,"he-IL":/^(\+972|0)([23489]|5[0248]|77)[1-9]\d{6}/,"hu-HU":/^(\+?36)(20|30|70)\d{7}$/,"lt-LT":/^(\+370|8)\d{8}$/,"id-ID":/^(\+?62|0[1-9])[\s|\d]+$/,"it-IT":/^(\+?39)?\s?3\d{2} ?\d{6,7}$/,"ko-KR":/^((\+?82)[ \-]?)?0?1([0|1|6|7|8|9]{1})[ \-]?\d{3,4}[ \-]?\d{4}$/,"ja-JP":/^(\+?81|0)\d{1,4}[ \-]?\d{1,4}[ \-]?\d{4}$/,"ms-MY":/^(\+?6?01){1}(([145]{1}(\-|\s)?\d{7,8})|([236789]{1}(\s|\-)?\d{7}))$/,"nb-NO":/^(\+?47)?[49]\d{7}$/,"nl-BE":/^(\+?32|0)4?\d{8}$/,"nn-NO":/^(\+?47)?[49]\d{7}$/,"pl-PL":/^(\+?48)? ?[5-8]\d ?\d{3} ?\d{2} ?\d{2}$/,"pt-BR":/^(\+?55|0)\-?[1-9]{2}\-?[2-9]{1}\d{3,4}\-?\d{4}$/,"pt-PT":/^(\+?351)?9[1236]\d{7}$/,"ro-RO":/^(\+?4?0)\s?7\d{2}(\/|\s|\.|\-)?\d{3}(\s|\.|\-)?\d{3}$/,"en-PK":/^((\+92)|(0092))-{0,1}\d{3}-{0,1}\d{7}$|^\d{11}$|^\d{4}-\d{7}$/,"ru-RU":/^(\+?7|8)?9\d{9}$/,"sr-RS":/^(\+3816|06)[- \d]{5,9}$/,"tr-TR":/^(\+?90|0)?5\d{9}$/,"vi-VN":/^(\+?84|0)?((1(2([0-9])|6([2-9])|88|99))|(9((?!5)[0-9])))([0-9]{7})$/,"zh-CN":/^(\+?0?86\-?)?1[345789]\d{9}$/,"zh-TW":/^(\+?886\-?|0)?9\d{8}$/};phones["en-CA"]=phones["en-US"],phones["fr-BE"]=phones["nl-BE"],phones["zh-HK"]=phones["en-HK"],module.exports=exports.default},{"./util/assertString":169}],148:[function(require,module,exports){"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function isMongoId(e){return(0,_assertString2.default)(e),(0,_isHexadecimal2.default)(e)&&24===e.length}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=isMongoId;var _assertString=require("./util/assertString"),_assertString2=_interopRequireDefault(_assertString),_isHexadecimal=require("./isHexadecimal"),_isHexadecimal2=_interopRequireDefault(_isHexadecimal);module.exports=exports.default},{"./isHexadecimal":132,"./util/assertString":169}],149:[function(require,module,exports){"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function isMultibyte(e){return(0,_assertString2.default)(e),multibyte.test(e)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=isMultibyte;var _assertString=require("./util/assertString"),_assertString2=_interopRequireDefault(_assertString),multibyte=/[^\x00-\x7F]/;module.exports=exports.default},{"./util/assertString":169}],150:[function(require,module,exports){"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function isNumeric(e){return(0,_assertString2.default)(e),numeric.test(e)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=isNumeric;var _assertString=require("./util/assertString"),_assertString2=_interopRequireDefault(_assertString),numeric=/^[-+]?[0-9]+$/;module.exports=exports.default},{"./util/assertString":169}],151:[function(require,module,exports){"use strict";function _interopRequireDefault(i){return i&&i.__esModule?i:{default:i}}Object.defineProperty(exports,"__esModule",{value:!0}),exports.locales=void 0,exports.default=function(i,t){if((0,_assertString2.default)(i),t in patterns)return patterns[t].test(i);if("any"===t){for(var e in patterns)if(patterns.hasOwnProperty(e)){var r=patterns[e];if(r.test(i))return!0}return!1}throw new Error("Invalid locale '"+t+"'")};var _assertString=require("./util/assertString"),_assertString2=_interopRequireDefault(_assertString),threeDigit=/^\d{3}$/,fourDigit=/^\d{4}$/,fiveDigit=/^\d{5}$/,sixDigit=/^\d{6}$/,patterns={AT:fourDigit,AU:sixDigit,BE:fourDigit,CA:/^[ABCEGHJKLMNPRSTVXY]\d[ABCEGHJ-NPRSTV-Z][\s\-]?\d[ABCEGHJ-NPRSTV-Z]\d$/i,CH:fourDigit,CZ:/^\d{3}\s?\d{2}$/,DE:fiveDigit,DK:fourDigit,DZ:fiveDigit,ES:fiveDigit,FI:fiveDigit,FR:/^\d{2}\s?\d{3}$/,GB:/^(gir\s?0aa|[a-z]{1,2}\d[\da-z]?\s?(\d[a-z]{2})?)$/i,GR:/^\d{3}\s?\d{2}$/,IL:fiveDigit,IN:sixDigit,IS:threeDigit,IT:fiveDigit,JP:/^\d{3}\-\d{4}$/,KE:fiveDigit,LI:/^(948[5-9]|949[0-7])$/,MX:fiveDigit,NL:/^\d{4}\s?[a-z]{2}$/i,NO:fourDigit,PL:/^\d{2}\-\d{3}$/,PT:/^\d{4}(\-\d{3})?$/,RO:sixDigit,RU:sixDigit,SA:fiveDigit,SE:/^\d{3}\s?\d{2}$/,TW:/^\d{3}(\d{2})?$/,US:/^\d{5}(-\d{4})?$/,ZA:fourDigit,ZM:fiveDigit},locales=exports.locales=Object.keys(patterns)},{"./util/assertString":169}],152:[function(require,module,exports){"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function isSurrogatePair(e){return(0,_assertString2.default)(e),surrogatePair.test(e)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=isSurrogatePair;var _assertString=require("./util/assertString"),_assertString2=_interopRequireDefault(_assertString),surrogatePair=/[\uD800-\uDBFF][\uDC00-\uDFFF]/;module.exports=exports.default},{"./util/assertString":169}],153:[function(require,module,exports){"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function isRegExp(e){return"[object RegExp]"===Object.prototype.toString.call(e)}function checkHost(e,t){for(var r=0;r<t.length;r++){var i=t[r];if(e===i||isRegExp(i)&&i.test(e))return!0}return!1}function isURL(e,t){if((0,_assertString2.default)(e),!e||e.length>=2083||/[\s<>]/.test(e))return!1;if(0===e.indexOf("mailto:"))return!1;t=(0,_merge2.default)(t,default_url_options);var r=void 0,i=void 0,l=void 0,s=void 0,o=void 0,u=void 0,_=void 0,n=void 0;if(_=e.split("#"),e=_.shift(),_=e.split("?"),e=_.shift(),_=e.split("://"),_.length>1){if(r=_.shift(),t.require_valid_protocol&&-1===t.protocols.indexOf(r))return!1}else{if(t.require_protocol)return!1;t.allow_protocol_relative_urls&&"//"===e.substr(0,2)&&(_[0]=e.substr(2))}if(""===(e=_.join("://")))return!1;if(_=e.split("/"),""===(e=_.shift())&&!t.require_host)return!0;if(_=e.split("@"),_.length>1&&(i=_.shift(),i.indexOf(":")>=0&&i.split(":").length>2))return!1;s=_.join("@"),u=null,n=null;var a=s.match(wrapped_ipv6);return a?(l="",n=a[1],u=a[2]||null):(_=s.split(":"),l=_.shift(),_.length&&(u=_.join(":"))),!(null!==u&&(o=parseInt(u,10),!/^[0-9]+$/.test(u)||o<=0||o>65535))&&(!!((0,_isIP2.default)(l)||(0,_isFQDN2.default)(l,t)||n&&(0,_isIP2.default)(n,6))&&(l=l||n,!(t.host_whitelist&&!checkHost(l,t.host_whitelist))&&(!t.host_blacklist||!checkHost(l,t.host_blacklist))))}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=isURL;var _assertString=require("./util/assertString"),_assertString2=_interopRequireDefault(_assertString),_isFQDN=require("./isFQDN"),_isFQDN2=_interopRequireDefault(_isFQDN),_isIP=require("./isIP"),_isIP2=_interopRequireDefault(_isIP),_merge=require("./util/merge"),_merge2=_interopRequireDefault(_merge),default_url_options={protocols:["http","https","ftp"],require_tld:!0,require_protocol:!1,require_host:!0,require_valid_protocol:!0,allow_underscores:!1,allow_trailing_dot:!1,allow_protocol_relative_urls:!1},wrapped_ipv6=/^\[([^\]]+)\](?::([0-9]+))?$/;module.exports=exports.default},{"./isFQDN":126,"./isIP":133,"./util/assertString":169,"./util/merge":170}],154:[function(require,module,exports){"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function isUUID(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"all";(0,_assertString2.default)(e);var r=uuid[t];return r&&r.test(e)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=isUUID;var _assertString=require("./util/assertString"),_assertString2=_interopRequireDefault(_assertString),uuid={3:/^[0-9A-F]{8}-[0-9A-F]{4}-3[0-9A-F]{3}-[0-9A-F]{4}-[0-9A-F]{12}$/i,4:/^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,5:/^[0-9A-F]{8}-[0-9A-F]{4}-5[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,all:/^[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}$/i};module.exports=exports.default},{"./util/assertString":169}],155:[function(require,module,exports){"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function isUppercase(e){return(0,_assertString2.default)(e),e===e.toUpperCase()}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=isUppercase;var _assertString=require("./util/assertString"),_assertString2=_interopRequireDefault(_assertString);module.exports=exports.default},{"./util/assertString":169}],156:[function(require,module,exports){"use strict";function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}function isVariableWidth(t){return(0,_assertString2.default)(t),_isFullWidth.fullWidth.test(t)&&_isHalfWidth.halfWidth.test(t)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=isVariableWidth;var _assertString=require("./util/assertString"),_assertString2=_interopRequireDefault(_assertString),_isFullWidth=require("./isFullWidth"),_isHalfWidth=require("./isHalfWidth");module.exports=exports.default},{"./isFullWidth":128,"./isHalfWidth":129,"./util/assertString":169}],157:[function(require,module,exports){"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function isWhitelisted(e,t){(0,_assertString2.default)(e);for(var r=e.length-1;r>=0;r--)if(-1===t.indexOf(e[r]))return!1;return!0}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=isWhitelisted;var _assertString=require("./util/assertString"),_assertString2=_interopRequireDefault(_assertString);module.exports=exports.default},{"./util/assertString":169}],158:[function(require,module,exports){"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function ltrim(e,t){(0,_assertString2.default)(e);var r=t?new RegExp("^["+t+"]+","g"):/^\s+/g;return e.replace(r,"")}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=ltrim;var _assertString=require("./util/assertString"),_assertString2=_interopRequireDefault(_assertString);module.exports=exports.default},{"./util/assertString":169}],159:[function(require,module,exports){"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function matches(e,t,r){return(0,_assertString2.default)(e),"[object RegExp]"!==Object.prototype.toString.call(t)&&(t=new RegExp(t,r)),t.test(e)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=matches;var _assertString=require("./util/assertString"),_assertString2=_interopRequireDefault(_assertString);module.exports=exports.default},{"./util/assertString":169}],160:[function(require,module,exports){"use strict";function _interopRequireDefault(o){return o&&o.__esModule?o:{default:o}}function normalizeEmail(o,l){if(l=(0,_merge2.default)(l,default_normalize_email_options),!(0,_isEmail2.default)(o))return!1;var e=o.split("@"),t=e.pop(),a=e.join("@"),i=[a,t];if(i[1]=i[1].toLowerCase(),"gmail.com"===i[1]||"googlemail.com"===i[1]){if(l.gmail_remove_subaddress&&(i[0]=i[0].split("+")[0]),l.gmail_remove_dots&&(i[0]=i[0].replace(/\./g,"")),!i[0].length)return!1;(l.all_lowercase||l.gmail_lowercase)&&(i[0]=i[0].toLowerCase()),i[1]=l.gmail_convert_googlemaildotcom?"gmail.com":i[1]}else if(~icloud_domains.indexOf(i[1])){if(l.icloud_remove_subaddress&&(i[0]=i[0].split("+")[0]),!i[0].length)return!1;(l.all_lowercase||l.icloud_lowercase)&&(i[0]=i[0].toLowerCase())}else if(~outlookdotcom_domains.indexOf(i[1])){if(l.outlookdotcom_remove_subaddress&&(i[0]=i[0].split("+")[0]),!i[0].length)return!1;(l.all_lowercase||l.outlookdotcom_lowercase)&&(i[0]=i[0].toLowerCase())}else if(~yahoo_domains.indexOf(i[1])){if(l.yahoo_remove_subaddress){var m=i[0].split("-");i[0]=m.length>1?m.slice(0,-1).join("-"):m[0]}if(!i[0].length)return!1;(l.all_lowercase||l.yahoo_lowercase)&&(i[0]=i[0].toLowerCase())}else l.all_lowercase&&(i[0]=i[0].toLowerCase());return i.join("@")}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=normalizeEmail;var _isEmail=require("./isEmail"),_isEmail2=_interopRequireDefault(_isEmail),_merge=require("./util/merge"),_merge2=_interopRequireDefault(_merge),default_normalize_email_options={all_lowercase:!0,gmail_lowercase:!0,gmail_remove_dots:!0,gmail_remove_subaddress:!0,gmail_convert_googlemaildotcom:!0,outlookdotcom_lowercase:!0,outlookdotcom_remove_subaddress:!0,yahoo_lowercase:!0,yahoo_remove_subaddress:!0,icloud_lowercase:!0,icloud_remove_subaddress:!0},icloud_domains=["icloud.com","me.com"],outlookdotcom_domains=["hotmail.at","hotmail.be","hotmail.ca","hotmail.cl","hotmail.co.il","hotmail.co.nz","hotmail.co.th","hotmail.co.uk","hotmail.com","hotmail.com.ar","hotmail.com.au","hotmail.com.br","hotmail.com.gr","hotmail.com.mx","hotmail.com.pe","hotmail.com.tr","hotmail.com.vn","hotmail.cz","hotmail.de","hotmail.dk","hotmail.es","hotmail.fr","hotmail.hu","hotmail.id","hotmail.ie","hotmail.in","hotmail.it","hotmail.jp","hotmail.kr","hotmail.lv","hotmail.my","hotmail.ph","hotmail.pt","hotmail.sa","hotmail.sg","hotmail.sk","live.be","live.co.uk","live.com","live.com.ar","live.com.mx","live.de","live.es","live.eu","live.fr","live.it","live.nl","msn.com","outlook.at","outlook.be","outlook.cl","outlook.co.il","outlook.co.nz","outlook.co.th","outlook.com","outlook.com.ar","outlook.com.au","outlook.com.br","outlook.com.gr","outlook.com.pe","outlook.com.tr","outlook.com.vn","outlook.cz","outlook.de","outlook.dk","outlook.es","outlook.fr","outlook.hu","outlook.id","outlook.ie","outlook.in","outlook.it","outlook.jp","outlook.kr","outlook.lv","outlook.my","outlook.ph","outlook.pt","outlook.sa","outlook.sg","outlook.sk","passport.com"],yahoo_domains=["rocketmail.com","yahoo.ca","yahoo.co.uk","yahoo.com","yahoo.de","yahoo.fr","yahoo.in","yahoo.it","ymail.com"];module.exports=exports.default},{"./isEmail":124,"./util/merge":170}],161:[function(require,module,exports){"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function rtrim(e,t){(0,_assertString2.default)(e);for(var r=t?new RegExp("["+t+"]"):/\s/,s=e.length-1;s>=0&&r.test(e[s]);)s--;return s<e.length?e.substr(0,s+1):e}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=rtrim;var _assertString=require("./util/assertString"),_assertString2=_interopRequireDefault(_assertString);module.exports=exports.default},{"./util/assertString":169}],162:[function(require,module,exports){"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function stripLow(e,t){(0,_assertString2.default)(e);var r=t?"\\x00-\\x09\\x0B\\x0C\\x0E-\\x1F\\x7F":"\\x00-\\x1F\\x7F";return(0,_blacklist2.default)(e,r)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=stripLow;var _assertString=require("./util/assertString"),_assertString2=_interopRequireDefault(_assertString),_blacklist=require("./blacklist"),_blacklist2=_interopRequireDefault(_blacklist);module.exports=exports.default},{"./blacklist":107,"./util/assertString":169}],163:[function(require,module,exports){"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function toBoolean(e,t){return(0,_assertString2.default)(e),t?"1"===e||"true"===e:"0"!==e&&"false"!==e&&""!==e}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=toBoolean;var _assertString=require("./util/assertString"),_assertString2=_interopRequireDefault(_assertString);module.exports=exports.default},{"./util/assertString":169}],164:[function(require,module,exports){"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function toDate(e){return(0,_assertString2.default)(e),e=Date.parse(e),isNaN(e)?null:new Date(e)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=toDate;var _assertString=require("./util/assertString"),_assertString2=_interopRequireDefault(_assertString);module.exports=exports.default},{"./util/assertString":169}],165:[function(require,module,exports){"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function toFloat(e){return(0,_assertString2.default)(e),parseFloat(e)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=toFloat;var _assertString=require("./util/assertString"),_assertString2=_interopRequireDefault(_assertString);module.exports=exports.default},{"./util/assertString":169}],166:[function(require,module,exports){"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function toInt(e,t){return(0,_assertString2.default)(e),parseInt(e,t||10)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=toInt;var _assertString=require("./util/assertString"),_assertString2=_interopRequireDefault(_assertString);module.exports=exports.default},{"./util/assertString":169}],167:[function(require,module,exports){"use strict";function _interopRequireDefault(r){return r&&r.__esModule?r:{default:r}}function trim(r,e){return(0,_rtrim2.default)((0,_ltrim2.default)(r,e),e)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=trim;var _rtrim=require("./rtrim"),_rtrim2=_interopRequireDefault(_rtrim),_ltrim=require("./ltrim"),_ltrim2=_interopRequireDefault(_ltrim);module.exports=exports.default},{"./ltrim":158,"./rtrim":161}],168:[function(require,module,exports){"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function unescape(e){return(0,_assertString2.default)(e),e.replace(/&amp;/g,"&").replace(/&quot;/g,'"').replace(/&#x27;/g,"'").replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&#x2F;/g,"/").replace(/&#x5C;/g,"\\").replace(/&#96;/g,"`")}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=unescape;var _assertString=require("./util/assertString"),_assertString2=_interopRequireDefault(_assertString);module.exports=exports.default},{"./util/assertString":169}],169:[function(require,module,exports){"use strict";function assertString(t){if(!("string"==typeof t||t instanceof String))throw new TypeError("This library (validator.js) validates strings only")}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=assertString,module.exports=exports.default},{}],170:[function(require,module,exports){"use strict";function merge(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments[1];for(var t in r)void 0===e[t]&&(e[t]=r[t]);return e}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=merge,module.exports=exports.default},{}],171:[function(require,module,exports){"use strict";function toString(t){return"object"===(void 0===t?"undefined":_typeof(t))&&null!==t?t="function"==typeof t.toString?t.toString():"[object Object]":(null===t||void 0===t||isNaN(t)&&!t.length)&&(t=""),String(t)}Object.defineProperty(exports,"__esModule",{value:!0});var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};exports.default=toString,module.exports=exports.default},{}],172:[function(require,module,exports){"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function whitelist(e,t){return(0,_assertString2.default)(e),e.replace(new RegExp("[^"+t+"]+","g"),"")}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=whitelist;var _assertString=require("./util/assertString"),_assertString2=_interopRequireDefault(_assertString);module.exports=exports.default},{"./util/assertString":169}],173:[function(require,module,exports){function extend(){for(var r={},e=0;e<arguments.length;e++){var t=arguments[e];for(var n in t)hasOwnProperty.call(t,n)&&(r[n]=t[n])}return r}module.exports=extend;var hasOwnProperty=Object.prototype.hasOwnProperty},{}],174:[function(require,module,exports){"use strict";module.exports={INVALID_TYPE:"Expected type {0} but found type {1}",INVALID_FORMAT:"Object didn't pass validation for format {0}: {1}",ENUM_MISMATCH:"No enum match for: {0}",ANY_OF_MISSING:"Data does not match any schemas from 'anyOf'",ONE_OF_MISSING:"Data does not match any schemas from 'oneOf'",ONE_OF_MULTIPLE:"Data is valid against more than one schema from 'oneOf'",NOT_PASSED:"Data matches schema from 'not'",ARRAY_LENGTH_SHORT:"Array is too short ({0}), minimum {1}",ARRAY_LENGTH_LONG:"Array is too long ({0}), maximum {1}",ARRAY_UNIQUE:"Array items are not unique (indexes {0} and {1})",ARRAY_ADDITIONAL_ITEMS:"Additional items not allowed",MULTIPLE_OF:"Value {0} is not a multiple of {1}",MINIMUM:"Value {0} is less than minimum {1}",MINIMUM_EXCLUSIVE:"Value {0} is equal or less than exclusive minimum {1}",MAXIMUM:"Value {0} is greater than maximum {1}",MAXIMUM_EXCLUSIVE:"Value {0} is equal or greater than exclusive maximum {1}",OBJECT_PROPERTIES_MINIMUM:"Too few properties defined ({0}), minimum {1}",OBJECT_PROPERTIES_MAXIMUM:"Too many properties defined ({0}), maximum {1}",OBJECT_MISSING_REQUIRED_PROPERTY:"Missing required property: {0}",OBJECT_ADDITIONAL_PROPERTIES:"Additional properties not allowed: {0}",OBJECT_DEPENDENCY_KEY:"Dependency failed - key must exist: {0} (due to key: {1})",MIN_LENGTH:"String is too short ({0} chars), minimum {1}",MAX_LENGTH:"String is too long ({0} chars), maximum {1}",PATTERN:"String does not match pattern {0}: {1}",KEYWORD_TYPE_EXPECTED:"Keyword '{0}' is expected to be of type '{1}'",KEYWORD_UNDEFINED_STRICT:"Keyword '{0}' must be defined in strict mode",KEYWORD_UNEXPECTED:"Keyword '{0}' is not expected to appear in the schema",KEYWORD_MUST_BE:"Keyword '{0}' must be {1}",KEYWORD_DEPENDENCY:"Keyword '{0}' requires keyword '{1}'",KEYWORD_PATTERN:"Keyword '{0}' is not a valid RegExp pattern: {1}",KEYWORD_VALUE_TYPE:"Each element of keyword '{0}' array must be a '{1}'",UNKNOWN_FORMAT:"There is no validation function for format '{0}'",CUSTOM_MODE_FORCE_PROPERTIES:"{0} must define at least one property if present",REF_UNRESOLVED:"Reference has not been resolved during compilation: {0}",UNRESOLVABLE_REFERENCE:"Reference could not be resolved: {0}",SCHEMA_NOT_REACHABLE:"Validator was not able to read schema with uri: {0}",SCHEMA_TYPE_EXPECTED:"Schema is expected to be of type 'object'",SCHEMA_NOT_AN_OBJECT:"Schema is not an object: {0}",ASYNC_TIMEOUT:"{0} asynchronous task(s) have timed out after {1} ms",PARENT_SCHEMA_VALIDATION_FAILED:"Schema failed to validate against its parent schema, see inner errors for details.",REMOTE_NOT_VALID:"Remote reference didn't compile successfully: {0}"}},{}],175:[function(require,module,exports){var validator=require("validator"),FormatValidators={date:function(t){if("string"!=typeof t)return!0;var r=/^([0-9]{4})-([0-9]{2})-([0-9]{2})$/.exec(t);return null!==r&&!(r[2]<"01"||r[2]>"12"||r[3]<"01"||r[3]>"31")},"date-time":function(t){if("string"!=typeof t)return!0;var r=t.toLowerCase().split("t");if(!FormatValidators.date(r[0]))return!1;var i=/^([0-9]{2}):([0-9]{2}):([0-9]{2})(.[0-9]+)?(z|([+-][0-9]{2}:[0-9]{2}))$/.exec(r[1]);return null!==i&&!(i[1]>"23"||i[2]>"59"||i[3]>"59")},email:function(t){return"string"!=typeof t||validator.isEmail(t,{require_tld:!0})},hostname:function(t){if("string"!=typeof t)return!0;var r=/^[a-zA-Z](([-0-9a-zA-Z]+)?[0-9a-zA-Z])?(\.[a-zA-Z](([-0-9a-zA-Z]+)?[0-9a-zA-Z])?)*$/.test(t);if(r){if(t.length>255)return!1;for(var i=t.split("."),e=0;e<i.length;e++)if(i[e].length>63)return!1}return r},"host-name":function(t){return FormatValidators.hostname.call(this,t)},ipv4:function(t){return"string"!=typeof t||validator.isIP(t,4)},ipv6:function(t){return"string"!=typeof t||validator.isIP(t,6)},regex:function(t){try{return RegExp(t),!0}catch(t){return!1}},uri:function(t){return this.options.strictUris?FormatValidators["strict-uri"].apply(this,arguments):"string"!=typeof t||RegExp("^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?").test(t)},"strict-uri":function(t){return"string"!=typeof t||validator.isURL(t)}};module.exports=FormatValidators},{validator:105}],176:[function(require,module,exports){"use strict";var FormatValidators=require("./FormatValidators"),Report=require("./Report"),Utils=require("./Utils"),JsonValidators={multipleOf:function(r,t,e){"number"==typeof e&&"integer"!==Utils.whatIs(e/t.multipleOf)&&r.addError("MULTIPLE_OF",[e,t.multipleOf],null,t.description)},maximum:function(r,t,e){"number"==typeof e&&(!0!==t.exclusiveMaximum?e>t.maximum&&r.addError("MAXIMUM",[e,t.maximum],null,t.description):e>=t.maximum&&r.addError("MAXIMUM_EXCLUSIVE",[e,t.maximum],null,t.description))},exclusiveMaximum:function(){},minimum:function(r,t,e){"number"==typeof e&&(!0!==t.exclusiveMinimum?e<t.minimum&&r.addError("MINIMUM",[e,t.minimum],null,t.description):e<=t.minimum&&r.addError("MINIMUM_EXCLUSIVE",[e,t.minimum],null,t.description))},exclusiveMinimum:function(){},maxLength:function(r,t,e){"string"==typeof e&&Utils.ucs2decode(e).length>t.maxLength&&r.addError("MAX_LENGTH",[e.length,t.maxLength],null,t.description)},minLength:function(r,t,e){"string"==typeof e&&Utils.ucs2decode(e).length<t.minLength&&r.addError("MIN_LENGTH",[e.length,t.minLength],null,t.description)},pattern:function(r,t,e){"string"==typeof e&&!1===RegExp(t.pattern).test(e)&&r.addError("PATTERN",[t.pattern,e],null,t.description)},additionalItems:function(r,t,e){Array.isArray(e)&&!1===t.additionalItems&&Array.isArray(t.items)&&e.length>t.items.length&&r.addError("ARRAY_ADDITIONAL_ITEMS",null,null,t.description)},items:function(){},maxItems:function(r,t,e){Array.isArray(e)&&e.length>t.maxItems&&r.addError("ARRAY_LENGTH_LONG",[e.length,t.maxItems],null,t.description)},minItems:function(r,t,e){Array.isArray(e)&&e.length<t.minItems&&r.addError("ARRAY_LENGTH_SHORT",[e.length,t.minItems],null,t.description)},uniqueItems:function(r,t,e){if(Array.isArray(e)&&!0===t.uniqueItems){var i=[];!1===Utils.isUniqueArray(e,i)&&r.addError("ARRAY_UNIQUE",i,null,t.description)}},maxProperties:function(r,t,e){if("object"===Utils.whatIs(e)){var i=Object.keys(e).length;i>t.maxProperties&&r.addError("OBJECT_PROPERTIES_MAXIMUM",[i,t.maxProperties],null,t.description)}},minProperties:function(r,t,e){if("object"===Utils.whatIs(e)){var i=Object.keys(e).length;i<t.minProperties&&r.addError("OBJECT_PROPERTIES_MINIMUM",[i,t.minProperties],null,t.description)}},required:function(r,t,e){if("object"===Utils.whatIs(e))for(var i=t.required.length;i--;){var n=t.required[i];void 0===e[n]&&r.addError("OBJECT_MISSING_REQUIRED_PROPERTY",[n],null,t.description)}},additionalProperties:function(r,t,e){if(void 0===t.properties&&void 0===t.patternProperties)return JsonValidators.properties.call(this,r,t,e)},patternProperties:function(r,t,e){if(void 0===t.properties)return JsonValidators.properties.call(this,r,t,e)},properties:function(r,t,e){if("object"===Utils.whatIs(e)){var i=void 0!==t.properties?t.properties:{},n=void 0!==t.patternProperties?t.patternProperties:{};if(!1===t.additionalProperties){var o=Object.keys(e),s=Object.keys(i),a=Object.keys(n);o=Utils.difference(o,s);for(var l=a.length;l--;)for(var d=RegExp(a[l]),p=o.length;p--;)!0===d.test(o[p])&&o.splice(p,1);if(o.length>0){var u=this.options.assumeAdditional.length;if(u)for(;u--;){var c=o.indexOf(this.options.assumeAdditional[u]);-1!==c&&o.splice(c,1)}o.length>0&&r.addError("OBJECT_ADDITIONAL_PROPERTIES",[o],null,t.description)}}}},dependencies:function(r,t,e){if("object"===Utils.whatIs(e))for(var i=Object.keys(t.dependencies),n=i.length;n--;){var o=i[n];if(e[o]){var s=t.dependencies[o];if("object"===Utils.whatIs(s))exports.validate.call(this,r,s,e);else for(var a=s.length;a--;){var l=s[a];void 0===e[l]&&r.addError("OBJECT_DEPENDENCY_KEY",[l,o],null,t.description)}}}},enum:function(r,t,e){for(var i=!1,n=t.enum.length;n--;)if(Utils.areEqual(e,t.enum[n])){i=!0;break}!1===i&&r.addError("ENUM_MISMATCH",[e],null,t.description)},allOf:function(r,t,e){for(var i=t.allOf.length;i--;){var n=exports.validate.call(this,r,t.allOf[i],e);if(this.options.breakOnFirstError&&!1===n)break}},anyOf:function(r,t,e){for(var i=[],n=!1,o=t.anyOf.length;o--&&!1===n;){var s=new Report(r);i.push(s),n=exports.validate.call(this,s,t.anyOf[o],e)}!1===n&&r.addError("ANY_OF_MISSING",void 0,i,t.description)},oneOf:function(r,t,e){for(var i=0,n=[],o=t.oneOf.length;o--;){var s=new Report(r,{maxErrors:1});n.push(s),!0===exports.validate.call(this,s,t.oneOf[o],e)&&i++}0===i?r.addError("ONE_OF_MISSING",void 0,n,t.description):i>1&&r.addError("ONE_OF_MULTIPLE",null,null,t.description)},not:function(r,t,e){var i=new Report(r);!0===exports.validate.call(this,i,t.not,e)&&r.addError("NOT_PASSED",null,null,t.description)},definitions:function(){},format:function(r,t,e){var i=FormatValidators[t.format];"function"==typeof i?2===i.length?r.addAsyncTask(i,[e],function(i){!0!==i&&r.addError("INVALID_FORMAT",[t.format,e],null,t.description)}):!0!==i.call(this,e)&&r.addError("INVALID_FORMAT",[t.format,e],null,t.description):!0!==this.options.ignoreUnknownFormats&&r.addError("UNKNOWN_FORMAT",[t.format],null,t.description)}},recurseArray=function(r,t,e){var i=e.length;if(Array.isArray(t.items))for(;i--;)i<t.items.length?(r.path.push(i.toString()),exports.validate.call(this,r,t.items[i],e[i]),r.path.pop()):"object"==typeof t.additionalItems&&(r.path.push(i.toString()),exports.validate.call(this,r,t.additionalItems,e[i]),r.path.pop());else if("object"==typeof t.items)for(;i--;)r.path.push(i.toString()),exports.validate.call(this,r,t.items,e[i]),r.path.pop()},recurseObject=function(r,t,e){var i=t.additionalProperties;!0!==i&&void 0!==i||(i={});for(var n=t.properties?Object.keys(t.properties):[],o=t.patternProperties?Object.keys(t.patternProperties):[],s=Object.keys(e),a=s.length;a--;){var l=s[a],d=e[l],p=[];-1!==n.indexOf(l)&&p.push(t.properties[l]);for(var u=o.length;u--;){var c=o[u];!0===RegExp(c).test(l)&&p.push(t.patternProperties[c])}for(0===p.length&&!1!==i&&p.push(i),u=p.length;u--;)r.path.push(l),exports.validate.call(this,r,p[u],d),r.path.pop()}};exports.validate=function(r,t,e){r.commonErrorMessage="JSON_OBJECT_VALIDATION_FAILED";var i=Utils.whatIs(t);if("object"!==i)return r.addError("SCHEMA_NOT_AN_OBJECT",[i],null,t.description),!1
  ;var n=Object.keys(t);if(0===n.length)return!0;var o=!1;if(r.rootSchema||(r.rootSchema=t,o=!0),void 0!==t.$ref){for(var s=99;t.$ref&&s>0;){if(!t.__$refResolved){r.addError("REF_UNRESOLVED",[t.$ref],null,t.description);break}if(t.__$refResolved===t)break;t=t.__$refResolved,n=Object.keys(t),s--}if(0===s)throw new Error("Circular dependency by $ref references!")}var a=Utils.whatIs(e);if(t.type)if("string"==typeof t.type){if(a!==t.type&&("integer"!==a||"number"!==t.type)&&(r.addError("INVALID_TYPE",[t.type,a],null,t.description),this.options.breakOnFirstError))return!1}else if(-1===t.type.indexOf(a)&&("integer"!==a||-1===t.type.indexOf("number"))&&(r.addError("INVALID_TYPE",[t.type,a],null,t.description),this.options.breakOnFirstError))return!1;for(var l=n.length;l--&&!(JsonValidators[n[l]]&&(JsonValidators[n[l]].call(this,r,t,e),r.errors.length&&this.options.breakOnFirstError)););return 0!==r.errors.length&&!1!==this.options.breakOnFirstError||("array"===a?recurseArray.call(this,r,t,e):"object"===a&&recurseObject.call(this,r,t,e)),"function"==typeof this.options.customValidator&&this.options.customValidator(r,t,e),o&&(r.rootSchema=void 0),0===r.errors.length}},{"./FormatValidators":175,"./Report":178,"./Utils":182}],177:[function(require,module,exports){"function"!=typeof Number.isFinite&&(Number.isFinite=function(e){return"number"==typeof e&&(e===e&&e!==1/0&&e!==-1/0)})},{}],178:[function(require,module,exports){(function(process){"use strict";function Report(r,t){this.parentReport=r instanceof Report?r:void 0,this.options=r instanceof Report?r.options:r||{},this.reportOptions=t||{},this.errors=[],this.path=[],this.asyncTasks=[]}var get=require("lodash.get"),Errors=require("./Errors"),Utils=require("./Utils");Report.prototype.isValid=function(){if(this.asyncTasks.length>0)throw new Error("Async tasks pending, can't answer isValid");return 0===this.errors.length},Report.prototype.addAsyncTask=function(r,t,o){this.asyncTasks.push([r,t,o])},Report.prototype.processAsyncTasks=function(r,t){function o(){process.nextTick(function(){var r=0===a.errors.length,o=r?void 0:a.errors;t(o,r)})}var e=r||2e3,s=this.asyncTasks.length,n=s,i=!1,a=this;if(0===s||this.errors.length>0)return void o();for(;n--;){var p=this.asyncTasks[n];p[0].apply(null,p[1].concat(function(r){return function(t){i||(r(t),0==--s&&o())}}(p[2])))}setTimeout(function(){s>0&&(i=!0,a.addError("ASYNC_TIMEOUT",[s,e]),t(a.errors,!1))},e)},Report.prototype.getPath=function(r){var t=[];return this.parentReport&&(t=t.concat(this.parentReport.path)),t=t.concat(this.path),!0!==r&&(t="#/"+t.map(function(r){return Utils.isAbsoluteUri(r)?"uri("+r+")":r.replace(/\~/g,"~0").replace(/\//g,"~1")}).join("/")),t},Report.prototype.getSchemaId=function(){if(!this.rootSchema)return null;var r=[];for(this.parentReport&&(r=r.concat(this.parentReport.path)),r=r.concat(this.path);r.length>0;){var t=get(this.rootSchema,r);if(t&&t.id)return t.id;r.pop()}return this.rootSchema.id},Report.prototype.hasError=function(r,t){for(var o=this.errors.length;o--;)if(this.errors[o].code===r){for(var e=!0,s=this.errors[o].params.length;s--;)this.errors[o].params[s]!==t[s]&&(e=!1);if(e)return e}return!1},Report.prototype.addError=function(r,t,o,e){if(!r)throw new Error("No errorCode passed into addError()");this.addCustomError(r,Errors[r],t,o,e)},Report.prototype.addCustomError=function(r,t,o,e,s){if(!(this.errors.length>=this.reportOptions.maxErrors)){if(!t)throw new Error("No errorMessage known for code "+r);o=o||[];for(var n=o.length;n--;){var i=Utils.whatIs(o[n]),a="object"===i||"null"===i?JSON.stringify(o[n]):o[n];t=t.replace("{"+n+"}",a)}var p={code:r,params:o,message:t,path:this.getPath(this.options.reportPathAsArray),schemaId:this.getSchemaId()};if(s&&(p.description=s),null!=e){for(Array.isArray(e)||(e=[e]),p.inner=[],n=e.length;n--;)for(var h=e[n],c=h.errors.length;c--;)p.inner.push(h.errors[c]);0===p.inner.length&&(p.inner=void 0)}this.errors.push(p)}},module.exports=Report}).call(this,require("_process"))},{"./Errors":174,"./Utils":182,_process:76,"lodash.get":71}],179:[function(require,module,exports){"use strict";function decodeJSONPointer(e){return decodeURIComponent(e).replace(/~[0-1]/g,function(e){return"~1"===e?"/":"~"})}function getRemotePath(e){var t=e.indexOf("#");return-1===t?e:e.slice(0,t)}function getQueryPath(e){var t=e.indexOf("#");return-1===t?void 0:e.slice(t+1)}function findId(e,t){if("object"==typeof e&&null!==e){if(!t)return e;if(e.id&&(e.id===t||"#"===e.id[0]&&e.id.substring(1)===t))return e;var r,i;if(Array.isArray(e)){for(r=e.length;r--;)if(i=findId(e[r],t))return i}else{var a=Object.keys(e);for(r=a.length;r--;){var n=a[r];if(0!==n.indexOf("__$")&&(i=findId(e[n],t)))return i}}}}var isequal=require("lodash.isequal"),Report=require("./Report"),SchemaCompilation=require("./SchemaCompilation"),SchemaValidation=require("./SchemaValidation"),Utils=require("./Utils");exports.cacheSchemaByUri=function(e,t){var r=getRemotePath(e);r&&(this.cache[r]=t)},exports.removeFromCacheByUri=function(e){var t=getRemotePath(e);t&&delete this.cache[t]},exports.checkCacheForUri=function(e){var t=getRemotePath(e);return!!t&&null!=this.cache[t]},exports.getSchema=function(e,t){return"object"==typeof t&&(t=exports.getSchemaByReference.call(this,e,t)),"string"==typeof t&&(t=exports.getSchemaByUri.call(this,e,t)),t},exports.getSchemaByReference=function(e,t){for(var r=this.referenceCache.length;r--;)if(isequal(this.referenceCache[r][0],t))return this.referenceCache[r][1];var i=Utils.cloneDeep(t);return this.referenceCache.push([t,i]),i},exports.getSchemaByUri=function(e,t,r){var i=getRemotePath(t),a=getQueryPath(t),n=i?this.cache[i]:r;if(n&&i){if(n!==r){e.path.push(i);var c=new Report(e);SchemaCompilation.compileSchema.call(this,c,n)&&SchemaValidation.validateSchema.call(this,c,n);var o=c.isValid();if(o||e.addError("REMOTE_NOT_VALID",[t],c),e.path.pop(),!o)return}}if(n&&a)for(var h=a.split("/"),f=0,s=h.length;n&&f<s;f++){var u=decodeJSONPointer(h[f]);n=0===f?findId(n,u):n[u]}return n},exports.getRemotePath=getRemotePath},{"./Report":178,"./SchemaCompilation":180,"./SchemaValidation":181,"./Utils":182,"lodash.isequal":72}],180:[function(require,module,exports){"use strict";function mergeReference(e,r){if(Utils.isAbsoluteUri(r))return r;var i,s=e.join(""),c=Utils.isAbsoluteUri(s),t=Utils.isRelativeUri(s),a=Utils.isRelativeUri(r);c&&a?(i=s.match(/\/[^\/]*$/))&&(s=s.slice(0,i.index+1)):t&&a?s="":(i=s.match(/[^#\/]+$/))&&(s=s.slice(0,i.index));var o=s+r;return o=o.replace(/##/,"#")}function collectReferences(e,r,i,s){if(r=r||[],i=i||[],s=s||[],"object"!=typeof e||null===e)return r;"string"==typeof e.id&&i.push(e.id),"string"==typeof e.$ref&&void 0===e.__$refResolved&&r.push({ref:mergeReference(i,e.$ref),key:"$ref",obj:e,path:s.slice(0)}),"string"==typeof e.$schema&&void 0===e.__$schemaResolved&&r.push({ref:mergeReference(i,e.$schema),key:"$schema",obj:e,path:s.slice(0)});var c;if(Array.isArray(e))for(c=e.length;c--;)s.push(c.toString()),collectReferences(e[c],r,i,s),s.pop();else{var t=Object.keys(e);for(c=t.length;c--;)0!==t[c].indexOf("__$")&&(s.push(t[c]),collectReferences(e[t[c]],r,i,s),s.pop())}return"string"==typeof e.id&&i.pop(),r}function findId(e,r){for(var i=e.length;i--;)if(e[i].id===r)return e[i];return null}var Report=require("./Report"),SchemaCache=require("./SchemaCache"),Utils=require("./Utils"),compileArrayOfSchemasLoop=function(e,r){for(var i=r.length,s=0;i--;){var c=new Report(e);exports.compileSchema.call(this,c,r[i])&&s++,e.errors=e.errors.concat(c.errors)}return s},compileArrayOfSchemas=function(e,r){var i,s=0;do{for(var c=e.errors.length;c--;)"UNRESOLVABLE_REFERENCE"===e.errors[c].code&&e.errors.splice(c,1);for(i=s,s=compileArrayOfSchemasLoop.call(this,e,r),c=r.length;c--;){var t=r[c];if(t.__$missingReferences){for(var a=t.__$missingReferences.length;a--;){var o=t.__$missingReferences[a],l=findId(r,o.ref);l&&(o.obj["__"+o.key+"Resolved"]=l,t.__$missingReferences.splice(a,1))}0===t.__$missingReferences.length&&delete t.__$missingReferences}}}while(s!==r.length&&s!==i);return e.isValid()};exports.compileSchema=function(e,r){if(e.commonErrorMessage="SCHEMA_COMPILATION_FAILED","string"==typeof r){var i=SchemaCache.getSchemaByUri.call(this,e,r);if(!i)return e.addError("SCHEMA_NOT_REACHABLE",[r]),!1;r=i}if(Array.isArray(r))return compileArrayOfSchemas.call(this,e,r);if(r.__$compiled&&r.id&&!1===SchemaCache.checkCacheForUri.call(this,r.id)&&(r.__$compiled=void 0),r.__$compiled)return!0;r.id&&"string"==typeof r.id&&SchemaCache.cacheSchemaByUri.call(this,r.id,r);var s=!1;e.rootSchema||(e.rootSchema=r,s=!0);var c=e.isValid();delete r.__$missingReferences;for(var t=collectReferences.call(this,r),a=t.length;a--;){var o=t[a],l=SchemaCache.getSchemaByUri.call(this,e,o.ref,r);if(!l){var n=this.getSchemaReader();if(n){var h=n(o.ref);if(h){h.id=o.ref;var f=new Report(e);exports.compileSchema.call(this,f,h)?l=SchemaCache.getSchemaByUri.call(this,e,o.ref,r):e.errors=e.errors.concat(f.errors)}}}if(!l){var m=e.hasError("REMOTE_NOT_VALID",[o.ref]),p=Utils.isAbsoluteUri(o.ref),_=!1,d=!0===this.options.ignoreUnresolvableReferences;p&&(_=SchemaCache.checkCacheForUri.call(this,o.ref)),m||d&&p||_||(Array.prototype.push.apply(e.path,o.path),e.addError("UNRESOLVABLE_REFERENCE",[o.ref]),e.path=e.path.slice(0,-o.path.length),c&&(r.__$missingReferences=r.__$missingReferences||[],r.__$missingReferences.push(o)))}o.obj["__"+o.key+"Resolved"]=l}var g=e.isValid();return g?r.__$compiled=!0:r.id&&"string"==typeof r.id&&SchemaCache.removeFromCacheByUri.call(this,r.id),s&&(e.rootSchema=void 0),g}},{"./Report":178,"./SchemaCache":179,"./Utils":182}],181:[function(require,module,exports){"use strict";var FormatValidators=require("./FormatValidators"),JsonValidation=require("./JsonValidation"),Report=require("./Report"),Utils=require("./Utils"),SchemaValidators={$ref:function(e,r){"string"!=typeof r.$ref&&e.addError("KEYWORD_TYPE_EXPECTED",["$ref","string"])},$schema:function(e,r){"string"!=typeof r.$schema&&e.addError("KEYWORD_TYPE_EXPECTED",["$schema","string"])},multipleOf:function(e,r){"number"!=typeof r.multipleOf?e.addError("KEYWORD_TYPE_EXPECTED",["multipleOf","number"]):r.multipleOf<=0&&e.addError("KEYWORD_MUST_BE",["multipleOf","strictly greater than 0"])},maximum:function(e,r){"number"!=typeof r.maximum&&e.addError("KEYWORD_TYPE_EXPECTED",["maximum","number"])},exclusiveMaximum:function(e,r){"boolean"!=typeof r.exclusiveMaximum?e.addError("KEYWORD_TYPE_EXPECTED",["exclusiveMaximum","boolean"]):void 0===r.maximum&&e.addError("KEYWORD_DEPENDENCY",["exclusiveMaximum","maximum"])},minimum:function(e,r){"number"!=typeof r.minimum&&e.addError("KEYWORD_TYPE_EXPECTED",["minimum","number"])},exclusiveMinimum:function(e,r){"boolean"!=typeof r.exclusiveMinimum?e.addError("KEYWORD_TYPE_EXPECTED",["exclusiveMinimum","boolean"]):void 0===r.minimum&&e.addError("KEYWORD_DEPENDENCY",["exclusiveMinimum","minimum"])},maxLength:function(e,r){"integer"!==Utils.whatIs(r.maxLength)?e.addError("KEYWORD_TYPE_EXPECTED",["maxLength","integer"]):r.maxLength<0&&e.addError("KEYWORD_MUST_BE",["maxLength","greater than, or equal to 0"])},minLength:function(e,r){"integer"!==Utils.whatIs(r.minLength)?e.addError("KEYWORD_TYPE_EXPECTED",["minLength","integer"]):r.minLength<0&&e.addError("KEYWORD_MUST_BE",["minLength","greater than, or equal to 0"])},pattern:function(e,r){if("string"!=typeof r.pattern)e.addError("KEYWORD_TYPE_EXPECTED",["pattern","string"]);else try{RegExp(r.pattern)}catch(t){e.addError("KEYWORD_PATTERN",["pattern",r.pattern])}},additionalItems:function(e,r){var t=Utils.whatIs(r.additionalItems);"boolean"!==t&&"object"!==t?e.addError("KEYWORD_TYPE_EXPECTED",["additionalItems",["boolean","object"]]):"object"===t&&(e.path.push("additionalItems"),exports.validateSchema.call(this,e,r.additionalItems),e.path.pop())},items:function(e,r){var t=Utils.whatIs(r.items);if("object"===t)e.path.push("items"),exports.validateSchema.call(this,e,r.items),e.path.pop();else if("array"===t)for(var a=r.items.length;a--;)e.path.push("items"),e.path.push(a.toString()),exports.validateSchema.call(this,e,r.items[a]),e.path.pop(),e.path.pop();else e.addError("KEYWORD_TYPE_EXPECTED",["items",["array","object"]]);!0===this.options.forceAdditional&&void 0===r.additionalItems&&Array.isArray(r.items)&&e.addError("KEYWORD_UNDEFINED_STRICT",["additionalItems"]),this.options.assumeAdditional&&void 0===r.additionalItems&&Array.isArray(r.items)&&(r.additionalItems=!1)},maxItems:function(e,r){"number"!=typeof r.maxItems?e.addError("KEYWORD_TYPE_EXPECTED",["maxItems","integer"]):r.maxItems<0&&e.addError("KEYWORD_MUST_BE",["maxItems","greater than, or equal to 0"])},minItems:function(e,r){"integer"!==Utils.whatIs(r.minItems)?e.addError("KEYWORD_TYPE_EXPECTED",["minItems","integer"]):r.minItems<0&&e.addError("KEYWORD_MUST_BE",["minItems","greater than, or equal to 0"])},uniqueItems:function(e,r){"boolean"!=typeof r.uniqueItems&&e.addError("KEYWORD_TYPE_EXPECTED",["uniqueItems","boolean"])},maxProperties:function(e,r){"integer"!==Utils.whatIs(r.maxProperties)?e.addError("KEYWORD_TYPE_EXPECTED",["maxProperties","integer"]):r.maxProperties<0&&e.addError("KEYWORD_MUST_BE",["maxProperties","greater than, or equal to 0"])},minProperties:function(e,r){"integer"!==Utils.whatIs(r.minProperties)?e.addError("KEYWORD_TYPE_EXPECTED",["minProperties","integer"]):r.minProperties<0&&e.addError("KEYWORD_MUST_BE",["minProperties","greater than, or equal to 0"])},required:function(e,r){if("array"!==Utils.whatIs(r.required))e.addError("KEYWORD_TYPE_EXPECTED",["required","array"]);else if(0===r.required.length)e.addError("KEYWORD_MUST_BE",["required","an array with at least one element"]);else{for(var t=r.required.length;t--;)"string"!=typeof r.required[t]&&e.addError("KEYWORD_VALUE_TYPE",["required","string"]);!1===Utils.isUniqueArray(r.required)&&e.addError("KEYWORD_MUST_BE",["required","an array with unique items"])}},additionalProperties:function(e,r){var t=Utils.whatIs(r.additionalProperties);"boolean"!==t&&"object"!==t?e.addError("KEYWORD_TYPE_EXPECTED",["additionalProperties",["boolean","object"]]):"object"===t&&(e.path.push("additionalProperties"),exports.validateSchema.call(this,e,r.additionalProperties),e.path.pop())},properties:function(e,r){if("object"!==Utils.whatIs(r.properties))return void e.addError("KEYWORD_TYPE_EXPECTED",["properties","object"]);for(var t=Object.keys(r.properties),a=t.length;a--;){var i=t[a],o=r.properties[i];e.path.push("properties"),e.path.push(i),exports.validateSchema.call(this,e,o),e.path.pop(),e.path.pop()}!0===this.options.forceAdditional&&void 0===r.additionalProperties&&e.addError("KEYWORD_UNDEFINED_STRICT",["additionalProperties"]),this.options.assumeAdditional&&void 0===r.additionalProperties&&(r.additionalProperties=!1),!0===this.options.forceProperties&&0===t.length&&e.addError("CUSTOM_MODE_FORCE_PROPERTIES",["properties"])},patternProperties:function(e,r){if("object"!==Utils.whatIs(r.patternProperties))return void e.addError("KEYWORD_TYPE_EXPECTED",["patternProperties","object"]);for(var t=Object.keys(r.patternProperties),a=t.length;a--;){var i=t[a],o=r.patternProperties[i];try{RegExp(i)}catch(r){e.addError("KEYWORD_PATTERN",["patternProperties",i])}e.path.push("patternProperties"),e.path.push(i.toString()),exports.validateSchema.call(this,e,o),e.path.pop(),e.path.pop()}!0===this.options.forceProperties&&0===t.length&&e.addError("CUSTOM_MODE_FORCE_PROPERTIES",["patternProperties"])},dependencies:function(e,r){if("object"!==Utils.whatIs(r.dependencies))e.addError("KEYWORD_TYPE_EXPECTED",["dependencies","object"]);else for(var t=Object.keys(r.dependencies),a=t.length;a--;){var i=t[a],o=r.dependencies[i],n=Utils.whatIs(o);if("object"===n)e.path.push("dependencies"),e.path.push(i),exports.validateSchema.call(this,e,o),e.path.pop(),e.path.pop();else if("array"===n){var s=o.length;for(0===s&&e.addError("KEYWORD_MUST_BE",["dependencies","not empty array"]);s--;)"string"!=typeof o[s]&&e.addError("KEYWORD_VALUE_TYPE",["dependensices","string"]);!1===Utils.isUniqueArray(o)&&e.addError("KEYWORD_MUST_BE",["dependencies","an array with unique items"])}else e.addError("KEYWORD_VALUE_TYPE",["dependencies","object or array"])}},enum:function(e,r){!1===Array.isArray(r.enum)?e.addError("KEYWORD_TYPE_EXPECTED",["enum","array"]):0===r.enum.length?e.addError("KEYWORD_MUST_BE",["enum","an array with at least one element"]):!1===Utils.isUniqueArray(r.enum)&&e.addError("KEYWORD_MUST_BE",["enum","an array with unique elements"])},type:function(e,r){var t=["array","boolean","integer","number","null","object","string"],a=t.join(","),i=Array.isArray(r.type);if(i){for(var o=r.type.length;o--;)-1===t.indexOf(r.type[o])&&e.addError("KEYWORD_TYPE_EXPECTED",["type",a]);!1===Utils.isUniqueArray(r.type)&&e.addError("KEYWORD_MUST_BE",["type","an object with unique properties"])}else"string"==typeof r.type?-1===t.indexOf(r.type)&&e.addError("KEYWORD_TYPE_EXPECTED",["type",a]):e.addError("KEYWORD_TYPE_EXPECTED",["type",["string","array"]]);!0===this.options.noEmptyStrings&&("string"===r.type||i&&-1!==r.type.indexOf("string"))&&void 0===r.minLength&&void 0===r.enum&&void 0===r.format&&(r.minLength=1),!0===this.options.noEmptyArrays&&("array"===r.type||i&&-1!==r.type.indexOf("array"))&&void 0===r.minItems&&(r.minItems=1),!0===this.options.forceProperties&&("object"===r.type||i&&-1!==r.type.indexOf("object"))&&void 0===r.properties&&void 0===r.patternProperties&&e.addError("KEYWORD_UNDEFINED_STRICT",["properties"]),!0===this.options.forceItems&&("array"===r.type||i&&-1!==r.type.indexOf("array"))&&void 0===r.items&&e.addError("KEYWORD_UNDEFINED_STRICT",["items"]),!0===this.options.forceMinItems&&("array"===r.type||i&&-1!==r.type.indexOf("array"))&&void 0===r.minItems&&e.addError("KEYWORD_UNDEFINED_STRICT",["minItems"]),!0===this.options.forceMaxItems&&("array"===r.type||i&&-1!==r.type.indexOf("array"))&&void 0===r.maxItems&&e.addError("KEYWORD_UNDEFINED_STRICT",["maxItems"]),!0===this.options.forceMinLength&&("string"===r.type||i&&-1!==r.type.indexOf("string"))&&void 0===r.minLength&&void 0===r.format&&void 0===r.enum&&void 0===r.pattern&&e.addError("KEYWORD_UNDEFINED_STRICT",["minLength"]),!0===this.options.forceMaxLength&&("string"===r.type||i&&-1!==r.type.indexOf("string"))&&void 0===r.maxLength&&void 0===r.format&&void 0===r.enum&&void 0===r.pattern&&e.addError("KEYWORD_UNDEFINED_STRICT",["maxLength"])},allOf:function(e,r){if(!1===Array.isArray(r.allOf))e.addError("KEYWORD_TYPE_EXPECTED",["allOf","array"]);else if(0===r.allOf.length)e.addError("KEYWORD_MUST_BE",["allOf","an array with at least one element"]);else for(var t=r.allOf.length;t--;)e.path.push("allOf"),e.path.push(t.toString()),exports.validateSchema.call(this,e,r.allOf[t]),e.path.pop(),e.path.pop()},anyOf:function(e,r){if(!1===Array.isArray(r.anyOf))e.addError("KEYWORD_TYPE_EXPECTED",["anyOf","array"]);else if(0===r.anyOf.length)e.addError("KEYWORD_MUST_BE",["anyOf","an array with at least one element"]);else for(var t=r.anyOf.length;t--;)e.path.push("anyOf"),e.path.push(t.toString()),exports.validateSchema.call(this,e,r.anyOf[t]),e.path.pop(),e.path.pop()},oneOf:function(e,r){if(!1===Array.isArray(r.oneOf))e.addError("KEYWORD_TYPE_EXPECTED",["oneOf","array"]);else if(0===r.oneOf.length)e.addError("KEYWORD_MUST_BE",["oneOf","an array with at least one element"]);else for(var t=r.oneOf.length;t--;)e.path.push("oneOf"),e.path.push(t.toString()),exports.validateSchema.call(this,e,r.oneOf[t]),e.path.pop(),e.path.pop()},not:function(e,r){"object"!==Utils.whatIs(r.not)?e.addError("KEYWORD_TYPE_EXPECTED",["not","object"]):(e.path.push("not"),exports.validateSchema.call(this,e,r.not),e.path.pop())},definitions:function(e,r){if("object"!==Utils.whatIs(r.definitions))e.addError("KEYWORD_TYPE_EXPECTED",["definitions","object"]);else for(var t=Object.keys(r.definitions),a=t.length;a--;){var i=t[a],o=r.definitions[i];e.path.push("definitions"),e.path.push(i),exports.validateSchema.call(this,e,o),e.path.pop(),e.path.pop()}},format:function(e,r){"string"!=typeof r.format?e.addError("KEYWORD_TYPE_EXPECTED",["format","string"]):void 0===FormatValidators[r.format]&&!0!==this.options.ignoreUnknownFormats&&e.addError("UNKNOWN_FORMAT",[r.format])},id:function(e,r){"string"!=typeof r.id&&e.addError("KEYWORD_TYPE_EXPECTED",["id","string"])},title:function(e,r){"string"!=typeof r.title&&e.addError("KEYWORD_TYPE_EXPECTED",["title","string"])},description:function(e,r){"string"!=typeof r.description&&e.addError("KEYWORD_TYPE_EXPECTED",["description","string"])},default:function(){}},validateArrayOfSchemas=function(e,r){for(var t=r.length;t--;)exports.validateSchema.call(this,e,r[t]);return e.isValid()};exports.validateSchema=function(e,r){if(e.commonErrorMessage="SCHEMA_VALIDATION_FAILED",Array.isArray(r))return validateArrayOfSchemas.call(this,e,r);if(r.__$validated)return!0;var t=r.$schema&&r.id!==r.$schema;if(t)if(r.__$schemaResolved&&r.__$schemaResolved!==r){var a=new Report(e),i=JsonValidation.validate.call(this,a,r.__$schemaResolved,r);!1===i&&e.addError("PARENT_SCHEMA_VALIDATION_FAILED",null,a)}else!0!==this.options.ignoreUnresolvableReferences&&e.addError("REF_UNRESOLVED",[r.$schema]);if(!0===this.options.noTypeless){if(void 0!==r.type){var o=[];Array.isArray(r.anyOf)&&(o=o.concat(r.anyOf)),Array.isArray(r.oneOf)&&(o=o.concat(r.oneOf)),Array.isArray(r.allOf)&&(o=o.concat(r.allOf)),o.forEach(function(e){e.type||(e.type=r.type)})}void 0===r.enum&&void 0===r.type&&void 0===r.anyOf&&void 0===r.oneOf&&void 0===r.not&&void 0===r.$ref&&e.addError("KEYWORD_UNDEFINED_STRICT",["type"])}for(var n=Object.keys(r),s=n.length;s--;){var E=n[s];0!==E.indexOf("__")&&(void 0!==SchemaValidators[E]?SchemaValidators[E].call(this,e,r):t||!0===this.options.noExtraKeywords&&e.addError("KEYWORD_UNEXPECTED",[E]))}if(!0===this.options.pedanticCheck){if(r.enum){var d=Utils.clone(r);for(delete d.enum,delete d.default,e.path.push("enum"),s=r.enum.length;s--;)e.path.push(s.toString()),JsonValidation.validate.call(this,e,d,r.enum[s]),e.path.pop();e.path.pop()}r.default&&(e.path.push("default"),JsonValidation.validate.call(this,e,r,r.default),e.path.pop())}var p=e.isValid();return p&&(r.__$validated=!0),p}},{"./FormatValidators":175,"./JsonValidation":176,"./Report":178,"./Utils":182}],182:[function(require,module,exports){"use strict";exports.isAbsoluteUri=function(r){return/^https?:\/\//.test(r)},exports.isRelativeUri=function(r){return/.+#/.test(r)},exports.whatIs=function(r){var e=typeof r;return"object"===e?null===r?"null":Array.isArray(r)?"array":"object":"number"===e?Number.isFinite(r)?r%1==0?"integer":"number":Number.isNaN(r)?"not-a-number":"unknown-number":e},exports.areEqual=function r(e,t){if(e===t)return!0;var n,u;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(u=e.length,n=0;n<u;n++)if(!r(e[n],t[n]))return!1;return!0}if("object"===exports.whatIs(e)&&"object"===exports.whatIs(t)){var o=Object.keys(e);if(!r(o,Object.keys(t)))return!1;for(u=o.length,n=0;n<u;n++)if(!r(e[o[n]],t[o[n]]))return!1;return!0}return!1},exports.isUniqueArray=function(r,e){var t,n,u=r.length;for(t=0;t<u;t++)for(n=t+1;n<u;n++)if(exports.areEqual(r[t],r[n]))return e&&e.push(t,n),!1;return!0},exports.difference=function(r,e){for(var t=[],n=r.length;n--;)-1===e.indexOf(r[n])&&t.push(r[n]);return t},exports.clone=function(r){if(void 0!==r){if("object"!=typeof r||null===r)return r;var e,t;if(Array.isArray(r))for(e=[],t=r.length;t--;)e[t]=r[t];else{e={};var n=Object.keys(r);for(t=n.length;t--;){var u=n[t];e[u]=r[u]}}return e}},exports.cloneDeep=function(r){function e(r){if("object"!=typeof r||null===r)return r;var u,o,i;if(-1!==(i=t.indexOf(r)))return n[i];if(t.push(r),Array.isArray(r))for(u=[],n.push(u),o=r.length;o--;)u[o]=e(r[o]);else{u={},n.push(u);var s=Object.keys(r);for(o=s.length;o--;){var f=s[o];u[f]=e(r[f])}}return u}var t=[],n=[];return e(r)},exports.ucs2decode=function(r){for(var e,t,n=[],u=0,o=r.length;u<o;)e=r.charCodeAt(u++),e>=55296&&e<=56319&&u<o?(t=r.charCodeAt(u++),56320==(64512&t)?n.push(((1023&e)<<10)+(1023&t)+65536):(n.push(e),u--)):n.push(e);return n}},{}],183:[function(require,module,exports){(function(process){"use strict";function ZSchema(e){if(this.cache={},this.referenceCache=[],this.setRemoteReference("http://json-schema.org/draft-04/schema",Draft4Schema),this.setRemoteReference("http://json-schema.org/draft-04/hyper-schema",Draft4HyperSchema),"object"==typeof e){for(var t,r=Object.keys(e),a=r.length;a--;)if(t=r[a],void 0===defaultOptions[t])throw new Error("Unexpected option passed to constructor: "+t);for(r=Object.keys(defaultOptions),a=r.length;a--;)t=r[a],void 0===e[t]&&(e[t]=Utils.clone(defaultOptions[t]));this.options=e}else this.options=Utils.clone(defaultOptions);!0===this.options.strictMode&&(this.options.forceAdditional=!0,this.options.forceItems=!0,this.options.forceMaxLength=!0,this.options.forceProperties=!0,this.options.noExtraKeywords=!0,this.options.noTypeless=!0,this.options.noEmptyStrings=!0,this.options.noEmptyArrays=!0)}require("./Polyfills");var get=require("lodash.get"),Report=require("./Report"),FormatValidators=require("./FormatValidators"),JsonValidation=require("./JsonValidation"),SchemaCache=require("./SchemaCache"),SchemaCompilation=require("./SchemaCompilation"),SchemaValidation=require("./SchemaValidation"),Utils=require("./Utils"),Draft4Schema=require("./schemas/schema.json"),Draft4HyperSchema=require("./schemas/hyper-schema.json"),defaultOptions={asyncTimeout:2e3,forceAdditional:!1,assumeAdditional:!1,forceItems:!1,forceMinItems:!1,forceMaxItems:!1,forceMinLength:!1,forceMaxLength:!1,forceProperties:!1,ignoreUnresolvableReferences:!1,noExtraKeywords:!1,noTypeless:!1,noEmptyStrings:!1,noEmptyArrays:!1,strictUris:!1,strictMode:!1,reportPathAsArray:!1,breakOnFirstError:!0,pedanticCheck:!1,ignoreUnknownFormats:!1,customValidator:null};ZSchema.prototype.compileSchema=function(e){var t=new Report(this.options);return e=SchemaCache.getSchema.call(this,t,e),SchemaCompilation.compileSchema.call(this,t,e),this.lastReport=t,t.isValid()},ZSchema.prototype.validateSchema=function(e){if(Array.isArray(e)&&0===e.length)throw new Error(".validateSchema was called with an empty array");var t=new Report(this.options);return e=SchemaCache.getSchema.call(this,t,e),SchemaCompilation.compileSchema.call(this,t,e)&&SchemaValidation.validateSchema.call(this,t,e),this.lastReport=t,t.isValid()},ZSchema.prototype.validate=function(e,t,r,a){"function"===Utils.whatIs(r)&&(a=r,r={}),r||(r={});var o=Utils.whatIs(t);if("string"!==o&&"object"!==o){var i=new Error("Invalid .validate call - schema must be an string or object but "+o+" was passed!");if(a)return void process.nextTick(function(){a(i,!1)});throw i}var s=!1,n=new Report(this.options);if("string"==typeof t){var c=t;if(!(t=SchemaCache.getSchema.call(this,n,c)))throw new Error("Schema with id '"+c+"' wasn't found in the validator cache!")}else t=SchemaCache.getSchema.call(this,n,t);var h=!1;s||(h=SchemaCompilation.compileSchema.call(this,n,t)),h||(this.lastReport=n,s=!0);var l=!1;if(s||(l=SchemaValidation.validateSchema.call(this,n,t)),l||(this.lastReport=n,s=!0),r.schemaPath&&(n.rootSchema=t,!(t=get(t,r.schemaPath))))throw new Error("Schema path '"+r.schemaPath+"' wasn't found in the schema!");if(s||JsonValidation.validate.call(this,n,t,e),a)return void n.processAsyncTasks(this.options.asyncTimeout,a);if(n.asyncTasks.length>0)throw new Error("This validation has async tasks and cannot be done in sync mode, please provide callback argument.");return this.lastReport=n,n.isValid()},ZSchema.prototype.getLastError=function(){if(0===this.lastReport.errors.length)return null;var e=new Error;return e.name="z-schema validation error",e.message=this.lastReport.commonErrorMessage,e.details=this.lastReport.errors,e},ZSchema.prototype.getLastErrors=function(){return this.lastReport&&this.lastReport.errors.length>0?this.lastReport.errors:void 0},ZSchema.prototype.getMissingReferences=function(e){e=e||this.lastReport.errors;for(var t=[],r=e.length;r--;){var a=e[r];if("UNRESOLVABLE_REFERENCE"===a.code){var o=a.params[0];-1===t.indexOf(o)&&t.push(o)}a.inner&&(t=t.concat(this.getMissingReferences(a.inner)))}return t},ZSchema.prototype.getMissingRemoteReferences=function(){for(var e=this.getMissingReferences(),t=[],r=e.length;r--;){var a=SchemaCache.getRemotePath(e[r]);a&&-1===t.indexOf(a)&&t.push(a)}return t},ZSchema.prototype.setRemoteReference=function(e,t){t="string"==typeof t?JSON.parse(t):Utils.cloneDeep(t),SchemaCache.cacheSchemaByUri.call(this,e,t)},ZSchema.prototype.getResolvedSchema=function(e){var t=new Report(this.options);e=SchemaCache.getSchema.call(this,t,e),e=Utils.cloneDeep(e);var r=[],a=function(e){var t,o=Utils.whatIs(e);if(("object"===o||"array"===o)&&!e.___$visited){if(e.___$visited=!0,r.push(e),e.$ref&&e.__$refResolved){var i=e.__$refResolved,s=e;delete e.$ref,delete e.__$refResolved;for(t in i)i.hasOwnProperty(t)&&(s[t]=i[t])}for(t in e)e.hasOwnProperty(t)&&(0===t.indexOf("__$")?delete e[t]:a(e[t]))}};if(a(e),r.forEach(function(e){delete e.___$visited}),this.lastReport=t,t.isValid())return e;throw this.getLastError()},ZSchema.prototype.setSchemaReader=function(e){return ZSchema.setSchemaReader(e)},ZSchema.prototype.getSchemaReader=function(){return ZSchema.schemaReader},ZSchema.setSchemaReader=function(e){ZSchema.schemaReader=e},ZSchema.registerFormat=function(e,t){FormatValidators[e]=t},ZSchema.unregisterFormat=function(e){delete FormatValidators[e]},ZSchema.getRegisteredFormats=function(){return Object.keys(FormatValidators)},ZSchema.getDefaultOptions=function(){return Utils.cloneDeep(defaultOptions)},module.exports=ZSchema}).call(this,require("_process"))},{"./FormatValidators":175,"./JsonValidation":176,"./Polyfills":177,"./Report":178,"./SchemaCache":179,"./SchemaCompilation":180,"./SchemaValidation":181,"./Utils":182,"./schemas/hyper-schema.json":184,"./schemas/schema.json":185,_process:76,"lodash.get":71}],184:[function(require,module,exports){module.exports={$schema:"http://json-schema.org/draft-04/hyper-schema#",id:"http://json-schema.org/draft-04/hyper-schema#",title:"JSON Hyper-Schema",allOf:[{$ref:"http://json-schema.org/draft-04/schema#"}],properties:{additionalItems:{anyOf:[{type:"boolean"},{$ref:"#"}]},additionalProperties:{anyOf:[{type:"boolean"},{$ref:"#"}]},dependencies:{additionalProperties:{anyOf:[{$ref:"#"},{type:"array"}]}},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}]},definitions:{additionalProperties:{$ref:"#"}},patternProperties:{additionalProperties:{$ref:"#"}},properties:{additionalProperties:{$ref:"#"}},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"},links:{type:"array",items:{$ref:"#/definitions/linkDescription"}},fragmentResolution:{type:"string"},media:{type:"object",properties:{type:{description:"A media type, as described in RFC 2046",type:"string"},binaryEncoding:{description:"A content encoding scheme, as described in RFC 2045",type:"string"}}},pathStart:{description:"Instances' URIs must start with this value for this schema to apply to them",type:"string",format:"uri"}},definitions:{schemaArray:{type:"array",items:{$ref:"#"}},linkDescription:{title:"Link Description Object",type:"object",required:["href","rel"],properties:{href:{description:"a URI template, as defined by RFC 6570, with the addition of the $, ( and ) characters for pre-processing",type:"string"},rel:{description:"relation to the target resource of the link",type:"string"},title:{description:"a title for the link",type:"string"},targetSchema:{description:"JSON Schema describing the link target",$ref:"#"},mediaType:{description:"media type (as defined by RFC 2046) describing the link target",type:"string"},method:{description:'method for requesting the target of the link (e.g. for HTTP this might be "GET" or "DELETE")',type:"string"},encType:{description:"The media type in which to submit data along with the request",type:"string",
  default:"application/json"},schema:{description:"Schema describing the data to submit along with the request",$ref:"#"}}}}}},{}],185:[function(require,module,exports){module.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:true}},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:true},maximum:{type:"number"},exclusiveMaximum:{type:"boolean",default:false},minimum:{type:"number"},exclusiveMinimum:{type:"boolean",default:false},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:false},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:true},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:true}]},format:{type:"string"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},dependencies:{exclusiveMaximum:["maximum"],exclusiveMinimum:["minimum"]},default:{}}},{}]},{},[1])(1)});
  //# sourceMappingURL=swagger-parser.min.js.map