Skip to content
Snippets Groups Projects
json-schema-faker.min.js 407 KiB
Newer Older
  • Learn to ignore specific revisions
  • Alvaro Cabrera's avatar
    Alvaro Cabrera committed
    /*
    
    Alvaro Cabrera's avatar
    Alvaro Cabrera committed
     http://json-schema-faker.js.org
    
    
     Copyright (c) 2014-2018 Alvaro Cabrera & Tomasz Ducin
    
    Alvaro Cabrera's avatar
    Alvaro Cabrera committed
     Released under the MIT license
    
    
    Alvaro Cabrera's avatar
    Alvaro Cabrera committed
     Date: 2018-04-09 17:23:23.954Z
    
     *****************************************************************************
        Copyright (c) Microsoft Corporation. All rights reserved.
        Licensed under the Apache License, Version 2.0 (the "License"); you may not use
        this file except in compliance with the License. You may obtain a copy of the
        License at http://www.apache.org/licenses/LICENSE-2.0
    
        THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
        KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
        WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
        MERCHANTABLITY OR NON-INFRINGEMENT.
    
        See the Apache Version 2.0 License for specific language governing permissions
        and limitations under the License.
    **************************************************************************** jsonpath 1.0.0  JSON Schema $Ref Parser v5.0.0 (March 18th 2018)
    
    
     https://github.com/BigstickCarpet/json-schema-ref-parser
    
    
     @author  James Messinger (http://bigstickcarpet.com)
    
    Alvaro Cabrera's avatar
    Alvaro Cabrera committed
     The buffer module from node.js, for the browser.
    
    
     @author   Feross Aboukhadijeh <https://feross.org>
     @license  MIT
     Determine if an object is a Buffer
    
    
     @author   Feross Aboukhadijeh <https://feross.org>
    
    Alvaro Cabrera's avatar
    Alvaro Cabrera committed
     @license  MIT
    
    36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460
     https://mths.be/punycode v1.4.1 by @mathias */
    (function(global,factory){typeof exports==="object"&&typeof module!=="undefined"?module.exports=factory():typeof define==="function"&&define.amd?define(factory):global.JSONSchemaFaker=factory()})(this,function(){var extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,b){d.__proto__=b}||function(d,b){for(var p in b)if(b.hasOwnProperty(p))d[p]=b[p]};function __extends(d,b){extendStatics(d,b);function __(){this.constructor=d}d.prototype=b===null?Object.create(b):(__.prototype=
    b.prototype,new __)}var __assign=Object.assign||function __assign(t){for(var s,i=1,n=arguments.length;i<n;i++){s=arguments[i];for(var p in s)if(Object.prototype.hasOwnProperty.call(s,p))t[p]=s[p]}return t};function __rest(s,e){var t={};for(var p in s)if(Object.prototype.hasOwnProperty.call(s,p)&&e.indexOf(p)<0)t[p]=s[p];if(s!=null&&typeof Object.getOwnPropertySymbols==="function")for(var i=0,p=Object.getOwnPropertySymbols(s);i<p.length;i++)if(e.indexOf(p[i])<0)t[p[i]]=s[p[i]];return t}function __decorate(decorators,
    target,key,desc){var c=arguments.length,r=c<3?target:desc===null?desc=Object.getOwnPropertyDescriptor(target,key):desc,d;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")r=Reflect.decorate(decorators,target,key,desc);else for(var i=decorators.length-1;i>=0;i--)if(d=decorators[i])r=(c<3?d(r):c>3?d(target,key,r):d(target,key))||r;return c>3&&r&&Object.defineProperty(target,key,r),r}function __param(paramIndex,decorator){return function(target,key){decorator(target,key,paramIndex)}}
    function __metadata(metadataKey,metadataValue){if(typeof Reflect==="object"&&typeof Reflect.metadata==="function")return Reflect.metadata(metadataKey,metadataValue)}function __awaiter(thisArg,_arguments,P,generator){return new (P||(P=Promise))(function(resolve,reject){function fulfilled(value){try{step(generator.next(value))}catch(e){reject(e)}}function rejected(value){try{step(generator["throw"](value))}catch(e){reject(e)}}function step(result){result.done?resolve(result.value):(new P(function(resolve){resolve(result.value)})).then(fulfilled,
    rejected)}step((generator=generator.apply(thisArg,_arguments||[])).next())})}function __generator(thisArg,body){var _={label:0,sent:function(){if(t[0]&1)throw t[1];return t[1]},trys:[],ops:[]},f,y,t,g;return g={next:verb(0),"throw":verb(1),"return":verb(2)},typeof Symbol==="function"&&(g[Symbol.iterator]=function(){return this}),g;function verb(n){return function(v){return step([n,v])}}function step(op){if(f)throw new TypeError("Generator is already executing.");while(_)try{if(f=1,y&&(t=y[op[0]&2?
    "return":op[0]?"throw":"next"])&&!(t=t.call(y,op[1])).done)return t;if(y=0,t)op=[0,t.value];switch(op[0]){case 0:case 1:t=op;break;case 4:_.label++;return{value:op[1],done:false};case 5:_.label++;y=op[1];op=[0];continue;case 7:op=_.ops.pop();_.trys.pop();continue;default:if(!(t=_.trys,t=t.length>0&&t[t.length-1])&&(op[0]===6||op[0]===2)){_=0;continue}if(op[0]===3&&(!t||op[1]>t[0]&&op[1]<t[3])){_.label=op[1];break}if(op[0]===6&&_.label<t[1]){_.label=t[1];t=op;break}if(t&&_.label<t[2]){_.label=t[2];
    _.ops.push(op);break}if(t[2])_.ops.pop();_.trys.pop();continue}op=body.call(thisArg,_)}catch(e){op=[6,e];y=0}finally{f=t=0}if(op[0]&5)throw op[1];return{value:op[0]?op[1]:void 0,done:true}}}function __exportStar(m,exports){for(var p in m)if(!exports.hasOwnProperty(p))exports[p]=m[p]}function __values(o){var m=typeof Symbol==="function"&&o[Symbol.iterator],i=0;if(m)return m.call(o);return{next:function(){if(o&&i>=o.length)o=void 0;return{value:o&&o[i++],done:!o}}}}function __read(o,n){var m=typeof Symbol===
    "function"&&o[Symbol.iterator];if(!m)return o;var i=m.call(o),r,ar=[],e;try{while((n===void 0||n-- >0)&&!(r=i.next()).done)ar.push(r.value)}catch(error){e={error:error}}finally{try{if(r&&!r.done&&(m=i["return"]))m.call(i)}finally{if(e)throw e.error;}}return ar}function __spread(){for(var ar=[],i=0;i<arguments.length;i++)ar=ar.concat(__read(arguments[i]));return ar}function __await(v){return this instanceof __await?(this.v=v,this):new __await(v)}function __asyncGenerator(thisArg,_arguments,generator){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");
    var g=generator.apply(thisArg,_arguments||[]),i,q=[];return i={},verb("next"),verb("throw"),verb("return"),i[Symbol.asyncIterator]=function(){return this},i;function verb(n){if(g[n])i[n]=function(v){return new Promise(function(a,b){q.push([n,v,a,b])>1||resume(n,v)})}}function resume(n,v){try{step(g[n](v))}catch(e){settle(q[0][3],e)}}function step(r){r.value instanceof __await?Promise.resolve(r.value.v).then(fulfill,reject):settle(q[0][2],r)}function fulfill(value){resume("next",value)}function reject(value){resume("throw",
    value)}function settle(f,v){if(f(v),q.shift(),q.length)resume(q[0][0],q[0][1])}}function __asyncDelegator(o){var i,p;return i={},verb("next"),verb("throw",function(e){throw e;}),verb("return"),i[Symbol.iterator]=function(){return this},i;function verb(n,f){if(o[n])i[n]=function(v){return(p=!p)?{value:__await(o[n](v)),done:n==="return"}:f?f(v):v}}}function __asyncValues(o){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var m=o[Symbol.asyncIterator];return m?m.call(o):
    typeof __values==="function"?__values(o):o[Symbol.iterator]()}function __makeTemplateObject(cooked,raw){if(Object.defineProperty)Object.defineProperty(cooked,"raw",{value:raw});else cooked.raw=raw;return cooked}var tslib_es6=Object.freeze({__extends:__extends,__assign:__assign,__rest:__rest,__decorate:__decorate,__param:__param,__metadata:__metadata,__awaiter:__awaiter,__generator:__generator,__exportStar:__exportStar,__values:__values,__read:__read,__spread:__spread,__await:__await,__asyncGenerator:__asyncGenerator,
    __asyncDelegator:__asyncDelegator,__asyncValues:__asyncValues,__makeTemplateObject:__makeTemplateObject});var commonjsGlobal=typeof window!=="undefined"?window:typeof global!=="undefined"?global:typeof self!=="undefined"?self:{};function commonjsRequire(){throw new Error("Dynamic requires are not currently supported by rollup-plugin-commonjs");}function createCommonjsModule(fn,module){return module={exports:{}},fn(module,module.exports),module.exports}var types={ROOT:0,GROUP:1,POSITION:2,SET:3,RANGE:4,
    REPETITION:5,REFERENCE:6,CHAR:7};var INTS=function(){return[{type:types.RANGE,from:48,to:57}]};var WORDS=function(){return[{type:types.CHAR,value:95},{type:types.RANGE,from:97,to:122},{type:types.RANGE,from:65,to:90}].concat(INTS())};var WHITESPACE=function(){return[{type:types.CHAR,value:9},{type:types.CHAR,value:10},{type:types.CHAR,value:11},{type:types.CHAR,value:12},{type:types.CHAR,value:13},{type:types.CHAR,value:32},{type:types.CHAR,value:160},{type:types.CHAR,value:5760},{type:types.CHAR,
    value:6158},{type:types.CHAR,value:8192},{type:types.CHAR,value:8193},{type:types.CHAR,value:8194},{type:types.CHAR,value:8195},{type:types.CHAR,value:8196},{type:types.CHAR,value:8197},{type:types.CHAR,value:8198},{type:types.CHAR,value:8199},{type:types.CHAR,value:8200},{type:types.CHAR,value:8201},{type:types.CHAR,value:8202},{type:types.CHAR,value:8232},{type:types.CHAR,value:8233},{type:types.CHAR,value:8239},{type:types.CHAR,value:8287},{type:types.CHAR,value:12288},{type:types.CHAR,value:65279}]};
    var NOTANYCHAR=function(){return[{type:types.CHAR,value:10},{type:types.CHAR,value:13},{type:types.CHAR,value:8232},{type:types.CHAR,value:8233}]};var words=function(){return{type:types.SET,set:WORDS(),not:false}};var notWords=function(){return{type:types.SET,set:WORDS(),not:true}};var ints=function(){return{type:types.SET,set:INTS(),not:false}};var notInts=function(){return{type:types.SET,set:INTS(),not:true}};var whitespace=function(){return{type:types.SET,set:WHITESPACE(),not:false}};var notWhitespace=
    function(){return{type:types.SET,set:WHITESPACE(),not:true}};var anyChar=function(){return{type:types.SET,set:NOTANYCHAR(),not:true}};var sets={words:words,notWords:notWords,ints:ints,notInts:notInts,whitespace:whitespace,notWhitespace:notWhitespace,anyChar:anyChar};var util=createCommonjsModule(function(module,exports){var CTRL="@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^ ?";var SLSH={0:0,"t":9,"n":10,"v":11,"f":12,"r":13};exports.strToChars=function(str){var chars_regex=/(\[\\b\])|(\\)?\\(?:u([A-F0-9]{4})|x([A-F0-9]{2})|(0?[0-7]{2})|c([@A-Z\[\\\]\^?])|([0tnvfr]))/g;
    str=str.replace(chars_regex,function(s,b,lbs,a16,b16,c8,dctrl,eslsh){if(lbs)return s;var code=b?8:a16?parseInt(a16,16):b16?parseInt(b16,16):c8?parseInt(c8,8):dctrl?CTRL.indexOf(dctrl):SLSH[eslsh];var c=String.fromCharCode(code);if(/[\[\]{}\^$.|?*+()]/.test(c))c="\\"+c;return c});return str};exports.tokenizeClass=function(str,regexpStr){var tokens=[];var regexp=/\\(?:(w)|(d)|(s)|(W)|(D)|(S))|((?:(?:\\)(.)|([^\]\\]))-(?:\\)?([^\]]))|(\])|(?:\\)?(.)/g;var rs,c;while((rs=regexp.exec(str))!=null)if(rs[1])tokens.push(sets.words());
    else if(rs[2])tokens.push(sets.ints());else if(rs[3])tokens.push(sets.whitespace());else if(rs[4])tokens.push(sets.notWords());else if(rs[5])tokens.push(sets.notInts());else if(rs[6])tokens.push(sets.notWhitespace());else if(rs[7])tokens.push({type:types.RANGE,from:(rs[8]||rs[9]).charCodeAt(0),to:rs[10].charCodeAt(0)});else if(c=rs[12])tokens.push({type:types.CHAR,value:c.charCodeAt(0)});else return[tokens,regexp.lastIndex];exports.error(regexpStr,"Unterminated character class")};exports.error=function(regexp,
    msg){throw new SyntaxError("Invalid regular expression: /"+regexp+"/: "+msg);}});var util_1=util.strToChars;var util_2=util.tokenizeClass;var util_3=util.error;var wordBoundary=function(){return{type:types.POSITION,value:"b"}};var nonWordBoundary=function(){return{type:types.POSITION,value:"B"}};var begin=function(){return{type:types.POSITION,value:"^"}};var end=function(){return{type:types.POSITION,value:"$"}};var positions={wordBoundary:wordBoundary,nonWordBoundary:nonWordBoundary,begin:begin,end:end};
    var lib=function(regexpStr){var i=0,l,c,start={type:types.ROOT,stack:[]},lastGroup=start,last=start.stack,groupStack=[];var repeatErr=function(i){util.error(regexpStr,"Nothing to repeat at column "+(i-1))};var str=util.strToChars(regexpStr);l=str.length;while(i<l){c=str[i++];switch(c){case "\\":c=str[i++];switch(c){case "b":last.push(positions.wordBoundary());break;case "B":last.push(positions.nonWordBoundary());break;case "w":last.push(sets.words());break;case "W":last.push(sets.notWords());break;
    case "d":last.push(sets.ints());break;case "D":last.push(sets.notInts());break;case "s":last.push(sets.whitespace());break;case "S":last.push(sets.notWhitespace());break;default:if(/\d/.test(c))last.push({type:types.REFERENCE,value:parseInt(c,10)});else last.push({type:types.CHAR,value:c.charCodeAt(0)})}break;case "^":last.push(positions.begin());break;case "$":last.push(positions.end());break;case "[":var not;if(str[i]==="^"){not=true;i++}else not=false;var classTokens=util.tokenizeClass(str.slice(i),
    regexpStr);i+=classTokens[1];last.push({type:types.SET,set:classTokens[0],not:not});break;case ".":last.push(sets.anyChar());break;case "(":var group={type:types.GROUP,stack:[],remember:true};c=str[i];if(c==="?"){c=str[i+1];i+=2;if(c==="\x3d")group.followedBy=true;else if(c==="!")group.notFollowedBy=true;else if(c!==":")util.error(regexpStr,"Invalid group, character '"+c+"' after '?' at column "+(i-1));group.remember=false}last.push(group);groupStack.push(lastGroup);lastGroup=group;last=group.stack;
    break;case ")":if(groupStack.length===0)util.error(regexpStr,"Unmatched ) at column "+(i-1));lastGroup=groupStack.pop();last=lastGroup.options?lastGroup.options[lastGroup.options.length-1]:lastGroup.stack;break;case "|":if(!lastGroup.options){lastGroup.options=[lastGroup.stack];delete lastGroup.stack}var stack=[];lastGroup.options.push(stack);last=stack;break;case "{":var rs=/^(\d+)(,(\d+)?)?\}/.exec(str.slice(i)),min,max;if(rs!==null){if(last.length===0)repeatErr(i);min=parseInt(rs[1],10);max=rs[2]?
    rs[3]?parseInt(rs[3],10):Infinity:min;i+=rs[0].length;last.push({type:types.REPETITION,min:min,max:max,value:last.pop()})}else last.push({type:types.CHAR,value:123});break;case "?":if(last.length===0)repeatErr(i);last.push({type:types.REPETITION,min:0,max:1,value:last.pop()});break;case "+":if(last.length===0)repeatErr(i);last.push({type:types.REPETITION,min:1,max:Infinity,value:last.pop()});break;case "*":if(last.length===0)repeatErr(i);last.push({type:types.REPETITION,min:0,max:Infinity,value:last.pop()});
    break;default:last.push({type:types.CHAR,value:c.charCodeAt(0)})}}if(groupStack.length!==0)util.error(regexpStr,"Unterminated group");return start};var types_1$1=types;lib.types=types_1$1;function _SubRange(low,high){this.low=low;this.high=high;this.length=1+high-low}_SubRange.prototype.overlaps=function(range){return!(this.high<range.low||this.low>range.high)};_SubRange.prototype.touches=function(range){return!(this.high+1<range.low||this.low-1>range.high)};_SubRange.prototype.add=function(range){return this.touches(range)&&
    new _SubRange(Math.min(this.low,range.low),Math.max(this.high,range.high))};_SubRange.prototype.subtract=function(range){if(!this.overlaps(range))return false;if(range.low<=this.low&&range.high>=this.high)return[];if(range.low>this.low&&range.high<this.high)return[new _SubRange(this.low,range.low-1),new _SubRange(range.high+1,this.high)];if(range.low<=this.low)return[new _SubRange(range.high+1,this.high)];return[new _SubRange(this.low,range.low-1)]};_SubRange.prototype.toString=function(){if(this.low==
    this.high)return this.low.toString();return this.low+"-"+this.high};_SubRange.prototype.clone=function(){return new _SubRange(this.low,this.high)};function DiscontinuousRange(a,b){if(this instanceof DiscontinuousRange){this.ranges=[];this.length=0;if(a!==undefined)this.add(a,b)}else return new DiscontinuousRange(a,b)}function _update_length(self){self.length=self.ranges.reduce(function(previous,range){return previous+range.length},0)}DiscontinuousRange.prototype.add=function(a,b){var self=this;function _add(subrange){var new_ranges=
    [];var i=0;while(i<self.ranges.length&&!subrange.touches(self.ranges[i])){new_ranges.push(self.ranges[i].clone());i++}while(i<self.ranges.length&&subrange.touches(self.ranges[i])){subrange=subrange.add(self.ranges[i]);i++}new_ranges.push(subrange);while(i<self.ranges.length){new_ranges.push(self.ranges[i].clone());i++}self.ranges=new_ranges;_update_length(self)}if(a instanceof DiscontinuousRange)a.ranges.forEach(_add);else if(a instanceof _SubRange)_add(a);else{if(b===undefined)b=a;_add(new _SubRange(a,
    b))}return this};DiscontinuousRange.prototype.subtract=function(a,b){var self=this;function _subtract(subrange){var new_ranges=[];var i=0;while(i<self.ranges.length&&!subrange.overlaps(self.ranges[i])){new_ranges.push(self.ranges[i].clone());i++}while(i<self.ranges.length&&subrange.overlaps(self.ranges[i])){new_ranges=new_ranges.concat(self.ranges[i].subtract(subrange));i++}while(i<self.ranges.length){new_ranges.push(self.ranges[i].clone());i++}self.ranges=new_ranges;_update_length(self)}if(a instanceof
    DiscontinuousRange)a.ranges.forEach(_subtract);else if(a instanceof _SubRange)_subtract(a);else{if(b===undefined)b=a;_subtract(new _SubRange(a,b))}return this};DiscontinuousRange.prototype.index=function(index){var i=0;while(i<this.ranges.length&&this.ranges[i].length<=index){index-=this.ranges[i].length;i++}if(i>=this.ranges.length)return null;return this.ranges[i].low+index};DiscontinuousRange.prototype.toString=function(){return"[ "+this.ranges.join(", ")+" ]"};DiscontinuousRange.prototype.clone=
    function(){return new DiscontinuousRange(this)};var discontinuousRange=DiscontinuousRange;var randexp=createCommonjsModule(function(module){var types=lib.types;function toOtherCase(code){return code+(97<=code&&code<=122?-32:65<=code&&code<=90?32:0)}function randBool(){return!this.randInt(0,1)}function randSelect(arr){if(arr instanceof discontinuousRange)return arr.index(this.randInt(0,arr.length-1));return arr[this.randInt(0,arr.length-1)]}function expand(token){if(token.type===lib.types.CHAR)return new discontinuousRange(token.value);
    else if(token.type===lib.types.RANGE)return new discontinuousRange(token.from,token.to);else{var drange=new discontinuousRange;for(var i=0;i<token.set.length;i++){var subrange=expand.call(this,token.set[i]);drange.add(subrange);if(this.ignoreCase)for(var j=0;j<subrange.length;j++){var code=subrange.index(j);var otherCaseCode=toOtherCase(code);if(code!==otherCaseCode)drange.add(otherCaseCode)}}if(token.not)return this.defaultRange.clone().subtract(drange);else return drange}}function checkCustom(randexp,
    regexp){if(typeof regexp.max==="number")randexp.max=regexp.max;if(regexp.defaultRange instanceof discontinuousRange)randexp.defaultRange=regexp.defaultRange;if(typeof regexp.randInt==="function")randexp.randInt=regexp.randInt}var RandExp=module.exports=function(regexp,m){this.defaultRange=this.defaultRange.clone();if(regexp instanceof RegExp){this.ignoreCase=regexp.ignoreCase;this.multiline=regexp.multiline;checkCustom(this,regexp);regexp=regexp.source}else if(typeof regexp==="string"){this.ignoreCase=
    m&&m.indexOf("i")!==-1;this.multiline=m&&m.indexOf("m")!==-1}else throw new Error("Expected a regexp or string");this.tokens=lib(regexp)};RandExp.prototype.max=100;RandExp.prototype.gen=function(){return gen.call(this,this.tokens,[])};RandExp.randexp=function(regexp,m){var randexp;if(regexp._randexp===undefined){randexp=new RandExp(regexp,m);regexp._randexp=randexp}else randexp=regexp._randexp;checkCustom(randexp,regexp);return randexp.gen()};RandExp.sugar=function(){RegExp.prototype.gen=function(){return RandExp.randexp(this)}};
    RandExp.prototype.defaultRange=new discontinuousRange(32,126);RandExp.prototype.randInt=function(a,b){return a+Math.floor(Math.random()*(1+b-a))};function gen(token,groups){var stack,str,n,i,l;switch(token.type){case types.ROOT:case types.GROUP:if(token.followedBy||token.notFollowedBy)return"";if(token.remember&&token.groupNumber===undefined)token.groupNumber=groups.push(null)-1;stack=token.options?randSelect.call(this,token.options):token.stack;str="";for(i=0,l=stack.length;i<l;i++)str+=gen.call(this,
    stack[i],groups);if(token.remember)groups[token.groupNumber]=str;return str;case types.POSITION:return"";case types.SET:var expandedSet=expand.call(this,token);if(!expandedSet.length)return"";return String.fromCharCode(randSelect.call(this,expandedSet));case types.REPETITION:n=this.randInt(token.min,token.max===Infinity?token.min+this.max:token.max);str="";for(i=0;i<n;i++)str+=gen.call(this,token.value,groups);return str;case types.REFERENCE:return groups[token.value-1]||"";case types.CHAR:var code=
    this.ignoreCase&&randBool.call(this)?toOtherCase(token.value):token.value;return String.fromCharCode(code)}}});function URLUtils(url,baseURL){url=url.replace(/^\.\//,"");var m=String(url).replace(/^\s+|\s+$/g,"").match(/^([^:\/?#]+:)?(?:\/\/(?:([^:@]*)(?::([^:@]*))?@)?(([^:\/?#]*)(?::(\d*))?))?([^?#]*)(\?[^#]*)?(#[\s\S]*)?/);if(!m)throw new RangeError;var href=m[0]||"";var protocol=m[1]||"";var username=m[2]||"";var password=m[3]||"";var host=m[4]||"";var hostname=m[5]||"";var port=m[6]||"";var pathname=
    m[7]||"";var search=m[8]||"";var hash=m[9]||"";if(baseURL!==undefined){var base=new URLUtils(baseURL);var flag=protocol===""&&host===""&&username==="";if(flag&&pathname===""&&search==="")search=base.search;if(flag&&pathname.charAt(0)!=="/")pathname=pathname!==""?base.pathname.slice(0,base.pathname.lastIndexOf("/")+1)+pathname:base.pathname;var output=[];pathname.replace(/\/?[^\/]+/g,function(p){if(p==="/..")output.pop();else output.push(p)});pathname=output.join("")||"/";if(flag){port=base.port;hostname=
    base.hostname;host=base.host;password=base.password;username=base.username}if(protocol==="")protocol=base.protocol;href=protocol+(host!==""?"//":"")+(username!==""?username+(password!==""?":"+password:"")+"@":"")+host+pathname+search+hash}this.href=href;this.origin=protocol+(host!==""?"//"+host:"");this.protocol=protocol;this.username=username;this.password=password;this.host=host;this.hostname=hostname;this.port=port;this.pathname=pathname;this.search=search;this.hash=hash}function isURL(path){if(typeof path===
    "string"&&/^\w+:\/\//.test(path))return true}function parseURI(href,base){return new URLUtils(href,base)}function resolveURL(base,href){base=base||"http://json-schema.org/schema#";href=parseURI(href,base);base=parseURI(base);if(base.hash&&!href.hash)return href.href+base.hash;return href.href}function getDocumentURI(uri){return typeof uri==="string"&&uri.split("#")[0]}function isKeyword(prop){return prop==="enum"||prop==="default"||prop==="required"}var helpers={isURL:isURL,parseURI:parseURI,isKeyword:isKeyword,
    resolveURL:resolveURL,getDocumentURI:getDocumentURI};var findReference=createCommonjsModule(function(module){function get(obj,path){var hash=path.split("#")[1];var parts=hash.split("/").slice(1);while(parts.length){var key=decodeURIComponent(parts.shift()).replace(/~1/g,"/").replace(/~0/g,"~");if(typeof obj[key]==="undefined")throw new Error("JSON pointer not found: "+path);obj=obj[key]}return obj}var find=module.exports=function(id,refs,filter){var target=refs[id]||refs[id.split("#")[1]]||refs[helpers.getDocumentURI(id)];
    try{if(target)target=id.indexOf("#/")>-1?get(target,id):target;else for(var key in refs)if(helpers.resolveURL(refs[key].id,id)===refs[key].id){target=refs[key];break}}catch(e){if(typeof filter==="function")target=filter(id,refs);else throw e;}if(!target)throw new Error("Reference not found: "+id);while(target.$ref)target=find(target.$ref,refs);return target}});var deepExtend_1=createCommonjsModule(function(module){function isSpecificValue(val){return val instanceof Buffer||val instanceof Date||val instanceof
    RegExp?true:false}function cloneSpecificValue(val){if(val instanceof Buffer){var x=new Buffer(val.length);val.copy(x);return x}else if(val instanceof Date)return new Date(val.getTime());else if(val instanceof RegExp)return new RegExp(val);else throw new Error("Unexpected situation");}function deepCloneArray(arr){var clone=[];arr.forEach(function(item,index){if(typeof item==="object"&&item!==null)if(Array.isArray(item))clone[index]=deepCloneArray(item);else if(isSpecificValue(item))clone[index]=cloneSpecificValue(item);
    else clone[index]=deepExtend({},item);else clone[index]=item});return clone}var deepExtend=module.exports=function(){if(arguments.length<1||typeof arguments[0]!=="object")return false;if(arguments.length<2)return arguments[0];var target=arguments[0];var args=Array.prototype.slice.call(arguments,1);var val,src;args.forEach(function(obj){if(typeof obj!=="object"||obj===null||Array.isArray(obj))return;Object.keys(obj).forEach(function(key){src=target[key];val=obj[key];if(val===target)return;else if(typeof val!==
    "object"||val===null){target[key]=val;return}else if(Array.isArray(val)){target[key]=deepCloneArray(val);return}else if(isSpecificValue(val)){target[key]=cloneSpecificValue(val);return}else if(typeof src!=="object"||src===null||Array.isArray(src)){target[key]=deepExtend({},val);return}else{target[key]=deepExtend(src,val);return}})});return target}});function copy(_,obj,refs,parent,resolve,callback){var target=Array.isArray(obj)?[]:{};if(typeof obj.$ref==="string"){var id=obj.$ref;var base=helpers.getDocumentURI(id);
    var local=id.indexOf("#/")>-1;if(local||resolve&&base!==parent){var fixed=findReference(id,refs,callback);deepExtend_1(obj,fixed);delete obj.$ref;delete obj.id}if(_[id])return obj;_[id]=1}for(var prop in obj)if(typeof obj[prop]==="object"&&obj[prop]!==null&&!helpers.isKeyword(prop))target[prop]=copy(_,obj[prop],refs,parent,resolve,callback);else target[prop]=obj[prop];return target}var resolveSchema=function(obj,refs,resolve,callback){var fixedId=helpers.resolveURL(obj.$schema,obj.id),parent=helpers.getDocumentURI(fixedId);
    return copy({},obj,refs,parent,resolve,callback)};var cloneObj=createCommonjsModule(function(module){var clone=module.exports=function(obj,seen){seen=seen||[];if(seen.indexOf(obj)>-1)throw new Error("unable dereference circular structures");if(!obj||typeof obj!=="object")return obj;seen=seen.concat([obj]);var target=Array.isArray(obj)?[]:{};function copy(key,value){target[key]=clone(value,seen)}if(Array.isArray(target))obj.forEach(function(value,key){copy(key,value)});else if(Object.prototype.toString.call(obj)===
    "[object Object]")Object.keys(obj).forEach(function(key){copy(key,obj[key])});return target}});var SCHEMA_URI=["http://json-schema.org/schema#","http://json-schema.org/draft-04/schema#"];function expand(obj,parent,callback){if(obj){var id=typeof obj.id==="string"?obj.id:"#";if(!helpers.isURL(id))id=helpers.resolveURL(parent===id?null:parent,id);if(typeof obj.$ref==="string"&&!helpers.isURL(obj.$ref))obj.$ref=helpers.resolveURL(id,obj.$ref);if(typeof obj.id==="string")obj.id=parent=id}for(var key in obj){var value=
    obj[key];if(typeof value==="object"&&value!==null&&!helpers.isKeyword(key))expand(value,parent,callback)}if(typeof callback==="function")callback(obj)}var normalizeSchema=function(fakeroot,schema,push){if(typeof fakeroot==="object"){push=schema;schema=fakeroot;fakeroot=null}var base=fakeroot||"",copy=cloneObj(schema);if(copy.$schema&&SCHEMA_URI.indexOf(copy.$schema)===-1)throw new Error("Unsupported schema version (v4 only)");base=helpers.resolveURL(copy.$schema||SCHEMA_URI[0],base);expand(copy,helpers.resolveURL(copy.id||
    "#",base),push);copy.id=copy.id||base;return copy};var lib$1=createCommonjsModule(function(module){helpers.findByRef=findReference;helpers.resolveSchema=resolveSchema;helpers.normalizeSchema=normalizeSchema;var instance=module.exports=function(f){function $ref(fakeroot,schema,refs,ex){if(typeof fakeroot==="object"){ex=refs;refs=schema;schema=fakeroot;fakeroot=undefined}if(typeof schema!=="object")throw new Error("schema must be an object");if(typeof refs==="object"&&refs!==null){var aux=refs;refs=
    [];for(var k in aux){aux[k].id=aux[k].id||k;refs.push(aux[k])}}if(typeof refs!=="undefined"&&!Array.isArray(refs)){ex=!!refs;refs=[]}function push(ref){if(typeof ref.id==="string"){var id=helpers.resolveURL(fakeroot,ref.id).replace(/\/#?$/,"");if(id.indexOf("#")>-1){var parts=id.split("#");if(parts[1].charAt()==="/")id=parts[0];else id=parts[1]||parts[0]}if(!$ref.refs[id])$ref.refs[id]=ref}}(refs||[]).concat([schema]).forEach(function(ref){schema=helpers.normalizeSchema(fakeroot,ref,push);push(schema)});
    return helpers.resolveSchema(schema,$ref.refs,ex,f)}$ref.refs={};$ref.util=helpers;return $ref};instance.util=helpers});var jsonpath=createCommonjsModule(function(module,exports){(function(f){{module.exports=f()}})(function(){var define;return function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof commonjsRequire=="function"&&commonjsRequire;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 commonjsRequire=="function"&&commonjsRequire;for(var o=0;o<r.length;o++)s(r[o]);return s}({"./aesprim":[function(require,module,exports){(function(root,factory){if(typeof define==="function"&&define.amd)define(["exports"],factory);else if(typeof exports!=="undefined")factory(exports);else factory(root.esprima={})})(this,function(exports){var Token,TokenName,FnExprTokens,Syntax,
    PropertyKind,Messages,Regex,SyntaxTreeDelegate,source,strict,index,lineNumber,lineStart,length,delegate,lookahead,state,extra;Token={BooleanLiteral:1,EOF:2,Identifier:3,Keyword:4,NullLiteral:5,NumericLiteral:6,Punctuator:7,StringLiteral:8,RegularExpression:9};TokenName={};TokenName[Token.BooleanLiteral]="Boolean";TokenName[Token.EOF]="\x3cend\x3e";TokenName[Token.Identifier]="Identifier";TokenName[Token.Keyword]="Keyword";TokenName[Token.NullLiteral]="Null";TokenName[Token.NumericLiteral]="Numeric";
    TokenName[Token.Punctuator]="Punctuator";TokenName[Token.StringLiteral]="String";TokenName[Token.RegularExpression]="RegularExpression";FnExprTokens=["(","{","[","in","typeof","instanceof","new","return","case","delete","throw","void","\x3d","+\x3d","-\x3d","*\x3d","/\x3d","%\x3d","\x3c\x3c\x3d","\x3e\x3e\x3d","\x3e\x3e\x3e\x3d","\x26\x3d","|\x3d","^\x3d",",","+","-","*","/","%","++","--","\x3c\x3c","\x3e\x3e","\x3e\x3e\x3e","\x26","|","^","!","~","\x26\x26","||","?",":","\x3d\x3d\x3d","\x3d\x3d",
    "\x3e\x3d","\x3c\x3d","\x3c","\x3e","!\x3d","!\x3d\x3d"];Syntax={AssignmentExpression:"AssignmentExpression",ArrayExpression:"ArrayExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DoWhileStatement:"DoWhileStatement",DebuggerStatement:"DebuggerStatement",EmptyStatement:"EmptyStatement",ExpressionStatement:"ExpressionStatement",
    ForStatement:"ForStatement",ForInStatement:"ForInStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",Identifier:"Identifier",IfStatement:"IfStatement",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",Program:"Program",Property:"Property",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SwitchStatement:"SwitchStatement",
    SwitchCase:"SwitchCase",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",TryStatement:"TryStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement",WithStatement:"WithStatement"};PropertyKind={Data:1,Get:2,Set:4};Messages={UnexpectedToken:"Unexpected token %0",UnexpectedNumber:"Unexpected number",UnexpectedString:"Unexpected string",UnexpectedIdentifier:"Unexpected identifier",
    UnexpectedReserved:"Unexpected reserved word",UnexpectedEOS:"Unexpected end of input",NewlineAfterThrow:"Illegal newline after throw",InvalidRegExp:"Invalid regular expression",UnterminatedRegExp:"Invalid regular expression: missing /",InvalidLHSInAssignment:"Invalid left-hand side in assignment",InvalidLHSInForIn:"Invalid left-hand side in for-in",MultipleDefaultsInSwitch:"More than one default clause in switch statement",NoCatchOrFinally:"Missing catch or finally after try",UnknownLabel:"Undefined label '%0'",
    Redeclaration:"%0 '%1' has already been declared",IllegalContinue:"Illegal continue statement",IllegalBreak:"Illegal break statement",IllegalReturn:"Illegal return statement",StrictModeWith:"Strict mode code may not include a with statement",StrictCatchVariable:"Catch variable may not be eval or arguments in strict mode",StrictVarName:"Variable name may not be eval or arguments in strict mode",StrictParamName:"Parameter name eval or arguments is not allowed in strict mode",StrictParamDupe:"Strict mode function may not have duplicate parameter names",
    StrictFunctionName:"Function name may not be eval or arguments in strict mode",StrictOctalLiteral:"Octal literals are not allowed in strict mode.",StrictDelete:"Delete of an unqualified identifier in strict mode.",StrictDuplicateProperty:"Duplicate data property in object literal not allowed in strict mode",AccessorDataProperty:"Object literal may not have data and accessor property with the same name",AccessorGetSet:"Object literal may not have multiple get/set accessors with the same name",StrictLHSAssignment:"Assignment to eval or arguments is not allowed in strict mode",
    StrictLHSPostfix:"Postfix increment/decrement may not have eval or arguments operand in strict mode",StrictLHSPrefix:"Prefix increment/decrement may not have eval or arguments operand in strict mode",StrictReservedWord:"Use of future reserved word in strict mode"};Regex={NonAsciiIdentifierStart:new RegExp("[\u00aa\u00b5\u00ba\u00c0-\u00d6\u00d8-\u00f6\u00f8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05d0-\u05ea\u05f0-\u05f2\u0620-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06e5\u06e6\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u07f4\u07f5\u07fa\u0800-\u0815\u081a\u0824\u0828\u0840-\u0858\u08a0\u08a2-\u08ac\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097f\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c33\u0c35-\u0c39\u0c3d\u0c58\u0c59\u0c60\u0c61\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d60\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e33\u0e40-\u0e46\u0e81\u0e82\u0e84\u0e87\u0e88\u0e8a\u0e8d\u0e94-\u0e97\u0e99-\u0e9f\u0ea1-\u0ea3\u0ea5\u0ea7\u0eaa\u0eab\u0ead-\u0eb0\u0eb2\u0eb3\u0ebd\u0ec0-\u0ec4\u0ec6\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f4\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f0\u1700-\u170c\u170e-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17d7\u17dc\u1820-\u1877\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191c\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19c1-\u19c7\u1a00-\u1a16\u1a20-\u1a54\u1aa7\u1b05-\u1b33\u1b45-\u1b4b\u1b83-\u1ba0\u1bae\u1baf\u1bba-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1ce9-\u1cec\u1cee-\u1cf1\u1cf5\u1cf6\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2119-\u211d\u2124\u2126\u2128\u212a-\u212d\u212f-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2c2e\u2c30-\u2c5e\u2c60-\u2ce4\u2ceb-\u2cee\u2cf2\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u2e2f\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303c\u3041-\u3096\u309d-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312d\u3131-\u318e\u31a0-\u31ba\u31f0-\u31ff\u3400-\u4db5\u4e00-\u9fcc\ua000-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua697\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua78e\ua790-\ua793\ua7a0-\ua7aa\ua7f8-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uaa60-\uaa76\uaa7a\uaa80-\uaaaf\uaab1\uaab5\uaab6\uaab9-\uaabd\uaac0\uaac2\uaadb-\uaadd\uaae0-\uaaea\uaaf2-\uaaf4\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uabc0-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc]"),
    NonAsciiIdentifierPart:new RegExp("[\u00aa\u00b5\u00ba\u00c0-\u00d6\u00d8-\u00f6\u00f8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0300-\u0374\u0376\u0377\u037a-\u037d\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u0483-\u0487\u048a-\u0527\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u05d0-\u05ea\u05f0-\u05f2\u0610-\u061a\u0620-\u0669\u066e-\u06d3\u06d5-\u06dc\u06df-\u06e8\u06ea-\u06fc\u06ff\u0710-\u074a\u074d-\u07b1\u07c0-\u07f5\u07fa\u0800-\u082d\u0840-\u085b\u08a0\u08a2-\u08ac\u08e4-\u08fe\u0900-\u0963\u0966-\u096f\u0971-\u0977\u0979-\u097f\u0981-\u0983\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bc-\u09c4\u09c7\u09c8\u09cb-\u09ce\u09d7\u09dc\u09dd\u09df-\u09e3\u09e6-\u09f1\u0a01-\u0a03\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a3c\u0a3e-\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a59-\u0a5c\u0a5e\u0a66-\u0a75\u0a81-\u0a83\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abc-\u0ac5\u0ac7-\u0ac9\u0acb-\u0acd\u0ad0\u0ae0-\u0ae3\u0ae6-\u0aef\u0b01-\u0b03\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3c-\u0b44\u0b47\u0b48\u0b4b-\u0b4d\u0b56\u0b57\u0b5c\u0b5d\u0b5f-\u0b63\u0b66-\u0b6f\u0b71\u0b82\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcd\u0bd0\u0bd7\u0be6-\u0bef\u0c01-\u0c03\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c33\u0c35-\u0c39\u0c3d-\u0c44\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c58\u0c59\u0c60-\u0c63\u0c66-\u0c6f\u0c82\u0c83\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbc-\u0cc4\u0cc6-\u0cc8\u0cca-\u0ccd\u0cd5\u0cd6\u0cde\u0ce0-\u0ce3\u0ce6-\u0cef\u0cf1\u0cf2\u0d02\u0d03\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d-\u0d44\u0d46-\u0d48\u0d4a-\u0d4e\u0d57\u0d60-\u0d63\u0d66-\u0d6f\u0d7a-\u0d7f\u0d82\u0d83\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0dca\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0df2\u0df3\u0e01-\u0e3a\u0e40-\u0e4e\u0e50-\u0e59\u0e81\u0e82\u0e84\u0e87\u0e88\u0e8a\u0e8d\u0e94-\u0e97\u0e99-\u0e9f\u0ea1-\u0ea3\u0ea5\u0ea7\u0eaa\u0eab\u0ead-\u0eb9\u0ebb-\u0ebd\u0ec0-\u0ec4\u0ec6\u0ec8-\u0ecd\u0ed0-\u0ed9\u0edc-\u0edf\u0f00\u0f18\u0f19\u0f20-\u0f29\u0f35\u0f37\u0f39\u0f3e-\u0f47\u0f49-\u0f6c\u0f71-\u0f84\u0f86-\u0f97\u0f99-\u0fbc\u0fc6\u1000-\u1049\u1050-\u109d\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u135d-\u135f\u1380-\u138f\u13a0-\u13f4\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f0\u1700-\u170c\u170e-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176c\u176e-\u1770\u1772\u1773\u1780-\u17d3\u17d7\u17dc\u17dd\u17e0-\u17e9\u180b-\u180d\u1810-\u1819\u1820-\u1877\u1880-\u18aa\u18b0-\u18f5\u1900-\u191c\u1920-\u192b\u1930-\u193b\u1946-\u196d\u1970-\u1974\u1980-\u19ab\u19b0-\u19c9\u19d0-\u19d9\u1a00-\u1a1b\u1a20-\u1a5e\u1a60-\u1a7c\u1a7f-\u1a89\u1a90-\u1a99\u1aa7\u1b00-\u1b4b\u1b50-\u1b59\u1b6b-\u1b73\u1b80-\u1bf3\u1c00-\u1c37\u1c40-\u1c49\u1c4d-\u1c7d\u1cd0-\u1cd2\u1cd4-\u1cf6\u1d00-\u1de6\u1dfc-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u200c\u200d\u203f\u2040\u2054\u2071\u207f\u2090-\u209c\u20d0-\u20dc\u20e1\u20e5-\u20f0\u2102\u2107\u210a-\u2113\u2115\u2119-\u211d\u2124\u2126\u2128\u212a-\u212d\u212f-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2c2e\u2c30-\u2c5e\u2c60-\u2ce4\u2ceb-\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d7f-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u2de0-\u2dff\u2e2f\u3005-\u3007\u3021-\u302f\u3031-\u3035\u3038-\u303c\u3041-\u3096\u3099\u309a\u309d-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312d\u3131-\u318e\u31a0-\u31ba\u31f0-\u31ff\u3400-\u4db5\u4e00-\u9fcc\ua000-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua62b\ua640-\ua66f\ua674-\ua67d\ua67f-\ua697\ua69f-\ua6f1\ua717-\ua71f\ua722-\ua788\ua78b-\ua78e\ua790-\ua793\ua7a0-\ua7aa\ua7f8-\ua827\ua840-\ua873\ua880-\ua8c4\ua8d0-\ua8d9\ua8e0-\ua8f7\ua8fb\ua900-\ua92d\ua930-\ua953\ua960-\ua97c\ua980-\ua9c0\ua9cf-\ua9d9\uaa00-\uaa36\uaa40-\uaa4d\uaa50-\uaa59\uaa60-\uaa76\uaa7a\uaa7b\uaa80-\uaac2\uaadb-\uaadd\uaae0-\uaaef\uaaf2-\uaaf6\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uabc0-\uabea\uabec\uabed\uabf0-\uabf9\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe00-\ufe0f\ufe20-\ufe26\ufe33\ufe34\ufe4d-\ufe4f\ufe70-\ufe74\ufe76-\ufefc\uff10-\uff19\uff21-\uff3a\uff3f\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc]")};
    function assert(condition,message){if(!condition)throw new Error("ASSERT: "+message);}function isDecimalDigit(ch){return ch>=48&&ch<=57}function isHexDigit(ch){return"0123456789abcdefABCDEF".indexOf(ch)>=0}function isOctalDigit(ch){return"01234567".indexOf(ch)>=0}function isWhiteSpace(ch){return ch===32||ch===9||ch===11||ch===12||ch===160||ch>=5760&&[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].indexOf(ch)>=0}function isLineTerminator(ch){return ch===10||
    ch===13||ch===8232||ch===8233}function isIdentifierStart(ch){return ch==64||ch===36||ch===95||ch>=65&&ch<=90||ch>=97&&ch<=122||ch===92||ch>=128&&Regex.NonAsciiIdentifierStart.test(String.fromCharCode(ch))}function isIdentifierPart(ch){return ch===36||ch===95||ch>=65&&ch<=90||ch>=97&&ch<=122||ch>=48&&ch<=57||ch===92||ch>=128&&Regex.NonAsciiIdentifierPart.test(String.fromCharCode(ch))}function isFutureReservedWord(id){switch(id){case "class":case "enum":case "export":case "extends":case "import":case "super":return true;
    default:return false}}function isStrictModeReservedWord(id){switch(id){case "implements":case "interface":case "package":case "private":case "protected":case "public":case "static":case "yield":case "let":return true;default:return false}}function isRestrictedWord(id){return id==="eval"||id==="arguments"}function isKeyword(id){if(strict&&isStrictModeReservedWord(id))return true;switch(id.length){case 2:return id==="if"||id==="in"||id==="do";case 3:return id==="var"||id==="for"||id==="new"||id==="try"||
    id==="let";case 4:return id==="this"||id==="else"||id==="case"||id==="void"||id==="with"||id==="enum";case 5:return id==="while"||id==="break"||id==="catch"||id==="throw"||id==="const"||id==="yield"||id==="class"||id==="super";case 6:return id==="return"||id==="typeof"||id==="delete"||id==="switch"||id==="export"||id==="import";case 7:return id==="default"||id==="finally"||id==="extends";case 8:return id==="function"||id==="continue"||id==="debugger";case 10:return id==="instanceof";default:return false}}
    function addComment(type,value,start,end,loc){var comment;assert(typeof start==="number","Comment must have valid position");if(state.lastCommentStart>=start)return;state.lastCommentStart=start;comment={type:type,value:value};if(extra.range)comment.range=[start,end];if(extra.loc)comment.loc=loc;extra.comments.push(comment);if(extra.attachComment){extra.leadingComments.push(comment);extra.trailingComments.push(comment)}}function skipSingleLineComment(offset){var start,loc,ch,comment;start=index-offset;
    loc={start:{line:lineNumber,column:index-lineStart-offset}};while(index<length){ch=source.charCodeAt(index);++index;if(isLineTerminator(ch)){if(extra.comments){comment=source.slice(start+offset,index-1);loc.end={line:lineNumber,column:index-lineStart-1};addComment("Line",comment,start,index-1,loc)}if(ch===13&&source.charCodeAt(index)===10)++index;++lineNumber;lineStart=index;return}}if(extra.comments){comment=source.slice(start+offset,index);loc.end={line:lineNumber,column:index-lineStart};addComment("Line",
    comment,start,index,loc)}}function skipMultiLineComment(){var start,loc,ch,comment;if(extra.comments){start=index-2;loc={start:{line:lineNumber,column:index-lineStart-2}}}while(index<length){ch=source.charCodeAt(index);if(isLineTerminator(ch)){if(ch===13&&source.charCodeAt(index+1)===10)++index;++lineNumber;++index;lineStart=index;if(index>=length)throwError({},Messages.UnexpectedToken,"ILLEGAL")}else if(ch===42){if(source.charCodeAt(index+1)===47){++index;++index;if(extra.comments){comment=source.slice(start+
    2,index-2);loc.end={line:lineNumber,column:index-lineStart};addComment("Block",comment,start,index,loc)}return}++index}else++index}throwError({},Messages.UnexpectedToken,"ILLEGAL")}function skipComment(){var ch,start;start=index===0;while(index<length){ch=source.charCodeAt(index);if(isWhiteSpace(ch))++index;else if(isLineTerminator(ch)){++index;if(ch===13&&source.charCodeAt(index)===10)++index;++lineNumber;lineStart=index;start=true}else if(ch===47){ch=source.charCodeAt(index+1);if(ch===47){++index;
    ++index;skipSingleLineComment(2);start=true}else if(ch===42){++index;++index;skipMultiLineComment()}else break}else if(start&&ch===45)if(source.charCodeAt(index+1)===45&&source.charCodeAt(index+2)===62){index+=3;skipSingleLineComment(3)}else break;else if(ch===60)if(source.slice(index+1,index+4)==="!--"){++index;++index;++index;++index;skipSingleLineComment(4)}else break;else break}}function scanHexEscape(prefix){var i,len,ch,code=0;len=prefix==="u"?4:2;for(i=0;i<len;++i)if(index<length&&isHexDigit(source[index])){ch=
    source[index++];code=code*16+"0123456789abcdef".indexOf(ch.toLowerCase())}else return"";return String.fromCharCode(code)}function getEscapedIdentifier(){var ch,id;ch=source.charCodeAt(index++);id=String.fromCharCode(ch);if(ch===92){if(source.charCodeAt(index)!==117)throwError({},Messages.UnexpectedToken,"ILLEGAL");++index;ch=scanHexEscape("u");if(!ch||ch==="\\"||!isIdentifierStart(ch.charCodeAt(0)))throwError({},Messages.UnexpectedToken,"ILLEGAL");id=ch}while(index<length){ch=source.charCodeAt(index);
    if(!isIdentifierPart(ch))break;++index;id+=String.fromCharCode(ch);if(ch===92){id=id.substr(0,id.length-1);if(source.charCodeAt(index)!==117)throwError({},Messages.UnexpectedToken,"ILLEGAL");++index;ch=scanHexEscape("u");if(!ch||ch==="\\"||!isIdentifierPart(ch.charCodeAt(0)))throwError({},Messages.UnexpectedToken,"ILLEGAL");id+=ch}}return id}function getIdentifier(){var start,ch;start=index++;while(index<length){ch=source.charCodeAt(index);if(ch===92){index=start;return getEscapedIdentifier()}if(isIdentifierPart(ch))++index;
    else break}return source.slice(start,index)}function scanIdentifier(){var start,id,type;start=index;id=source.charCodeAt(index)===92?getEscapedIdentifier():getIdentifier();if(id.length===1)type=Token.Identifier;else if(isKeyword(id))type=Token.Keyword;else if(id==="null")type=Token.NullLiteral;else if(id==="true"||id==="false")type=Token.BooleanLiteral;else type=Token.Identifier;return{type:type,value:id,lineNumber:lineNumber,lineStart:lineStart,start:start,end:index}}function scanPunctuator(){var start=
    index,code=source.charCodeAt(index),code2,ch1=source[index],ch2,ch3,ch4;switch(code){case 46:case 40:case 41:case 59:case 44:case 123:case 125:case 91:case 93:case 58:case 63:case 126:++index;if(extra.tokenize)if(code===40)extra.openParenToken=extra.tokens.length;else if(code===123)extra.openCurlyToken=extra.tokens.length;return{type:Token.Punctuator,value:String.fromCharCode(code),lineNumber:lineNumber,lineStart:lineStart,start:start,end:index};default:code2=source.charCodeAt(index+1);if(code2===
    61)switch(code){case 43:case 45:case 47:case 60:case 62:case 94:case 124:case 37:case 38:case 42:index+=2;return{type:Token.Punctuator,value:String.fromCharCode(code)+String.fromCharCode(code2),lineNumber:lineNumber,lineStart:lineStart,start:start,end:index};case 33:case 61:index+=2;if(source.charCodeAt(index)===61)++index;return{type:Token.Punctuator,value:source.slice(start,index),lineNumber:lineNumber,lineStart:lineStart,start:start,end:index}}}ch4=source.substr(index,4);if(ch4==="\x3e\x3e\x3e\x3d"){index+=
    4;return{type:Token.Punctuator,value:ch4,lineNumber:lineNumber,lineStart:lineStart,start:start,end:index}}ch3=ch4.substr(0,3);if(ch3==="\x3e\x3e\x3e"||ch3==="\x3c\x3c\x3d"||ch3==="\x3e\x3e\x3d"){index+=3;return{type:Token.Punctuator,value:ch3,lineNumber:lineNumber,lineStart:lineStart,start:start,end:index}}ch2=ch3.substr(0,2);if(ch1===ch2[1]&&"+-\x3c\x3e\x26|".indexOf(ch1)>=0||ch2==="\x3d\x3e"){index+=2;return{type:Token.Punctuator,value:ch2,lineNumber:lineNumber,lineStart:lineStart,start:start,end:index}}if("\x3c\x3e\x3d!+-*%\x26|^/".indexOf(ch1)>=
    0){++index;return{type:Token.Punctuator,value:ch1,lineNumber:lineNumber,lineStart:lineStart,start:start,end:index}}throwError({},Messages.UnexpectedToken,"ILLEGAL")}function scanHexLiteral(start){var number="";while(index<length){if(!isHexDigit(source[index]))break;number+=source[index++]}if(number.length===0)throwError({},Messages.UnexpectedToken,"ILLEGAL");if(isIdentifierStart(source.charCodeAt(index)))throwError({},Messages.UnexpectedToken,"ILLEGAL");return{type:Token.NumericLiteral,value:parseInt("0x"+
    number,16),lineNumber:lineNumber,lineStart:lineStart,start:start,end:index}}function scanOctalLiteral(start){var number="0"+source[index++];while(index<length){if(!isOctalDigit(source[index]))break;number+=source[index++]}if(isIdentifierStart(source.charCodeAt(index))||isDecimalDigit(source.charCodeAt(index)))throwError({},Messages.UnexpectedToken,"ILLEGAL");return{type:Token.NumericLiteral,value:parseInt(number,8),octal:true,lineNumber:lineNumber,lineStart:lineStart,start:start,end:index}}function scanNumericLiteral(){var number,
    start,ch;ch=source[index];assert(isDecimalDigit(ch.charCodeAt(0))||ch===".","Numeric literal must start with a decimal digit or a decimal point");start=index;number="";if(ch!=="."){number=source[index++];ch=source[index];if(number==="0"){if(ch==="x"||ch==="X"){++index;return scanHexLiteral(start)}if(isOctalDigit(ch))return scanOctalLiteral(start);if(ch&&isDecimalDigit(ch.charCodeAt(0)))throwError({},Messages.UnexpectedToken,"ILLEGAL")}while(isDecimalDigit(source.charCodeAt(index)))number+=source[index++];
    ch=source[index]}if(ch==="."){number+=source[index++];while(isDecimalDigit(source.charCodeAt(index)))number+=source[index++];ch=source[index]}if(ch==="e"||ch==="E"){number+=source[index++];ch=source[index];if(ch==="+"||ch==="-")number+=source[index++];if(isDecimalDigit(source.charCodeAt(index)))while(isDecimalDigit(source.charCodeAt(index)))number+=source[index++];else throwError({},Messages.UnexpectedToken,"ILLEGAL")}if(isIdentifierStart(source.charCodeAt(index)))throwError({},Messages.UnexpectedToken,
    "ILLEGAL");return{type:Token.NumericLiteral,value:parseFloat(number),lineNumber:lineNumber,lineStart:lineStart,start:start,end:index}}function scanStringLiteral(){var str="",quote,start,ch,code,unescaped,restore,octal=false,startLineNumber,startLineStart;startLineNumber=lineNumber;startLineStart=lineStart;quote=source[index];assert(quote==="'"||quote==='"',"String literal must starts with a quote");start=index;++index;while(index<length){ch=source[index++];if(ch===quote){quote="";break}else if(ch===
    "\\"){ch=source[index++];if(!ch||!isLineTerminator(ch.charCodeAt(0)))switch(ch){case "u":case "x":restore=index;unescaped=scanHexEscape(ch);if(unescaped)str+=unescaped;else{index=restore;str+=ch}break;case "n":str+="\n";break;case "r":str+="\r";break;case "t":str+="\t";break;case "b":str+="\b";break;case "f":str+="\f";break;case "v":str+="\x0B";break;default:if(isOctalDigit(ch)){code="01234567".indexOf(ch);if(code!==0)octal=true;if(index<length&&isOctalDigit(source[index])){octal=true;code=code*8+
    "01234567".indexOf(source[index++]);if("0123".indexOf(ch)>=0&&index<length&&isOctalDigit(source[index]))code=code*8+"01234567".indexOf(source[index++])}str+=String.fromCharCode(code)}else str+=ch;break}else{++lineNumber;if(ch==="\r"&&source[index]==="\n")++index;lineStart=index}}else if(isLineTerminator(ch.charCodeAt(0)))break;else str+=ch}if(quote!=="")throwError({},Messages.UnexpectedToken,"ILLEGAL");return{type:Token.StringLiteral,value:str,octal:octal,startLineNumber:startLineNumber,startLineStart:startLineStart,
    lineNumber:lineNumber,lineStart:lineStart,start:start,end:index}}function testRegExp(pattern,flags){var value;try{value=new RegExp(pattern,flags)}catch(e){throwError({},Messages.InvalidRegExp)}return value}function scanRegExpBody(){var ch,str,classMarker,terminated,body;ch=source[index];assert(ch==="/","Regular expression literal must start with a slash");str=source[index++];classMarker=false;terminated=false;while(index<length){ch=source[index++];str+=ch;if(ch==="\\"){ch=source[index++];if(isLineTerminator(ch.charCodeAt(0)))throwError({},
    Messages.UnterminatedRegExp);str+=ch}else if(isLineTerminator(ch.charCodeAt(0)))throwError({},Messages.UnterminatedRegExp);else if(classMarker){if(ch==="]")classMarker=false}else if(ch==="/"){terminated=true;break}else if(ch==="[")classMarker=true}if(!terminated)throwError({},Messages.UnterminatedRegExp);body=str.substr(1,str.length-2);return{value:body,literal:str}}function scanRegExpFlags(){var ch,str,flags,restore;str="";flags="";while(index<length){ch=source[index];if(!isIdentifierPart(ch.charCodeAt(0)))break;
    ++index;if(ch==="\\"&&index<length){ch=source[index];if(ch==="u"){++index;restore=index;ch=scanHexEscape("u");if(ch){flags+=ch;for(str+="\\u";restore<index;++restore)str+=source[restore]}else{index=restore;flags+="u";str+="\\u"}throwErrorTolerant({},Messages.UnexpectedToken,"ILLEGAL")}else{str+="\\";throwErrorTolerant({},Messages.UnexpectedToken,"ILLEGAL")}}else{flags+=ch;str+=ch}}return{value:flags,literal:str}}function scanRegExp(){var start,body,flags,value;lookahead=null;skipComment();start=index;
    body=scanRegExpBody();flags=scanRegExpFlags();value=testRegExp(body.value,flags.value);if(extra.tokenize)return{type:Token.RegularExpression,value:value,lineNumber:lineNumber,lineStart:lineStart,start:start,end:index};return{literal:body.literal+flags.literal,value:value,start:start,end:index}}function collectRegex(){var pos,loc,regex,token;skipComment();pos=index;loc={start:{line:lineNumber,column:index-lineStart}};regex=scanRegExp();loc.end={line:lineNumber,column:index-lineStart};if(!extra.tokenize){if(extra.tokens.length>
    0){token=extra.tokens[extra.tokens.length-1];if(token.range[0]===pos&&token.type==="Punctuator")if(token.value==="/"||token.value==="/\x3d")extra.tokens.pop()}extra.tokens.push({type:"RegularExpression",value:regex.literal,range:[pos,index],loc:loc})}return regex}function isIdentifierName(token){return token.type===Token.Identifier||token.type===Token.Keyword||token.type===Token.BooleanLiteral||token.type===Token.NullLiteral}function advanceSlash(){var prevToken,checkToken;prevToken=extra.tokens[extra.tokens.length-
    1];if(!prevToken)return collectRegex();if(prevToken.type==="Punctuator"){if(prevToken.value==="]")return scanPunctuator();if(prevToken.value===")"){checkToken=extra.tokens[extra.openParenToken-1];if(checkToken&&checkToken.type==="Keyword"&&(checkToken.value==="if"||checkToken.value==="while"||checkToken.value==="for"||checkToken.value==="with"))return collectRegex();return scanPunctuator()}if(prevToken.value==="}"){if(extra.tokens[extra.openCurlyToken-3]&&extra.tokens[extra.openCurlyToken-3].type===
    "Keyword"){checkToken=extra.tokens[extra.openCurlyToken-4];if(!checkToken)return scanPunctuator()}else if(extra.tokens[extra.openCurlyToken-4]&&extra.tokens[extra.openCurlyToken-4].type==="Keyword"){checkToken=extra.tokens[extra.openCurlyToken-5];if(!checkToken)return collectRegex()}else return scanPunctuator();if(FnExprTokens.indexOf(checkToken.value)>=0)return scanPunctuator();return collectRegex()}return collectRegex()}if(prevToken.type==="Keyword")return collectRegex();return scanPunctuator()}
    function advance(){var ch;skipComment();if(index>=length)return{type:Token.EOF,lineNumber:lineNumber,lineStart:lineStart,start:index,end:index};ch=source.charCodeAt(index);if(isIdentifierStart(ch))return scanIdentifier();if(ch===40||ch===41||ch===59)return scanPunctuator();if(ch===39||ch===34)return scanStringLiteral();if(ch===46){if(isDecimalDigit(source.charCodeAt(index+1)))return scanNumericLiteral();return scanPunctuator()}if(isDecimalDigit(ch))return scanNumericLiteral();if(extra.tokenize&&ch===
    47)return advanceSlash();return scanPunctuator()}function collectToken(){var loc,token,value;skipComment();loc={start:{line:lineNumber,column:index-lineStart}};token=advance();loc.end={line:lineNumber,column:index-lineStart};if(token.type!==Token.EOF){value=source.slice(token.start,token.end);extra.tokens.push({type:TokenName[token.type],value:value,range:[token.start,token.end],loc:loc})}return token}function lex(){var token;token=lookahead;index=token.end;lineNumber=token.lineNumber;lineStart=token.lineStart;
    lookahead=typeof extra.tokens!=="undefined"?collectToken():advance();index=token.end;lineNumber=token.lineNumber;lineStart=token.lineStart;return token}function peek(){var pos,line,start;pos=index;line=lineNumber;start=lineStart;lookahead=typeof extra.tokens!=="undefined"?collectToken():advance();index=pos;lineNumber=line;lineStart=start}function Position(line,column){this.line=line;this.column=column}function SourceLocation(startLine,startColumn,line,column){this.start=new Position(startLine,startColumn);
    this.end=new Position(line,column)}SyntaxTreeDelegate={name:"SyntaxTree",processComment:function(node){var lastChild,trailingComments;if(node.type===Syntax.Program)if(node.body.length>0)return;if(extra.trailingComments.length>0)if(extra.trailingComments[0].range[0]>=node.range[1]){trailingComments=extra.trailingComments;extra.trailingComments=[]}else extra.trailingComments.length=0;else if(extra.bottomRightStack.length>0&&extra.bottomRightStack[extra.bottomRightStack.length-1].trailingComments&&extra.bottomRightStack[extra.bottomRightStack.length-
    1].trailingComments[0].range[0]>=node.range[1]){trailingComments=extra.bottomRightStack[extra.bottomRightStack.length-1].trailingComments;delete extra.bottomRightStack[extra.bottomRightStack.length-1].trailingComments}while(extra.bottomRightStack.length>0&&extra.bottomRightStack[extra.bottomRightStack.length-1].range[0]>=node.range[0])lastChild=extra.bottomRightStack.pop();if(lastChild){if(lastChild.leadingComments&&lastChild.leadingComments[lastChild.leadingComments.length-1].range[1]<=node.range[0]){node.leadingComments=
    lastChild.leadingComments;delete lastChild.leadingComments}}else if(extra.leadingComments.length>0&&extra.leadingComments[extra.leadingComments.length-1].range[1]<=node.range[0]){node.leadingComments=extra.leadingComments;extra.leadingComments=[]}if(trailingComments)node.trailingComments=trailingComments;extra.bottomRightStack.push(node)},markEnd:function(node,startToken){if(extra.range)node.range=[startToken.start,index];if(extra.loc){node.loc=new SourceLocation(startToken.startLineNumber===undefined?
    startToken.lineNumber:startToken.startLineNumber,startToken.start-(startToken.startLineStart===undefined?startToken.lineStart:startToken.startLineStart),lineNumber,index-lineStart);this.postProcess(node)}if(extra.attachComment)this.processComment(node);return node},postProcess:function(node){if(extra.source)node.loc.source=extra.source;return node},createArrayExpression:function(elements){return{type:Syntax.ArrayExpression,elements:elements}},createAssignmentExpression:function(operator,left,right){return{type:Syntax.AssignmentExpression,
    operator:operator,left:left,right:right}},createBinaryExpression:function(operator,left,right){var type=operator==="||"||operator==="\x26\x26"?Syntax.LogicalExpression:Syntax.BinaryExpression;return{type:type,operator:operator,left:left,right:right}},createBlockStatement:function(body){return{type:Syntax.BlockStatement,body:body}},createBreakStatement:function(label){return{type:Syntax.BreakStatement,label:label}},createCallExpression:function(callee,args){return{type:Syntax.CallExpression,callee:callee,
    "arguments":args}},createCatchClause:function(param,body){return{type:Syntax.CatchClause,param:param,body:body}},createConditionalExpression:function(test,consequent,alternate){return{type:Syntax.ConditionalExpression,test:test,consequent:consequent,alternate:alternate}},createContinueStatement:function(label){return{type:Syntax.ContinueStatement,label:label}},createDebuggerStatement:function(){return{type:Syntax.DebuggerStatement}},createDoWhileStatement:function(body,test){return{type:Syntax.DoWhileStatement,
    body:body,test:test}},createEmptyStatement:function(){return{type:Syntax.EmptyStatement}},createExpressionStatement:function(expression){return{type:Syntax.ExpressionStatement,expression:expression}},createForStatement:function(init,test,update,body){return{type:Syntax.ForStatement,init:init,test:test,update:update,body:body}},createForInStatement:function(left,right,body){return{type:Syntax.ForInStatement,left:left,right:right,body:body,each:false}},createFunctionDeclaration:function(id,params,defaults,
    body){return{type:Syntax.FunctionDeclaration,id:id,params:params,defaults:defaults,body:body,rest:null,generator:false,expression:false}},createFunctionExpression:function(id,params,defaults,body){return{type:Syntax.FunctionExpression,id:id,params:params,defaults:defaults,body:body,rest:null,generator:false,expression:false}},createIdentifier:function(name){return{type:Syntax.Identifier,name:name}},createIfStatement:function(test,consequent,alternate){return{type:Syntax.IfStatement,test:test,consequent:consequent,
    alternate:alternate}},createLabeledStatement:function(label,body){return{type:Syntax.LabeledStatement,label:label,body:body}},createLiteral:function(token){return{type:Syntax.Literal,value:token.value,raw:source.slice(token.start,token.end)}},createMemberExpression:function(accessor,object,property){return{type:Syntax.MemberExpression,computed:accessor==="[",object:object,property:property}},createNewExpression:function(callee,args){return{type:Syntax.NewExpression,callee:callee,"arguments":args}},
    createObjectExpression:function(properties){return{type:Syntax.ObjectExpression,properties:properties}},createPostfixExpression:function(operator,argument){return{type:Syntax.UpdateExpression,operator:operator,argument:argument,prefix:false}},createProgram:function(body){return{type:Syntax.Program,body:body}},createProperty:function(kind,key,value){return{type:Syntax.Property,key:key,value:value,kind:kind}},createReturnStatement:function(argument){return{type:Syntax.ReturnStatement,argument:argument}},
    createSequenceExpression:function(expressions){return{type:Syntax.SequenceExpression,expressions:expressions}},createSwitchCase:function(test,consequent){return{type:Syntax.SwitchCase,test:test,consequent:consequent}},createSwitchStatement:function(discriminant,cases){return{type:Syntax.SwitchStatement,discriminant:discriminant,cases:cases}},createThisExpression:function(){return{type:Syntax.ThisExpression}},createThrowStatement:function(argument){return{type:Syntax.ThrowStatement,argument:argument}},
    createTryStatement:function(block,guardedHandlers,handlers,finalizer){return{type:Syntax.TryStatement,block:block,guardedHandlers:guardedHandlers,handlers:handlers,finalizer:finalizer}},createUnaryExpression:function(operator,argument){if(operator==="++"||operator==="--")return{type:Syntax.UpdateExpression,operator:operator,argument:argument,prefix:true};return{type:Syntax.UnaryExpression,operator:operator,argument:argument,prefix:true}},createVariableDeclaration:function(declarations,kind){return{type:Syntax.VariableDeclaration,
    declarations:declarations,kind:kind}},createVariableDeclarator:function(id,init){return{type:Syntax.VariableDeclarator,id:id,init:init}},createWhileStatement:function(test,body){return{type:Syntax.WhileStatement,test:test,body:body}},createWithStatement:function(object,body){return{type:Syntax.WithStatement,object:object,body:body}}};function peekLineTerminator(){var pos,line,start,found;pos=index;line=lineNumber;start=lineStart;skipComment();found=lineNumber!==line;index=pos;lineNumber=line;lineStart=
    start;return found}function throwError(token,messageFormat){var error,args=Array.prototype.slice.call(arguments,2),msg=messageFormat.replace(/%(\d)/g,function(whole,index){assert(index<args.length,"Message reference must be in range");return args[index]});if(typeof token.lineNumber==="number"){error=new Error("Line "+token.lineNumber+": "+msg);error.index=token.start;error.lineNumber=token.lineNumber;error.column=token.start-lineStart+1}else{error=new Error("Line "+lineNumber+": "+msg);error.index=
    index;error.lineNumber=lineNumber;error.column=index-lineStart+1}error.description=msg;throw error;}function throwErrorTolerant(){try{throwError.apply(null,arguments)}catch(e){if(extra.errors)extra.errors.push(e);else throw e;}}function throwUnexpected(token){if(token.type===Token.EOF)throwError(token,Messages.UnexpectedEOS);if(token.type===Token.NumericLiteral)throwError(token,Messages.UnexpectedNumber);if(token.type===Token.StringLiteral)throwError(token,Messages.UnexpectedString);if(token.type===
    Token.Identifier)throwError(token,Messages.UnexpectedIdentifier);if(token.type===Token.Keyword){if(isFutureReservedWord(token.value))throwError(token,Messages.UnexpectedReserved);else if(strict&&isStrictModeReservedWord(token.value)){throwErrorTolerant(token,Messages.StrictReservedWord);return}throwError(token,Messages.UnexpectedToken,token.value)}throwError(token,Messages.UnexpectedToken,token.value)}function expect(value){var token=lex();if(token.type!==Token.Punctuator||token.value!==value)throwUnexpected(token)}
    function expectKeyword(keyword){var token=lex();if(token.type!==Token.Keyword||token.value!==keyword)throwUnexpected(token)}function match(value){return lookahead.type===Token.Punctuator&&lookahead.value===value}function matchKeyword(keyword){return lookahead.type===Token.Keyword&&lookahead.value===keyword}function matchAssign(){var op;if(lookahead.type!==Token.Punctuator)return false;op=lookahead.value;return op==="\x3d"||op==="*\x3d"||op==="/\x3d"||op==="%\x3d"||op==="+\x3d"||op==="-\x3d"||op===
    "\x3c\x3c\x3d"||op==="\x3e\x3e\x3d"||op==="\x3e\x3e\x3e\x3d"||op==="\x26\x3d"||op==="^\x3d"||op==="|\x3d"}function consumeSemicolon(){var line;if(source.charCodeAt(index)===59||match(";")){lex();return}line=lineNumber;skipComment();if(lineNumber!==line)return;if(lookahead.type!==Token.EOF&&!match("}"))throwUnexpected(lookahead)}function isLeftHandSide(expr){return expr.type===Syntax.Identifier||expr.type===Syntax.MemberExpression}function parseArrayInitialiser(){var elements=[],startToken;startToken=
    lookahead;expect("[");while(!match("]"))if(match(",")){lex();elements.push(null)}else{elements.push(parseAssignmentExpression());if(!match("]"))expect(",")}lex();return delegate.markEnd(delegate.createArrayExpression(elements),startToken)}function parsePropertyFunction(param,first){var previousStrict,body,startToken;previousStrict=strict;startToken=lookahead;body=parseFunctionSourceElements();if(first&&strict&&isRestrictedWord(param[0].name))throwErrorTolerant(first,Messages.StrictParamName);strict=
    previousStrict;return delegate.markEnd(delegate.createFunctionExpression(null,param,[],body),startToken)}function parseObjectPropertyKey(){var token,startToken;startToken=lookahead;token=lex();if(token.type===Token.StringLiteral||token.type===Token.NumericLiteral){if(strict&&token.octal)throwErrorTolerant(token,Messages.StrictOctalLiteral);return delegate.markEnd(delegate.createLiteral(token),startToken)}return delegate.markEnd(delegate.createIdentifier(token.value),startToken)}function parseObjectProperty(){var token,
    key,id,value,param,startToken;token=lookahead;startToken=lookahead;if(token.type===Token.Identifier){id=parseObjectPropertyKey();if(token.value==="get"&&!match(":")){key=parseObjectPropertyKey();expect("(");expect(")");value=parsePropertyFunction([]);return delegate.markEnd(delegate.createProperty("get",key,value),startToken)}if(token.value==="set"&&!match(":")){key=parseObjectPropertyKey();expect("(");token=lookahead;if(token.type!==Token.Identifier){expect(")");throwErrorTolerant(token,Messages.UnexpectedToken,
    token.value);value=parsePropertyFunction([])}else{param=[parseVariableIdentifier()];expect(")");value=parsePropertyFunction(param,token)}return delegate.markEnd(delegate.createProperty("set",key,value),startToken)}expect(":");value=parseAssignmentExpression();return delegate.markEnd(delegate.createProperty("init",id,value),startToken)}if(token.type===Token.EOF||token.type===Token.Punctuator)throwUnexpected(token);else{key=parseObjectPropertyKey();expect(":");value=parseAssignmentExpression();return delegate.markEnd(delegate.createProperty("init",
    key,value),startToken)}}function parseObjectInitialiser(){var properties=[],property,name,key,kind,map={},toString=String,startToken;startToken=lookahead;expect("{");while(!match("}")){property=parseObjectProperty();if(property.key.type===Syntax.Identifier)name=property.key.name;else name=toString(property.key.value);kind=property.kind==="init"?PropertyKind.Data:property.kind==="get"?PropertyKind.Get:PropertyKind.Set;key="$"+name;if(Object.prototype.hasOwnProperty.call(map,key)){if(map[key]===PropertyKind.Data)if(strict&&
    kind===PropertyKind.Data)throwErrorTolerant({},Messages.StrictDuplicateProperty);else{if(kind!==PropertyKind.Data)throwErrorTolerant({},Messages.AccessorDataProperty)}else if(kind===PropertyKind.Data)throwErrorTolerant({},Messages.AccessorDataProperty);else if(map[key]&kind)throwErrorTolerant({},Messages.AccessorGetSet);map[key]|=kind}else map[key]=kind;properties.push(property);if(!match("}"))expect(",")}expect("}");return delegate.markEnd(delegate.createObjectExpression(properties),startToken)}
    function parseGroupExpression(){var expr;expect("(");expr=parseExpression();expect(")");return expr}function parsePrimaryExpression(){var type,token,expr,startToken;if(match("("))return parseGroupExpression();if(match("["))return parseArrayInitialiser();if(match("{"))return parseObjectInitialiser();type=lookahead.type;startToken=lookahead;if(type===Token.Identifier)expr=delegate.createIdentifier(lex().value);else if(type===Token.StringLiteral||type===Token.NumericLiteral){if(strict&&lookahead.octal)throwErrorTolerant(lookahead,
    Messages.StrictOctalLiteral);expr=delegate.createLiteral(lex())}else if(type===Token.Keyword){if(matchKeyword("function"))return parseFunctionExpression();if(matchKeyword("this")){lex();expr=delegate.createThisExpression()}else throwUnexpected(lex())}else if(type===Token.BooleanLiteral){token=lex();token.value=token.value==="true";expr=delegate.createLiteral(token)}else if(type===Token.NullLiteral){token=lex();token.value=null;expr=delegate.createLiteral(token)}else if(match("/")||match("/\x3d")){if(typeof extra.tokens!==
    "undefined")expr=delegate.createLiteral(collectRegex());else expr=delegate.createLiteral(scanRegExp());peek()}else throwUnexpected(lex());return delegate.markEnd(expr,startToken)}function parseArguments(){var args=[];expect("(");if(!match(")"))while(index<length){args.push(parseAssignmentExpression());if(match(")"))break;expect(",")}expect(")");return args}function parseNonComputedProperty(){var token,startToken;startToken=lookahead;token=lex();if(!isIdentifierName(token))throwUnexpected(token);return delegate.markEnd(delegate.createIdentifier(token.value),
    startToken)}function parseNonComputedMember(){expect(".");return parseNonComputedProperty()}function parseComputedMember(){var expr;expect("[");expr=parseExpression();expect("]");return expr}function parseNewExpression(){var callee,args,startToken;startToken=lookahead;expectKeyword("new");callee=parseLeftHandSideExpression();args=match("(")?parseArguments():[];return delegate.markEnd(delegate.createNewExpression(callee,args),startToken)}function parseLeftHandSideExpressionAllowCall(){var previousAllowIn,
    expr,args,property,startToken;startToken=lookahead;previousAllowIn=state.allowIn;state.allowIn=true;expr=matchKeyword("new")?parseNewExpression():parsePrimaryExpression();state.allowIn=previousAllowIn;for(;;){if(match(".")){property=parseNonComputedMember();expr=delegate.createMemberExpression(".",expr,property)}else if(match("(")){args=parseArguments();expr=delegate.createCallExpression(expr,args)}else if(match("[")){property=parseComputedMember();expr=delegate.createMemberExpression("[",expr,property)}else break;
    delegate.markEnd(expr,startToken)}return expr}function parseLeftHandSideExpression(){var previousAllowIn,expr,property,startToken;startToken=lookahead;previousAllowIn=state.allowIn;expr=matchKeyword("new")?parseNewExpression():parsePrimaryExpression();state.allowIn=previousAllowIn;while(match(".")||match("[")){if(match("[")){property=parseComputedMember();expr=delegate.createMemberExpression("[",expr,property)}else{property=parseNonComputedMember();expr=delegate.createMemberExpression(".",expr,property)}delegate.markEnd(expr,
    startToken)}return expr}function parsePostfixExpression(){var expr,token,startToken=lookahead;expr=parseLeftHandSideExpressionAllowCall();if(lookahead.type===Token.Punctuator)if((match("++")||match("--"))&&!peekLineTerminator()){if(strict&&expr.type===Syntax.Identifier&&isRestrictedWord(expr.name))throwErrorTolerant({},Messages.StrictLHSPostfix);if(!isLeftHandSide(expr))throwErrorTolerant({},Messages.InvalidLHSInAssignment);token=lex();expr=delegate.markEnd(delegate.createPostfixExpression(token.value,
    expr),startToken)}return expr}function parseUnaryExpression(){var token,expr,startToken;if(lookahead.type!==Token.Punctuator&&lookahead.type!==Token.Keyword)expr=parsePostfixExpression();else if(match("++")||match("--")){startToken=lookahead;token=lex();expr=parseUnaryExpression();if(strict&&expr.type===Syntax.Identifier&&isRestrictedWord(expr.name))throwErrorTolerant({},Messages.StrictLHSPrefix);if(!isLeftHandSide(expr))throwErrorTolerant({},Messages.InvalidLHSInAssignment);expr=delegate.createUnaryExpression(token.value,
    expr);expr=delegate.markEnd(expr,startToken)}else if(match("+")||match("-")||match("~")||match("!")){startToken=lookahead;token=lex();expr=parseUnaryExpression();expr=delegate.createUnaryExpression(token.value,expr);expr=delegate.markEnd(expr,startToken)}else if(matchKeyword("delete")||matchKeyword("void")||matchKeyword("typeof")){startToken=lookahead;token=lex();expr=parseUnaryExpression();expr=delegate.createUnaryExpression(token.value,expr);expr=delegate.markEnd(expr,startToken);if(strict&&expr.operator===
    "delete"&&expr.argument.type===Syntax.Identifier)throwErrorTolerant({},Messages.StrictDelete)}else expr=parsePostfixExpression();return expr}function binaryPrecedence(token,allowIn){var prec=0;if(token.type!==Token.Punctuator&&token.type!==Token.Keyword)return 0;switch(token.value){case "||":prec=1;break;case "\x26\x26":prec=2;break;case "|":prec=3;break;case "^":prec=4;break;case "\x26":prec=5;break;case "\x3d\x3d":case "!\x3d":case "\x3d\x3d\x3d":case "!\x3d\x3d":prec=6;break;case "\x3c":case "\x3e":case "\x3c\x3d":case "\x3e\x3d":case "instanceof":prec=
    7;break;case "in":prec=allowIn?7:0;break;case "\x3c\x3c":case "\x3e\x3e":case "\x3e\x3e\x3e":prec=8;break;case "+":case "-":prec=9;break;case "*":case "/":case "%":prec=11;break;default:break}return prec}function parseBinaryExpression(){var marker,markers,expr,token,prec,stack,right,operator,left,i;marker=lookahead;left=parseUnaryExpression();token=lookahead;prec=binaryPrecedence(token,state.allowIn);if(prec===0)return left;token.prec=prec;lex();markers=[marker,lookahead];right=parseUnaryExpression();
    stack=[left,token,right];while((prec=binaryPrecedence(lookahead,state.allowIn))>0){while(stack.length>2&&prec<=stack[stack.length-2].prec){right=stack.pop();operator=stack.pop().value;left=stack.pop();expr=delegate.createBinaryExpression(operator,left,right);markers.pop();marker=markers[markers.length-1];delegate.markEnd(expr,marker);stack.push(expr)}token=lex();token.prec=prec;stack.push(token);markers.push(lookahead);expr=parseUnaryExpression();stack.push(expr)}i=stack.length-1;expr=stack[i];markers.pop();
    while(i>1){expr=delegate.createBinaryExpression(stack[i-1].value,stack[i-2],expr);i-=2;marker=markers.pop();delegate.markEnd(expr,marker)}return expr}function parseConditionalExpression(){var expr,previousAllowIn,consequent,alternate,startToken;startToken=lookahead;expr=parseBinaryExpression();if(match("?")){lex();previousAllowIn=state.allowIn;state.allowIn=true;consequent=parseAssignmentExpression();state.allowIn=previousAllowIn;expect(":");alternate=parseAssignmentExpression();expr=delegate.createConditionalExpression(expr,
    consequent,alternate);delegate.markEnd(expr,startToken)}return expr}function parseAssignmentExpression(){var token,left,right,node,startToken;token=lookahead;startToken=lookahead;node=left=parseConditionalExpression();if(matchAssign()){if(!isLeftHandSide(left))throwErrorTolerant({},Messages.InvalidLHSInAssignment);if(strict&&left.type===Syntax.Identifier&&isRestrictedWord(left.name))throwErrorTolerant(token,Messages.StrictLHSAssignment);token=lex();right=parseAssignmentExpression();node=delegate.markEnd(delegate.createAssignmentExpression(token.value,
    left,right),startToken)}return node}function parseExpression(){var expr,startToken=lookahead;expr=parseAssignmentExpression();if(match(",")){expr=delegate.createSequenceExpression([expr]);while(index<length){if(!match(","))break;lex();expr.expressions.push(parseAssignmentExpression())}delegate.markEnd(expr,startToken)}return expr}function parseStatementList(){var list=[],statement;while(index<length){if(match("}"))break;statement=parseSourceElement();if(typeof statement==="undefined")break;list.push(statement)}return list}
    function parseBlock(){var block,startToken;startToken=lookahead;expect("{");block=parseStatementList();expect("}");return delegate.markEnd(delegate.createBlockStatement(block),startToken)}function parseVariableIdentifier(){var token,startToken;startToken=lookahead;token=lex();if(token.type!==Token.Identifier)throwUnexpected(token);return delegate.markEnd(delegate.createIdentifier(token.value),startToken)}function parseVariableDeclaration(kind){var init=null,id,startToken;startToken=lookahead;id=parseVariableIdentifier();
    if(strict&&isRestrictedWord(id.name))throwErrorTolerant({},Messages.StrictVarName);if(kind==="const"){expect("\x3d");init=parseAssignmentExpression()}else if(match("\x3d")){lex();init=parseAssignmentExpression()}return delegate.markEnd(delegate.createVariableDeclarator(id,init),startToken)}function parseVariableDeclarationList(kind){var list=[];do{list.push(parseVariableDeclaration(kind));if(!match(","))break;lex()}while(index<length);return list}function parseVariableStatement(){var declarations;
    expectKeyword("var");declarations=parseVariableDeclarationList();consumeSemicolon();return delegate.createVariableDeclaration(declarations,"var")}function parseConstLetDeclaration(kind){var declarations,startToken;startToken=lookahead;expectKeyword(kind);declarations=parseVariableDeclarationList(kind);consumeSemicolon();return delegate.markEnd(delegate.createVariableDeclaration(declarations,kind),startToken)}function parseEmptyStatement(){expect(";");return delegate.createEmptyStatement()}function parseExpressionStatement(){var expr=
    parseExpression();consumeSemicolon();return delegate.createExpressionStatement(expr)}function parseIfStatement(){var test,consequent,alternate;expectKeyword("if");expect("(");test=parseExpression();expect(")");consequent=parseStatement();if(matchKeyword("else")){lex();alternate=parseStatement()}else alternate=null;return delegate.createIfStatement(test,consequent,alternate)}function parseDoWhileStatement(){var body,test,oldInIteration;expectKeyword("do");oldInIteration=state.inIteration;state.inIteration=
    true;body=parseStatement();state.inIteration=oldInIteration;expectKeyword("while");expect("(");test=parseExpression();expect(")");if(match(";"))lex();return delegate.createDoWhileStatement(body,test)}function parseWhileStatement(){var test,body,oldInIteration;expectKeyword("while");expect("(");test=parseExpression();expect(")");oldInIteration=state.inIteration;state.inIteration=true;body=parseStatement();state.inIteration=oldInIteration;return delegate.createWhileStatement(test,body)}function parseForVariableDeclaration(){var token,
    declarations,startToken;startToken=lookahead;token=lex();declarations=parseVariableDeclarationList();return delegate.markEnd(delegate.createVariableDeclaration(declarations,token.value),startToken)}function parseForStatement(){var init,test,update,left,right,body,oldInIteration;init=test=update=null;expectKeyword("for");expect("(");if(match(";"))lex();else{if(matchKeyword("var")||matchKeyword("let")){state.allowIn=false;init=parseForVariableDeclaration();state.allowIn=true;if(init.declarations.length===
    1&&matchKeyword("in")){lex();left=init;right=parseExpression();init=null}}else{state.allowIn=false;init=parseExpression();state.allowIn=true;if(matchKeyword("in")){if(!isLeftHandSide(init))throwErrorTolerant({},Messages.InvalidLHSInForIn);lex();left=init;right=parseExpression();init=null}}if(typeof left==="undefined")expect(";")}if(typeof left==="undefined"){if(!match(";"))test=parseExpression();expect(";");if(!match(")"))update=parseExpression()}expect(")");oldInIteration=state.inIteration;state.inIteration=
    true;body=parseStatement();state.inIteration=oldInIteration;return typeof left==="undefined"?delegate.createForStatement(init,test,update,body):delegate.createForInStatement(left,right,body)}function parseContinueStatement(){var label=null,key;expectKeyword("continue");if(source.charCodeAt(index)===59){lex();if(!state.inIteration)throwError({},Messages.IllegalContinue);return delegate.createContinueStatement(null)}if(peekLineTerminator()){if(!state.inIteration)throwError({},Messages.IllegalContinue);
    return delegate.createContinueStatement(null)}if(lookahead.type===Token.Identifier){label=parseVariableIdentifier();key="$"+label.name;if(!Object.prototype.hasOwnProperty.call(state.labelSet,key))throwError({},Messages.UnknownLabel,label.name)}consumeSemicolon();if(label===null&&!state.inIteration)throwError({},Messages.IllegalContinue);return delegate.createContinueStatement(label)}function parseBreakStatement(){var label=null,key;expectKeyword("break");if(source.charCodeAt(index)===59){lex();if(!(state.inIteration||
    state.inSwitch))throwError({},Messages.IllegalBreak);return delegate.createBreakStatement(null)}if(peekLineTerminator()){if(!(state.inIteration||state.inSwitch))throwError({},Messages.IllegalBreak);return delegate.createBreakStatement(null)}if(lookahead.type===Token.Identifier){label=parseVariableIdentifier();key="$"+label.name;if(!Object.prototype.hasOwnProperty.call(state.labelSet,key))throwError({},Messages.UnknownLabel,label.name)}consumeSemicolon();if(label===null&&!(state.inIteration||state.inSwitch))throwError({},
    Messages.IllegalBreak);return delegate.createBreakStatement(label)}function parseReturnStatement(){var argument=null;expectKeyword("return");if(!state.inFunctionBody)throwErrorTolerant({},Messages.IllegalReturn);if(source.charCodeAt(index)===32)if(isIdentifierStart(source.charCodeAt(index+1))){argument=parseExpression();consumeSemicolon();return delegate.createReturnStatement(argument)}if(peekLineTerminator())return delegate.createReturnStatement(null);if(!match(";"))if(!match("}")&&lookahead.type!==
    Token.EOF)argument=parseExpression();consumeSemicolon();return delegate.createReturnStatement(argument)}function parseWithStatement(){var object,body;if(strict){skipComment();throwErrorTolerant({},Messages.StrictModeWith)}expectKeyword("with");expect("(");object=parseExpression();expect(")");body=parseStatement();return delegate.createWithStatement(object,body)}function parseSwitchCase(){var test,consequent=[],statement,startToken;startToken=lookahead;if(matchKeyword("default")){lex();test=null}else{expectKeyword("case");
    test=parseExpression()}expect(":");while(index<length){if(match("}")||matchKeyword("default")||matchKeyword("case"))break;statement=parseStatement();consequent.push(statement)}return delegate.markEnd(delegate.createSwitchCase(test,consequent),startToken)}function parseSwitchStatement(){var discriminant,cases,clause,oldInSwitch,defaultFound;expectKeyword("switch");expect("(");discriminant=parseExpression();expect(")");expect("{");cases=[];if(match("}")){lex();return delegate.createSwitchStatement(discriminant,
    cases)}oldInSwitch=state.inSwitch;state.inSwitch=true;defaultFound=false;while(index<length){if(match("}"))break;clause=parseSwitchCase();if(clause.test===null){if(defaultFound)throwError({},Messages.MultipleDefaultsInSwitch);defaultFound=true}cases.push(clause)}state.inSwitch=oldInSwitch;expect("}");return delegate.createSwitchStatement(discriminant,cases)}function parseThrowStatement(){var argument;expectKeyword("throw");if(peekLineTerminator())throwError({},Messages.NewlineAfterThrow);argument=
    parseExpression();consumeSemicolon();return delegate.createThrowStatement(argument)}function parseCatchClause(){var param,body,startToken;startToken=lookahead;expectKeyword("catch");expect("(");if(match(")"))throwUnexpected(lookahead);param=parseVariableIdentifier();if(strict&&isRestrictedWord(param.name))throwErrorTolerant({},Messages.StrictCatchVariable);expect(")");body=parseBlock();return delegate.markEnd(delegate.createCatchClause(param,body),startToken)}function parseTryStatement(){var block,
    handlers=[],finalizer=null;expectKeyword("try");block=parseBlock();if(matchKeyword("catch"))handlers.push(parseCatchClause());if(matchKeyword("finally")){lex();finalizer=parseBlock()}if(handlers.length===0&&!finalizer)throwError({},Messages.NoCatchOrFinally);return delegate.createTryStatement(block,[],handlers,finalizer)}function parseDebuggerStatement(){expectKeyword("debugger");consumeSemicolon();return delegate.createDebuggerStatement()}function parseStatement(){var type=lookahead.type,expr,labeledBody,
    key,startToken;if(type===Token.EOF)throwUnexpected(lookahead);if(type===Token.Punctuator&&lookahead.value==="{")return parseBlock();startToken=lookahead;if(type===Token.Punctuator)switch(lookahead.value){case ";":return delegate.markEnd(parseEmptyStatement(),startToken);case "(":return delegate.markEnd(parseExpressionStatement(),startToken);default:break}if(type===Token.Keyword)switch(lookahead.value){case "break":return delegate.markEnd(parseBreakStatement(),startToken);case "continue":return delegate.markEnd(parseContinueStatement(),
    startToken);case "debugger":return delegate.markEnd(parseDebuggerStatement(),startToken);case "do":return delegate.markEnd(parseDoWhileStatement(),startToken);case "for":return delegate.markEnd(parseForStatement(),startToken);case "function":return delegate.markEnd(parseFunctionDeclaration(),startToken);case "if":return delegate.markEnd(parseIfStatement(),startToken);case "return":return delegate.markEnd(parseReturnStatement(),startToken);case "switch":return delegate.markEnd(parseSwitchStatement(),
    startToken);case "throw":return delegate.markEnd(parseThrowStatement(),startToken);case "try":return delegate.markEnd(parseTryStatement(),startToken);case "var":return delegate.markEnd(parseVariableStatement(),startToken);case "while":return delegate.markEnd(parseWhileStatement(),startToken);case "with":return delegate.markEnd(parseWithStatement(),startToken);default:break}expr=parseExpression();if(expr.type===Syntax.Identifier&&match(":")){lex();key="$"+expr.name;if(Object.prototype.hasOwnProperty.call(state.labelSet,
    key))throwError({},Messages.Redeclaration,"Label",expr.name);state.labelSet[key]=true;labeledBody=parseStatement();delete state.labelSet[key];return delegate.markEnd(delegate.createLabeledStatement(expr,labeledBody),startToken)}consumeSemicolon();return delegate.markEnd(delegate.createExpressionStatement(expr),startToken)}function parseFunctionSourceElements(){var sourceElement,sourceElements=[],token,directive,firstRestricted,oldLabelSet,oldInIteration,oldInSwitch,oldInFunctionBody,startToken;startToken=
    lookahead;expect("{");while(index<length){if(lookahead.type!==Token.StringLiteral)break;token=lookahead;sourceElement=parseSourceElement();sourceElements.push(sourceElement);if(sourceElement.expression.type!==Syntax.Literal)break;directive=source.slice(token.start+1,token.end-1);if(directive==="use strict"){strict=true;if(firstRestricted)throwErrorTolerant(firstRestricted,Messages.StrictOctalLiteral)}else if(!firstRestricted&&token.octal)firstRestricted=token}oldLabelSet=state.labelSet;oldInIteration=
    state.inIteration;oldInSwitch=state.inSwitch;oldInFunctionBody=state.inFunctionBody;state.labelSet={};state.inIteration=false;state.inSwitch=false;state.inFunctionBody=true;while(index<length){if(match("}"))break;sourceElement=parseSourceElement();if(typeof sourceElement==="undefined")break;sourceElements.push(sourceElement)}expect("}");state.labelSet=oldLabelSet;state.inIteration=oldInIteration;state.inSwitch=oldInSwitch;state.inFunctionBody=oldInFunctionBody;return delegate.markEnd(delegate.createBlockStatement(sourceElements),
    startToken)}function parseParams(firstRestricted){var param,params=[],token,stricted,paramSet,key,message;expect("(");if(!match(")")){paramSet={};while(index<length){token=lookahead;param=parseVariableIdentifier();key="$"+token.value;if(strict){if(isRestrictedWord(token.value)){stricted=token;message=Messages.StrictParamName}if(Object.prototype.hasOwnProperty.call(paramSet,key)){stricted=token;message=Messages.StrictParamDupe}}else if(!firstRestricted)if(isRestrictedWord(token.value)){firstRestricted=
    token;message=Messages.StrictParamName}else if(isStrictModeReservedWord(token.value)){firstRestricted=token;message=Messages.StrictReservedWord}else if(Object.prototype.hasOwnProperty.call(paramSet,key)){firstRestricted=token;message=Messages.StrictParamDupe}params.push(param);paramSet[key]=true;if(match(")"))break;expect(",")}}expect(")");return{params:params,stricted:stricted,firstRestricted:firstRestricted,message:message}}function parseFunctionDeclaration(){var id,params=[],body,token,stricted,
    tmp,firstRestricted,message,previousStrict,startToken;startToken=lookahead;expectKeyword("function");token=lookahead;id=parseVariableIdentifier();if(strict){if(isRestrictedWord(token.value))throwErrorTolerant(token,Messages.StrictFunctionName)}else if(isRestrictedWord(token.value)){firstRestricted=token;message=Messages.StrictFunctionName}else if(isStrictModeReservedWord(token.value)){firstRestricted=token;message=Messages.StrictReservedWord}tmp=parseParams(firstRestricted);params=tmp.params;stricted=
    tmp.stricted;firstRestricted=tmp.firstRestricted;if(tmp.message)message=tmp.message;previousStrict=strict;body=parseFunctionSourceElements();if(strict&&firstRestricted)throwError(firstRestricted,message);if(strict&&stricted)throwErrorTolerant(stricted,message);strict=previousStrict;return delegate.markEnd(delegate.createFunctionDeclaration(id,params,[],body),startToken)}function parseFunctionExpression(){var token,id=null,stricted,firstRestricted,message,tmp,params=[],body,previousStrict,startToken;
    startToken=lookahead;expectKeyword("function");if(!match("(")){token=lookahead;id=parseVariableIdentifier();if(strict){if(isRestrictedWord(token.value))throwErrorTolerant(token,Messages.StrictFunctionName)}else if(isRestrictedWord(token.value)){firstRestricted=token;message=Messages.StrictFunctionName}else if(isStrictModeReservedWord(token.value)){firstRestricted=token;message=Messages.StrictReservedWord}}tmp=parseParams(firstRestricted);params=tmp.params;stricted=tmp.stricted;firstRestricted=tmp.firstRestricted;
    if(tmp.message)message=tmp.message;previousStrict=strict;body=parseFunctionSourceElements();if(strict&&firstRestricted)throwError(firstRestricted,message);if(strict&&stricted)throwErrorTolerant(stricted,message);strict=previousStrict;return delegate.markEnd(delegate.createFunctionExpression(id,params,[],body),startToken)}function parseSourceElement(){if(lookahead.type===Token.Keyword)switch(lookahead.value){case "const":case "let":return parseConstLetDeclaration(lookahead.value);case "function":return parseFunctionDeclaration();
    default:return parseStatement()}if(lookahead.type!==Token.EOF)return parseStatement()}function parseSourceElements(){var sourceElement,sourceElements=[],token,directive,firstRestricted;while(index<length){token=lookahead;if(token.type!==Token.StringLiteral)break;sourceElement=parseSourceElement();sourceElements.push(sourceElement);if(sourceElement.expression.type!==Syntax.Literal)break;directive=source.slice(token.start+1,token.end-1);if(directive==="use strict"){strict=true;if(firstRestricted)throwErrorTolerant(firstRestricted,
    Messages.StrictOctalLiteral)}else if(!firstRestricted&&token.octal)firstRestricted=token}while(index<length){sourceElement=parseSourceElement();if(typeof sourceElement==="undefined")break;sourceElements.push(sourceElement)}return sourceElements}function parseProgram(){var body,startToken;skipComment();peek();startToken=lookahead;strict=false;body=parseSourceElements();return delegate.markEnd(delegate.createProgram(body),startToken)}function filterTokenLocation(){var i,entry,token,tokens=[];for(i=
    0;i<extra.tokens.length;++i){entry=extra.tokens[i];token={type:entry.type,value:entry.value};if(extra.range)token.range=entry.range;if(extra.loc)token.loc=entry.loc;tokens.push(token)}extra.tokens=tokens}function tokenize(code,options){var toString,token,tokens;toString=String;if(typeof code!=="string"&&!(code instanceof String))code=toString(code);delegate=SyntaxTreeDelegate;source=code;index=0;lineNumber=source.length>0?1:0;lineStart=0;length=source.length;lookahead=null;state={allowIn:true,labelSet:{},
    inFunctionBody:false,inIteration:false,inSwitch:false,lastCommentStart:-1};extra={};options=options||{};options.tokens=true;extra.tokens=[];extra.tokenize=true;extra.openParenToken=-1;extra.openCurlyToken=-1;extra.range=typeof options.range==="boolean"&&options.range;extra.loc=typeof options.loc==="boolean"&&options.loc;if(typeof options.comment==="boolean"&&options.comment)extra.comments=[];if(typeof options.tolerant==="boolean"&&options.tolerant)extra.errors=[];try{peek();if(lookahead.type===Token.EOF)return extra.tokens;
    token=lex();while(lookahead.type!==Token.EOF)try{token=lex()}catch(lexError){token=lookahead;if(extra.errors){extra.errors.push(lexError);break}else throw lexError;}filterTokenLocation();tokens=extra.tokens;if(typeof extra.comments!=="undefined")tokens.comments=extra.comments;if(typeof extra.errors!=="undefined")tokens.errors=extra.errors}catch(e){throw e;}finally{extra={}}return tokens}function parse(code,options){var program,toString;toString=String;if(typeof code!=="string"&&!(code instanceof String))code=
    toString(code);delegate=SyntaxTreeDelegate;source=code;index=0;lineNumber=source.length>0?1:0;lineStart=0;length=source.length;lookahead=null;state={allowIn:true,labelSet:{},inFunctionBody:false,inIteration:false,inSwitch:false,lastCommentStart:-1};extra={};if(typeof options!=="undefined"){extra.range=typeof options.range==="boolean"&&options.range;extra.loc=typeof options.loc==="boolean"&&options.loc;extra.attachComment=typeof options.attachComment==="boolean"&&options.attachComment;if(extra.loc&&
    options.source!==null&&options.source!==undefined)extra.source=toString(options.source);if(typeof options.tokens==="boolean"&&options.tokens)extra.tokens=[];if(typeof options.comment==="boolean"&&options.comment)extra.comments=[];if(typeof options.tolerant==="boolean"&&options.tolerant)extra.errors=[];if(extra.attachComment){extra.range=true;extra.comments=[];extra.bottomRightStack=[];extra.trailingComments=[];extra.leadingComments=[]}}try{program=parseProgram();if(typeof extra.comments!=="undefined")program.comments=
    extra.comments;if(typeof extra.tokens!=="undefined"){filterTokenLocation();program.tokens=extra.tokens}if(typeof extra.errors!=="undefined")program.errors=extra.errors}catch(e){throw e;}finally{extra={}}return program}exports.version="1.2.2";exports.tokenize=tokenize;exports.parse=parse;exports.Syntax=function(){var name,types={};if(typeof Object.create==="function")types=Object.create(null);for(name in Syntax)if(Syntax.hasOwnProperty(name))types[name]=Syntax[name];if(typeof Object.freeze==="function")Object.freeze(types);
    return types}()})},{}],1:[function(require,module,exports){(function(process){var parser=function(){var parser={trace:function trace(){},yy:{},symbols_:{"error":2,"JSON_PATH":3,"DOLLAR":4,"PATH_COMPONENTS":5,"LEADING_CHILD_MEMBER_EXPRESSION":6,"PATH_COMPONENT":7,"MEMBER_COMPONENT":8,"SUBSCRIPT_COMPONENT":9,"CHILD_MEMBER_COMPONENT":10,"DESCENDANT_MEMBER_COMPONENT":11,"DOT":12,"MEMBER_EXPRESSION":13,"DOT_DOT":14,"STAR":15,"IDENTIFIER":16,"SCRIPT_EXPRESSION":17,"INTEGER":18,"END":19,"CHILD_SUBSCRIPT_COMPONENT":20,
    "DESCENDANT_SUBSCRIPT_COMPONENT":21,"[":22,"SUBSCRIPT":23,"]":24,"SUBSCRIPT_EXPRESSION":25,"SUBSCRIPT_EXPRESSION_LIST":26,"SUBSCRIPT_EXPRESSION_LISTABLE":27,",":28,"STRING_LITERAL":29,"ARRAY_SLICE":30,"FILTER_EXPRESSION":31,"QQ_STRING":32,"Q_STRING":33,"$accept":0,"$end":1},terminals_:{2:"error",4:"DOLLAR",12:"DOT",14:"DOT_DOT",15:"STAR",16:"IDENTIFIER",17:"SCRIPT_EXPRESSION",18:"INTEGER",19:"END",22:"[",24:"]",28:",",30:"ARRAY_SLICE",31:"FILTER_EXPRESSION",32:"QQ_STRING",33:"Q_STRING"},productions_:[0,
    [3,1],[3,2],[3,1],[3,2],[5,1],[5,2],[7,1],[7,1],[8,1],[8,1],[10,2],[6,1],[11,2],[13,1],[13,1],[13,1],[13,1],[13,1],[9,1],[9,1],[20,3],[21,4],[23,1],[23,1],[26,1],[26,3],[27,1],[27,1],[27,1],[25,1],[25,1],[25,1],[29,1],[29,1]],performAction:function anonymous(yytext,yyleng,yylineno,yy,yystate,$$,_$){if(!yy.ast){yy.ast=_ast;_ast.initialize()}var $0=$$.length-1;switch(yystate){case 1:yy.ast.set({expression:{type:"root",value:$$[$0]}});yy.ast.unshift();return yy.ast.yield();break;case 2:yy.ast.set({expression:{type:"root",
    value:$$[$0-1]}});yy.ast.unshift();return yy.ast.yield();break;case 3:yy.ast.unshift();return yy.ast.yield();break;case 4:yy.ast.set({operation:"member",scope:"child",expression:{type:"identifier",value:$$[$0-1]}});yy.ast.unshift();return yy.ast.yield();break;case 5:break;case 6:break;case 7:yy.ast.set({operation:"member"});yy.ast.push();break;case 8:yy.ast.set({operation:"subscript"});yy.ast.push();break;case 9:yy.ast.set({scope:"child"});break;case 10:yy.ast.set({scope:"descendant"});break;case 11:break;
    case 12:yy.ast.set({scope:"child",operation:"member"});break;case 13:break;case 14:yy.ast.set({expression:{type:"wildcard",value:$$[$0]}});break;case 15:yy.ast.set({expression:{type:"identifier",value:$$[$0]}});break;case 16:yy.ast.set({expression:{type:"script_expression",value:$$[$0]}});break;case 17:yy.ast.set({expression:{type:"numeric_literal",value:parseInt($$[$0])}});break;case 18:break;case 19:yy.ast.set({scope:"child"});break;case 20:yy.ast.set({scope:"descendant"});break;case 21:break;case 22:break;
    case 23:break;case 24:$$[$0].length>1?yy.ast.set({expression:{type:"union",value:$$[$0]}}):this.$=$$[$0];break;case 25:this.$=[$$[$0]];break;case 26:this.$=$$[$0-2].concat($$[$0]);break;case 27:this.$={expression:{type:"numeric_literal",value:parseInt($$[$0])}};yy.ast.set(this.$);break;case 28:this.$={expression:{type:"string_literal",value:$$[$0]}};yy.ast.set(this.$);break;case 29:this.$={expression:{type:"slice",value:$$[$0]}};yy.ast.set(this.$);break;case 30:this.$={expression:{type:"wildcard",
    value:$$[$0]}};yy.ast.set(this.$);break;case 31:this.$={expression:{type:"script_expression",value:$$[$0]}};yy.ast.set(this.$);break;case 32:this.$={expression:{type:"filter_expression",value:$$[$0]}};yy.ast.set(this.$);break;case 33:this.$=$$[$0];break;case 34:this.$=$$[$0];break}},table:[{3:1,4:[1,2],6:3,13:4,15:[1,5],16:[1,6],17:[1,7],18:[1,8],19:[1,9]},{1:[3]},{1:[2,1],5:10,7:11,8:12,9:13,10:14,11:15,12:[1,18],14:[1,19],20:16,21:17,22:[1,20]},{1:[2,3],5:21,7:11,8:12,9:13,10:14,11:15,12:[1,18],
    14:[1,19],20:16,21:17,22:[1,20]},{1:[2,12],12:[2,12],14:[2,12],22:[2,12]},{1:[2,14],12:[2,14],14:[2,14],22:[2,14]},{1:[2,15],12:[2,15],14:[2,15],22:[2,15]},{1:[2,16],12:[2,16],14:[2,16],22:[2,16]},{1:[2,17],12:[2,17],14:[2,17],22:[2,17]},{1:[2,18],12:[2,18],14:[2,18],22:[2,18]},{1:[2,2],7:22,8:12,9:13,10:14,11:15,12:[1,18],14:[1,19],20:16,21:17,22:[1,20]},{1:[2,5],12:[2,5],14:[2,5],22:[2,5]},{1:[2,7],12:[2,7],14:[2,7],22:[2,7]},{1:[2,8],12:[2,8],14:[2,8],22:[2,8]},{1:[2,9],12:[2,9],14:[2,9],22:[2,
    9]},{1:[2,10],12:[2,10],14:[2,10],22:[2,10]},{1:[2,19],12:[2,19],14:[2,19],22:[2,19]},{1:[2,20],12:[2,20],14:[2,20],22:[2,20]},{13:23,15:[1,5],16:[1,6],17:[1,7],18:[1,8],19:[1,9]},{13:24,15:[1,5],16:[1,6],17:[1,7],18:[1,8],19:[1,9],22:[1,25]},{15:[1,29],17:[1,30],18:[1,33],23:26,25:27,26:28,27:32,29:34,30:[1,35],31:[1,31],32:[1,36],33:[1,37]},{1:[2,4],7:22,8:12,9:13,10:14,11:15,12:[1,18],14:[1,19],20:16,21:17,22:[1,20]},{1:[2,6],12:[2,6],14:[2,6],22:[2,6]},{1:[2,11],12:[2,11],14:[2,11],22:[2,11]},
    {1:[2,13],12:[2,13],14:[2,13],22:[2,13]},{15:[1,29],17:[1,30],18:[1,33],23:38,25:27,26:28,27:32,29:34,30:[1,35],31:[1,31],32:[1,36],33:[1,37]},{24:[1,39]},{24:[2,23]},{24:[2,24],28:[1,40]},{24:[2,30]},{24:[2,31]},{24:[2,32]},{24:[2,25],28:[2,25]},{24:[2,27],28:[2,27]},{24:[2,28],28:[2,28]},{24:[2,29],28:[2,29]},{24:[2,33],28:[2,33]},{24:[2,34],28:[2,34]},{24:[1,41]},{1:[2,21],12:[2,21],14:[2,21],22:[2,21]},{18:[1,33],27:42,29:34,30:[1,35],32:[1,36],33:[1,37]},{1:[2,22],12:[2,22],14:[2,22],22:[2,22]},
    {24:[2,26],28:[2,26]}],defaultActions:{27:[2,23],29:[2,30],30:[2,31],31:[2,32]},parseError:function parseError(str,hash){if(hash.recoverable)this.trace(str);else throw new Error(str);},parse:function parse(input){var self=this,stack=[0],vstack=[null],lstack=[],table=this.table,yytext="",yylineno=0,yyleng=0,TERROR=2,EOF=1;var args=lstack.slice.call(arguments,1);this.lexer.setInput(input);this.lexer.yy=this.yy;this.yy.lexer=this.lexer;this.yy.parser=this;if(typeof this.lexer.yylloc=="undefined")this.lexer.yylloc=
    {};var yyloc=this.lexer.yylloc;lstack.push(yyloc);var ranges=this.lexer.options&&this.lexer.options.ranges;if(typeof this.yy.parseError==="function")this.parseError=this.yy.parseError;else this.parseError=Object.getPrototypeOf(this).parseError;function lex(){var token;token=self.lexer.lex()||EOF;if(typeof token!=="number")token=self.symbols_[token]||token;return token}var symbol,preErrorSymbol,state,action,r,yyval={},p,len,newState,expected;while(true){state=stack[stack.length-1];if(this.defaultActions[state])action=
    this.defaultActions[state];else{if(symbol===null||typeof symbol=="undefined")symbol=lex();action=table[state]&&table[state][symbol]}if(typeof action==="undefined"||!action.length||!action[0]){var errStr="";expected=[];for(p in table[state])if(this.terminals_[p]&&p>TERROR)expected.push("'"+this.terminals_[p]+"'");if(this.lexer.showPosition)errStr="Parse error on line "+(yylineno+1)+":\n"+this.lexer.showPosition()+"\nExpecting "+expected.join(", ")+", got '"+(this.terminals_[symbol]||symbol)+"'";else errStr=
    "Parse error on line "+(yylineno+1)+": Unexpected "+(symbol==EOF?"end of input":"'"+(this.terminals_[symbol]||symbol)+"'");this.parseError(errStr,{text:this.lexer.match,token:this.terminals_[symbol]||symbol,line:this.lexer.yylineno,loc:yyloc,expected:expected})}if(action[0]instanceof Array&&action.length>1)throw new Error("Parse Error: multiple actions possible at state: "+state+", token: "+symbol);switch(action[0]){case 1:stack.push(symbol);vstack.push(this.lexer.yytext);lstack.push(this.lexer.yylloc);
    stack.push(action[1]);symbol=null;if(!preErrorSymbol){yyleng=this.lexer.yyleng;yytext=this.lexer.yytext;yylineno=this.lexer.yylineno;yyloc=this.lexer.yylloc}else{symbol=preErrorSymbol;preErrorSymbol=null}break;case 2:len=this.productions_[action[1]][1];yyval.$=vstack[vstack.length-len];yyval._$={first_line:lstack[lstack.length-(len||1)].first_line,last_line:lstack[lstack.length-1].last_line,first_column:lstack[lstack.length-(len||1)].first_column,last_column:lstack[lstack.length-1].last_column};if(ranges)yyval._$.range=
    [lstack[lstack.length-(len||1)].range[0],lstack[lstack.length-1].range[1]];r=this.performAction.apply(yyval,[yytext,yyleng,yylineno,this.yy,action[1],vstack,lstack].concat(args));if(typeof r!=="undefined")return r;if(len){stack=stack.slice(0,-1*len*2);vstack=vstack.slice(0,-1*len);lstack=lstack.slice(0,-1*len)}stack.push(this.productions_[action[1]][0]);vstack.push(yyval.$);lstack.push(yyval._$);newState=table[stack[stack.length-2]][stack[stack.length-1]];stack.push(newState);break;case 3:return true}}return true}};
    var _ast={initialize:function(){this._nodes=[];this._node={};this._stash=[]},set:function(props){for(var k in props)this._node[k]=props[k];return this._node},node:function(obj){if(arguments.length)this._node=obj;return this._node},push:function(){this._nodes.push(this._node);this._node={}},unshift:function(){this._nodes.unshift(this._node);this._node={}},yield:function(){var _nodes=this._nodes;this.initialize();return _nodes}};var lexer=function(){var lexer={EOF:1,parseError:function parseError(str,
    hash){if(this.yy.parser)this.yy.parser.parseError(str,hash);else throw new Error(str);},setInput:function(input){this._input=input;this._more=this._backtrack=this.done=false;this.yylineno=this.yyleng=0;this.yytext=this.matched=this.match="";this.conditionStack=["INITIAL"];this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0};if(this.options.ranges)this.yylloc.range=[0,0];this.offset=0;return this},input:function(){var ch=this._input[0];this.yytext+=ch;this.yyleng++;this.offset++;this.match+=
    ch;this.matched+=ch;var lines=ch.match(/(?:\r\n?|\n).*/g);if(lines){this.yylineno++;this.yylloc.last_line++}else this.yylloc.last_column++;if(this.options.ranges)this.yylloc.range[1]++;this._input=this._input.slice(1);return ch},unput:function(ch){var len=ch.length;var lines=ch.split(/(?:\r\n?|\n)/g);this._input=ch+this._input;this.yytext=this.yytext.substr(0,this.yytext.length-len-1);this.offset-=len;var oldLines=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-
    1);this.matched=this.matched.substr(0,this.matched.length-1);if(lines.length-1)this.yylineno-=lines.length-1;var r=this.yylloc.range;this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:lines?(lines.length===oldLines.length?this.yylloc.first_column:0)+oldLines[oldLines.length-lines.length].length-lines[0].length:this.yylloc.first_column-len};if(this.options.ranges)this.yylloc.range=[r[0],r[0]+this.yyleng-len];this.yyleng=this.yytext.length;
    return this},more:function(){this._more=true;return this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=true;else return this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer \x3d true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(n){this.unput(this.match.slice(n))},pastInput:function(){var past=this.matched.substr(0,
    this.matched.length-this.match.length);return(past.length>20?"...":"")+past.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var next=this.match;if(next.length<20)next+=this._input.substr(0,20-next.length);return(next.substr(0,20)+(next.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var pre=this.pastInput();var c=(new Array(pre.length+1)).join("-");return pre+this.upcomingInput()+"\n"+c+"^"},test_match:function(match,indexed_rule){var token,lines,backup;if(this.options.backtrack_lexer){backup=
    {yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done};if(this.options.ranges)backup.yylloc.range=this.yylloc.range.slice(0)}lines=match[0].match(/(?:\r\n?|\n).*/g);if(lines)this.yylineno+=
    lines.length;this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:lines?lines[lines.length-1].length-lines[lines.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+match[0].length};this.yytext+=match[0];this.match+=match[0];this.matches=match;this.yyleng=this.yytext.length;if(this.options.ranges)this.yylloc.range=[this.offset,this.offset+=this.yyleng];this._more=false;this._backtrack=false;this._input=this._input.slice(match[0].length);
    this.matched+=match[0];token=this.performAction.call(this,this.yy,this,indexed_rule,this.conditionStack[this.conditionStack.length-1]);if(this.done&&this._input)this.done=false;if(token)return token;else if(this._backtrack){for(var k in backup)this[k]=backup[k];return false}return false},next:function(){if(this.done)return this.EOF;if(!this._input)this.done=true;var token,match,tempMatch,index;if(!this._more){this.yytext="";this.match=""}var rules=this._currentRules();for(var i=0;i<rules.length;i++){tempMatch=
    this._input.match(this.rules[rules[i]]);if(tempMatch&&(!match||tempMatch[0].length>match[0].length)){match=tempMatch;index=i;if(this.options.backtrack_lexer){token=this.test_match(tempMatch,rules[i]);if(token!==false)return token;else if(this._backtrack){match=false;continue}else return false}else if(!this.options.flex)break}}if(match){token=this.test_match(match,rules[index]);if(token!==false)return token;return false}if(this._input==="")return this.EOF;else return this.parseError("Lexical error on line "+
    (this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function lex(){var r=this.next();if(r)return r;else return this.lex()},begin:function begin(condition){this.conditionStack.push(condition)},popState:function popState(){var n=this.conditionStack.length-1;if(n>0)return this.conditionStack.pop();else return this.conditionStack[0]},_currentRules:function _currentRules(){if(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-
    1])return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules;else return this.conditions["INITIAL"].rules},topState:function topState(n){n=this.conditionStack.length-1-Math.abs(n||0);if(n>=0)return this.conditionStack[n];else return"INITIAL"},pushState:function pushState(condition){this.begin(condition)},stateStackSize:function stateStackSize(){return this.conditionStack.length},options:{},performAction:function anonymous(yy,yy_,$avoiding_name_collisions,YY_START){switch($avoiding_name_collisions){case 0:return 4;
    break;case 1:return 14;break;case 2:return 12;break;case 3:return 15;break;case 4:return 16;break;case 5:return 22;break;case 6:return 24;break;case 7:return 28;break;case 8:return 30;break;case 9:return 18;break;case 10:yy_.yytext=yy_.yytext.substr(1,yy_.yyleng-2);return 32;break;case 11:yy_.yytext=yy_.yytext.substr(1,yy_.yyleng-2);return 33;break;case 12:return 17;break;case 13:return 31;break}},rules:[/^(?:\$)/,/^(?:\.\.)/,/^(?:\.)/,/^(?:\*)/,/^(?:[a-zA-Z_]+[a-zA-Z0-9_]*)/,/^(?:\[)/,/^(?:\])/,
    /^(?:,)/,/^(?:((-?(?:0|[1-9][0-9]*)))?:((-?(?:0|[1-9][0-9]*)))?(:((-?(?:0|[1-9][0-9]*)))?)?)/,/^(?:(-?(?:0|[1-9][0-9]*)))/,/^(?:"(?:\\["bfnrt/\\]|\\u[a-fA-F0-9]{4}|[^"\\])*")/,/^(?:'(?:\\['bfnrt/\\]|\\u[a-fA-F0-9]{4}|[^'\\])*')/,/^(?:\(.+?\)(?=\]))/,/^(?:\?\(.+?\)(?=\]))/],conditions:{"INITIAL":{"rules":[0,1,2,3,4,5,6,7,8,9,10,11,12,13],"inclusive":true}}};return lexer}();parser.lexer=lexer;function Parser(){this.yy={}}Parser.prototype=parser;parser.Parser=Parser;return new Parser}();if(typeof require!==
    "undefined"&&typeof exports!=="undefined"){exports.parser=parser;exports.Parser=parser.Parser;exports.parse=function(){return parser.parse.apply(parser,arguments)};exports.main=function commonjsMain(args){if(!args[1]){console.log("Usage: "+args[0]+" FILE");process.exit(1)}var source=require("fs").readFileSync(require("path").normalize(args[1]),"utf8");return exports.parser.parse(source)};if(typeof module!=="undefined"&&require.main===module)exports.main(process.argv.slice(1))}}).call(this,require("_process"))},
    {"_process":12,"fs":8,"path":11}],2:[function(require,module,exports){module.exports={identifier:"[a-zA-Z_]+[a-zA-Z0-9_]*",integer:"-?(?:0|[1-9][0-9]*)",qq_string:'"(?:\\\\["bfnrt/\\\\]|\\\\u[a-fA-F0-9]{4}|[^"\\\\])*"',q_string:"'(?:\\\\['bfnrt/\\\\]|\\\\u[a-fA-F0-9]{4}|[^'\\\\])*'"}},{}],3:[function(require,module,exports){var dict=require("./dict");var fs=require("fs");var grammar={lex:{macros:{esc:"\\\\",int:dict.integer},rules:[["\\$","return 'DOLLAR'"],["\\.\\.","return 'DOT_DOT'"],["\\.","return 'DOT'"],
    ["\\*","return 'STAR'"],[dict.identifier,"return 'IDENTIFIER'"],["\\[","return '['"],["\\]","return ']'"],[",","return ','"],["({int})?\\:({int})?(\\:({int})?)?","return 'ARRAY_SLICE'"],["{int}","return 'INTEGER'"],[dict.qq_string,"yytext \x3d yytext.substr(1,yyleng-2); return 'QQ_STRING';"],[dict.q_string,"yytext \x3d yytext.substr(1,yyleng-2); return 'Q_STRING';"],["\\(.+?\\)(?\x3d\\])","return 'SCRIPT_EXPRESSION'"],["\\?\\(.+?\\)(?\x3d\\])","return 'FILTER_EXPRESSION'"]]},start:"JSON_PATH",bnf:{JSON_PATH:[["DOLLAR",
    'yy.ast.set({ expression: { type: "root", value: $1 } }); yy.ast.unshift(); return yy.ast.yield()'],["DOLLAR PATH_COMPONENTS",'yy.ast.set({ expression: { type: "root", value: $1 } }); yy.ast.unshift(); return yy.ast.yield()'],["LEADING_CHILD_MEMBER_EXPRESSION","yy.ast.unshift(); return yy.ast.yield()"],["LEADING_CHILD_MEMBER_EXPRESSION PATH_COMPONENTS",'yy.ast.set({ operation: "member", scope: "child", expression: { type: "identifier", value: $1 }}); yy.ast.unshift(); return yy.ast.yield()']],PATH_COMPONENTS:[["PATH_COMPONENT",
    ""],["PATH_COMPONENTS PATH_COMPONENT",""]],PATH_COMPONENT:[["MEMBER_COMPONENT",'yy.ast.set({ operation: "member" }); yy.ast.push()'],["SUBSCRIPT_COMPONENT",'yy.ast.set({ operation: "subscript" }); yy.ast.push() ']],MEMBER_COMPONENT:[["CHILD_MEMBER_COMPONENT",'yy.ast.set({ scope: "child" })'],["DESCENDANT_MEMBER_COMPONENT",'yy.ast.set({ scope: "descendant" })']],CHILD_MEMBER_COMPONENT:[["DOT MEMBER_EXPRESSION",""]],LEADING_CHILD_MEMBER_EXPRESSION:[["MEMBER_EXPRESSION",'yy.ast.set({ scope: "child", operation: "member" })']],
    DESCENDANT_MEMBER_COMPONENT:[["DOT_DOT MEMBER_EXPRESSION",""]],MEMBER_EXPRESSION:[["STAR",'yy.ast.set({ expression: { type: "wildcard", value: $1 } })'],["IDENTIFIER",'yy.ast.set({ expression: { type: "identifier", value: $1 } })'],["SCRIPT_EXPRESSION",'yy.ast.set({ expression: { type: "script_expression", value: $1 } })'],["INTEGER",'yy.ast.set({ expression: { type: "numeric_literal", value: parseInt($1) } })'],["END",""]],SUBSCRIPT_COMPONENT:[["CHILD_SUBSCRIPT_COMPONENT",'yy.ast.set({ scope: "child" })'],
    ["DESCENDANT_SUBSCRIPT_COMPONENT",'yy.ast.set({ scope: "descendant" })']],CHILD_SUBSCRIPT_COMPONENT:[["[ SUBSCRIPT ]",""]],DESCENDANT_SUBSCRIPT_COMPONENT:[["DOT_DOT [ SUBSCRIPT ]",""]],SUBSCRIPT:[["SUBSCRIPT_EXPRESSION",""],["SUBSCRIPT_EXPRESSION_LIST",'$1.length \x3e 1? yy.ast.set({ expression: { type: "union", value: $1 } }) : $$ \x3d $1']],SUBSCRIPT_EXPRESSION_LIST:[["SUBSCRIPT_EXPRESSION_LISTABLE","$$ \x3d [$1]"],["SUBSCRIPT_EXPRESSION_LIST , SUBSCRIPT_EXPRESSION_LISTABLE","$$ \x3d $1.concat($3)"]],
    SUBSCRIPT_EXPRESSION_LISTABLE:[["INTEGER",'$$ \x3d { expression: { type: "numeric_literal", value: parseInt($1) } }; yy.ast.set($$)'],["STRING_LITERAL",'$$ \x3d { expression: { type: "string_literal", value: $1 } }; yy.ast.set($$)'],["ARRAY_SLICE",'$$ \x3d { expression: { type: "slice", value: $1 } }; yy.ast.set($$)']],SUBSCRIPT_EXPRESSION:[["STAR",'$$ \x3d { expression: { type: "wildcard", value: $1 } }; yy.ast.set($$)'],["SCRIPT_EXPRESSION",'$$ \x3d { expression: { type: "script_expression", value: $1 } }; yy.ast.set($$)'],
    ["FILTER_EXPRESSION",'$$ \x3d { expression: { type: "filter_expression", value: $1 } }; yy.ast.set($$)']],STRING_LITERAL:[["QQ_STRING","$$ \x3d $1"],["Q_STRING","$$ \x3d $1"]]}};if(fs.readFileSync){grammar.moduleInclude=fs.readFileSync(require.resolve("../include/module.js"));grammar.actionInclude=fs.readFileSync(require.resolve("../include/action.js"))}module.exports=grammar},{"./dict":2,"fs":8}],4:[function(require,module,exports){var aesprim=require("./aesprim");var slice=require("./slice");var _evaluate=
    require("static-eval");var _uniq=require("underscore").uniq;var Handlers=function(){return this.initialize.apply(this,arguments)};Handlers.prototype.initialize=function(){this.traverse=traverser(true);this.descend=traverser()};Handlers.prototype.keys=Object.keys;Handlers.prototype.resolve=function(component){var key=[component.operation,component.scope,component.expression.type].join("-");var method=this._fns[key];if(!method)throw new Error("couldn't resolve key: "+key);return method.bind(this)};
    Handlers.prototype.register=function(key,handler){if(!handler instanceof Function)throw new Error("handler must be a function");this._fns[key]=handler};Handlers.prototype._fns={"member-child-identifier":function(component,partial){var key=component.expression.value;var value=partial.value;if(value instanceof Object&&key in value)return[{value:value[key],path:partial.path.concat(key)}]},"member-descendant-identifier":_traverse(function(key,value,ref){return key==ref}),"subscript-child-numeric_literal":_descend(function(key,
    value,ref){return key===ref}),"member-child-numeric_literal":_descend(function(key,value,ref){return String(key)===String(ref)}),"subscript-descendant-numeric_literal":_traverse(function(key,value,ref){return key===ref}),"member-child-wildcard":_descend(function(){return true}),"member-descendant-wildcard":_traverse(function(){return true}),"subscript-descendant-wildcard":_traverse(function(){return true}),"subscript-child-wildcard":_descend(function(){return true}),"subscript-child-slice":function(component,
    partial){if(is_array(partial.value)){var args=component.expression.value.split(":").map(_parse_nullable_int);var values=partial.value.map(function(v,i){return{value:v,path:partial.path.concat(i)}});return slice.apply(null,[values].concat(args))}},"subscript-child-union":function(component,partial){var results=[];component.expression.value.forEach(function(component){var _component={operation:"subscript",scope:"child",expression:component.expression};var handler=this.resolve(_component);var _results=
    handler(_component,partial);if(_results)results=results.concat(_results)},this);return unique(results)},"subscript-descendant-union":function(component,partial,count){var jp=require("..");var self=this;var results=[];var nodes=jp.nodes(partial,"$..*").slice(1);nodes.forEach(function(node){if(results.length>=count)return;component.expression.value.forEach(function(component){var _component={operation:"subscript",scope:"child",expression:component.expression};var handler=self.resolve(_component);var _results=
    handler(_component,node);results=results.concat(_results)})});return unique(results)},"subscript-child-filter_expression":function(component,partial,count){var src=component.expression.value.slice(2,-1);var ast=aesprim.parse(src).body[0].expression;var passable=function(key,value){return evaluate(ast,{"@":value})};return this.descend(partial,null,passable,count)},"subscript-descendant-filter_expression":function(component,partial,count){var src=component.expression.value.slice(2,-1);var ast=aesprim.parse(src).body[0].expression;
    var passable=function(key,value){return evaluate(ast,{"@":value})};return this.traverse(partial,null,passable,count)},"subscript-child-script_expression":function(component,partial){var exp=component.expression.value.slice(1,-1);return eval_recurse(partial,exp,"$[{{value}}]")},"member-child-script_expression":function(component,partial){var exp=component.expression.value.slice(1,-1);return eval_recurse(partial,exp,"$.{{value}}")},"member-descendant-script_expression":function(component,partial){var exp=
    component.expression.value.slice(1,-1);return eval_recurse(partial,exp,"$..value")}};Handlers.prototype._fns["subscript-child-string_literal"]=Handlers.prototype._fns["member-child-identifier"];Handlers.prototype._fns["member-descendant-numeric_literal"]=Handlers.prototype._fns["subscript-descendant-string_literal"]=Handlers.prototype._fns["member-descendant-identifier"];function eval_recurse(partial,src,template){var jp=require("./index");var ast=aesprim.parse(src).body[0].expression;var value=evaluate(ast,
    {"@":partial.value});var path=template.replace(/\{\{\s*value\s*\}\}/g,value);var results=jp.nodes(partial.value,path);results.forEach(function(r){r.path=partial.path.concat(r.path.slice(1))});return results}function is_array(val){return Array.isArray(val)}function is_object(val){return val&&!(val instanceof Array)&&val instanceof Object}function traverser(recurse){return function(partial,ref,passable,count){var value=partial.value;var path=partial.path;var results=[];var descend=function(value,path){if(is_array(value)){value.forEach(function(element,
    index){if(results.length>=count)return;if(passable(index,element,ref))results.push({path:path.concat(index),value:element})});value.forEach(function(element,index){if(results.length>=count)return;if(recurse)descend(element,path.concat(index))})}else if(is_object(value)){this.keys(value).forEach(function(k){if(results.length>=count)return;if(passable(k,value[k],ref))results.push({path:path.concat(k),value:value[k]})});this.keys(value).forEach(function(k){if(results.length>=count)return;if(recurse)descend(value[k],
    path.concat(k))})}}.bind(this);descend(value,path);return results}}function _descend(passable){return function(component,partial,count){return this.descend(partial,component.expression.value,passable,count)}}function _traverse(passable){return function(component,partial,count){return this.traverse(partial,component.expression.value,passable,count)}}function evaluate(){try{return _evaluate.apply(this,arguments)}catch(e){}}function unique(results){results=results.filter(function(d){return d});return _uniq(results,
    function(r){return r.path.map(function(c){return String(c).replace("-","--")}).join("-")})}function _parse_nullable_int(val){var sval=String(val);return sval.match(/^-?[0-9]+$/)?parseInt(sval):null}module.exports=Handlers},{"..":"jsonpath","./aesprim":"./aesprim","./index":5,"./slice":7,"static-eval":15,"underscore":8}],5:[function(require,module,exports){var assert=require("assert");var dict=require("./dict");var Parser=require("./parser");var Handlers=require("./handlers");var JSONPath=function(){this.initialize.apply(this,
    arguments)};JSONPath.prototype.initialize=function(){this.parser=new Parser;this.handlers=new Handlers};JSONPath.prototype.parse=function(string){assert.ok(_is_string(string),"we need a path");return this.parser.parse(string)};JSONPath.prototype.parent=function(obj,string){assert.ok(obj instanceof Object,"obj needs to be an object");assert.ok(string,"we need a path");var node=this.nodes(obj,string)[0];var key=node.path.pop();return this.value(obj,node.path)};JSONPath.prototype.apply=function(obj,
    string,fn){assert.ok(obj instanceof Object,"obj needs to be an object");assert.ok(string,"we need a path");assert.equal(typeof fn,"function","fn needs to be function");var nodes=this.nodes(obj,string).sort(function(a,b){return b.path.length-a.path.length});nodes.forEach(function(node){var key=node.path.pop();var parent=this.value(obj,this.stringify(node.path));var val=node.value=fn.call(obj,parent[key]);parent[key]=val},this);return nodes};JSONPath.prototype.value=function(obj,path,value){assert.ok(obj instanceof
    Object,"obj needs to be an object");assert.ok(path,"we need a path");if(arguments.length>=3){var node=this.nodes(obj,path).shift();if(!node)return this._vivify(obj,path,value);var key=node.path.slice(-1).shift();var parent=this.parent(obj,this.stringify(node.path));parent[key]=value}return this.query(obj,this.stringify(path),1).shift()};JSONPath.prototype._vivify=function(obj,string,value){var self=this;assert.ok(obj instanceof Object,"obj needs to be an object");assert.ok(string,"we need a path");
    var path=this.parser.parse(string).map(function(component){return component.expression.value});var setValue=function(path,value){var key=path.pop();var node=self.value(obj,path);if(!node){setValue(path.concat(),typeof key==="string"?{}:[]);node=self.value(obj,path)}node[key]=value};setValue(path,value);return this.query(obj,string)[0]};JSONPath.prototype.query=function(obj,string,count){assert.ok(obj instanceof Object,"obj needs to be an object");assert.ok(_is_string(string),"we need a path");var results=
    this.nodes(obj,string,count).map(function(r){return r.value});return results};JSONPath.prototype.paths=function(obj,string,count){assert.ok(obj instanceof Object,"obj needs to be an object");assert.ok(string,"we need a path");var results=this.nodes(obj,string,count).map(function(r){return r.path});return results};JSONPath.prototype.nodes=function(obj,string,count){assert.ok(obj instanceof Object,"obj needs to be an object");assert.ok(string,"we need a path");if(count===0)return[];var path=this.parser.parse(string);
    var handlers=this.handlers;var partials=[{path:["$"],value:obj}];var matches=[];if(path.length&&path[0].expression.type=="root")path.shift();if(!path.length)return partials;path.forEach(function(component,index){if(matches.length>=count)return;var handler=handlers.resolve(component);var _partials=[];partials.forEach(function(p){if(matches.length>=count)return;var results=handler(component,p,count);if(index==path.length-1)matches=matches.concat(results||[]);else _partials=_partials.concat(results||
    [])});partials=_partials});return count?matches.slice(0,count):matches};JSONPath.prototype.stringify=function(path){assert.ok(path,"we need a path");var string="$";var templates={"descendant-member":"..{{value}}","child-member":".{{value}}","descendant-subscript":"..[{{value}}]","child-subscript":"[{{value}}]"};path=this._normalize(path);path.forEach(function(component){if(component.expression.type=="root")return;var key=[component.scope,component.operation].join("-");var template=templates[key];
    var value;if(component.expression.type=="string_literal")value=JSON.stringify(component.expression.value);else value=component.expression.value;if(!template)throw new Error("couldn't find template "+key);string+=template.replace(/{{value}}/,value)});return string};JSONPath.prototype._normalize=function(path){assert.ok(path,"we need a path");if(typeof path=="string")return this.parser.parse(path);else if(Array.isArray(path)&&typeof path[0]=="string"){var _path=[{expression:{type:"root",value:"$"}}];
    path.forEach(function(component,index){if(component=="$"&&index===0)return;if(typeof component=="string"&&component.match("^"+dict.identifier+"$"))_path.push({operation:"member",scope:"child",expression:{value:component,type:"identifier"}});else{var type=typeof component=="number"?"numeric_literal":"string_literal";_path.push({operation:"subscript",scope:"child",expression:{value:component,type:type}})}});return _path}else if(Array.isArray(path)&&typeof path[0]=="object")return path;throw new Error("couldn't understand path "+
    path);};function _is_string(obj){return Object.prototype.toString.call(obj)=="[object String]"}JSONPath.Handlers=Handlers;JSONPath.Parser=Parser;var instance=new JSONPath;instance.JSONPath=JSONPath;module.exports=instance},{"./dict":2,"./handlers":4,"./parser":6,"assert":9}],6:[function(require,module,exports){var grammar=require("./grammar");var gparser=require("../generated/parser");var Parser=function(){var parser=new gparser.Parser;var _parseError=parser.parseError;parser.yy.parseError=function(){if(parser.yy.ast)parser.yy.ast.initialize();
    _parseError.apply(parser,arguments)};return parser};Parser.grammar=grammar;module.exports=Parser},{"../generated/parser":1,"./grammar":3}],7:[function(require,module,exports){module.exports=function(arr,start,end,step){if(typeof start=="string")throw new Error("start cannot be a string");if(typeof end=="string")throw new Error("end cannot be a string");if(typeof step=="string")throw new Error("step cannot be a string");var len=arr.length;if(step===0)throw new Error("step cannot be zero");step=step?
    integer(step):1;start=start<0?len+start:start;end=end<0?len+end:end;start=integer(start===0?0:!start?step>0?0:len-1:start);end=integer(end===0?0:!end?step>0?len:-1:end);start=step>0?Math.max(0,start):Math.min(len,start);end=step>0?Math.min(end,len):Math.max(-1,end);if(step>0&&end<=start)return[];if(step<0&&start<=end)return[];var result=[];for(var i=start;i!=end;i+=step){if(step<0&&i<=end||step>0&&i>=end)break;result.push(arr[i])}return result};function integer(val){return String(val).match(/^[0-9]+$/)?
    parseInt(val):Number.isFinite(val)?parseInt(val,10):0}},{}],8:[function(require,module,exports){},{}],9:[function(require,module,exports){var util=require("util/");var pSlice=Array.prototype.slice;var hasOwn=Object.prototype.hasOwnProperty;var assert=module.exports=ok;assert.AssertionError=function AssertionError(options){this.name="AssertionError";this.actual=options.actual;this.expected=options.expected;this.operator=options.operator;if(options.message){this.message=options.message;this.generatedMessage=
    false}else{this.message=getMessage(this);this.generatedMessage=true}var stackStartFunction=options.stackStartFunction||fail;if(Error.captureStackTrace)Error.captureStackTrace(this,stackStartFunction);else{var err=new Error;if(err.stack){var out=err.stack;var fn_name=stackStartFunction.name;var idx=out.indexOf("\n"+fn_name);if(idx>=0){var next_line=out.indexOf("\n",idx+1);out=out.substring(next_line+1)}this.stack=out}}};util.inherits(assert.AssertionError,Error);function replacer(key,value){if(util.isUndefined(value))return""+
    value;if(util.isNumber(value)&&!isFinite(value))return value.toString();if(util.isFunction(value)||util.isRegExp(value))return value.toString();return value}function truncate(s,n){if(util.isString(s))return s.length<n?s:s.slice(0,n);else return s}function getMessage(self){return truncate(JSON.stringify(self.actual,replacer),128)+" "+self.operator+" "+truncate(JSON.stringify(self.expected,replacer),128)}function fail(actual,expected,message,operator,stackStartFunction){throw new assert.AssertionError({message:message,
    actual:actual,expected:expected,operator:operator,stackStartFunction:stackStartFunction});}assert.fail=fail;function ok(value,message){if(!value)fail(value,true,message,"\x3d\x3d",assert.ok)}assert.ok=ok;assert.equal=function equal(actual,expected,message){if(actual!=expected)fail(actual,expected,message,"\x3d\x3d",assert.equal)};assert.notEqual=function notEqual(actual,expected,message){if(actual==expected)fail(actual,expected,message,"!\x3d",assert.notEqual)};assert.deepEqual=function deepEqual(actual,
    expected,message){if(!_deepEqual(actual,expected))fail(actual,expected,message,"deepEqual",assert.deepEqual)};function _deepEqual(actual,expected){if(actual===expected)return true;else if(util.isBuffer(actual)&&util.isBuffer(expected)){if(actual.length!=expected.length)return false;for(var i=0;i<actual.length;i++)if(actual[i]!==expected[i])return false;return true}else if(util.isDate(actual)&&util.isDate(expected))return actual.getTime()===expected.getTime();else if(util.isRegExp(actual)&&util.isRegExp(expected))return actual.source===
    expected.source&&actual.global===expected.global&&actual.multiline===expected.multiline&&actual.lastIndex===expected.lastIndex&&actual.ignoreCase===expected.ignoreCase;else if(!util.isObject(actual)&&!util.isObject(expected))return actual==expected;else return objEquiv(actual,expected)}function isArguments(object){return Object.prototype.toString.call(object)=="[object Arguments]"}function objEquiv(a,b){if(util.isNullOrUndefined(a)||util.isNullOrUndefined(b))return false;if(a.prototype!==b.prototype)return false;
    if(util.isPrimitive(a)||util.isPrimitive(b))return a===b;var aIsArgs=isArguments(a),bIsArgs=isArguments(b);if(aIsArgs&&!bIsArgs||!aIsArgs&&bIsArgs)return false;if(aIsArgs){a=pSlice.call(a);b=pSlice.call(b);return _deepEqual(a,b)}var ka=objectKeys(a),kb=objectKeys(b),key,i;if(ka.length!=kb.length)return false;ka.sort();kb.sort();for(i=ka.length-1;i>=0;i--)if(ka[i]!=kb[i])return false;for(i=ka.length-1;i>=0;i--){key=ka[i];if(!_deepEqual(a[key],b[key]))return false}return true}assert.notDeepEqual=function notDeepEqual(actual,
    expected,message){if(_deepEqual(actual,expected))fail(actual,expected,message,"notDeepEqual",assert.notDeepEqual)};assert.strictEqual=function strictEqual(actual,expected,message){if(actual!==expected)fail(actual,expected,message,"\x3d\x3d\x3d",assert.strictEqual)};assert.notStrictEqual=function notStrictEqual(actual,expected,message){if(actual===expected)fail(actual,expected,message,"!\x3d\x3d",assert.notStrictEqual)};function expectedException(actual,expected){if(!actual||!expected)return false;
    if(Object.prototype.toString.call(expected)=="[object RegExp]")return expected.test(actual);else if(actual instanceof expected)return true;else if(expected.call({},actual)===true)return true;return false}function _throws(shouldThrow,block,expected,message){var actual;if(util.isString(expected)){message=expected;expected=null}try{block()}catch(e){actual=e}message=(expected&&expected.name?" ("+expected.name+").":".")+(message?" "+message:".");if(shouldThrow&&!actual)fail(actual,expected,"Missing expected exception"+
    message);if(!shouldThrow&&expectedException(actual,expected))fail(actual,expected,"Got unwanted exception"+message);if(shouldThrow&&actual&&expected&&!expectedException(actual,expected)||!shouldThrow&&actual)throw actual;}assert.throws=function(block,error,message){_throws.apply(this,[true].concat(pSlice.call(arguments)))};assert.doesNotThrow=function(block,message){_throws.apply(this,[false].concat(pSlice.call(arguments)))};assert.ifError=function(err){if(err)throw err;};var objectKeys=Object.keys||
    function(obj){var keys=[];for(var key in obj)if(hasOwn.call(obj,key))keys.push(key);return keys}},{"util/":14}],10:[function(require,module,exports){if(typeof Object.create==="function")module.exports=function inherits(ctor,superCtor){ctor.super_=superCtor;ctor.prototype=Object.create(superCtor.prototype,{constructor:{value:ctor,enumerable:false,writable:true,configurable:true}})};else module.exports=function inherits(ctor,superCtor){ctor.super_=superCtor;var TempCtor=function(){};TempCtor.prototype=
    superCtor.prototype;ctor.prototype=new TempCtor;ctor.prototype.constructor=ctor}},{}],11:[function(require,module,exports){(function(process){function normalizeArray(parts,allowAboveRoot){var up=0;for(var i=parts.length-1;i>=0;i--){var last=parts[i];if(last===".")parts.splice(i,1);else if(last===".."){parts.splice(i,1);up++}else if(up){parts.splice(i,1);up--}}if(allowAboveRoot)for(;up--;JSCOMPILER_PRESERVE(up))parts.unshift("..");return parts}var splitPathRe=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;
    var splitPath=function(filename){return splitPathRe.exec(filename).slice(1)};exports.resolve=function(){var resolvedPath="",resolvedAbsolute=false;for(var i=arguments.length-1;i>=-1&&!resolvedAbsolute;i--){var path=i>=0?arguments[i]:process.cwd();if(typeof path!=="string")throw new TypeError("Arguments to path.resolve must be strings");else if(!path)continue;resolvedPath=path+"/"+resolvedPath;resolvedAbsolute=path.charAt(0)==="/"}resolvedPath=normalizeArray(filter(resolvedPath.split("/"),function(p){return!!p}),
    !resolvedAbsolute).join("/");return(resolvedAbsolute?"/":"")+resolvedPath||"."};exports.normalize=function(path){var isAbsolute=exports.isAbsolute(path),trailingSlash=substr(path,-1)==="/";path=normalizeArray(filter(path.split("/"),function(p){return!!p}),!isAbsolute).join("/");if(!path&&!isAbsolute)path=".";if(path&&trailingSlash)path+="/";return(isAbsolute?"/":"")+path};exports.isAbsolute=function(path){return path.charAt(0)==="/"};exports.join=function(){var paths=Array.prototype.slice.call(arguments,
    0);return exports.normalize(filter(paths,function(p,index){if(typeof p!=="string")throw new TypeError("Arguments to path.join must be strings");return p}).join("/"))};exports.relative=function(from,to){from=exports.resolve(from).substr(1);to=exports.resolve(to).substr(1);function trim(arr){var start=0;for(;start<arr.length;start++)if(arr[start]!=="")break;var end=arr.length-1;for(;end>=0;end--)if(arr[end]!=="")break;if(start>end)return[];return arr.slice(start,end-start+1)}var fromParts=trim(from.split("/"));
    var toParts=trim(to.split("/"));var length=Math.min(fromParts.length,toParts.length);var samePartsLength=length;for(var i=0;i<length;i++)if(fromParts[i]!==toParts[i]){samePartsLength=i;break}var outputParts=[];for(var i=samePartsLength;i<fromParts.length;i++)outputParts.push("..");outputParts=outputParts.concat(toParts.slice(samePartsLength));return outputParts.join("/")};exports.sep="/";exports.delimiter=":";exports.dirname=function(path){var result=splitPath(path),root=result[0],dir=result[1];if(!root&&
    !dir)return".";if(dir)dir=dir.substr(0,dir.length-1);return root+dir};exports.basename=function(path,ext){var f=splitPath(path)[2];if(ext&&f.substr(-1*ext.length)===ext)f=f.substr(0,f.length-ext.length);return f};exports.extname=function(path){return splitPath(path)[3]};function filter(xs,f){if(xs.filter)return xs.filter(f);var res=[];for(var i=0;i<xs.length;i++)if(f(xs[i],i,xs))res.push(xs[i]);return res}var substr="ab".substr(-1)==="b"?function(str,start,len){return str.substr(start,len)}:function(str,
    start,len){if(start<0)start=str.length+start;return str.substr(start,len)}}).call(this,require("_process"))},{"_process":12}],12:[function(require,module,exports){var process=module.exports={};var queue=[];var draining=false;var currentQueue;var queueIndex=-1;function cleanUpNextTick(){draining=false;if(currentQueue.length)queue=currentQueue.concat(queue);else queueIndex=-1;if(queue.length)drainQueue()}function drainQueue(){if(draining)return;var timeout=setTimeout(cleanUpNextTick);draining=true;
    var len=queue.length;while(len){currentQueue=queue;queue=[];while(++queueIndex<len)if(currentQueue)currentQueue[queueIndex].run();queueIndex=-1;len=queue.length}currentQueue=null;draining=false;clearTimeout(timeout)}process.nextTick=function(fun){var args=new Array(arguments.length-1);if(arguments.length>1)for(var i=1;i<arguments.length;i++)args[i-1]=arguments[i];queue.push(new Item(fun,args));if(queue.length===1&&!draining)setTimeout(drainQueue,0)};function Item(fun,array){this.fun=fun;this.array=
    array}Item.prototype.run=function(){this.fun.apply(null,this.array)};process.title="browser";process.browser=true;process.env={};process.argv=[];process.version="";process.versions={};function noop(){}process.on=noop;process.addListener=noop;process.once=noop;process.off=noop;process.removeListener=noop;process.removeAllListeners=noop;process.emit=noop;process.binding=function(name){throw new Error("process.binding is not supported");};process.cwd=function(){return"/"};process.chdir=function(dir){throw new Error("process.chdir is not supported");
    };process.umask=function(){return 0}},{}],13:[function(require,module,exports){module.exports=function isBuffer(arg){return arg&&typeof arg==="object"&&typeof arg.copy==="function"&&typeof arg.fill==="function"&&typeof arg.readUInt8==="function"}},{}],14:[function(require,module,exports){(function(process,global){var formatRegExp=/%[sdj%]/g;exports.format=function(f){if(!isString(f)){var objects=[];for(var i=0;i<arguments.length;i++)objects.push(inspect(arguments[i]));return objects.join(" ")}var i=
    1;var args=arguments;var len=args.length;var str=String(f).replace(formatRegExp,function(x){if(x==="%%")return"%";if(i>=len)return x;switch(x){case "%s":return String(args[i++]);case "%d":return Number(args[i++]);case "%j":try{return JSON.stringify(args[i++])}catch(_){return"[Circular]"}default:return x}});for(var x=args[i];i<len;x=args[++i])if(isNull(x)||!isObject(x))str+=" "+x;else str+=" "+inspect(x);return str};exports.deprecate=function(fn,msg){if(isUndefined(global.process))return function(){return exports.deprecate(fn,
    msg).apply(this,arguments)};if(process.noDeprecation===true)return fn;var warned=false;function deprecated(){if(!warned){if(process.throwDeprecation)throw new Error(msg);else if(process.traceDeprecation)console.trace(msg);else console.error(msg);warned=true}return fn.apply(this,arguments)}return deprecated};var debugs={};var debugEnviron;exports.debuglog=function(set){if(isUndefined(debugEnviron))debugEnviron=process.env.NODE_DEBUG||"";set=set.toUpperCase();if(!debugs[set])if((new RegExp("\\b"+set+
    "\\b","i")).test(debugEnviron)){var pid=process.pid;debugs[set]=function(){var msg=exports.format.apply(exports,arguments);console.error("%s %d: %s",set,pid,msg)}}else debugs[set]=function(){};return debugs[set]};function inspect(obj,opts){var ctx={seen:[],stylize:stylizeNoColor};if(arguments.length>=3)ctx.depth=arguments[2];if(arguments.length>=4)ctx.colors=arguments[3];if(isBoolean(opts))ctx.showHidden=opts;else if(opts)exports._extend(ctx,opts);if(isUndefined(ctx.showHidden))ctx.showHidden=false;
    if(isUndefined(ctx.depth))ctx.depth=2;if(isUndefined(ctx.colors))ctx.colors=false;if(isUndefined(ctx.customInspect))ctx.customInspect=true;if(ctx.colors)ctx.stylize=stylizeWithColor;return formatValue(ctx,obj,ctx.depth)}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"};function stylizeWithColor(str,styleType){var style=inspect.styles[styleType];if(style)return"\u001b["+inspect.colors[style][0]+"m"+str+"\u001b["+inspect.colors[style][1]+"m";else return str}function stylizeNoColor(str,styleType){return str}function arrayToHash(array){var hash={};array.forEach(function(val,idx){hash[val]=true});return hash}function formatValue(ctx,value,recurseTimes){if(ctx.customInspect&&
    value&&isFunction(value.inspect)&&value.inspect!==exports.inspect&&!(value.constructor&&value.constructor.prototype===value)){var ret=value.inspect(recurseTimes,ctx);if(!isString(ret))ret=formatValue(ctx,ret,recurseTimes);return ret}var primitive=formatPrimitive(ctx,value);if(primitive)return primitive;var keys=Object.keys(value);var visibleKeys=arrayToHash(keys);if(ctx.showHidden)keys=Object.getOwnPropertyNames(value);if(isError(value)&&(keys.indexOf("message")>=0||keys.indexOf("description")>=0))return formatError(value);
    if(keys.length===0){if(isFunction(value)){var name=value.name?": "+value.name:"";return ctx.stylize("[Function"+name+"]","special")}if(isRegExp(value))return ctx.stylize(RegExp.prototype.toString.call(value),"regexp");if(isDate(value))return ctx.stylize(Date.prototype.toString.call(value),"date");if(isError(value))return formatError(value)}var base="",array=false,braces=["{","}"];if(isArray(value)){array=true;braces=["[","]"]}if(isFunction(value)){var n=value.name?": "+value.name:"";base=" [Function"+
    n+"]"}if(isRegExp(value))base=" "+RegExp.prototype.toString.call(value);if(isDate(value))base=" "+Date.prototype.toUTCString.call(value);if(isError(value))base=" "+formatError(value);if(keys.length===0&&(!array||value.length==0))return braces[0]+base+braces[1];if(recurseTimes<0)if(isRegExp(value))return ctx.stylize(RegExp.prototype.toString.call(value),"regexp");else return ctx.stylize("[Object]","special");ctx.seen.push(value);var output;if(array)output=formatArray(ctx,value,recurseTimes,visibleKeys,
    keys);else output=keys.map(function(key){return formatProperty(ctx,value,recurseTimes,visibleKeys,key,array)});ctx.seen.pop();return reduceToSingleString(output,base,braces)}function formatPrimitive(ctx,value){if(isUndefined(value))return ctx.stylize("undefined","undefined");if(isString(value)){var simple="'"+JSON.stringify(value).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return ctx.stylize(simple,"string")}if(isNumber(value))return ctx.stylize(""+value,"number");if(isBoolean(value))return ctx.stylize(""+
    value,"boolean");if(isNull(value))return ctx.stylize("null","null")}function formatError(value){return"["+Error.prototype.toString.call(value)+"]"}function formatArray(ctx,value,recurseTimes,visibleKeys,keys){var output=[];for(var i=0,l=value.length;i<l;++i)if(hasOwnProperty(value,String(i)))output.push(formatProperty(ctx,value,recurseTimes,visibleKeys,String(i),true));else output.push("");keys.forEach(function(key){if(!key.match(/^\d+$/))output.push(formatProperty(ctx,value,recurseTimes,visibleKeys,
    key,true))});return output}function formatProperty(ctx,value,recurseTimes,visibleKeys,key,array){var name,str,desc;desc=Object.getOwnPropertyDescriptor(value,key)||{value:value[key]};if(desc.get)if(desc.set)str=ctx.stylize("[Getter/Setter]","special");else str=ctx.stylize("[Getter]","special");else if(desc.set)str=ctx.stylize("[Setter]","special");if(!hasOwnProperty(visibleKeys,key))name="["+key+"]";if(!str)if(ctx.seen.indexOf(desc.value)<0){if(isNull(recurseTimes))str=formatValue(ctx,desc.value,
    null);else str=formatValue(ctx,desc.value,recurseTimes-1);if(str.indexOf("\n")>-1)if(array)str=str.split("\n").map(function(line){return"  "+line}).join("\n").substr(2);else str="\n"+str.split("\n").map(function(line){return"   "+line}).join("\n")}else str=ctx.stylize("[Circular]","special");if(isUndefined(name)){if(array&&key.match(/^\d+$/))return str;name=JSON.stringify(""+key);if(name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)){name=name.substr(1,name.length-2);name=ctx.stylize(name,"name")}else{name=
    name.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'");name=ctx.stylize(name,"string")}}return name+": "+str}function reduceToSingleString(output,base,braces){var numLinesEst=0;var length=output.reduce(function(prev,cur){numLinesEst++;if(cur.indexOf("\n")>=0)numLinesEst++;return prev+cur.replace(/\u001b\[\d\d?m/g,"").length+1},0);if(length>60)return braces[0]+(base===""?"":base+"\n ")+" "+output.join(",\n  ")+" "+braces[1];return braces[0]+base+" "+output.join(", ")+" "+braces[1]}function isArray(ar){return Array.isArray(ar)}
    exports.isArray=isArray;function isBoolean(arg){return typeof arg==="boolean"}exports.isBoolean=isBoolean;function isNull(arg){return arg===null}exports.isNull=isNull;function isNullOrUndefined(arg){return arg==null}exports.isNullOrUndefined=isNullOrUndefined;function isNumber(arg){return typeof arg==="number"}exports.isNumber=isNumber;function isString(arg){return typeof arg==="string"}exports.isString=isString;function isSymbol(arg){return typeof arg==="symbol"}exports.isSymbol=isSymbol;function isUndefined(arg){return arg===
    void 0}exports.isUndefined=isUndefined;function isRegExp(re){return isObject(re)&&objectToString(re)==="[object RegExp]"}exports.isRegExp=isRegExp;function isObject(arg){return typeof arg==="object"&&arg!==null}exports.isObject=isObject;function isDate(d){return isObject(d)&&objectToString(d)==="[object Date]"}exports.isDate=isDate;function isError(e){return isObject(e)&&(objectToString(e)==="[object Error]"||e instanceof Error)}exports.isError=isError;function isFunction(arg){return typeof arg===
    "function"}exports.isFunction=isFunction;function isPrimitive(arg){return arg===null||typeof arg==="boolean"||typeof arg==="number"||typeof arg==="string"||typeof arg==="symbol"||typeof arg==="undefined"}exports.isPrimitive=isPrimitive;exports.isBuffer=require("./support/isBuffer");function objectToString(o){return Object.prototype.toString.call(o)}function pad(n){return n<10?"0"+n.toString(10):n.toString(10)}var months=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function timestamp(){var d=
    new Date;var time=[pad(d.getHours()),pad(d.getMinutes()),pad(d.getSeconds())].join(":");return[d.getDate(),months[d.getMonth()],time].join(" ")}exports.log=function(){console.log("%s - %s",timestamp(),exports.format.apply(exports,arguments))};exports.inherits=require("inherits");exports._extend=function(origin,add){if(!add||!isObject(add))return origin;var keys=Object.keys(add);var i=keys.length;while(i--)origin[keys[i]]=add[keys[i]];return origin};function hasOwnProperty(obj,prop){return Object.prototype.hasOwnProperty.call(obj,
    prop)}}).call(this,require("_process"),typeof commonjsGlobal!=="undefined"?commonjsGlobal:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{"./support/isBuffer":13,"_process":12,"inherits":10}],15:[function(require,module,exports){var unparse=require("escodegen").generate;module.exports=function(ast,vars){if(!vars)vars={};var FAIL={};var result=function walk(node){if(node.type==="Literal")return node.value;else if(node.type==="UnaryExpression"){var val=walk(node.argument);if(node.operator===
    "+")return+val;if(node.operator==="-")return-val;if(node.operator==="~")return~val;if(node.operator==="!")return!val;return FAIL}else if(node.type==="ArrayExpression"){var xs=[];for(var i=0,l=node.elements.length;i<l;i++){var x=walk(node.elements[i]);if(x===FAIL)return FAIL;xs.push(x)}return xs}else if(node.type==="ObjectExpression"){var obj={};for(var i=0;i<node.properties.length;i++){var prop=node.properties[i];var value=prop.value===null?prop.value:walk(prop.value);if(value===FAIL)return FAIL;
    obj[prop.key.value||prop.key.name]=value}return obj}else if(node.type==="BinaryExpression"||node.type==="LogicalExpression"){var l=walk(node.left);if(l===FAIL)return FAIL;var r=walk(node.right);if(r===FAIL)return FAIL;var op=node.operator;if(op==="\x3d\x3d")return l==r;if(op==="\x3d\x3d\x3d")return l===r;if(op==="!\x3d")return l!=r;if(op==="!\x3d\x3d")return l!==r;if(op==="+")return l+r;if(op==="-")return l-r;if(op==="*")return l*r;if(op==="/")return l/r;if(op==="%")return l%r;if(op==="\x3c")return l<
    r;if(op==="\x3c\x3d")return l<=r;if(op==="\x3e")return l>r;if(op==="\x3e\x3d")return l>=r;if(op==="|")return l|r;if(op==="\x26")return l&r;if(op==="^")return l^r;if(op==="\x26\x26")return l&&r;if(op==="||")return l||r;return FAIL}else if(node.type==="Identifier")if({}.hasOwnProperty.call(vars,node.name))return vars[node.name];else return FAIL;else if(node.type==="CallExpression"){var callee=walk(node.callee);if(callee===FAIL)return FAIL;var ctx=node.callee.object?walk(node.callee.object):FAIL;if(ctx===
    FAIL)ctx=null;var args=[];for(var i=0,l=node.arguments.length;i<l;i++){var x=walk(node.arguments[i]);if(x===FAIL)return FAIL;args.push(x)}return callee.apply(ctx,args)}else if(node.type==="MemberExpression"){var obj=walk(node.object);if(obj===FAIL)return FAIL;if(node.property.type==="Identifier")return obj[node.property.name];var prop=walk(node.property);if(prop===FAIL)return FAIL;return obj[prop]}else if(node.type==="ConditionalExpression"){var val=walk(node.test);if(val===FAIL)return FAIL;return val?
    walk(node.consequent):walk(node.alternate)}else if(node.type==="FunctionExpression")return Function("return "+unparse(node))();else return FAIL}(ast);return result===FAIL?undefined:result}},{"escodegen":8}],"jsonpath":[function(require,module,exports){module.exports=require("./lib/index")},{"./lib/index":5}]},{},["jsonpath"])("jsonpath")})});var jsonSchemaRefParser=createCommonjsModule(function(module,exports){(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.$RefParser=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 _dereq_=="function"&&_dereq_;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 _dereq_=="function"&&_dereq_;for(var o=0;o<r.length;o++)s(r[o]);return s}({1:[function(_dereq_,module,exports){var $Ref=_dereq_("./ref"),Pointer=_dereq_("./pointer"),debug=_dereq_("./util/debug"),url=_dereq_("./util/url");module.exports=bundle;function bundle(parser,options){debug("Bundling $ref pointers in %s",parser.$refs._root$Ref.path);var inventory=[];crawl(parser,
    "schema",parser.$refs._root$Ref.path+"#","#",0,inventory,parser.$refs,options);remap(inventory)}function crawl(parent,key,path,pathFromRoot,indirections,inventory,$refs,options){var obj=key===null?parent:parent[key];if(obj&&typeof obj==="object")if($Ref.isAllowed$Ref(obj))inventory$Ref(parent,key,path,pathFromRoot,indirections,inventory,$refs,options);else{var keys=Object.keys(obj);var defs=keys.indexOf("definitions");if(defs>0)keys.splice(0,0,keys.splice(defs,1)[0]);keys.forEach(function(key){var keyPath=
    Pointer.join(path,key);var keyPathFromRoot=Pointer.join(pathFromRoot,key);var value=obj[key];if($Ref.isAllowed$Ref(value))inventory$Ref(obj,key,path,keyPathFromRoot,indirections,inventory,$refs,options);else crawl(obj,key,keyPath,keyPathFromRoot,indirections,inventory,$refs,options)})}}function inventory$Ref($refParent,$refKey,path,pathFromRoot,indirections,inventory,$refs,options){var $ref=$refKey===null?$refParent:$refParent[$refKey];var $refPath=url.resolve(path,$ref.$ref);var pointer=$refs._resolve($refPath,
    options);var depth=Pointer.parse(pathFromRoot).length;var file=url.stripHash(pointer.path);var hash=url.getHash(pointer.path);var external=file!==$refs._root$Ref.path;var extended=$Ref.isExtended$Ref($ref);indirections+=pointer.indirections;var existingEntry=findInInventory(inventory,$refParent,$refKey);if(existingEntry)if(depth<existingEntry.depth||indirections<existingEntry.indirections)removeFromInventory(inventory,existingEntry);else return;inventory.push({$ref:$ref,parent:$refParent,key:$refKey,
    pathFromRoot:pathFromRoot,depth:depth,file:file,hash:hash,value:pointer.value,circular:pointer.circular,extended:extended,external:external,indirections:indirections});crawl(pointer.value,null,pointer.path,pathFromRoot,indirections+1,inventory,$refs,options)}function remap(inventory){inventory.sort(function(a,b){if(a.file!==b.file)return a.file<b.file?-1:+1;else if(a.hash!==b.hash)return a.hash<b.hash?-1:+1;else if(a.circular!==b.circular)return a.circular?-1:+1;else if(a.extended!==b.extended)return a.extended?
    +1:-1;else if(a.indirections!==b.indirections)return a.indirections-b.indirections;else if(a.depth!==b.depth)return a.depth-b.depth;else return b.pathFromRoot.lastIndexOf("/definitions")-a.pathFromRoot.lastIndexOf("/definitions")});var file,hash,pathFromRoot;inventory.forEach(function(entry){debug('Re-mapping $ref pointer "%s" at %s',entry.$ref.$ref,entry.pathFromRoot);if(!entry.external)entry.$ref.$ref=entry.hash;else if(entry.file===file&&entry.hash===hash)entry.$ref.$ref=pathFromRoot;else if(entry.file===
    file&&entry.hash.indexOf(hash+"/")===0)entry.$ref.$ref=Pointer.join(pathFromRoot,Pointer.parse(entry.hash));else{file=entry.file;hash=entry.hash;pathFromRoot=entry.pathFromRoot;entry.$ref=entry.parent[entry.key]=$Ref.dereference(entry.$ref,entry.value);if(entry.circular)entry.$ref.$ref=entry.pathFromRoot}debug("    new value: %s",entry.$ref&&entry.$ref.$ref?entry.$ref.$ref:"[object Object]")})}function findInInventory(inventory,$refParent,$refKey){for(var i=0;i<inventory.length;i++){var existingEntry=
    inventory[i];if(existingEntry.parent===$refParent&&existingEntry.key===$refKey)return existingEntry}}function removeFromInventory(inventory,entry){var index=inventory.indexOf(entry);inventory.splice(index,1)}},{"./pointer":11,"./ref":12,"./util/debug":17,"./util/url":19}],2:[function(_dereq_,module,exports){var $Ref=_dereq_("./ref"),Pointer=_dereq_("./pointer"),ono=_dereq_("ono"),debug=_dereq_("./util/debug"),url=_dereq_("./util/url");module.exports=dereference;function dereference(parser,options){debug("Dereferencing $ref pointers in %s",
    parser.$refs._root$Ref.path);var dereferenced=crawl(parser.schema,parser.$refs._root$Ref.path,"#",[],parser.$refs,options);parser.$refs.circular=dereferenced.circular;parser.schema=dereferenced.value}function crawl(obj,path,pathFromRoot,parents,$refs,options){var dereferenced;var result={value:obj,circular:false};if(obj&&typeof obj==="object"){parents.push(obj);if($Ref.isAllowed$Ref(obj,options)){dereferenced=dereference$Ref(obj,path,pathFromRoot,parents,$refs,options);result.circular=dereferenced.circular;
    result.value=dereferenced.value}else Object.keys(obj).forEach(function(key){var keyPath=Pointer.join(path,key);var keyPathFromRoot=Pointer.join(pathFromRoot,key);var value=obj[key];var circular=false;if($Ref.isAllowed$Ref(value,options)){dereferenced=dereference$Ref(value,keyPath,keyPathFromRoot,parents,$refs,options);circular=dereferenced.circular;obj[key]=dereferenced.value}else if(parents.indexOf(value)===-1){dereferenced=crawl(value,keyPath,keyPathFromRoot,parents,$refs,options);circular=dereferenced.circular;
    obj[key]=dereferenced.value}else circular=foundCircularReference(keyPath,$refs,options);result.circular=result.circular||circular});parents.pop()}return result}function dereference$Ref($ref,path,pathFromRoot,parents,$refs,options){debug('Dereferencing $ref pointer "%s" at %s',$ref.$ref,path);var $refPath=url.resolve(path,$ref.$ref);var pointer=$refs._resolve($refPath,options);var directCircular=pointer.circular;var circular=directCircular||parents.indexOf(pointer.value)!==-1;circular&&foundCircularReference(path,
    $refs,options);var dereferencedValue=$Ref.dereference($ref,pointer.value);if(!circular){var dereferenced=crawl(dereferencedValue,pointer.path,pathFromRoot,parents,$refs,options);circular=dereferenced.circular;dereferencedValue=dereferenced.value}if(circular&&!directCircular&&options.dereference.circular==="ignore")dereferencedValue=$ref;if(directCircular)dereferencedValue.$ref=pathFromRoot;return{circular:circular,value:dereferencedValue}}function foundCircularReference(keyPath,$refs,options){$refs.circular=
    true;if(!options.dereference.circular)throw ono.reference("Circular $ref pointer found at %s",keyPath);return true}},{"./pointer":11,"./ref":12,"./util/debug":17,"./util/url":19,"ono":67}],3:[function(_dereq_,module,exports){(function(Buffer){var Options=_dereq_("./options"),$Refs=_dereq_("./refs"),parse=_dereq_("./parse"),normalizeArgs=_dereq_("./normalize-args"),resolveExternal=_dereq_("./resolve-external"),bundle=_dereq_("./bundle"),dereference=_dereq_("./dereference"),url=_dereq_("./util/url"),
    maybe=_dereq_("call-me-maybe"),ono=_dereq_("ono");module.exports=$RefParser;module.exports.YAML=_dereq_("./util/yaml");function $RefParser(){this.schema=null;this.$refs=new $Refs}$RefParser.parse=function(path,schema,options,callback){var Class=this;var instance=new Class;return instance.parse.apply(instance,arguments)};$RefParser.prototype.parse=function(path,schema,options,callback){var args=normalizeArgs(arguments);var promise;if(!args.path&&!args.schema){var err=ono("Expected a file path, URL, or object. Got %s",
    args.path||args.schema);return maybe(args.callback,Promise.reject(err))}this.schema=null;this.$refs=new $Refs;var pathType="http";if(url.isFileSystemPath(args.path)){args.path=url.fromFileSystemPath(args.path);pathType="file"}args.path=url.resolve(url.cwd(),args.path);if(args.schema&&typeof args.schema==="object"){var $ref=this.$refs._add(args.path);$ref.value=args.schema;$ref.pathType=pathType;promise=Promise.resolve(args.schema)}else promise=parse(args.path,this.$refs,args.options);var me=this;
    return promise.then(function(result){if(!result||typeof result!=="object"||Buffer.isBuffer(result))throw ono.syntax('"%s" is not a valid JSON Schema',me.$refs._root$Ref.path||result);else{me.schema=result;return maybe(args.callback,Promise.resolve(me.schema))}}).catch(function(e){return maybe(args.callback,Promise.reject(e))})};$RefParser.resolve=function(path,schema,options,callback){var Class=this;var instance=new Class;return instance.resolve.apply(instance,arguments)};$RefParser.prototype.resolve=
    function(path,schema,options,callback){var me=this;var args=normalizeArgs(arguments);return this.parse(args.path,args.schema,args.options).then(function(){return resolveExternal(me,args.options)}).then(function(){return maybe(args.callback,Promise.resolve(me.$refs))}).catch(function(err){return maybe(args.callback,Promise.reject(err))})};$RefParser.bundle=function(path,schema,options,callback){var Class=this;var instance=new Class;return instance.bundle.apply(instance,arguments)};$RefParser.prototype.bundle=
    function(path,schema,options,callback){var me=this;var args=normalizeArgs(arguments);return this.resolve(args.path,args.schema,args.options).then(function(){bundle(me,args.options);return maybe(args.callback,Promise.resolve(me.schema))}).catch(function(err){return maybe(args.callback,Promise.reject(err))})};$RefParser.dereference=function(path,schema,options,callback){var Class=this;var instance=new Class;return instance.dereference.apply(instance,arguments)};$RefParser.prototype.dereference=function(path,
    schema,options,callback){var me=this;var args=normalizeArgs(arguments);return this.resolve(args.path,args.schema,args.options).then(function(){dereference(me,args.options);return maybe(args.callback,Promise.resolve(me.schema))}).catch(function(err){return maybe(args.callback,Promise.reject(err))})}}).call(this,{"isBuffer":_dereq_("../node_modules/is-buffer/index.js")})},{"../node_modules/is-buffer/index.js":34,"./bundle":1,"./dereference":2,"./normalize-args":4,"./options":5,"./parse":6,"./refs":13,
    "./resolve-external":14,"./util/url":19,"./util/yaml":20,"call-me-maybe":25,"ono":67}],4:[function(_dereq_,module,exports){var Options=_dereq_("./options");module.exports=normalizeArgs;function normalizeArgs(args){var path,schema,options,callback;args=Array.prototype.slice.call(args);if(typeof args[args.length-1]==="function")callback=args.pop();if(typeof args[0]==="string"){path=args[0];if(typeof args[2]==="object"){schema=args[1];options=args[2]}else{schema=undefined;options=args[1]}}else{path=
    "";schema=args[0];options=args[1]}if(!(options instanceof Options))options=new Options(options);return{path:path,schema:schema,options:options,callback:callback}}},{"./options":5}],5:[function(_dereq_,module,exports){var jsonParser=_dereq_("./parsers/json"),yamlParser=_dereq_("./parsers/yaml"),textParser=_dereq_("./parsers/text"),binaryParser=_dereq_("./parsers/binary"),fileResolver=_dereq_("./resolvers/file"),httpResolver=_dereq_("./resolvers/http");module.exports=$RefParserOptions;function $RefParserOptions(options){merge(this,
    $RefParserOptions.defaults);merge(this,options)}$RefParserOptions.defaults={parse:{json:jsonParser,yaml:yamlParser,text:textParser,binary:binaryParser},resolve:{file:fileResolver,http:httpResolver,external:true},dereference:{circular:true}};function merge(target,source){if(isMergeable(source)){var keys=Object.keys(source);for(var i=0;i<keys.length;i++){var key=keys[i];var sourceSetting=source[key];var targetSetting=target[key];if(isMergeable(sourceSetting))target[key]=merge(targetSetting||{},sourceSetting);
    else if(sourceSetting!==undefined)target[key]=sourceSetting}}return target}function isMergeable(val){return val&&typeof val==="object"&&!Array.isArray(val)&&!(val instanceof RegExp)&&!(val instanceof Date)}},{"./parsers/binary":7,"./parsers/json":8,"./parsers/text":9,"./parsers/yaml":10,"./resolvers/file":15,"./resolvers/http":16}],6:[function(_dereq_,module,exports){(function(Buffer){var ono=_dereq_("ono"),debug=_dereq_("./util/debug"),url=_dereq_("./util/url"),plugins=_dereq_("./util/plugins");
    module.exports=parse;function parse(path,$refs,options){try{path=url.stripHash(path);var $ref=$refs._add(path);var file={url:path,extension:url.getExtension(path)};return readFile(file,options).then(function(resolver){$ref.pathType=resolver.plugin.name;file.data=resolver.result;return parseFile(file,options)}).then(function(parser){$ref.value=parser.result;return parser.result})}catch(e){return Promise.reject(e)}}function readFile(file,options){return new Promise(function(resolve,reject){debug("Reading %s",
    file.url);var resolvers=plugins.all(options.resolve);resolvers=plugins.filter(resolvers,"canRead",file);plugins.sort(resolvers);plugins.run(resolvers,"read",file).then(resolve,onError);function onError(err){if(err&&!(err instanceof SyntaxError))reject(err);else reject(ono.syntax('Unable to resolve $ref pointer "%s"',file.url))}})}function parseFile(file,options){return new Promise(function(resolve,reject){debug("Parsing %s",file.url);var allParsers=plugins.all(options.parse);var filteredParsers=plugins.filter(allParsers,
    "canParse",file);var parsers=filteredParsers.length>0?filteredParsers:allParsers;plugins.sort(parsers);plugins.run(parsers,"parse",file).then(onParsed,onError);function onParsed(parser){if(!parser.plugin.allowEmpty&&isEmpty(parser.result))reject(ono.syntax('Error parsing "%s" as %s. \nParsed value is empty',file.url,parser.plugin.name));else resolve(parser)}function onError(err){if(err){err=err instanceof Error?err:new Error(err);reject(ono.syntax(err,"Error parsing %s",file.url))}else reject(ono.syntax("Unable to parse %s",
    file.url))}})}function isEmpty(value){return value===undefined||typeof value==="object"&&Object.keys(value).length===0||typeof value==="string"&&value.trim().length===0||Buffer.isBuffer(value)&&value.length===0}}).call(this,{"isBuffer":_dereq_("../node_modules/is-buffer/index.js")})},{"../node_modules/is-buffer/index.js":34,"./util/debug":17,"./util/plugins":18,"./util/url":19,"ono":67}],7:[function(_dereq_,module,exports){(function(Buffer){var BINARY_REGEXP=/\.(jpeg|jpg|gif|png|bmp|ico)$/i;module.exports=
    {order:400,allowEmpty:true,canParse:function isBinary(file){return Buffer.isBuffer(file.data)&&BINARY_REGEXP.test(file.url)},parse:function parseBinary(file){if(Buffer.isBuffer(file.data))return file.data;else return new Buffer(file.data)}}}).call(this,_dereq_("buffer").Buffer)},{"buffer":23}],8:[function(_dereq_,module,exports){(function(Buffer){module.exports={order:100,allowEmpty:true,canParse:".json",parse:function parseJSON(file){return new Promise(function(resolve,reject){var data=file.data;
    if(Buffer.isBuffer(data))data=data.toString();if(typeof data==="string")if(data.trim().length===0)resolve(undefined);else resolve(JSON.parse(data));else resolve(data)})}}}).call(this,{"isBuffer":_dereq_("../../node_modules/is-buffer/index.js")})},{"../../node_modules/is-buffer/index.js":34}],9:[function(_dereq_,module,exports){(function(Buffer){var TEXT_REGEXP=/\.(txt|htm|html|md|xml|js|min|map|css|scss|less|svg)$/i;module.exports={order:300,allowEmpty:true,encoding:"utf8",canParse:function isText(file){return(typeof file.data===
    "string"||Buffer.isBuffer(file.data))&&TEXT_REGEXP.test(file.url)},parse:function parseText(file){if(typeof file.data==="string")return file.data;else if(Buffer.isBuffer(file.data))return file.data.toString(this.encoding);else throw new Error("data is not text");}}}).call(this,{"isBuffer":_dereq_("../../node_modules/is-buffer/index.js")})},{"../../node_modules/is-buffer/index.js":34}],10:[function(_dereq_,module,exports){(function(Buffer){var YAML=_dereq_("../util/yaml");module.exports={order:200,
    allowEmpty:true,canParse:[".yaml",".yml",".json"],parse:function parseYAML(file){return new Promise(function(resolve,reject){var data=file.data;if(Buffer.isBuffer(data))data=data.toString();if(typeof data==="string")resolve(YAML.parse(data));else resolve(data)})}}}).call(this,{"isBuffer":_dereq_("../../node_modules/is-buffer/index.js")})},{"../../node_modules/is-buffer/index.js":34,"../util/yaml":20}],11:[function(_dereq_,module,exports){module.exports=Pointer;var $Ref=_dereq_("./ref"),url=_dereq_("./util/url"),
    ono=_dereq_("ono"),slashes=/\//g,tildes=/~/g,escapedSlash=/~1/g,escapedTilde=/~0/g;function Pointer($ref,path,friendlyPath){this.$ref=$ref;this.path=path;this.originalPath=friendlyPath||path;this.value=undefined;this.circular=false;this.indirections=0}Pointer.prototype.resolve=function(obj,options){var tokens=Pointer.parse(this.path);this.value=obj;for(var i=0;i<tokens.length;i++){if(resolveIf$Ref(this,options))this.path=Pointer.join(this.path,tokens.slice(i));var token=tokens[i];if(this.value[token]===
    undefined)throw ono.syntax('Error resolving $ref pointer "%s". \nToken "%s" does not exist.',this.originalPath,token);else this.value=this.value[token]}resolveIf$Ref(this,options);return this};Pointer.prototype.set=function(obj,value,options){var tokens=Pointer.parse(this.path);var token;if(tokens.length===0){this.value=value;return value}this.value=obj;for(var i=0;i<tokens.length-1;i++){resolveIf$Ref(this,options);token=tokens[i];if(this.value&&this.value[token]!==undefined)this.value=this.value[token];
    else this.value=setValue(this,token,{})}resolveIf$Ref(this,options);token=tokens[tokens.length-1];setValue(this,token,value);return obj};Pointer.parse=function(path){var pointer=url.getHash(path).substr(1);if(!pointer)return[];pointer=pointer.split("/");for(var i=0;i<pointer.length;i++)pointer[i]=decodeURI(pointer[i].replace(escapedSlash,"/").replace(escapedTilde,"~"));if(pointer[0]!=="")throw ono.syntax('Invalid $ref pointer "%s". Pointers must begin with "#/"',pointer);return pointer.slice(1)};
    Pointer.join=function(base,tokens){if(base.indexOf("#")===-1)base+="#";tokens=Array.isArray(tokens)?tokens:[tokens];for(var i=0;i<tokens.length;i++){var token=tokens[i];base+="/"+encodeURI(token.replace(tildes,"~0").replace(slashes,"~1"))}return base};function resolveIf$Ref(pointer,options){if($Ref.isAllowed$Ref(pointer.value,options)){var $refPath=url.resolve(pointer.path,pointer.value.$ref);if($refPath===pointer.path)pointer.circular=true;else{var resolved=pointer.$ref.$refs._resolve($refPath,options);
    pointer.indirections+=resolved.indirections+1;if($Ref.isExtended$Ref(pointer.value)){pointer.value=$Ref.dereference(pointer.value,resolved.value);return false}else{pointer.$ref=resolved.$ref;pointer.path=resolved.path;pointer.value=resolved.value}return true}}}function setValue(pointer,token,value){if(pointer.value&&typeof pointer.value==="object")if(token==="-"&&Array.isArray(pointer.value))pointer.value.push(value);else pointer.value[token]=value;else throw ono.syntax('Error assigning $ref pointer "%s". \nCannot set "%s" of a non-object.',
    pointer.path,token);return value}},{"./ref":12,"./util/url":19,"ono":67}],12:[function(_dereq_,module,exports){module.exports=$Ref;var Pointer=_dereq_("./pointer");function $Ref(){this.path=undefined;this.value=undefined;this.$refs=undefined;this.pathType=undefined}$Ref.prototype.exists=function(path,options){try{this.resolve(path,options);return true}catch(e){return false}};$Ref.prototype.get=function(path,options){return this.resolve(path,options).value};$Ref.prototype.resolve=function(path,options,
    friendlyPath){var pointer=new Pointer(this,path,friendlyPath);return pointer.resolve(this.value,options)};$Ref.prototype.set=function(path,value){var pointer=new Pointer(this,path);this.value=pointer.set(this.value,value)};$Ref.is$Ref=function(value){return value&&typeof value==="object"&&typeof value.$ref==="string"&&value.$ref.length>0};$Ref.isExternal$Ref=function(value){return $Ref.is$Ref(value)&&value.$ref[0]!=="#"};$Ref.isAllowed$Ref=function(value,options){if($Ref.is$Ref(value))if(value.$ref.substr(0,
    2)==="#/"||value.$ref==="#")return true;else if(value.$ref[0]!=="#"&&(!options||options.resolve.external))return true};$Ref.isExtended$Ref=function(value){return $Ref.is$Ref(value)&&Object.keys(value).length>1};$Ref.dereference=function($ref,resolvedValue){if(resolvedValue&&typeof resolvedValue==="object"&&$Ref.isExtended$Ref($ref)){var merged={};Object.keys($ref).forEach(function(key){if(key!=="$ref")merged[key]=$ref[key]});Object.keys(resolvedValue).forEach(function(key){if(!(key in merged))merged[key]=
    resolvedValue[key]});return merged}else return resolvedValue}},{"./pointer":11}],13:[function(_dereq_,module,exports){var ono=_dereq_("ono"),$Ref=_dereq_("./ref"),url=_dereq_("./util/url");module.exports=$Refs;function $Refs(){this.circular=false;this._$refs={};this._root$Ref=null}$Refs.prototype.paths=function(types){var paths=getPaths(this._$refs,arguments);return paths.map(function(path){return path.decoded})};$Refs.prototype.values=function(types){var $refs=this._$refs;var paths=getPaths($refs,
    arguments);return paths.reduce(function(obj,path){obj[path.decoded]=$refs[path.encoded].value;return obj},{})};$Refs.prototype.toJSON=$Refs.prototype.values;$Refs.prototype.exists=function(path,options){try{this._resolve(path,options);return true}catch(e){return false}};$Refs.prototype.get=function(path,options){return this._resolve(path,options).value};$Refs.prototype.set=function(path,value){var absPath=url.resolve(this._root$Ref.path,path);var withoutHash=url.stripHash(absPath);var $ref=this._$refs[withoutHash];
    if(!$ref)throw ono('Error resolving $ref pointer "%s". \n"%s" not found.',path,withoutHash);$ref.set(absPath,value)};$Refs.prototype._add=function(path){var withoutHash=url.stripHash(path);var $ref=new $Ref;$ref.path=withoutHash;$ref.$refs=this;this._$refs[withoutHash]=$ref;this._root$Ref=this._root$Ref||$ref;return $ref};$Refs.prototype._resolve=function(path,options){var absPath=url.resolve(this._root$Ref.path,path);var withoutHash=url.stripHash(absPath);var $ref=this._$refs[withoutHash];if(!$ref)throw ono('Error resolving $ref pointer "%s". \n"%s" not found.',
    path,withoutHash);return $ref.resolve(absPath,options,path)};$Refs.prototype._get$Ref=function(path){path=url.resolve(this._root$Ref.path,path);var withoutHash=url.stripHash(path);return this._$refs[withoutHash]};function getPaths($refs,types){var paths=Object.keys($refs);types=Array.isArray(types[0])?types[0]:Array.prototype.slice.call(types);if(types.length>0&&types[0])paths=paths.filter(function(key){return types.indexOf($refs[key].pathType)!==-1});return paths.map(function(path){return{encoded:path,
    decoded:$refs[path].pathType==="file"?url.toFileSystemPath(path,true):path}})}},{"./ref":12,"./util/url":19,"ono":67}],14:[function(_dereq_,module,exports){var $Ref=_dereq_("./ref"),Pointer=_dereq_("./pointer"),parse=_dereq_("./parse"),debug=_dereq_("./util/debug"),url=_dereq_("./util/url");module.exports=resolveExternal;function resolveExternal(parser,options){if(!options.resolve.external)return Promise.resolve();try{debug("Resolving $ref pointers in %s",parser.$refs._root$Ref.path);var promises=
    crawl(parser.schema,parser.$refs._root$Ref.path+"#",parser.$refs,options);return Promise.all(promises)}catch(e){return Promise.reject(e)}}function crawl(obj,path,$refs,options){var promises=[];if(obj&&typeof obj==="object")if($Ref.isExternal$Ref(obj))promises.push(resolve$Ref(obj,path,$refs,options));else Object.keys(obj).forEach(function(key){var keyPath=Pointer.join(path,key);var value=obj[key];if($Ref.isExternal$Ref(value))promises.push(resolve$Ref(value,keyPath,$refs,options));else promises=promises.concat(crawl(value,
    keyPath,$refs,options))});return promises}function resolve$Ref($ref,path,$refs,options){debug('Resolving $ref pointer "%s" at %s',$ref.$ref,path);var resolvedPath=url.resolve(path,$ref.$ref);var withoutHash=url.stripHash(resolvedPath);$ref=$refs._$refs[withoutHash];if($ref)return Promise.resolve($ref.value);return parse(resolvedPath,$refs,options).then(function(result){debug("Resolving $ref pointers in %s",withoutHash);var promises=crawl(result,withoutHash+"#",$refs,options);return Promise.all(promises)})}
    },{"./parse":6,"./pointer":11,"./ref":12,"./util/debug":17,"./util/url":19}],15:[function(_dereq_,module,exports){var fs=_dereq_("fs"),ono=_dereq_("ono"),url=_dereq_("../util/url"),debug=_dereq_("../util/debug");module.exports={order:100,canRead:function isFile(file){return url.isFileSystemPath(file.url)},read:function readFile(file){return new Promise(function(resolve,reject){var path;try{path=url.toFileSystemPath(file.url)}catch(err){reject(ono.uri(err,"Malformed URI: %s",file.url))}debug("Opening file: %s",
    path);try{fs.readFile(path,function(err,data){if(err)reject(ono(err,'Error opening file "%s"',path));else resolve(data)})}catch(err){reject(ono(err,'Error opening file "%s"',path))}})}}},{"../util/debug":17,"../util/url":19,"fs":22,"ono":67}],16:[function(_dereq_,module,exports){(function(process,Buffer){var http=_dereq_("http"),https=_dereq_("https"),ono=_dereq_("ono"),url=_dereq_("../util/url"),debug=_dereq_("../util/debug");module.exports={order:200,headers:null,timeout:5E3,redirects:5,withCredentials:false,
    canRead:function isHttp(file){return url.isHttp(file.url)},read:function readHttp(file){var u=url.parse(file.url);if(process.browser&&!u.protocol)u.protocol=url.parse(location.href).protocol;return download(u,this)}};function download(u,httpOptions,redirects){return new Promise(function(resolve,reject){u=url.parse(u);redirects=redirects||[];redirects.push(u.href);get(u,httpOptions).then(function(res){if(res.statusCode>=400)throw ono({status:res.statusCode},"HTTP ERROR %d",res.statusCode);else if(res.statusCode>=
    300)if(redirects.length>httpOptions.redirects)reject(ono({status:res.statusCode},"Error downloading %s. \nToo many redirects: \n  %s",redirects[0],redirects.join(" \n  ")));else if(!res.headers.location)throw ono({status:res.statusCode},"HTTP %d redirect with no location header",res.statusCode);else{debug("HTTP %d redirect %s -\x3e %s",res.statusCode,u.href,res.headers.location);var redirectTo=url.resolve(u,res.headers.location);download(redirectTo,httpOptions,redirects).then(resolve,reject)}else resolve(res.body||
    new Buffer(0))}).catch(function(err){reject(ono(err,"Error downloading",u.href))})})}function get(u,httpOptions){return new Promise(function(resolve,reject){debug("GET",u.href);var protocol=u.protocol==="https:"?https:http;var req=protocol.get({hostname:u.hostname,port:u.port,path:u.path,auth:u.auth,protocol:u.protocol,headers:httpOptions.headers||{},withCredentials:httpOptions.withCredentials});if(typeof req.setTimeout==="function")req.setTimeout(httpOptions.timeout);req.on("timeout",function(){req.abort()});
    req.on("error",reject);req.once("response",function(res){res.body=new Buffer(0);res.on("data",function(data){res.body=Buffer.concat([res.body,new Buffer(data)])});res.on("error",reject);res.on("end",function(){resolve(res)})})})}}).call(this,_dereq_("_process"),_dereq_("buffer").Buffer)},{"../util/debug":17,"../util/url":19,"_process":69,"buffer":23,"http":84,"https":31,"ono":67}],17:[function(_dereq_,module,exports){var debug=_dereq_("debug");module.exports=debug("json-schema-ref-parser")},{"debug":27}],
    18:[function(_dereq_,module,exports){var debug=_dereq_("./debug");exports.all=function(plugins){return Object.keys(plugins).filter(function(key){return typeof plugins[key]==="object"}).map(function(key){plugins[key].name=key;return plugins[key]})};exports.filter=function(plugins,method,file){return plugins.filter(function(plugin){return!!getResult(plugin,method,file)})};exports.sort=function(plugins){plugins.forEach(function(plugin){plugin.order=plugin.order||Number.MAX_SAFE_INTEGER});return plugins.sort(function(a,
    b){return a.order-b.order})};exports.run=function(plugins,method,file){var plugin,lastError,index=0;return new Promise(function(resolve,reject){runNextPlugin();function runNextPlugin(){plugin=plugins[index++];if(!plugin)return reject(lastError);try{debug("  %s",plugin.name);var result=getResult(plugin,method,file,callback);if(result&&typeof result.then==="function")result.then(onSuccess,onError);else if(result!==undefined)onSuccess(result)}catch(e){onError(e)}}function callback(err,result){if(err)onError(err);
    else onSuccess(result)}function onSuccess(result){debug("    success");resolve({plugin:plugin,result:result})}function onError(err){debug("    %s",err.message||err);lastError=err;runNextPlugin()}})};function getResult(obj,prop,file,callback){var value=obj[prop];if(typeof value==="function")return value.apply(obj,[file,callback]);if(!callback)if(value instanceof RegExp)return value.test(file.url);else if(typeof value==="string")return value===file.extension;else if(Array.isArray(value))return value.indexOf(file.extension)!==
    -1;return value}},{"./debug":17}],19:[function(_dereq_,module,exports){(function(process){var isWindows=/^win/.test(process.platform),forwardSlashPattern=/\//g,protocolPattern=/^([a-z0-9.+-]+):\/\//i,url=module.exports;var urlEncodePatterns=[/\?/g,"%3F",/#/g,"%23",isWindows?/\\/g:/\//,"/"];var urlDecodePatterns=[/%23/g,"#",/%24/g,"$",/%26/g,"\x26",/%2C/g,",",/%40/g,"@"];exports.parse=_dereq_("url").parse;exports.resolve=_dereq_("url").resolve;exports.cwd=function cwd(){return process.browser?location.href:
    process.cwd()+"/"};exports.getProtocol=function getProtocol(path){var match=protocolPattern.exec(path);if(match)return match[1].toLowerCase()};exports.getExtension=function getExtension(path){var lastDot=path.lastIndexOf(".");if(lastDot>=0)return path.substr(lastDot).toLowerCase();return""};exports.getHash=function getHash(path){var hashIndex=path.indexOf("#");if(hashIndex>=0)return path.substr(hashIndex);return"#"};exports.stripHash=function stripHash(path){var hashIndex=path.indexOf("#");if(hashIndex>=
    0)path=path.substr(0,hashIndex);return path};exports.isHttp=function isHttp(path){var protocol=url.getProtocol(path);if(protocol==="http"||protocol==="https")return true;else if(protocol===undefined)return process.browser;else return false};exports.isFileSystemPath=function isFileSystemPath(path){if(process.browser)return false;var protocol=url.getProtocol(path);return protocol===undefined||protocol==="file"};exports.fromFileSystemPath=function fromFileSystemPath(path){for(var i=0;i<urlEncodePatterns.length;i+=
    2)path=path.replace(urlEncodePatterns[i],urlEncodePatterns[i+1]);return encodeURI(path)};exports.toFileSystemPath=function toFileSystemPath(path,keepFileProtocol){path=decodeURI(path);for(var i=0;i<urlDecodePatterns.length;i+=2)path=path.replace(urlDecodePatterns[i],urlDecodePatterns[i+1]);var isFileUrl=path.substr(0,7).toLowerCase()==="file://";if(isFileUrl){path=path[7]==="/"?path.substr(8):path.substr(7);if(isWindows&&path[1]==="/")path=path[0]+":"+path.substr(1);if(keepFileProtocol)path="file:///"+
    path;else{isFileUrl=false;path=isWindows?path:"/"+path}}if(isWindows&&!isFileUrl){path=path.replace(forwardSlashPattern,"\\");if(path.substr(1,2)===":\\")path=path[0].toUpperCase()+path.substr(1)}return path}}).call(this,_dereq_("_process"))},{"_process":69,"url":90}],20:[function(_dereq_,module,exports){var yaml=_dereq_("js-yaml"),ono=_dereq_("ono");module.exports={parse:function yamlParse(text,reviver){try{return yaml.safeLoad(text)}catch(e){if(e instanceof Error)throw e;else throw ono(e,e.message);
    }},stringify:function yamlStringify(value,replacer,space){try{var indent=(typeof space==="string"?space.length:space)||2;return yaml.safeDump(value,{indent:indent})}catch(e){if(e instanceof Error)throw e;else throw ono(e,e.message);}}}},{"js-yaml":36,"ono":67}],21:[function(_dereq_,module,exports){exports.byteLength=byteLength;exports.toByteArray=toByteArray;exports.fromByteArray=fromByteArray;var lookup=[];var revLookup=[];var Arr=typeof Uint8Array!=="undefined"?Uint8Array:Array;var code="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
    for(var 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;function placeHoldersCount(b64){var len=b64.length;if(len%4>0)throw new Error("Invalid string. Length must be a multiple of 4");return b64[len-2]==="\x3d"?2:b64[len-1]==="\x3d"?1:0}function byteLength(b64){return b64.length*3/4-placeHoldersCount(b64)}function toByteArray(b64){var i,l,tmp,placeHolders,arr;var len=b64.length;placeHolders=placeHoldersCount(b64);
    arr=new Arr(len*3/4-placeHolders);l=placeHolders>0?len-4:len;var L=0;for(i=0;i<l;i+=4){tmp=revLookup[b64.charCodeAt(i)]<<18|revLookup[b64.charCodeAt(i+1)]<<12|revLookup[b64.charCodeAt(i+2)]<<6|revLookup[b64.charCodeAt(i+3)];arr[L++]=tmp>>16&255;arr[L++]=tmp>>8&255;arr[L++]=tmp&255}if(placeHolders===2){tmp=revLookup[b64.charCodeAt(i)]<<2|revLookup[b64.charCodeAt(i+1)]>>4;arr[L++]=tmp&255}else if(placeHolders===1){tmp=revLookup[b64.charCodeAt(i)]<<10|revLookup[b64.charCodeAt(i+1)]<<4|revLookup[b64.charCodeAt(i+
    2)]>>2;arr[L++]=tmp>>8&255;arr[L++]=tmp&255}return arr}function tripletToBase64(num){return lookup[num>>18&63]+lookup[num>>12&63]+lookup[num>>6&63]+lookup[num&63]}function encodeChunk(uint8,start,end){var tmp;var output=[];for(var i=start;i<end;i+=3){tmp=(uint8[i]<<16)+(uint8[i+1]<<8)+uint8[i+2];output.push(tripletToBase64(tmp))}return output.join("")}function fromByteArray(uint8){var tmp;var len=uint8.length;var extraBytes=len%3;var output="";var parts=[];var maxChunkLength=16383;for(var i=0,len2=
    len-extraBytes;i<len2;i+=maxChunkLength)parts.push(encodeChunk(uint8,i,i+maxChunkLength>len2?len2:i+maxChunkLength));if(extraBytes===1){tmp=uint8[len-1];output+=lookup[tmp>>2];output+=lookup[tmp<<4&63];output+="\x3d\x3d"}else if(extraBytes===2){tmp=(uint8[len-2]<<8)+uint8[len-1];output+=lookup[tmp>>10];output+=lookup[tmp>>4&63];output+=lookup[tmp<<2&63];output+="\x3d"}parts.push(output);return parts.join("")}},{}],22:[function(_dereq_,module,exports){},{}],23:[function(_dereq_,module,exports){var base64=
    _dereq_("base64-js");var ieee754=_dereq_("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();if(!Buffer.TYPED_ARRAY_SUPPORT&&typeof console!=="undefined"&&typeof console.error==="function")console.error("This browser lacks typed array (Uint8Array) support which is required by "+"`buffer` v5.x. Use `buffer` v4.x if you _dereq_ old browser support.");function typedArraySupport(){try{var arr=
    new Uint8Array(1);arr.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}};return arr.foo()===42}catch(e){return false}}function createBuffer(length){if(length>K_MAX_LENGTH)throw new RangeError("Invalid typed array length");var buf=new Uint8Array(length);buf.__proto__=Buffer.prototype;return buf}function Buffer(arg,encodingOrOffset,length){if(typeof arg==="number"){if(typeof encodingOrOffset==="string")throw new Error("If encoding is specified then the first argument must be a string");
    return allocUnsafe(arg)}return from(arg,encodingOrOffset,length)}if(typeof Symbol!=="undefined"&&Symbol.species&&Buffer[Symbol.species]===Buffer)Object.defineProperty(Buffer,Symbol.species,{value:null,configurable:true,enumerable:false,writable:false});Buffer.poolSize=8192;function from(value,encodingOrOffset,length){if(typeof value==="number")throw new TypeError('"value" argument must not be a number');if(isArrayBuffer(value))return fromArrayBuffer(value,encodingOrOffset,length);if(typeof value===
    "string")return fromString(value,encodingOrOffset);return fromObject(value)}Buffer.from=function(value,encodingOrOffset,length){return from(value,encodingOrOffset,length)};Buffer.prototype.__proto__=Uint8Array.prototype;Buffer.__proto__=Uint8Array;function assertSize(size){if(typeof size!=="number")throw new TypeError('"size" argument must be a number');else if(size<0)throw new RangeError('"size" argument must not be negative');}function alloc(size,fill,encoding){assertSize(size);if(size<=0)return createBuffer(size);
    if(fill!==undefined)return typeof encoding==="string"?createBuffer(size).fill(fill,encoding):createBuffer(size).fill(fill);return createBuffer(size)}Buffer.alloc=function(size,fill,encoding){return alloc(size,fill,encoding)};function allocUnsafe(size){assertSize(size);return createBuffer(size<0?0:checked(size)|0)}Buffer.allocUnsafe=function(size){return allocUnsafe(size)};Buffer.allocUnsafeSlow=function(size){return allocUnsafe(size)};function fromString(string,encoding){if(typeof encoding!=="string"||
    encoding==="")encoding="utf8";if(!Buffer.isEncoding(encoding))throw new TypeError('"encoding" must be a valid string encoding');var length=byteLength(string,encoding)|0;var buf=createBuffer(length);var actual=buf.write(string,encoding);if(actual!==length)buf=buf.slice(0,actual);return buf}function fromArrayLike(array){var length=array.length<0?0:checked(array.length)|0;var buf=createBuffer(length);for(var i=0;i<length;i+=1)buf[i]=array[i]&255;return buf}function fromArrayBuffer(array,byteOffset,length){if(byteOffset<
    0||array.byteLength<byteOffset)throw new RangeError("'offset' is out of bounds");if(array.byteLength<byteOffset+(length||0))throw new RangeError("'length' is out of bounds");var buf;if(byteOffset===undefined&&length===undefined)buf=new Uint8Array(array);else if(length===undefined)buf=new Uint8Array(array,byteOffset);else buf=new Uint8Array(array,byteOffset,length);buf.__proto__=Buffer.prototype;return buf}function fromObject(obj){if(Buffer.isBuffer(obj)){var len=checked(obj.length)|0;var buf=createBuffer(len);
    if(buf.length===0)return buf;obj.copy(buf,0,0,len);return buf}if(obj){if(isArrayBufferView(obj)||"length"in obj){if(typeof obj.length!=="number"||numberIsNaN(obj.length))return createBuffer(0);return fromArrayLike(obj)}if(obj.type==="Buffer"&&Array.isArray(obj.data))return fromArrayLike(obj.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.");}function checked(length){if(length>=K_MAX_LENGTH)throw new RangeError("Attempt to allocate Buffer larger than maximum "+
    "size: 0x"+K_MAX_LENGTH.toString(16)+" bytes");return length|0}function SlowBuffer(length){if(+length!=length)length=0;return Buffer.alloc(+length)}Buffer.isBuffer=function isBuffer(b){return b!=null&&b._isBuffer===true};Buffer.compare=function compare(a,b){if(!Buffer.isBuffer(a)||!Buffer.isBuffer(b))throw new TypeError("Arguments must be Buffers");if(a===b)return 0;var x=a.length;var y=b.length;for(var i=0,len=Math.min(x,y);i<len;++i)if(a[i]!==b[i]){x=a[i];y=b[i];break}if(x<y)return-1;if(y<x)return 1;
    return 0};Buffer.isEncoding=function isEncoding(encoding){switch(String(encoding).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 true;default:return false}};Buffer.concat=function concat(list,length){if(!Array.isArray(list))throw new TypeError('"list" argument must be an Array of Buffers');if(list.length===0)return Buffer.alloc(0);var i;if(length===undefined){length=0;for(i=0;i<
    list.length;++i)length+=list[i].length}var buffer=Buffer.allocUnsafe(length);var pos=0;for(i=0;i<list.length;++i){var buf=list[i];if(!Buffer.isBuffer(buf))throw new TypeError('"list" argument must be an Array of Buffers');buf.copy(buffer,pos);pos+=buf.length}return buffer};function byteLength(string,encoding){if(Buffer.isBuffer(string))return string.length;if(isArrayBufferView(string)||isArrayBuffer(string))return string.byteLength;if(typeof string!=="string")string=""+string;var len=string.length;
    if(len===0)return 0;var loweredCase=false;for(;;)switch(encoding){case "ascii":case "latin1":case "binary":return len;case "utf8":case "utf-8":case undefined:return utf8ToBytes(string).length;case "ucs2":case "ucs-2":case "utf16le":case "utf-16le":return len*2;case "hex":return len>>>1;case "base64":return base64ToBytes(string).length;default:if(loweredCase)return utf8ToBytes(string).length;encoding=(""+encoding).toLowerCase();loweredCase=true}}Buffer.byteLength=byteLength;function slowToString(encoding,
    start,end){var loweredCase=false;if(start===undefined||start<0)start=0;if(start>this.length)return"";if(end===undefined||end>this.length)end=this.length;if(end<=0)return"";end>>>=0;start>>>=0;if(end<=start)return"";if(!encoding)encoding="utf8";while(true)switch(encoding){case "hex":return hexSlice(this,start,end);case "utf8":case "utf-8":return utf8Slice(this,start,end);case "ascii":return asciiSlice(this,start,end);case "latin1":case "binary":return latin1Slice(this,start,end);case "base64":return base64Slice(this,
    start,end);case "ucs2":case "ucs-2":case "utf16le":case "utf-16le":return utf16leSlice(this,start,end);default:if(loweredCase)throw new TypeError("Unknown encoding: "+encoding);encoding=(encoding+"").toLowerCase();loweredCase=true}}Buffer.prototype._isBuffer=true;function swap(b,n,m){var i=b[n];b[n]=b[m];b[m]=i}Buffer.prototype.swap16=function swap16(){var len=this.length;if(len%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var i=0;i<len;i+=2)swap(this,i,i+1);return this};
    Buffer.prototype.swap32=function swap32(){var len=this.length;if(len%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var i=0;i<len;i+=4){swap(this,i,i+3);swap(this,i+1,i+2)}return this};Buffer.prototype.swap64=function swap64(){var len=this.length;if(len%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var i=0;i<len;i+=8){swap(this,i,i+7);swap(this,i+1,i+6);swap(this,i+2,i+5);swap(this,i+3,i+4)}return this};Buffer.prototype.toString=function toString(){var length=
    this.length;if(length===0)return"";if(arguments.length===0)return utf8Slice(this,0,length);return slowToString.apply(this,arguments)};Buffer.prototype.equals=function equals(b){if(!Buffer.isBuffer(b))throw new TypeError("Argument must be a Buffer");if(this===b)return true;return Buffer.compare(this,b)===0};Buffer.prototype.inspect=function inspect(){var str="";var max=exports.INSPECT_MAX_BYTES;if(this.length>0){str=this.toString("hex",0,max).match(/.{2}/g).join(" ");if(this.length>max)str+=" ... "}return"\x3cBuffer "+
    str+"\x3e"};Buffer.prototype.compare=function compare(target,start,end,thisStart,thisEnd){if(!Buffer.isBuffer(target))throw new TypeError("Argument must be a Buffer");if(start===undefined)start=0;if(end===undefined)end=target?target.length:0;if(thisStart===undefined)thisStart=0;if(thisEnd===undefined)thisEnd=this.length;if(start<0||end>target.length||thisStart<0||thisEnd>this.length)throw new RangeError("out of range index");if(thisStart>=thisEnd&&start>=end)return 0;if(thisStart>=thisEnd)return-1;
    if(start>=end)return 1;start>>>=0;end>>>=0;thisStart>>>=0;thisEnd>>>=0;if(this===target)return 0;var x=thisEnd-thisStart;var y=end-start;var len=Math.min(x,y);var thisCopy=this.slice(thisStart,thisEnd);var targetCopy=target.slice(start,end);for(var i=0;i<len;++i)if(thisCopy[i]!==targetCopy[i]){x=thisCopy[i];y=targetCopy[i];break}if(x<y)return-1;if(y<x)return 1;return 0};function bidirectionalIndexOf(buffer,val,byteOffset,encoding,dir){if(buffer.length===0)return-1;if(typeof byteOffset==="string"){encoding=
    byteOffset;byteOffset=0}else if(byteOffset>2147483647)byteOffset=2147483647;else if(byteOffset<-2147483648)byteOffset=-2147483648;byteOffset=+byteOffset;if(numberIsNaN(byteOffset))byteOffset=dir?0:buffer.length-1;if(byteOffset<0)byteOffset=buffer.length+byteOffset;if(byteOffset>=buffer.length)if(dir)return-1;else byteOffset=buffer.length-1;else if(byteOffset<0)if(dir)byteOffset=0;else return-1;if(typeof val==="string")val=Buffer.from(val,encoding);if(Buffer.isBuffer(val)){if(val.length===0)return-1;
    return arrayIndexOf(buffer,val,byteOffset,encoding,dir)}else if(typeof val==="number"){val=val&255;if(typeof Uint8Array.prototype.indexOf==="function")if(dir)return Uint8Array.prototype.indexOf.call(buffer,val,byteOffset);else return Uint8Array.prototype.lastIndexOf.call(buffer,val,byteOffset);return arrayIndexOf(buffer,[val],byteOffset,encoding,dir)}throw new TypeError("val must be string, number or Buffer");}function arrayIndexOf(arr,val,byteOffset,encoding,dir){var indexSize=1;var arrLength=arr.length;
    var valLength=val.length;if(encoding!==undefined){encoding=String(encoding).toLowerCase();if(encoding==="ucs2"||encoding==="ucs-2"||encoding==="utf16le"||encoding==="utf-16le"){if(arr.length<2||val.length<2)return-1;indexSize=2;arrLength/=2;valLength/=2;byteOffset/=2}}function read(buf,i){if(indexSize===1)return buf[i];else return buf.readUInt16BE(i*indexSize)}var i;if(dir){var foundIndex=-1;for(i=byteOffset;i<arrLength;i++)if(read(arr,i)===read(val,foundIndex===-1?0:i-foundIndex)){if(foundIndex===
    -1)foundIndex=i;if(i-foundIndex+1===valLength)return foundIndex*indexSize}else{if(foundIndex!==-1)i-=i-foundIndex;foundIndex=-1}}else{if(byteOffset+valLength>arrLength)byteOffset=arrLength-valLength;for(i=byteOffset;i>=0;i--){var found=true;for(var j=0;j<valLength;j++)if(read(arr,i+j)!==read(val,j)){found=false;break}if(found)return i}}return-1}Buffer.prototype.includes=function includes(val,byteOffset,encoding){return this.indexOf(val,byteOffset,encoding)!==-1};Buffer.prototype.indexOf=function indexOf(val,
    byteOffset,encoding){return bidirectionalIndexOf(this,val,byteOffset,encoding,true)};Buffer.prototype.lastIndexOf=function lastIndexOf(val,byteOffset,encoding){return bidirectionalIndexOf(this,val,byteOffset,encoding,false)};function hexWrite(buf,string,offset,length){offset=Number(offset)||0;var remaining=buf.length-offset;if(!length)length=remaining;else{length=Number(length);if(length>remaining)length=remaining}var strLen=string.length;if(strLen%2!==0)throw new TypeError("Invalid hex string");
    if(length>strLen/2)length=strLen/2;for(var i=0;i<length;++i){var parsed=parseInt(string.substr(i*2,2),16);if(numberIsNaN(parsed))return i;buf[offset+i]=parsed}return i}function utf8Write(buf,string,offset,length){return blitBuffer(utf8ToBytes(string,buf.length-offset),buf,offset,length)}function asciiWrite(buf,string,offset,length){return blitBuffer(asciiToBytes(string),buf,offset,length)}function latin1Write(buf,string,offset,length){return asciiWrite(buf,string,offset,length)}function base64Write(buf,
    string,offset,length){return blitBuffer(base64ToBytes(string),buf,offset,length)}function ucs2Write(buf,string,offset,length){return blitBuffer(utf16leToBytes(string,buf.length-offset),buf,offset,length)}Buffer.prototype.write=function write(string,offset,length,encoding){if(offset===undefined){encoding="utf8";length=this.length;offset=0}else if(length===undefined&&typeof offset==="string"){encoding=offset;length=this.length;offset=0}else if(isFinite(offset)){offset=offset>>>0;if(isFinite(length)){length=
    length>>>0;if(encoding===undefined)encoding="utf8"}else{encoding=length;length=undefined}}else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var remaining=this.length-offset;if(length===undefined||length>remaining)length=remaining;if(string.length>0&&(length<0||offset<0)||offset>this.length)throw new RangeError("Attempt to write outside buffer bounds");if(!encoding)encoding="utf8";var loweredCase=false;for(;;)switch(encoding){case "hex":return hexWrite(this,
    string,offset,length);case "utf8":case "utf-8":return utf8Write(this,string,offset,length);case "ascii":return asciiWrite(this,string,offset,length);case "latin1":case "binary":return latin1Write(this,string,offset,length);case "base64":return base64Write(this,string,offset,length);case "ucs2":case "ucs-2":case "utf16le":case "utf-16le":return ucs2Write(this,string,offset,length);default:if(loweredCase)throw new TypeError("Unknown encoding: "+encoding);encoding=(""+encoding).toLowerCase();loweredCase=
    true}};Buffer.prototype.toJSON=function toJSON(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function base64Slice(buf,start,end){if(start===0&&end===buf.length)return base64.fromByteArray(buf);else return base64.fromByteArray(buf.slice(start,end))}function utf8Slice(buf,start,end){end=Math.min(buf.length,end);var res=[];var i=start;while(i<end){var firstByte=buf[i];var codePoint=null;var bytesPerSequence=firstByte>239?4:firstByte>223?3:firstByte>191?2:1;if(i+bytesPerSequence<=
    end){var secondByte,thirdByte,fourthByte,tempCodePoint;switch(bytesPerSequence){case 1:if(firstByte<128)codePoint=firstByte;break;case 2:secondByte=buf[i+1];if((secondByte&192)===128){tempCodePoint=(firstByte&31)<<6|secondByte&63;if(tempCodePoint>127)codePoint=tempCodePoint}break;case 3:secondByte=buf[i+1];thirdByte=buf[i+2];if((secondByte&192)===128&&(thirdByte&192)===128){tempCodePoint=(firstByte&15)<<12|(secondByte&63)<<6|thirdByte&63;if(tempCodePoint>2047&&(tempCodePoint<55296||tempCodePoint>
    57343))codePoint=tempCodePoint}break;case 4:secondByte=buf[i+1];thirdByte=buf[i+2];fourthByte=buf[i+3];if((secondByte&192)===128&&(thirdByte&192)===128&&(fourthByte&192)===128){tempCodePoint=(firstByte&15)<<18|(secondByte&63)<<12|(thirdByte&63)<<6|fourthByte&63;if(tempCodePoint>65535&&tempCodePoint<1114112)codePoint=tempCodePoint}}}if(codePoint===null){codePoint=65533;bytesPerSequence=1}else if(codePoint>65535){codePoint-=65536;res.push(codePoint>>>10&1023|55296);codePoint=56320|codePoint&1023}res.push(codePoint);
    i+=bytesPerSequence}return decodeCodePointsArray(res)}var MAX_ARGUMENTS_LENGTH=4096;function decodeCodePointsArray(codePoints){var len=codePoints.length;if(len<=MAX_ARGUMENTS_LENGTH)return String.fromCharCode.apply(String,codePoints);var res="";var i=0;while(i<len)res+=String.fromCharCode.apply(String,codePoints.slice(i,i+=MAX_ARGUMENTS_LENGTH));return res}function asciiSlice(buf,start,end){var ret="";end=Math.min(buf.length,end);for(var i=start;i<end;++i)ret+=String.fromCharCode(buf[i]&127);return ret}
    function latin1Slice(buf,start,end){var ret="";end=Math.min(buf.length,end);for(var i=start;i<end;++i)ret+=String.fromCharCode(buf[i]);return ret}function hexSlice(buf,start,end){var len=buf.length;if(!start||start<0)start=0;if(!end||end<0||end>len)end=len;var out="";for(var i=start;i<end;++i)out+=toHex(buf[i]);return out}function utf16leSlice(buf,start,end){var bytes=buf.slice(start,end);var res="";for(var i=0;i<bytes.length;i+=2)res+=String.fromCharCode(bytes[i]+bytes[i+1]*256);return res}Buffer.prototype.slice=
    function slice(start,end){var len=this.length;start=~~start;end=end===undefined?len:~~end;if(start<0){start+=len;if(start<0)start=0}else if(start>len)start=len;if(end<0){end+=len;if(end<0)end=0}else if(end>len)end=len;if(end<start)end=start;var newBuf=this.subarray(start,end);newBuf.__proto__=Buffer.prototype;return newBuf};function checkOffset(offset,ext,length){if(offset%1!==0||offset<0)throw new RangeError("offset is not uint");if(offset+ext>length)throw new RangeError("Trying to access beyond buffer length");
    }Buffer.prototype.readUIntLE=function readUIntLE(offset,byteLength,noAssert){offset=offset>>>0;byteLength=byteLength>>>0;if(!noAssert)checkOffset(offset,byteLength,this.length);var val=this[offset];var mul=1;var i=0;while(++i<byteLength&&(mul*=256))val+=this[offset+i]*mul;return val};Buffer.prototype.readUIntBE=function readUIntBE(offset,byteLength,noAssert){offset=offset>>>0;byteLength=byteLength>>>0;if(!noAssert)checkOffset(offset,byteLength,this.length);var val=this[offset+--byteLength];var mul=
    1;while(byteLength>0&&(mul*=256))val+=this[offset+--byteLength]*mul;return val};Buffer.prototype.readUInt8=function readUInt8(offset,noAssert){offset=offset>>>0;if(!noAssert)checkOffset(offset,1,this.length);return this[offset]};Buffer.prototype.readUInt16LE=function readUInt16LE(offset,noAssert){offset=offset>>>0;if(!noAssert)checkOffset(offset,2,this.length);return this[offset]|this[offset+1]<<8};Buffer.prototype.readUInt16BE=function readUInt16BE(offset,noAssert){offset=offset>>>0;if(!noAssert)checkOffset(offset,
    2,this.length);return this[offset]<<8|this[offset+1]};Buffer.prototype.readUInt32LE=function readUInt32LE(offset,noAssert){offset=offset>>>0;if(!noAssert)checkOffset(offset,4,this.length);return(this[offset]|this[offset+1]<<8|this[offset+2]<<16)+this[offset+3]*16777216};Buffer.prototype.readUInt32BE=function readUInt32BE(offset,noAssert){offset=offset>>>0;if(!noAssert)checkOffset(offset,4,this.length);return this[offset]*16777216+(this[offset+1]<<16|this[offset+2]<<8|this[offset+3])};Buffer.prototype.readIntLE=
    function readIntLE(offset,byteLength,noAssert){offset=offset>>>0;byteLength=byteLength>>>0;if(!noAssert)checkOffset(offset,byteLength,this.length);var val=this[offset];var mul=1;var i=0;while(++i<byteLength&&(mul*=256))val+=this[offset+i]*mul;mul*=128;if(val>=mul)val-=Math.pow(2,8*byteLength);return val};Buffer.prototype.readIntBE=function readIntBE(offset,byteLength,noAssert){offset=offset>>>0;byteLength=byteLength>>>0;if(!noAssert)checkOffset(offset,byteLength,this.length);var i=byteLength;var mul=
    1;var val=this[offset+--i];while(i>0&&(mul*=256))val+=this[offset+--i]*mul;mul*=128;if(val>=mul)val-=Math.pow(2,8*byteLength);return val};Buffer.prototype.readInt8=function readInt8(offset,noAssert){offset=offset>>>0;if(!noAssert)checkOffset(offset,1,this.length);if(!(this[offset]&128))return this[offset];return(255-this[offset]+1)*-1};Buffer.prototype.readInt16LE=function readInt16LE(offset,noAssert){offset=offset>>>0;if(!noAssert)checkOffset(offset,2,this.length);var val=this[offset]|this[offset+
    1]<<8;return val&32768?val|4294901760:val};Buffer.prototype.readInt16BE=function readInt16BE(offset,noAssert){offset=offset>>>0;if(!noAssert)checkOffset(offset,2,this.length);var val=this[offset+1]|this[offset]<<8;return val&32768?val|4294901760:val};Buffer.prototype.readInt32LE=function readInt32LE(offset,noAssert){offset=offset>>>0;if(!noAssert)checkOffset(offset,4,this.length);return this[offset]|this[offset+1]<<8|this[offset+2]<<16|this[offset+3]<<24};Buffer.prototype.readInt32BE=function readInt32BE(offset,
    noAssert){offset=offset>>>0;if(!noAssert)checkOffset(offset,4,this.length);return this[offset]<<24|this[offset+1]<<16|this[offset+2]<<8|this[offset+3]};Buffer.prototype.readFloatLE=function readFloatLE(offset,noAssert){offset=offset>>>0;if(!noAssert)checkOffset(offset,4,this.length);return ieee754.read(this,offset,true,23,4)};Buffer.prototype.readFloatBE=function readFloatBE(offset,noAssert){offset=offset>>>0;if(!noAssert)checkOffset(offset,4,this.length);return ieee754.read(this,offset,false,23,
    4)};Buffer.prototype.readDoubleLE=function readDoubleLE(offset,noAssert){offset=offset>>>0;if(!noAssert)checkOffset(offset,8,this.length);return ieee754.read(this,offset,true,52,8)};Buffer.prototype.readDoubleBE=function readDoubleBE(offset,noAssert){offset=offset>>>0;if(!noAssert)checkOffset(offset,8,this.length);return ieee754.read(this,offset,false,52,8)};function checkInt(buf,value,offset,ext,max,min){if(!Buffer.isBuffer(buf))throw new TypeError('"buffer" argument must be a Buffer instance');
    if(value>max||value<min)throw new RangeError('"value" argument is out of bounds');if(offset+ext>buf.length)throw new RangeError("Index out of range");}Buffer.prototype.writeUIntLE=function writeUIntLE(value,offset,byteLength,noAssert){value=+value;offset=offset>>>0;byteLength=byteLength>>>0;if(!noAssert){var maxBytes=Math.pow(2,8*byteLength)-1;checkInt(this,value,offset,byteLength,maxBytes,0)}var mul=1;var i=0;this[offset]=value&255;while(++i<byteLength&&(mul*=256))this[offset+i]=value/mul&255;return offset+
    byteLength};Buffer.prototype.writeUIntBE=function writeUIntBE(value,offset,byteLength,noAssert){value=+value;offset=offset>>>0;byteLength=byteLength>>>0;if(!noAssert){var maxBytes=Math.pow(2,8*byteLength)-1;checkInt(this,value,offset,byteLength,maxBytes,0)}var i=byteLength-1;var mul=1;this[offset+i]=value&255;while(--i>=0&&(mul*=256))this[offset+i]=value/mul&255;return offset+byteLength};Buffer.prototype.writeUInt8=function writeUInt8(value,offset,noAssert){value=+value;offset=offset>>>0;if(!noAssert)checkInt(this,
    value,offset,1,255,0);this[offset]=value&255;return offset+1};Buffer.prototype.writeUInt16LE=function writeUInt16LE(value,offset,noAssert){value=+value;offset=offset>>>0;if(!noAssert)checkInt(this,value,offset,2,65535,0);this[offset]=value&255;this[offset+1]=value>>>8;return offset+2};Buffer.prototype.writeUInt16BE=function writeUInt16BE(value,offset,noAssert){value=+value;offset=offset>>>0;if(!noAssert)checkInt(this,value,offset,2,65535,0);this[offset]=value>>>8;this[offset+1]=value&255;return offset+
    2};Buffer.prototype.writeUInt32LE=function writeUInt32LE(value,offset,noAssert){value=+value;offset=offset>>>0;if(!noAssert)checkInt(this,value,offset,4,4294967295,0);this[offset+3]=value>>>24;this[offset+2]=value>>>16;this[offset+1]=value>>>8;this[offset]=value&255;return offset+4};Buffer.prototype.writeUInt32BE=function writeUInt32BE(value,offset,noAssert){value=+value;offset=offset>>>0;if(!noAssert)checkInt(this,value,offset,4,4294967295,0);this[offset]=value>>>24;this[offset+1]=value>>>16;this[offset+
    2]=value>>>8;this[offset+3]=value&255;return offset+4};Buffer.prototype.writeIntLE=function writeIntLE(value,offset,byteLength,noAssert){value=+value;offset=offset>>>0;if(!noAssert){var limit=Math.pow(2,8*byteLength-1);checkInt(this,value,offset,byteLength,limit-1,-limit)}var i=0;var mul=1;var sub=0;this[offset]=value&255;while(++i<byteLength&&(mul*=256)){if(value<0&&sub===0&&this[offset+i-1]!==0)sub=1;this[offset+i]=(value/mul>>0)-sub&255}return offset+byteLength};Buffer.prototype.writeIntBE=function writeIntBE(value,
    offset,byteLength,noAssert){value=+value;offset=offset>>>0;if(!noAssert){var limit=Math.pow(2,8*byteLength-1);checkInt(this,value,offset,byteLength,limit-1,-limit)}var i=byteLength-1;var mul=1;var sub=0;this[offset+i]=value&255;while(--i>=0&&(mul*=256)){if(value<0&&sub===0&&this[offset+i+1]!==0)sub=1;this[offset+i]=(value/mul>>0)-sub&255}return offset+byteLength};Buffer.prototype.writeInt8=function writeInt8(value,offset,noAssert){value=+value;offset=offset>>>0;if(!noAssert)checkInt(this,value,offset,
    1,127,-128);if(value<0)value=255+value+1;this[offset]=value&255;return offset+1};Buffer.prototype.writeInt16LE=function writeInt16LE(value,offset,noAssert){value=+value;offset=offset>>>0;if(!noAssert)checkInt(this,value,offset,2,32767,-32768);this[offset]=value&255;this[offset+1]=value>>>8;return offset+2};Buffer.prototype.writeInt16BE=function writeInt16BE(value,offset,noAssert){value=+value;offset=offset>>>0;if(!noAssert)checkInt(this,value,offset,2,32767,-32768);this[offset]=value>>>8;this[offset+
    1]=value&255;return offset+2};Buffer.prototype.writeInt32LE=function writeInt32LE(value,offset,noAssert){value=+value;offset=offset>>>0;if(!noAssert)checkInt(this,value,offset,4,2147483647,-2147483648);this[offset]=value&255;this[offset+1]=value>>>8;this[offset+2]=value>>>16;this[offset+3]=value>>>24;return offset+4};Buffer.prototype.writeInt32BE=function writeInt32BE(value,offset,noAssert){value=+value;offset=offset>>>0;if(!noAssert)checkInt(this,value,offset,4,2147483647,-2147483648);if(value<0)value=
    4294967295+value+1;this[offset]=value>>>24;this[offset+1]=value>>>16;this[offset+2]=value>>>8;this[offset+3]=value&255;return offset+4};function checkIEEE754(buf,value,offset,ext,max,min){if(offset+ext>buf.length)throw new RangeError("Index out of range");if(offset<0)throw new RangeError("Index out of range");}function writeFloat(buf,value,offset,littleEndian,noAssert){value=+value;offset=offset>>>0;if(!noAssert)checkIEEE754(buf,value,offset,4,3.4028234663852886e+38,-3.4028234663852886e+38);ieee754.write(buf,
    value,offset,littleEndian,23,4);return offset+4}Buffer.prototype.writeFloatLE=function writeFloatLE(value,offset,noAssert){return writeFloat(this,value,offset,true,noAssert)};Buffer.prototype.writeFloatBE=function writeFloatBE(value,offset,noAssert){return writeFloat(this,value,offset,false,noAssert)};function writeDouble(buf,value,offset,littleEndian,noAssert){value=+value;offset=offset>>>0;if(!noAssert)checkIEEE754(buf,value,offset,8,1.7976931348623157e+308,-1.7976931348623157e+308);ieee754.write(buf,
    value,offset,littleEndian,52,8);return offset+8}Buffer.prototype.writeDoubleLE=function writeDoubleLE(value,offset,noAssert){return writeDouble(this,value,offset,true,noAssert)};Buffer.prototype.writeDoubleBE=function writeDoubleBE(value,offset,noAssert){return writeDouble(this,value,offset,false,noAssert)};Buffer.prototype.copy=function copy(target,targetStart,start,end){if(!start)start=0;if(!end&&end!==0)end=this.length;if(targetStart>=target.length)targetStart=target.length;if(!targetStart)targetStart=
    0;if(end>0&&end<start)end=start;if(end===start)return 0;if(target.length===0||this.length===0)return 0;if(targetStart<0)throw new RangeError("targetStart out of bounds");if(start<0||start>=this.length)throw new RangeError("sourceStart out of bounds");if(end<0)throw new RangeError("sourceEnd out of bounds");if(end>this.length)end=this.length;if(target.length-targetStart<end-start)end=target.length-targetStart+start;var len=end-start;var i;if(this===target&&start<targetStart&&targetStart<end)for(i=
    len-1;i>=0;--i)target[i+targetStart]=this[i+start];else if(len<1E3)for(i=0;i<len;++i)target[i+targetStart]=this[i+start];else Uint8Array.prototype.set.call(target,this.subarray(start,start+len),targetStart);return len};Buffer.prototype.fill=function fill(val,start,end,encoding){if(typeof val==="string"){if(typeof start==="string"){encoding=start;start=0;end=this.length}else if(typeof end==="string"){encoding=end;end=this.length}if(val.length===1){var code=val.charCodeAt(0);if(code<256)val=code}if(encoding!==
    undefined&&typeof encoding!=="string")throw new TypeError("encoding must be a string");if(typeof encoding==="string"&&!Buffer.isEncoding(encoding))throw new TypeError("Unknown encoding: "+encoding);}else if(typeof val==="number")val=val&255;if(start<0||this.length<start||this.length<end)throw new RangeError("Out of range index");if(end<=start)return this;start=start>>>0;end=end===undefined?this.length:end>>>0;if(!val)val=0;var i;if(typeof val==="number")for(i=start;i<end;++i)this[i]=val;else{var bytes=
    Buffer.isBuffer(val)?val:new Buffer(val,encoding);var len=bytes.length;for(i=0;i<end-start;++i)this[i+start]=bytes[i%len]}return this};var INVALID_BASE64_RE=/[^+/0-9A-Za-z-_]/g;function base64clean(str){str=str.trim().replace(INVALID_BASE64_RE,"");if(str.length<2)return"";while(str.length%4!==0)str=str+"\x3d";return str}function toHex(n){if(n<16)return"0"+n.toString(16);return n.toString(16)}function utf8ToBytes(string,units){units=units||Infinity;var codePoint;var length=string.length;var leadSurrogate=
    null;var bytes=[];for(var i=0;i<length;++i){codePoint=string.charCodeAt(i);if(codePoint>55295&&codePoint<57344){if(!leadSurrogate){if(codePoint>56319){if((units-=3)>-1)bytes.push(239,191,189);continue}else if(i+1===length){if((units-=3)>-1)bytes.push(239,191,189);continue}leadSurrogate=codePoint;continue}if(codePoint<56320){if((units-=3)>-1)bytes.push(239,191,189);leadSurrogate=codePoint;continue}codePoint=(leadSurrogate-55296<<10|codePoint-56320)+65536}else if(leadSurrogate)if((units-=3)>-1)bytes.push(239,
    191,189);leadSurrogate=null;if(codePoint<128){if((units-=1)<0)break;bytes.push(codePoint)}else if(codePoint<2048){if((units-=2)<0)break;bytes.push(codePoint>>6|192,codePoint&63|128)}else if(codePoint<65536){if((units-=3)<0)break;bytes.push(codePoint>>12|224,codePoint>>6&63|128,codePoint&63|128)}else if(codePoint<1114112){if((units-=4)<0)break;bytes.push(codePoint>>18|240,codePoint>>12&63|128,codePoint>>6&63|128,codePoint&63|128)}else throw new Error("Invalid code point");}return bytes}function asciiToBytes(str){var byteArray=
    [];for(var i=0;i<str.length;++i)byteArray.push(str.charCodeAt(i)&255);return byteArray}function utf16leToBytes(str,units){var c,hi,lo;var byteArray=[];for(var i=0;i<str.length;++i){if((units-=2)<0)break;c=str.charCodeAt(i);hi=c>>8;lo=c%256;byteArray.push(lo);byteArray.push(hi)}return byteArray}function base64ToBytes(str){return base64.toByteArray(base64clean(str))}function blitBuffer(src,dst,offset,length){for(var i=0;i<length;++i){if(i+offset>=dst.length||i>=src.length)break;dst[i+offset]=src[i]}return i}
    function isArrayBuffer(obj){return obj instanceof ArrayBuffer||obj!=null&&obj.constructor!=null&&obj.constructor.name==="ArrayBuffer"&&typeof obj.byteLength==="number"}function isArrayBufferView(obj){return typeof ArrayBuffer.isView==="function"&&ArrayBuffer.isView(obj)}function numberIsNaN(obj){return obj!==obj}},{"base64-js":21,"ieee754":32}],24:[function(_dereq_,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"}},{}],25:[function(_dereq_,module,exports){(function(process,global){var next=global.process&&process.nextTick||global.setImmediate||function(f){setTimeout(f,0)};module.exports=function maybe(cb,promise){if(cb){promise.then(function(result){next(function(){cb(null,
    result)})},function(err){next(function(){cb(err)})});return undefined}else return promise}}).call(this,_dereq_("_process"),typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{"_process":69}],26:[function(_dereq_,module,exports){(function(Buffer){function isArray(arg){if(Array.isArray)return Array.isArray(arg);return objectToString(arg)==="[object Array]"}exports.isArray=isArray;function isBoolean(arg){return typeof arg==="boolean"}exports.isBoolean=
    isBoolean;function isNull(arg){return arg===null}exports.isNull=isNull;function isNullOrUndefined(arg){return arg==null}exports.isNullOrUndefined=isNullOrUndefined;function isNumber(arg){return typeof arg==="number"}exports.isNumber=isNumber;function isString(arg){return typeof arg==="string"}exports.isString=isString;function isSymbol(arg){return typeof arg==="symbol"}exports.isSymbol=isSymbol;function isUndefined(arg){return arg===void 0}exports.isUndefined=isUndefined;function isRegExp(re){return objectToString(re)===
    "[object RegExp]"}exports.isRegExp=isRegExp;function isObject(arg){return typeof arg==="object"&&arg!==null}exports.isObject=isObject;function isDate(d){return objectToString(d)==="[object Date]"}exports.isDate=isDate;function isError(e){return objectToString(e)==="[object Error]"||e instanceof Error}exports.isError=isError;function isFunction(arg){return typeof arg==="function"}exports.isFunction=isFunction;function isPrimitive(arg){return arg===null||typeof arg==="boolean"||typeof arg==="number"||
    typeof arg==="string"||typeof arg==="symbol"||typeof arg==="undefined"}exports.isPrimitive=isPrimitive;exports.isBuffer=Buffer.isBuffer;function objectToString(o){return Object.prototype.toString.call(o)}}).call(this,{"isBuffer":_dereq_("../../is-buffer/index.js")})},{"../../is-buffer/index.js":34}],27:[function(_dereq_,module,exports){(function(process){exports=module.exports=_dereq_("./debug");exports.log=log;exports.formatArgs=formatArgs;exports.save=save;exports.load=load;exports.useColors=useColors;
    exports.storage="undefined"!=typeof chrome&&"undefined"!=typeof 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"];function useColors(){if(typeof window!=="undefined"&&window.process&&window.process.type==="renderer")return true;
    if(typeof navigator!=="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return false;return typeof document!=="undefined"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window!=="undefined"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator!=="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&
    parseInt(RegExp.$1,10)>=31||typeof navigator!=="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}exports.formatters.j=function(v){try{return JSON.stringify(v)}catch(err){return"[UnexpectedJSONParseError]: "+err.message}};function formatArgs(args){var useColors=this.useColors;args[0]=(useColors?"%c":"")+this.namespace+(useColors?" %c":" ")+args[0]+(useColors?"%c ":" ")+"+"+exports.humanize(this.diff);if(!useColors)return;var c="color: "+this.color;args.splice(1,
    0,c,"color: inherit");var index=0;var lastC=0;args[0].replace(/%[a-zA-Z%]/g,function(match){if("%%"===match)return;index++;if("%c"===match)lastC=index});args.splice(lastC,0,c)}function log(){return"object"===typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function save(namespaces){try{if(null==namespaces)exports.storage.removeItem("debug");else exports.storage.debug=namespaces}catch(e){}}function load(){var r;try{r=exports.storage.debug}catch(e){}if(!r&&typeof process!==
    "undefined"&&"env"in process)r=process.env.DEBUG;return r}exports.enable(load());function localstorage(){try{return window.localStorage}catch(e){}}}).call(this,_dereq_("_process"))},{"./debug":28,"_process":69}],28:[function(_dereq_,module,exports){exports=module.exports=createDebug.debug=createDebug["default"]=createDebug;exports.coerce=coerce;exports.disable=disable;exports.enable=enable;exports.enabled=enabled;exports.humanize=_dereq_("ms");exports.instances=[];exports.names=[];exports.skips=[];
    exports.formatters={};function selectColor(namespace){var hash=0,i;for(i in namespace){hash=(hash<<5)-hash+namespace.charCodeAt(i);hash|=0}return exports.colors[Math.abs(hash)%exports.colors.length]}function createDebug(namespace){var prevTime;function debug(){if(!debug.enabled)return;var self=debug;var curr=+new Date;var ms=curr-(prevTime||curr);self.diff=ms;self.prev=prevTime;self.curr=curr;prevTime=curr;var args=new Array(arguments.length);for(var i=0;i<args.length;i++)args[i]=arguments[i];args[0]=
    exports.coerce(args[0]);if("string"!==typeof args[0])args.unshift("%O");var index=0;args[0]=args[0].replace(/%([a-zA-Z%])/g,function(match,format){if(match==="%%")return match;index++;var formatter=exports.formatters[format];if("function"===typeof formatter){var val=args[index];match=formatter.call(self,val);args.splice(index,1);index--}return match});exports.formatArgs.call(self,args);var logFn=debug.log||exports.log||console.log.bind(console);logFn.apply(self,args)}debug.namespace=namespace;debug.enabled=
    exports.enabled(namespace);debug.useColors=exports.useColors();debug.color=selectColor(namespace);debug.destroy=destroy;if("function"===typeof exports.init)exports.init(debug);exports.instances.push(debug);return debug}function destroy(){var index=exports.instances.indexOf(this);if(index!==-1){exports.instances.splice(index,1);return true}else return false}function enable(namespaces){exports.save(namespaces);exports.names=[];exports.skips=[];var i;var split=(typeof namespaces==="string"?namespaces:
    "").split(/[\s,]+/);var len=split.length;for(i=0;i<len;i++){if(!split[i])continue;namespaces=split[i].replace(/\*/g,".*?");if(namespaces[0]==="-")exports.skips.push(new RegExp("^"+namespaces.substr(1)+"$"));else exports.names.push(new RegExp("^"+namespaces+"$"))}for(i=0;i<exports.instances.length;i++){var instance=exports.instances[i];instance.enabled=exports.enabled(instance.namespace)}}function disable(){exports.enable("")}function enabled(name){if(name[name.length-1]==="*")return true;var i,len;
    for(i=0,len=exports.skips.length;i<len;i++)if(exports.skips[i].test(name))return false;for(i=0,len=exports.names.length;i<len;i++)if(exports.names[i].test(name))return true;return false}function coerce(val){if(val instanceof Error)return val.stack||val.message;return val}},{"ms":66}],29:[function(_dereq_,module,exports){function EventEmitter(){this._events=this._events||{};this._maxListeners=this._maxListeners||undefined}module.exports=EventEmitter;EventEmitter.EventEmitter=EventEmitter;EventEmitter.prototype._events=
    undefined;EventEmitter.prototype._maxListeners=undefined;EventEmitter.defaultMaxListeners=10;EventEmitter.prototype.setMaxListeners=function(n){if(!isNumber(n)||n<0||isNaN(n))throw TypeError("n must be a positive number");this._maxListeners=n;return this};EventEmitter.prototype.emit=function(type){var er,handler,len,args,i,listeners;if(!this._events)this._events={};if(type==="error")if(!this._events.error||isObject(this._events.error)&&!this._events.error.length){er=arguments[1];if(er instanceof Error)throw er;
    else{var err=new Error('Uncaught, unspecified "error" event. ('+er+")");err.context=er;throw err;}}handler=this._events[type];if(isUndefined(handler))return false;if(isFunction(handler))switch(arguments.length){case 1:handler.call(this);break;case 2:handler.call(this,arguments[1]);break;case 3:handler.call(this,arguments[1],arguments[2]);break;default:args=Array.prototype.slice.call(arguments,1);handler.apply(this,args)}else if(isObject(handler)){args=Array.prototype.slice.call(arguments,1);listeners=
    handler.slice();len=listeners.length;for(i=0;i<len;i++)listeners[i].apply(this,args)}return true};EventEmitter.prototype.addListener=function(type,listener){var m;if(!isFunction(listener))throw TypeError("listener must be a function");if(!this._events)this._events={};if(this._events.newListener)this.emit("newListener",type,isFunction(listener.listener)?listener.listener:listener);if(!this._events[type])this._events[type]=listener;else if(isObject(this._events[type]))this._events[type].push(listener);
    
    else this._events[type]=[this._events[type],listener];if(isObject(this._events[type])&&!this._events[type].warned){if(!isUndefined(this._maxListeners))m=this._maxListeners;else m=EventEmitter.defaultMaxListeners;if(m&&m>0&&this._events[type].length>m){this._events[type].warned=true;console.error("(node) warning: possible EventEmitter memory "+"leak detected. %d listeners added. "+"Use emitter.setMaxListeners() to increase limit.",this._events[type].length);if(typeof console.trace==="function")console.trace()}}return this};
    EventEmitter.prototype.on=EventEmitter.prototype.addListener;EventEmitter.prototype.once=function(type,listener){if(!isFunction(listener))throw TypeError("listener must be a function");var fired=false;function g(){this.removeListener(type,g);if(!fired){fired=true;listener.apply(this,arguments)}}g.listener=listener;this.on(type,g);return this};EventEmitter.prototype.removeListener=function(type,listener){var list,position,length,i;if(!isFunction(listener))throw TypeError("listener must be a function");
    if(!this._events||!this._events[type])return this;list=this._events[type];length=list.length;position=-1;if(list===listener||isFunction(list.listener)&&list.listener===listener){delete this._events[type];if(this._events.removeListener)this.emit("removeListener",type,listener)}else if(isObject(list)){for(i=length;i-- >0;)if(list[i]===listener||list[i].listener&&list[i].listener===listener){position=i;break}if(position<0)return this;if(list.length===1){list.length=0;delete this._events[type]}else list.splice(position,
    1);if(this._events.removeListener)this.emit("removeListener",type,listener)}return this};EventEmitter.prototype.removeAllListeners=function(type){var key,listeners;if(!this._events)return this;if(!this._events.removeListener){if(arguments.length===0)this._events={};else if(this._events[type])delete this._events[type];return this}if(arguments.length===0){for(key in this._events){if(key==="removeListener")continue;this.removeAllListeners(key)}this.removeAllListeners("removeListener");this._events={};
    return this}listeners=this._events[type];if(isFunction(listeners))this.removeListener(type,listeners);else if(listeners)while(listeners.length)this.removeListener(type,listeners[listeners.length-1]);delete this._events[type];return this};EventEmitter.prototype.listeners=function(type){var ret;if(!this._events||!this._events[type])ret=[];else if(isFunction(this._events[type]))ret=[this._events[type]];else ret=this._events[type].slice();return ret};EventEmitter.prototype.listenerCount=function(type){if(this._events){var evlistener=
    this._events[type];if(isFunction(evlistener))return 1;else if(evlistener)return evlistener.length}return 0};EventEmitter.listenerCount=function(emitter,type){return emitter.listenerCount(type)};function isFunction(arg){return typeof arg==="function"}function isNumber(arg){return typeof arg==="number"}function isObject(arg){return typeof arg==="object"&&arg!==null}function isUndefined(arg){return arg===void 0}},{}],30:[function(_dereq_,module,exports){function format(fmt){var re=/(%?)(%([jds]))/g,
    args=Array.prototype.slice.call(arguments,1);if(args.length)fmt=fmt.replace(re,function(match,escaped,ptn,flag){var arg=args.shift();switch(flag){case "s":arg=""+arg;break;case "d":arg=Number(arg);break;case "j":arg=JSON.stringify(arg);break}if(!escaped)return arg;args.unshift(arg);return match});if(args.length)fmt+=" "+args.join(" ");fmt=fmt.replace(/%{2,2}/g,"%");return""+fmt}module.exports=format},{}],31:[function(_dereq_,module,exports){var http=_dereq_("http");var url=_dereq_("url");var https=
    module.exports;for(var key in http)if(http.hasOwnProperty(key))https[key]=http[key];https.request=function(params,cb){params=validateParams(params);return http.request.call(this,params,cb)};https.get=function(params,cb){params=validateParams(params);return http.get.call(this,params,cb)};function validateParams(params){if(typeof params==="string")params=url.parse(params);if(!params.protocol)params.protocol="https:";if(params.protocol!=="https:")throw new Error('Protocol "'+params.protocol+'" not supported. Expected "https:"');
    return params}},{"http":84,"url":90}],32:[function(_dereq_,module,exports){exports.read=function(buffer,offset,isLE,mLen,nBytes){var e,m;var eLen=nBytes*8-mLen-1;var eMax=(1<<eLen)-1;var eBias=eMax>>1;var nBits=-7;var i=isLE?nBytes-1:0;var d=isLE?-1:1;var s=buffer[offset+i];i+=d;e=s&(1<<-nBits)-1;s>>=-nBits;nBits+=eLen;for(;nBits>0;e=e*256+buffer[offset+i],i+=d,nBits-=8);m=e&(1<<-nBits)-1;e>>=-nBits;nBits+=mLen;for(;nBits>0;m=m*256+buffer[offset+i],i+=d,nBits-=8);if(e===0)e=1-eBias;else if(e===eMax)return m?
    NaN:(s?-1:1)*Infinity;else{m=m+Math.pow(2,mLen);e=e-eBias}return(s?-1:1)*m*Math.pow(2,e-mLen)};exports.write=function(buffer,value,offset,isLE,mLen,nBytes){var e,m,c;var eLen=nBytes*8-mLen-1;var eMax=(1<<eLen)-1;var eBias=eMax>>1;var rt=mLen===23?Math.pow(2,-24)-Math.pow(2,-77):0;var i=isLE?0:nBytes-1;var d=isLE?1:-1;var s=value<0||value===0&&1/value<0?1:0;value=Math.abs(value);if(isNaN(value)||value===Infinity){m=isNaN(value)?1:0;e=eMax}else{e=Math.floor(Math.log(value)/Math.LN2);if(value*(c=Math.pow(2,
    -e))<1){e--;c*=2}if(e+eBias>=1)value+=rt/c;else value+=rt*Math.pow(2,1-eBias);if(value*c>=2){e++;c/=2}if(e+eBias>=eMax){m=0;e=eMax}else if(e+eBias>=1){m=(value*c-1)*Math.pow(2,mLen);e=e+eBias}else{m=value*Math.pow(2,eBias-1)*Math.pow(2,mLen);e=0}}for(;mLen>=8;buffer[offset+i]=m&255,i+=d,m/=256,mLen-=8);e=e<<mLen|m;eLen+=mLen;for(;eLen>0;buffer[offset+i]=e&255,i+=d,e/=256,eLen-=8);buffer[offset+i-d]|=s*128}},{}],33:[function(_dereq_,module,exports){if(typeof Object.create==="function")module.exports=
    function inherits(ctor,superCtor){ctor.super_=superCtor;ctor.prototype=Object.create(superCtor.prototype,{constructor:{value:ctor,enumerable:false,writable:true,configurable:true}})};else module.exports=function inherits(ctor,superCtor){ctor.super_=superCtor;var TempCtor=function(){};TempCtor.prototype=superCtor.prototype;ctor.prototype=new TempCtor;ctor.prototype.constructor=ctor}},{}],34:[function(_dereq_,module,exports){module.exports=function(obj){return obj!=null&&(isBuffer(obj)||isSlowBuffer(obj)||
    !!obj._isBuffer)};function isBuffer(obj){return!!obj.constructor&&typeof obj.constructor.isBuffer==="function"&&obj.constructor.isBuffer(obj)}function isSlowBuffer(obj){return typeof obj.readFloatLE==="function"&&typeof obj.slice==="function"&&isBuffer(obj.slice(0,0))}},{}],35:[function(_dereq_,module,exports){var toString={}.toString;module.exports=Array.isArray||function(arr){return toString.call(arr)=="[object Array]"}},{}],36:[function(_dereq_,module,exports){var yaml=_dereq_("./lib/js-yaml.js");
    module.exports=yaml},{"./lib/js-yaml.js":37}],37:[function(_dereq_,module,exports){var loader=_dereq_("./js-yaml/loader");var dumper=_dereq_("./js-yaml/dumper");function deprecated(name){return function(){throw new Error("Function "+name+" is deprecated and cannot be used.");}}module.exports.Type=_dereq_("./js-yaml/type");module.exports.Schema=_dereq_("./js-yaml/schema");module.exports.FAILSAFE_SCHEMA=_dereq_("./js-yaml/schema/failsafe");module.exports.JSON_SCHEMA=_dereq_("./js-yaml/schema/json");
    module.exports.CORE_SCHEMA=_dereq_("./js-yaml/schema/core");module.exports.DEFAULT_SAFE_SCHEMA=_dereq_("./js-yaml/schema/default_safe");module.exports.DEFAULT_FULL_SCHEMA=_dereq_("./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=_dereq_("./js-yaml/exception");module.exports.MINIMAL_SCHEMA=
    _dereq_("./js-yaml/schema/failsafe");module.exports.SAFE_SCHEMA=_dereq_("./js-yaml/schema/default_safe");module.exports.DEFAULT_SCHEMA=_dereq_("./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":39,"./js-yaml/exception":40,"./js-yaml/loader":41,"./js-yaml/schema":43,"./js-yaml/schema/core":44,"./js-yaml/schema/default_full":45,
    "./js-yaml/schema/default_safe":46,"./js-yaml/schema/failsafe":47,"./js-yaml/schema/json":48,"./js-yaml/type":49}],38:[function(_dereq_,module,exports){function isNothing(subject){return typeof subject==="undefined"||subject===null}function isObject(subject){return typeof subject==="object"&&subject!==null}function toArray(sequence){if(Array.isArray(sequence))return sequence;else if(isNothing(sequence))return[];return[sequence]}function extend(target,source){var index,length,key,sourceKeys;if(source){sourceKeys=
    Object.keys(source);for(index=0,length=sourceKeys.length;index<length;index+=1){key=sourceKeys[index];target[key]=source[key]}}return target}function repeat(string,count){var result="",cycle;for(cycle=0;cycle<count;cycle+=1)result+=string;return result}function isNegativeZero(number){return number===0&&Number.NEGATIVE_INFINITY===1/number}module.exports.isNothing=isNothing;module.exports.isObject=isObject;module.exports.toArray=toArray;module.exports.repeat=repeat;module.exports.isNegativeZero=isNegativeZero;
    module.exports.extend=extend},{}],39:[function(_dereq_,module,exports){var common=_dereq_("./common");var YAMLException=_dereq_("./exception");var DEFAULT_FULL_SCHEMA=_dereq_("./schema/default_full");var DEFAULT_SAFE_SCHEMA=_dereq_("./schema/default_safe");var _toString=Object.prototype.toString;var _hasOwnProperty=Object.prototype.hasOwnProperty;var CHAR_TAB=9;var CHAR_LINE_FEED=10;var CHAR_SPACE=32;var CHAR_EXCLAMATION=33;var CHAR_DOUBLE_QUOTE=34;var CHAR_SHARP=35;var CHAR_PERCENT=37;var CHAR_AMPERSAND=
    38;var CHAR_SINGLE_QUOTE=39;var CHAR_ASTERISK=42;var CHAR_COMMA=44;var CHAR_MINUS=45;var CHAR_COLON=58;var CHAR_GREATER_THAN=62;var CHAR_QUESTION=63;var CHAR_COMMERCIAL_AT=64;var CHAR_LEFT_SQUARE_BRACKET=91;var CHAR_RIGHT_SQUARE_BRACKET=93;var CHAR_GRAVE_ACCENT=96;var CHAR_LEFT_CURLY_BRACKET=123;var CHAR_VERTICAL_LINE=124;var CHAR_RIGHT_CURLY_BRACKET=125;var 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"];function compileStyleMap(schema,map){var result,keys,index,length,tag,style,type;if(map===null)return{};
    result={};keys=Object.keys(map);for(index=0,length=keys.length;index<length;index+=1){tag=keys[index];style=String(map[tag]);if(tag.slice(0,2)==="!!")tag="tag:yaml.org,2002:"+tag.slice(2);type=schema.compiledTypeMap["fallback"][tag];if(type&&_hasOwnProperty.call(type.styleAliases,style))style=type.styleAliases[style];result[tag]=style}return result}function encodeHex(character){var string,handle,length;string=character.toString(16).toUpperCase();if(character<=255){handle="x";length=2}else if(character<=
    65535){handle="u";length=4}else if(character<=4294967295){handle="U";length=8}else throw new YAMLException("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+handle+common.repeat("0",length-string.length)+string}function State(options){this.schema=options["schema"]||DEFAULT_FULL_SCHEMA;this.indent=Math.max(1,options["indent"]||2);this.skipInvalid=options["skipInvalid"]||false;this.flowLevel=common.isNothing(options["flowLevel"])?-1:options["flowLevel"];this.styleMap=compileStyleMap(this.schema,
    options["styles"]||null);this.sortKeys=options["sortKeys"]||false;this.lineWidth=options["lineWidth"]||80;this.noRefs=options["noRefs"]||false;this.noCompatMode=options["noCompatMode"]||false;this.condenseFlow=options["condenseFlow"]||false;this.implicitTypes=this.schema.compiledImplicit;this.explicitTypes=this.schema.compiledExplicit;this.tag=null;this.result="";this.duplicates=[];this.usedDuplicates=null}function indentString(string,spaces){var ind=common.repeat(" ",spaces),position=0,next=-1,result=
    "",line,length=string.length;while(position<length){next=string.indexOf("\n",position);if(next===-1){line=string.slice(position);position=length}else{line=string.slice(position,next+1);position=next+1}if(line.length&&line!=="\n")result+=ind;result+=line}return result}function generateNextLine(state,level){return"\n"+common.repeat(" ",state.indent*level)}function testImplicitResolving(state,str){var index,length,type;for(index=0,length=state.implicitTypes.length;index<length;index+=1){type=state.implicitTypes[index];
    if(type.resolve(str))return true}return false}function isWhitespace(c){return c===CHAR_SPACE||c===CHAR_TAB}function isPrintable(c){return 32<=c&&c<=126||161<=c&&c<=55295&&c!==8232&&c!==8233||57344<=c&&c<=65533&&c!==65279||65536<=c&&c<=1114111}function isPlainSafe(c){return isPrintable(c)&&c!==65279&&c!==CHAR_COMMA&&c!==CHAR_LEFT_SQUARE_BRACKET&&c!==CHAR_RIGHT_SQUARE_BRACKET&&c!==CHAR_LEFT_CURLY_BRACKET&&c!==CHAR_RIGHT_CURLY_BRACKET&&c!==CHAR_COLON&&c!==CHAR_SHARP}function isPlainSafeFirst(c){return isPrintable(c)&&
    c!==65279&&!isWhitespace(c)&&c!==CHAR_MINUS&&c!==CHAR_QUESTION&&c!==CHAR_COLON&&c!==CHAR_COMMA&&c!==CHAR_LEFT_SQUARE_BRACKET&&c!==CHAR_RIGHT_SQUARE_BRACKET&&c!==CHAR_LEFT_CURLY_BRACKET&&c!==CHAR_RIGHT_CURLY_BRACKET&&c!==CHAR_SHARP&&c!==CHAR_AMPERSAND&&c!==CHAR_ASTERISK&&c!==CHAR_EXCLAMATION&&c!==CHAR_VERTICAL_LINE&&c!==CHAR_GREATER_THAN&&c!==CHAR_SINGLE_QUOTE&&c!==CHAR_DOUBLE_QUOTE&&c!==CHAR_PERCENT&&c!==CHAR_COMMERCIAL_AT&&c!==CHAR_GRAVE_ACCENT}var STYLE_PLAIN=1,STYLE_SINGLE=2,STYLE_LITERAL=3,STYLE_FOLDED=
    4,STYLE_DOUBLE=5;function chooseScalarStyle(string,singleLineOnly,indentPerLevel,lineWidth,testAmbiguousType){var i;var char;var hasLineBreak=false;var hasFoldableLine=false;var shouldTrackWidth=lineWidth!==-1;var previousLineBreak=-1;var plain=isPlainSafeFirst(string.charCodeAt(0))&&!isWhitespace(string.charCodeAt(string.length-1));if(singleLineOnly)for(i=0;i<string.length;i++){char=string.charCodeAt(i);if(!isPrintable(char))return STYLE_DOUBLE;plain=plain&&isPlainSafe(char)}else{for(i=0;i<string.length;i++){char=
    string.charCodeAt(i);if(char===CHAR_LINE_FEED){hasLineBreak=true;if(shouldTrackWidth){hasFoldableLine=hasFoldableLine||i-previousLineBreak-1>lineWidth&&string[previousLineBreak+1]!==" ";previousLineBreak=i}}else if(!isPrintable(char))return STYLE_DOUBLE;plain=plain&&isPlainSafe(char)}hasFoldableLine=hasFoldableLine||shouldTrackWidth&&(i-previousLineBreak-1>lineWidth&&string[previousLineBreak+1]!==" ")}if(!hasLineBreak&&!hasFoldableLine)return plain&&!testAmbiguousType(string)?STYLE_PLAIN:STYLE_SINGLE;
    if(string[0]===" "&&indentPerLevel>9)return STYLE_DOUBLE;return hasFoldableLine?STYLE_FOLDED:STYLE_LITERAL}function writeScalar(state,string,level,iskey){state.dump=function(){if(string.length===0)return"''";if(!state.noCompatMode&&DEPRECATED_BOOLEANS_SYNTAX.indexOf(string)!==-1)return"'"+string+"'";var indent=state.indent*Math.max(1,level);var lineWidth=state.lineWidth===-1?-1:Math.max(Math.min(state.lineWidth,40),state.lineWidth-indent);var singleLineOnly=iskey||state.flowLevel>-1&&level>=state.flowLevel;
    function testAmbiguity(string){return testImplicitResolving(state,string)}switch(chooseScalarStyle(string,singleLineOnly,state.indent,lineWidth,testAmbiguity)){case STYLE_PLAIN:return string;case STYLE_SINGLE:return"'"+string.replace(/'/g,"''")+"'";case STYLE_LITERAL:return"|"+blockHeader(string,state.indent)+dropEndingNewline(indentString(string,indent));case STYLE_FOLDED:return"\x3e"+blockHeader(string,state.indent)+dropEndingNewline(indentString(foldString(string,lineWidth),indent));case STYLE_DOUBLE:return'"'+
    escapeString(string,lineWidth)+'"';default:throw new YAMLException("impossible error: invalid scalar style");}}()}function blockHeader(string,indentPerLevel){var indentIndicator=string[0]===" "?String(indentPerLevel):"";var clip=string[string.length-1]==="\n";var keep=clip&&(string[string.length-2]==="\n"||string==="\n");var chomp=keep?"+":clip?"":"-";return indentIndicator+chomp+"\n"}function dropEndingNewline(string){return string[string.length-1]==="\n"?string.slice(0,-1):string}function foldString(string,
    width){var lineRe=/(\n+)([^\n]*)/g;var result=function(){var nextLF=string.indexOf("\n");nextLF=nextLF!==-1?nextLF:string.length;lineRe.lastIndex=nextLF;return foldLine(string.slice(0,nextLF),width)}();var prevMoreIndented=string[0]==="\n"||string[0]===" ";var moreIndented;var match;while(match=lineRe.exec(string)){var prefix=match[1],line=match[2];moreIndented=line[0]===" ";result+=prefix+(!prevMoreIndented&&!moreIndented&&line!==""?"\n":"")+foldLine(line,width);prevMoreIndented=moreIndented}return result}
    function foldLine(line,width){if(line===""||line[0]===" ")return line;var breakRe=/ [^ ]/g;var match;var start=0,end,curr=0,next=0;var result="";while(match=breakRe.exec(line)){next=match.index;if(next-start>width){end=curr>start?curr:next;result+="\n"+line.slice(start,end);start=end+1}curr=next}result+="\n";if(line.length-start>width&&curr>start)result+=line.slice(start,curr)+"\n"+line.slice(curr+1);else result+=line.slice(start);return result.slice(1)}function escapeString(string){var result="";
    var char,nextChar;var escapeSeq;for(var i=0;i<string.length;i++){char=string.charCodeAt(i);if(char>=55296&&char<=56319){nextChar=string.charCodeAt(i+1);if(nextChar>=56320&&nextChar<=57343){result+=encodeHex((char-55296)*1024+nextChar-56320+65536);i++;continue}}escapeSeq=ESCAPE_SEQUENCES[char];result+=!escapeSeq&&isPrintable(char)?string[i]:escapeSeq||encodeHex(char)}return result}function writeFlowSequence(state,level,object){var _result="",_tag=state.tag,index,length;for(index=0,length=object.length;index<
    length;index+=1)if(writeNode(state,level,object[index],false,false)){if(index!==0)_result+=","+(!state.condenseFlow?" ":"");_result+=state.dump}state.tag=_tag;state.dump="["+_result+"]"}function writeBlockSequence(state,level,object,compact){var _result="",_tag=state.tag,index,length;for(index=0,length=object.length;index<length;index+=1)if(writeNode(state,level+1,object[index],true,true)){if(!compact||index!==0)_result+=generateNextLine(state,level);if(state.dump&&CHAR_LINE_FEED===state.dump.charCodeAt(0))_result+=
    "-";else _result+="- ";_result+=state.dump}state.tag=_tag;state.dump=_result||"[]"}function writeFlowMapping(state,level,object){var _result="",_tag=state.tag,objectKeyList=Object.keys(object),index,length,objectKey,objectValue,pairBuffer;for(index=0,length=objectKeyList.length;index<length;index+=1){pairBuffer=state.condenseFlow?'"':"";if(index!==0)pairBuffer+=", ";objectKey=objectKeyList[index];objectValue=object[objectKey];if(!writeNode(state,level,objectKey,false,false))continue;if(state.dump.length>
    1024)pairBuffer+="? ";pairBuffer+=state.dump+(state.condenseFlow?'"':"")+":"+(state.condenseFlow?"":" ");if(!writeNode(state,level,objectValue,false,false))continue;pairBuffer+=state.dump;_result+=pairBuffer}state.tag=_tag;state.dump="{"+_result+"}"}function writeBlockMapping(state,level,object,compact){var _result="",_tag=state.tag,objectKeyList=Object.keys(object),index,length,objectKey,objectValue,explicitPair,pairBuffer;if(state.sortKeys===true)objectKeyList.sort();else if(typeof state.sortKeys===
    "function")objectKeyList.sort(state.sortKeys);else if(state.sortKeys)throw new YAMLException("sortKeys must be a boolean or a function");for(index=0,length=objectKeyList.length;index<length;index+=1){pairBuffer="";if(!compact||index!==0)pairBuffer+=generateNextLine(state,level);objectKey=objectKeyList[index];objectValue=object[objectKey];if(!writeNode(state,level+1,objectKey,true,true,true))continue;explicitPair=state.tag!==null&&state.tag!=="?"||state.dump&&state.dump.length>1024;if(explicitPair)if(state.dump&&
    CHAR_LINE_FEED===state.dump.charCodeAt(0))pairBuffer+="?";else pairBuffer+="? ";pairBuffer+=state.dump;if(explicitPair)pairBuffer+=generateNextLine(state,level);if(!writeNode(state,level+1,objectValue,true,explicitPair))continue;if(state.dump&&CHAR_LINE_FEED===state.dump.charCodeAt(0))pairBuffer+=":";else pairBuffer+=": ";pairBuffer+=state.dump;_result+=pairBuffer}state.tag=_tag;state.dump=_result||"{}"}function detectType(state,object,explicit){var _result,typeList,index,length,type,style;typeList=
    explicit?state.explicitTypes:state.implicitTypes;for(index=0,length=typeList.length;index<length;index+=1){type=typeList[index];if((type.instanceOf||type.predicate)&&(!type.instanceOf||typeof object==="object"&&object instanceof type.instanceOf)&&(!type.predicate||type.predicate(object))){state.tag=explicit?type.tag:"?";if(type.represent){style=state.styleMap[type.tag]||type.defaultStyle;if(_toString.call(type.represent)==="[object Function]")_result=type.represent(object,style);else if(_hasOwnProperty.call(type.represent,
    style))_result=type.represent[style](object,style);else throw new YAMLException("!\x3c"+type.tag+'\x3e tag resolver accepts not "'+style+'" style');state.dump=_result}return true}}return false}function writeNode(state,level,object,block,compact,iskey){state.tag=null;state.dump=object;if(!detectType(state,object,false))detectType(state,object,true);var type=_toString.call(state.dump);if(block)block=state.flowLevel<0||state.flowLevel>level;var objectOrArray=type==="[object Object]"||type==="[object Array]",
    duplicateIndex,duplicate;if(objectOrArray){duplicateIndex=state.duplicates.indexOf(object);duplicate=duplicateIndex!==-1}if(state.tag!==null&&state.tag!=="?"||duplicate||state.indent!==2&&level>0)compact=false;if(duplicate&&state.usedDuplicates[duplicateIndex])state.dump="*ref_"+duplicateIndex;else{if(objectOrArray&&duplicate&&!state.usedDuplicates[duplicateIndex])state.usedDuplicates[duplicateIndex]=true;if(type==="[object Object]")if(block&&Object.keys(state.dump).length!==0){writeBlockMapping(state,
    level,state.dump,compact);if(duplicate)state.dump="\x26ref_"+duplicateIndex+state.dump}else{writeFlowMapping(state,level,state.dump);if(duplicate)state.dump="\x26ref_"+duplicateIndex+" "+state.dump}else if(type==="[object Array]")if(block&&state.dump.length!==0){writeBlockSequence(state,level,state.dump,compact);if(duplicate)state.dump="\x26ref_"+duplicateIndex+state.dump}else{writeFlowSequence(state,level,state.dump);if(duplicate)state.dump="\x26ref_"+duplicateIndex+" "+state.dump}else if(type===
    "[object String]"){if(state.tag!=="?")writeScalar(state,state.dump,level,iskey)}else{if(state.skipInvalid)return false;throw new YAMLException("unacceptable kind of an object to dump "+type);}if(state.tag!==null&&state.tag!=="?")state.dump="!\x3c"+state.tag+"\x3e "+state.dump}return true}function getDuplicateReferences(object,state){var objects=[],duplicatesIndexes=[],index,length;inspectNode(object,objects,duplicatesIndexes);for(index=0,length=duplicatesIndexes.length;index<length;index+=1)state.duplicates.push(objects[duplicatesIndexes[index]]);
    state.usedDuplicates=new Array(length)}function inspectNode(object,objects,duplicatesIndexes){var objectKeyList,index,length;if(object!==null&&typeof object==="object"){index=objects.indexOf(object);if(index!==-1){if(duplicatesIndexes.indexOf(index)===-1)duplicatesIndexes.push(index)}else{objects.push(object);if(Array.isArray(object))for(index=0,length=object.length;index<length;index+=1)inspectNode(object[index],objects,duplicatesIndexes);else{objectKeyList=Object.keys(object);for(index=0,length=
    objectKeyList.length;index<length;index+=1)inspectNode(object[objectKeyList[index]],objects,duplicatesIndexes)}}}}function dump(input,options){options=options||{};var state=new State(options);if(!state.noRefs)getDuplicateReferences(input,state);if(writeNode(state,0,input,true,true))return state.dump+"\n";return""}function safeDump(input,options){return dump(input,common.extend({schema:DEFAULT_SAFE_SCHEMA},options))}module.exports.dump=dump;module.exports.safeDump=safeDump},{"./common":38,"./exception":40,
    "./schema/default_full":45,"./schema/default_safe":46}],40:[function(_dereq_,module,exports){function YAMLException(reason,mark){Error.call(this);this.name="YAMLException";this.reason=reason;this.mark=mark;this.message=(this.reason||"(unknown reason)")+(this.mark?" "+this.mark.toString():"");if(Error.captureStackTrace)Error.captureStackTrace(this,this.constructor);else this.stack=(new Error).stack||""}YAMLException.prototype=Object.create(Error.prototype);YAMLException.prototype.constructor=YAMLException;
    YAMLException.prototype.toString=function toString(compact){var result=this.name+": ";result+=this.reason||"(unknown reason)";if(!compact&&this.mark)result+=" "+this.mark.toString();return result};module.exports=YAMLException},{}],41:[function(_dereq_,module,exports){var common=_dereq_("./common");var YAMLException=_dereq_("./exception");var Mark=_dereq_("./mark");var DEFAULT_SAFE_SCHEMA=_dereq_("./schema/default_safe");var DEFAULT_FULL_SCHEMA=_dereq_("./schema/default_full");var _hasOwnProperty=
    Object.prototype.hasOwnProperty;var CONTEXT_FLOW_IN=1;var CONTEXT_FLOW_OUT=2;var CONTEXT_BLOCK_IN=3;var CONTEXT_BLOCK_OUT=4;var CHOMPING_CLIP=1;var CHOMPING_STRIP=2;var CHOMPING_KEEP=3;var PATTERN_NON_PRINTABLE=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/;var PATTERN_NON_ASCII_LINE_BREAKS=/[\x85\u2028\u2029]/;var PATTERN_FLOW_INDICATORS=/[,\[\]\{\}]/;var PATTERN_TAG_HANDLE=/^(?:!|!!|![a-z\-]+!)$/i;var PATTERN_TAG_URI=
    /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function is_EOL(c){return c===10||c===13}function is_WHITE_SPACE(c){return c===9||c===32}function is_WS_OR_EOL(c){return c===9||c===32||c===10||c===13}function is_FLOW_INDICATOR(c){return c===44||c===91||c===93||c===123||c===125}function fromHexCode(c){var lc;if(48<=c&&c<=57)return c-48;lc=c|32;if(97<=lc&&lc<=102)return lc-97+10;return-1}function escapedHexLen(c){if(c===120)return 2;if(c===117)return 4;if(c===85)return 8;
    return 0}function fromDecimalCode(c){if(48<=c&&c<=57)return c-48;return-1}function simpleEscapeSequence(c){return c===48?"\x00":c===97?"\u0007":c===98?"\b":c===116?"\t":c===9?"\t":c===110?"\n":c===118?"\x0B":c===102?"\f":c===114?"\r":c===101?"\u001b":c===32?" ":c===34?'"':c===47?"/":c===92?"\\":c===78?"\u0085":c===95?"\u00a0":c===76?"\u2028":c===80?"\u2029":""}function charFromCodepoint(c){if(c<=65535)return String.fromCharCode(c);return String.fromCharCode((c-65536>>10)+55296,(c-65536&1023)+56320)}
    var simpleEscapeCheck=new Array(256);var simpleEscapeMap=new Array(256);for(var i=0;i<256;i++){simpleEscapeCheck[i]=simpleEscapeSequence(i)?1:0;simpleEscapeMap[i]=simpleEscapeSequence(i)}function State(input,options){this.input=input;this.filename=options["filename"]||null;this.schema=options["schema"]||DEFAULT_FULL_SCHEMA;this.onWarning=options["onWarning"]||null;this.legacy=options["legacy"]||false;this.json=options["json"]||false;this.listener=options["listener"]||null;this.implicitTypes=this.schema.compiledImplicit;
    this.typeMap=this.schema.compiledTypeMap;this.length=input.length;this.position=0;this.line=0;this.lineStart=0;this.lineIndent=0;this.documents=[]}function generateError(state,message){return new YAMLException(message,new Mark(state.filename,state.input,state.position,state.line,state.position-state.lineStart))}function throwError(state,message){throw generateError(state,message);}function throwWarning(state,message){if(state.onWarning)state.onWarning.call(null,generateError(state,message))}var directiveHandlers=
    {YAML:function handleYamlDirective(state,name,args){var match,major,minor;if(state.version!==null)throwError(state,"duplication of %YAML directive");if(args.length!==1)throwError(state,"YAML directive accepts exactly one argument");match=/^([0-9]+)\.([0-9]+)$/.exec(args[0]);if(match===null)throwError(state,"ill-formed argument of the YAML directive");major=parseInt(match[1],10);minor=parseInt(match[2],10);if(major!==1)throwError(state,"unacceptable YAML version of the document");state.version=args[0];
    state.checkLineBreaks=minor<2;if(minor!==1&&minor!==2)throwWarning(state,"unsupported YAML version of the document")},TAG:function handleTagDirective(state,name,args){var handle,prefix;if(args.length!==2)throwError(state,"TAG directive accepts exactly two arguments");handle=args[0];prefix=args[1];if(!PATTERN_TAG_HANDLE.test(handle))throwError(state,"ill-formed tag handle (first argument) of the TAG directive");if(_hasOwnProperty.call(state.tagMap,handle))throwError(state,'there is a previously declared suffix for "'+
    handle+'" tag handle');if(!PATTERN_TAG_URI.test(prefix))throwError(state,"ill-formed tag prefix (second argument) of the TAG directive");state.tagMap[handle]=prefix}};function captureSegment(state,start,end,checkJson){var _position,_length,_character,_result;if(start<end){_result=state.input.slice(start,end);if(checkJson)for(_position=0,_length=_result.length;_position<_length;_position+=1){_character=_result.charCodeAt(_position);if(!(_character===9||32<=_character&&_character<=1114111))throwError(state,
    "expected valid JSON character")}else if(PATTERN_NON_PRINTABLE.test(_result))throwError(state,"the stream contains non-printable characters");state.result+=_result}}function mergeMappings(state,destination,source,overridableKeys){var sourceKeys,key,index,quantity;if(!common.isObject(source))throwError(state,"cannot merge mappings; the provided source object is unacceptable");sourceKeys=Object.keys(source);for(index=0,quantity=sourceKeys.length;index<quantity;index+=1){key=sourceKeys[index];if(!_hasOwnProperty.call(destination,
    key)){destination[key]=source[key];overridableKeys[key]=true}}}function storeMappingPair(state,_result,overridableKeys,keyTag,keyNode,valueNode,startLine,startPos){var index,quantity;keyNode=String(keyNode);if(_result===null)_result={};if(keyTag==="tag:yaml.org,2002:merge")if(Array.isArray(valueNode))for(index=0,quantity=valueNode.length;index<quantity;index+=1)mergeMappings(state,_result,valueNode[index],overridableKeys);else mergeMappings(state,_result,valueNode,overridableKeys);else{if(!state.json&&
    !_hasOwnProperty.call(overridableKeys,keyNode)&&_hasOwnProperty.call(_result,keyNode)){state.line=startLine||state.line;state.position=startPos||state.position;throwError(state,"duplicated mapping key")}_result[keyNode]=valueNode;delete overridableKeys[keyNode]}return _result}function readLineBreak(state){var ch;ch=state.input.charCodeAt(state.position);if(ch===10)state.position++;else if(ch===13){state.position++;if(state.input.charCodeAt(state.position)===10)state.position++}else throwError(state,
    "a line break is expected");state.line+=1;state.lineStart=state.position}function skipSeparationSpace(state,allowComments,checkIndent){var lineBreaks=0,ch=state.input.charCodeAt(state.position);while(ch!==0){while(is_WHITE_SPACE(ch))ch=state.input.charCodeAt(++state.position);if(allowComments&&ch===35){do ch=state.input.charCodeAt(++state.position);while(ch!==10&&ch!==13&&ch!==0)}if(is_EOL(ch)){readLineBreak(state);ch=state.input.charCodeAt(state.position);lineBreaks++;state.lineIndent=0;while(ch===
    32){state.lineIndent++;ch=state.input.charCodeAt(++state.position)}}else break}if(checkIndent!==-1&&lineBreaks!==0&&state.lineIndent<checkIndent)throwWarning(state,"deficient indentation");return lineBreaks}function testDocumentSeparator(state){var _position=state.position,ch;ch=state.input.charCodeAt(_position);if((ch===45||ch===46)&&ch===state.input.charCodeAt(_position+1)&&ch===state.input.charCodeAt(_position+2)){_position+=3;ch=state.input.charCodeAt(_position);if(ch===0||is_WS_OR_EOL(ch))return true}return false}
    function writeFoldedLines(state,count){if(count===1)state.result+=" ";else if(count>1)state.result+=common.repeat("\n",count-1)}function readPlainScalar(state,nodeIndent,withinFlowCollection){var preceding,following,captureStart,captureEnd,hasPendingContent,_line,_lineStart,_lineIndent,_kind=state.kind,_result=state.result,ch;ch=state.input.charCodeAt(state.position);if(is_WS_OR_EOL(ch)||is_FLOW_INDICATOR(ch)||ch===35||ch===38||ch===42||ch===33||ch===124||ch===62||ch===39||ch===34||ch===37||ch===
    64||ch===96)return false;if(ch===63||ch===45){following=state.input.charCodeAt(state.position+1);if(is_WS_OR_EOL(following)||withinFlowCollection&&is_FLOW_INDICATOR(following))return false}state.kind="scalar";state.result="";captureStart=captureEnd=state.position;hasPendingContent=false;while(ch!==0){if(ch===58){following=state.input.charCodeAt(state.position+1);if(is_WS_OR_EOL(following)||withinFlowCollection&&is_FLOW_INDICATOR(following))break}else if(ch===35){preceding=state.input.charCodeAt(state.position-
    1);if(is_WS_OR_EOL(preceding))break}else if(state.position===state.lineStart&&testDocumentSeparator(state)||withinFlowCollection&&is_FLOW_INDICATOR(ch))break;else if(is_EOL(ch)){_line=state.line;_lineStart=state.lineStart;_lineIndent=state.lineIndent;skipSeparationSpace(state,false,-1);if(state.lineIndent>=nodeIndent){hasPendingContent=true;ch=state.input.charCodeAt(state.position);continue}else{state.position=captureEnd;state.line=_line;state.lineStart=_lineStart;state.lineIndent=_lineIndent;break}}if(hasPendingContent){captureSegment(state,
    captureStart,captureEnd,false);writeFoldedLines(state,state.line-_line);captureStart=captureEnd=state.position;hasPendingContent=false}if(!is_WHITE_SPACE(ch))captureEnd=state.position+1;ch=state.input.charCodeAt(++state.position)}captureSegment(state,captureStart,captureEnd,false);if(state.result)return true;state.kind=_kind;state.result=_result;return false}function readSingleQuotedScalar(state,nodeIndent){var ch,captureStart,captureEnd;ch=state.input.charCodeAt(state.position);if(ch!==39)return false;
    state.kind="scalar";state.result="";state.position++;captureStart=captureEnd=state.position;while((ch=state.input.charCodeAt(state.position))!==0)if(ch===39){captureSegment(state,captureStart,state.position,true);ch=state.input.charCodeAt(++state.position);if(ch===39){captureStart=state.position;state.position++;captureEnd=state.position}else return true}else if(is_EOL(ch)){captureSegment(state,captureStart,captureEnd,true);writeFoldedLines(state,skipSeparationSpace(state,false,nodeIndent));captureStart=
    captureEnd=state.position}else if(state.position===state.lineStart&&testDocumentSeparator(state))throwError(state,"unexpected end of the document within a single quoted scalar");else{state.position++;captureEnd=state.position}throwError(state,"unexpected end of the stream within a single quoted scalar")}function readDoubleQuotedScalar(state,nodeIndent){var captureStart,captureEnd,hexLength,hexResult,tmp,ch;ch=state.input.charCodeAt(state.position);if(ch!==34)return false;state.kind="scalar";state.result=
    "";state.position++;captureStart=captureEnd=state.position;while((ch=state.input.charCodeAt(state.position))!==0)if(ch===34){captureSegment(state,captureStart,state.position,true);state.position++;return true}else if(ch===92){captureSegment(state,captureStart,state.position,true);ch=state.input.charCodeAt(++state.position);if(is_EOL(ch))skipSeparationSpace(state,false,nodeIndent);else if(ch<256&&simpleEscapeCheck[ch]){state.result+=simpleEscapeMap[ch];state.position++}else if((tmp=escapedHexLen(ch))>
    0){hexLength=tmp;hexResult=0;for(;hexLength>0;hexLength--){ch=state.input.charCodeAt(++state.position);if((tmp=fromHexCode(ch))>=0)hexResult=(hexResult<<4)+tmp;else throwError(state,"expected hexadecimal character")}state.result+=charFromCodepoint(hexResult);state.position++}else throwError(state,"unknown escape sequence");captureStart=captureEnd=state.position}else if(is_EOL(ch)){captureSegment(state,captureStart,captureEnd,true);writeFoldedLines(state,skipSeparationSpace(state,false,nodeIndent));
    captureStart=captureEnd=state.position}else if(state.position===state.lineStart&&testDocumentSeparator(state))throwError(state,"unexpected end of the document within a double quoted scalar");else{state.position++;captureEnd=state.position}throwError(state,"unexpected end of the stream within a double quoted scalar")}function readFlowCollection(state,nodeIndent){var readNext=true,_line,_tag=state.tag,_result,_anchor=state.anchor,following,terminator,isPair,isExplicitPair,isMapping,overridableKeys=
    {},keyNode,keyTag,valueNode,ch;ch=state.input.charCodeAt(state.position);if(ch===91){terminator=93;isMapping=false;_result=[]}else if(ch===123){terminator=125;isMapping=true;_result={}}else return false;if(state.anchor!==null)state.anchorMap[state.anchor]=_result;ch=state.input.charCodeAt(++state.position);while(ch!==0){skipSeparationSpace(state,true,nodeIndent);ch=state.input.charCodeAt(state.position);if(ch===terminator){state.position++;state.tag=_tag;state.anchor=_anchor;state.kind=isMapping?
    "mapping":"sequence";state.result=_result;return true}else if(!readNext)throwError(state,"missed comma between flow collection entries");keyTag=keyNode=valueNode=null;isPair=isExplicitPair=false;if(ch===63){following=state.input.charCodeAt(state.position+1);if(is_WS_OR_EOL(following)){isPair=isExplicitPair=true;state.position++;skipSeparationSpace(state,true,nodeIndent)}}_line=state.line;composeNode(state,nodeIndent,CONTEXT_FLOW_IN,false,true);keyTag=state.tag;keyNode=state.result;skipSeparationSpace(state,
    true,nodeIndent);ch=state.input.charCodeAt(state.position);if((isExplicitPair||state.line===_line)&&ch===58){isPair=true;ch=state.input.charCodeAt(++state.position);skipSeparationSpace(state,true,nodeIndent);composeNode(state,nodeIndent,CONTEXT_FLOW_IN,false,true);valueNode=state.result}if(isMapping)storeMappingPair(state,_result,overridableKeys,keyTag,keyNode,valueNode);else if(isPair)_result.push(storeMappingPair(state,null,overridableKeys,keyTag,keyNode,valueNode));else _result.push(keyNode);skipSeparationSpace(state,
    true,nodeIndent);ch=state.input.charCodeAt(state.position);if(ch===44){readNext=true;ch=state.input.charCodeAt(++state.position)}else readNext=false}throwError(state,"unexpected end of the stream within a flow collection")}function readBlockScalar(state,nodeIndent){var captureStart,folding,chomping=CHOMPING_CLIP,didReadContent=false,detectedIndent=false,textIndent=nodeIndent,emptyLines=0,atMoreIndented=false,tmp,ch;ch=state.input.charCodeAt(state.position);if(ch===124)folding=false;else if(ch===62)folding=
    true;else return false;state.kind="scalar";state.result="";while(ch!==0){ch=state.input.charCodeAt(++state.position);if(ch===43||ch===45)if(CHOMPING_CLIP===chomping)chomping=ch===43?CHOMPING_KEEP:CHOMPING_STRIP;else throwError(state,"repeat of a chomping mode identifier");else if((tmp=fromDecimalCode(ch))>=0)if(tmp===0)throwError(state,"bad explicit indentation width of a block scalar; it cannot be less than one");else if(!detectedIndent){textIndent=nodeIndent+tmp-1;detectedIndent=true}else throwError(state,
    "repeat of an indentation width identifier");else break}if(is_WHITE_SPACE(ch)){do ch=state.input.charCodeAt(++state.position);while(is_WHITE_SPACE(ch));if(ch===35){do ch=state.input.charCodeAt(++state.position);while(!is_EOL(ch)&&ch!==0)}}while(ch!==0){readLineBreak(state);state.lineIndent=0;ch=state.input.charCodeAt(state.position);while((!detectedIndent||state.lineIndent<textIndent)&&ch===32){state.lineIndent++;ch=state.input.charCodeAt(++state.position)}if(!detectedIndent&&state.lineIndent>textIndent)textIndent=
    state.lineIndent;if(is_EOL(ch)){emptyLines++;continue}if(state.lineIndent<textIndent){if(chomping===CHOMPING_KEEP)state.result+=common.repeat("\n",didReadContent?1+emptyLines:emptyLines);else if(chomping===CHOMPING_CLIP)if(didReadContent)state.result+="\n";break}if(folding)if(is_WHITE_SPACE(ch)){atMoreIndented=true;state.result+=common.repeat("\n",didReadContent?1+emptyLines:emptyLines)}else if(atMoreIndented){atMoreIndented=false;state.result+=common.repeat("\n",emptyLines+1)}else if(emptyLines===
    0){if(didReadContent)state.result+=" "}else state.result+=common.repeat("\n",emptyLines);else state.result+=common.repeat("\n",didReadContent?1+emptyLines:emptyLines);didReadContent=true;detectedIndent=true;emptyLines=0;captureStart=state.position;while(!is_EOL(ch)&&ch!==0)ch=state.input.charCodeAt(++state.position);captureSegment(state,captureStart,state.position,false)}return true}function readBlockSequence(state,nodeIndent){var _line,_tag=state.tag,_anchor=state.anchor,_result=[],following,detected=
    false,ch;if(state.anchor!==null)state.anchorMap[state.anchor]=_result;ch=state.input.charCodeAt(state.position);while(ch!==0){if(ch!==45)break;following=state.input.charCodeAt(state.position+1);if(!is_WS_OR_EOL(following))break;detected=true;state.position++;if(skipSeparationSpace(state,true,-1))if(state.lineIndent<=nodeIndent){_result.push(null);ch=state.input.charCodeAt(state.position);continue}_line=state.line;composeNode(state,nodeIndent,CONTEXT_BLOCK_IN,false,true);_result.push(state.result);
    skipSeparationSpace(state,true,-1);ch=state.input.charCodeAt(state.position);if((state.line===_line||state.lineIndent>nodeIndent)&&ch!==0)throwError(state,"bad indentation of a sequence entry");else if(state.lineIndent<nodeIndent)break}if(detected){state.tag=_tag;state.anchor=_anchor;state.kind="sequence";state.result=_result;return true}return false}function readBlockMapping(state,nodeIndent,flowIndent){var following,allowCompact,_line,_pos,_tag=state.tag,_anchor=state.anchor,_result={},overridableKeys=
    {},keyTag=null,keyNode=null,valueNode=null,atExplicitKey=false,detected=false,ch;if(state.anchor!==null)state.anchorMap[state.anchor]=_result;ch=state.input.charCodeAt(state.position);while(ch!==0){following=state.input.charCodeAt(state.position+1);_line=state.line;_pos=state.position;if((ch===63||ch===58)&&is_WS_OR_EOL(following)){if(ch===63){if(atExplicitKey){storeMappingPair(state,_result,overridableKeys,keyTag,keyNode,null);keyTag=keyNode=valueNode=null}detected=true;atExplicitKey=true;allowCompact=
    true}else if(atExplicitKey){atExplicitKey=false;allowCompact=true}else throwError(state,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line");state.position+=1;ch=following}else if(composeNode(state,flowIndent,CONTEXT_FLOW_OUT,false,true))if(state.line===_line){ch=state.input.charCodeAt(state.position);while(is_WHITE_SPACE(ch))ch=state.input.charCodeAt(++state.position);if(ch===58){ch=state.input.charCodeAt(++state.position);if(!is_WS_OR_EOL(ch))throwError(state,
    "a whitespace character is expected after the key-value separator within a block mapping");if(atExplicitKey){storeMappingPair(state,_result,overridableKeys,keyTag,keyNode,null);keyTag=keyNode=valueNode=null}detected=true;atExplicitKey=false;allowCompact=false;keyTag=state.tag;keyNode=state.result}else if(detected)throwError(state,"can not read an implicit mapping pair; a colon is missed");else{state.tag=_tag;state.anchor=_anchor;return true}}else if(detected)throwError(state,"can not read a block mapping entry; a multiline key may not be an implicit key");
    else{state.tag=_tag;state.anchor=_anchor;return true}else break;if(state.line===_line||state.lineIndent>nodeIndent){if(composeNode(state,nodeIndent,CONTEXT_BLOCK_OUT,true,allowCompact))if(atExplicitKey)keyNode=state.result;else valueNode=state.result;if(!atExplicitKey){storeMappingPair(state,_result,overridableKeys,keyTag,keyNode,valueNode,_line,_pos);keyTag=keyNode=valueNode=null}skipSeparationSpace(state,true,-1);ch=state.input.charCodeAt(state.position)}if(state.lineIndent>nodeIndent&&ch!==0)throwError(state,
    "bad indentation of a mapping entry");else if(state.lineIndent<nodeIndent)break}if(atExplicitKey)storeMappingPair(state,_result,overridableKeys,keyTag,keyNode,null);if(detected){state.tag=_tag;state.anchor=_anchor;state.kind="mapping";state.result=_result}return detected}function readTagProperty(state){var _position,isVerbatim=false,isNamed=false,tagHandle,tagName,ch;ch=state.input.charCodeAt(state.position);if(ch!==33)return false;if(state.tag!==null)throwError(state,"duplication of a tag property");
    ch=state.input.charCodeAt(++state.position);if(ch===60){isVerbatim=true;ch=state.input.charCodeAt(++state.position)}else if(ch===33){isNamed=true;tagHandle="!!";ch=state.input.charCodeAt(++state.position)}else tagHandle="!";_position=state.position;if(isVerbatim){do ch=state.input.charCodeAt(++state.position);while(ch!==0&&ch!==62);if(state.position<state.length){tagName=state.input.slice(_position,state.position);ch=state.input.charCodeAt(++state.position)}else throwError(state,"unexpected end of the stream within a verbatim tag")}else{while(ch!==
    0&&!is_WS_OR_EOL(ch)){if(ch===33)if(!isNamed){tagHandle=state.input.slice(_position-1,state.position+1);if(!PATTERN_TAG_HANDLE.test(tagHandle))throwError(state,"named tag handle cannot contain such characters");isNamed=true;_position=state.position+1}else throwError(state,"tag suffix cannot contain exclamation marks");ch=state.input.charCodeAt(++state.position)}tagName=state.input.slice(_position,state.position);if(PATTERN_FLOW_INDICATORS.test(tagName))throwError(state,"tag suffix cannot contain flow indicator characters")}if(tagName&&
    !PATTERN_TAG_URI.test(tagName))throwError(state,"tag name cannot contain such characters: "+tagName);if(isVerbatim)state.tag=tagName;else if(_hasOwnProperty.call(state.tagMap,tagHandle))state.tag=state.tagMap[tagHandle]+tagName;else if(tagHandle==="!")state.tag="!"+tagName;else if(tagHandle==="!!")state.tag="tag:yaml.org,2002:"+tagName;else throwError(state,'undeclared tag handle "'+tagHandle+'"');return true}function readAnchorProperty(state){var _position,ch;ch=state.input.charCodeAt(state.position);
    if(ch!==38)return false;if(state.anchor!==null)throwError(state,"duplication of an anchor property");ch=state.input.charCodeAt(++state.position);_position=state.position;while(ch!==0&&!is_WS_OR_EOL(ch)&&!is_FLOW_INDICATOR(ch))ch=state.input.charCodeAt(++state.position);if(state.position===_position)throwError(state,"name of an anchor node must contain at least one character");state.anchor=state.input.slice(_position,state.position);return true}function readAlias(state){var _position,alias,ch;ch=state.input.charCodeAt(state.position);
    if(ch!==42)return false;ch=state.input.charCodeAt(++state.position);_position=state.position;while(ch!==0&&!is_WS_OR_EOL(ch)&&!is_FLOW_INDICATOR(ch))ch=state.input.charCodeAt(++state.position);if(state.position===_position)throwError(state,"name of an alias node must contain at least one character");alias=state.input.slice(_position,state.position);if(!state.anchorMap.hasOwnProperty(alias))throwError(state,'unidentified alias "'+alias+'"');state.result=state.anchorMap[alias];skipSeparationSpace(state,
    true,-1);return true}function composeNode(state,parentIndent,nodeContext,allowToSeek,allowCompact){var allowBlockStyles,allowBlockScalars,allowBlockCollections,indentStatus=1,atNewLine=false,hasContent=false,typeIndex,typeQuantity,type,flowIndent,blockIndent;if(state.listener!==null)state.listener("open",state);state.tag=null;state.anchor=null;state.kind=null;state.result=null;allowBlockStyles=allowBlockScalars=allowBlockCollections=CONTEXT_BLOCK_OUT===nodeContext||CONTEXT_BLOCK_IN===nodeContext;
    if(allowToSeek)if(skipSeparationSpace(state,true,-1)){atNewLine=true;if(state.lineIndent>parentIndent)indentStatus=1;else if(state.lineIndent===parentIndent)indentStatus=0;else if(state.lineIndent<parentIndent)indentStatus=-1}if(indentStatus===1)while(readTagProperty(state)||readAnchorProperty(state))if(skipSeparationSpace(state,true,-1)){atNewLine=true;allowBlockCollections=allowBlockStyles;if(state.lineIndent>parentIndent)indentStatus=1;else if(state.lineIndent===parentIndent)indentStatus=0;else if(state.lineIndent<
    parentIndent)indentStatus=-1}else allowBlockCollections=false;if(allowBlockCollections)allowBlockCollections=atNewLine||allowCompact;if(indentStatus===1||CONTEXT_BLOCK_OUT===nodeContext){if(CONTEXT_FLOW_IN===nodeContext||CONTEXT_FLOW_OUT===nodeContext)flowIndent=parentIndent;else flowIndent=parentIndent+1;blockIndent=state.position-state.lineStart;if(indentStatus===1)if(allowBlockCollections&&(readBlockSequence(state,blockIndent)||readBlockMapping(state,blockIndent,flowIndent))||readFlowCollection(state,
    flowIndent))hasContent=true;else{if(allowBlockScalars&&readBlockScalar(state,flowIndent)||readSingleQuotedScalar(state,flowIndent)||readDoubleQuotedScalar(state,flowIndent))hasContent=true;else if(readAlias(state)){hasContent=true;if(state.tag!==null||state.anchor!==null)throwError(state,"alias node should not have any properties")}else if(readPlainScalar(state,flowIndent,CONTEXT_FLOW_IN===nodeContext)){hasContent=true;if(state.tag===null)state.tag="?"}if(state.anchor!==null)state.anchorMap[state.anchor]=
    state.result}else if(indentStatus===0)hasContent=allowBlockCollections&&readBlockSequence(state,blockIndent)}if(state.tag!==null&&state.tag!=="!")if(state.tag==="?")for(typeIndex=0,typeQuantity=state.implicitTypes.length;typeIndex<typeQuantity;typeIndex+=1){type=state.implicitTypes[typeIndex];if(type.resolve(state.result)){state.result=type.construct(state.result);state.tag=type.tag;if(state.anchor!==null)state.anchorMap[state.anchor]=state.result;break}}else if(_hasOwnProperty.call(state.typeMap[state.kind||
    "fallback"],state.tag)){type=state.typeMap[state.kind||"fallback"][state.tag];if(state.result!==null&&type.kind!==state.kind)throwError(state,"unacceptable node kind for !\x3c"+state.tag+'\x3e tag; it should be "'+type.kind+'", not "'+state.kind+'"');if(!type.resolve(state.result))throwError(state,"cannot resolve a node with !\x3c"+state.tag+"\x3e explicit tag");else{state.result=type.construct(state.result);if(state.anchor!==null)state.anchorMap[state.anchor]=state.result}}else throwError(state,
    "unknown tag !\x3c"+state.tag+"\x3e");if(state.listener!==null)state.listener("close",state);return state.tag!==null||state.anchor!==null||hasContent}function readDocument(state){var documentStart=state.position,_position,directiveName,directiveArgs,hasDirectives=false,ch;state.version=null;state.checkLineBreaks=state.legacy;state.tagMap={};state.anchorMap={};while((ch=state.input.charCodeAt(state.position))!==0){skipSeparationSpace(state,true,-1);ch=state.input.charCodeAt(state.position);if(state.lineIndent>
    0||ch!==37)break;hasDirectives=true;ch=state.input.charCodeAt(++state.position);_position=state.position;while(ch!==0&&!is_WS_OR_EOL(ch))ch=state.input.charCodeAt(++state.position);directiveName=state.input.slice(_position,state.position);directiveArgs=[];if(directiveName.length<1)throwError(state,"directive name must not be less than one character in length");while(ch!==0){while(is_WHITE_SPACE(ch))ch=state.input.charCodeAt(++state.position);if(ch===35){do ch=state.input.charCodeAt(++state.position);
    while(ch!==0&&!is_EOL(ch));break}if(is_EOL(ch))break;_position=state.position;while(ch!==0&&!is_WS_OR_EOL(ch))ch=state.input.charCodeAt(++state.position);directiveArgs.push(state.input.slice(_position,state.position))}if(ch!==0)readLineBreak(state);if(_hasOwnProperty.call(directiveHandlers,directiveName))directiveHandlers[directiveName](state,directiveName,directiveArgs);else throwWarning(state,'unknown document directive "'+directiveName+'"')}skipSeparationSpace(state,true,-1);if(state.lineIndent===
    0&&state.input.charCodeAt(state.position)===45&&state.input.charCodeAt(state.position+1)===45&&state.input.charCodeAt(state.position+2)===45){state.position+=3;skipSeparationSpace(state,true,-1)}else if(hasDirectives)throwError(state,"directives end mark is expected");composeNode(state,state.lineIndent-1,CONTEXT_BLOCK_OUT,false,true);skipSeparationSpace(state,true,-1);if(state.checkLineBreaks&&PATTERN_NON_ASCII_LINE_BREAKS.test(state.input.slice(documentStart,state.position)))throwWarning(state,"non-ASCII line breaks are interpreted as content");
    state.documents.push(state.result);if(state.position===state.lineStart&&testDocumentSeparator(state)){if(state.input.charCodeAt(state.position)===46){state.position+=3;skipSeparationSpace(state,true,-1)}return}if(state.position<state.length-1)throwError(state,"end of the stream or a document separator is expected");else return}function loadDocuments(input,options){input=String(input);options=options||{};if(input.length!==0){if(input.charCodeAt(input.length-1)!==10&&input.charCodeAt(input.length-1)!==
    13)input+="\n";if(input.charCodeAt(0)===65279)input=input.slice(1)}var state=new State(input,options);state.input+="\x00";while(state.input.charCodeAt(state.position)===32){state.lineIndent+=1;state.position+=1}while(state.position<state.length-1)readDocument(state);return state.documents}function loadAll(input,iterator,options){var documents=loadDocuments(input,options),index,length;if(typeof iterator!=="function")return documents;for(index=0,length=documents.length;index<length;index+=1)iterator(documents[index])}
    function load(input,options){var documents=loadDocuments(input,options);if(documents.length===0)return undefined;else if(documents.length===1)return documents[0];throw new YAMLException("expected a single document in the stream, but found more");}function safeLoadAll(input,output,options){if(typeof output==="function")loadAll(input,output,common.extend({schema:DEFAULT_SAFE_SCHEMA},options));else return loadAll(input,common.extend({schema:DEFAULT_SAFE_SCHEMA},options))}function safeLoad(input,options){return load(input,
    common.extend({schema:DEFAULT_SAFE_SCHEMA},options))}module.exports.loadAll=loadAll;module.exports.load=load;module.exports.safeLoadAll=safeLoadAll;module.exports.safeLoad=safeLoad},{"./common":38,"./exception":40,"./mark":42,"./schema/default_full":45,"./schema/default_safe":46}],42:[function(_dereq_,module,exports){var common=_dereq_("./common");function Mark(name,buffer,position,line,column){this.name=name;this.buffer=buffer;this.position=position;this.line=line;this.column=column}Mark.prototype.getSnippet=
    function getSnippet(indent,maxLength){var head,start,tail,end,snippet;if(!this.buffer)return null;indent=indent||4;maxLength=maxLength||75;head="";start=this.position;while(start>0&&"\x00\r\n\u0085\u2028\u2029".indexOf(this.buffer.charAt(start-1))===-1){start-=1;if(this.position-start>maxLength/2-1){head=" ... ";start+=5;break}}tail="";end=this.position;while(end<this.buffer.length&&"\x00\r\n\u0085\u2028\u2029".indexOf(this.buffer.charAt(end))===-1){end+=1;if(end-this.position>maxLength/2-1){tail=
    " ... ";end-=5;break}}snippet=this.buffer.slice(start,end);return common.repeat(" ",indent)+head+snippet+tail+"\n"+common.repeat(" ",indent+this.position-start+head.length)+"^"};Mark.prototype.toString=function toString(compact){var snippet,where="";if(this.name)where+='in "'+this.name+'" ';where+="at line "+(this.line+1)+", column "+(this.column+1);if(!compact){snippet=this.getSnippet();if(snippet)where+=":\n"+snippet}return where};module.exports=Mark},{"./common":38}],43:[function(_dereq_,module,
    exports){var common=_dereq_("./common");var YAMLException=_dereq_("./exception");var Type=_dereq_("./type");function compileList(schema,name,result){var exclude=[];schema.include.forEach(function(includedSchema){result=compileList(includedSchema,name,result)});schema[name].forEach(function(currentType){result.forEach(function(previousType,previousIndex){if(previousType.tag===currentType.tag&&previousType.kind===currentType.kind)exclude.push(previousIndex)});result.push(currentType)});return result.filter(function(type,
    index){return exclude.indexOf(index)===-1})}function compileMap(){var result={scalar:{},sequence:{},mapping:{},fallback:{}},index,length;function collectType(type){result[type.kind][type.tag]=result["fallback"][type.tag]=type}for(index=0,length=arguments.length;index<length;index+=1)arguments[index].forEach(collectType);return result}function Schema(definition){this.include=definition.include||[];this.implicit=definition.implicit||[];this.explicit=definition.explicit||[];this.implicit.forEach(function(type){if(type.loadKind&&
    type.loadKind!=="scalar")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)}Schema.DEFAULT=null;Schema.create=function createSchema(){var schemas,types;switch(arguments.length){case 1:schemas=Schema.DEFAULT;types=arguments[0];
    break;case 2:schemas=arguments[0];types=arguments[1];break;default:throw new YAMLException("Wrong number of arguments for Schema.create function");}schemas=common.toArray(schemas);types=common.toArray(types);if(!schemas.every(function(schema){return schema instanceof Schema}))throw new YAMLException("Specified list of super schemas (or a single Schema object) contains a non-Schema object.");if(!types.every(function(type){return type instanceof Type}))throw new YAMLException("Specified list of YAML types (or a single Type object) contains a non-Type object.");
    return new Schema({include:schemas,explicit:types})};module.exports=Schema},{"./common":38,"./exception":40,"./type":49}],44:[function(_dereq_,module,exports){var Schema=_dereq_("../schema");module.exports=new Schema({include:[_dereq_("./json")]})},{"../schema":43,"./json":48}],45:[function(_dereq_,module,exports){var Schema=_dereq_("../schema");module.exports=Schema.DEFAULT=new Schema({include:[_dereq_("./default_safe")],explicit:[_dereq_("../type/js/undefined"),_dereq_("../type/js/regexp"),_dereq_("../type/js/function")]})},
    {"../schema":43,"../type/js/function":54,"../type/js/regexp":55,"../type/js/undefined":56,"./default_safe":46}],46:[function(_dereq_,module,exports){var Schema=_dereq_("../schema");module.exports=new Schema({include:[_dereq_("./core")],implicit:[_dereq_("../type/timestamp"),_dereq_("../type/merge")],explicit:[_dereq_("../type/binary"),_dereq_("../type/omap"),_dereq_("../type/pairs"),_dereq_("../type/set")]})},{"../schema":43,"../type/binary":50,"../type/merge":58,"../type/omap":60,"../type/pairs":61,
    "../type/set":63,"../type/timestamp":65,"./core":44}],47:[function(_dereq_,module,exports){var Schema=_dereq_("../schema");module.exports=new Schema({explicit:[_dereq_("../type/str"),_dereq_("../type/seq"),_dereq_("../type/map")]})},{"../schema":43,"../type/map":57,"../type/seq":62,"../type/str":64}],48:[function(_dereq_,module,exports){var Schema=_dereq_("../schema");module.exports=new Schema({include:[_dereq_("./failsafe")],implicit:[_dereq_("../type/null"),_dereq_("../type/bool"),_dereq_("../type/int"),
    _dereq_("../type/float")]})},{"../schema":43,"../type/bool":51,"../type/float":52,"../type/int":53,"../type/null":59,"./failsafe":47}],49:[function(_dereq_,module,exports){var YAMLException=_dereq_("./exception");var TYPE_CONSTRUCTOR_OPTIONS=["kind","resolve","construct","instanceOf","predicate","represent","defaultStyle","styleAliases"];var YAML_NODE_KINDS=["scalar","sequence","mapping"];function compileStyleAliases(map){var result={};if(map!==null)Object.keys(map).forEach(function(style){map[style].forEach(function(alias){result[String(alias)]=
    style})});return result}function Type(tag,options){options=options||{};Object.keys(options).forEach(function(name){if(TYPE_CONSTRUCTOR_OPTIONS.indexOf(name)===-1)throw new YAMLException('Unknown option "'+name+'" is met in definition of "'+tag+'" YAML type.');});this.tag=tag;this.kind=options["kind"]||null;this.resolve=options["resolve"]||function(){return true};this.construct=options["construct"]||function(data){return data};this.instanceOf=options["instanceOf"]||null;this.predicate=options["predicate"]||
    null;this.represent=options["represent"]||null;this.defaultStyle=options["defaultStyle"]||null;this.styleAliases=compileStyleAliases(options["styleAliases"]||null);if(YAML_NODE_KINDS.indexOf(this.kind)===-1)throw new YAMLException('Unknown kind "'+this.kind+'" is specified for "'+tag+'" YAML type.');}module.exports=Type},{"./exception":40}],50:[function(_dereq_,module,exports){var NodeBuffer;try{var _require=_dereq_;NodeBuffer=_require("buffer").Buffer}catch(__){}var Type=_dereq_("../type");var BASE64_MAP=
    "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\x3d\n\r";function resolveYamlBinary(data){if(data===null)return false;var code,idx,bitlen=0,max=data.length,map=BASE64_MAP;for(idx=0;idx<max;idx++){code=map.indexOf(data.charAt(idx));if(code>64)continue;if(code<0)return false;bitlen+=6}return bitlen%8===0}function constructYamlBinary(data){var idx,tailbits,input=data.replace(/[\r\n=]/g,""),max=input.length,map=BASE64_MAP,bits=0,result=[];for(idx=0;idx<max;idx++){if(idx%4===0&&idx){result.push(bits>>
    16&255);result.push(bits>>8&255);result.push(bits&255)}bits=bits<<6|map.indexOf(input.charAt(idx))}tailbits=max%4*6;if(tailbits===0){result.push(bits>>16&255);result.push(bits>>8&255);result.push(bits&255)}else if(tailbits===18){result.push(bits>>10&255);result.push(bits>>2&255)}else if(tailbits===12)result.push(bits>>4&255);if(NodeBuffer)return NodeBuffer.from?NodeBuffer.from(result):new NodeBuffer(result);return result}function representYamlBinary(object){var result="",bits=0,idx,tail,max=object.length,
    map=BASE64_MAP;for(idx=0;idx<max;idx++){if(idx%3===0&&idx){result+=map[bits>>18&63];result+=map[bits>>12&63];result+=map[bits>>6&63];result+=map[bits&63]}bits=(bits<<8)+object[idx]}tail=max%3;if(tail===0){result+=map[bits>>18&63];result+=map[bits>>12&63];result+=map[bits>>6&63];result+=map[bits&63]}else if(tail===2){result+=map[bits>>10&63];result+=map[bits>>4&63];result+=map[bits<<2&63];result+=map[64]}else if(tail===1){result+=map[bits>>2&63];result+=map[bits<<4&63];result+=map[64];result+=map[64]}return result}
    function isBinary(object){return NodeBuffer&&NodeBuffer.isBuffer(object)}module.exports=new Type("tag:yaml.org,2002:binary",{kind:"scalar",resolve:resolveYamlBinary,construct:constructYamlBinary,predicate:isBinary,represent:representYamlBinary})},{"../type":49}],51:[function(_dereq_,module,exports){var Type=_dereq_("../type");function resolveYamlBoolean(data){if(data===null)return false;var max=data.length;return max===4&&(data==="true"||data==="True"||data==="TRUE")||max===5&&(data==="false"||data===
    "False"||data==="FALSE")}function constructYamlBoolean(data){return data==="true"||data==="True"||data==="TRUE"}function isBoolean(object){return Object.prototype.toString.call(object)==="[object Boolean]"}module.exports=new Type("tag:yaml.org,2002:bool",{kind:"scalar",resolve:resolveYamlBoolean,construct:constructYamlBoolean,predicate:isBoolean,represent:{lowercase:function(object){return object?"true":"false"},uppercase:function(object){return object?"TRUE":"FALSE"},camelcase:function(object){return object?
    "True":"False"}},defaultStyle:"lowercase"})},{"../type":49}],52:[function(_dereq_,module,exports){var common=_dereq_("../common");var Type=_dereq_("../type");var 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))$");function resolveYamlFloat(data){if(data===null)return false;if(!YAML_FLOAT_PATTERN.test(data)||data[data.length-
    1]==="_")return false;return true}function constructYamlFloat(data){var value,sign,base,digits;value=data.replace(/_/g,"").toLowerCase();sign=value[0]==="-"?-1:1;digits=[];if("+-".indexOf(value[0])>=0)value=value.slice(1);if(value===".inf")return sign===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY;else if(value===".nan")return NaN;else if(value.indexOf(":")>=0){value.split(":").forEach(function(v){digits.unshift(parseFloat(v,10))});value=0;base=1;digits.forEach(function(d){value+=d*base;base*=
    60});return sign*value}return sign*parseFloat(value,10)}var SCIENTIFIC_WITHOUT_DOT=/^[-+]?[0-9]+e/;function representYamlFloat(object,style){var res;if(isNaN(object))switch(style){case "lowercase":return".nan";case "uppercase":return".NAN";case "camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===object)switch(style){case "lowercase":return".inf";case "uppercase":return".INF";case "camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===object)switch(style){case "lowercase":return"-.inf";
    case "uppercase":return"-.INF";case "camelcase":return"-.Inf"}else if(common.isNegativeZero(object))return"-0.0";res=object.toString(10);return SCIENTIFIC_WITHOUT_DOT.test(res)?res.replace("e",".e"):res}function isFloat(object){return Object.prototype.toString.call(object)==="[object Number]"&&(object%1!==0||common.isNegativeZero(object))}module.exports=new Type("tag:yaml.org,2002:float",{kind:"scalar",resolve:resolveYamlFloat,construct:constructYamlFloat,predicate:isFloat,represent:representYamlFloat,
    defaultStyle:"lowercase"})},{"../common":38,"../type":49}],53:[function(_dereq_,module,exports){var common=_dereq_("../common");var Type=_dereq_("../type");function isHexCode(c){return 48<=c&&c<=57||65<=c&&c<=70||97<=c&&c<=102}function isOctCode(c){return 48<=c&&c<=55}function isDecCode(c){return 48<=c&&c<=57}function resolveYamlInteger(data){if(data===null)return false;var max=data.length,index=0,hasDigits=false,ch;if(!max)return false;ch=data[index];if(ch==="-"||ch==="+")ch=data[++index];if(ch===
    "0"){if(index+1===max)return true;ch=data[++index];if(ch==="b"){index++;for(;index<max;index++){ch=data[index];if(ch==="_")continue;if(ch!=="0"&&ch!=="1")return false;hasDigits=true}return hasDigits&&ch!=="_"}if(ch==="x"){index++;for(;index<max;index++){ch=data[index];if(ch==="_")continue;if(!isHexCode(data.charCodeAt(index)))return false;hasDigits=true}return hasDigits&&ch!=="_"}for(;index<max;index++){ch=data[index];if(ch==="_")continue;if(!isOctCode(data.charCodeAt(index)))return false;hasDigits=
    true}return hasDigits&&ch!=="_"}if(ch==="_")return false;for(;index<max;index++){ch=data[index];if(ch==="_")continue;if(ch===":")break;if(!isDecCode(data.charCodeAt(index)))return false;hasDigits=true}if(!hasDigits||ch==="_")return false;if(ch!==":")return true;return/^(:[0-5]?[0-9])+$/.test(data.slice(index))}function constructYamlInteger(data){var value=data,sign=1,ch,base,digits=[];if(value.indexOf("_")!==-1)value=value.replace(/_/g,"");ch=value[0];if(ch==="-"||ch==="+"){if(ch==="-")sign=-1;value=
    value.slice(1);ch=value[0]}if(value==="0")return 0;if(ch==="0"){if(value[1]==="b")return sign*parseInt(value.slice(2),2);if(value[1]==="x")return sign*parseInt(value,16);return sign*parseInt(value,8)}if(value.indexOf(":")!==-1){value.split(":").forEach(function(v){digits.unshift(parseInt(v,10))});value=0;base=1;digits.forEach(function(d){value+=d*base;base*=60});return sign*value}return sign*parseInt(value,10)}function isInteger(object){return Object.prototype.toString.call(object)==="[object Number]"&&
    
    (object%1===0&&!common.isNegativeZero(object))}module.exports=new Type("tag:yaml.org,2002:int",{kind:"scalar",resolve:resolveYamlInteger,construct:constructYamlInteger,predicate:isInteger,represent:{binary:function(obj){return obj>=0?"0b"+obj.toString(2):"-0b"+obj.toString(2).slice(1)},octal:function(obj){return obj>=0?"0"+obj.toString(8):"-0"+obj.toString(8).slice(1)},decimal:function(obj){return obj.toString(10)},hexadecimal:function(obj){return obj>=0?"0x"+obj.toString(16).toUpperCase():"-0x"+
    obj.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}})},{"../common":38,"../type":49}],54:[function(_dereq_,module,exports){var esprima;try{var _require=_dereq_;esprima=_require("esprima")}catch(_){if(typeof window!=="undefined")esprima=window.esprima}var Type=_dereq_("../../type");function resolveJavascriptFunction(data){if(data===null)return false;try{var source="("+data+")",ast=esprima.parse(source,
    {range:true});if(ast.type!=="Program"||ast.body.length!==1||ast.body[0].type!=="ExpressionStatement"||ast.body[0].expression.type!=="ArrowFunctionExpression"&&ast.body[0].expression.type!=="FunctionExpression")return false;return true}catch(err){return false}}function constructJavascriptFunction(data){var source="("+data+")",ast=esprima.parse(source,{range:true}),params=[],body;if(ast.type!=="Program"||ast.body.length!==1||ast.body[0].type!=="ExpressionStatement"||ast.body[0].expression.type!=="ArrowFunctionExpression"&&
    ast.body[0].expression.type!=="FunctionExpression")throw new Error("Failed to resolve function");ast.body[0].expression.params.forEach(function(param){params.push(param.name)});body=ast.body[0].expression.body.range;return new Function(params,source.slice(body[0]+1,body[1]-1))}function representJavascriptFunction(object){return object.toString()}function isFunction(object){return Object.prototype.toString.call(object)==="[object Function]"}module.exports=new Type("tag:yaml.org,2002:js/function",{kind:"scalar",
    resolve:resolveJavascriptFunction,construct:constructJavascriptFunction,predicate:isFunction,represent:representJavascriptFunction})},{"../../type":49}],55:[function(_dereq_,module,exports){var Type=_dereq_("../../type");function resolveJavascriptRegExp(data){if(data===null)return false;if(data.length===0)return false;var regexp=data,tail=/\/([gim]*)$/.exec(data),modifiers="";if(regexp[0]==="/"){if(tail)modifiers=tail[1];if(modifiers.length>3)return false;if(regexp[regexp.length-modifiers.length-
    1]!=="/")return false}return true}function constructJavascriptRegExp(data){var regexp=data,tail=/\/([gim]*)$/.exec(data),modifiers="";if(regexp[0]==="/"){if(tail)modifiers=tail[1];regexp=regexp.slice(1,regexp.length-modifiers.length-1)}return new RegExp(regexp,modifiers)}function representJavascriptRegExp(object){var result="/"+object.source+"/";if(object.global)result+="g";if(object.multiline)result+="m";if(object.ignoreCase)result+="i";return result}function isRegExp(object){return Object.prototype.toString.call(object)===
    "[object RegExp]"}module.exports=new Type("tag:yaml.org,2002:js/regexp",{kind:"scalar",resolve:resolveJavascriptRegExp,construct:constructJavascriptRegExp,predicate:isRegExp,represent:representJavascriptRegExp})},{"../../type":49}],56:[function(_dereq_,module,exports){var Type=_dereq_("../../type");function resolveJavascriptUndefined(){return true}function constructJavascriptUndefined(){return undefined}function representJavascriptUndefined(){return""}function isUndefined(object){return typeof object===
    "undefined"}module.exports=new Type("tag:yaml.org,2002:js/undefined",{kind:"scalar",resolve:resolveJavascriptUndefined,construct:constructJavascriptUndefined,predicate:isUndefined,represent:representJavascriptUndefined})},{"../../type":49}],57:[function(_dereq_,module,exports){var Type=_dereq_("../type");module.exports=new Type("tag:yaml.org,2002:map",{kind:"mapping",construct:function(data){return data!==null?data:{}}})},{"../type":49}],58:[function(_dereq_,module,exports){var Type=_dereq_("../type");
    function resolveYamlMerge(data){return data==="\x3c\x3c"||data===null}module.exports=new Type("tag:yaml.org,2002:merge",{kind:"scalar",resolve:resolveYamlMerge})},{"../type":49}],59:[function(_dereq_,module,exports){var Type=_dereq_("../type");function resolveYamlNull(data){if(data===null)return true;var max=data.length;return max===1&&data==="~"||max===4&&(data==="null"||data==="Null"||data==="NULL")}function constructYamlNull(){return null}function isNull(object){return object===null}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":49}],60:[function(_dereq_,module,exports){var Type=_dereq_("../type");var _hasOwnProperty=Object.prototype.hasOwnProperty;var _toString=Object.prototype.toString;function resolveYamlOmap(data){if(data===
    null)return true;var objectKeys=[],index,length,pair,pairKey,pairHasKey,object=data;for(index=0,length=object.length;index<length;index+=1){pair=object[index];pairHasKey=false;if(_toString.call(pair)!=="[object Object]")return false;for(pairKey in pair)if(_hasOwnProperty.call(pair,pairKey))if(!pairHasKey)pairHasKey=true;else return false;if(!pairHasKey)return false;if(objectKeys.indexOf(pairKey)===-1)objectKeys.push(pairKey);else return false}return true}function constructYamlOmap(data){return data!==
    null?data:[]}module.exports=new Type("tag:yaml.org,2002:omap",{kind:"sequence",resolve:resolveYamlOmap,construct:constructYamlOmap})},{"../type":49}],61:[function(_dereq_,module,exports){var Type=_dereq_("../type");var _toString=Object.prototype.toString;function resolveYamlPairs(data){if(data===null)return true;var index,length,pair,keys,result,object=data;result=new Array(object.length);for(index=0,length=object.length;index<length;index+=1){pair=object[index];if(_toString.call(pair)!=="[object Object]")return false;
    keys=Object.keys(pair);if(keys.length!==1)return false;result[index]=[keys[0],pair[keys[0]]]}return true}function constructYamlPairs(data){if(data===null)return[];var index,length,pair,keys,result,object=data;result=new Array(object.length);for(index=0,length=object.length;index<length;index+=1){pair=object[index];keys=Object.keys(pair);result[index]=[keys[0],pair[keys[0]]]}return result}module.exports=new Type("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:resolveYamlPairs,construct:constructYamlPairs})},
    {"../type":49}],62:[function(_dereq_,module,exports){var Type=_dereq_("../type");module.exports=new Type("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(data){return data!==null?data:[]}})},{"../type":49}],63:[function(_dereq_,module,exports){var Type=_dereq_("../type");var _hasOwnProperty=Object.prototype.hasOwnProperty;function resolveYamlSet(data){if(data===null)return true;var key,object=data;for(key in object)if(_hasOwnProperty.call(object,key))if(object[key]!==null)return false;
    return true}function constructYamlSet(data){return data!==null?data:{}}module.exports=new Type("tag:yaml.org,2002:set",{kind:"mapping",resolve:resolveYamlSet,construct:constructYamlSet})},{"../type":49}],64:[function(_dereq_,module,exports){var Type=_dereq_("../type");module.exports=new Type("tag:yaml.org,2002:str",{kind:"scalar",construct:function(data){return data!==null?data:""}})},{"../type":49}],65:[function(_dereq_,module,exports){var Type=_dereq_("../type");var YAML_DATE_REGEXP=new RegExp("^([0-9][0-9][0-9][0-9])"+
    "-([0-9][0-9])"+"-([0-9][0-9])$");var 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]))?))?$");function resolveYamlTimestamp(data){if(data===null)return false;if(YAML_DATE_REGEXP.exec(data)!==null)return true;if(YAML_TIMESTAMP_REGEXP.exec(data)!==null)return true;return false}function constructYamlTimestamp(data){var match,
    year,month,day,hour,minute,second,fraction=0,delta=null,tz_hour,tz_minute,date;match=YAML_DATE_REGEXP.exec(data);if(match===null)match=YAML_TIMESTAMP_REGEXP.exec(data);if(match===null)throw new Error("Date resolve error");year=+match[1];month=+match[2]-1;day=+match[3];if(!match[4])return new Date(Date.UTC(year,month,day));hour=+match[4];minute=+match[5];second=+match[6];if(match[7]){fraction=match[7].slice(0,3);while(fraction.length<3)fraction+="0";fraction=+fraction}if(match[9]){tz_hour=+match[10];
    tz_minute=+(match[11]||0);delta=(tz_hour*60+tz_minute)*6E4;if(match[9]==="-")delta=-delta}date=new Date(Date.UTC(year,month,day,hour,minute,second,fraction));if(delta)date.setTime(date.getTime()-delta);return date}function representYamlTimestamp(object){return object.toISOString()}module.exports=new Type("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:resolveYamlTimestamp,construct:constructYamlTimestamp,instanceOf:Date,represent:representYamlTimestamp})},{"../type":49}],66:[function(_dereq_,
    module,exports){var s=1E3;var m=s*60;var h=m*60;var d=h*24;var y=d*365.25;module.exports=function(val,options){options=options||{};var type=typeof val;if(type==="string"&&val.length>0)return parse(val);else if(type==="number"&&isNaN(val)===false)return options.long?fmtLong(val):fmtShort(val);throw new Error("val is not a non-empty string or a valid number. val\x3d"+JSON.stringify(val));};function parse(str){str=String(str);if(str.length>100)return;var match=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(str);
    if(!match)return;var n=parseFloat(match[1]);var type=(match[2]||"ms").toLowerCase();switch(type){case "years":case "year":case "yrs":case "yr":case "y":return n*y;case "days":case "day":case "d":return n*d;case "hours":case "hour":case "hrs":case "hr":case "h":return n*h;case "minutes":case "minute":case "mins":case "min":case "m":return n*m;case "seconds":case "second":case "secs":case "sec":case "s":return n*s;case "milliseconds":case "millisecond":case "msecs":case "msec":case "ms":return n;default:return undefined}}
    function fmtShort(ms){if(ms>=d)return Math.round(ms/d)+"d";if(ms>=h)return Math.round(ms/h)+"h";if(ms>=m)return Math.round(ms/m)+"m";if(ms>=s)return Math.round(ms/s)+"s";return ms+"ms"}function fmtLong(ms){return plural(ms,d,"day")||plural(ms,h,"hour")||plural(ms,m,"minute")||plural(ms,s,"second")||ms+" ms"}function plural(ms,n,name){if(ms<n)return;if(ms<n*1.5)return Math.floor(ms/n)+" "+name;return Math.ceil(ms/n)+" "+name+"s"}},{}],67:[function(_dereq_,module,exports){var format=_dereq_("format-util");
    var slice=Array.prototype.slice;var protectedProperties=["name","message","stack"];var 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;function create(Klass){return function onoFactory(err,props,message,params){var formatArgs=[];var formattedMessage="";if(typeof err==="string"){formatArgs=slice.call(arguments);err=props=undefined}else if(typeof props==="string"){formatArgs=slice.call(arguments,1);props=undefined}else if(typeof message==="string")formatArgs=slice.call(arguments,2);if(formatArgs.length>0)formattedMessage=module.exports.formatter.apply(null,formatArgs);
    if(err&&err.message)formattedMessage+=(formattedMessage?" \n":"")+err.message;var newError=new Klass(formattedMessage);extendError(newError,err);extendToJSON(newError);extend(newError,props);return newError}}function extendError(targetError,sourceError){extendStack(targetError,sourceError);extend(targetError,sourceError)}function extendToJSON(error){error.toJSON=errorToJSON;error.inspect=errorToString}function extend(target,source){if(source&&typeof source==="object"){var keys=Object.keys(source);
    for(var i=0;i<keys.length;i++){var key=keys[i];if(protectedProperties.indexOf(key)>=0)continue;try{target[key]=source[key]}catch(e){}}}}function errorToJSON(){var json={};var keys=Object.keys(this);keys=keys.concat(errorPrototypeProperties);for(var i=0;i<keys.length;i++){var key=keys[i];var value=this[key];var type=typeof value;if(type!=="undefined"&&type!=="function")json[key]=value}return json}function errorToString(){return JSON.stringify(this,null,2).replace(/\\n/g,"\n")}function extendStack(targetError,
    sourceError){if(hasLazyStack(targetError))if(sourceError)lazyJoinStacks(targetError,sourceError);else lazyPopStack(targetError);else if(sourceError)targetError.stack=joinStacks(targetError.stack,sourceError.stack);else targetError.stack=popStack(targetError.stack)}function joinStacks(newStack,originalStack){newStack=popStack(newStack);if(newStack&&originalStack)return newStack+"\n\n"+originalStack;else return newStack||originalStack}function popStack(stack){if(stack){var lines=stack.split("\n");if(lines.length<
    2)return stack;for(var i=0;i<lines.length;i++){var line=lines[i];if(line.indexOf("onoFactory")>=0){lines.splice(i,1);return lines.join("\n")}}return stack}}var supportsLazyStack=function(){return!!(Object.getOwnPropertyDescriptor&&Object.defineProperty&&(typeof navigator==="undefined"||!/Android/.test(navigator.userAgent)))}();function hasLazyStack(err){if(!supportsLazyStack)return false;var descriptor=Object.getOwnPropertyDescriptor(err,"stack");if(!descriptor)return false;return typeof descriptor.get===
    "function"}function lazyJoinStacks(targetError,sourceError){var targetStack=Object.getOwnPropertyDescriptor(targetError,"stack");Object.defineProperty(targetError,"stack",{get:function(){return joinStacks(targetStack.get.apply(targetError),sourceError.stack)},enumerable:false,configurable:true})}function lazyPopStack(error){var targetStack=Object.getOwnPropertyDescriptor(error,"stack");Object.defineProperty(error,"stack",{get:function(){return popStack(targetStack.get.apply(error))},enumerable:false,
    configurable:true})}},{"format-util":30}],68:[function(_dereq_,module,exports){(function(process){if(!process.version||process.version.indexOf("v0.")===0||process.version.indexOf("v1.")===0&&process.version.indexOf("v1.8.")!==0)module.exports=nextTick;else module.exports=process.nextTick;function nextTick(fn,arg1,arg2,arg3){if(typeof fn!=="function")throw new TypeError('"callback" argument must be a function');var len=arguments.length;var args,i;switch(len){case 0:case 1:return process.nextTick(fn);
    case 2:return process.nextTick(function afterTickOne(){fn.call(null,arg1)});case 3:return process.nextTick(function afterTickTwo(){fn.call(null,arg1,arg2)});case 4:return process.nextTick(function afterTickThree(){fn.call(null,arg1,arg2,arg3)});default:args=new Array(len-1);i=0;while(i<args.length)args[i++]=arguments[i];return process.nextTick(function afterTick(){fn.apply(null,args)})}}}).call(this,_dereq_("_process"))},{"_process":69}],69:[function(_dereq_,module,exports){var process=module.exports=
    {};var cachedSetTimeout;var cachedClearTimeout;function defaultSetTimout(){throw new Error("setTimeout has not been defined");}function defaultClearTimeout(){throw new Error("clearTimeout has not been defined");}(function(){try{if(typeof setTimeout==="function")cachedSetTimeout=setTimeout;else cachedSetTimeout=defaultSetTimout}catch(e){cachedSetTimeout=defaultSetTimout}try{if(typeof clearTimeout==="function")cachedClearTimeout=clearTimeout;else cachedClearTimeout=defaultClearTimeout}catch(e){cachedClearTimeout=
    defaultClearTimeout}})();function runTimeout(fun){if(cachedSetTimeout===setTimeout)return setTimeout(fun,0);if((cachedSetTimeout===defaultSetTimout||!cachedSetTimeout)&&setTimeout){cachedSetTimeout=setTimeout;return setTimeout(fun,0)}try{return cachedSetTimeout(fun,0)}catch(e){try{return cachedSetTimeout.call(null,fun,0)}catch(e){return cachedSetTimeout.call(this,fun,0)}}}function runClearTimeout(marker){if(cachedClearTimeout===clearTimeout)return clearTimeout(marker);if((cachedClearTimeout===defaultClearTimeout||
    !cachedClearTimeout)&&clearTimeout){cachedClearTimeout=clearTimeout;return clearTimeout(marker)}try{return cachedClearTimeout(marker)}catch(e){try{return cachedClearTimeout.call(null,marker)}catch(e){return cachedClearTimeout.call(this,marker)}}}var queue=[];var draining=false;var currentQueue;var queueIndex=-1;function cleanUpNextTick(){if(!draining||!currentQueue)return;draining=false;if(currentQueue.length)queue=currentQueue.concat(queue);else queueIndex=-1;if(queue.length)drainQueue()}function drainQueue(){if(draining)return;
    var timeout=runTimeout(cleanUpNextTick);draining=true;var len=queue.length;while(len){currentQueue=queue;queue=[];while(++queueIndex<len)if(currentQueue)currentQueue[queueIndex].run();queueIndex=-1;len=queue.length}currentQueue=null;draining=false;runClearTimeout(timeout)}process.nextTick=function(fun){var args=new Array(arguments.length-1);if(arguments.length>1)for(var i=1;i<arguments.length;i++)args[i-1]=arguments[i];queue.push(new Item(fun,args));if(queue.length===1&&!draining)runTimeout(drainQueue)};
    function Item(fun,array){this.fun=fun;this.array=array}Item.prototype.run=function(){this.fun.apply(null,this.array)};process.title="browser";process.browser=true;process.env={};process.argv=[];process.version="";process.versions={};function noop(){}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(name){return[]};
    process.binding=function(name){throw new Error("process.binding is not supported");};process.cwd=function(){return"/"};process.chdir=function(dir){throw new Error("process.chdir is not supported");};process.umask=function(){return 0}},{}],70:[function(_dereq_,module,exports){(function(global){(function(root){var freeExports=typeof exports=="object"&&exports&&!exports.nodeType&&exports;var freeModule=typeof module=="object"&&module&&!module.nodeType&&module;var freeGlobal=typeof global=="object"&&
    global;if(freeGlobal.global===freeGlobal||freeGlobal.window===freeGlobal||freeGlobal.self===freeGlobal)root=freeGlobal;var punycode,maxInt=2147483647,base=36,tMin=1,tMax=26,skew=38,damp=700,initialBias=72,initialN=128,delimiter="-",regexPunycode=/^xn--/,regexNonASCII=/[^\x20-\x7E]/,regexSeparators=/[\x2E\u3002\uFF0E\uFF61]/g,errors={"overflow":"Overflow: input needs wider integers to process","not-basic":"Illegal input \x3e\x3d 0x80 (not a basic code point)","invalid-input":"Invalid input"},baseMinusTMin=
    base-tMin,floor=Math.floor,stringFromCharCode=String.fromCharCode,key;function error(type){throw new RangeError(errors[type]);}function map(array,fn){var length=array.length;var result=[];while(length--)result[length]=fn(array[length]);return result}function mapDomain(string,fn){var parts=string.split("@");var result="";if(parts.length>1){result=parts[0]+"@";string=parts[1]}string=string.replace(regexSeparators,".");var labels=string.split(".");var encoded=map(labels,fn).join(".");return result+encoded}
    function ucs2decode(string){var output=[],counter=0,length=string.length,value,extra;while(counter<length){value=string.charCodeAt(counter++);if(value>=55296&&value<=56319&&counter<length){extra=string.charCodeAt(counter++);if((extra&64512)==56320)output.push(((value&1023)<<10)+(extra&1023)+65536);else{output.push(value);counter--}}else output.push(value)}return output}function ucs2encode(array){return map(array,function(value){var output="";if(value>65535){value-=65536;output+=stringFromCharCode(value>>>
    10&1023|55296);value=56320|value&1023}output+=stringFromCharCode(value);return output}).join("")}function basicToDigit(codePoint){if(codePoint-48<10)return codePoint-22;if(codePoint-65<26)return codePoint-65;if(codePoint-97<26)return codePoint-97;return base}function digitToBasic(digit,flag){return digit+22+75*(digit<26)-((flag!=0)<<5)}function adapt(delta,numPoints,firstTime){var k=0;delta=firstTime?floor(delta/damp):delta>>1;delta+=floor(delta/numPoints);for(;delta>baseMinusTMin*tMax>>1;k+=base)delta=
    floor(delta/baseMinusTMin);return floor(k+(baseMinusTMin+1)*delta/(delta+skew))}function decode(input){var output=[],inputLength=input.length,out,i=0,n=initialN,bias=initialBias,basic,j,index,oldi,w,k,digit,t,baseMinusT;basic=input.lastIndexOf(delimiter);if(basic<0)basic=0;for(j=0;j<basic;++j){if(input.charCodeAt(j)>=128)error("not-basic");output.push(input.charCodeAt(j))}for(index=basic>0?basic+1:0;index<inputLength;){for(oldi=i,w=1,k=base;;k+=base){if(index>=inputLength)error("invalid-input");digit=
    basicToDigit(input.charCodeAt(index++));if(digit>=base||digit>floor((maxInt-i)/w))error("overflow");i+=digit*w;t=k<=bias?tMin:k>=bias+tMax?tMax:k-bias;if(digit<t)break;baseMinusT=base-t;if(w>floor(maxInt/baseMinusT))error("overflow");w*=baseMinusT}out=output.length+1;bias=adapt(i-oldi,out,oldi==0);if(floor(i/out)>maxInt-n)error("overflow");n+=floor(i/out);i%=out;output.splice(i++,0,n)}return ucs2encode(output)}function encode(input){var n,delta,handledCPCount,basicLength,bias,j,m,q,k,t,currentValue,
    output=[],inputLength,handledCPCountPlusOne,baseMinusT,qMinusT;input=ucs2decode(input);inputLength=input.length;n=initialN;delta=0;bias=initialBias;for(j=0;j<inputLength;++j){currentValue=input[j];if(currentValue<128)output.push(stringFromCharCode(currentValue))}handledCPCount=basicLength=output.length;if(basicLength)output.push(delimiter);while(handledCPCount<inputLength){for(m=maxInt,j=0;j<inputLength;++j){currentValue=input[j];if(currentValue>=n&&currentValue<m)m=currentValue}handledCPCountPlusOne=
    handledCPCount+1;if(m-n>floor((maxInt-delta)/handledCPCountPlusOne))error("overflow");delta+=(m-n)*handledCPCountPlusOne;n=m;for(j=0;j<inputLength;++j){currentValue=input[j];if(currentValue<n&&++delta>maxInt)error("overflow");if(currentValue==n){for(q=delta,k=base;;k+=base){t=k<=bias?tMin:k>=bias+tMax?tMax:k-bias;if(q<t)break;qMinusT=q-t;baseMinusT=base-t;output.push(stringFromCharCode(digitToBasic(t+qMinusT%baseMinusT,0)));q=floor(qMinusT/baseMinusT)}output.push(stringFromCharCode(digitToBasic(q,
    
    0)));bias=adapt(delta,handledCPCountPlusOne,handledCPCount==basicLength);delta=0;++handledCPCount}}++delta;++n}return output.join("")}function toUnicode(input){return mapDomain(input,function(string){return regexPunycode.test(string)?decode(string.slice(4).toLowerCase()):string})}function toASCII(input){return mapDomain(input,function(string){return regexNonASCII.test(string)?"xn--"+encode(string):string})}punycode={"version":"1.4.1","ucs2":{"decode":ucs2decode,"encode":ucs2encode},"decode":decode,
    "encode":encode,"toASCII":toASCII,"toUnicode":toUnicode};if(typeof define=="function"&&typeof define.amd=="object"&&define.amd)define("punycode",function(){return punycode});else if(freeExports&&freeModule)if(module.exports==freeExports)freeModule.exports=punycode;else for(key in punycode)punycode.hasOwnProperty(key)&&(freeExports[key]=punycode[key]);else root.punycode=punycode})(this)}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:
    {})},{}],71:[function(_dereq_,module,exports){function hasOwnProperty(obj,prop){return Object.prototype.hasOwnProperty.call(obj,prop)}module.exports=function(qs,sep,eq,options){sep=sep||"\x26";eq=eq||"\x3d";var obj={};if(typeof qs!=="string"||qs.length===0)return obj;var regexp=/\+/g;qs=qs.split(sep);var maxKeys=1E3;if(options&&typeof options.maxKeys==="number")maxKeys=options.maxKeys;var len=qs.length;if(maxKeys>0&&len>maxKeys)len=maxKeys;for(var i=0;i<len;++i){var x=qs[i].replace(regexp,"%20"),
    idx=x.indexOf(eq),kstr,vstr,k,v;if(idx>=0){kstr=x.substr(0,idx);vstr=x.substr(idx+1)}else{kstr=x;vstr=""}k=decodeURIComponent(kstr);v=decodeURIComponent(vstr);if(!hasOwnProperty(obj,k))obj[k]=v;else if(isArray(obj[k]))obj[k].push(v);else obj[k]=[obj[k],v]}return obj};var isArray=Array.isArray||function(xs){return Object.prototype.toString.call(xs)==="[object Array]"}},{}],72:[function(_dereq_,module,exports){var stringifyPrimitive=function(v){switch(typeof v){case "string":return v;case "boolean":return v?
    "true":"false";case "number":return isFinite(v)?v:"";default:return""}};module.exports=function(obj,sep,eq,name){sep=sep||"\x26";eq=eq||"\x3d";if(obj===null)obj=undefined;if(typeof obj==="object")return map(objectKeys(obj),function(k){var ks=encodeURIComponent(stringifyPrimitive(k))+eq;if(isArray(obj[k]))return map(obj[k],function(v){return ks+encodeURIComponent(stringifyPrimitive(v))}).join(sep);else return ks+encodeURIComponent(stringifyPrimitive(obj[k]))}).join(sep);if(!name)return"";return encodeURIComponent(stringifyPrimitive(name))+
    eq+encodeURIComponent(stringifyPrimitive(obj))};var isArray=Array.isArray||function(xs){return Object.prototype.toString.call(xs)==="[object Array]"};function map(xs,f){if(xs.map)return xs.map(f);var res=[];for(var i=0;i<xs.length;i++)res.push(f(xs[i],i));return res}var objectKeys=Object.keys||function(obj){var res=[];for(var key in obj)if(Object.prototype.hasOwnProperty.call(obj,key))res.push(key);return res}},{}],73:[function(_dereq_,module,exports){exports.decode=exports.parse=_dereq_("./decode");
    exports.encode=exports.stringify=_dereq_("./encode")},{"./decode":71,"./encode":72}],74:[function(_dereq_,module,exports){var processNextTick=_dereq_("process-nextick-args");var objectKeys=Object.keys||function(obj){var keys=[];for(var key in obj)keys.push(key);return keys};module.exports=Duplex;var util=_dereq_("core-util-is");util.inherits=_dereq_("inherits");var Readable=_dereq_("./_stream_readable");var Writable=_dereq_("./_stream_writable");util.inherits(Duplex,Readable);var keys=objectKeys(Writable.prototype);
    
    Alvaro Cabrera's avatar
    Alvaro Cabrera committed
    for(var v=0;v<keys.length;v++){var method=keys[v];if(!Duplex.prototype[method])Duplex.prototype[method]=Writable.prototype[method]}function Duplex(options){if(!(this instanceof Duplex))return new Duplex(options);Readable.call(this,options);Writable.call(this,options);if(options&&options.readable===false)this.readable=false;if(options&&options.writable===false)this.writable=false;this.allowHalfOpen=true;if(options&&options.allowHalfOpen===false)this.allowHalfOpen=false;this.once("end",onend)}function onend(){if(this.allowHalfOpen||
    
    this._writableState.ended)return;processNextTick(onEndNT,this)}function onEndNT(self){self.end()}Object.defineProperty(Duplex.prototype,"destroyed",{get:function(){if(this._readableState===undefined||this._writableState===undefined)return false;return this._readableState.destroyed&&this._writableState.destroyed},set:function(value){if(this._readableState===undefined||this._writableState===undefined)return;this._readableState.destroyed=value;this._writableState.destroyed=value}});Duplex.prototype._destroy=
    function(err,cb){this.push(null);this.end();processNextTick(cb,err)};function forEach(xs,f){for(var i=0,l=xs.length;i<l;i++)f(xs[i],i)}},{"./_stream_readable":76,"./_stream_writable":78,"core-util-is":26,"inherits":33,"process-nextick-args":68}],75:[function(_dereq_,module,exports){module.exports=PassThrough;var Transform=_dereq_("./_stream_transform");var util=_dereq_("core-util-is");util.inherits=_dereq_("inherits");util.inherits(PassThrough,Transform);function PassThrough(options){if(!(this instanceof
    PassThrough))return new PassThrough(options);Transform.call(this,options)}PassThrough.prototype._transform=function(chunk,encoding,cb){cb(null,chunk)}},{"./_stream_transform":77,"core-util-is":26,"inherits":33}],76:[function(_dereq_,module,exports){(function(process,global){var processNextTick=_dereq_("process-nextick-args");module.exports=Readable;var isArray=_dereq_("isarray");var Duplex;Readable.ReadableState=ReadableState;var EE=_dereq_("events").EventEmitter;var EElistenerCount=function(emitter,
    type){return emitter.listeners(type).length};var Stream=_dereq_("./internal/streams/stream");var Buffer=_dereq_("safe-buffer").Buffer;var OurUint8Array=global.Uint8Array||function(){};function _uint8ArrayToBuffer(chunk){return Buffer.from(chunk)}function _isUint8Array(obj){return Buffer.isBuffer(obj)||obj instanceof OurUint8Array}var util=_dereq_("core-util-is");util.inherits=_dereq_("inherits");var debugUtil=_dereq_("util");var debug=void 0;if(debugUtil&&debugUtil.debuglog)debug=debugUtil.debuglog("stream");
    else debug=function(){};var BufferList=_dereq_("./internal/streams/BufferList");var destroyImpl=_dereq_("./internal/streams/destroy");var StringDecoder;util.inherits(Readable,Stream);var kProxyEvents=["error","close","destroy","pause","resume"];function prependListener(emitter,event,fn){if(typeof emitter.prependListener==="function")return emitter.prependListener(event,fn);else if(!emitter._events||!emitter._events[event])emitter.on(event,fn);else if(isArray(emitter._events[event]))emitter._events[event].unshift(fn);
    else emitter._events[event]=[fn,emitter._events[event]]}function ReadableState(options,stream){Duplex=Duplex||_dereq_("./_stream_duplex");options=options||{};this.objectMode=!!options.objectMode;if(stream instanceof Duplex)this.objectMode=this.objectMode||!!options.readableObjectMode;var hwm=options.highWaterMark;var defaultHwm=this.objectMode?16:16*1024;this.highWaterMark=hwm||hwm===0?hwm:defaultHwm;this.highWaterMark=Math.floor(this.highWaterMark);this.buffer=new BufferList;this.length=0;this.pipes=
    null;this.pipesCount=0;this.flowing=null;this.ended=false;this.endEmitted=false;this.reading=false;this.sync=true;this.needReadable=false;this.emittedReadable=false;this.readableListening=false;this.resumeScheduled=false;this.destroyed=false;this.defaultEncoding=options.defaultEncoding||"utf8";this.awaitDrain=0;this.readingMore=false;this.decoder=null;this.encoding=null;if(options.encoding){if(!StringDecoder)StringDecoder=_dereq_("string_decoder/").StringDecoder;this.decoder=new StringDecoder(options.encoding);
    this.encoding=options.encoding}}function Readable(options){Duplex=Duplex||_dereq_("./_stream_duplex");if(!(this instanceof Readable))return new Readable(options);this._readableState=new ReadableState(options,this);this.readable=true;if(options){if(typeof options.read==="function")this._read=options.read;if(typeof options.destroy==="function")this._destroy=options.destroy}Stream.call(this)}Object.defineProperty(Readable.prototype,"destroyed",{get:function(){if(this._readableState===undefined)return false;
    return this._readableState.destroyed},set:function(value){if(!this._readableState)return;this._readableState.destroyed=value}});Readable.prototype.destroy=destroyImpl.destroy;Readable.prototype._undestroy=destroyImpl.undestroy;Readable.prototype._destroy=function(err,cb){this.push(null);cb(err)};Readable.prototype.push=function(chunk,encoding){var state=this._readableState;var skipChunkCheck;if(!state.objectMode){if(typeof chunk==="string"){encoding=encoding||state.defaultEncoding;if(encoding!==state.encoding){chunk=
    Buffer.from(chunk,encoding);encoding=""}skipChunkCheck=true}}else skipChunkCheck=true;return readableAddChunk(this,chunk,encoding,false,skipChunkCheck)};Readable.prototype.unshift=function(chunk){return readableAddChunk(this,chunk,null,true,false)};function readableAddChunk(stream,chunk,encoding,addToFront,skipChunkCheck){var state=stream._readableState;if(chunk===null){state.reading=false;onEofChunk(stream,state)}else{var er;if(!skipChunkCheck)er=chunkInvalid(state,chunk);if(er)stream.emit("error",
    er);else if(state.objectMode||chunk&&chunk.length>0){if(typeof chunk!=="string"&&!state.objectMode&&Object.getPrototypeOf(chunk)!==Buffer.prototype)chunk=_uint8ArrayToBuffer(chunk);if(addToFront)if(state.endEmitted)stream.emit("error",new Error("stream.unshift() after end event"));else addChunk(stream,state,chunk,true);else if(state.ended)stream.emit("error",new Error("stream.push() after EOF"));else{state.reading=false;if(state.decoder&&!encoding){chunk=state.decoder.write(chunk);if(state.objectMode||
    chunk.length!==0)addChunk(stream,state,chunk,false);else maybeReadMore(stream,state)}else addChunk(stream,state,chunk,false)}}else if(!addToFront)state.reading=false}return needMoreData(state)}function addChunk(stream,state,chunk,addToFront){if(state.flowing&&state.length===0&&!state.sync){stream.emit("data",chunk);stream.read(0)}else{state.length+=state.objectMode?1:chunk.length;if(addToFront)state.buffer.unshift(chunk);else state.buffer.push(chunk);if(state.needReadable)emitReadable(stream)}maybeReadMore(stream,
    state)}function chunkInvalid(state,chunk){var er;if(!_isUint8Array(chunk)&&typeof chunk!=="string"&&chunk!==undefined&&!state.objectMode)er=new TypeError("Invalid non-string/buffer chunk");return er}function needMoreData(state){return!state.ended&&(state.needReadable||state.length<state.highWaterMark||state.length===0)}Readable.prototype.isPaused=function(){return this._readableState.flowing===false};Readable.prototype.setEncoding=function(enc){if(!StringDecoder)StringDecoder=_dereq_("string_decoder/").StringDecoder;
    this._readableState.decoder=new StringDecoder(enc);this._readableState.encoding=enc;return this};var MAX_HWM=8388608;function computeNewHighWaterMark(n){if(n>=MAX_HWM)n=MAX_HWM;else{n--;n|=n>>>1;n|=n>>>2;n|=n>>>4;n|=n>>>8;n|=n>>>16;n++}return n}function howMuchToRead(n,state){if(n<=0||state.length===0&&state.ended)return 0;if(state.objectMode)return 1;if(n!==n)if(state.flowing&&state.length)return state.buffer.head.data.length;else return state.length;if(n>state.highWaterMark)state.highWaterMark=
    computeNewHighWaterMark(n);if(n<=state.length)return n;if(!state.ended){state.needReadable=true;return 0}return state.length}Readable.prototype.read=function(n){debug("read",n);n=parseInt(n,10);var state=this._readableState;var nOrig=n;if(n!==0)state.emittedReadable=false;if(n===0&&state.needReadable&&(state.length>=state.highWaterMark||state.ended)){debug("read: emitReadable",state.length,state.ended);if(state.length===0&&state.ended)endReadable(this);else emitReadable(this);return null}n=howMuchToRead(n,
    state);if(n===0&&state.ended){if(state.length===0)endReadable(this);return null}var doRead=state.needReadable;debug("need readable",doRead);if(state.length===0||state.length-n<state.highWaterMark){doRead=true;debug("length less than watermark",doRead)}if(state.ended||state.reading){doRead=false;debug("reading or ended",doRead)}else if(doRead){debug("do read");state.reading=true;state.sync=true;if(state.length===0)state.needReadable=true;this._read(state.highWaterMark);state.sync=false;if(!state.reading)n=
    howMuchToRead(nOrig,state)}var ret;if(n>0)ret=fromList(n,state);else ret=null;if(ret===null){state.needReadable=true;n=0}else state.length-=n;if(state.length===0){if(!state.ended)state.needReadable=true;if(nOrig!==n&&state.ended)endReadable(this)}if(ret!==null)this.emit("data",ret);return ret};function onEofChunk(stream,state){if(state.ended)return;if(state.decoder){var chunk=state.decoder.end();if(chunk&&chunk.length){state.buffer.push(chunk);state.length+=state.objectMode?1:chunk.length}}state.ended=
    true;emitReadable(stream)}function emitReadable(stream){var state=stream._readableState;state.needReadable=false;if(!state.emittedReadable){debug("emitReadable",state.flowing);state.emittedReadable=true;if(state.sync)processNextTick(emitReadable_,stream);else emitReadable_(stream)}}function emitReadable_(stream){debug("emit readable");stream.emit("readable");flow(stream)}function maybeReadMore(stream,state){if(!state.readingMore){state.readingMore=true;processNextTick(maybeReadMore_,stream,state)}}
    function maybeReadMore_(stream,state){var len=state.length;while(!state.reading&&!state.flowing&&!state.ended&&state.length<state.highWaterMark){debug("maybeReadMore read 0");stream.read(0);if(len===state.length)break;else len=state.length}state.readingMore=false}Readable.prototype._read=function(n){this.emit("error",new Error("_read() is not implemented"))};Readable.prototype.pipe=function(dest,pipeOpts){var src=this;var state=this._readableState;switch(state.pipesCount){case 0:state.pipes=dest;
    break;case 1:state.pipes=[state.pipes,dest];break;default:state.pipes.push(dest);break}state.pipesCount+=1;debug("pipe count\x3d%d opts\x3d%j",state.pipesCount,pipeOpts);var doEnd=(!pipeOpts||pipeOpts.end!==false)&&dest!==process.stdout&&dest!==process.stderr;var endFn=doEnd?onend:unpipe;if(state.endEmitted)processNextTick(endFn);else src.once("end",endFn);dest.on("unpipe",onunpipe);function onunpipe(readable,unpipeInfo){debug("onunpipe");if(readable===src)if(unpipeInfo&&unpipeInfo.hasUnpiped===false){unpipeInfo.hasUnpiped=
    true;cleanup()}}function onend(){debug("onend");dest.end()}var ondrain=pipeOnDrain(src);dest.on("drain",ondrain);var cleanedUp=false;function cleanup(){debug("cleanup");dest.removeListener("close",onclose);dest.removeListener("finish",onfinish);dest.removeListener("drain",ondrain);dest.removeListener("error",onerror);dest.removeListener("unpipe",onunpipe);src.removeListener("end",onend);src.removeListener("end",unpipe);src.removeListener("data",ondata);cleanedUp=true;if(state.awaitDrain&&(!dest._writableState||
    dest._writableState.needDrain))ondrain()}var increasedAwaitDrain=false;src.on("data",ondata);function ondata(chunk){debug("ondata");increasedAwaitDrain=false;var ret=dest.write(chunk);if(false===ret&&!increasedAwaitDrain){if((state.pipesCount===1&&state.pipes===dest||state.pipesCount>1&&indexOf(state.pipes,dest)!==-1)&&!cleanedUp){debug("false write response, pause",src._readableState.awaitDrain);src._readableState.awaitDrain++;increasedAwaitDrain=true}src.pause()}}function onerror(er){debug("onerror",
    er);unpipe();dest.removeListener("error",onerror);if(EElistenerCount(dest,"error")===0)dest.emit("error",er)}prependListener(dest,"error",onerror);function onclose(){dest.removeListener("finish",onfinish);unpipe()}dest.once("close",onclose);function onfinish(){debug("onfinish");dest.removeListener("close",onclose);unpipe()}dest.once("finish",onfinish);function unpipe(){debug("unpipe");src.unpipe(dest)}dest.emit("pipe",src);if(!state.flowing){debug("pipe resume");src.resume()}return dest};function pipeOnDrain(src){return function(){var state=
    src._readableState;debug("pipeOnDrain",state.awaitDrain);if(state.awaitDrain)state.awaitDrain--;if(state.awaitDrain===0&&EElistenerCount(src,"data")){state.flowing=true;flow(src)}}}Readable.prototype.unpipe=function(dest){var state=this._readableState;var unpipeInfo={hasUnpiped:false};if(state.pipesCount===0)return this;if(state.pipesCount===1){if(dest&&dest!==state.pipes)return this;if(!dest)dest=state.pipes;state.pipes=null;state.pipesCount=0;state.flowing=false;if(dest)dest.emit("unpipe",this,
    unpipeInfo);return this}if(!dest){var dests=state.pipes;var len=state.pipesCount;state.pipes=null;state.pipesCount=0;state.flowing=false;for(var i=0;i<len;i++)dests[i].emit("unpipe",this,unpipeInfo);return this}var index=indexOf(state.pipes,dest);if(index===-1)return this;state.pipes.splice(index,1);state.pipesCount-=1;if(state.pipesCount===1)state.pipes=state.pipes[0];dest.emit("unpipe",this,unpipeInfo);return this};Readable.prototype.on=function(ev,fn){var res=Stream.prototype.on.call(this,ev,fn);
    if(ev==="data"){if(this._readableState.flowing!==false)this.resume()}else if(ev==="readable"){var state=this._readableState;if(!state.endEmitted&&!state.readableListening){state.readableListening=state.needReadable=true;state.emittedReadable=false;if(!state.reading)processNextTick(nReadingNextTick,this);else if(state.length)emitReadable(this)}}return res};Readable.prototype.addListener=Readable.prototype.on;function nReadingNextTick(self){debug("readable nexttick read 0");self.read(0)}Readable.prototype.resume=
    function(){var state=this._readableState;if(!state.flowing){debug("resume");state.flowing=true;resume(this,state)}return this};function resume(stream,state){if(!state.resumeScheduled){state.resumeScheduled=true;processNextTick(resume_,stream,state)}}function resume_(stream,state){if(!state.reading){debug("resume read 0");stream.read(0)}state.resumeScheduled=false;state.awaitDrain=0;stream.emit("resume");flow(stream);if(state.flowing&&!state.reading)stream.read(0)}Readable.prototype.pause=function(){debug("call pause flowing\x3d%j",
    this._readableState.flowing);if(false!==this._readableState.flowing){debug("pause");this._readableState.flowing=false;this.emit("pause")}return this};function flow(stream){var state=stream._readableState;debug("flow",state.flowing);while(state.flowing&&stream.read()!==null);}Readable.prototype.wrap=function(stream){var state=this._readableState;var paused=false;var self=this;stream.on("end",function(){debug("wrapped end");if(state.decoder&&!state.ended){var chunk=state.decoder.end();if(chunk&&chunk.length)self.push(chunk)}self.push(null)});
    stream.on("data",function(chunk){debug("wrapped data");if(state.decoder)chunk=state.decoder.write(chunk);if(state.objectMode&&(chunk===null||chunk===undefined))return;else if(!state.objectMode&&(!chunk||!chunk.length))return;var ret=self.push(chunk);if(!ret){paused=true;stream.pause()}});for(var i in stream)if(this[i]===undefined&&typeof stream[i]==="function")this[i]=function(method){return function(){return stream[method].apply(stream,arguments)}}(i);for(var n=0;n<kProxyEvents.length;n++)stream.on(kProxyEvents[n],
    self.emit.bind(self,kProxyEvents[n]));self._read=function(n){debug("wrapped _read",n);if(paused){paused=false;stream.resume()}};return self};Readable._fromList=fromList;function fromList(n,state){if(state.length===0)return null;var ret;if(state.objectMode)ret=state.buffer.shift();else if(!n||n>=state.length){if(state.decoder)ret=state.buffer.join("");else if(state.buffer.length===1)ret=state.buffer.head.data;else ret=state.buffer.concat(state.length);state.buffer.clear()}else ret=fromListPartial(n,
    state.buffer,state.decoder);return ret}function fromListPartial(n,list,hasStrings){var ret;if(n<list.head.data.length){ret=list.head.data.slice(0,n);list.head.data=list.head.data.slice(n)}else if(n===list.head.data.length)ret=list.shift();else ret=hasStrings?copyFromBufferString(n,list):copyFromBuffer(n,list);return ret}function copyFromBufferString(n,list){var p=list.head;var c=1;var ret=p.data;n-=ret.length;while(p=p.next){var str=p.data;var nb=n>str.length?str.length:n;if(nb===str.length)ret+=
    str;else ret+=str.slice(0,n);n-=nb;if(n===0){if(nb===str.length){++c;if(p.next)list.head=p.next;else list.head=list.tail=null}else{list.head=p;p.data=str.slice(nb)}break}++c}list.length-=c;return ret}function copyFromBuffer(n,list){var ret=Buffer.allocUnsafe(n);var p=list.head;var c=1;p.data.copy(ret);n-=p.data.length;while(p=p.next){var buf=p.data;var nb=n>buf.length?buf.length:n;buf.copy(ret,ret.length-n,0,nb);n-=nb;if(n===0){if(nb===buf.length){++c;if(p.next)list.head=p.next;else list.head=list.tail=
    null}else{list.head=p;p.data=buf.slice(nb)}break}++c}list.length-=c;return ret}function endReadable(stream){var state=stream._readableState;if(state.length>0)throw new Error('"endReadable()" called on non-empty stream');if(!state.endEmitted){state.ended=true;processNextTick(endReadableNT,state,stream)}}function endReadableNT(state,stream){if(!state.endEmitted&&state.length===0){state.endEmitted=true;stream.readable=false;stream.emit("end")}}function forEach(xs,f){for(var i=0,l=xs.length;i<l;i++)f(xs[i],
    i)}function indexOf(xs,x){for(var i=0,l=xs.length;i<l;i++)if(xs[i]===x)return i;return-1}}).call(this,_dereq_("_process"),typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{"./_stream_duplex":74,"./internal/streams/BufferList":79,"./internal/streams/destroy":80,"./internal/streams/stream":81,"_process":69,"core-util-is":26,"events":29,"inherits":33,"isarray":35,"process-nextick-args":68,"safe-buffer":83,"string_decoder/":88,"util":22}],77:[function(_dereq_,
    module,exports){module.exports=Transform;var Duplex=_dereq_("./_stream_duplex");var util=_dereq_("core-util-is");util.inherits=_dereq_("inherits");util.inherits(Transform,Duplex);function TransformState(stream){this.afterTransform=function(er,data){return afterTransform(stream,er,data)};this.needTransform=false;this.transforming=false;this.writecb=null;this.writechunk=null;this.writeencoding=null}function afterTransform(stream,er,data){var ts=stream._transformState;ts.transforming=false;var cb=ts.writecb;
    if(!cb)return stream.emit("error",new Error("write callback called multiple times"));ts.writechunk=null;ts.writecb=null;if(data!==null&&data!==undefined)stream.push(data);cb(er);var rs=stream._readableState;rs.reading=false;if(rs.needReadable||rs.length<rs.highWaterMark)stream._read(rs.highWaterMark)}function Transform(options){if(!(this instanceof Transform))return new Transform(options);Duplex.call(this,options);this._transformState=new TransformState(this);var stream=this;this._readableState.needReadable=
    true;this._readableState.sync=false;if(options){if(typeof options.transform==="function")this._transform=options.transform;if(typeof options.flush==="function")this._flush=options.flush}this.once("prefinish",function(){if(typeof this._flush==="function")this._flush(function(er,data){done(stream,er,data)});else done(stream)})}Transform.prototype.push=function(chunk,encoding){this._transformState.needTransform=false;return Duplex.prototype.push.call(this,chunk,encoding)};Transform.prototype._transform=
    function(chunk,encoding,cb){throw new Error("_transform() is not implemented");};Transform.prototype._write=function(chunk,encoding,cb){var ts=this._transformState;ts.writecb=cb;ts.writechunk=chunk;ts.writeencoding=encoding;if(!ts.transforming){var rs=this._readableState;if(ts.needTransform||rs.needReadable||rs.length<rs.highWaterMark)this._read(rs.highWaterMark)}};Transform.prototype._read=function(n){var ts=this._transformState;if(ts.writechunk!==null&&ts.writecb&&!ts.transforming){ts.transforming=
    true;this._transform(ts.writechunk,ts.writeencoding,ts.afterTransform)}else ts.needTransform=true};Transform.prototype._destroy=function(err,cb){var _this=this;Duplex.prototype._destroy.call(this,err,function(err2){cb(err2);_this.emit("close")})};function done(stream,er,data){if(er)return stream.emit("error",er);if(data!==null&&data!==undefined)stream.push(data);var ws=stream._writableState;var ts=stream._transformState;if(ws.length)throw new Error("Calling transform done when ws.length !\x3d 0");
    if(ts.transforming)throw new Error("Calling transform done when still transforming");return stream.push(null)}},{"./_stream_duplex":74,"core-util-is":26,"inherits":33}],78:[function(_dereq_,module,exports){(function(process,global){var processNextTick=_dereq_("process-nextick-args");module.exports=Writable;function WriteReq(chunk,encoding,cb){this.chunk=chunk;this.encoding=encoding;this.callback=cb;this.next=null}function CorkedRequest(state){var _this=this;this.next=null;this.entry=null;this.finish=
    function(){onCorkedFinish(_this,state)}}var asyncWrite=!process.browser&&["v0.10","v0.9."].indexOf(process.version.slice(0,5))>-1?setImmediate:processNextTick;var Duplex;Writable.WritableState=WritableState;var util=_dereq_("core-util-is");util.inherits=_dereq_("inherits");var internalUtil={deprecate:_dereq_("util-deprecate")};var Stream=_dereq_("./internal/streams/stream");var Buffer=_dereq_("safe-buffer").Buffer;var OurUint8Array=global.Uint8Array||function(){};function _uint8ArrayToBuffer(chunk){return Buffer.from(chunk)}
    function _isUint8Array(obj){return Buffer.isBuffer(obj)||obj instanceof OurUint8Array}var destroyImpl=_dereq_("./internal/streams/destroy");util.inherits(Writable,Stream);function nop(){}function WritableState(options,stream){Duplex=Duplex||_dereq_("./_stream_duplex");options=options||{};this.objectMode=!!options.objectMode;if(stream instanceof Duplex)this.objectMode=this.objectMode||!!options.writableObjectMode;var hwm=options.highWaterMark;var defaultHwm=this.objectMode?16:16*1024;this.highWaterMark=
    hwm||hwm===0?hwm:defaultHwm;this.highWaterMark=Math.floor(this.highWaterMark);this.finalCalled=false;this.needDrain=false;this.ending=false;this.ended=false;this.finished=false;this.destroyed=false;var noDecode=options.decodeStrings===false;this.decodeStrings=!noDecode;this.defaultEncoding=options.defaultEncoding||"utf8";this.length=0;this.writing=false;this.corked=0;this.sync=true;this.bufferProcessing=false;this.onwrite=function(er){onwrite(stream,er)};this.writecb=null;this.writelen=0;this.bufferedRequest=
    null;this.lastBufferedRequest=null;this.pendingcb=0;this.prefinished=false;this.errorEmitted=false;this.bufferedRequestCount=0;this.corkedRequestsFree=new CorkedRequest(this)}WritableState.prototype.getBuffer=function getBuffer(){var current=this.bufferedRequest;var out=[];while(current){out.push(current);current=current.next}return out};(function(){try{Object.defineProperty(WritableState.prototype,"buffer",{get:internalUtil.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer "+
    "instead.","DEP0003")})}catch(_){}})();var realHasInstance;if(typeof Symbol==="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]==="function"){realHasInstance=Function.prototype[Symbol.hasInstance];Object.defineProperty(Writable,Symbol.hasInstance,{value:function(object){if(realHasInstance.call(this,object))return true;return object&&object._writableState instanceof WritableState}})}else realHasInstance=function(object){return object instanceof this};function Writable(options){Duplex=
    Duplex||_dereq_("./_stream_duplex");if(!realHasInstance.call(Writable,this)&&!(this instanceof Duplex))return new Writable(options);this._writableState=new WritableState(options,this);this.writable=true;if(options){if(typeof options.write==="function")this._write=options.write;if(typeof options.writev==="function")this._writev=options.writev;if(typeof options.destroy==="function")this._destroy=options.destroy;if(typeof options.final==="function")this._final=options.final}Stream.call(this)}Writable.prototype.pipe=
    function(){this.emit("error",new Error("Cannot pipe, not readable"))};function writeAfterEnd(stream,cb){var er=new Error("write after end");stream.emit("error",er);processNextTick(cb,er)}function validChunk(stream,state,chunk,cb){var valid=true;var er=false;if(chunk===null)er=new TypeError("May not write null values to stream");else if(typeof chunk!=="string"&&chunk!==undefined&&!state.objectMode)er=new TypeError("Invalid non-string/buffer chunk");if(er){stream.emit("error",er);processNextTick(cb,
    er);valid=false}return valid}Writable.prototype.write=function(chunk,encoding,cb){var state=this._writableState;var ret=false;var isBuf=_isUint8Array(chunk)&&!state.objectMode;if(isBuf&&!Buffer.isBuffer(chunk))chunk=_uint8ArrayToBuffer(chunk);if(typeof encoding==="function"){cb=encoding;encoding=null}if(isBuf)encoding="buffer";else if(!encoding)encoding=state.defaultEncoding;if(typeof cb!=="function")cb=nop;if(state.ended)writeAfterEnd(this,cb);else if(isBuf||validChunk(this,state,chunk,cb)){state.pendingcb++;
    ret=writeOrBuffer(this,state,isBuf,chunk,encoding,cb)}return ret};Writable.prototype.cork=function(){var state=this._writableState;state.corked++};Writable.prototype.uncork=function(){var state=this._writableState;if(state.corked){state.corked--;if(!state.writing&&!state.corked&&!state.finished&&!state.bufferProcessing&&state.bufferedRequest)clearBuffer(this,state)}};Writable.prototype.setDefaultEncoding=function setDefaultEncoding(encoding){if(typeof encoding==="string")encoding=encoding.toLowerCase();
    if(!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((encoding+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+encoding);this._writableState.defaultEncoding=encoding;return this};function decodeChunk(state,chunk,encoding){if(!state.objectMode&&state.decodeStrings!==false&&typeof chunk==="string")chunk=Buffer.from(chunk,encoding);return chunk}function writeOrBuffer(stream,state,isBuf,chunk,encoding,cb){if(!isBuf){var newChunk=decodeChunk(state,
    chunk,encoding);if(chunk!==newChunk){isBuf=true;encoding="buffer";chunk=newChunk}}var len=state.objectMode?1:chunk.length;state.length+=len;var ret=state.length<state.highWaterMark;if(!ret)state.needDrain=true;if(state.writing||state.corked){var last=state.lastBufferedRequest;state.lastBufferedRequest={chunk:chunk,encoding:encoding,isBuf:isBuf,callback:cb,next:null};if(last)last.next=state.lastBufferedRequest;else state.bufferedRequest=state.lastBufferedRequest;state.bufferedRequestCount+=1}else doWrite(stream,
    state,false,len,chunk,encoding,cb);return ret}function doWrite(stream,state,writev,len,chunk,encoding,cb){state.writelen=len;state.writecb=cb;state.writing=true;state.sync=true;if(writev)stream._writev(chunk,state.onwrite);else stream._write(chunk,encoding,state.onwrite);state.sync=false}function onwriteError(stream,state,sync,er,cb){--state.pendingcb;if(sync){processNextTick(cb,er);processNextTick(finishMaybe,stream,state);stream._writableState.errorEmitted=true;stream.emit("error",er)}else{cb(er);
    stream._writableState.errorEmitted=true;stream.emit("error",er);finishMaybe(stream,state)}}function onwriteStateUpdate(state){state.writing=false;state.writecb=null;state.length-=state.writelen;state.writelen=0}function onwrite(stream,er){var state=stream._writableState;var sync=state.sync;var cb=state.writecb;onwriteStateUpdate(state);if(er)onwriteError(stream,state,sync,er,cb);else{var finished=needFinish(state);if(!finished&&!state.corked&&!state.bufferProcessing&&state.bufferedRequest)clearBuffer(stream,
    state);if(sync)asyncWrite(afterWrite,stream,state,finished,cb);else afterWrite(stream,state,finished,cb)}}function afterWrite(stream,state,finished,cb){if(!finished)onwriteDrain(stream,state);state.pendingcb--;cb();finishMaybe(stream,state)}function onwriteDrain(stream,state){if(state.length===0&&state.needDrain){state.needDrain=false;stream.emit("drain")}}function clearBuffer(stream,state){state.bufferProcessing=true;var entry=state.bufferedRequest;if(stream._writev&&entry&&entry.next){var l=state.bufferedRequestCount;
    var buffer=new Array(l);var holder=state.corkedRequestsFree;holder.entry=entry;var count=0;var allBuffers=true;while(entry){buffer[count]=entry;if(!entry.isBuf)allBuffers=false;entry=entry.next;count+=1}buffer.allBuffers=allBuffers;doWrite(stream,state,true,state.length,buffer,"",holder.finish);state.pendingcb++;state.lastBufferedRequest=null;if(holder.next){state.corkedRequestsFree=holder.next;holder.next=null}else state.corkedRequestsFree=new CorkedRequest(state)}else{while(entry){var chunk=entry.chunk;
    var encoding=entry.encoding;var cb=entry.callback;var len=state.objectMode?1:chunk.length;doWrite(stream,state,false,len,chunk,encoding,cb);entry=entry.next;if(state.writing)break}if(entry===null)state.lastBufferedRequest=null}state.bufferedRequestCount=0;state.bufferedRequest=entry;state.bufferProcessing=false}Writable.prototype._write=function(chunk,encoding,cb){cb(new Error("_write() is not implemented"))};Writable.prototype._writev=null;Writable.prototype.end=function(chunk,encoding,cb){var state=
    this._writableState;if(typeof chunk==="function"){cb=chunk;chunk=null;encoding=null}else if(typeof encoding==="function"){cb=encoding;encoding=null}if(chunk!==null&&chunk!==undefined)this.write(chunk,encoding);if(state.corked){state.corked=1;this.uncork()}if(!state.ending&&!state.finished)endWritable(this,state,cb)};function needFinish(state){return state.ending&&state.length===0&&state.bufferedRequest===null&&!state.finished&&!state.writing}function callFinal(stream,state){stream._final(function(err){state.pendingcb--;
    if(err)stream.emit("error",err);state.prefinished=true;stream.emit("prefinish");finishMaybe(stream,state)})}function prefinish(stream,state){if(!state.prefinished&&!state.finalCalled)if(typeof stream._final==="function"){state.pendingcb++;state.finalCalled=true;processNextTick(callFinal,stream,state)}else{state.prefinished=true;stream.emit("prefinish")}}function finishMaybe(stream,state){var need=needFinish(state);if(need){prefinish(stream,state);if(state.pendingcb===0){state.finished=true;stream.emit("finish")}}return need}
    function endWritable(stream,state,cb){state.ending=true;finishMaybe(stream,state);if(cb)if(state.finished)processNextTick(cb);else stream.once("finish",cb);state.ended=true;stream.writable=false}function onCorkedFinish(corkReq,state,err){var entry=corkReq.entry;corkReq.entry=null;while(entry){var cb=entry.callback;state.pendingcb--;cb(err);entry=entry.next}if(state.corkedRequestsFree)state.corkedRequestsFree.next=corkReq;else state.corkedRequestsFree=corkReq}Object.defineProperty(Writable.prototype,
    "destroyed",{get:function(){if(this._writableState===undefined)return false;return this._writableState.destroyed},set:function(value){if(!this._writableState)return;this._writableState.destroyed=value}});Writable.prototype.destroy=destroyImpl.destroy;Writable.prototype._undestroy=destroyImpl.undestroy;Writable.prototype._destroy=function(err,cb){this.end();cb(err)}}).call(this,_dereq_("_process"),typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:
    {})},{"./_stream_duplex":74,"./internal/streams/destroy":80,"./internal/streams/stream":81,"_process":69,"core-util-is":26,"inherits":33,"process-nextick-args":68,"safe-buffer":83,"util-deprecate":92}],79:[function(_dereq_,module,exports){function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function");}var Buffer=_dereq_("safe-buffer").Buffer;function copyBuffer(src,target,offset){src.copy(target,offset)}module.exports=
    function(){function BufferList(){_classCallCheck(this,BufferList);this.head=null;this.tail=null;this.length=0}BufferList.prototype.push=function push(v){var entry={data:v,next:null};if(this.length>0)this.tail.next=entry;else this.head=entry;this.tail=entry;++this.length};BufferList.prototype.unshift=function unshift(v){var entry={data:v,next:this.head};if(this.length===0)this.tail=entry;this.head=entry;++this.length};BufferList.prototype.shift=function shift(){if(this.length===0)return;var ret=this.head.data;
    if(this.length===1)this.head=this.tail=null;else this.head=this.head.next;--this.length;return ret};BufferList.prototype.clear=function clear(){this.head=this.tail=null;this.length=0};BufferList.prototype.join=function join(s){if(this.length===0)return"";var p=this.head;var ret=""+p.data;while(p=p.next)ret+=s+p.data;return ret};BufferList.prototype.concat=function concat(n){if(this.length===0)return Buffer.alloc(0);if(this.length===1)return this.head.data;var ret=Buffer.allocUnsafe(n>>>0);var p=this.head;
    var i=0;while(p){copyBuffer(p.data,ret,i);i+=p.data.length;p=p.next}return ret};return BufferList}()},{"safe-buffer":83}],80:[function(_dereq_,module,exports){var processNextTick=_dereq_("process-nextick-args");function destroy(err,cb){var _this=this;var readableDestroyed=this._readableState&&this._readableState.destroyed;var writableDestroyed=this._writableState&&this._writableState.destroyed;if(readableDestroyed||writableDestroyed){if(cb)cb(err);else if(err&&(!this._writableState||!this._writableState.errorEmitted))processNextTick(emitErrorNT,
    this,err);return}if(this._readableState)this._readableState.destroyed=true;if(this._writableState)this._writableState.destroyed=true;this._destroy(err||null,function(err){if(!cb&&err){processNextTick(emitErrorNT,_this,err);if(_this._writableState)_this._writableState.errorEmitted=true}else if(cb)cb(err)})}function undestroy(){if(this._readableState){this._readableState.destroyed=false;this._readableState.reading=false;this._readableState.ended=false;this._readableState.endEmitted=false}if(this._writableState){this._writableState.destroyed=
    false;this._writableState.ended=false;this._writableState.ending=false;this._writableState.finished=false;this._writableState.errorEmitted=false}}function emitErrorNT(self,err){self.emit("error",err)}module.exports={destroy:destroy,undestroy:undestroy}},{"process-nextick-args":68}],81:[function(_dereq_,module,exports){module.exports=_dereq_("events").EventEmitter},{"events":29}],82:[function(_dereq_,module,exports){exports=module.exports=_dereq_("./lib/_stream_readable.js");exports.Stream=exports;
    exports.Readable=exports;exports.Writable=_dereq_("./lib/_stream_writable.js");exports.Duplex=_dereq_("./lib/_stream_duplex.js");exports.Transform=_dereq_("./lib/_stream_transform.js");exports.PassThrough=_dereq_("./lib/_stream_passthrough.js")},{"./lib/_stream_duplex.js":74,"./lib/_stream_passthrough.js":75,"./lib/_stream_readable.js":76,"./lib/_stream_transform.js":77,"./lib/_stream_writable.js":78}],83:[function(_dereq_,module,exports){var buffer=_dereq_("buffer");var Buffer=buffer.Buffer;function copyProps(src,
    dst){for(var key in src)dst[key]=src[key]}if(Buffer.from&&Buffer.alloc&&Buffer.allocUnsafe&&Buffer.allocUnsafeSlow)module.exports=buffer;else{copyProps(buffer,exports);exports.Buffer=SafeBuffer}function SafeBuffer(arg,encodingOrOffset,length){return Buffer(arg,encodingOrOffset,length)}copyProps(Buffer,SafeBuffer);SafeBuffer.from=function(arg,encodingOrOffset,length){if(typeof arg==="number")throw new TypeError("Argument must not be a number");return Buffer(arg,encodingOrOffset,length)};SafeBuffer.alloc=
    function(size,fill,encoding){if(typeof size!=="number")throw new TypeError("Argument must be a number");var buf=Buffer(size);if(fill!==undefined)if(typeof encoding==="string")buf.fill(fill,encoding);else buf.fill(fill);else buf.fill(0);return buf};SafeBuffer.allocUnsafe=function(size){if(typeof size!=="number")throw new TypeError("Argument must be a number");return Buffer(size)};SafeBuffer.allocUnsafeSlow=function(size){if(typeof size!=="number")throw new TypeError("Argument must be a number");return buffer.SlowBuffer(size)}},
    {"buffer":23}],84:[function(_dereq_,module,exports){(function(global){var ClientRequest=_dereq_("./lib/request");var extend=_dereq_("xtend");var statusCodes=_dereq_("builtin-status-codes");var url=_dereq_("url");var http=exports;http.request=function(opts,cb){if(typeof opts==="string")opts=url.parse(opts);else opts=extend(opts);var defaultProtocol=global.location.protocol.search(/^https?:$/)===-1?"http:":"";var protocol=opts.protocol||defaultProtocol;var host=opts.hostname||opts.host;var port=opts.port;
    var path=opts.path||"/";if(host&&host.indexOf(":")!==-1)host="["+host+"]";opts.url=(host?protocol+"//"+host:"")+(port?":"+port:"")+path;opts.method=(opts.method||"GET").toUpperCase();opts.headers=opts.headers||{};var req=new ClientRequest(opts);if(cb)req.on("response",cb);return req};http.get=function get(opts,cb){var req=http.request(opts,cb);req.end();return req};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":86,"builtin-status-codes":24,"url":90,"xtend":93}],85:[function(_dereq_,module,exports){(function(global){exports.fetch=isFunction(global.fetch)&&isFunction(global.ReadableStream);
    exports.blobConstructor=false;try{new Blob([new ArrayBuffer(1)]);exports.blobConstructor=true}catch(e){}var xhr;function getXHR(){if(xhr!==undefined)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(type){var xhr=getXHR();if(!xhr)return false;try{xhr.responseType=type;return xhr.responseType===type}catch(e){}return false}var haveArrayBuffer=typeof global.ArrayBuffer!==
    "undefined";var 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):false);exports.vbArray=isFunction(global.VBArray);function isFunction(value){return typeof value===
    "function"}xhr=null}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{}],86:[function(_dereq_,module,exports){(function(process,global,Buffer){var capability=_dereq_("./capability");var inherits=_dereq_("inherits");var response=_dereq_("./response");var stream=_dereq_("readable-stream");var toArrayBuffer=_dereq_("to-arraybuffer");var IncomingMessage=response.IncomingMessage;var rStates=response.readyStates;function decideMode(preferBinary,
    useFetch){if(capability.fetch&&useFetch)return"fetch";else if(capability.mozchunkedarraybuffer)return"moz-chunked-arraybuffer";else if(capability.msstream)return"ms-stream";else if(capability.arraybuffer&&preferBinary)return"arraybuffer";else if(capability.vbArray&&preferBinary)return"text:vbarray";else return"text"}var ClientRequest=module.exports=function(opts){var self=this;stream.Writable.call(self);self._opts=opts;self._body=[];self._headers={};if(opts.auth)self.setHeader("Authorization","Basic "+
    (new Buffer(opts.auth)).toString("base64"));Object.keys(opts.headers).forEach(function(name){self.setHeader(name,opts.headers[name])});var preferBinary;var useFetch=true;if(opts.mode==="disable-fetch"||"timeout"in opts){useFetch=false;preferBinary=true}else if(opts.mode==="prefer-streaming")preferBinary=false;else if(opts.mode==="allow-wrong-content-type")preferBinary=!capability.overrideMimeType;else if(!opts.mode||opts.mode==="default"||opts.mode==="prefer-fast")preferBinary=true;else throw new Error("Invalid value for opts.mode");
    self._mode=decideMode(preferBinary,useFetch);self.on("finish",function(){self._onFinish()})};inherits(ClientRequest,stream.Writable);ClientRequest.prototype.setHeader=function(name,value){var self=this;var lowerName=name.toLowerCase();if(unsafeHeaders.indexOf(lowerName)!==-1)return;self._headers[lowerName]={name:name,value:value}};ClientRequest.prototype.getHeader=function(name){var header=this._headers[name.toLowerCase()];if(header)return header.value;return null};ClientRequest.prototype.removeHeader=
    function(name){var self=this;delete self._headers[name.toLowerCase()]};ClientRequest.prototype._onFinish=function(){var self=this;if(self._destroyed)return;var opts=self._opts;var headersObj=self._headers;var body=null;if(opts.method!=="GET"&&opts.method!=="HEAD")if(capability.blobConstructor)body=new global.Blob(self._body.map(function(buffer){return toArrayBuffer(buffer)}),{type:(headersObj["content-type"]||{}).value||""});else body=Buffer.concat(self._body).toString();var headersList=[];Object.keys(headersObj).forEach(function(keyName){var name=
    headersObj[keyName].name;var value=headersObj[keyName].value;if(Array.isArray(value))value.forEach(function(v){headersList.push([name,v])});else headersList.push([name,value])});if(self._mode==="fetch")global.fetch(self._opts.url,{method:self._opts.method,headers:headersList,body:body||undefined,mode:"cors",credentials:opts.withCredentials?"include":"same-origin"}).then(function(response){self._fetchResponse=response;self._connect()},function(reason){self.emit("error",reason)});else{var xhr=self._xhr=
    new global.XMLHttpRequest;try{xhr.open(self._opts.method,self._opts.url,true)}catch(err){process.nextTick(function(){self.emit("error",err)});return}if("responseType"in xhr)xhr.responseType=self._mode.split(":")[0];if("withCredentials"in xhr)xhr.withCredentials=!!opts.withCredentials;if(self._mode==="text"&&"overrideMimeType"in xhr)xhr.overrideMimeType("text/plain; charset\x3dx-user-defined");if("timeout"in opts){xhr.timeout=opts.timeout;xhr.ontimeout=function(){self.emit("timeout")}}headersList.forEach(function(header){xhr.setRequestHeader(header[0],
    header[1])});self._response=null;xhr.onreadystatechange=function(){switch(xhr.readyState){case rStates.LOADING:case rStates.DONE:self._onXHRProgress();break}};if(self._mode==="moz-chunked-arraybuffer")xhr.onprogress=function(){self._onXHRProgress()};xhr.onerror=function(){if(self._destroyed)return;self.emit("error",new Error("XHR error"))};try{xhr.send(body)}catch(err){process.nextTick(function(){self.emit("error",err)});return}}};function statusValid(xhr){try{var status=xhr.status;return status!==
    null&&status!==0}catch(e){return false}}ClientRequest.prototype._onXHRProgress=function(){var self=this;if(!statusValid(self._xhr)||self._destroyed)return;if(!self._response)self._connect();self._response._onXHRProgress()};ClientRequest.prototype._connect=function(){var self=this;if(self._destroyed)return;self._response=new IncomingMessage(self._xhr,self._fetchResponse,self._mode);self._response.on("error",function(err){self.emit("error",err)});self.emit("response",self._response)};ClientRequest.prototype._write=
    function(chunk,encoding,cb){var self=this;self._body.push(chunk);cb()};ClientRequest.prototype.abort=ClientRequest.prototype.destroy=function(){var self=this;self._destroyed=true;if(self._response)self._response._destroyed=true;if(self._xhr)self._xhr.abort()};ClientRequest.prototype.end=function(data,encoding,cb){var self=this;if(typeof data==="function"){cb=data;data=undefined}stream.Writable.prototype.end.call(self,data,encoding,cb)};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,_dereq_("_process"),typeof global!=="undefined"?global:typeof self!=="undefined"?
    self:typeof window!=="undefined"?window:{},_dereq_("buffer").Buffer)},{"./capability":85,"./response":87,"_process":69,"buffer":23,"inherits":33,"readable-stream":82,"to-arraybuffer":89}],87:[function(_dereq_,module,exports){(function(process,global,Buffer){var capability=_dereq_("./capability");var inherits=_dereq_("inherits");var stream=_dereq_("readable-stream");var rStates=exports.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4};var IncomingMessage=exports.IncomingMessage=function(xhr,
    response,mode){var self=this;stream.Readable.call(self);self._mode=mode;self.headers={};self.rawHeaders=[];self.trailers={};self.rawTrailers=[];self.on("end",function(){process.nextTick(function(){self.emit("close")})});if(mode==="fetch"){self._fetchResponse=response;self.url=response.url;self.statusCode=response.status;self.statusMessage=response.statusText;response.headers.forEach(function(header,key){self.headers[key.toLowerCase()]=header;self.rawHeaders.push(key,header)});var reader=response.body.getReader();
    function read(){reader.read().then(function(result){if(self._destroyed)return;if(result.done){self.push(null);return}self.push(new Buffer(result.value));read()}).catch(function(err){self.emit("error",err)})}read()}else{self._xhr=xhr;self._pos=0;self.url=xhr.responseURL;self.statusCode=xhr.status;self.statusMessage=xhr.statusText;var headers=xhr.getAllResponseHeaders().split(/\r?\n/);headers.forEach(function(header){var matches=header.match(/^([^:]+):\s*(.*)/);if(matches){var key=matches[1].toLowerCase();
    if(key==="set-cookie"){if(self.headers[key]===undefined)self.headers[key]=[];self.headers[key].push(matches[2])}else if(self.headers[key]!==undefined)self.headers[key]+=", "+matches[2];else self.headers[key]=matches[2];self.rawHeaders.push(matches[1],matches[2])}});self._charset="x-user-defined";if(!capability.overrideMimeType){var mimeType=self.rawHeaders["mime-type"];if(mimeType){var charsetMatch=mimeType.match(/;\s*charset=([^;])(;|$)/);if(charsetMatch)self._charset=charsetMatch[1].toLowerCase()}if(!self._charset)self._charset=
    "utf-8"}}};inherits(IncomingMessage,stream.Readable);IncomingMessage.prototype._read=function(){};IncomingMessage.prototype._onXHRProgress=function(){var self=this;var xhr=self._xhr;var response=null;switch(self._mode){case "text:vbarray":if(xhr.readyState!==rStates.DONE)break;try{response=(new global.VBArray(xhr.responseBody)).toArray()}catch(e){}if(response!==null){self.push(new Buffer(response));break}case "text":try{response=xhr.responseText}catch(e){self._mode="text:vbarray";break}if(response.length>
    self._pos){var newData=response.substr(self._pos);if(self._charset==="x-user-defined"){var buffer=new Buffer(newData.length);for(var i=0;i<newData.length;i++)buffer[i]=newData.charCodeAt(i)&255;self.push(buffer)}else self.push(newData,self._charset);self._pos=response.length}break;case "arraybuffer":if(xhr.readyState!==rStates.DONE||!xhr.response)break;response=xhr.response;self.push(new Buffer(new Uint8Array(response)));break;case "moz-chunked-arraybuffer":response=xhr.response;if(xhr.readyState!==
    rStates.LOADING||!response)break;self.push(new Buffer(new Uint8Array(response)));break;case "ms-stream":response=xhr.response;if(xhr.readyState!==rStates.LOADING)break;var reader=new global.MSStreamReader;reader.onprogress=function(){if(reader.result.byteLength>self._pos){self.push(new Buffer(new Uint8Array(reader.result.slice(self._pos))));self._pos=reader.result.byteLength}};reader.onload=function(){self.push(null)};reader.readAsArrayBuffer(response);break}if(self._xhr.readyState===rStates.DONE&&
    self._mode!=="ms-stream")self.push(null)}}).call(this,_dereq_("_process"),typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{},_dereq_("buffer").Buffer)},{"./capability":85,"_process":69,"buffer":23,"inherits":33,"readable-stream":82}],88:[function(_dereq_,module,exports){var Buffer=_dereq_("safe-buffer").Buffer;var isEncoding=Buffer.isEncoding||function(encoding){encoding=""+encoding;switch(encoding&&encoding.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 true;
    default:return false}};function _normalizeEncoding(enc){if(!enc)return"utf8";var retried;while(true)switch(enc){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 enc;default:if(retried)return;enc=(""+enc).toLowerCase();retried=true}}function normalizeEncoding(enc){var nenc=_normalizeEncoding(enc);if(typeof nenc!=="string"&&(Buffer.isEncoding===isEncoding||
    !isEncoding(enc)))throw new Error("Unknown encoding: "+enc);return nenc||enc}exports.StringDecoder=StringDecoder;function StringDecoder(encoding){this.encoding=normalizeEncoding(encoding);var nb;switch(this.encoding){case "utf16le":this.text=utf16Text;this.end=utf16End;nb=4;break;case "utf8":this.fillLast=utf8FillLast;nb=4;break;case "base64":this.text=base64Text;this.end=base64End;nb=3;break;default:this.write=simpleWrite;this.end=simpleEnd;return}this.lastNeed=0;this.lastTotal=0;this.lastChar=Buffer.allocUnsafe(nb)}
    StringDecoder.prototype.write=function(buf){if(buf.length===0)return"";var r;var i;if(this.lastNeed){r=this.fillLast(buf);if(r===undefined)return"";i=this.lastNeed;this.lastNeed=0}else i=0;if(i<buf.length)return r?r+this.text(buf,i):this.text(buf,i);return r||""};StringDecoder.prototype.end=utf8End;StringDecoder.prototype.text=utf8Text;StringDecoder.prototype.fillLast=function(buf){if(this.lastNeed<=buf.length){buf.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed);return this.lastChar.toString(this.encoding,
    0,this.lastTotal)}buf.copy(this.lastChar,this.lastTotal-this.lastNeed,0,buf.length);this.lastNeed-=buf.length};function utf8CheckByte(byte){if(byte<=127)return 0;else if(byte>>5===6)return 2;else if(byte>>4===14)return 3;else if(byte>>3===30)return 4;return-1}function utf8CheckIncomplete(self,buf,i){var j=buf.length-1;if(j<i)return 0;var nb=utf8CheckByte(buf[j]);if(nb>=0){if(nb>0)self.lastNeed=nb-1;return nb}if(--j<i)return 0;nb=utf8CheckByte(buf[j]);if(nb>=0){if(nb>0)self.lastNeed=nb-2;return nb}if(--j<
    i)return 0;nb=utf8CheckByte(buf[j]);if(nb>=0){if(nb>0)if(nb===2)nb=0;else self.lastNeed=nb-3;return nb}return 0}function utf8CheckExtraBytes(self,buf,p){if((buf[0]&192)!==128){self.lastNeed=0;return"\ufffd".repeat(p)}if(self.lastNeed>1&&buf.length>1){if((buf[1]&192)!==128){self.lastNeed=1;return"\ufffd".repeat(p+1)}if(self.lastNeed>2&&buf.length>2)if((buf[2]&192)!==128){self.lastNeed=2;return"\ufffd".repeat(p+2)}}}function utf8FillLast(buf){var p=this.lastTotal-this.lastNeed;var r=utf8CheckExtraBytes(this,
    buf,p);if(r!==undefined)return r;if(this.lastNeed<=buf.length){buf.copy(this.lastChar,p,0,this.lastNeed);return this.lastChar.toString(this.encoding,0,this.lastTotal)}buf.copy(this.lastChar,p,0,buf.length);this.lastNeed-=buf.length}function utf8Text(buf,i){var total=utf8CheckIncomplete(this,buf,i);if(!this.lastNeed)return buf.toString("utf8",i);this.lastTotal=total;var end=buf.length-(total-this.lastNeed);buf.copy(this.lastChar,0,end);return buf.toString("utf8",i,end)}function utf8End(buf){var r=
    buf&&buf.length?this.write(buf):"";if(this.lastNeed)return r+"\ufffd".repeat(this.lastTotal-this.lastNeed);return r}function utf16Text(buf,i){if((buf.length-i)%2===0){var r=buf.toString("utf16le",i);if(r){var c=r.charCodeAt(r.length-1);if(c>=55296&&c<=56319){this.lastNeed=2;this.lastTotal=4;this.lastChar[0]=buf[buf.length-2];this.lastChar[1]=buf[buf.length-1];return r.slice(0,-1)}}return r}this.lastNeed=1;this.lastTotal=2;this.lastChar[0]=buf[buf.length-1];return buf.toString("utf16le",i,buf.length-
    1)}function utf16End(buf){var r=buf&&buf.length?this.write(buf):"";if(this.lastNeed){var end=this.lastTotal-this.lastNeed;return r+this.lastChar.toString("utf16le",0,end)}return r}function base64Text(buf,i){var n=(buf.length-i)%3;if(n===0)return buf.toString("base64",i);this.lastNeed=3-n;this.lastTotal=3;if(n===1)this.lastChar[0]=buf[buf.length-1];else{this.lastChar[0]=buf[buf.length-2];this.lastChar[1]=buf[buf.length-1]}return buf.toString("base64",i,buf.length-n)}function base64End(buf){var r=buf&&
    buf.length?this.write(buf):"";if(this.lastNeed)return r+this.lastChar.toString("base64",0,3-this.lastNeed);return r}function simpleWrite(buf){return buf.toString(this.encoding)}function simpleEnd(buf){return buf&&buf.length?this.write(buf):""}},{"safe-buffer":83}],89:[function(_dereq_,module,exports){var Buffer=_dereq_("buffer").Buffer;module.exports=function(buf){if(buf instanceof Uint8Array)if(buf.byteOffset===0&&buf.byteLength===buf.buffer.byteLength)return buf.buffer;else if(typeof buf.buffer.slice===
    "function")return buf.buffer.slice(buf.byteOffset,buf.byteOffset+buf.byteLength);if(Buffer.isBuffer(buf)){var arrayCopy=new Uint8Array(buf.length);var len=buf.length;for(var i=0;i<len;i++)arrayCopy[i]=buf[i];return arrayCopy.buffer}else throw new Error("Argument must be a Buffer");}},{"buffer":23}],90:[function(_dereq_,module,exports){var punycode=_dereq_("punycode");var util=_dereq_("./util");exports.parse=urlParse;exports.resolve=urlResolve;exports.resolveObject=urlResolveObject;exports.format=
    urlFormat;exports.Url=Url;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}var protocolPattern=/^([a-z0-9.+-]+:)/i,portPattern=/:[0-9]*$/,simplePathPattern=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,delims=["\x3c","\x3e",'"',"`"," ","\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":true,"javascript:":true},hostlessProtocol={"javascript":true,"javascript:":true},slashedProtocol={"http":true,"https":true,"ftp":true,"gopher":true,"file":true,"http:":true,"https:":true,"ftp:":true,"gopher:":true,"file:":true},querystring=_dereq_("querystring");function urlParse(url,parseQueryString,
    slashesDenoteHost){if(url&&util.isObject(url)&&url instanceof Url)return url;var u=new Url;u.parse(url,parseQueryString,slashesDenoteHost);return u}Url.prototype.parse=function(url,parseQueryString,slashesDenoteHost){if(!util.isString(url))throw new TypeError("Parameter 'url' must be a string, not "+typeof url);var queryIndex=url.indexOf("?"),splitter=queryIndex!==-1&&queryIndex<url.indexOf("#")?"?":"#",uSplit=url.split(splitter),slashRegex=/\\/g;uSplit[0]=uSplit[0].replace(slashRegex,"/");url=uSplit.join(splitter);
    var rest=url;rest=rest.trim();if(!slashesDenoteHost&&url.split("#").length===1){var simplePath=simplePathPattern.exec(rest);if(simplePath){this.path=rest;this.href=rest;this.pathname=simplePath[1];if(simplePath[2]){this.search=simplePath[2];if(parseQueryString)this.query=querystring.parse(this.search.substr(1));else this.query=this.search.substr(1)}else if(parseQueryString){this.search="";this.query={}}return this}}var proto=protocolPattern.exec(rest);if(proto){proto=proto[0];var lowerProto=proto.toLowerCase();
    this.protocol=lowerProto;rest=rest.substr(proto.length)}if(slashesDenoteHost||proto||rest.match(/^\/\/[^@\/]+@[^@\/]+/)){var slashes=rest.substr(0,2)==="//";if(slashes&&!(proto&&hostlessProtocol[proto])){rest=rest.substr(2);this.slashes=true}}if(!hostlessProtocol[proto]&&(slashes||proto&&!slashedProtocol[proto])){var hostEnd=-1;for(var i=0;i<hostEndingChars.length;i++){var hec=rest.indexOf(hostEndingChars[i]);if(hec!==-1&&(hostEnd===-1||hec<hostEnd))hostEnd=hec}var auth,atSign;if(hostEnd===-1)atSign=
    rest.lastIndexOf("@");else atSign=rest.lastIndexOf("@",hostEnd);if(atSign!==-1){auth=rest.slice(0,atSign);rest=rest.slice(atSign+1);this.auth=decodeURIComponent(auth)}hostEnd=-1;for(var i=0;i<nonHostChars.length;i++){var hec=rest.indexOf(nonHostChars[i]);if(hec!==-1&&(hostEnd===-1||hec<hostEnd))hostEnd=hec}if(hostEnd===-1)hostEnd=rest.length;this.host=rest.slice(0,hostEnd);rest=rest.slice(hostEnd);this.parseHost();this.hostname=this.hostname||"";var ipv6Hostname=this.hostname[0]==="["&&this.hostname[this.hostname.length-
    1]==="]";if(!ipv6Hostname){var hostparts=this.hostname.split(/\./);for(var i=0,l=hostparts.length;i<l;i++){var part=hostparts[i];if(!part)continue;if(!part.match(hostnamePartPattern)){var newpart="";for(var j=0,k=part.length;j<k;j++)if(part.charCodeAt(j)>127)newpart+="x";else newpart+=part[j];if(!newpart.match(hostnamePartPattern)){var validParts=hostparts.slice(0,i);var notHost=hostparts.slice(i+1);var bit=part.match(hostnamePartStart);if(bit){validParts.push(bit[1]);notHost.unshift(bit[2])}if(notHost.length)rest=
    "/"+notHost.join(".")+rest;this.hostname=validParts.join(".");break}}}}if(this.hostname.length>hostnameMaxLen)this.hostname="";else this.hostname=this.hostname.toLowerCase();if(!ipv6Hostname)this.hostname=punycode.toASCII(this.hostname);var p=this.port?":"+this.port:"";var h=this.hostname||"";this.host=h+p;this.href+=this.host;if(ipv6Hostname){this.hostname=this.hostname.substr(1,this.hostname.length-2);if(rest[0]!=="/")rest="/"+rest}}if(!unsafeProtocol[lowerProto])for(var i=0,l=autoEscape.length;i<
    l;i++){var ae=autoEscape[i];if(rest.indexOf(ae)===-1)continue;var esc=encodeURIComponent(ae);if(esc===ae)esc=escape(ae);rest=rest.split(ae).join(esc)}var hash=rest.indexOf("#");if(hash!==-1){this.hash=rest.substr(hash);rest=rest.slice(0,hash)}var qm=rest.indexOf("?");if(qm!==-1){this.search=rest.substr(qm);this.query=rest.substr(qm+1);if(parseQueryString)this.query=querystring.parse(this.query);rest=rest.slice(0,qm)}else if(parseQueryString){this.search="";this.query={}}if(rest)this.pathname=rest;
    if(slashedProtocol[lowerProto]&&this.hostname&&!this.pathname)this.pathname="/";if(this.pathname||this.search){var p=this.pathname||"";var s=this.search||"";this.path=p+s}this.href=this.format();return this};function urlFormat(obj){if(util.isString(obj))obj=urlParse(obj);if(!(obj instanceof Url))return Url.prototype.format.call(obj);return obj.format()}Url.prototype.format=function(){var auth=this.auth||"";if(auth){auth=encodeURIComponent(auth);auth=auth.replace(/%3A/i,":");auth+="@"}var protocol=
    this.protocol||"",pathname=this.pathname||"",hash=this.hash||"",host=false,query="";if(this.host)host=auth+this.host;else if(this.hostname){host=auth+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]");if(this.port)host+=":"+this.port}if(this.query&&util.isObject(this.query)&&Object.keys(this.query).length)query=querystring.stringify(this.query);var search=this.search||query&&"?"+query||"";if(protocol&&protocol.substr(-1)!==":")protocol+=":";if(this.slashes||(!protocol||slashedProtocol[protocol])&&
    host!==false){host="//"+(host||"");if(pathname&&pathname.charAt(0)!=="/")pathname="/"+pathname}else if(!host)host="";if(hash&&hash.charAt(0)!=="#")hash="#"+hash;if(search&&search.charAt(0)!=="?")search="?"+search;pathname=pathname.replace(/[?#]/g,function(match){return encodeURIComponent(match)});search=search.replace("#","%23");return protocol+host+pathname+search+hash};function urlResolve(source,relative){return urlParse(source,false,true).resolve(relative)}Url.prototype.resolve=function(relative){return this.resolveObject(urlParse(relative,
    false,true)).format()};function urlResolveObject(source,relative){if(!source)return relative;return urlParse(source,false,true).resolveObject(relative)}Url.prototype.resolveObject=function(relative){if(util.isString(relative)){var rel=new Url;rel.parse(relative,false,true);relative=rel}var result=new Url;var tkeys=Object.keys(this);for(var tk=0;tk<tkeys.length;tk++){var tkey=tkeys[tk];result[tkey]=this[tkey]}result.hash=relative.hash;if(relative.href===""){result.href=result.format();return result}if(relative.slashes&&
    !relative.protocol){var rkeys=Object.keys(relative);for(var rk=0;rk<rkeys.length;rk++){var rkey=rkeys[rk];if(rkey!=="protocol")result[rkey]=relative[rkey]}if(slashedProtocol[result.protocol]&&result.hostname&&!result.pathname)result.path=result.pathname="/";result.href=result.format();return result}if(relative.protocol&&relative.protocol!==result.protocol){if(!slashedProtocol[relative.protocol]){var keys=Object.keys(relative);for(var v=0;v<keys.length;v++){var k=keys[v];result[k]=relative[k]}result.href=
    result.format();return result}result.protocol=relative.protocol;if(!relative.host&&!hostlessProtocol[relative.protocol]){var relPath=(relative.pathname||"").split("/");while(relPath.length&&!(relative.host=relPath.shift()));if(!relative.host)relative.host="";if(!relative.hostname)relative.hostname="";if(relPath[0]!=="")relPath.unshift("");if(relPath.length<2)relPath.unshift("");result.pathname=relPath.join("/")}else result.pathname=relative.pathname;result.search=relative.search;result.query=relative.query;
    result.host=relative.host||"";result.auth=relative.auth;result.hostname=relative.hostname||relative.host;result.port=relative.port;if(result.pathname||result.search){var p=result.pathname||"";var s=result.search||"";result.path=p+s}result.slashes=result.slashes||relative.slashes;result.href=result.format();return result}var isSourceAbs=result.pathname&&result.pathname.charAt(0)==="/",isRelAbs=relative.host||relative.pathname&&relative.pathname.charAt(0)==="/",mustEndAbs=isRelAbs||isSourceAbs||result.host&&
    relative.pathname,removeAllDots=mustEndAbs,srcPath=result.pathname&&result.pathname.split("/")||[],relPath=relative.pathname&&relative.pathname.split("/")||[],psychotic=result.protocol&&!slashedProtocol[result.protocol];if(psychotic){result.hostname="";result.port=null;if(result.host)if(srcPath[0]==="")srcPath[0]=result.host;else srcPath.unshift(result.host);result.host="";if(relative.protocol){relative.hostname=null;relative.port=null;if(relative.host)if(relPath[0]==="")relPath[0]=relative.host;
    else relPath.unshift(relative.host);relative.host=null}mustEndAbs=mustEndAbs&&(relPath[0]===""||srcPath[0]==="")}if(isRelAbs){result.host=relative.host||relative.host===""?relative.host:result.host;result.hostname=relative.hostname||relative.hostname===""?relative.hostname:result.hostname;result.search=relative.search;result.query=relative.query;srcPath=relPath}else if(relPath.length){if(!srcPath)srcPath=[];srcPath.pop();srcPath=srcPath.concat(relPath);result.search=relative.search;result.query=relative.query}else if(!util.isNullOrUndefined(relative.search)){if(psychotic){result.hostname=
    result.host=srcPath.shift();var authInHost=result.host&&result.host.indexOf("@")>0?result.host.split("@"):false;if(authInHost){result.auth=authInHost.shift();result.host=result.hostname=authInHost.shift()}}result.search=relative.search;result.query=relative.query;if(!util.isNull(result.pathname)||!util.isNull(result.search))result.path=(result.pathname?result.pathname:"")+(result.search?result.search:"");result.href=result.format();return result}if(!srcPath.length){result.pathname=null;if(result.search)result.path=
    "/"+result.search;else result.path=null;result.href=result.format();return result}var last=srcPath.slice(-1)[0];var hasTrailingSlash=(result.host||relative.host||srcPath.length>1)&&(last==="."||last==="..")||last==="";var up=0;for(var i=srcPath.length;i>=0;i--){last=srcPath[i];if(last===".")srcPath.splice(i,1);else if(last===".."){srcPath.splice(i,1);up++}else if(up){srcPath.splice(i,1);up--}}if(!mustEndAbs&&!removeAllDots)for(;up--;JSCOMPILER_PRESERVE(up))srcPath.unshift("..");if(mustEndAbs&&srcPath[0]!==
    ""&&(!srcPath[0]||srcPath[0].charAt(0)!=="/"))srcPath.unshift("");if(hasTrailingSlash&&srcPath.join("/").substr(-1)!=="/")srcPath.push("");var isAbsolute=srcPath[0]===""||srcPath[0]&&srcPath[0].charAt(0)==="/";if(psychotic){result.hostname=result.host=isAbsolute?"":srcPath.length?srcPath.shift():"";var authInHost=result.host&&result.host.indexOf("@")>0?result.host.split("@"):false;if(authInHost){result.auth=authInHost.shift();result.host=result.hostname=authInHost.shift()}}mustEndAbs=mustEndAbs||
    result.host&&srcPath.length;if(mustEndAbs&&!isAbsolute)srcPath.unshift("");if(!srcPath.length){result.pathname=null;result.path=null}else result.pathname=srcPath.join("/");if(!util.isNull(result.pathname)||!util.isNull(result.search))result.path=(result.pathname?result.pathname:"")+(result.search?result.search:"");result.auth=relative.auth||result.auth;result.slashes=result.slashes||relative.slashes;result.href=result.format();return result};Url.prototype.parseHost=function(){var host=this.host;var port=
    portPattern.exec(host);if(port){port=port[0];if(port!==":")this.port=port.substr(1);host=host.substr(0,host.length-port.length)}if(host)this.hostname=host}},{"./util":91,"punycode":70,"querystring":73}],91:[function(_dereq_,module,exports){module.exports={isString:function(arg){return typeof arg==="string"},isObject:function(arg){return typeof arg==="object"&&arg!==null},isNull:function(arg){return arg===null},isNullOrUndefined:function(arg){return arg==null}}},{}],92:[function(_dereq_,module,exports){(function(global){module.exports=
    deprecate;function deprecate(fn,msg){if(config("noDeprecation"))return fn;var warned=false;function deprecated(){if(!warned){if(config("throwDeprecation"))throw new Error(msg);else if(config("traceDeprecation"))console.trace(msg);else console.warn(msg);warned=true}return fn.apply(this,arguments)}return deprecated}function config(name){try{if(!global.localStorage)return false}catch(_){return false}var val=global.localStorage[name];if(null==val)return false;return String(val).toLowerCase()==="true"}
    }).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{}],93:[function(_dereq_,module,exports){module.exports=extend;var hasOwnProperty=Object.prototype.hasOwnProperty;function extend(){var target={};for(var i=0;i<arguments.length;i++){var source=arguments[i];for(var key in source)if(hasOwnProperty.call(source,key))target[key]=source[key]}return target}},{}]},{},[3])(3)})});var jsonSchemaRefParser$1=Object.freeze({default:jsonSchemaRefParser});
    
    var require$$3=jsonSchemaRefParser$1&&jsonSchemaRefParser||jsonSchemaRefParser$1;function _interopDefault$1(ex){return ex&&typeof ex==="object"&&"default"in ex?ex["default"]:ex}var RandExp=_interopDefault$1(randexp);var deref=_interopDefault$1(lib$1);var jsonpath$1=_interopDefault$1(jsonpath);var $RefParser=_interopDefault$1(require$$3);function template(value,schema){if(Array.isArray(value))return value.map(function(x){return template(x,schema)});if(typeof value==="string")value=value.replace(/#\{([\w.-]+)\}/g,
    function(_,$1){return schema[$1]});return value}function proxy(gen){return function(value,schema,property,rootSchema){var fn=value;var args=[];if(typeof value==="object"){fn=Object.keys(value)[0];if(Array.isArray(value[fn]))args=value[fn];else args.push(value[fn])}var props=fn.split(".");var ctx=gen();while(props.length>1)ctx=ctx[props.shift()];value=typeof ctx==="object"?ctx[props[0]]:ctx;if(typeof value==="function")value=value.apply(ctx,args.map(function(x){return template(x,rootSchema)}));if(Object.prototype.toString.call(value)===
    "[object Object]")for(var key in value)if(typeof value[key]==="function")throw new Error('Cannot resolve value for "'+property+": "+fn+'", given: '+value);return value}}var Container=function(){function Container(){this.registry={};this.support={}}Container.prototype.extend=function(name,callback){var _this=this;this.registry[name]=callback(this.registry[name]);if(!this.support[name])this.support[name]=proxy(function(){return _this.registry[name]})};Container.prototype.define=function(name,callback){this.support[name]=
    callback};Container.prototype.get=function(name){if(typeof this.registry[name]==="undefined")throw new ReferenceError('"'+name+"\" dependency doesn't exist.");return this.registry[name]};Container.prototype.wrap=function(schema){var keys=Object.keys(schema);var length=keys.length;var context={};while(length--){var fn=keys[length].replace(/^x-/,"");var gen=this.support[fn];if(typeof gen==="function"){Object.defineProperty(schema,"generate",{configurable:false,enumerable:false,writable:false,value:function(rootSchema){return gen.call(context,
    schema[keys[length]],schema,keys[length],rootSchema)}});break}}return schema};return Container}();var Registry=function(){function Registry(){this.data={}}Registry.prototype.register=function(name,callback){this.data[name]=callback};Registry.prototype.registerMany=function(formats){for(var name in formats)this.data[name]=formats[name]};Registry.prototype.get=function(name){var format=this.data[name];return format};Registry.prototype.list=function(){return this.data};return Registry}();var registry=
    new Registry;function formatAPI(nameOrFormatMap,callback){if(typeof nameOrFormatMap==="undefined")return registry.list();else if(typeof nameOrFormatMap==="string")if(typeof callback==="function")registry.register(nameOrFormatMap,callback);else return registry.get(nameOrFormatMap);else registry.registerMany(nameOrFormatMap)}var OptionRegistry=function(_super){tslib_es6.__extends(OptionRegistry,_super);function OptionRegistry(){var _this=_super.call(this)||this;_this.data=_this.defaults;return _this}
    Object.defineProperty(OptionRegistry.prototype,"defaults",{get:function(){var data={};data["defaultInvalidTypeProduct"]=null;data["defaultRandExpMax"]=10;data["ignoreProperties"]=[];data["ignoreMissingRefs"]=false;data["failOnInvalidTypes"]=true;data["failOnInvalidFormat"]=true;data["alwaysFakeOptionals"]=false;data["optionalsProbability"]=0;data["useDefaultValue"]=false;data["requiredOnly"]=false;data["minItems"]=0;data["maxItems"]=null;data["maxLength"]=null;data["resolveJsonPath"]=false;data["reuseProperties"]=
    false;data["fillProperties"]=true;data["random"]=Math.random;return data},enumerable:true,configurable:true});return OptionRegistry}(Registry);var registry$1=new OptionRegistry;function optionAPI(nameOrOptionMap){if(typeof nameOrOptionMap==="string")return registry$1.get(nameOrOptionMap);else return registry$1.registerMany(nameOrOptionMap)}optionAPI.getDefaults=function(){return registry$1.defaults};var ALL_TYPES=["array","object","integer","number","string","boolean","null"];var MOST_NEAR_DATETIME=
    2524608E6;var MIN_INTEGER=-1E8;var MAX_INTEGER=1E8;var MIN_NUMBER=-100;var MAX_NUMBER=100;var env={ALL_TYPES:ALL_TYPES,MIN_NUMBER:MIN_NUMBER,MAX_NUMBER:MAX_NUMBER,MIN_INTEGER:MIN_INTEGER,MAX_INTEGER:MAX_INTEGER,MOST_NEAR_DATETIME:MOST_NEAR_DATETIME};function _randexp(value){RandExp.prototype.max=optionAPI("defaultRandExpMax");RandExp.prototype.randInt=function(a,b){return a+Math.floor(optionAPI("random")()*(1+b-a))};var re=new RandExp(value);return re.gen()}function pick(collection){return collection[Math.floor(optionAPI("random")()*
    collection.length)]}function shuffle(collection){var tmp,key,copy=collection.slice(),length=collection.length;for(;length>0;){key=Math.floor(optionAPI("random")()*length);tmp=copy[--length];copy[length]=copy[key];copy[key]=tmp}return copy}function getRandom(min,max){return optionAPI("random")()*(max-min)+min}function number(min,max,defMin,defMax,hasPrecision){if(hasPrecision===void 0)hasPrecision=false;defMin=typeof defMin==="undefined"?env.MIN_NUMBER:defMin;defMax=typeof defMax==="undefined"?env.MAX_NUMBER:
    defMax;min=typeof min==="undefined"?defMin:min;max=typeof max==="undefined"?defMax:max;if(max<min)max+=min;var result=getRandom(min,max);if(!hasPrecision)return Math.round(result);return result}function by(type){switch(type){case "seconds":return number(0,60)*60;case "minutes":return number(15,50)*612;case "hours":return number(12,72)*36123;case "days":return number(7,30)*86412345;case "weeks":return number(4,52)*604812345;case "months":return number(2,13)*2592012345;case "years":return number(1,
    20)*31104012345}}function date(step){if(step)return by(step);var now=new Date;var days=number(-1E3,env.MOST_NEAR_DATETIME);now.setTime(now.getTime()-days);return now}var random={pick:pick,date:date,randexp:_randexp,shuffle:shuffle,number:number};function getSubAttribute(obj,dotSeparatedKey){var keyElements=dotSeparatedKey.split(".");while(keyElements.length){var prop=keyElements.shift();if(!obj[prop])break;obj=obj[prop]}return obj}function hasProperties(obj){var properties=[];for(var _i=1;_i<arguments.length;_i++)properties[_i-
    1]=arguments[_i];return properties.filter(function(key){return typeof obj[key]!=="undefined"}).length>0}function typecast(schema,callback){var params={};switch(schema.type){case "integer":case "number":if(typeof schema.minimum!=="undefined")params.minimum=schema.minimum;if(typeof schema.maximum!=="undefined")params.maximum=schema.maximum;if(schema.enum){var min=Math.max(params.minimum||0,0);var max=Math.min(params.maximum||Infinity,Infinity);if(schema.exclusiveMinimum&&min===schema.minimum)min+=schema.multipleOf||
    1;if(schema.exclusiveMaximum&&max===schema.maximum)max-=schema.multipleOf||1;schema.enum=schema.enum.filter(function(x){if(x>=min&&x<=max)return true;return false})}break;case "string":if(typeof schema.minLength!=="undefined")params.minLength=schema.minLength;if(typeof schema.maxLength!=="undefined")params.maxLength=schema.maxLength;var _maxLength=optionAPI("maxLength");var _minLength=optionAPI("minLength");if(_maxLength&&params.maxLength>_maxLength)params.maxLength=_maxLength;if(_minLength&&params.minLength<
    _minLength)params.minLength=_minLength;break}var value=callback(params);switch(schema.type){case "number":value=parseFloat(value);break;case "integer":value=parseInt(value,10);break;case "boolean":value=!!value;break;case "string":value=String(value);var min=Math.max(params.minLength||0,0);var max=Math.min(params.maxLength||Infinity,Infinity);while(value.length<min)value+=" "+value;if(value.length>max)value=value.substr(0,max);break}return value}function merge(a,b){for(var key in b)if(typeof b[key]!==
    "object"||b[key]===null)a[key]=b[key];else if(Array.isArray(b[key])){a[key]=a[key]||[];b[key].forEach(function(value){if(a[key].indexOf(value)===-1)a[key].push(value)})}else if(typeof a[key]!=="object"||a[key]===null||Array.isArray(a[key]))a[key]=merge({},b[key]);else a[key]=merge(a[key],b[key]);return a}function clean(obj,isArray,requiredProps){if(!obj||typeof obj!=="object")return obj;if(Array.isArray(obj)){obj=obj.map(function(value){return clean(value,true,requiredProps)}).filter(function(value){return typeof value!==
    "undefined"});return obj}Object.keys(obj).forEach(function(k){if(!requiredProps||requiredProps.indexOf(k)===-1){if(Array.isArray(obj[k])&&!obj[k].length)delete obj[k]}else obj[k]=clean(obj[k])});if(!Object.keys(obj).length&&isArray)return undefined;return obj}function short(schema){var s=JSON.stringify(schema);var l=JSON.stringify(schema,null,2);return s.length>400?l.substr(0,400)+"...":l}function anyValue(){return random.pick([false,true,null,-1,NaN,Math.PI,Infinity,undefined,[],{},Math.random(),
    Math.random().toString(36).substr(2)])}function notValue(schema,parent){var copy=merge({},parent);if(typeof schema.minimum!=="undefined"){copy.maximum=schema.minimum;copy.exclusiveMaximum=true}if(typeof schema.maximum!=="undefined"){copy.minimum=schema.maximum>copy.maximum?0:schema.maximum;copy.exclusiveMinimum=true}if(typeof schema.minLength!=="undefined")copy.maxLength=schema.minLength;if(typeof schema.maxLength!=="undefined")copy.minLength=schema.maxLength>copy.maxLength?0:schema.maxLength;if(schema.type)copy.type=
    random.pick(env.ALL_TYPES.filter(function(x){if(x==="number"||x==="integer")return schema.type!=="number"&&schema.type!=="integer";return x!==schema.type}));else if(schema.enum){do var value=anyValue();while(schema.enum.indexOf(value)!==-1);copy.enum=[value]}if(schema.required&&copy.properties)schema.required.forEach(function(prop){delete copy.properties[prop]});return copy}function validate(value,schemas){return!schemas.every(function(x){if(typeof x.minimum!=="undefined"&&value>=x.minimum)return true;
    if(typeof x.maximum!=="undefined"&&value<=x.maximum)return true})}function isKey(prop){return prop==="enum"||prop==="default"||prop==="required"||prop==="definitions"}function omitProps(obj,props){var copy={};Object.keys(obj).forEach(function(k){if(props.indexOf(k)===-1)if(Array.isArray(obj[k]))copy[k]=obj[k].slice();else copy[k]=typeof obj[k]==="object"?merge({},obj[k]):obj[k]});return copy}var utils={getSubAttribute:getSubAttribute,hasProperties:hasProperties,omitProps:omitProps,typecast:typecast,
    merge:merge,clean:clean,short:short,notValue:notValue,anyValue:anyValue,validate:validate,isKey:isKey};var ParseError=function(_super){tslib_es6.__extends(ParseError,_super);function ParseError(message,path){var _this=_super.call(this)||this;_this.path=path;if(Error.captureStackTrace)Error.captureStackTrace(_this,_this.constructor);_this.name="ParseError";_this.message=message;_this.path=path;return _this}return ParseError}(Error);var inferredProperties={array:["additionalItems","items","maxItems",
    "minItems","uniqueItems"],integer:["exclusiveMaximum","exclusiveMinimum","maximum","minimum","multipleOf"],object:["additionalProperties","dependencies","maxProperties","minProperties","patternProperties","properties","required"],string:["maxLength","minLength","pattern"]};inferredProperties.number=inferredProperties.integer;var subschemaProperties=["additionalItems","items","additionalProperties","dependencies","patternProperties","properties"];function matchesType(obj,lastElementInPath,inferredTypeProperties){return Object.keys(obj).filter(function(prop){var isSubschema=
    subschemaProperties.indexOf(lastElementInPath)>-1,inferredPropertyFound=inferredTypeProperties.indexOf(prop)>-1;if(inferredPropertyFound&&!isSubschema)return true}).length>0}function inferType(obj,schemaPath){for(var typeName in inferredProperties){var lastElementInPath=schemaPath[schemaPath.length-1];if(matchesType(obj,lastElementInPath,inferredProperties[typeName]))return typeName}}function booleanGenerator(){return optionAPI("random")()>.5}var booleanType=booleanGenerator;function nullGenerator(){return null}
    var nullType=nullGenerator;function unique(path,items,value,sample,resolve,traverseCallback){var tmp=[],seen=[];function walk(obj){var json=JSON.stringify(obj);if(seen.indexOf(json)===-1){seen.push(json);tmp.push(obj)}}items.forEach(walk);var limit=100;while(tmp.length!==items.length){walk(traverseCallback(value.items||sample,path,resolve));if(!limit--)break}return tmp}var arrayType=function arrayType(value,path,resolve,traverseCallback){var items=[];if(!(value.items||value.additionalItems)){if(utils.hasProperties(value,
    "minItems","maxItems","uniqueItems"))throw new ParseError("missing items for "+utils.short(value),path);return items}var tmpItems=value.items;if(tmpItems instanceof Array)return Array.prototype.concat.call(items,tmpItems.map(function(item,key){var itemSubpath=path.concat(["items",key+""]);return traverseCallback(item,itemSubpath,resolve)}));var minItems=value.minItems;var maxItems=value.maxItems;if(optionAPI("minItems")&&minItems===undefined)minItems=!maxItems?optionAPI("minItems"):Math.min(optionAPI("minItems"),
    maxItems);if(optionAPI("maxItems")){if(maxItems&&maxItems>optionAPI("maxItems"))maxItems=optionAPI("maxItems");if(minItems&&minItems>optionAPI("maxItems"))minItems=maxItems}var optionalsProbability=optionAPI("alwaysFakeOptionals")===true?1:optionAPI("optionalsProbability");var length=maxItems!=null&&optionalsProbability?Math.round(maxItems*optionalsProbability):random.number(minItems,maxItems,1,5),sample=typeof value.additionalItems==="object"?value.additionalItems:{};for(var current=items.length;current<
    length;current++){var itemSubpath=path.concat(["items",current+""]);var element=traverseCallback(value.items||sample,itemSubpath,resolve);items.push(element)}if(value.uniqueItems)return unique(path.concat(["items"]),items,value,sample,resolve,traverseCallback);return items};var numberType=function numberType(value){var min=typeof value.minimum==="undefined"?env.MIN_INTEGER:value.minimum,max=typeof value.maximum==="undefined"?env.MAX_INTEGER:value.maximum,multipleOf=value.multipleOf;if(multipleOf){max=
    Math.floor(max/multipleOf)*multipleOf;min=Math.ceil(min/multipleOf)*multipleOf}if(value.exclusiveMinimum&&min===value.minimum)min+=multipleOf||1;if(value.exclusiveMaximum&&max===value.maximum)max-=multipleOf||1;if(min>max)return NaN;if(multipleOf){if(String(multipleOf).indexOf(".")===-1){var base=random.number(Math.floor(min/multipleOf),Math.floor(max/multipleOf))*multipleOf;while(base<min)base+=value.multipleOf;return base}var boundary=(max-min)/multipleOf;do{var num=random.number(0,boundary)*multipleOf;
    var fix=num/multipleOf%1}while(fix!==0);return num}return random.number(min,max,undefined,undefined,true)};var integerType=function integerType(value){var generated=numberType(value);return generated>0?Math.floor(generated):Math.ceil(generated)};var LIPSUM_WORDS=("Lorem ipsum dolor sit amet consectetur adipisicing elit sed do eiusmod tempor incididunt ut labore"+" et dolore magna aliqua Ut enim ad minim veniam quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea"+" commodo consequat Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla"+
    " pariatur Excepteur sint occaecat cupidatat non proident sunt in culpa qui officia deserunt mollit anim id est"+" laborum").split(" ");function wordsGenerator(length){var words=random.shuffle(LIPSUM_WORDS);return words.slice(0,length)}var anyType={type:["string","number","integer","boolean"]};var objectType=function objectType(value,path,resolve,traverseCallback){var props={};var properties=value.properties||{};var patternProperties=value.patternProperties||{};var requiredProperties=(value.required||
    []).slice();var allowsAdditional=value.additionalProperties===false?false:true;var propertyKeys=Object.keys(properties);var patternPropertyKeys=Object.keys(patternProperties);var optionalProperties=propertyKeys.concat(patternPropertyKeys).reduce(function(_response,_key){if(requiredProperties.indexOf(_key)===-1)_response.push(_key);return _response},[]);var allProperties=requiredProperties.concat(optionalProperties);var additionalProperties=allowsAdditional?value.additionalProperties===true?{}:value.additionalProperties:
    null;if(!allowsAdditional&&propertyKeys.length===0&&patternPropertyKeys.length===0&&utils.hasProperties(value,"minProperties","maxProperties","dependencies","required"))return{};if(optionAPI("requiredOnly")===true){requiredProperties.forEach(function(key){if(properties[key])props[key]=properties[key]});return traverseCallback(props,path.concat(["properties"]),resolve)}var optionalsProbability=optionAPI("alwaysFakeOptionals")===true?1:optionAPI("optionalsProbability");var ignoreProperties=optionAPI("ignoreProperties")||
    [];var min=Math.max(value.minProperties||0,requiredProperties.length);var max=Math.max(value.maxProperties||allProperties.length);var neededExtras=Math.round(min-requiredProperties.length+optionalsProbability*(max-min));var extraPropertiesRandomOrder=random.shuffle(optionalProperties).slice(0,neededExtras);var extraProperties=optionalProperties.filter(function(_item){return extraPropertiesRandomOrder.indexOf(_item)!==-1});var _props=requiredProperties.concat(extraProperties).slice(0,max);var skipped=
    [];var missing=[];_props.forEach(function(key){for(var i=0;i<ignoreProperties.length;i+=1)if(ignoreProperties[i]instanceof RegExp&&ignoreProperties[i].test(key)||typeof ignoreProperties[i]==="string"&&ignoreProperties[i]===key||typeof ignoreProperties[i]==="function"&&ignoreProperties[i](properties[key],key)){skipped.push(key);return}if(properties[key])props[key]=properties[key];else{var found;patternPropertyKeys.forEach(function(_key){if(key.match(new RegExp(_key))){found=true;props[random.randexp(key)]=
    patternProperties[_key]}});if(!found){var subschema=patternProperties[key]||additionalProperties;if(subschema)props[patternProperties[key]?random.randexp(key):key]=subschema;else missing.push(key)}}});var fillProps=optionAPI("fillProperties");var reuseProps=optionAPI("reuseProperties");var current=Object.keys(props).length+(fillProps?0:skipped.length);while(fillProps){if(!(patternPropertyKeys.length||allowsAdditional))break;if(current>=min)break;if(allowsAdditional)if(reuseProps&&propertyKeys.length-
    current>min){var count=0;do{count+=1;if(count>1E3)break;var key=random.pick(propertyKeys)}while(typeof props[key]!=="undefined");if(typeof props[key]==="undefined"){props[key]=properties[key];current+=1}}else{var word=wordsGenerator(1)+random.randexp("[a-f\\d]{1,3}");if(!props[word]){props[word]=additionalProperties||anyType;current+=1}}patternPropertyKeys.forEach(function(_key){var word=random.randexp(_key);if(!props[word]){props[word]=patternProperties[_key];current+=1}})}if(!allowsAdditional&&
    current<min){if(missing.length)throw new ParseError('properties "'+missing.join(", ")+'" were not found while additionalProperties is false:\n'+utils.short(value),path);throw new ParseError("properties constraints were too strong to successfully generate a valid object for:\n"+utils.short(value),path);}return traverseCallback(props,path.concat(["properties"]),resolve)};function produce(){var length=random.number(1,5);return wordsGenerator(length).join(" ")}function thunkGenerator(min,max){if(min===
    void 0)min=0;if(max===void 0)max=140;var min=Math.max(0,min),max=random.number(min,max),result=produce();while(result.length<min)result+=produce();if(result.length>max)result=result.substr(0,max);return result}function ipv4Generator(){return[0,0,0,0].map(function(){return random.number(0,255)}).join(".")}function dateTimeGenerator(){return random.date().toISOString()}function dateGenerator(){return dateTimeGenerator().slice(0,10)}function timeGenerator(){return dateTimeGenerator().slice(11)}var regexps=
    {email:"[a-zA-Z\\d][a-zA-Z\\d-]{1,13}[a-zA-Z\\d]@{hostname}",hostname:"[a-zA-Z]{1,33}\\.[a-z]{2,4}",ipv6:"[a-f\\d]{4}(:[a-f\\d]{4}){7}",uri:"https?://[a-zA-Z][a-zA-Z0-9+-.]*","uri-reference":"(https?://|#|/|)[a-zA-Z][a-zA-Z0-9+-.]*"};function coreFormatGenerator(coreFormat){return random.randexp(regexps[coreFormat]).replace(/\{(\w+)\}/,function(match,key){return random.randexp(regexps[key])})}function generateFormat(value,invalid){var callback=formatAPI(value.format);if(typeof callback==="function")return callback(value);
    switch(value.format){case "date-time":case "datetime":return dateTimeGenerator();case "date":return dateGenerator();case "time":return timeGenerator();case "ipv4":return ipv4Generator();case "regex":return".+?";case "email":case "hostname":case "ipv6":case "uri":case "uri-reference":return coreFormatGenerator(value.format);default:if(typeof callback==="undefined")if(optionAPI("failOnInvalidFormat"))throw new Error("unknown registry key "+utils.short(value.format));else return invalid();throw new Error('unsupported format "'+
    value.format+'"');}}var stringType=function stringType(value){var output;output=utils.typecast(value,function(opts){if(value.format)return generateFormat(value,function(){return thunkGenerator(opts.minLength,opts.maxLength)});if(value.pattern)return random.randexp(value.pattern);return thunkGenerator(opts.minLength,opts.maxLength)});return output};var typeMap={boolean:booleanType,null:nullType,array:arrayType,integer:integerType,number:numberType,object:objectType,string:stringType};function traverse(schema,
    path,resolve,rootSchema){schema=resolve(schema);if(!schema)return;if(optionAPI("useDefaultValue")&&"default"in schema)return schema.default;if(schema.not&&typeof schema.not==="object")schema=utils.notValue(schema.not,utils.omitProps(schema,["not"]));if(Array.isArray(schema.enum))return utils.typecast(schema,function(){return random.pick(schema.enum)});if(typeof schema.thunk==="function")return traverse(schema.thunk(),path,resolve);if(typeof schema.generate==="function")return utils.typecast(schema,
    function(){return schema.generate(rootSchema)});var type=schema.type;if(Array.isArray(type))type=random.pick(type);else if(typeof type==="undefined"){type=inferType(schema,path)||type;if(type)schema.type=type}if(typeof type==="string")if(!typeMap[type])if(optionAPI("failOnInvalidTypes"))throw new ParseError("unknown primitive "+utils.short(type),path.concat(["type"]));else return optionAPI("defaultInvalidTypeProduct");else try{var result=typeMap[type](schema,path,resolve,traverse);var required=schema.items?
    schema.items.required:schema.required;return utils.clean(result,null,required)}catch(e){if(typeof e.path==="undefined")throw new ParseError(e.message,path);throw e;}var copy={};if(Array.isArray(schema))copy=[];for(var prop in schema)if(typeof schema[prop]==="object"&&prop!=="definitions")copy[prop]=traverse(schema[prop],path.concat([prop]),resolve,copy);else copy[prop]=schema[prop];return copy}function pick$1(data){return Array.isArray(data)?random.pick(data):data}function cycle(data,reverse){if(!Array.isArray(data))return data;
    var value=reverse?data.pop():data.shift();if(reverse)data.unshift(value);else data.push(value);return value}function resolve(obj,data,values,property){if(!obj||typeof obj!=="object")return obj;if(!values)values={};if(!data)data=obj;if(Array.isArray(obj))return obj.map(function(x){return resolve(x,data,values,property)});if(obj.jsonPath){var params=typeof obj.jsonPath!=="object"?{path:obj.jsonPath}:obj.jsonPath;params.group=obj.group||params.group||property;params.cycle=obj.cycle||params.cycle||false;
    params.reverse=obj.reverse||params.reverse||false;params.count=obj.count||params.count||1;var key=params.group+"__"+params.path;if(!values[key])if(params.count>1)values[key]=jsonpath$1.query(data,params.path,params.count);else values[key]=jsonpath$1.value(data,params.path);if(params.cycle||params.reverse)return cycle(values[key],params.reverse);return pick$1(values[key])}Object.keys(obj).forEach(function(k){obj[k]=resolve(obj[k],data,values,k)});return obj}function run(refs,schema,container){try{var result=
    traverse(schema,[],function reduce(sub,maxReduceDepth){if(typeof maxReduceDepth==="undefined")maxReduceDepth=random.number(1,3);if(!sub)return null;if(typeof sub.generate==="function")return sub;if(sub.id&&typeof sub.id==="string"){delete sub.id;delete sub.$schema}if(typeof sub.$ref==="string"){if(sub.$ref==="#"){delete sub.$ref;return sub}if(sub.$ref.indexOf("#/")===-1){var ref=deref.util.findByRef(sub.$ref,refs);if(!ref)throw new Error("Reference not found: "+sub.$ref);return ref}delete sub.$ref;
    return sub}if(Array.isArray(sub.allOf)){var schemas=sub.allOf;delete sub.allOf;schemas.forEach(function(subSchema){var _sub=reduce(subSchema,maxReduceDepth+1);utils.merge(sub,typeof _sub.thunk==="function"?_sub.thunk():_sub)})}if(Array.isArray(sub.oneOf||sub.anyOf)){var mix=sub.oneOf||sub.anyOf;if(sub.enum&&sub.oneOf)sub.enum=sub.enum.filter(function(x){return utils.validate(x,mix)});delete sub.anyOf;delete sub.oneOf;return{thunk:function(){var copy=utils.merge({},sub);utils.merge(copy,random.pick(mix));
    return copy}}}for(var prop in sub)if((Array.isArray(sub[prop])||typeof sub[prop]==="object")&&!utils.isKey(prop))sub[prop]=reduce(sub[prop],maxReduceDepth);return container.wrap(sub)});if(optionAPI("resolveJsonPath"))return resolve(result);return result}catch(e){if(e.path)throw new Error(e.message+" in "+"/"+e.path.join("/"));else throw e;}}var container=new Container;function getRefs(refs){var $refs={};if(Array.isArray(refs))refs.map(deref.util.normalizeSchema).forEach(function(schema){$refs[schema.id]=
    
    schema});else $refs=refs||{};return $refs}function walk(obj,cb){var keys=Object.keys(obj);var retval;for(var i=0;i<keys.length;i+=1){retval=cb(obj[keys[i]],keys[i],obj);if(!retval&&obj[keys[i]]&&!Array.isArray(obj[keys[i]])&&typeof obj[keys[i]]==="object")retval=walk(obj[keys[i]],cb);if(typeof retval!=="undefined")return retval}}var jsf=function(schema,refs){var ignore=optionAPI("ignoreMissingRefs");var $=deref(function(id,refs){if(ignore)return{}});var $refs=getRefs(refs);return run($refs,$(schema,
    $refs,true),container)};jsf.resolve=function(schema,refs,cwd){if(typeof refs==="string"){cwd=refs;refs={}}cwd=cwd||(typeof process!=="undefined"?process.cwd():"");cwd=cwd.replace(/\/+$/,"")+"/";var $refs=getRefs(refs);var fixedRefs={order:300,canRead:true,read:function(file,callback){var id=cwd!=="/"?file.url.replace(cwd,""):file.url;try{callback(null,deref.util.findByRef(id,$refs))}catch(e){var result=walk(schema,function(v,k,sub){if(k==="id"&&v===id)return sub});if(!result)return callback(e);callback(null,
    
    result)}}};return $RefParser.dereference(cwd,schema,{resolve:{fixedRefs:fixedRefs},dereference:{circular:"ignore"}}).then(function(sub){return run($refs,sub,container)})};jsf.format=formatAPI;jsf.option=optionAPI;jsf.random=random;container.define("pattern",random.randexp);container.define("jsonPath",function(value,schema){delete schema.type;return schema});container.define("autoIncrement",function(value,schema){if(!this.offset){var min=schema.minimum||1;var max=min+env.MAX_NUMBER;var offset=value.initialOffset||
    schema.initialOffset;this.offset=offset||random.number(min,max)}if(value===true)return this.offset++;return schema});container.define("sequentialDate",function(value,schema){if(!this.now)this.now=random.date();if(value){schema=this.now.toISOString();value=value===true?"days":value;if(["seconds","minutes","hours","days","weeks","months","years"].indexOf(value)===-1)throw new Error("Unsupported increment by "+utils.short(value));this.now.setTime(this.now.getTime()+random.date(value))}return schema});
    jsf.extend=function(name,cb){container.extend(name,cb);return jsf};jsf.define=function(name,cb){container.define(name,cb);return jsf};jsf.locate=function(name){return container.get(name)};var VERSION="0.5.0-rc15";jsf.version=VERSION;var lib$2=jsf;return lib$2});