npm-gui
Version:
Graphic User Interface for NPM packages/tasks for front and back -end users.
96 lines • 909 kB
JavaScript
module.exports=function(e){function a(i){if(n[i])return n[i].exports;var o=n[i]={exports:{},id:i,loaded:!1};return e[i].call(o.exports,o,o.exports,a),o.loaded=!0,o.exports}var n={};return a.m=e,a.c=n,a.p="",a(0)}([function(e,a,n){"use strict";function i(e,a){var n=t.listen(a||r,e||c,function(){console.log("npm-gui panel running at http://"+(e||c)+":"+(a||r)+"/"),console.log("\n\nI will be waiting here to help you with your work with pleasure.")});return f.bind(n),n}var o=n(11),t=o(),s=n(115),r=1337,c="0.0.0.0";t.use(s.json()),t.use(s.urlencoded({extended:!0}));var p=n(80),l=n(76),u=n(78),d=n(83),m=n(81),f=n(17);t.use("/",m),t.use("/modules",p),t.use("/devModules",p),t.use("/binModules",l),t.use("/globalModules",u),t.use("/tasks",d),e.exports=i},function(e,a,n){"use strict";function i(){try{var e=T;return T=null,e.apply(this,arguments)}catch(a){return S.e=a,S}}function o(e){return T=e,i}function t(e){return null==e||e===!0||e===!1||"string"==typeof e||"number"==typeof e}function s(e){return"function"==typeof e||"object"==typeof e&&null!==e}function r(e){return t(e)?new Error(x(e)):e}function c(e,a){var n,i=e.length,o=new Array(i+1);for(n=0;i>n;++n)o[n]=e[n];return o[n]=a,o}function p(e,a,n){if(!E.isES5)return{}.hasOwnProperty.call(e,a)?e[a]:void 0;var i=Object.getOwnPropertyDescriptor(e,a);return null!=i?null==i.get&&null==i.set?i.value:n:void 0}function l(e,a,n){if(t(e))return e;var i={value:n,configurable:!0,enumerable:!1,writable:!0};return E.defineProperty(e,a,i),e}function u(e){throw e}function d(e){try{if("function"==typeof e){var a=E.names(e.prototype),n=E.isES5&&a.length>1,i=a.length>0&&!(1===a.length&&"constructor"===a[0]),o=z.test(e+"")&&E.names(e).length>0;if(n||i||o)return!0}return!1}catch(t){return!1}}function m(e){function a(){}a.prototype=e;for(var n=8;n--;)new a;return e}function f(e){return P.test(e)}function v(e,a,n){for(var i=new Array(e),o=0;e>o;++o)i[o]=a+o+n;return i}function x(e){try{return e+""}catch(a){return"[no string representation]"}}function h(e){return null!==e&&"object"==typeof e&&"string"==typeof e.message&&"string"==typeof e.name}function g(e){try{l(e,"isOperational",!0)}catch(a){}}function b(e){return null==e?!1:e instanceof Error.__BluebirdErrorTypes__.OperationalError||e.isOperational===!0}function y(e){return h(e)&&E.propertyIsWritable(e,"stack")}function w(e){return{}.toString.call(e)}function _(e,a,n){for(var i=E.names(e),o=0;o<i.length;++o){var t=i[o];if(n(t))try{E.defineProperty(a,t,E.getDescriptor(e,t))}catch(s){}}}function k(e,a){return L?process.env[e]:a}function j(){if("function"==typeof Promise)try{var e=new Promise(function(){});if("[object Promise]"==={}.toString.call(e))return Promise}catch(a){}}var E=n(10),C="undefined"==typeof navigator,S={e:{}},T,O="undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:void 0!==this?this:null,q=function(e,a){function n(){this.constructor=e,this.constructor$=a;for(var n in a.prototype)i.call(a.prototype,n)&&"$"!==n.charAt(n.length-1)&&(this[n+"$"]=a.prototype[n])}var i={}.hasOwnProperty;return n.prototype=a.prototype,e.prototype=new n,e.prototype},A=function(){var e=[Array.prototype,Object.prototype,Function.prototype],a=function(a){for(var n=0;n<e.length;++n)if(e[n]===a)return!0;return!1};if(E.isES5){var n=Object.getOwnPropertyNames;return function(e){for(var i=[],o=Object.create(null);null!=e&&!a(e);){var t;try{t=n(e)}catch(s){return i}for(var r=0;r<t.length;++r){var c=t[r];if(!o[c]){o[c]=!0;var p=Object.getOwnPropertyDescriptor(e,c);null!=p&&null==p.get&&null==p.set&&i.push(c)}}e=E.getPrototypeOf(e)}return i}}var i={}.hasOwnProperty;return function(n){if(a(n))return[];var o=[];e:for(var t in n)if(i.call(n,t))o.push(t);else{for(var s=0;s<e.length;++s)if(i.call(e[s],t))continue e;o.push(t)}return o}}(),z=/this\s*\.\s*\S+\s*=/,P=/^[a-z$_][a-z$_0-9]*$/i,N=function(){return"stack"in new Error?function(e){return y(e)?e:new Error(x(e))}:function(e){if(y(e))return e;try{throw new Error(x(e))}catch(a){return a}}}(),F=function(e){return E.isArray(e)?e:null};if("undefined"!=typeof Symbol&&Symbol.iterator){var B="function"==typeof Array.from?function(e){return Array.from(e)}:function(e){for(var a,n=[],i=e[Symbol.iterator]();!(a=i.next()).done;)n.push(a.value);return n};F=function(e){return E.isArray(e)?e:null!=e&&"function"==typeof e[Symbol.iterator]?B(e):null}}var L="undefined"!=typeof process&&"[object process]"===w(process).toLowerCase(),D={isClass:d,isIdentifier:f,inheritedDataKeys:A,getDataPropertyOrDefault:p,thrower:u,isArray:E.isArray,asArray:F,notEnumerableProp:l,isPrimitive:t,isObject:s,isError:h,canEvaluate:C,errorObj:S,tryCatch:o,inherits:q,withAppended:c,maybeWrapAsError:r,toFastProperties:m,filledRange:v,toString:x,canAttachTrace:y,ensureErrorObject:N,originatesFromRejection:b,markAsOriginatingFromRejection:g,classString:w,copyDescriptors:_,hasDevTools:"undefined"!=typeof chrome&&chrome&&"function"==typeof chrome.loadTimes,isNode:L,env:k,global:O,getNativePromise:j};D.isRecentNode=D.isNode&&function(){var e=process.versions.node.split(".").map(Number);return 0===e[0]&&e[1]>10||e[0]>0}(),D.isNode&&D.toFastProperties(process);try{throw new Error}catch(R){D.lastLineError=R}e.exports=D},function(e,a){e.exports=require("path")},function(e,a){e.exports=require("util")},function(e,a,n){/*!
* express
* Copyright(c) 2009-2013 TJ Holowaychuk
* Copyright(c) 2014-2015 Douglas Christopher Wilson
* MIT Licensed
*/
"use strict";function i(e,a){for(var n=e.split(/ *; */),i={value:n[0],quality:1,params:{},originalIndex:a},o=1;o<n.length;++o){var t=n[o].split(/ *= */);"q"==t[0]?i.quality=parseFloat(t[1]):i.params[t[0]]=t[1]}return i}function o(e){return m.parse(e,{allowDots:!1,allowPrototypes:!0})}function t(){return{}}var s=n(54),r=n(158),c=n(12)("express"),p=n(25),l=n(43).mime,u=(n(2).basename,n(56)),d=n(58),m=n(59),f=n(72);a.etag=function(e,a){var n=Buffer.isBuffer(e)?e:new Buffer(e,a);return u(n,{weak:!1})},a.wetag=function(e,a){var n=Buffer.isBuffer(e)?e:new Buffer(e,a);return u(n,{weak:!0})},a.isAbsolute=function(e){return"/"==e[0]?!0:":"==e[1]&&"\\"==e[2]?!0:"\\\\"==e.substring(0,2)?!0:void 0},a.flatten=c["function"](p,"utils.flatten: use array-flatten npm module instead"),a.normalizeType=function(e){return~e.indexOf("/")?i(e):{value:l.lookup(e),params:{}}},a.normalizeTypes=function(e){for(var n=[],i=0;i<e.length;++i)n.push(a.normalizeType(e[i]));return n},a.contentDisposition=c["function"](s,"utils.contentDisposition: use content-disposition npm module instead"),a.compileETag=function(e){var n;if("function"==typeof e)return e;switch(e){case!0:n=a.wetag;break;case!1:break;case"strong":n=a.etag;break;case"weak":n=a.wetag;break;default:throw new TypeError("unknown value for etag function: "+e)}return n},a.compileQueryParser=function(e){var a;if("function"==typeof e)return e;switch(e){case!0:a=f.parse;break;case!1:a=t;break;case"extended":a=o;break;case"simple":a=f.parse;break;default:throw new TypeError("unknown value for query parser function: "+e)}return a},a.compileTrust=function(e){return"function"==typeof e?e:e===!0?function(){return!0}:"number"==typeof e?function(a,n){return e>n}:("string"==typeof e&&(e=e.split(/ *, */)),d.compile(e||[]))},a.setCharset=function(e,a){if(!e||!a)return e;var n=r.parse(e);return n.parameters.charset=a,r.format(n)}},function(e,a){e.exports=require("fs")},function(e,a,n){"use strict";function i(e,a){function n(i){return this instanceof n?(u(this,"message","string"==typeof i?i:a),u(this,"name",e),void(Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):Error.call(this))):new n(i)}return l(n,Error),n}function o(e){return this instanceof o?(u(this,"name","OperationalError"),u(this,"message",e),this.cause=e,this.isOperational=!0,void(e instanceof Error?(u(this,"message",e.message),u(this,"stack",e.stack)):Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor))):new o(e)}var t,s,r=n(10),c=r.freeze,p=n(1),l=p.inherits,u=p.notEnumerableProp,d=i("Warning","warning"),m=i("CancellationError","cancellation error"),f=i("TimeoutError","timeout error"),v=i("AggregateError","aggregate error");try{t=TypeError,s=RangeError}catch(x){t=i("TypeError","type error"),s=i("RangeError","range error")}for(var h="join pop push shift unshift slice filter forEach some every map indexOf lastIndexOf reduce reduceRight sort reverse".split(" "),g=0;g<h.length;++g)"function"==typeof Array.prototype[h[g]]&&(v.prototype[h[g]]=Array.prototype[h[g]]);r.defineProperty(v.prototype,"length",{value:0,configurable:!1,writable:!0,enumerable:!0}),v.prototype.isOperational=!0;var b=0;v.prototype.toString=function(){var e=Array(4*b+1).join(" "),a="\n"+e+"AggregateError of:\n";b++,e=Array(4*b+1).join(" ");for(var n=0;n<this.length;++n){for(var i=this[n]===this?"[Circular AggregateError]":this[n]+"",o=i.split("\n"),t=0;t<o.length;++t)o[t]=e+o[t];i=o.join("\n"),a+=i+"\n"}return b--,a},l(o,Error);var y=Error.__BluebirdErrorTypes__;y||(y=c({CancellationError:m,TimeoutError:f,OperationalError:o,RejectionError:o,AggregateError:v}),r.defineProperty(Error,"__BluebirdErrorTypes__",{value:y,writable:!1,enumerable:!1,configurable:!1})),e.exports={Error:Error,TypeError:t,RangeError:s,CancellationError:y.CancellationError,OperationalError:y.OperationalError,TimeoutError:y.TimeoutError,AggregateError:y.AggregateError,Warning:d}},function(e,a){e.exports=require("events")},function(e,a,n){function i(){var e=(process.env.DEBUG_COLORS||"").trim().toLowerCase();return 0===e.length?p.isatty(u):"0"!==e&&"no"!==e&&"false"!==e&&"disabled"!==e}function o(){var e=arguments,n=this.useColors,i=this.namespace;if(n){var o=this.color;e[0]=" [3"+o+";1m"+i+" [0m"+e[0]+"[3"+o+"m +"+a.humanize(this.diff)+"[0m"}else e[0]=(new Date).toUTCString()+" "+i+" "+e[0];return e}function t(){return d.write(l.format.apply(this,arguments)+"\n")}function s(e){null==e?delete process.env.DEBUG:process.env.DEBUG=e}function r(){return process.env.DEBUG}function c(e){var a,i=process.binding("tty_wrap");switch(i.guessHandleType(e)){case"TTY":a=new p.WriteStream(e),a._type="tty",a._handle&&a._handle.unref&&a._handle.unref();break;case"FILE":var o=n(5);a=new o.SyncWriteStream(e,{autoClose:!1}),a._type="fs";break;case"PIPE":case"TCP":var t=n(47);a=new t.Socket({fd:e,readable:!1,writable:!0}),a.readable=!1,a.read=null,a._type="pipe",a._handle&&a._handle.unref&&a._handle.unref();break;default:throw new Error("Implement me. Unknown stream file type!")}return a.fd=e,a._isStdio=!0,a}var p=n(73),l=n(3);a=e.exports=n(161),a.log=t,a.formatArgs=o,a.save=s,a.load=r,a.useColors=i,a.colors=[6,2,3,4,5,1];var u=parseInt(process.env.DEBUG_FD,10)||2,d=1===u?process.stdout:2===u?process.stderr:c(u),m=4===l.inspect.length?function(e,a){return l.inspect(e,void 0,void 0,a)}:function(e,a){return l.inspect(e,{colors:a})};a.formatters.o=function(e){return m(e,this.useColors).replace(/\s*\n\s*/g," ")},a.enable(r())},function(e,a){e.exports=require("http")},function(e,a){var n=function(){"use strict";return void 0===this}();if(n)e.exports={freeze:Object.freeze,defineProperty:Object.defineProperty,getDescriptor:Object.getOwnPropertyDescriptor,keys:Object.keys,names:Object.getOwnPropertyNames,getPrototypeOf:Object.getPrototypeOf,isArray:Array.isArray,isES5:n,propertyIsWritable:function(e,a){var n=Object.getOwnPropertyDescriptor(e,a);return!(n&&!n.writable&&!n.set)}};else{var i={}.hasOwnProperty,o={}.toString,t={}.constructor.prototype,s=function(e){var a=[];for(var n in e)i.call(e,n)&&a.push(n);return a},r=function(e,a){return{value:e[a]}},c=function(e,a,n){return e[a]=n.value,e},p=function(e){return e},l=function(e){try{return Object(e).constructor.prototype}catch(a){return t}},u=function(e){try{return"[object Array]"===o.call(e)}catch(a){return!1}};e.exports={isArray:u,keys:s,names:s,defineProperty:c,getDescriptor:r,freeze:p,getPrototypeOf:l,isES5:n,propertyIsWritable:function(){return!0}}}},function(e,a,n){/*!
* express
* Copyright(c) 2009-2013 TJ Holowaychuk
* Copyright(c) 2013 Roman Shtylman
* Copyright(c) 2014-2015 Douglas Christopher Wilson
* MIT Licensed
*/
"use strict";e.exports=n(36)},function(module,exports,__webpack_require__){function containsNamespace(e,a){var n=e.split(/[ ,]+/);a=String(a).toLowerCase();for(var i=0;i<n.length;i++)if((e=n[i])&&("*"===e||e.toLowerCase()===a))return!0;return!1}function convertDataDescriptorToAccessor(e,a,n){var i=Object.getOwnPropertyDescriptor(e,a),o=i.value;return i.get=function(){return o},i.writable&&(i.set=function(e){return o=e}),delete i.value,delete i.writable,Object.defineProperty(e,a,i),i}function createArgumentsString(e){for(var a="",n=0;e>n;n++)a+=", arg"+n;return a.substr(2)}function createStackString(e){var a=this.name+": "+this.namespace;this.message&&(a+=" deprecated "+this.message);for(var n=0;n<e.length;n++)a+="\n at "+callSiteToString(e[n]);return a}function depd(e){function a(e){log.call(a,e)}if(!e)throw new TypeError("argument namespace is required");var n=getStack(),i=callSiteLocation(n[1]),o=i[0];return a._file=o,a._ignored=isignored(e),a._namespace=e,a._traced=istraced(e),a._warned=Object.create(null),a["function"]=wrapfunction,a.property=wrapproperty,a}function isignored(e){if(process.noDeprecation)return!0;var a=process.env.NO_DEPRECATION||"";return containsNamespace(a,e)}function istraced(e){if(process.traceDeprecation)return!0;var a=process.env.TRACE_DEPRECATION||"";return containsNamespace(a,e)}function log(e,a){var n=0!==eventListenerCount(process,"deprecation");if(n||!this._ignored){var i,o,t,s=0,r=!1,c=getStack(),p=this._file;for(a?(t=callSiteLocation(c[1]),t.name=a.name,p=t[0]):(s=2,a=callSiteLocation(c[s]),t=a);s<c.length;s++)if(i=callSiteLocation(c[s]),o=i[0],o===p)r=!0;else if(o===this._file)p=this._file;else if(r)break;var l=i?a.join(":")+"__"+i.join(":"):void 0;if(!(void 0!==l&&l in this._warned)){if(this._warned[l]=!0,e||(e=defaultMessage(t!==a&&t.name?t:a)),n){var u=DeprecationError(this._namespace,e,c.slice(s));return void process.emit("deprecation",u)}var d=process.stderr.isTTY?formatColor:formatPlain,m=d.call(this,e,i,c.slice(s));process.stderr.write(m+"\n","utf8")}}}function callSiteLocation(e){var a=e.getFileName()||"<anonymous>",n=e.getLineNumber(),i=e.getColumnNumber();e.isEval()&&(a=e.getEvalOrigin()+", "+a);var o=[a,n,i];return o.callSite=e,o.name=e.getFunctionName(),o}function defaultMessage(e){var a=e.callSite,n=e.name;n||(n="<anonymous@"+formatLocation(e)+">");var i=a.getThis(),o=i&&a.getTypeName();return"Object"===o&&(o=void 0),"Function"===o&&(o=i.name||o),o&&a.getMethodName()?o+"."+n:n}function formatPlain(e,a,n){var i=(new Date).toUTCString(),o=i+" "+this._namespace+" deprecated "+e;if(this._traced){for(var t=0;t<n.length;t++)o+="\n at "+callSiteToString(n[t]);return o}return a&&(o+=" at "+formatLocation(a)),o}function formatColor(e,a,n){var i="[36;1m"+this._namespace+"[22;39m [33;1mdeprecated[22;39m [0m"+e+"[39m";if(this._traced){for(var o=0;o<n.length;o++)i+="\n [36mat "+callSiteToString(n[o])+"[39m";return i}return a&&(i+=" [36m"+formatLocation(a)+"[39m"),i}function formatLocation(e){return relative(basePath,e[0])+":"+e[1]+":"+e[2]}function getStack(){var e=Error.stackTraceLimit,a={},n=Error.prepareStackTrace;Error.prepareStackTrace=prepareObjectStackTrace,Error.stackTraceLimit=Math.max(10,e),Error.captureStackTrace(a);var i=a.stack.slice(1);return Error.prepareStackTrace=n,Error.stackTraceLimit=e,i}function prepareObjectStackTrace(e,a){return a}function wrapfunction(fn,message){if("function"!=typeof fn)throw new TypeError("argument fn must be a function");var args=createArgumentsString(fn.length),deprecate=this,stack=getStack(),site=callSiteLocation(stack[1]);site.name=fn.name;var deprecatedfn=eval("(function ("+args+') {\n"use strict"\nlog.call(deprecate, message, site)\nreturn fn.apply(this, arguments)\n})');return deprecatedfn}function wrapproperty(e,a,n){if(!e||"object"!=typeof e&&"function"!=typeof e)throw new TypeError("argument obj must be object");var i=Object.getOwnPropertyDescriptor(e,a);if(!i)throw new TypeError("must call property on owner object");if(!i.configurable)throw new TypeError("property must be configurable");var o=this,t=getStack(),s=callSiteLocation(t[1]);s.name=a,"value"in i&&(i=convertDataDescriptorToAccessor(e,a,n));var r=i.get,c=i.set;"function"==typeof r&&(i.get=function(){return log.call(o,n,s),r.apply(this,arguments)}),"function"==typeof c&&(i.set=function(){return log.call(o,n,s),c.apply(this,arguments)}),Object.defineProperty(e,a,i)}function DeprecationError(e,a,n){var i,o=new Error;return Object.defineProperty(o,"constructor",{value:DeprecationError}),Object.defineProperty(o,"message",{configurable:!0,enumerable:!1,value:a,writable:!0}),Object.defineProperty(o,"name",{enumerable:!1,configurable:!0,value:"DeprecationError",writable:!0}),Object.defineProperty(o,"namespace",{configurable:!0,enumerable:!1,value:e,writable:!0}),Object.defineProperty(o,"stack",{configurable:!0,enumerable:!1,get:function(){return void 0!==i?i:i=createStackString.call(this,n)},set:function(e){i=e}}),o}/*!
* depd
* Copyright(c) 2014-2015 Douglas Christopher Wilson
* MIT Licensed
*/
var callSiteToString=__webpack_require__(55).callSiteToString,eventListenerCount=__webpack_require__(55).eventListenerCount,relative=__webpack_require__(2).relative;module.exports=depd;var basePath=process.cwd()},function(e,a){e.exports=require("stream")},function(e,a,n){"use strict";function i(e,a,n,i){for(var o in e)if(e.hasOwnProperty(o)){var t={};t[n]=o,t[i]=e[o],a.push(t)}}function o(e,a,n){for(var i=0;i<e.length;i++)a[e[i][n]]=e[i]}function t(e){e.stdout.on("data",function(e){p.send(e.toString())}),e.stderr.on("data",function(e){p.send(e.toString())}),e.stdin.on("data",function(e){p.send(e.toString())})}function s(e){return-1!==e.originalUrl.toUpperCase().indexOf("DEV")}function r(e){return-1!==e.originalUrl.toUpperCase().indexOf("GLOBAL")}function c(e){var a=null;try{a=JSON.parse(e)}catch(n){return console.error(n)}return a}var p=n(17);e.exports.buildArrayFromObject=i,e.exports.buildObjectFromArray=o,e.exports.bindChildStdToConsole=t,e.exports.isDevModules=s,e.exports.isGlobalModules=r,e.exports.JSONparse=c},function(e,a){/*!
* bytes
* Copyright(c) 2012-2014 TJ Holowaychuk
* Copyright(c) 2015 Jed Watson
* MIT Licensed
*/
"use strict";function n(e,a){return"string"==typeof e?o(e):"number"==typeof e?i(e,a):null}function i(e,a){if(!c(e))return null;var n=Math.abs(e),i=a&&a.thousandsSeparator||"",o=a&&void 0!==a.decimalPlaces?a.decimalPlaces:2,p=Boolean(a&&a.fixedDecimals),l="B";n>=r.tb?l="TB":n>=r.gb?l="GB":n>=r.mb?l="MB":n>=r.kb&&(l="kB");var u=e/r[l.toLowerCase()],d=u.toFixed(o);return p||(d=d.replace(s,"$1")),i&&(d=d.replace(t,i)),d+l}function o(e){if("number"==typeof e&&!isNaN(e))return e;if("string"!=typeof e)return null;var a,n=p.exec(e),i="b";return n?(a=parseFloat(n[1]),i=n[4].toLowerCase()):(a=parseInt(e,10),i="b"),Math.floor(r[i]*a)}e.exports=n,e.exports.format=i,e.exports.parse=o;var t=/\B(?=(\d{3})+(?!\d))/g,s=/(?:\.0*|(\.[^0]+)0+)$/,r={b:1,kb:1024,mb:1<<20,gb:1<<30,tb:1024*(1<<30)},c=Number.isFinite||function(e){return"number"==typeof e&&isFinite(e)},p=/^((-|\+)?(\d+(?:\.\d+)?)) *(kb|mb|gb|tb)$/i},function(e,a,n){"use strict";function i(e,a){return new t(function(n,i){a&&s.send("start: "+e.command+" "+e.args.toString()+"\n");var t=o(e.command,e.args),r="";t.stdout.on("data",function(e){r+=e.toString(),a&&s.send(e.toString())});var c="";t.stderr.on("data",function(e){c+=e,a&&s.send(e.toString())}),t.on("close",function(e){n({stdout:r,stderr:c})})})}var o=(n(46).exec,n(46).spawn),t=n(48),s=n(17),r={ls:{command:"npm",args:["ls","--depth=0","--json"]},outdated:{command:"npm",args:["outdated","--json"]},install:{command:"npm",args:["install"]},uninstall:{command:"npm",args:["uninstall"]},run:{command:"npm",args:["run"]},bin:{command:"npm",args:["bin"]}},c={check:{command:__dirname+"/node_modules/nsp/bin/nsp",args:["check","--output","json"]}};e.exports.npm=r,e.exports.nsp=c,e.exports.run=i},function(e,a,n){"use strict";function i(e){s&&s.send(e)}function o(e){var a=new t({server:e});a.on("connection",function(e){s=e,s.send("console connected \n")}),a.on("message",function(e,a,n){console.log(e,a,n)})}var t=n(198).Server,s=null;e.exports.send=i,e.exports.bind=o},function(e,a,n){/*!
* body-parser
* Copyright(c) 2014-2015 Douglas Christopher Wilson
* MIT Licensed
*/
"use strict";function i(e,a,n,i,l,u){var d,m,f=u||{};e._body=!0;var v=null!==f.encoding?f.encoding||"utf-8":null,x=f.verify;try{m=o(e,l,f.inflate),d=m.length,m.length=void 0}catch(h){return n(h)}return f.length=d,f.encoding=x?null:v,null!==f.encoding||null===v||c.encodingExists(v)?(l("read body"),void r(m,f,function(o,r){if(o)return t(o,400),"encoding.unsupported"===o.type&&(o=s(415,'unsupported charset "'+v.toUpperCase()+'"',{charset:v.toLowerCase()})),m.resume(),void p(e,function(){n(o)});if(x)try{l("verify body"),x(e,a,r,v)}catch(o){return t(o,403),void n(o)}var u;try{l("parse body"),u="string"!=typeof r&&null!==v?c.decode(r,v):r,e.body=i(u)}catch(o){return o.body=void 0===u?r:u,t(o,400),void n(o)}n()})):n(s(415,'unsupported charset "'+v.toUpperCase()+'"',{charset:v.toLowerCase()}))}function o(e,a,n){var i,o=(e.headers["content-encoding"]||"identity").toLowerCase(),t=e.headers["content-length"];if(a('content-encoding "%s"',o),n===!1&&"identity"!==o)throw s(415,"content encoding unsupported");switch(o){case"deflate":i=l.createInflate(),a("inflate body"),e.pipe(i);break;case"gzip":i=l.createGunzip(),a("gunzip body"),e.pipe(i);break;case"identity":i=e,i.length=t;break;default:throw s(415,'unsupported content encoding "'+o+'"',{encoding:o})}return i}function t(e,a){e.status||e.statusCode||(e.status=a,e.statusCode=a)}var s=n(34),r=n(144),c=n(52),p=n(139),l=n(74);e.exports=i},function(e,a,n){function i(){var e=(process.env.DEBUG_COLORS||"").trim().toLowerCase();return 0===e.length?p.isatty(u):"0"!==e&&"no"!==e&&"false"!==e&&"disabled"!==e}function o(){var e=arguments,n=this.useColors,i=this.namespace;if(n){var o=this.color;e[0]=" [3"+o+";1m"+i+" [0m"+e[0]+"[3"+o+"m +"+a.humanize(this.diff)+"[0m"}else e[0]=(new Date).toUTCString()+" "+i+" "+e[0];return e}function t(){return d.write(l.format.apply(this,arguments)+"\n")}function s(e){null==e?delete process.env.DEBUG:process.env.DEBUG=e}function r(){return process.env.DEBUG}function c(e){var a,i=process.binding("tty_wrap");switch(i.guessHandleType(e)){case"TTY":a=new p.WriteStream(e),a._type="tty",a._handle&&a._handle.unref&&a._handle.unref();break;case"FILE":var o=n(5);a=new o.SyncWriteStream(e,{autoClose:!1}),a._type="fs";break;case"PIPE":case"TCP":var t=n(47);a=new t.Socket({fd:e,readable:!1,writable:!0}),a.readable=!1,a.read=null,a._type="pipe",a._handle&&a._handle.unref&&a._handle.unref();break;default:throw new Error("Implement me. Unknown stream file type!")}return a.fd=e,a._isStdio=!0,a}var p=n(73),l=n(3);a=e.exports=n(120),a.log=t,a.formatArgs=o,a.save=s,a.load=r,a.useColors=i,a.colors=[6,2,3,4,5,1];var u=parseInt(process.env.DEBUG_FD,10)||2,d=1===u?process.stdout:2===u?process.stderr:c(u),m=4===l.inspect.length?function(e,a){return l.inspect(e,void 0,void 0,a)}:function(e,a){return l.inspect(e,{colors:a})};a.formatters.o=function(e){return m(e,this.useColors).replace(/\s*\n\s*/g," ")},a.enable(r())},function(e,a,n){/*!
* type-is
* Copyright(c) 2014 Jonathan Ong
* Copyright(c) 2014-2015 Douglas Christopher Wilson
* MIT Licensed
*/
"use strict";function i(e,a){var n,i=a,o=p(e);if(!o)return!1;if(i&&!Array.isArray(i))for(i=new Array(arguments.length-1),n=0;n<i.length;n++)i[n]=arguments[n+1];if(!i||!i.length)return o;var t;for(n=0;n<i.length;n++)if(r(s(t=i[n]),o))return"+"===t[0]||-1!==t.indexOf("*")?o:t;return!1}function o(e){return void 0!==e.headers["transfer-encoding"]||!isNaN(e.headers["content-length"])}function t(e,a){var n=a;if(!o(e))return null;if(arguments.length>2){n=new Array(arguments.length-1);for(var t=0;t<n.length;t++)n[t]=arguments[t+1]}var s=e.headers["content-type"];return i(s,n)}function s(e){if("string"!=typeof e)return!1;switch(e){case"urlencoded":return"application/x-www-form-urlencoded";case"multipart":return"multipart/*"}return"+"===e[0]?"*/*"+e:-1===e.indexOf("/")?u.lookup(e):e}function r(e,a){if(e===!1)return!1;var n=a.split("/"),i=e.split("/");return 2!==n.length||2!==i.length?!1:"*"!==i[0]&&i[0]!==n[0]?!1:"*+"===i[1].substr(0,2)?i[1].length<=n[1].length+1&&i[1].substr(1)===n[1].substr(1-i[1].length):"*"===i[1]||i[1]===n[1]}function c(e){var a=l.parse(e);return a.parameters=void 0,l.format(a)}function p(e){try{return c(e)}catch(a){return null}}var l=n(146),u=n(147);e.exports=t,e.exports.is=i,e.exports.hasBody=o,e.exports.normalize=s,e.exports.match=r},function(e,a,n){/*!
* express
* Copyright(c) 2009-2013 TJ Holowaychuk
* Copyright(c) 2013 Roman Shtylman
* Copyright(c) 2014-2015 Douglas Christopher Wilson
* MIT Licensed
*/
"use strict";var i=n(27),o=n(59);e.exports=function(e){var a=Object.create(e||null),n=o.parse;return"function"==typeof e&&(n=e,a=void 0),void 0!==a&&(void 0===a.allowDots&&(a.allowDots=!1),void 0===a.allowPrototypes&&(a.allowPrototypes=!0)),function(e,o,t){if(!e.query){var s=i(e).query;e.query=n(s,a)}t()}}},function(e,a,n){/*!
* express
* Copyright(c) 2009-2013 TJ Holowaychuk
* Copyright(c) 2013 Roman Shtylman
* Copyright(c) 2014-2015 Douglas Christopher Wilson
* MIT Licensed
*/
"use strict";function i(e,a){for(var n=0;n<a.length;n++){var i=a[n];-1===e.indexOf(i)&&e.push(i)}}function o(e){try{return g(e).pathname}catch(a){return}}function t(e){var a=typeof e;return"object"!==a?a:w.call(e).replace(b,"$1")}function s(e,a){try{return e.match(a)}catch(n){return n}}function r(e,a){if("object"!=typeof a||!a)return e;var n=f({},a);if(!(0 in e&&0 in a))return f(n,e);for(var i=0,o=0;i in e;)i++;for(;o in a;)o++;for(i--;i>=0;i--)e[i+o]=e[i],o>i&&delete e[i];return f(n,e)}function c(e,a){for(var n=new Array(arguments.length-2),i=new Array(arguments.length-2),o=0;o<n.length;o++)n[o]=arguments[o+2],i[o]=a[n[o]];return function(o){for(var t=0;t<n.length;t++)a[n[t]]=i[t];return e.apply(this,arguments)}}function p(e,a,n){try{var i=a.join(",");e.set("Allow",i),e.send(i)}catch(o){n(o)}}function l(e,a){return function(){var n=new Array(arguments.length+1);n[0]=e;for(var i=0,o=arguments.length;o>i;i++)n[i+1]=arguments[i];a.apply(this,n)}}var u=n(24),d=n(23),m=n(41),f=n(44),v=n(8)("express:router"),x=n(12)("express"),h=n(25),g=n(27),b=/^\[object (\S+)\]$/,y=Array.prototype.slice,w=Object.prototype.toString,_=e.exports=function(e){function a(e,n,i){a.handle(e,n,i)}var n=e||{};return a.__proto__=_,a.params={},a._params=[],a.caseSensitive=n.caseSensitive,a.mergeParams=n.mergeParams,a.strict=n.strict,a.stack=[],a};_.param=function(e,a){if("function"==typeof e)return x("router.param(fn): Refactor to use path params"),void this._params.push(e);var n,i=this._params,o=i.length;":"===e[0]&&(x("router.param("+JSON.stringify(e)+", fn): Use router.param("+JSON.stringify(e.substr(1))+", fn) instead"),e=e.substr(1));for(var t=0;o>t;++t)(n=i[t](e,a))&&(a=n);if("function"!=typeof a)throw new Error("invalid param() call for "+e+", got "+a);return(this.params[e]=this.params[e]||[]).push(a),this},_.handle=function(e,a,n){function t(n){var c="route"===n?null:n;if(y&&(e.url=e.url.substr(1),y=!1),0!==b.length&&(e.baseUrl=E,e.url=h+b+e.url.substr(h.length),b=""),g>=k.length)return void setImmediate(C,c);var p=o(e);if(null==p)return C(c);for(var l,m,f;m!==!0&&g<k.length;)if(l=k[g++],m=s(l,p),f=l.route,"boolean"!=typeof m&&(c=c||m),m===!0&&f)if(c)m=!1;else{var v=e.method,x=f._handles_method(v);x||"OPTIONS"!==v||i(_,f._options()),x||"HEAD"===v||(m=!1)}if(m!==!0)return C(c);f&&(e.route=f),e.params=d.mergeParams?r(l.params,j):l.params;var S=l.path;d.process_params(l,w,e,a,function(n){return n?t(c||n):f?l.handle_request(e,a,t):void u(l,c,S,p)})}function u(n,i,o,s){var r=s[o.length];return r&&"/"!==r&&"."!==r?t(i):(0!==o.length&&(v("trim prefix (%s) from url %s",o,e.url),b=o,e.url=h+e.url.substr(h.length+b.length),x||"/"===e.url[0]||(e.url="/"+e.url,y=!0),e.baseUrl=E+("/"===b[b.length-1]?b.substring(0,b.length-1):b)),v("%s %s : %s",n.name,o,e.originalUrl),void(i?n.handle_error(i,e,a,t):n.handle_request(e,a,t)))}var d=this;v("dispatching %s %s",e.method,e.url);var m=1+e.url.indexOf("?"),f=m?m-1:e.url.length,x="/"!==e.url[0]&&1+e.url.substr(0,f).indexOf("://"),h=x?e.url.substr(0,e.url.indexOf("/",2+x)):"",g=0,b="",y=!1,w={},_=[],k=d.stack,j=e.params,E=e.baseUrl||"",C=c(n,e,"baseUrl","next","params");e.next=t,"OPTIONS"===e.method&&(C=l(C,function(e,n){return n||0===_.length?e(n):void p(a,_,e)})),e.baseUrl=E,e.originalUrl=e.originalUrl||e.url,t()},_.process_params=function(e,a,n,i,o){function t(e){return e?o(e):f>=c.length?o():(v=0,(l=c[f++])?(p=l.name,u=n.params[p],d=r[p],m=a[p],void 0!==u&&d?m&&(m.match===u||m.error&&"route"!==m.error)?(n.params[p]=m.value,t(m.error)):(a[p]=m={error:null,match:u,value:u},void s()):t()):o())}function s(e){var a=d[v++];if(m.value=n.params[l.name],e)return m.error=e,void t(e);if(!a)return t();try{a(n,i,s,u,l.name)}catch(o){s(o)}}var r=this.params,c=e.keys;if(!c||0===c.length)return o();var p,l,u,d,m,f=0,v=0;t()},_.use=function(e){var a=0,n="/";if("function"!=typeof e){for(var i=e;Array.isArray(i)&&0!==i.length;)i=i[0];"function"!=typeof i&&(a=1,n=e)}var o=h(y.call(arguments,a));if(0===o.length)throw new TypeError("Router.use() requires middleware functions");for(var s=0;s<o.length;s++){var e=o[s];if("function"!=typeof e)throw new TypeError("Router.use() requires middleware function but got a "+t(e));v("use %s %s",n,e.name||"<anonymous>");var r=new d(n,{sensitive:this.caseSensitive,strict:!1,end:!1},e);r.route=void 0,this.stack.push(r)}return this},_.route=function k(e){var k=new u(e),a=new d(e,{sensitive:this.caseSensitive,strict:this.strict,end:!0},k.dispatch.bind(k));return a.route=k,this.stack.push(a),k},m.concat("all").forEach(function(e){_[e]=function(a){var n=this.route(a);return n[e].apply(n,y.call(arguments,1)),this}})},function(e,a,n){/*!
* express
* Copyright(c) 2009-2013 TJ Holowaychuk
* Copyright(c) 2013 Roman Shtylman
* Copyright(c) 2014-2015 Douglas Christopher Wilson
* MIT Licensed
*/
"use strict";function i(e,a,n){if(!(this instanceof i))return new i(e,a,n);s("new %s",e);var o=a||{};this.handle=n,this.name=n.name||"<anonymous>",this.params=void 0,this.path=void 0,this.regexp=t(e,this.keys=[],o),"/"===e&&o.end===!1&&(this.regexp.fast_slash=!0)}function o(e){if("string"!=typeof e||0===e.length)return e;try{return decodeURIComponent(e)}catch(a){throw a instanceof URIError&&(a.message="Failed to decode param '"+e+"'",a.status=a.statusCode=400),a}}var t=n(170),s=n(8)("express:router:layer"),r=Object.prototype.hasOwnProperty;e.exports=i,i.prototype.handle_error=function(e,a,n,i){var o=this.handle;if(4!==o.length)return i(e);try{o(e,a,n,i)}catch(t){i(t)}},i.prototype.handle_request=function(e,a,n){var i=this.handle;if(i.length>3)return n();try{i(e,a,n)}catch(o){n(o)}},i.prototype.match=function(e){if(null==e)return this.params=void 0,this.path=void 0,!1;if(this.regexp.fast_slash)return this.params={},this.path="",!0;var a=this.regexp.exec(e);if(!a)return this.params=void 0,this.path=void 0,!1;this.params={},this.path=a[0];for(var n=this.keys,i=this.params,t=1;t<a.length;t++){var s=n[t-1],c=s.name,p=o(a[t]);void 0===p&&r.call(i,c)||(i[c]=p)}return!0}},function(e,a,n){/*!
* express
* Copyright(c) 2009-2013 TJ Holowaychuk
* Copyright(c) 2013 Roman Shtylman
* Copyright(c) 2014-2015 Douglas Christopher Wilson
* MIT Licensed
*/
"use strict";function i(e){this.path=e,this.stack=[],o("new %s",e),this.methods={}}var o=n(8)("express:router:route"),t=n(25),s=n(23),r=n(41),c=Array.prototype.slice,p=Object.prototype.toString;e.exports=i,i.prototype._handles_method=function(e){if(this.methods._all)return!0;var a=e.toLowerCase();return"head"!==a||this.methods.head||(a="get"),Boolean(this.methods[a])},i.prototype._options=function(){var e=Object.keys(this.methods);this.methods.get&&!this.methods.head&&e.push("head");for(var a=0;a<e.length;a++)e[a]=e[a].toUpperCase();return e},i.prototype.dispatch=function(e,a,n){function i(r){if(r&&"route"===r)return n();var c=t[o++];return c?c.method&&c.method!==s?i(r):void(r?c.handle_error(r,e,a,i):c.handle_request(e,a,i)):n(r)}var o=0,t=this.stack;if(0===t.length)return n();var s=e.method.toLowerCase();"head"!==s||this.methods.head||(s="get"),e.route=this,i()},i.prototype.all=function(){for(var e=t(c.call(arguments)),a=0;a<e.length;a++){var n=e[a];if("function"!=typeof n){var i=p.call(n),o="Route.all() requires callback functions but got a "+i;throw new TypeError(o)}var r=s("/",{},n);r.method=void 0,this.methods._all=!0,this.stack.push(r)}return this},r.forEach(function(e){i.prototype[e]=function(){for(var a=t(c.call(arguments)),n=0;n<a.length;n++){var i=a[n];if("function"!=typeof i){var r=p.call(i),l="Route."+e+"() requires callback functions but got a "+r;throw new Error(l)}o("%s %s",e,this.path);var u=s("/",{},i);u.method=e,this.methods[e]=!0,this.stack.push(u)}return this}})},function(e,a){"use strict";function n(e,a,i){for(var o=0;o<e.length;o++){var t=e[o];i>0&&Array.isArray(t)?n(t,a,i-1):a.push(t)}return a}function i(e,a){for(var n=0;n<e.length;n++){var o=e[n];Array.isArray(o)?i(o,a):a.push(o)}return a}function o(e,a){return null==a?i(e,[]):n(e,[],a)}e.exports=o},function(e,a){/*!
* escape-html
* Copyright(c) 2012-2013 TJ Holowaychuk
* Copyright(c) 2015 Andreas Lubbe
* Copyright(c) 2015 Tiancheng "Timothy" Gu
* MIT Licensed
*/
"use strict";function n(e){var a=""+e,n=i.exec(a);if(!n)return a;var o,t="",s=0,r=0;for(s=n.index;s<a.length;s++){switch(a.charCodeAt(s)){case 34:o=""";break;case 38:o="&";break;case 39:o="'";break;case 60:o="<";break;case 62:o=">";break;default:continue}r!==s&&(t+=a.substring(r,s)),r=s+1,t+=o}return r!==s?t+a.substring(r,s):t}var i=/["'&<>]/;e.exports=n},function(e,a,n){/*!
* parseurl
* Copyright(c) 2014 Jonathan Ong
* Copyright(c) 2014 Douglas Christopher Wilson
* MIT Licensed
*/
"use strict";function i(e){var a=e.url;if(void 0!==a){var n=e._parsedUrl;return s(a,n)?n:(n=t(a),n._raw=a,e._parsedUrl=n)}}function o(e){var a=e.originalUrl;if("string"!=typeof a)return i(e);var n=e._parsedOriginalUrl;return s(a,n)?n:(n=t(a),n._raw=a,e._parsedOriginalUrl=n)}function t(e){var a="string"==typeof e&&l.exec(e);if(a){var n=a[1],i=a[2]||null,o=void 0!==p?new p:{};return o.path=e,o.href=e,o.pathname=n,o.search=i,o.query=i&&i.substr(1),o}return c(e)}function s(e,a){return"object"==typeof a&&null!==a&&(void 0===p||a instanceof p)&&a._raw===e}var r=n(31),c=r.parse,p=r.Url,l=/^(\/\/?(?!\/)[^\?#\s]*)(\?[^#\s]*)?$/;e.exports=i,e.exports.original=o},function(e,a,n){function i(e,a,n){if(this instanceof i==!1)throw new TypeError("Classes can't be function-called");this._options=e||{},this._isServer=!!a,this._inflate=null,this._deflate=null,this.params=null,this._maxPayload=n||0}var o=n(74),t=[8,9,10,11,12,13,14,15],s=15,r=8;i.extensionName="permessage-deflate",i.prototype.offer=function(){var e={};return this._options.serverNoContextTakeover&&(e.server_no_context_takeover=!0),this._options.clientNoContextTakeover&&(e.client_no_context_takeover=!0),this._options.serverMaxWindowBits&&(e.server_max_window_bits=this._options.serverMaxWindowBits),this._options.clientMaxWindowBits?e.client_max_window_bits=this._options.clientMaxWindowBits:null==this._options.clientMaxWindowBits&&(e.client_max_window_bits=!0),e},i.prototype.accept=function(e){e=this.normalizeParams(e);var a;return a=this._isServer?this.acceptAsServer(e):this.acceptAsClient(e),this.params=a,a},i.prototype.cleanup=function(){this._inflate&&(this._inflate.writeInProgress?this._inflate.pendingClose=!0:(this._inflate.close&&this._inflate.close(),this._inflate=null)),this._deflate&&(this._deflate.writeInProgress?this._deflate.pendingClose=!0:(this._deflate.close&&this._deflate.close(),this._deflate=null))},i.prototype.acceptAsServer=function(e){var a={},n=e.some(function(e){return a={},this._options.serverNoContextTakeover===!1&&e.server_no_context_takeover||this._options.serverMaxWindowBits===!1&&e.server_max_window_bits||"number"==typeof this._options.serverMaxWindowBits&&"number"==typeof e.server_max_window_bits&&this._options.serverMaxWindowBits>e.server_max_window_bits||"number"==typeof this._options.clientMaxWindowBits&&!e.client_max_window_bits?void 0:((this._options.serverNoContextTakeover||e.server_no_context_takeover)&&(a.server_no_context_takeover=!0),this._options.clientNoContextTakeover&&(a.client_no_context_takeover=!0),this._options.clientNoContextTakeover!==!1&&e.client_no_context_takeover&&(a.client_no_context_takeover=!0),"number"==typeof this._options.serverMaxWindowBits?a.server_max_window_bits=this._options.serverMaxWindowBits:"number"==typeof e.server_max_window_bits&&(a.server_max_window_bits=e.server_max_window_bits),"number"==typeof this._options.clientMaxWindowBits?a.client_max_window_bits=this._options.clientMaxWindowBits:this._options.clientMaxWindowBits!==!1&&"number"==typeof e.client_max_window_bits&&(a.client_max_window_bits=e.client_max_window_bits),!0)},this);if(!n)throw new Error("Doesn't support the offered configuration");return a},i.prototype.acceptAsClient=function(e){var a=e[0];if(null!=this._options.clientNoContextTakeover&&this._options.clientNoContextTakeover===!1&&a.client_no_context_takeover)throw new Error('Invalid value for "client_no_context_takeover"');if(null!=this._options.clientMaxWindowBits){if(this._options.clientMaxWindowBits===!1&&a.client_max_window_bits)throw new Error('Invalid value for "client_max_window_bits"');if("number"==typeof this._options.clientMaxWindowBits&&(!a.client_max_window_bits||a.client_max_window_bits>this._options.clientMaxWindowBits))throw new Error('Invalid value for "client_max_window_bits"')}return a},i.prototype.normalizeParams=function(e){return e.map(function(e){return Object.keys(e).forEach(function(a){var n=e[a];if(n.length>1)throw new Error("Multiple extension parameters for "+a);switch(n=n[0],a){case"server_no_context_takeover":case"client_no_context_takeover":if(n!==!0)throw new Error("invalid extension parameter value for "+a+" ("+n+")");e[a]=!0;break;case"server_max_window_bits":case"client_max_window_bits":if("string"==typeof n&&(n=parseInt(n,10),!~t.indexOf(n)))throw new Error("invalid extension parameter value for "+a+" ("+n+")");if(!this._isServer&&n===!0)throw new Error("Missing extension parameter value for "+a);e[a]=n;break;default:throw new Error("Not defined extension parameter ("+a+")")}},this),e},this)},i.prototype.decompress=function(e,a,n){function i(e){r(),n(e)}function t(e){if(void 0!==l._maxPayload&&null!==l._maxPayload&&l._maxPayload>0&&(d+=e.length,d>l._maxPayload)){u=[],r();var a={type:1009};return void n(a)}u.push(e)}function r(){l._inflate&&(l._inflate.removeListener("error",i),l._inflate.removeListener("data",t),l._inflate.writeInProgress=!1,(a&&l.params[c+"_no_context_takeover"]||l._inflate.pendingClose)&&(l._inflate.close&&l._inflate.close(),l._inflate=null))}var c=this._isServer?"client":"server";if(!this._inflate){var p=this.params[c+"_max_window_bits"];this._inflate=o.createInflateRaw({windowBits:"number"==typeof p?p:s})}this._inflate.writeInProgress=!0;var l=this,u=[],d=0;this._inflate.on("error",i).on("data",t),this._inflate.write(e),a&&this._inflate.write(new Buffer([0,0,255,255])),this._inflate.flush(function(){r(),n(null,Buffer.concat(u))})},i.prototype.compress=function(e,a,n){function i(e){c(),n(e)}function t(e){d.push(e)}function c(){u._deflate&&(u._deflate.removeListener("error",i),u._deflate.removeListener("data",t),u._deflate.writeInProgress=!1,(a&&u.params[p+"_no_context_takeover"]||u._deflate.pendingClose)&&(u._deflate.close&&u._deflate.close(),u._deflate=null))}var p=this._isServer?"server":"client";if(!this._deflate){var l=this.params[p+"_max_window_bits"];this._deflate=o.createDeflateRaw({flush:o.Z_SYNC_FLUSH,windowBits:"number"==typeof l?l:s,memLevel:this._options.memLevel||r})}this._deflate.writeInProgress=!0;var u=this,d=[];this._deflate.on("error",i).on("data",t),this._deflate.write(e),this._deflate.flush(function(){c();var e=Buffer.concat(d);a&&(e=e.slice(0,e.length-4)),n(null,e)})},e.exports=i},function(e,a){e.exports=require("buffer")},function(e,a){e.exports=require("crypto")},function(e,a){e.exports=require("url")},function(e,a,n){"use strict";function i(e){function a(e,a){delete e[a],x()}function n(e,a,n){e[a]=n,x()}function i(e){var a=[];return o.buildArrayFromObject(e,a,"key","value"),a}function s(){return g.dependencies}function r(){return i(s())}function c(e){a(g.dependencies,e)}function p(){return g.devDependencies}function l(){return i(p())}function u(e){a(g.devDependencies,e)}function d(){return g.scripts}function m(){return i(d())}function f(e){a(g.scripts,e)}function v(e,a){n(g.scripts,e,a)}function x(){t.writeFileSync("./package.json",JSON.stringify(g,null,2))}function h(){return g.bin?"string"==typeof g.bin?g.bin:g.bin[g.name]:void 0}this.getDependencies=s,this.getDependenciesArray=r,this.removeDependence=c,this.getDevDependencies=p,this.getDevDependenciesArray=l,this.removeDevDependence=u,this.getTasks=d,this.getTasksArray=m,this.removeTask=f,this.addTask=v,this.getBin=h;var g=JSON.parse(t.readFileSync(e||"./package.json","utf-8"))}var o=n(14),t=n(5);e.exports.PackageJson=i},function(e,a){/*!
* content-type
* Copyright(c) 2015 Douglas Christopher Wilson
* MIT Licensed
*/
"use strict";function n(e){if(!e||"object"!=typeof e)throw new TypeError("argument obj is required");var a=e.parameters,n=e.type;if(!n||!d.test(n))throw new TypeError("invalid type");var i=n;if(a&&"object"==typeof a)for(var o,s=Object.keys(a).sort(),r=0;r<s.length;r++){if(o=s[r],!p.test(o))throw new TypeError("invalid parameter name");i+="; "+o+"="+t(a[o])}return i}function i(e){if(!e)throw new TypeError("argument string is required");if("object"==typeof e&&(e=o(e),"string"!=typeof e))throw new TypeError("content-type header is missing from object");if("string"!=typeof e)throw new TypeError("argument string is required to be a string");var a=e.indexOf(";"),n=-1!==a?e.substr(0,a).trim():e.trim();if(!d.test(n))throw new TypeError("invalid media type");var i,t,c,p=new s(n.toLowerCase());for(r.lastIndex=a;t=r.exec(e);){if(t.index!==a)throw new TypeError("invalid parameter format");a+=t[0].length,i=t[1].toLowerCase(),c=t[2],'"'===c[0]&&(c=c.substr(1,c.length-2).replace(l,"$1")),p.parameters[i]=c}if(-1!==a&&a!==e.length)throw new TypeError("invalid parameter format");return p}function o(e){return"function"==typeof e.getHeader?e.getHeader("content-type"):"object"==typeof e.headers?e.headers&&e.headers["content-type"]:void 0}function t(e){var a=String(e);if(p.test(a))return a;if(a.length>0&&!c.test(a))throw new TypeError("invalid parameter value");return'"'+a.replace(u,"\\$1")+'"'}function s(e){this.parameters=Object.create(null),this.type=e}var r=/; *([!#$%&'\*\+\-\.\^_`\|~0-9A-Za-z]+) *= *("(?:[\u000b\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u000b\u0020-\u00ff])*"|[!#$%&'\*\+\-\.\^_`\|~0-9A-Za-z]+) */g,c=/^[\u000b\u0020-\u007e\u0080-\u00ff]+$/,p=/^[!#$%&'\*\+\-\.\^_`\|~0-9A-Za-z]+$/,l=/\\([\u000b\u0020-\u00ff])/g,u=/([\\"])/g,d=/^[!#$%&'\*\+\-\.\^_`\|~0-9A-Za-z]+\/[!#$%&'\*\+\-\.\^_`\|~0-9A-Za-z]+$/;a.format=n,a.parse=i},function(e,a,n){function i(e){return e.split(" ").map(function(e){return e.slice(0,1).toUpperCase()+e.slice(1)}).join("").replace(/[^ _0-9a-z]/gi,"")}var o=n(126),t=n(125);a=e.exports=function c(){for(var e,n,i=500,t={},s=0;s<arguments.length;s++){var r=arguments[s];if(r instanceof Error)e=r,i=e.status||e.statusCode||i;else switch(typeof r){case"string":n=r;break;case"number":i=r;break;case"object":t=r}}"number"==typeof i&&o[i]||(i=500);var p=a[i];e||(e=p?new p(n):new Error(n||o[i]),Error.captureStackTrace(e,c)),p&&e instanceof p||(e.expose=500>i,e.status=e.statusCode=i);for(var l in t)"status"!==l&&"statusCode"!==l&&(e[l]=t[l]);return e};var s=a.HttpError=function(){throw new TypeError("cannot construct abstract class")};t(s,Error);var r=o.codes.filter(function(e){return e>=400});r.forEach(function(e){var n=i(o[e]),r=n.match(/Error$/)?n:n+"Error";if(e>=500){var c=function l(a){var n=new Error(null!=a?a:o[e]);return Error.captureStackTrace(n,l),n.__proto__=l.prototype,Object.defineProperty(n,"name",{enumerable:!1,configurable:!0,value:r,writable:!0}),n};return t(c,s),c.prototype.status=c.prototype.statusCode=e,c.prototype.expose=!1,void(a[e]=a[n]=c)}var p=function u(a){var n=new Error(null!=a?a:o[e]);return Error.captureStackTrace(n,u),n.__proto__=u.prototype,Object.defineProperty(n,"name",{enumerable:!1,configurable:!0,value:r,writable:!0}),n};t(p,s),p.prototype.status=p.prototype.statusCode=e,p.prototype.expose=!0,a[e]=a[n]=p}),a["I'mateapot"]=a.ImATeapot},function(e,a,n){/*!
* express
* Copyright(c) 2009-2013 TJ Holowaychuk
* Copyright(c) 2013 Roman Shtylman
* Copyright(c) 2014-2015 Douglas Christopher Wilson
* MIT Licensed
*/
"use strict";function i(e){"test"!==this.get("env")&&console.error(e.stack||e.toString())}function o(e,a,n){try{e.render(a,n)}catch(i){n(i)}}var t=n(166),s=n(22),r=n(41),c=n(37),p=n(21),l=n(8)("express:application"),u=n(40),d=n(9),m=n(4).compileETag,f=n(4).compileQueryParser,v=n(4).compileTrust,x=n(12)("express"),h=n(25),g=n(44),b=n(2).resolve,y=Array.prototype.slice,w=a=e.exports={},_="@@symbol:trust_proxy_default";w.init=function(){this.cache={},this.engines={},this.settings={},this.defaultConfiguration()},w.defaultConfiguration=function(){var e=process.env.NODE_ENV||"development";this.enable("x-powered-by"),this.set("etag","weak"),this.set("env",e),this.set("query parser","extended"),this.set("subdomain offset",2),this.set("trust proxy",!1),Object.defineProperty(this.settings,_,{configurable:!0,value:!0}),l("booting in %s mode",e),this.on("mount",function(e){this.settings[_]===!0&&"function"==typeof e.settings["trust proxy fn"]&&(delete this.settings["trust proxy"],delete this.settings["trust proxy fn"]),this.request.__proto__=e.request,this.response.__proto__=e.response,this.engines.__proto__=e.engines,this.settings.__proto__=e.settings}),this.locals=Object.create(null),this.mountpath="/",this.locals.settings=this.settings,this.set("view",u),this.set("views",b("views")),this.set("jsonp callback name","callback"),"production"===e&&this.enable("view cache"),Object.defineProperty(this,"router",{get:function(){throw new Error("'app.router' is deprecated!\nPlease see the 3.x to 4.x migration guide for details on how to update your app.")}})},w.lazyrouter=function(){this._router||(this._router=new s({caseSensitive:this.enabled("case sensitive routing"),strict:this.enabled("strict routing")}),this._router.use(p(this.get("query parser fn"))),this._router.use(c.init(this)))},w.handle=function(e,a,n){var o=this._router,s=n||t(e,a,{env:this.get("env"),onerror:i.bind(this)});return o?void o.handle(e,a,s):(l("no routes defined on app"),void s())},w.use=function(e){var a=0,n="/";if("function"!=typeof e){for(var i=e;Array.isArray(i)&&0!==i.length;)i=i[0];"function"!=typeof i&&(a=1,n=e)}var o=h(y.call(arguments,a));if(0===o.length)throw new TypeError("app.use() requires middleware functions");this.lazyrouter();var t=this._router;return o.forEach(function(e){return e&&e.handle&&e.set?(l(".use app under %s",n),e.mountpath=n,e.parent=this,t.use(n,function(a,n,i){var o=a.app;e.handle(a,n,function(e){a.__proto__=o.request,n.__proto__=o.response,i(e)})}),void e.emit("mount",this)):t.use(n,e)},this),this},w.route=function(e){return this.lazyrouter(),this._router.route(e)},w.engine=function(e,a){if("function"!=typeof a)throw new Error("callback function required");var n="."!==e[0]?"."+e:e;return this.engines[n]=a,this},w.param=function(e,a){if(this.lazyrouter(),Array.isArray(e)){for(var n=0;n<e.length;n++)this.param(e[n],a);return this}return this._router.param(e,a),this},w.set=function(e,a){if(1===arguments.length)return this.settings[e];switch(l('set "%s" to %o',e,a),this.settings[e]=a,e){case"etag":this.set("etag fn",m(a));break;case"query parser":this.set("query parser fn",f(a));break;case"trust proxy":this.set("trust proxy fn",v(a)),Object.defineProperty(this.settings,_,{configurable:!0,value:!1})}return this},w.path=function(){return this.parent?this.parent.path()+this.mountpath:""},w.enabled=function(e){return Boolean(this.set(e))},w.disabled=function(e){return!this.set(e)},w.enable=function(e){return this.set(e,!0)},w.disable=function(e){return this.set(e,!1)},r.forEach(function(e){w[e]=function(a){if("get"===e&&1===arguments.length)return this.set(a);this.lazyrouter();var n=this._router.route(a);return n[e].apply(n,y.call(arguments,1)),this}}),w.all=function(e){this.lazyrouter();for(var a=this._router.route(e),n=y.call(arguments,1),i=0;i<r.length;i++)a[r[i]].apply(a,n);return this},w.del=x["function"](w["delete"],"app.del: Use app.delete instead"),w.render=function(e,a,n){var i,t=this.cache,s=n,r=this.engines,c=a,p={};if("function"==typeof a&&(s=a,c={}),g(p,this.locals),c._locals&&g(p,c._locals),g(p,c),null==p.cache&&(p.cache=this.enabled("view cache")),p.cache&&(i=t[e]),!i){var l=this.get("view");if(i=new l(e,{defaultEngine:this.get("view engine"),root:this.get("views"),engines:r}),!i.path){var u=Array.isArray(i.root)&&i.root.length>1?'directories "'+i.root.slice(0,-1).join('", "')+'" or "'+i.root[i.root.length-1]+'"':'directory "'+i.root+'"',d=new Error('Failed to lookup view "'+e+'" in views '+u);return d.view=i,s(d)}p.cache&&(t[e]=i)}o(i,p,s)},w.listen=function(){var e=d.createServer(this);return e.listen.apply(e,arguments)}},function(e,a,n){/*!
* express
* Copyright(c) 2009-2013 TJ Holowaychuk
* Copyright(c) 2013 Roman Shtylman
* Copyright(c) 2014-2015 Douglas Christopher Wilson
* MIT Licensed
*/
"use strict";function i(){var e=function(a,n,i){e.handle(a,n,i)};return t(e,o.prototype,!1),t(e,s,!1),e.request={__proto__:p,app:e},e.response={__proto__:l,app:e},e.init(),e}var o=n(7)