236 lines
596 KiB
JavaScript
236 lines
596 KiB
JavaScript
|
"use strict";var e=require("./marp-cli-b9daa9b1.js"),a=require("path"),n=require("tty"),i=require("util"),t=require("fs"),o=require("net"),s=require("events"),r=require("stream"),c=require("zlib"),p=require("buffer"),l=require("string_decoder"),u=require("querystring"),d=require("url"),m=require("http"),f=require("./_commonjs-dynamic-modules-21d62193.js"),v=require("crypto");function x(e,a){return a.forEach((function(a){a&&"string"!=typeof a&&!Array.isArray(a)&&Object.keys(a).forEach((function(n){if("default"!==n&&!(n in e)){var i=Object.getOwnPropertyDescriptor(a,n);Object.defineProperty(e,n,i.get?i:{enumerable:!0,get:function(){return a[n]}})}}))})),Object.freeze(e)}var h={},b={get exports(){return h},set exports(e){h=e}},g={},y={get exports(){return g},set exports(e){g=e}},w={},k={get exports(){return w},set exports(e){w=e}},j=a.relative,E=function(e){if(!e)throw new TypeError("argument namespace is required");var a=C(I()[1])[0];function n(e){_.call(n,e)}return n._file=a,n._ignored=function(e){return!!process.noDeprecation||A(process.env.NO_DEPRECATION||"",e)}(e),n._namespace=e,n._traced=function(e){return!!process.traceDeprecation||A(process.env.TRACE_DEPRECATION||"",e)}(e),n._warned=Object.create(null),n.function=N,n.property=L,n},S=process.cwd();function A(e,a){for(var n=e.split(/[ ,]+/),i=String(a).toLowerCase(),t=0;t<n.length;t++){var o=n[t];if(o&&("*"===o||o.toLowerCase()===i))return!0}return!1}function O(e){var a=this.name+": "+this.namespace;this.message&&(a+=" deprecated "+this.message);for(var n=0;n<e.length;n++)a+="\n at "+e[n].toString();return a}function _(e,a){var n,i,t=(i="deprecation",("function"!=typeof(n=process).listenerCount?n.listeners(i).length:n.listenerCount(i))>0);if(t||!this._ignored){var o,s,r,c,p=0,l=!1,u=I(),d=this._file;for(a?(c=a,(r=C(u[1])).name=c.name,d=r[0]):r=c=C(u[p=2]);p<u.length;p++)if((s=(o=C(u[p]))[0])===d)l=!0;else if(s===this._file)d=this._file;else if(l)break;var m=o?c.join(":")+"__"+o.join(":"):void 0;if(void 0===m||!(m in this._warned)){this._warned[m]=!0;var f=e;if(f||(f=r!==c&&r.name?T(r):T(c)),t){var v=U(this._namespace,f,u.slice(p));process.emit("deprecation",v)}else{var x=(process.stderr.isTTY?z:q).call(this,f,o,u.slice(p));process.stderr.write(x+"\n","utf8")}}}}function C(e){var a=e.getFileName()||"<anonymous>",n=e.getLineNumber(),i=e.getColumnNumber();e.isEval()&&(a=e.getEvalOrigin()+", "+a);var t=[a,n,i];return t.callSite=e,t.name=e.getFunctionName(),t}function T(e){var a=e.callSite,n=e.name;n||(n="<anonymous@"+P(e)+">");var i=a.getThis(),t=i&&a.getTypeName();return"Object"===t&&(t=void 0),"Function"===t&&(t=i.name||t),t&&a.getMethodName()?t+"."+n:n}function q(e,a,n){var i=(new Date).toUTCString()+" "+this._namespace+" deprecated "+e;if(this._traced){for(var t=0;t<n.length;t++)i+="\n at "+n[t].toString();return i}return a&&(i+=" at "+P(a)),i}function z(e,a,n){var i="[36;1m"+this._namespace+"[22;39m [33;1mdeprecated[22;39m [0m"+e+"[39m";if(this._traced){for(var t=0;t<n.length;t++)i+="\n [36mat "+n[t].toString()+"[39m";return i}return a&&(i+=" [36m"+P(a)+"[39m"),i}function P(e){return j(S,e[0])+":"+e[1]+":"+e[2]}function I(){var e=Error.stackTraceLimit,a={},n=Error.prepareStackTrace;Error.prepareStackTrace=B,Error.stackTraceLimit=Math.max(10,e),Error.captureStackTrace(a);var i=a.stack.slice(1);return Error.prepareStackTrace=n,Error.stackTraceLimit=e,i}function B(e,a){return a}function N(e,a){if("function"!=typeof e)throw new TypeError("argument fn must be a function");var n=function(e){for(var a="",n=0;n<e;n++)a+=", arg"+n;return a.substr(2)}(e.length),i=C(I()[1]);return i.name=e.name,new Function("fn","log","deprecate","message","site",'"use strict"\nreturn function ('+n+") {log.call(deprecate, message, site)\nreturn fn.apply(this, arguments)\n}")(e,_,this,a,i)}function L(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 configurab
|
|||
|
/*!
|
|||
|
* content-type
|
|||
|
* Copyright(c) 2015 Douglas Christopher Wilson
|
|||
|
* MIT Licensed
|
|||
|
*/function Q(e){var a=String(e);if(W.test(a))return a;if(a.length>0&&!G.test(a))throw new TypeError("invalid parameter value");return'"'+a.replace(V,"\\$1")+'"'}function X(e){this.parameters=Object.create(null),this.type=e}H.format=function(e){if(!e||"object"!=typeof e)throw new TypeError("argument obj is required");var a=e.parameters,n=e.type;if(!n||!J.test(n))throw new TypeError("invalid type");var i=n;if(a&&"object"==typeof a)for(var t,o=Object.keys(a).sort(),s=0;s<o.length;s++){if(t=o[s],!W.test(t))throw new TypeError("invalid parameter name");i+="; "+t+"="+Q(a[t])}return i},H.parse=function(e){if(!e)throw new TypeError("argument string is required");var a="object"==typeof e?function(e){var a;if("function"==typeof e.getHeader?a=e.getHeader("content-type"):"object"==typeof e.headers&&(a=e.headers&&e.headers["content-type"]),"string"!=typeof a)throw new TypeError("content-type header is missing from object");return a}(e):e;if("string"!=typeof a)throw new TypeError("argument string is required to be a string");var n=a.indexOf(";"),i=-1!==n?a.slice(0,n).trim():a.trim();if(!J.test(i))throw new TypeError("invalid media type");var t=new X(i.toLowerCase());if(-1!==n){var o,s,r;for($.lastIndex=n;s=$.exec(a);){if(s.index!==n)throw new TypeError("invalid parameter format");n+=s[0].length,o=s[1].toLowerCase(),34===(r=s[2]).charCodeAt(0)&&-1!==(r=r.slice(1,-1)).indexOf("\\")&&(r=r.replace(Z,"$1")),t.parameters[o]=r}if(n!==a.length)throw new TypeError("invalid parameter format")}return t};var Y={},K={get exports(){return Y},set exports(e){Y=e}},ee=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(e,a){return e.__proto__=a,e}:function(e,a){for(var n in a)Object.prototype.hasOwnProperty.call(e,n)||(e[n]=a[n]);return e}),ae={100:"Continue",101:"Switching Protocols",102:"Processing",103:"Early Hints",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:"Too Early",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"},ne=te;function ie(e){if(!Object.prototype.hasOwnProperty.call(te.message,e))throw new Error("invalid status code: "+e);return te.message[e]}function te(e){if("number"==typeof e)return ie(e);if("string"!=typeof e)throw new TypeError("code must be a number or string");var a=parseInt(e,10);return isNaN(a)?function(e){var a=e.toLowerCase();if(!Object.prototype.hasOwnProperty.call(te.code,a))throw new Error('invalid status message: "'+e+'"');return te.code[a]}(e):ie(a)}te.message=ae,te.code=function(e){var a={};return Object.keys(e).forEach((function(n){var i=e[n],t=Number(n);a[i.toLowerCase()]=t})),a}(ae),te.codes=function(e){return Object.keys(e).map((function(e){return Number(e)}))}(ae),te.redirect={300:!0,301:!0,302:!0,303:!0,305:!0,307:!0,308:!0},te.empty={204:!0,205:!0,304:!0},te.retry={502:!0,503:!0,504:!0};var oe,se={},re={},ce={get exports(){return re},set exports(e){re=e}};!function(e){try{var a=require("util")
|
|||
|
/*!
|
|||
|
* toidentifier
|
|||
|
* Copyright(c) 2016 Douglas Christopher Wilson
|
|||
|
* MIT Licensed
|
|||
|
*/
|
|||
|
var pe=function(e){return e.split(" ").map((function(e){return e.slice(0,1).toUpperCase()+e.slice(1)})).join("").replace(/[^ _0-9a-z]/gi,"")}
|
|||
|
/*!
|
|||
|
* http-errors
|
|||
|
* Copyright(c) 2014 Jonathan Ong
|
|||
|
* Copyright(c) 2016 Douglas Christopher Wilson
|
|||
|
* MIT Licensed
|
|||
|
*/;!function(e){var a,n=E("http-errors"),i=ee,t=ne,o=se,s=pe;function r(e){return Number(String(e).charAt(0)+"00")}function c(e,a){var n=Object.getOwnPropertyDescriptor(e,"name");n&&n.configurable&&(n.value=a,Object.defineProperty(e,"name",n))}function p(e){return"Error"!==e.substr(-5)?e+"Error":e}e.exports=function e(){for(var a,i,o=500,s={},c=0;c<arguments.length;c++){var p=arguments[c],l=typeof p;if("object"===l&&p instanceof Error)o=(a=p).status||a.statusCode||o;else if("number"===l&&0===c)o=p;else if("string"===l)i=p;else{if("object"!==l)throw new TypeError("argument #"+(c+1)+" unsupported type "+l);s=p}}"number"==typeof o&&(o<400||o>=600)&&n("non-error status code; use only 4xx or 5xx status codes"),("number"!=typeof o||!t.message[o]&&(o<400||o>=600))&&(o=500);var u=e[o]||e[r(o)];for(var d in a||(a=u?new u(i):new Error(i||t.message[o]),Error.captureStackTrace(a,e)),u&&a instanceof u&&a.status===o||(a.expose=o<500,a.status=a.statusCode=o),s)"status"!==d&&"statusCode"!==d&&(a[d]=s[d]);return a},e.exports.HttpError=function(){function e(){throw new TypeError("cannot construct abstract class")}return o(e,Error),e}(),e.exports.isHttpError=(a=e.exports.HttpError,function(e){return!(!e||"object"!=typeof e)&&(e instanceof a||e instanceof Error&&"boolean"==typeof e.expose&&"number"==typeof e.statusCode&&e.status===e.statusCode)}),function(e,a,n){a.forEach((function(a){var l,u=s(t.message[a]);switch(r(a)){case 400:l=function(e,a,n){var s=p(a);function r(e){var a=null!=e?e:t.message[n],o=new Error(a);return Error.captureStackTrace(o,r),i(o,r.prototype),Object.defineProperty(o,"message",{enumerable:!0,configurable:!0,value:a,writable:!0}),Object.defineProperty(o,"name",{enumerable:!1,configurable:!0,value:s,writable:!0}),o}return o(r,e),c(r,s),r.prototype.status=n,r.prototype.statusCode=n,r.prototype.expose=!0,r}(n,u,a);break;case 500:l=function(e,a,n){var s=p(a);function r(e){var a=null!=e?e:t.message[n],o=new Error(a);return Error.captureStackTrace(o,r),i(o,r.prototype),Object.defineProperty(o,"message",{enumerable:!0,configurable:!0,value:a,writable:!0}),Object.defineProperty(o,"name",{enumerable:!1,configurable:!0,value:s,writable:!0}),o}return o(r,e),c(r,s),r.prototype.status=n,r.prototype.statusCode=n,r.prototype.expose=!1,r}(n,u,a)}l&&(e[a]=l,e[u]=l)}))}(e.exports,t.codes,e.exports.HttpError)}(K);var le,ue,de,me,fe={},ve={get exports(){return fe},set exports(e){fe=e}},xe={},he={get exports(){return xe},set exports(e){xe=e}},be={},ge={get exports(){return be},set exports(e){be=e}};function ye(){return de||(de=1,function(e,a){var n;function i(e){function i(){if(i.enabled){var e=i,t=+new Date,o=t-(n||t);e.diff=o,e.prev=n,e.curr=t,n=t;for(var s=new Array(arguments.length),r=0;r<s.length;r++)s[r]=arguments[r];s[0]=a.coerce(s[0]),"string"!=typeof s[0]&&s.unshift("%O");var c=0;s[0]=s[0].replace(/%([a-zA-Z%])/g,(function(n,i){if("%%"===n)return n;c++;var t=a.formatters[i];if("function"==typeof t){var o=s[c];n=t.call(e,o),s.splice(c,1),c--}return n})),a.formatArgs.call(e,s),(i.log||a.log||console.log.bind(console)).apply(e,s)}}return i.namespace=e,i.enabled=a.enabled(e),i.useColors=a.useColors(),i.color=function(e){var n,i=0;for(n in e)i=(i<<5)-i+e.charCodeAt(n),i|=0;return a.colors[Math.abs(i)%a.colors.length]}(e),"function"==typeof a.init&&a.init(i),i}(a=ge.exports=i.debug=i.default=i).coerce=function(e){return e instanceof Error?e.stack||e.message:e},a.disable=function(){a.enable("")},a.enable=function(e){a.save(e),a.names=[],a.skips=[];for(var n=("string"==typeof e?e:"").split(/[\s,]+/),i=n.length,t=0;t<i;t++)n[t]&&("-"===(e=n[t].replace(/\*/g,".*?"))[0]?a.skips.push(new RegExp("^"+e.substr(1)+"$")):a.names.push(new RegExp("^"+e+"$")))},a.enabled=function(e){var n,i;for(n=0,i=a.skips.length;n<i;n++)if(a.skips[n].test(e))return!1;for(n=0,i=a.names.length;n<i;n++)if(a.names[n].test(e))return!0;return!1},a.humanize=function(){if(ue)return le;ue=1;var e=1e3,a=60*e,n=60*a,i=24*n;function t(e,a,n){if(!(e<a))return e<1.5*a?Math.floor(e/a)+" "+n:Math.ceil(e/a)+" "+n+"s"}return le=function(o,s){s=s||{};var r=typeof o;if("string"===
|
|||
|
/*!
|
|||
|
* destroy
|
|||
|
* Copyright(c) 2014 Jonathan Ong
|
|||
|
* Copyright(c) 2015-2022 Douglas Christopher Wilson
|
|||
|
* MIT Licensed
|
|||
|
*/var Ae=s.EventEmitter,Oe=t.ReadStream,_e=r,Ce=c,Te=function(e,a){return!function(e){return e instanceof Oe}(e)?function(e){return e instanceof Ce.Gzip||e instanceof Ce.Gunzip||e instanceof Ce.Deflate||e instanceof Ce.DeflateRaw||e instanceof Ce.Inflate||e instanceof Ce.InflateRaw||e instanceof Ce.Unzip}(e)?function(e){"function"==typeof e.destroy?e._binding?(e.destroy(),e._processing?(e._needDrain=!0,e.once("drain",ze)):e._binding.clear()):e._destroy&&e._destroy!==_e.Transform.prototype._destroy?e.destroy():e._destroy&&"function"==typeof e.close?(e.destroyed=!0,e.close()):e.destroy():"function"==typeof e.close&&function(e){if(!0===e._hadError){var a=null===e._binding?"_binding":"_handle";e[a]={close:function(){this[a]=null}}}e.close()}(e)}(e):function(e){return e instanceof _e&&"function"==typeof e.destroy}(e)&&e.destroy():function(e){e.destroy(),"function"==typeof e.close&&e.on("open",Pe)}(e),e instanceof Ae&&a&&(e.removeAllListeners("error"),e.addListener("error",qe)),e};function qe(){}function ze(){this._binding.clear()}function Pe(){"number"==typeof this.fd&&this.close()}var Ie,Be,Ne={},Le={get exports(){return Ne},set exports(e){Ne=e}};function Ue(){if(Be)return Ie;Be=1;var e,a=p,n=a.Buffer,i={};for(e in a)a.hasOwnProperty(e)&&"SlowBuffer"!==e&&"Buffer"!==e&&(i[e]=a[e]);var t=i.Buffer={};for(e in n)n.hasOwnProperty(e)&&"allocUnsafe"!==e&&"allocUnsafeSlow"!==e&&(t[e]=n[e]);if(i.Buffer.prototype=n.prototype,t.from&&t.from!==Uint8Array.from||(t.from=function(e,a,i){if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type '+typeof e);if(e&&void 0===e.length)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);return n(e,a,i)}),t.alloc||(t.alloc=function(e,a,i){if("number"!=typeof e)throw new TypeError('The "size" argument must be of type number. Received type '+typeof e);if(e<0||e>=2*(1<<30))throw new RangeError('The value "'+e+'" is invalid for option "size"');var t=n(e);return a&&0!==a.length?"string"==typeof i?t.fill(a,i):t.fill(a):t.fill(0),t}),!i.kStringMaxLength)try{i.kStringMaxLength=process.binding("buffer").kStringMaxLength}catch(e){}return i.constants||(i.constants={MAX_LENGTH:i.kMaxLength},i.kStringMaxLength&&(i.constants.MAX_STRING_LENGTH=i.kStringMaxLength)),Ie=i}var Fe,Re={};function De(){if(Fe)return Re;function e(e,a){this.encoder=e,this.addBOM=!0}function a(e,a){this.decoder=e,this.pass=!1,this.options=a||{}}return Fe=1,Re.PrependBOM=e,e.prototype.write=function(e){return this.addBOM&&(e="\ufeff"+e,this.addBOM=!1),this.encoder.write(e)},e.prototype.end=function(){return this.encoder.end()},Re.StripBOM=a,a.prototype.write=function(e){var a=this.decoder.write(e);return this.pass||!a||("\ufeff"===a[0]&&(a=a.slice(1),"function"==typeof this.options.stripBOM&&this.options.stripBOM()),this.pass=!0),a},a.prototype.end=function(){return this.decoder.end()},Re}var Me,He,$e={};function Ge(){if(He)return Me;He=1;var e=Ue().Buffer;function a(a,n){this.enc=a.encodingName,this.bomAware=a.bomAware,"base64"===this.enc?this.encoder=o:"cesu8"===this.enc&&(this.enc="utf8",this.encoder=s,"💩"!==e.from("eda0bdedb2a9","hex").toString()&&(this.decoder=r,this.defaultCharUnicode=n.defaultCharUnicode))}Me={utf8:{type:"_internal",bomAware:!0},cesu8:{type:"_internal",bomAware:!0},unicode11utf8:"utf8",ucs2:{type:"_internal",bomAware:!0},utf16le:"ucs2",binary:{type:"_internal"},base64:{type:"_internal"},hex:{type:"_internal"},_internal:a},a.prototype.encoder=t,a.prototype.decoder=i;var n=l.StringDecoder;function i(e,a){n.call(this,a.enc)}function t(e,a){this.enc=a.enc}function o(e,a){this.prevStr=""}function s(e,a){}function r(e,a){this.acc=0,this.contBytes=0,this.accBytes=0,this.defaultCharUnicode=a.defaultCharUnicode}return n.prototype.end||(n.prototype.end=function(){}),i.prototype=n.prototype,t.prototype.write=function(a){return e.from(a,this.enc)},t.prototype.end=function(){},o.prototype.write=function(a){var n=(a=this.prevStr+a).length-a.length%4;return this.prevStr=a.slice(n),a=a.sl
|
|||
|
/*!
|
|||
|
* unpipe
|
|||
|
* Copyright(c) 2015 Douglas Christopher Wilson
|
|||
|
* MIT Licensed
|
|||
|
*/var Sa,Aa,Oa=function(e){if(!e)throw new TypeError("argument stream is required");if("function"!=typeof e.unpipe){if(function(e){for(var a=e.listeners("data"),n=0;n<a.length;n++)if("ondata"===a[n].name)return!0;return!1}(e))for(var a,n=e.listeners("close"),i=0;i<n.length;i++)"cleanup"!==(a=n[i]).name&&"onclose"!==a.name||a.call(e)}else e.unpipe()}
|
|||
|
/*!
|
|||
|
* raw-body
|
|||
|
* Copyright(c) 2013-2014 Jonathan Ong
|
|||
|
* Copyright(c) 2014-2022 Douglas Christopher Wilson
|
|||
|
* MIT Licensed
|
|||
|
*/;var _a={};function Ca(e,a){return function(n){for(var i=new Array(arguments.length),t="error"===e?n:null,o=0;o<i.length;o++)i[o]=arguments[o];a(t,this,e,i)}}
|
|||
|
/*!
|
|||
|
* on-finished
|
|||
|
* Copyright(c) 2013 Jonathan Ong
|
|||
|
* Copyright(c) 2014 Douglas Christopher Wilson
|
|||
|
* MIT Licensed
|
|||
|
*/({get exports(){return _a},set exports(e){_a=e}}).exports=function(e,a){return!1!==Ba(e)?(Ia(a,null,e),e):(function(e,a){var n=e.__onFinished;n&&n.queue||(n=e.__onFinished=function(e){function a(n){if(e.__onFinished===a&&(e.__onFinished=null),a.queue){var i=a.queue;a.queue=null;for(var t=0;t<i.length;t++)i[t](n,e)}}return a.queue=[],a}(e),function(e,a){var n,i,t=!1;function o(e){n.cancel(),i.cancel(),t=!0,a(e)}function s(a){e.removeListener("socket",s),t||n===i&&(i=Pa([[a,"error","close"]],o))}n=i=Pa([[e,"end","finish"]],o),e.socket?s(e.socket):(e.on("socket",s),void 0===e.socket&&function(e,a){var n=e.assignSocket;"function"==typeof n&&(e.assignSocket=function(e){n.call(this,e),a(e)})}(e,s))}(e,n)),n.queue.push(a)}(e,function(e){var a;return za.AsyncResource&&(a=new za.AsyncResource(e.name||"bound-anonymous-fn")),a&&a.runInAsyncScope?a.runInAsyncScope.bind(a,e,null):e}
|
|||
|
/*!
|
|||
|
* body-parser
|
|||
|
* Copyright(c) 2014-2015 Douglas Christopher Wilson
|
|||
|
* MIT Licensed
|
|||
|
*/(a)),e)},_a.isFinished=Ba;var Ta,qa,za=function(){try{return require("async_hooks")}catch(e){return{}}}(),Pa=function(e,a){if(!Array.isArray(e))throw new TypeError("arg must be an array of [ee, events...] arrays");for(var n=[],i=0;i<e.length;i++){var t=e[i];if(!Array.isArray(t)||t.length<2)throw new TypeError("each array member must be [ee, events...]");for(var o=t[0],s=1;s<t.length;s++){var r=t[s],c=Ca(r,p);o.on(r,c),n.push({ee:o,event:r,fn:c})}}function p(){l(),a.apply(null,arguments)}function l(){for(var e,a=0;a<n.length;a++)(e=n[a]).ee.removeListener(e.event,e.fn)}function u(e){a=e}return u.cancel=l,u},Ia="function"==typeof setImmediate?setImmediate:function(e){process.nextTick(e.bind.apply(e,arguments))};function Ba(e){var a=e.socket;return"boolean"==typeof e.finished?Boolean(e.finished||a&&!a.writable):"boolean"==typeof e.complete?Boolean(e.upgrade||!a||!a.readable||e.complete&&!e.readable):void 0}function Na(){if(qa)return Ta;qa=1;var a=Y,n=Te,i=function(){if(Aa)return Sa;Aa=1;var a=function(){try{return require("async_hooks")}catch(e){return{}}}(),n=M(),i=Y,t=Ea(),o=Oa;Sa=function(i,t,o){var s=o,c=t||{};if(!0!==t&&"string"!=typeof t||(c={encoding:t}),"function"==typeof t&&(s=t,c={}),void 0!==s&&"function"!=typeof s)throw new TypeError("argument callback must be a function");if(!s&&!e.c.Promise)throw new TypeError("argument callback is required");var p=!0!==c.encoding?c.encoding:"utf-8",l=n.parse(c.limit),u=null==c.length||isNaN(c.length)?null:parseInt(c.length,10);return s?r(i,p,u,l,function(e){var n;return a.AsyncResource&&(n=new a.AsyncResource(e.name||"bound-anonymous-fn")),n&&n.runInAsyncScope?n.runInAsyncScope.bind(n,e,null):e}(s)):new Promise((function(e,a){r(i,p,u,l,(function(n,i){if(n)return a(n);e(i)}))}))};var s=/^Encoding not recognized: /;function r(e,a,n,r,c){var p=!1,l=!0;if(null!==r&&null!==n&&n>r)return v(i(413,"request entity too large",{expected:n,length:n,limit:r,type:"entity.too.large"}));var u=e._readableState;if(e._decoder||u&&(u.encoding||u.decoder))return v(i(500,"stream encoding should not be set",{type:"stream.encoding.set"}));if(void 0!==e.readable&&!e.readable)return v(i(500,"stream is not readable",{type:"stream.not.readable"}));var d,m=0;try{d=function(e){if(!e)return null;try{return t.getDecoder(e)}catch(a){if(!s.test(a.message))throw a;throw i(415,"specified encoding unsupported",{encoding:e,type:"encoding.unsupported"})}}(a)}catch(e){return v(e)}var f=d?"":[];function v(){for(var a=new Array(arguments.length),n=0;n<a.length;n++)a[n]=arguments[n];function i(){g(),a[0]&&function(e){o(e),"function"==typeof e.pause&&e.pause()}(e),c.apply(null,a)}p=!0,l?process.nextTick(i):i()}function x(){p||v(i(400,"request aborted",{code:"ECONNABORTED",expected:n,length:n,received:m,type:"request.aborted"}))}function h(e){p||(m+=e.length,null!==r&&m>r?v(i(413,"request entity too large",{limit:r,received:m,type:"entity.too.large"})):d?f+=d.write(e):f.push(e))}function b(e){if(!p){if(e)return v(e);null!==n&&m!==n?v(i(400,"request size did not match content length",{expected:n,length:n,received:m,type:"request.size.invalid"})):v(null,d?f+(d.end()||""):Buffer.concat(f))}}function g(){f=null,e.removeListener("aborted",x),e.removeListener("data",h),e.removeListener("end",b),e.removeListener("error",b),e.removeListener("close",g)}e.on("aborted",x),e.on("close",g),e.on("data",h),e.on("end",b),e.on("error",b),l=!1}return Sa}(),t=Ea(),o=_a,s=Oa,r=c;return Ta=function(e,c,p,l,u,d){var m,f,v=d;e._body=!0;var x=null!==v.encoding?v.encoding:null,h=v.verify;try{f=function(e,n,i){var t,o=(e.headers["content-encoding"]||"identity").toLowerCase(),s=e.headers["content-length"];if(n('content-encoding "%s"',o),!1===i&&"identity"!==o)throw a(415,"content encoding unsupported",{encoding:o,type:"encoding.unsupported"});switch(o){case"deflate":t=r.createInflate(),n("inflate body"),e.pipe(t);break;case"gzip":t=r.createGunzip(),n("gunzip body"),e.pipe(t);break;case"identity":(t=e).length=s;break;default:throw a(415,'unsupported content encoding "'+o+'"',{encoding:o,type:"encoding.unsupported"})}return t}(e,u,v.inflate),m=
|
|||
|
/*!
|
|||
|
* mime-types
|
|||
|
* Copyright(c) 2014 Jonathan Ong
|
|||
|
* Copyright(c) 2015 Douglas Christopher Wilson
|
|||
|
* MIT Licensed
|
|||
|
*/
|
|||
|
function(e){var n,i,t,o=Qa,s=a.extname,r=/^\s*([^;\s]*)(?:;|\s|$)/,c=/^text\//i;function p(e){if(!e||"string"!=typeof e)return!1;var a=r.exec(e),n=a&&o[a[1].toLowerCase()];return n&&n.charset?n.charset:!(!a||!c.test(a[1]))&&"UTF-8"}e.charset=p,e.charsets={lookup:p},e.contentType=function(a){if(!a||"string"!=typeof a)return!1;var n=-1===a.indexOf("/")?e.lookup(a):a;if(!n)return!1;if(-1===n.indexOf("charset")){var i=e.charset(n);i&&(n+="; charset="+i.toLowerCase())}return n},e.extension=function(a){if(!a||"string"!=typeof a)return!1;var n=r.exec(a),i=n&&e.extensions[n[1].toLowerCase()];return!(!i||!i.length)&&i[0]},e.extensions=Object.create(null),e.lookup=function(a){if(!a||"string"!=typeof a)return!1;var n=s("x."+a).toLowerCase().substr(1);return n&&e.types[n]||!1},e.types=Object.create(null),n=e.extensions,i=e.types,t=["nginx","apache",void 0,"iana"],Object.keys(o).forEach((function(e){var a=o[e],s=a.extensions;if(s&&s.length){n[e]=s;for(var r=0;r<s.length;r++){var c=s[r];if(i[c]){var p=t.indexOf(o[i[c]].source),l=t.indexOf(a.source);if("application/octet-stream"!==i[c]&&(p>l||p===l&&"application/"===i[c].substr(0,12)))continue}i[c]=e}}}))}(Ja);
|
|||
|
/*!
|
|||
|
* type-is
|
|||
|
* Copyright(c) 2014 Jonathan Ong
|
|||
|
* Copyright(c) 2014-2015 Douglas Christopher Wilson
|
|||
|
* MIT Licensed
|
|||
|
*/
|
|||
|
var Xa,Ya,Ka,en,an,nn,tn=Fa,on=Ja;function sn(e,a){var n,i,t=a,o=function(e){if(!e)return null;try{return function(e){var a=tn.parse(e);return a.parameters=void 0,tn.format(a)}(e)}catch(e){return null}}
|
|||
|
/*!
|
|||
|
* body-parser
|
|||
|
* Copyright(c) 2014 Jonathan Ong
|
|||
|
* Copyright(c) 2014-2015 Douglas Christopher Wilson
|
|||
|
* MIT Licensed
|
|||
|
*/(e);if(!o)return!1;if(t&&!Array.isArray(t))for(t=new Array(arguments.length-1),n=0;n<t.length;n++)t[n]=arguments[n+1];if(!t||!t.length)return o;for(n=0;n<t.length;n++)if(pn(cn(i=t[n]),o))return"+"===i[0]||-1!==i.indexOf("*")?o:i;return!1}function rn(e){return void 0!==e.headers["transfer-encoding"]||!isNaN(e.headers["content-length"])}function cn(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("/")?on.lookup(e):e}function pn(e,a){if(!1===e)return!1;var n=a.split("/"),i=e.split("/");return 2===n.length&&2===i.length&&("*"===i[0]||i[0]===n[0])&&("*+"===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])}Ua.exports=function(e,a){var n=a;if(!rn(e))return null;if(arguments.length>2){n=new Array(arguments.length-1);for(var i=0;i<n.length;i++)n[i]=arguments[i+1]}return sn(e.headers["content-type"],n)},La.is=sn,La.hasBody=rn,La.normalize=cn,La.match=pn;var ln,un="undefined"!=typeof Symbol&&Symbol,dn="Function.prototype.bind called on incompatible ",mn=Array.prototype.slice,fn=Object.prototype.toString,vn="[object Function]",xn=Function.prototype.bind||function(e){var a=this;if("function"!=typeof a||fn.call(a)!==vn)throw new TypeError(dn+a);for(var n,i=mn.call(arguments,1),t=Math.max(0,a.length-i.length),o=[],s=0;s<t;s++)o.push("$"+s);if(n=Function("binder","return function ("+o.join(",")+"){ return binder.apply(this,arguments); }")((function(){if(this instanceof n){var t=a.apply(this,i.concat(mn.call(arguments)));return Object(t)===t?t:this}return a.apply(e,i.concat(mn.call(arguments)))})),a.prototype){var r=function(){};r.prototype=a.prototype,n.prototype=new r,r.prototype=null}return n},hn=xn.call(Function.call,Object.prototype.hasOwnProperty),bn=SyntaxError,gn=Function,yn=TypeError,wn=function(e){try{return gn('"use strict"; return ('+e+").constructor;")()}catch(e){}},kn=Object.getOwnPropertyDescriptor;if(kn)try{kn({},"")}catch(e){kn=null}var jn=function(){throw new yn},En=kn?function(){try{return jn}catch(e){try{return kn(arguments,"callee").get}catch(e){return jn}}}():jn,Sn="function"==typeof un&&"function"==typeof Symbol&&"symbol"==typeof un("foo")&&"symbol"==typeof Symbol("bar")&&function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},a=Symbol("test"),n=Object(a);if("string"==typeof a)return!1;if("[object Symbol]"!==Object.prototype.toString.call(a))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(a in e[a]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var i=Object.getOwnPropertySymbols(e);if(1!==i.length||i[0]!==a)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,a))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var t=Object.getOwnPropertyDescriptor(e,a);if(42!==t.value||!0!==t.enumerable)return!1}return!0}(),An=Object.getPrototypeOf||function(e){return e.__proto__},On={},_n="undefined"==typeof Uint8Array?ln:An(Uint8Array),Cn={"%AggregateError%":"undefined"==typeof AggregateError?ln:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?ln:ArrayBuffer,"%ArrayIteratorPrototype%":Sn?An([][Symbol.iterator]()):ln,"%AsyncFromSyncIteratorPrototype%":ln,"%AsyncFunction%":On,"%AsyncGenerator%":On,"%AsyncGeneratorFunction%":On,"%AsyncIteratorPrototype%":On,"%Atomics%":"undefined"==typeof Atomics?ln:Atomics,"%BigInt%":"undefined"==typeof BigInt?ln:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?ln:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?ln:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?ln:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval
|
|||
|
/*!
|
|||
|
* body-parser
|
|||
|
* Copyright(c) 2014-2015 Douglas Christopher Wilson
|
|||
|
* MIT Licensed
|
|||
|
*/
|
|||
|
!function(e,a){var n=E("body-parser"),i=Object.create(null);function t(e){return function(){return function(e){var a=i[e];if(void 0!==a)return a;switch(e){case"json":a=function(){if(Ya)return Xa;Ya=1;var e=M(),a=H,n=Y,i=Se()("body-parser:json"),t=Na(),o=La;Xa=function(c){var p=c||{},l="number"!=typeof p.limit?e.parse(p.limit||"100kb"):p.limit,u=!1!==p.inflate,d=p.reviver,m=!1!==p.strict,f=p.type||"application/json",v=p.verify||!1;if(!1!==v&&"function"!=typeof v)throw new TypeError("option verify must be function");var x="function"!=typeof f?function(e){return function(a){return Boolean(o(a,e))}}(f):f;function h(e){if(0===e.length)return{};if(m){var a=(n=e,(t=s.exec(n))?t[1]:void 0);if("{"!==a&&"["!==a)throw i("strict violation"),function(e,a){var n=e.indexOf(a),i=-1!==n?e.substring(0,n)+"#":"";try{throw JSON.parse(i),new SyntaxError("strict violation")}catch(e){return r(e,{message:e.message.replace("#",a),stack:e.stack})}}(e,a)}var n,t;try{return i("parse json"),JSON.parse(e,d)}catch(e){throw r(e,{message:e.message,stack:e.stack})}}return function(e,s,r){if(e._body)return i("body already parsed"),void r();if(e.body=e.body||{},!o.hasBody(e))return i("skip empty body"),void r();if(i("content-type %j",e.headers["content-type"]),!x(e))return i("skip parsing"),void r();var c=function(e){try{return(a.parse(e).parameters.charset||"").toLowerCase()}catch(e){return}}(e)||"utf-8";if("utf-"!==c.slice(0,4))return i("invalid charset"),void r(n(415,'unsupported charset "'+c.toUpperCase()+'"',{charset:c,type:"charset.unsupported"}));t(e,s,r,h,i,{encoding:c,inflate:u,limit:l,verify:v})}};var s=/^[\x20\x09\x0a\x0d]*([^\x20\x09\x0a\x0d])/;function r(e,a){for(var n=Object.getOwnPropertyNames(e),i=0;i<n.length;i++){var t=n[i];"stack"!==t&&"message"!==t&&delete e[t]}return e.stack=a.stack.replace(e.message,a.message),e.message=a.message,e}return Xa}
|
|||
|
/*!
|
|||
|
* body-parser
|
|||
|
* Copyright(c) 2014-2015 Douglas Christopher Wilson
|
|||
|
* MIT Licensed
|
|||
|
*/();break;case"raw":a=function(){if(en)return Ka;en=1;var e=M(),a=Se()("body-parser:raw"),n=Na(),i=La;return Ka=function(t){var o=t||{},s=!1!==o.inflate,r="number"!=typeof o.limit?e.parse(o.limit||"100kb"):o.limit,c=o.type||"application/octet-stream",p=o.verify||!1;if(!1!==p&&"function"!=typeof p)throw new TypeError("option verify must be function");var l="function"!=typeof c?function(e){return function(a){return Boolean(i(a,e))}}(c):c;function u(e){return e}return function(e,t,o){return e._body?(a("body already parsed"),void o()):(e.body=e.body||{},i.hasBody(e)?(a("content-type %j",e.headers["content-type"]),l(e)?void n(e,t,o,u,a,{encoding:null,inflate:s,limit:r,verify:p}):(a("skip parsing"),void o())):(a("skip empty body"),void o()))}},Ka}
|
|||
|
/*!
|
|||
|
* body-parser
|
|||
|
* Copyright(c) 2014-2015 Douglas Christopher Wilson
|
|||
|
* MIT Licensed
|
|||
|
*/();break;case"text":a=function(){if(nn)return an;nn=1;var e=M(),a=H,n=Se()("body-parser:text"),i=Na(),t=La;return an=function(o){var s=o||{},r=s.defaultCharset||"utf-8",c=!1!==s.inflate,p="number"!=typeof s.limit?e.parse(s.limit||"100kb"):s.limit,l=s.type||"text/plain",u=s.verify||!1;if(!1!==u&&"function"!=typeof u)throw new TypeError("option verify must be function");var d="function"!=typeof l?function(e){return function(a){return Boolean(t(a,e))}}(l):l;function m(e){return e}return function(e,o,s){if(e._body)return n("body already parsed"),void s();if(e.body=e.body||{},!t.hasBody(e))return n("skip empty body"),void s();if(n("content-type %j",e.headers["content-type"]),!d(e))return n("skip parsing"),void s();var l=function(e){try{return(a.parse(e).parameters.charset||"").toLowerCase()}catch(e){return}}(e)||r;i(e,o,s,m,n,{encoding:l,inflate:c,limit:p,verify:u})}},an}();break;case"urlencoded":a=function(){if(Vi)return Zi;Vi=1;var e=M(),a=H,n=Y,i=Se()("body-parser:urlencoded"),t=E("body-parser"),o=Na(),s=La;Zi=function(r){var l=r||{};void 0===l.extended&&t("undefined extended: provide extended option");var u=!1!==l.extended,d=!1!==l.inflate,m="number"!=typeof l.limit?e.parse(l.limit||"100kb"):l.limit,f=l.type||"application/x-www-form-urlencoded",v=l.verify||!1;if(!1!==v&&"function"!=typeof v)throw new TypeError("option verify must be function");var x=u?function(e){var a=void 0!==e.parameterLimit?e.parameterLimit:1e3,t=p("qs");if(isNaN(a)||a<1)throw new TypeError("option parameterLimit must be a positive number");return isFinite(a)&&(a|=0),function(e){var o=c(e,a);if(void 0===o)throw i("too many parameters"),n(413,"too many parameters",{type:"parameters.too.many"});var s=Math.max(100,o);return i("parse extended urlencoding"),t(e,{allowPrototypes:!0,arrayLimit:s,depth:1/0,parameterLimit:a})}}(l):function(e){var a=void 0!==e.parameterLimit?e.parameterLimit:1e3,t=p("querystring");if(isNaN(a)||a<1)throw new TypeError("option parameterLimit must be a positive number");return isFinite(a)&&(a|=0),function(e){if(void 0===c(e,a))throw i("too many parameters"),n(413,"too many parameters",{type:"parameters.too.many"});return i("parse urlencoding"),t(e,void 0,void 0,{maxKeys:a})}}(l),h="function"!=typeof f?function(e){return function(a){return Boolean(s(a,e))}}(f):f;function b(e){return e.length?x(e):{}}return function(e,t,r){if(e._body)return i("body already parsed"),void r();if(e.body=e.body||{},!s.hasBody(e))return i("skip empty body"),void r();if(i("content-type %j",e.headers["content-type"]),!h(e))return i("skip parsing"),void r();var c=function(e){try{return(a.parse(e).parameters.charset||"").toLowerCase()}catch(e){return}}(e)||"utf-8";if("utf-8"!==c)return i("invalid charset"),void r(n(415,'unsupported charset "'+c.toUpperCase()+'"',{charset:c,type:"charset.unsupported"}));o(e,t,r,b,i,{debug:i,encoding:c,inflate:d,limit:m,verify:v})}};var r=Object.create(null);function c(e,a){for(var n=0,i=0;-1!==(i=e.indexOf("&",i));)if(i++,++n===a)return;return n}function p(e){var a=r[e];if(void 0!==a)return a.parse;switch(e){case"qs":a=Ft;break;case"querystring":a=u}return r[e]=a,a.parse}return Zi}()}return i[e]=a}(e)}}a=e.exports=n.function((function(e){var n=Object.create(e||null,{type:{configurable:!0,enumerable:!0,value:void 0,writable:!0}}),i=a.urlencoded(n),t=a.json(n);return function(e,a,n){t(e,a,(function(t){if(t)return n(t);i(e,a,n)}))}}),"bodyParser: use individual json/urlencoded middlewares"),Object.defineProperty(a,"json",{configurable:!0,enumerable:!0,get:t("json")}),Object.defineProperty(a,"raw",{configurable:!0,enumerable:!0,get:t("raw")}),Object.defineProperty(a,"text",{configurable:!0,enumerable:!0,get:t("text")}),Object.defineProperty(a,"urlencoded",{configurable:!0,enumerable:!0,get:t("urlencoded")})}(k,w);
|
|||
|
/*!
|
|||
|
* merge-descriptors
|
|||
|
* Copyright(c) 2014 Jonathan Ong
|
|||
|
* Copyright(c) 2015 Douglas Christopher Wilson
|
|||
|
* MIT Licensed
|
|||
|
*/
|
|||
|
var Rt,Dt,Mt,Ht,$t=function(e,a,n){if(!e)throw new TypeError("argument dest is required");if(!a)throw new TypeError("argument src is required");return void 0===n&&(n=!0),Object.getOwnPropertyNames(a).forEach((function(i){if(n||!Gt.call(e,i)){var t=Object.getOwnPropertyDescriptor(a,i);Object.defineProperty(e,i,t)}})),e},Gt=Object.prototype.hasOwnProperty,Wt={},Zt={get exports(){return Wt},set exports(e){Wt=e}},Vt={},Jt={},Qt={get exports(){return Jt},set exports(e){Jt=e}},Xt={},Yt={get exports(){return Xt},set exports(e){Xt=e}};function Kt(){return Mt||(Mt=1,function(e,a){var n;function i(e){function i(){if(i.enabled){var e=i,t=+new Date,o=t-(n||t);e.diff=o,e.prev=n,e.curr=t,n=t;for(var s=new Array(arguments.length),r=0;r<s.length;r++)s[r]=arguments[r];s[0]=a.coerce(s[0]),"string"!=typeof s[0]&&s.unshift("%O");var c=0;s[0]=s[0].replace(/%([a-zA-Z%])/g,(function(n,i){if("%%"===n)return n;c++;var t=a.formatters[i];if("function"==typeof t){var o=s[c];n=t.call(e,o),s.splice(c,1),c--}return n})),a.formatArgs.call(e,s),(i.log||a.log||console.log.bind(console)).apply(e,s)}}return i.namespace=e,i.enabled=a.enabled(e),i.useColors=a.useColors(),i.color=function(e){var n,i=0;for(n in e)i=(i<<5)-i+e.charCodeAt(n),i|=0;return a.colors[Math.abs(i)%a.colors.length]}(e),"function"==typeof a.init&&a.init(i),i}(a=Yt.exports=i.debug=i.default=i).coerce=function(e){return e instanceof Error?e.stack||e.message:e},a.disable=function(){a.enable("")},a.enable=function(e){a.save(e),a.names=[],a.skips=[];for(var n=("string"==typeof e?e:"").split(/[\s,]+/),i=n.length,t=0;t<i;t++)n[t]&&("-"===(e=n[t].replace(/\*/g,".*?"))[0]?a.skips.push(new RegExp("^"+e.substr(1)+"$")):a.names.push(new RegExp("^"+e+"$")))},a.enabled=function(e){var n,i;for(n=0,i=a.skips.length;n<i;n++)if(a.skips[n].test(e))return!1;for(n=0,i=a.names.length;n<i;n++)if(a.names[n].test(e))return!0;return!1},a.humanize=function(){if(Dt)return Rt;Dt=1;var e=1e3,a=60*e,n=60*a,i=24*n;function t(e,a,n){if(!(e<a))return e<1.5*a?Math.floor(e/a)+" "+n:Math.ceil(e/a)+" "+n+"s"}return Rt=function(o,s){s=s||{};var r=typeof o;if("string"===r&&o.length>0)return function(t){if(!((t=String(t)).length>100)){var o=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(t);if(o){var s=parseFloat(o[1]);switch((o[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*s;case"days":case"day":case"d":return s*i;case"hours":case"hour":case"hrs":case"hr":case"h":return s*n;case"minutes":case"minute":case"mins":case"min":case"m":return s*a;case"seconds":case"second":case"secs":case"sec":case"s":return s*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return s;default:return}}}}(o);if("number"===r&&!1===isNaN(o))return s.long?function(o){return t(o,i,"day")||t(o,n,"hour")||t(o,a,"minute")||t(o,e,"second")||o+" ms"}(o):function(t){return t>=i?Math.round(t/i)+"d":t>=n?Math.round(t/n)+"h":t>=a?Math.round(t/a)+"m":t>=e?Math.round(t/e)+"s":t+"ms"}(o);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(o))},Rt}(),a.names=[],a.skips=[],a.formatters={}}(0,Xt)),Xt}var eo,ao,no={},io={get exports(){return no},set exports(e){no=e}};ao={get exports(){return Vt},set exports(e){Vt=e}},"undefined"!=typeof process&&"renderer"===process.type?ao.exports=(Ht||(Ht=1,function(e,a){function n(){var e;try{e=a.storage.debug}catch(e){}return!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG),e}(a=Qt.exports=Kt()).log=function(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},a.formatArgs=function(e){var n=this.useColors;if(e[0]=(n?"%c":"")+this.namespace+(n?" %c":" ")+e[0]+(n?"%c ":" ")+"+"+a.humanize(this.diff),n){var i="color: "+this.color;e.splice(1,0,i,"color: inherit");var t=0,o=0;e[0].replace(/%[a-zA-Z%]/g,(function(e){"%%"!==e&&(t++,"%c"===e&&(o=t))})),e.splice(o,0,i)}},a.save=function(e){try{null==e?a.storage.removeItem("debug"):a.storage.debug=e}catch(e){}},a.load=n,a.useColors=function()
|
|||
|
/*!
|
|||
|
* encodeurl
|
|||
|
* Copyright(c) 2016 Douglas Christopher Wilson
|
|||
|
* MIT Licensed
|
|||
|
*/
|
|||
|
var to=function(e){return String(e).replace(so,ro).replace(oo,encodeURI)}
|
|||
|
/*!
|
|||
|
* escape-html
|
|||
|
* Copyright(c) 2012-2013 TJ Holowaychuk
|
|||
|
* Copyright(c) 2015 Andreas Lubbe
|
|||
|
* Copyright(c) 2015 Tiancheng "Timothy" Gu
|
|||
|
* MIT Licensed
|
|||
|
*/,oo=/(?:[^\x21\x25\x26-\x3B\x3D\x3F-\x5B\x5D\x5F\x61-\x7A\x7E]|%(?:[^0-9A-Fa-f]|[0-9A-Fa-f][^0-9A-Fa-f]|$))+/g,so=/(^|[^\uD800-\uDBFF])[\uDC00-\uDFFF]|[\uD800-\uDBFF]([^\uDC00-\uDFFF]|$)/g,ro="$1<>$2",co=/["'&<>]/,po=function(e){var a,n=""+e,i=co.exec(n);if(!i)return n;var t="",o=0,s=0;for(o=i.index;o<n.length;o++){switch(n.charCodeAt(o)){case 34:a=""";break;case 38:a="&";break;case 39:a="'";break;case 60:a="<";break;case 62:a=">";break;default:continue}s!==o&&(t+=n.substring(s,o)),s=o+1,t+=a}return s!==o?t+n.substring(s,o):t},lo={},uo={get exports(){return lo},set exports(e){lo=e}},mo=d,fo=mo.parse,vo=mo.Url;function xo(e){var a=e.url;if(void 0!==a){var n=e._parsedUrl;return bo(a,n)?n:((n=ho(a))._raw=a,e._parsedUrl=n)}}function ho(e){if("string"!=typeof e||47!==e.charCodeAt(0))return fo(e);for(var a=e,n=null,i=null,t=1;t<e.length;t++)switch(e.charCodeAt(t)){case 63:null===i&&(a=e.substring(0,t),n=e.substring(t+1),i=e.substring(t));break;case 9:case 10:case 12:case 13:case 32:case 35:case 160:case 65279:return fo(e)}var o=void 0!==vo?new vo:{};return o.path=e,o.href=e,o.pathname=a,null!==i&&(o.query=n,o.search=i),o}function bo(e,a){return"object"==typeof a&&null!==a&&(void 0===vo||a instanceof vo)&&a._raw===e}
|
|||
|
/*!
|
|||
|
* finalhandler
|
|||
|
* Copyright(c) 2014-2022 Douglas Christopher Wilson
|
|||
|
* MIT Licensed
|
|||
|
*/uo.exports=xo,lo.original=function(e){var a=e.originalUrl;if("string"!=typeof a)return xo(e);var n=e._parsedOriginalUrl;return bo(a,n)?n:((n=ho(a))._raw=a,e._parsedOriginalUrl=n)};var go=Vt("finalhandler"),yo=to,wo=po,ko=_a,jo=lo,Eo=ne,So=Oa,Ao=/\x20{2}/g,Oo=/\n/g,_o="function"==typeof setImmediate?setImmediate:function(e){process.nextTick(e.bind.apply(e,arguments))},Co=ko.isFinished,To=function(e,a,n){var i=n||{},t=i.env||"production",o=i.onerror;return function(n){var i,s,r;if(n||!qo(a)){if(n?(r=function(e){return"number"==typeof e.status&&e.status>=400&&e.status<600?e.status:"number"==typeof e.statusCode&&e.statusCode>=400&&e.statusCode<600?e.statusCode:void 0}(n),void 0===r?r=function(e){var a=e.statusCode;return("number"!=typeof a||a<400||a>599)&&(a=500),a}(a):i=function(e){if(e.headers&&"object"==typeof e.headers){for(var a=Object.create(null),n=Object.keys(e.headers),i=0;i<n.length;i++){var t=n[i];a[t]=e.headers[t]}return a}}(n),s=function(e,a,n){var i;return"production"!==n&&((i=e.stack)||"function"!=typeof e.toString||(i=e.toString())),i||Eo.message[a]}(n,r,t)):(r=404,s="Cannot "+e.method+" "+yo(function(e){try{return jo.original(e).pathname}catch(e){return"resource"}}(e))),go("default %s",r),n&&o&&_o(o,n,e,a),qo(a))return go("cannot %d after headers sent",r),void e.socket.destroy();!function(e,a,n,i,t){function o(){var o=function(e){return'<!DOCTYPE html>\n<html lang="en">\n<head>\n<meta charset="utf-8">\n<title>Error</title>\n</head>\n<body>\n<pre>'+wo(e).replace(Oo,"<br>").replace(Ao," ")+"</pre>\n</body>\n</html>\n"}(t);a.statusCode=n,a.statusMessage=Eo.message[n],a.removeHeader("Content-Encoding"),a.removeHeader("Content-Language"),a.removeHeader("Content-Range"),function(e,a){if(a)for(var n=Object.keys(a),i=0;i<n.length;i++){var t=n[i];e.setHeader(t,a[t])}}(a,i),a.setHeader("Content-Security-Policy","default-src 'none'"),a.setHeader("X-Content-Type-Options","nosniff"),a.setHeader("Content-Type","text/html; charset=utf-8"),a.setHeader("Content-Length",Buffer.byteLength(o,"utf8")),"HEAD"!==e.method?a.end(o,"utf8"):a.end()}Co(e)?o():(So(e),ko(e,o),e.resume())}(e,a,r,i,s)}else go("cannot 404 after headers sent")}};function qo(e){return"boolean"!=typeof e.headersSent?Boolean(e._header):e.headersSent}var zo,Po,Io,Bo,No={},Lo={get exports(){return No},set exports(e){No=e}},Uo={},Fo={},Ro={get exports(){return Fo},set exports(e){Fo=e}},Do={},Mo={get exports(){return Do},set exports(e){Do=e}};function Ho(){return Io||(Io=1,function(e,a){var n;function i(e){function i(){if(i.enabled){var e=i,t=+new Date,o=t-(n||t);e.diff=o,e.prev=n,e.curr=t,n=t;for(var s=new Array(arguments.length),r=0;r<s.length;r++)s[r]=arguments[r];s[0]=a.coerce(s[0]),"string"!=typeof s[0]&&s.unshift("%O");var c=0;s[0]=s[0].replace(/%([a-zA-Z%])/g,(function(n,i){if("%%"===n)return n;c++;var t=a.formatters[i];if("function"==typeof t){var o=s[c];n=t.call(e,o),s.splice(c,1),c--}return n})),a.formatArgs.call(e,s),(i.log||a.log||console.log.bind(console)).apply(e,s)}}return i.namespace=e,i.enabled=a.enabled(e),i.useColors=a.useColors(),i.color=function(e){var n,i=0;for(n in e)i=(i<<5)-i+e.charCodeAt(n),i|=0;return a.colors[Math.abs(i)%a.colors.length]}(e),"function"==typeof a.init&&a.init(i),i}(a=Mo.exports=i.debug=i.default=i).coerce=function(e){return e instanceof Error?e.stack||e.message:e},a.disable=function(){a.enable("")},a.enable=function(e){a.save(e),a.names=[],a.skips=[];for(var n=("string"==typeof e?e:"").split(/[\s,]+/),i=n.length,t=0;t<i;t++)n[t]&&("-"===(e=n[t].replace(/\*/g,".*?"))[0]?a.skips.push(new RegExp("^"+e.substr(1)+"$")):a.names.push(new RegExp("^"+e+"$")))},a.enabled=function(e){var n,i;for(n=0,i=a.skips.length;n<i;n++)if(a.skips[n].test(e))return!1;for(n=0,i=a.names.length;n<i;n++)if(a.names[n].test(e))return!0;return!1},a.humanize=function(){if(Po)return zo;Po=1;var e=1e3,a=60*e,n=60*a,i=24*n;function t(e,a,n){if(!(e<a))return e<1.5*a?Math.floor(e/a)+" "+n:Math.ceil(e/a)+" "+n+"s"}return zo=function(o,s){s=s||{};var r=typeof o;if("string"===r&&o.length>0)return function(t){if(!((t=String(t)).length>100)){var o=/^((?
|
|||
|
/*!
|
|||
|
* express
|
|||
|
* Copyright(c) 2009-2013 TJ Holowaychuk
|
|||
|
* Copyright(c) 2013 Roman Shtylman
|
|||
|
* Copyright(c) 2014-2015 Douglas Christopher Wilson
|
|||
|
* MIT Licensed
|
|||
|
*/,Yo=Uo("express:router:layer"),Ko=Object.prototype.hasOwnProperty,es=as;function as(e,a,n){if(!(this instanceof as))return new as(e,a,n);Yo("new %o",e);var i=a||{};this.handle=n,this.name=n.name||"<anonymous>",this.params=void 0,this.path=void 0,this.regexp=Xo(e,this.keys=[],i),this.regexp.fast_star="*"===e,this.regexp.fast_slash="/"===e&&!1===i.end}function ns(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}}
|
|||
|
/*!
|
|||
|
* methods
|
|||
|
* Copyright(c) 2013-2014 TJ Holowaychuk
|
|||
|
* Copyright(c) 2015-2016 Douglas Christopher Wilson
|
|||
|
* MIT Licensed
|
|||
|
*/as.prototype.handle_error=function(e,a,n,i){var t=this.handle;if(4!==t.length)return i(e);try{t(e,a,n,i)}catch(e){i(e)}},as.prototype.handle_request=function(e,a,n){var i=this.handle;if(i.length>3)return n();try{i(e,a,n)}catch(e){n(e)}},as.prototype.match=function(e){var a;if(null!=e){if(this.regexp.fast_slash)return this.params={},this.path="",!0;if(this.regexp.fast_star)return this.params={0:ns(e)},this.path=e,!0;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 o=n[t-1].name,s=ns(a[t]);void 0===s&&Ko.call(i,o)||(i[o]=s)}return!0};var is=m,ts=is.METHODS&&is.METHODS.map((function(e){return e.toLowerCase()}))||["get","post","put","head","delete","options","trace","copy","lock","mkcol","move","purge","propfind","proppatch","unlock","report","mkactivity","checkout","merge","m-search","notify","subscribe","unsubscribe","patch","search","connect"],os=Uo("express:router:route"),ss=Zo,rs=es,cs=ts,ps=Array.prototype.slice,ls=Object.prototype.toString,us=ds;function ds(e){this.path=e,this.stack=[],os("new %o",e),this.methods={}}ds.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])},ds.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},ds.prototype.dispatch=function(e,a,n){var i=0,t=this.stack,o=0;if(0===t.length)return n();var s=e.method.toLowerCase();"head"!==s||this.methods.head||(s="get"),e.route=this,function r(c){if(c&&"route"===c)return n();if(c&&"router"===c)return n(c);if(++o>100)return setImmediate(r,c);var p=t[i++];if(!p)return n(c);p.method&&p.method!==s?r(c):c?p.handle_error(c,e,a,r):p.handle_request(e,a,r),o=0}()},ds.prototype.all=function(){for(var e=ss(ps.call(arguments)),a=0;a<e.length;a++){var n=e[a];if("function"!=typeof n){var i=ls.call(n);throw new TypeError("Route.all() requires a callback function but got a "+i)}var t=rs("/",{},n);t.method=void 0,this.methods._all=!0,this.stack.push(t)}return this},cs.forEach((function(e){ds.prototype[e]=function(){for(var a=ss(ps.call(arguments)),n=0;n<a.length;n++){var i=a[n];if("function"!=typeof i){var t=ls.call(i);throw new Error("Route."+e+"() requires a callback function but got a "+t)}os("%s %o",e,this.path);var o=rs("/",{},i);o.method=e,this.methods[e]=!0,this.stack.push(o)}return this}}));var ms={};({get exports(){return ms},set exports(e){ms=e}}).exports=function(e,a){if(e&&a)for(var n in a)e[n]=a[n];return e};
|
|||
|
/*!
|
|||
|
* express
|
|||
|
* Copyright(c) 2009-2013 TJ Holowaychuk
|
|||
|
* Copyright(c) 2013 Roman Shtylman
|
|||
|
* Copyright(c) 2014-2015 Douglas Christopher Wilson
|
|||
|
* MIT Licensed
|
|||
|
*/
|
|||
|
var fs=us,vs=es,xs=ts,hs=ms,bs=Uo("express:router"),gs=E("express"),ys=Zo,ws=lo,ks=ee,js=/^\[object (\S+)\]$/,Es=Array.prototype.slice,Ss=Object.prototype.toString,As=Lo.exports=function(e){var a=e||{};function n(e,a,i){n.handle(e,a,i)}return ks(n,As),n.params={},n._params=[],n.caseSensitive=a.caseSensitive,n.mergeParams=a.mergeParams,n.strict=a.strict,n.stack=[],n};function Os(e,a){for(var n=0;n<a.length;n++){var i=a[n];-1===e.indexOf(i)&&e.push(i)}}function _s(e,a){try{return e.match(a)}catch(e){return e}}As.param=function(e,a){if("function"==typeof e)return gs("router.param(fn): Refactor to use path params"),void this._params.push(e);var n,i=this._params,t=i.length;":"===e[0]&&(gs("router.param("+JSON.stringify(e)+", fn): Use router.param("+JSON.stringify(e.slice(1))+", fn) instead"),e=e.slice(1));for(var o=0;o<t;++o)(n=i[o](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},As.handle=function(e,a,n){var i=this;bs("dispatching %s %s",e.method,e.url);var t,o,s=0,r=function(e){if("string"==typeof e&&0!==e.length&&"/"!==e[0]){var a=e.indexOf("?"),n=-1!==a?a:e.length,i=e.slice(0,n).indexOf("://");return-1!==i?e.substring(0,e.indexOf("/",3+i)):void 0}}(e.url)||"",c="",p=!1,l=0,u={},d=[],m=i.stack,f=e.params,v=e.baseUrl||"",x=function(e,a){for(var n=new Array(arguments.length-2),i=new Array(arguments.length-2),t=0;t<n.length;t++)n[t]=arguments[t+2],i[t]=a[n[t]];return function(){for(var t=0;t<n.length;t++)a[n[t]]=i[t];return e.apply(this,arguments)}}(n,e,"baseUrl","next","params");function h(n){var t="route"===n?null:n;if(p&&(e.url=e.url.slice(1),p=!1),0!==c.length&&(e.baseUrl=v,e.url=r+c+e.url.slice(r.length),c=""),"router"!==t)if(s>=m.length)setImmediate(x,t);else{if(++l>100)return setImmediate(h,n);var o,b,g,y=function(e){try{return ws(e).pathname}catch(e){return}}(e);if(null==y)return x(t);for(;!0!==b&&s<m.length;)if(b=_s(o=m[s++],y),g=o.route,"boolean"!=typeof b&&(t=t||b),!0===b&&g)if(t)b=!1;else{var w=e.method,k=g._handles_method(w);k||"OPTIONS"!==w||Os(d,g._options()),k||"HEAD"===w||(b=!1)}if(!0!==b)return x(t);g&&(e.route=g),e.params=i.mergeParams?function(e,a){if("object"!=typeof a||!a)return e;var n=hs({},a);if(!(0 in e)||!(0 in a))return hs(n,e);for(var i=0,t=0;i in e;)i++;for(;t in a;)t++;for(i--;i>=0;i--)e[i+t]=e[i],i<t&&delete e[i];return hs(n,e)}(o.params,f):o.params;var j=o.path;i.process_params(o,u,e,a,(function(n){n?h(t||n):g?o.handle_request(e,a,h):function(n,i,t,o){if(0!==t.length){if(t!==o.slice(0,t.length))return void h(i);var s=o[t.length];if(s&&"/"!==s&&"."!==s)return h(i);bs("trim prefix (%s) from url %s",t,e.url),c=t,e.url=r+e.url.slice(r.length+c.length),r||"/"===e.url[0]||(e.url="/"+e.url,p=!0),e.baseUrl=v+("/"===c[c.length-1]?c.substring(0,c.length-1):c)}bs("%s %s : %s",n.name,t,e.originalUrl),i?n.handle_error(i,e,a,h):n.handle_request(e,a,h)}(o,t,j,y),l=0}))}else setImmediate(x,null)}e.next=h,"OPTIONS"===e.method&&(t=x,o=function(e,n){if(n||0===d.length)return e(n);!function(e,a,n){try{var i=a.join(",");e.set("Allow",i),e.send(i)}catch(e){n(e)}}(a,d,e)},x=function(){var e=new Array(arguments.length+1);e[0]=t;for(var a=0,n=arguments.length;a<n;a++)e[a+1]=arguments[a];o.apply(this,e)}),e.baseUrl=v,e.originalUrl=e.originalUrl||e.url,h()},As.process_params=function(e,a,n,i,t){var o=this.params,s=e.keys;if(!s||0===s.length)return t();var r,c,p,l,u,d=0,m=0;function f(e){return e?t(e):d>=s.length?t():(m=0,c=s[d++],r=c.name,p=n.params[r],l=o[r],u=a[r],void 0!==p&&l?u&&(u.match===p||u.error&&"route"!==u.error)?(n.params[r]=u.value,f(u.error)):(a[r]=u={error:null,match:p,value:p},void v()):f())}function v(e){var a=l[m++];if(u.value=n.params[c.name],e)return u.error=e,void f(e);if(!a)return f();try{a(n,i,v,p,c.name)}catch(e){v(e)}}f()},As.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 t,o,s=ys(Es.call(arguments,a));if(0===s.length)throw new TypeError("Router.use() requires a middleware function");for(var r=0;r<s.
|
|||
|
/*!
|
|||
|
* express
|
|||
|
* Copyright(c) 2009-2013 TJ Holowaychuk
|
|||
|
* Copyright(c) 2013 Roman Shtylman
|
|||
|
* Copyright(c) 2014-2015 Douglas Christopher Wilson
|
|||
|
* MIT Licensed
|
|||
|
*/function Ps(){if(Ts)return Cs;Ts=1;var e=ms,a=lo,n=Ft;return Cs=function(i){var t=e({},i),o=n.parse;return"function"==typeof i&&(o=i,t=void 0),void 0!==t&&void 0===t.allowPrototypes&&(t.allowPrototypes=!0),function(e,n,i){if(!e.query){var s=a(e).query;e.query=o(s,t)}i()}},Cs}
|
|||
|
/*!
|
|||
|
* express
|
|||
|
* Copyright(c) 2009-2013 TJ Holowaychuk
|
|||
|
* Copyright(c) 2013 Roman Shtylman
|
|||
|
* Copyright(c) 2014-2015 Douglas Christopher Wilson
|
|||
|
* MIT Licensed
|
|||
|
*/qs.init=function(e){return function(a,n,i){e.enabled("x-powered-by")&&n.setHeader("X-Powered-By","Express"),a.res=n,n.req=a,a.next=i,zs(a,e.request),zs(n,e.response),n.locals=n.locals||Object.create(null),i()}};var Is=Uo("express:view"),Bs=a,Ns=t,Ls=Bs.dirname,Us=Bs.basename,Fs=Bs.extname,Rs=Bs.join,Ds=Bs.resolve,Ms=Hs;function Hs(e,a){var n=a||{};if(this.defaultEngine=n.defaultEngine,this.ext=Fs(e),this.name=e,this.root=n.root,!this.ext&&!this.defaultEngine)throw new Error("No default engine was specified and no extension was provided.");var i=e;if(this.ext||(this.ext="."!==this.defaultEngine[0]?"."+this.defaultEngine:this.defaultEngine,i+=this.ext),!n.engines[this.ext]){var t=this.ext.slice(1);Is('require "%s"',t);var o=f.c(t).__express;if("function"!=typeof o)throw new Error('Module "'+t+'" does not provide a view engine.');n.engines[this.ext]=o}this.engine=n.engines[this.ext],this.path=this.lookup(i)}function $s(e){Is('stat "%s"',e);try{return Ns.statSync(e)}catch(e){return}}Hs.prototype.lookup=function(e){var a,n=[].concat(this.root);Is('lookup "%s"',e);for(var i=0;i<n.length&&!a;i++){var t=n[i],o=Ds(t,e),s=Ls(o),r=Us(o);a=this.resolve(s,r)}return a},Hs.prototype.render=function(e,a){Is('render "%s"',this.path),this.engine(this.path,e,a)},Hs.prototype.resolve=function(e,a){var n=this.ext,i=Rs(e,a),t=$s(i);return t&&t.isFile()||(t=$s(i=Rs(e,Us(a,n),"index"+n)))&&t.isFile()?i:void 0};var Gs={},Ws={};/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|||
|
!function(e,a){var n=p,i=n.Buffer;function t(e,a){for(var n in e)a[n]=e[n]}function o(e,a,n){return i(e,a,n)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=n:(t(n,a),a.Buffer=o),o.prototype=Object.create(i.prototype),t(i,o),o.from=function(e,a,n){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,a,n)},o.alloc=function(e,a,n){if("number"!=typeof e)throw new TypeError("Argument must be a number");var t=i(e);return void 0!==a?"string"==typeof n?t.fill(a,n):t.fill(a):t.fill(0),t},o.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},o.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}}({get exports(){return Ws},set exports(e){Ws=e}},Ws);var Zs={};
|
|||
|
/*!
|
|||
|
* content-disposition
|
|||
|
* Copyright(c) 2014-2017 Douglas Christopher Wilson
|
|||
|
* MIT Licensed
|
|||
|
*/
|
|||
|
({get exports(){return Zs},set exports(e){Zs=e}}).exports=function(e,a){var n=a||{},i=n.type||"attachment",t=function(e,a){if(void 0!==e){var n={};if("string"!=typeof e)throw new TypeError("filename must be a string");if(void 0===a&&(a=!0),"string"!=typeof a&&"boolean"!=typeof a)throw new TypeError("fallback must be a string or boolean");if("string"==typeof a&&Ks.test(a))throw new TypeError("fallback must be ISO-8859-1 string");var i=Vs(e),t=ir.test(i),o="string"!=typeof a?a&&cr(i):Vs(a),s="string"==typeof o&&o!==i;return(s||!t||Xs.test(i))&&(n["filename*"]=i),(t||s)&&(n.filename=s?o:i),n}}(e,n.fallback);return function(e){var a=e.parameters,n=e.type;if(!n||"string"!=typeof n||!tr.test(n))throw new TypeError("invalid type");var i=String(n).toLowerCase();if(a&&"object"==typeof a)for(var t,o=Object.keys(a).sort(),s=0;s<o.length;s++){var r="*"===(t=o[s]).substr(-1)?dr(a[t]):ur(a[t]);i+="; "+t+"="+r}return i}(new mr(i,t))},Zs.parse=function(e){if(!e||"string"!=typeof e)throw new TypeError("argument string is required");var a=sr.exec(e);if(!a)throw new TypeError("invalid type format");var n,i,t=a[0].length,o=a[1].toLowerCase(),s=[],r={};for(t=nr.lastIndex=";"===a[0].substr(-1)?t-1:t;a=nr.exec(e);){if(a.index!==t)throw new TypeError("invalid parameter format");if(t+=a[0].length,n=a[1].toLowerCase(),i=a[2],-1!==s.indexOf(n))throw new TypeError("invalid duplicate parameter");s.push(n),n.indexOf("*")+1!==n.length?"string"!=typeof r[n]&&('"'===i[0]&&(i=i.substr(1,i.length-2).replace(er,"$1")),r[n]=i):(n=n.slice(0,-1),i=rr(i),r[n]=i)}if(-1!==t&&t!==e.length)throw new TypeError("invalid parameter format");return new mr(o,r)};var Vs=a.basename,Js=Ws.Buffer,Qs=/[\x00-\x20"'()*,/:;<=>?@[\\\]{}\x7f]/g,Xs=/%[0-9A-Fa-f]{2}/,Ys=/%([0-9A-Fa-f]{2})/g,Ks=/[^\x20-\x7e\xa0-\xff]/g,er=/\\([\u0000-\u007f])/g,ar=/([\\"])/g,nr=/;[\x09\x20]*([!#$%&'*+.0-9A-Z^_`a-z|~-]+)[\x09\x20]*=[\x09\x20]*("(?:[\x20!\x23-\x5b\x5d-\x7e\x80-\xff]|\\[\x20-\x7e])*"|[!#$%&'*+.0-9A-Z^_`a-z|~-]+)[\x09\x20]*/g,ir=/^[\x20-\x7e\x80-\xff]+$/,tr=/^[!#$%&'*+.0-9A-Z^_`a-z|~-]+$/,or=/^([A-Za-z0-9!#$%&+\-^_`{}~]+)'(?:[A-Za-z]{2,3}(?:-[A-Za-z]{3}){0,3}|[A-Za-z]{4,8}|)'((?:%[0-9A-Fa-f]{2}|[A-Za-z0-9!#$&+.^_`|~-])+)$/,sr=/^([!#$%&'*+.0-9A-Z^_`a-z|~-]+)[\x09\x20]*(?:$|;)/;function rr(e){var a=or.exec(e);if(!a)throw new TypeError("invalid extended field value");var n,i=a[1].toLowerCase(),t=a[2].replace(Ys,pr);switch(i){case"iso-8859-1":n=cr(t);break;case"utf-8":n=Js.from(t,"binary").toString("utf8");break;default:throw new TypeError("unsupported charset in extended field")}return n}function cr(e){return String(e).replace(Ks,"?")}function pr(e,a){return String.fromCharCode(parseInt(a,16))}function lr(e){return"%"+String(e).charCodeAt(0).toString(16).toUpperCase()}function ur(e){return'"'+String(e).replace(ar,"\\$1")+'"'}function dr(e){var a=String(e);return"UTF-8''"+encodeURIComponent(a).replace(Qs,lr)}function mr(e,a){this.type=e,this.parameters=a}var fr,vr,xr,hr,br={},gr={get exports(){return br},set exports(e){br=e}},yr={},wr={},kr={get exports(){return wr},set exports(e){wr=e}},jr={},Er={get exports(){return jr},set exports(e){jr=e}};function Sr(){return xr||(xr=1,function(e,a){var n;function i(e){function i(){if(i.enabled){var e=i,t=+new Date,o=t-(n||t);e.diff=o,e.prev=n,e.curr=t,n=t;for(var s=new Array(arguments.length),r=0;r<s.length;r++)s[r]=arguments[r];s[0]=a.coerce(s[0]),"string"!=typeof s[0]&&s.unshift("%O");var c=0;s[0]=s[0].replace(/%([a-zA-Z%])/g,(function(n,i){if("%%"===n)return n;c++;var t=a.formatters[i];if("function"==typeof t){var o=s[c];n=t.call(e,o),s.splice(c,1),c--}return n})),a.formatArgs.call(e,s),(i.log||a.log||console.log.bind(console)).apply(e,s)}}return i.namespace=e,i.enabled=a.enabled(e),i.useColors=a.useColors(),i.color=function(e){var n,i=0;for(n in e)i=(i<<5)-i+e.charCodeAt(n),i|=0;return a.colors[Math.abs(i)%a.colors.length]}(e),"function"==typeof a.init&&a.init(i),i}(a=Er.exports=i.debug=i.default=i).coerce=function(e){return e instanceof Error?e.stack||e.message:e},a.disable=function(){a.enable("")},a.enable=function(e){a.save(e),a.names=[],a.ski
|
|||
|
/*!
|
|||
|
* etag
|
|||
|
* Copyright(c) 2014-2016 Douglas Christopher Wilson
|
|||
|
* MIT Licensed
|
|||
|
*/
|
|||
|
var Cr=function(e,a){if(null==e)throw new TypeError("argument entity is required");var n,i=(n=e,"function"==typeof qr&&n instanceof qr||n&&"object"==typeof n&&"ctime"in n&&"[object Date]"===zr.call(n.ctime)&&"mtime"in n&&"[object Date]"===zr.call(n.mtime)&&"ino"in n&&"number"==typeof n.ino&&"size"in n&&"number"==typeof n.size),t=a&&"boolean"==typeof a.weak?a.weak:i;if(!i&&"string"!=typeof e&&!Buffer.isBuffer(e))throw new TypeError("argument entity must be string, Buffer, or fs.Stats");var o,s,r=i?(s=(o=e).mtime.getTime().toString(16),'"'+o.size.toString(16)+"-"+s+'"'):function(e){if(0===e.length)return'"0-2jmj7l5rSw0yVb/vlWAYkK/YBwk"';var a=Tr.createHash("sha1").update(e,"utf8").digest("base64").substring(0,27);return'"'+("string"==typeof e?Buffer.byteLength(e,"utf8"):e.length).toString(16)+"-"+a+'"'}(e);return t?"W/"+r:r},Tr=v,qr=t.Stats,zr=Object.prototype.toString,Pr=/(?:^|,)\s*?no-cache\s*?(?:,|$)/,Ir=function(e,a){var n=e["if-modified-since"],i=e["if-none-match"];if(!n&&!i)return!1;var t=e["cache-control"];if(t&&Pr.test(t))return!1;if(i&&"*"!==i){var o=a.etag;if(!o)return!1;for(var s=!0,r=function(e){for(var a=0,n=[],i=0,t=0,o=e.length;t<o;t++)switch(e.charCodeAt(t)){case 32:i===a&&(i=a=t+1);break;case 44:n.push(e.substring(i,a)),i=a=t+1;break;default:a=t+1}return n.push(e.substring(i,a)),n}(i),c=0;c<r.length;c++){var p=r[c];if(p===o||p==="W/"+o||"W/"+p===o){s=!1;break}}if(s)return!1}if(n){var l=a["last-modified"];if(!(l&&Br(l)<=Br(n)))return!1}return!0};function Br(e){var a=e&&Date.parse(e);return"number"==typeof a?a:NaN}var Nr=t;function Lr(){this.types=Object.create(null),this.extensions=Object.create(null)}Lr.prototype.define=function(e){for(var a in e){for(var n=e[a],i=0;i<n.length;i++)process.env.DEBUG_MIME&&this.types[n[i]]&&console.warn((this._loading||"define()").replace(/.*\//,""),'changes "'+n[i]+'" extension type from '+this.types[n[i]]+" to "+a),this.types[n[i]]=a;this.extensions[a]||(this.extensions[a]=n[0])}},Lr.prototype.load=function(e){this._loading=e;var a={};Nr.readFileSync(e,"ascii").split(/[\r\n]+/).forEach((function(e){var n=e.replace(/\s*#.*|^\s*|\s*$/g,"").split(/\s+/);a[n.shift()]=n})),this.define(a),this._loading=null},Lr.prototype.lookup=function(e,a){var n=e.replace(/^.*[\.\/\\]/,"").toLowerCase();return this.types[n]||a||this.default_type},Lr.prototype.extension=function(e){var a=e.match(/^\s*([^;\s]*)(?:;|\s|$)/)[1].toLowerCase();return this.extensions[a]};var Ur=new Lr;Ur.define({"application/andrew-inset":["ez"],"application/applixware":["aw"],"application/atom+xml":["atom"],"application/atomcat+xml":["atomcat"],"application/atomsvc+xml":["atomsvc"],"application/bdoc":["bdoc"],"application/ccxml+xml":["ccxml"],"application/cdmi-capability":["cdmia"],"application/cdmi-container":["cdmic"],"application/cdmi-domain":["cdmid"],"application/cdmi-object":["cdmio"],"application/cdmi-queue":["cdmiq"],"application/cu-seeme":["cu"],"application/dash+xml":["mpd"],"application/davmount+xml":["davmount"],"application/docbook+xml":["dbk"],"application/dssc+der":["dssc"],"application/dssc+xml":["xdssc"],"application/ecmascript":["ecma"],"application/emma+xml":["emma"],"application/epub+zip":["epub"],"application/exi":["exi"],"application/font-tdpfr":["pfr"],"application/font-woff":[],"application/font-woff2":[],"application/geo+json":["geojson"],"application/gml+xml":["gml"],"application/gpx+xml":["gpx"],"application/gxf":["gxf"],"application/gzip":["gz"],"application/hyperstudio":["stk"],"application/inkml+xml":["ink","inkml"],"application/ipfix":["ipfix"],"application/java-archive":["jar","war","ear"],"application/java-serialized-object":["ser"],"application/java-vm":["class"],"application/javascript":["js","mjs"],"application/json":["json","map"],"application/json5":["json5"],"application/jsonml+json":["jsonml"],"application/ld+json":["jsonld"],"application/lost+xml":["lostxml"],"application/mac-binhex40":["hqx"],"application/mac-compactpro":["cpt"],"application/mads+xml":["mads"],"application/manifest+json":["webmanifest"],"application/marc":["mrc"],"application/marcxml+xml":["mrcx"],"applicat
|
|||
|
/*!
|
|||
|
* range-parser
|
|||
|
* Copyright(c) 2012-2014 TJ Holowaychuk
|
|||
|
* Copyright(c) 2015-2016 Douglas Christopher Wilson
|
|||
|
* MIT Licensed
|
|||
|
*/function Dr(e,a){return{start:e.start,end:e.end,index:a}}function Mr(e){return{start:e.start,end:e.end}}function Hr(e,a){return e.index-a.index}function $r(e,a){return e.start-a.start}
|
|||
|
/*!
|
|||
|
* send
|
|||
|
* Copyright(c) 2012 TJ Holowaychuk
|
|||
|
* Copyright(c) 2014-2022 Douglas Christopher Wilson
|
|||
|
* MIT Licensed
|
|||
|
*/var Gr=Y,Wr=yr("send"),Zr=E("send"),Vr=Te,Jr=to,Qr=po,Xr=Cr,Yr=Ir,Kr=t,ec=Fr,ac=e.m,nc=_a,ic=Rr,tc=a,oc=ne,sc=r,rc=i,cc=tc.extname,pc=tc.join,lc=tc.normalize,uc=tc.resolve,dc=tc.sep,mc=/^ *bytes=/,fc=31536e6,vc=/(?:^|[\\/])\.\.(?:[\\/]|$)/;function xc(e,a,n){sc.call(this);var i=n||{};if(this.options=i,this.path=a,this.req=e,this._acceptRanges=void 0===i.acceptRanges||Boolean(i.acceptRanges),this._cacheControl=void 0===i.cacheControl||Boolean(i.cacheControl),this._etag=void 0===i.etag||Boolean(i.etag),this._dotfiles=void 0!==i.dotfiles?i.dotfiles:"ignore","ignore"!==this._dotfiles&&"allow"!==this._dotfiles&&"deny"!==this._dotfiles)throw new TypeError('dotfiles option must be "allow", "deny", or "ignore"');this._hidden=Boolean(i.hidden),void 0!==i.hidden&&Zr("hidden: use dotfiles: '"+(this._hidden?"allow":"ignore")+"' instead"),void 0===i.dotfiles&&(this._dotfiles=void 0),this._extensions=void 0!==i.extensions?yc(i.extensions,"extensions option"):[],this._immutable=void 0!==i.immutable&&Boolean(i.immutable),this._index=void 0!==i.index?yc(i.index,"index option"):["index.html"],this._lastModified=void 0===i.lastModified||Boolean(i.lastModified),this._maxage=i.maxAge||i.maxage,this._maxage="string"==typeof this._maxage?ac(this._maxage):Number(this._maxage),this._maxage=isNaN(this._maxage)?0:Math.min(Math.max(0,this._maxage),fc),this._root=i.root?uc(i.root):null,!this._root&&i.from&&this.from(i.from)}function hc(e,a,n){return e+" "+(n?n.start+"-"+n.end:"*")+"/"+a}function bc(e,a){return'<!DOCTYPE html>\n<html lang="en">\n<head>\n<meta charset="utf-8">\n<title>'+e+"</title>\n</head>\n<body>\n<pre>"+a+"</pre>\n</body>\n</html>\n"}function gc(e,a){return("function"!=typeof e.listenerCount?e.listeners(a).length:e.listenerCount(a))>0}function yc(e,a){for(var n=[].concat(e||[]),i=0;i<n.length;i++)if("string"!=typeof n[i])throw new TypeError(a+" must be array of strings or false");return n}function wc(e){var a=e&&Date.parse(e);return"number"==typeof a?a:NaN}gr.exports=function(e,a,n){return new xc(e,a,n)},br.mime=ec,rc.inherits(xc,sc),xc.prototype.etag=Zr.function((function(e){return this._etag=Boolean(e),Wr("etag %s",this._etag),this}),"send.etag: pass etag as option"),xc.prototype.hidden=Zr.function((function(e){return this._hidden=Boolean(e),this._dotfiles=void 0,Wr("hidden %s",this._hidden),this}),"send.hidden: use dotfiles option"),xc.prototype.index=Zr.function((function(e){var a=e?yc(e,"paths argument"):[];return Wr("index %o",e),this._index=a,this}),"send.index: pass index as option"),xc.prototype.root=function(e){return this._root=uc(String(e)),Wr("root %s",this._root),this},xc.prototype.from=Zr.function(xc.prototype.root,"send.from: pass root as option"),xc.prototype.root=Zr.function(xc.prototype.root,"send.root: pass root as option"),xc.prototype.maxage=Zr.function((function(e){return this._maxage="string"==typeof e?ac(e):Number(e),this._maxage=isNaN(this._maxage)?0:Math.min(Math.max(0,this._maxage),fc),Wr("max-age %d",this._maxage),this}),"send.maxage: pass maxAge as option"),xc.prototype.error=function(e,a){if(gc(this,"error"))return this.emit("error",function(e,a){return a?a instanceof Error?Gr(e,a,{expose:!1}):Gr(e,a):Gr(e)}(e,a));var n=this.res,i=oc.message[e]||String(e),t=bc("Error",Qr(i));!function(e){for(var a=function(e){return"function"!=typeof e.getHeaderNames?Object.keys(e._headers||{}):e.getHeaderNames()}(e),n=0;n<a.length;n++)e.removeHeader(a[n])}(n),a&&a.headers&&function(e,a){for(var n=Object.keys(a),i=0;i<n.length;i++){var t=n[i];e.setHeader(t,a[t])}}(n,a.headers),n.statusCode=e,n.setHeader("Content-Type","text/html; charset=UTF-8"),n.setHeader("Content-Length",Buffer.byteLength(t)),n.setHeader("Content-Security-Policy","default-src 'none'"),n.setHeader("X-Content-Type-Options","nosniff"),n.end(t)},xc.prototype.hasTrailingSlash=function(){return"/"===this.path[this.path.length-1]},xc.prototype.isConditionalGET=function(){return this.req.headers["if-match"]||this.req.headers["if-unmodified-since"]||this.req.headers["if-none-match"]||this.req.headers["if-modified-since"]},xc.prototype.isPreconditionFail
|
|||
|
/*!
|
|||
|
* proxy-addr
|
|||
|
* Copyright(c) 2014-2016 Douglas Christopher Wilson
|
|||
|
* MIT Licensed
|
|||
|
*/
|
|||
|
jc.exports=function(e,a){if(!e)throw new TypeError("req argument is required");if(!a)throw new TypeError("trust argument is required");var n=qc(e,a);return n[n.length-1]},kc.all=qc,kc.compile=zc;var Sc=function(e){if(!e)throw new TypeError("argument req is required");var a=function(e){for(var a=e.length,n=[],i=e.length,t=e.length-1;t>=0;t--)switch(e.charCodeAt(t)){case 32:i===a&&(i=a=t);break;case 44:i!==a&&n.push(e.substring(i,a)),i=a=t;break;default:i=t}return i!==a&&n.push(e.substring(i,a)),n}(e.headers["x-forwarded-for"]||""),n=function(e){return e.socket?e.socket.remoteAddress:e.connection.remoteAddress}(e);return[n].concat(a)},Ac=Ec,Oc=/^[0-9]+$/,_c=Ac.isValid,Cc=Ac.parse,Tc={linklocal:["169.254.0.0/16","fe80::/10"],loopback:["127.0.0.1/8","::1/128"],uniquelocal:["10.0.0.0/8","172.16.0.0/12","192.168.0.0/16","fc00::/7"]};function qc(e,a){var n=Sc(e);if(!a)return n;"function"!=typeof a&&(a=zc(a));for(var i=0;i<n.length-1;i++)a(n[i],i)||(n.length=i+1);return n}function zc(e){if(!e)throw new TypeError("argument is required");var a,n,i,t,o,s,r,c,p;if("string"==typeof e)a=[e];else{if(!Array.isArray(e))throw new TypeError("unsupported trust argument");a=e.slice()}for(var l=0;l<a.length;l++)e=a[l],Object.prototype.hasOwnProperty.call(Tc,e)&&(e=Tc[e],a.splice.apply(a,[l,1].concat(e)),l+=e.length-1);return n=function(e){for(var a=new Array(e.length),n=0;n<e.length;n++)a[n]=Pc(e[n]);return a}(a),0===(i=n.length)?Ic:1===i?(o=n[0],s=o[0],r=s.kind(),c="ipv4"===r,p=o[1],function(e){if(!_c(e))return!1;var a=Cc(e);if(a.kind()!==r){if(c&&!a.isIPv4MappedAddress())return!1;a=c?a.toIPv4Address():a.toIPv4MappedAddress()}return a.match(s,p)}):(t=n,function(e){if(!_c(e))return!1;for(var a,n=Cc(e),i=n.kind(),o=0;o<t.length;o++){var s=t[o],r=s[0],c=r.kind(),p=s[1],l=n;if(i!==c){if("ipv4"===c&&!n.isIPv4MappedAddress())continue;a||(a="ipv4"===c?n.toIPv4Address():n.toIPv4MappedAddress()),l=a}if(l.match(r,p))return!0}return!1})}function Pc(e){var a=e.lastIndexOf("/"),n=-1!==a?e.substring(0,a):e;if(!_c(n))throw new TypeError("invalid IP address: "+n);var i=Cc(n);-1===a&&"ipv6"===i.kind()&&i.isIPv4MappedAddress()&&(i=i.toIPv4Address());var t="ipv6"===i.kind()?128:32,o=-1!==a?e.substring(a+1,e.length):null;if((o=null===o?t:Oc.test(o)?parseInt(o,10):"ipv4"===i.kind()&&_c(o)?function(e){var a=Cc(e);return"ipv4"===a.kind()?a.prefixLengthFromSubnetMask():null}(o):null)<=0||o>t)throw new TypeError("invalid range on address: "+e);return[i,o]}function Ic(){return!1}
|
|||
|
/*!
|
|||
|
* express
|
|||
|
* Copyright(c) 2009-2013 TJ Holowaychuk
|
|||
|
* Copyright(c) 2014-2015 Douglas Christopher Wilson
|
|||
|
* MIT Licensed
|
|||
|
*/
|
|||
|
!function(e){var a=Ws.Buffer,n=Zs,i=H,t=E("express"),o=Zo,s=br.mime,r=Cr,c=kc,p=Ft,l=u;function d(e){return function(n,i){var t=a.isBuffer(n)?n:a.from(n,i);return r(t,e)}}function m(e){return p.parse(e,{allowPrototypes:!0})}function f(){return{}}e.etag=d({weak:!1}),e.wetag=d({weak:!0}),e.isAbsolute=function(e){return"/"===e[0]||":"===e[1]&&("\\"===e[2]||"/"===e[2])||"\\\\"===e.substring(0,2)||void 0},e.flatten=t.function(o,"utils.flatten: use array-flatten npm module instead"),e.normalizeType=function(e){return~e.indexOf("/")?function(e,a){for(var n=e.split(/ *; */),i={value:n[0],quality:1,params:{},originalIndex:void 0},t=1;t<n.length;++t){var o=n[t].split(/ *= */);"q"===o[0]?i.quality=parseFloat(o[1]):i.params[o[0]]=o[1]}return i}(e):{value:s.lookup(e),params:{}}},e.normalizeTypes=function(a){for(var n=[],i=0;i<a.length;++i)n.push(e.normalizeType(a[i]));return n},e.contentDisposition=t.function(n,"utils.contentDisposition: use content-disposition npm module instead"),e.compileETag=function(a){var n;if("function"==typeof a)return a;switch(a){case!0:case"weak":n=e.wetag;break;case!1:break;case"strong":n=e.etag;break;default:throw new TypeError("unknown value for etag function: "+a)}return n},e.compileQueryParser=function(e){var a;if("function"==typeof e)return e;switch(e){case!0:case"simple":a=l.parse;break;case!1:a=f;break;case"extended":a=m;break;default:throw new TypeError("unknown value for query parser function: "+e)}return a},e.compileTrust=function(e){return"function"==typeof e?e:!0===e?function(){return!0}:"number"==typeof e?function(a,n){return n<e}:("string"==typeof e&&(e=e.split(",").map((function(e){return e.trim()}))),c.compile(e||[]))},e.setCharset=function(e,a){if(!e||!a)return e;var n=i.parse(e);return n.parameters.charset=a,i.format(n)}}(Gs),
|
|||
|
/*!
|
|||
|
* express
|
|||
|
* Copyright(c) 2009-2013 TJ Holowaychuk
|
|||
|
* Copyright(c) 2013 Roman Shtylman
|
|||
|
* Copyright(c) 2014-2015 Douglas Christopher Wilson
|
|||
|
* MIT Licensed
|
|||
|
*/
|
|||
|
function(e,n){var i=To,t=No,o=ts,s=qs,r=Ps(),c=Uo("express:application"),p=Ms,l=m,u=Gs.compileETag,d=Gs.compileQueryParser,f=Gs.compileTrust,v=E("express"),x=Zo,h=ms,b=a.resolve,g=ee,y=Object.prototype.hasOwnProperty,w=Array.prototype.slice,k=e.exports={},j="@@symbol:trust_proxy_default";function S(e){"test"!==this.get("env")&&console.error(e.stack||e.toString())}k.init=function(){this.cache={},this.engines={},this.settings={},this.defaultConfiguration()},k.defaultConfiguration=function(){var e="production";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,j,{configurable:!0,value:!0}),c("booting in %s mode",e),this.on("mount",(function(e){!0===this.settings[j]&&"function"==typeof e.settings["trust proxy fn"]&&(delete this.settings["trust proxy"],delete this.settings["trust proxy fn"]),g(this.request,e.request),g(this.response,e.response),g(this.engines,e.engines),g(this.settings,e.settings)})),this.locals=Object.create(null),this.mountpath="/",this.locals.settings=this.settings,this.set("view",p),this.set("views",b("views")),this.set("jsonp callback name","callback"),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.")}})},k.lazyrouter=function(){this._router||(this._router=new t({caseSensitive:this.enabled("case sensitive routing"),strict:this.enabled("strict routing")}),this._router.use(r(this.get("query parser fn"))),this._router.use(s.init(this)))},k.handle=function(e,a,n){var t=this._router,o=n||i(e,a,{env:this.get("env"),onerror:S.bind(this)});if(!t)return c("no routes defined on app"),void o();t.handle(e,a,o)},k.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 t=x(w.call(arguments,a));if(0===t.length)throw new TypeError("app.use() requires a middleware function");this.lazyrouter();var o=this._router;return t.forEach((function(e){if(!e||!e.handle||!e.set)return o.use(n,e);c(".use app under %s",n),e.mountpath=n,e.parent=this,o.use(n,(function(a,n,i){var t=a.app;e.handle(a,n,(function(e){g(a,t.request),g(n,t.response),i(e)}))})),e.emit("mount",this)}),this),this},k.route=function(e){return this.lazyrouter(),this._router.route(e)},k.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},k.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},k.set=function(e,a){if(1!==arguments.length){switch(c('set "%s" to %o',e,a),this.settings[e]=a,e){case"etag":this.set("etag fn",u(a));break;case"query parser":this.set("query parser fn",d(a));break;case"trust proxy":this.set("trust proxy fn",f(a)),Object.defineProperty(this.settings,j,{configurable:!0,value:!1})}return this}for(var n=this.settings;n&&n!==Object.prototype;){if(y.call(n,e))return n[e];n=Object.getPrototypeOf(n)}},k.path=function(){return this.parent?this.parent.path()+this.mountpath:""},k.enabled=function(e){return Boolean(this.set(e))},k.disabled=function(e){return!this.set(e)},k.enable=function(e){return this.set(e,!0)},k.disable=function(e){return this.set(e,!1)},o.forEach((function(e){k[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,w.call(arguments,1)),this}})),k.all=function(e){this.lazyrouter();for(var a=this._router.route(e),n=w.call(arguments,1),i=0;i<o.length;i++)a[o[i]].apply(a,n);return this},k.del=v.function(k.delete,"app.del: Use app.delete instead"),k.render=function(e,a,n){var i,t=this.cache,o=n,s=this.engines,r=a,c={};if("function"==typeof a&&(o=a,r={}),h(c,this.locals),r._locals&&h(c,r._locals),h(c,r),null==c.cache&&(c.cache=this.enabled("view cache")),c.cache&&(i=t[e]),!i){if(!(i=n
|
|||
|
/*!
|
|||
|
* negotiator
|
|||
|
* Copyright(c) 2012 Federico Romero
|
|||
|
* Copyright(c) 2012-2014 Isaac Z. Schlueter
|
|||
|
* Copyright(c) 2015 Douglas Christopher Wilson
|
|||
|
* MIT Licensed
|
|||
|
*/(n[3]).map(xp),c=0;c<r.length;c++){var p=r[c],l=p[0].toLowerCase(),u=p[1],d=u&&'"'===u[0]&&'"'===u[u.length-1]?u.substr(1,u.length-2):u;if("q"===l){t=parseFloat(d);break}i[l]=d}return{type:s,subtype:o,params:i,q:t,i:a}}function lp(e,a,n){var i=pp(e),t=0;if(!i)return null;if(a.type.toLowerCase()==i.type.toLowerCase())t|=4;else if("*"!=a.type)return null;if(a.subtype.toLowerCase()==i.subtype.toLowerCase())t|=2;else if("*"!=a.subtype)return null;var o=Object.keys(a.params);if(o.length>0){if(!o.every((function(e){return"*"==a.params[e]||(a.params[e]||"").toLowerCase()==(i.params[e]||"").toLowerCase()})))return null;t|=1}return{i:n,o:a.i,q:a.q,s:t}}function up(e,a){var n=function(e){for(var a=function(e){for(var a=e.split(","),n=1,i=0;n<a.length;n++)vp(a[i])%2==0?a[++i]=a[n]:a[i]+=","+a[n];return a.length=i+1,a}(e),n=0,i=0;n<a.length;n++){var t=pp(a[n].trim(),n);t&&(a[i++]=t)}return a.length=i,a}(void 0===e?"*/*":e||"");if(!a)return n.filter(fp).sort(dp).map(mp);var i=a.map((function(e,a){return function(e,a,n){for(var i={o:-1,q:0,s:0},t=0;t<a.length;t++){var o=lp(e,a[t],n);o&&(i.s-o.s||i.q-o.q||i.o-o.o)<0&&(i=o)}return i}(e,n,a)}));return i.filter(fp).sort(dp).map((function(e){return a[i.indexOf(e)]}))}function dp(e,a){return a.q-e.q||a.s-e.s||e.o-a.o||e.i-a.i||0}function mp(e){return e.type+"/"+e.subtype}function fp(e){return e.q>0}function vp(e){for(var a=0,n=0;-1!==(n=e.indexOf('"',n));)a++,n++;return a}function xp(e){var a,n,i=e.indexOf("=");return-1===i?a=e:(a=e.substr(0,i),n=e.substr(i+1)),[a,n]}var hp=Lc,bp=Gc,gp=Kc,yp=rp;function wp(e){if(!(this instanceof wp))return new wp(e);this.request=e}Nc.exports=wp,Bc.Negotiator=wp,wp.prototype.charset=function(e){var a=this.charsets(e);return a&&a[0]},wp.prototype.charsets=function(e){return hp(this.request.headers["accept-charset"],e)},wp.prototype.encoding=function(e){var a=this.encodings(e);return a&&a[0]},wp.prototype.encodings=function(e){return bp(this.request.headers["accept-encoding"],e)},wp.prototype.language=function(e){var a=this.languages(e);return a&&a[0]},wp.prototype.languages=function(e){return gp(this.request.headers["accept-language"],e)},wp.prototype.mediaType=function(e){var a=this.mediaTypes(e);return a&&a[0]},wp.prototype.mediaTypes=function(e){return yp(this.request.headers.accept,e)},wp.prototype.preferredCharset=wp.prototype.charset,wp.prototype.preferredCharsets=wp.prototype.charsets,wp.prototype.preferredEncoding=wp.prototype.encoding,wp.prototype.preferredEncodings=wp.prototype.encodings,wp.prototype.preferredLanguage=wp.prototype.language,wp.prototype.preferredLanguages=wp.prototype.languages,wp.prototype.preferredMediaType=wp.prototype.mediaType,wp.prototype.preferredMediaTypes=wp.prototype.mediaTypes;
|
|||
|
/*!
|
|||
|
* accepts
|
|||
|
* Copyright(c) 2014 Jonathan Ong
|
|||
|
* Copyright(c) 2015 Douglas Christopher Wilson
|
|||
|
* MIT Licensed
|
|||
|
*/
|
|||
|
var kp=Bc,jp=Ja,Ep=Sp;function Sp(e){if(!(this instanceof Sp))return new Sp(e);this.headers=e.headers,this.negotiator=new kp(e)}function Ap(e){return-1===e.indexOf("/")?jp.lookup(e):e}function Op(e){return"string"==typeof e}
|
|||
|
/*!
|
|||
|
* express
|
|||
|
* Copyright(c) 2009-2013 TJ Holowaychuk
|
|||
|
* Copyright(c) 2013 Roman Shtylman
|
|||
|
* Copyright(c) 2014-2015 Douglas Christopher Wilson
|
|||
|
* MIT Licensed
|
|||
|
*/Sp.prototype.type=Sp.prototype.types=function(e){var a=e;if(a&&!Array.isArray(a)){a=new Array(arguments.length);for(var n=0;n<a.length;n++)a[n]=arguments[n]}if(!a||0===a.length)return this.negotiator.mediaTypes();if(!this.headers.accept)return a[0];var i=a.map(Ap),t=this.negotiator.mediaTypes(i.filter(Op))[0];return!!t&&a[i.indexOf(t)]},Sp.prototype.encoding=Sp.prototype.encodings=function(e){var a=e;if(a&&!Array.isArray(a)){a=new Array(arguments.length);for(var n=0;n<a.length;n++)a[n]=arguments[n]}return a&&0!==a.length?this.negotiator.encodings(a)[0]||!1:this.negotiator.encodings()},Sp.prototype.charset=Sp.prototype.charsets=function(e){var a=e;if(a&&!Array.isArray(a)){a=new Array(arguments.length);for(var n=0;n<a.length;n++)a[n]=arguments[n]}return a&&0!==a.length?this.negotiator.charsets(a)[0]||!1:this.negotiator.charsets()},Sp.prototype.lang=Sp.prototype.langs=Sp.prototype.language=Sp.prototype.languages=function(e){var a=e;if(a&&!Array.isArray(a)){a=new Array(arguments.length);for(var n=0;n<a.length;n++)a[n]=arguments[n]}return a&&0!==a.length?this.negotiator.languages(a)[0]||!1:this.negotiator.languages()};var _p=Ep,Cp=E("express"),Tp=o.isIP,qp=La,zp=m,Pp=Ir,Ip=Rr,Bp=lo,Np=kc,Lp=Object.create(zp.IncomingMessage.prototype),Up=Lp;function Fp(e,a,n){Object.defineProperty(e,a,{configurable:!0,enumerable:!0,get:n})}Lp.get=Lp.header=function(e){if(!e)throw new TypeError("name argument is required to req.get");if("string"!=typeof e)throw new TypeError("name must be a string to req.get");var a=e.toLowerCase();switch(a){case"referer":case"referrer":return this.headers.referrer||this.headers.referer;default:return this.headers[a]}},Lp.accepts=function(){var e=_p(this);return e.types.apply(e,arguments)},Lp.acceptsEncodings=function(){var e=_p(this);return e.encodings.apply(e,arguments)},Lp.acceptsEncoding=Cp.function(Lp.acceptsEncodings,"req.acceptsEncoding: Use acceptsEncodings instead"),Lp.acceptsCharsets=function(){var e=_p(this);return e.charsets.apply(e,arguments)},Lp.acceptsCharset=Cp.function(Lp.acceptsCharsets,"req.acceptsCharset: Use acceptsCharsets instead"),Lp.acceptsLanguages=function(){var e=_p(this);return e.languages.apply(e,arguments)},Lp.acceptsLanguage=Cp.function(Lp.acceptsLanguages,"req.acceptsLanguage: Use acceptsLanguages instead"),Lp.range=function(e,a){var n=this.get("Range");if(n)return Ip(e,n,a)},Lp.param=function(e,a){var n=this.params||{},i=this.body||{},t=this.query||{};return Cp("req.param("+(1===arguments.length?"name":"name, default")+"): Use req.params, req.body, or req.query instead"),null!=n[e]&&n.hasOwnProperty(e)?n[e]:null!=i[e]?i[e]:null!=t[e]?t[e]:a},Lp.is=function(e){var a=e;if(!Array.isArray(e)){a=new Array(arguments.length);for(var n=0;n<a.length;n++)a[n]=arguments[n]}return qp(this,a)},Fp(Lp,"protocol",(function(){var e=this.connection.encrypted?"https":"http";if(!this.app.get("trust proxy fn")(this.connection.remoteAddress,0))return e;var a=this.get("X-Forwarded-Proto")||e,n=a.indexOf(",");return-1!==n?a.substring(0,n).trim():a.trim()})),Fp(Lp,"secure",(function(){return"https"===this.protocol})),Fp(Lp,"ip",(function(){var e=this.app.get("trust proxy fn");return Np(this,e)})),Fp(Lp,"ips",(function(){var e=this.app.get("trust proxy fn"),a=Np.all(this,e);return a.reverse().pop(),a})),Fp(Lp,"subdomains",(function(){var e=this.hostname;if(!e)return[];var a=this.app.get("subdomain offset");return(Tp(e)?[e]:e.split(".").reverse()).slice(a)})),Fp(Lp,"path",(function(){return Bp(this).pathname})),Fp(Lp,"hostname",(function(){var e=this.app.get("trust proxy fn"),a=this.get("X-Forwarded-Host");if(a&&e(this.connection.remoteAddress,0)?-1!==a.indexOf(",")&&(a=a.substring(0,a.indexOf(",")).trimRight()):a=this.get("Host"),a){var n="["===a[0]?a.indexOf("]")+1:0,i=a.indexOf(":",n);return-1!==i?a.substring(0,i):a}})),Fp(Lp,"host",Cp.function((function(){return this.hostname}),"req.host: Use req.hostname instead")),Fp(Lp,"fresh",(function(){var e=this.method,a=this.res,n=a.statusCode;return("GET"===e||"HEAD"===e)&&(n>=200&&n<300||304===n)&&Pp(this.headers,{etag:a.get("ETag"),"last-modified":a.ge
|
|||
|
/*!
|
|||
|
* cookie
|
|||
|
* Copyright(c) 2012-2014 Roman Shtylman
|
|||
|
* Copyright(c) 2015 Douglas Christopher Wilson
|
|||
|
* MIT Licensed
|
|||
|
*/
|
|||
|
parse:function(e,a){if("string"!=typeof e)throw new TypeError("argument str must be a string");for(var n={},i=(a||{}).decode||$p,t=0;t<e.length;){var o=e.indexOf("=",t);if(-1===o)break;var s=e.indexOf(";",t);if(-1===s)s=e.length;else if(s<o){t=e.lastIndexOf(";",o-1)+1;continue}var r=e.slice(t,o).trim();if(void 0===n[r]){var c=e.slice(o+1,s).trim();34===c.charCodeAt(0)&&(c=c.slice(1,-1)),n[r]=Wp(c,i)}t=s+1}return n},serialize:function(e,a,n){var i=n||{},t=i.encode||Gp;if("function"!=typeof t)throw new TypeError("option encode is invalid");if(!Hp.test(e))throw new TypeError("argument name is invalid");var o=t(a);if(o&&!Hp.test(o))throw new TypeError("argument val is invalid");var s=e+"="+o;if(null!=i.maxAge){var r=i.maxAge-0;if(isNaN(r)||!isFinite(r))throw new TypeError("option maxAge is invalid");s+="; Max-Age="+Math.floor(r)}if(i.domain){if(!Hp.test(i.domain))throw new TypeError("option domain is invalid");s+="; Domain="+i.domain}if(i.path){if(!Hp.test(i.path))throw new TypeError("option path is invalid");s+="; Path="+i.path}if(i.expires){var c=i.expires;if(!function(e){return"[object Date]"===Mp.call(e)||e instanceof Date}(c)||isNaN(c.valueOf()))throw new TypeError("option expires is invalid");s+="; Expires="+c.toUTCString()}if(i.httpOnly&&(s+="; HttpOnly"),i.secure&&(s+="; Secure"),i.priority)switch("string"==typeof i.priority?i.priority.toLowerCase():i.priority){case"low":s+="; Priority=Low";break;case"medium":s+="; Priority=Medium";break;case"high":s+="; Priority=High";break;default:throw new TypeError("option priority is invalid")}if(i.sameSite)switch("string"==typeof i.sameSite?i.sameSite.toLowerCase():i.sameSite){case!0:s+="; SameSite=Strict";break;case"lax":s+="; SameSite=Lax";break;case"strict":s+="; SameSite=Strict";break;case"none":s+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return s}},Mp=Object.prototype.toString,Hp=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function $p(e){return-1!==e.indexOf("%")?decodeURIComponent(e):e}function Gp(e){return encodeURIComponent(e)}function Wp(e,a){try{return a(e)}catch(a){return e}}var Zp={};
|
|||
|
/*!
|
|||
|
* vary
|
|||
|
* Copyright(c) 2014-2017 Douglas Christopher Wilson
|
|||
|
* MIT Licensed
|
|||
|
*/
|
|||
|
({get exports(){return Zp},set exports(e){Zp=e}}).exports=function(e,a){if(!e||!e.getHeader||!e.setHeader)throw new TypeError("res argument is required");var n=e.getHeader("Vary")||"",i=Array.isArray(n)?n.join(", "):String(n);(n=Jp(i,a))&&e.setHeader("Vary",n)}
|
|||
|
/*!
|
|||
|
* express
|
|||
|
* Copyright(c) 2009-2013 TJ Holowaychuk
|
|||
|
* Copyright(c) 2014-2015 Douglas Christopher Wilson
|
|||
|
* MIT Licensed
|
|||
|
*/,Zp.append=Jp;var Vp=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/;function Jp(e,a){if("string"!=typeof e)throw new TypeError("header argument is required");if(!a)throw new TypeError("field argument is required");for(var n=Array.isArray(a)?a:Qp(String(a)),i=0;i<n.length;i++)if(!Vp.test(n[i]))throw new TypeError("field argument contains an invalid header name");if("*"===e)return e;var t=e,o=Qp(e.toLowerCase());if(-1!==n.indexOf("*")||-1!==o.indexOf("*"))return"*";for(var s=0;s<n.length;s++){var r=n[s].toLowerCase();-1===o.indexOf(r)&&(o.push(r),t=t?t+", "+n[s]:n[s])}return t}function Qp(e){for(var a=0,n=[],i=0,t=0,o=e.length;t<o;t++)switch(e.charCodeAt(t)){case 32:i===a&&(i=a=t+1);break;case 44:n.push(e.substring(i,a)),i=a=t+1;break;default:a=t+1}return n.push(e.substring(i,a)),n}var Xp=Ws.Buffer,Yp=Zs,Kp=Y,el=E("express"),al=to,nl=po,il=m,tl=Gs.isAbsolute,ol=_a,sl=a,rl=ne,cl=ms,pl=Rp.sign,ll=Gs.normalizeType,ul=Gs.normalizeTypes,dl=Gs.setCharset,ml=Dp,fl=br,vl=sl.extname,xl=fl.mime,hl=sl.resolve,bl=Zp,gl=Object.create(il.ServerResponse.prototype),yl=gl,wl=/;\s*charset\s*=/;function kl(e,a,n,i){var t,o=!1;function s(){if(!o){o=!0;var e=new Error("Request aborted");e.code="ECONNABORTED",i(e)}}function r(e){o||(o=!0,i(e))}a.on("directory",(function(){if(!o){o=!0;var e=new Error("EISDIR, read");e.code="EISDIR",i(e)}})),a.on("end",(function(){o||(o=!0,i())})),a.on("error",r),a.on("file",(function(){t=!1})),a.on("stream",(function(){t=!0})),ol(e,(function(e){return e&&"ECONNRESET"===e.code?s():e?r(e):void(o||setImmediate((function(){!1===t||o?o||(o=!0,i()):s()})))})),n.headers&&a.on("headers",(function(e){for(var a=n.headers,i=Object.keys(a),t=0;t<i.length;t++){var o=i[t];e.setHeader(o,a[o])}})),a.pipe(e)}function jl(e,a,n,i){var t=a||n?JSON.stringify(e,a,n):JSON.stringify(e);return i&&"string"==typeof t&&(t=t.replace(/[<>&]/g,(function(e){switch(e.charCodeAt(0)){case 60:return"\\u003c";case 62:return"\\u003e";case 38:return"\\u0026";default:return e}}))),t}gl.status=function(e){return("string"==typeof e||Math.floor(e)!==e)&&e>99&&e<1e3&&el("res.status("+JSON.stringify(e)+"): use res.status("+Math.floor(e)+") instead"),this.statusCode=e,this},gl.links=function(e){var a=this.get("Link")||"";return a&&(a+=", "),this.set("Link",a+Object.keys(e).map((function(a){return"<"+e[a]+'>; rel="'+a+'"'})).join(", "))},gl.send=function(e){var a,n,i=e,t=this.req,o=this.app;switch(2===arguments.length&&("number"!=typeof arguments[0]&&"number"==typeof arguments[1]?(el("res.send(body, status): Use res.status(status).send(body) instead"),this.statusCode=arguments[1]):(el("res.send(status, body): Use res.status(status).send(body) instead"),this.statusCode=arguments[0],i=arguments[1])),"number"==typeof i&&1===arguments.length&&(this.get("Content-Type")||this.type("txt"),el("res.send(status): Use res.sendStatus(status) instead"),this.statusCode=i,i=rl.message[i]),typeof i){case"string":this.get("Content-Type")||this.type("html");break;case"boolean":case"number":case"object":if(null===i)i="";else{if(!Xp.isBuffer(i))return this.json(i);this.get("Content-Type")||this.type("bin")}}"string"==typeof i&&(a="utf8","string"==typeof(n=this.get("Content-Type"))&&this.set("Content-Type",dl(n,"utf-8")));var s,r,c=o.get("etag fn"),p=!this.get("ETag")&&"function"==typeof c;return void 0!==i&&(Xp.isBuffer(i)?s=i.length:!p&&i.length<1e3?s=Xp.byteLength(i,a):(i=Xp.from(i,a),a=void 0,s=i.length),this.set("Content-Length",s)),p&&void 0!==s&&(r=c(i,a))&&this.set("ETag",r),t.fresh&&(this.statusCode=304),204!==this.statusCode&&304!==this.statusCode||(this.removeHeader("Content-Type"),this.removeHeader("Content-Length"),this.removeHeader("Transfer-Encoding"),i=""),205===this.statusCode&&(this.set("Content-Length","0"),this.removeHeader("Transfer-Encoding"),i=""),"HEAD"===t.method?this.end():this.end(i,a),this},gl.json=function(e){var a=e;2===arguments.length&&("number"==typeof arguments[1]?(el("res.json(obj, status): Use res.status(status).json(obj) instead"),this.statusCode=arguments[1]):(el("res.json(status, obj): Use res.status(status).json(obj) instead"),this.statusCode=argume
|
|||
|
/*!
|
|||
|
* express
|
|||
|
* Copyright(c) 2009-2013 TJ Holowaychuk
|
|||
|
* Copyright(c) 2013 Roman Shtylman
|
|||
|
* Copyright(c) 2014-2015 Douglas Christopher Wilson
|
|||
|
* MIT Licensed
|
|||
|
*/
|
|||
|
!function(e,n){var i=w,t=s.EventEmitter,o=$t,r=Wt,c=us,p=No,l=Up,u=yl;(n=e.exports=function(){var e=function(a,n,i){e.handle(a,n,i)};return o(e,t.prototype,!1),o(e,r,!1),e.request=Object.create(l,{app:{configurable:!0,enumerable:!0,writable:!0,value:e}}),e.response=Object.create(u,{app:{configurable:!0,enumerable:!0,writable:!0,value:e}}),e.init(),e}).application=r,n.request=l,n.response=u,n.Route=c,n.Router=p,n.json=i.json,n.query=Ps(),n.raw=i.raw,n.static=function(){if(El)return Sl;El=1;var e=to,n=po,i=lo,t=a.resolve,o=br,s=d;return Al.exports=function(a,r){if(!a)throw new TypeError("root path required");if("string"!=typeof a)throw new TypeError("root path must be a string");var c=Object.create(r||null),p=!1!==c.fallthrough,l=!1!==c.redirect,u=c.setHeaders;if(u&&"function"!=typeof u)throw new TypeError("option setHeaders must be function");c.maxage=c.maxage||c.maxAge||0,c.root=t(a);var d=l?function(a){if(this.hasTrailingSlash())this.error(404);else{var t=i.original(this.req);t.path=null,t.pathname=function(e){for(var a=0;a<e.length&&47===e.charCodeAt(a);a++);return a>1?"/"+e.substr(a):e}(t.pathname+"/");var o=e(s.format(t)),r='<!DOCTYPE html>\n<html lang="en">\n<head>\n<meta charset="utf-8">\n<title>Redirecting</title>\n</head>\n<body>\n<pre>Redirecting to <a href="'+n(o)+'">'+n(o)+"</a></pre>\n</body>\n</html>\n";a.statusCode=301,a.setHeader("Content-Type","text/html; charset=UTF-8"),a.setHeader("Content-Length",Buffer.byteLength(r)),a.setHeader("Content-Security-Policy","default-src 'none'"),a.setHeader("X-Content-Type-Options","nosniff"),a.setHeader("Location",o),a.end(r)}}:function(){this.error(404)};return function(e,a,n){if("GET"!==e.method&&"HEAD"!==e.method)return p?n():(a.statusCode=405,a.setHeader("Allow","GET, HEAD"),a.setHeader("Content-Length","0"),void a.end());var t=!p,s=i.original(e),r=i(e).pathname;"/"===r&&"/"!==s.pathname.substr(-1)&&(r="");var l=o(e,r,c);l.on("directory",d),u&&l.on("headers",u),p&&l.on("file",(function(){t=!0})),l.on("error",(function(e){!t&&e.statusCode<500?n():n(e)})),l.pipe(a)}},Sl.mime=o.mime,Sl}(),n.text=i.text,n.urlencoded=i.urlencoded,["bodyParser","compress","cookieSession","session","logger","cookieParser","favicon","responseTime","errorHandler","timeout","methodOverride","vhost","csrf","directory","limit","multipart","staticCache"].forEach((function(e){Object.defineProperty(n,e,{get:function(){throw new Error("Most middleware (like "+e+") is no longer bundled with Express and must be installed separately. Please see https://github.com/senchalabs/connect#middleware.")},configurable:!0})}))}(y,g),b.exports=g;var Ol=x({__proto__:null,default:e.g(h)},[h]);exports.i=Ol;
|