@umijs/deps
Version:
[](https://packagephobia.now.sh/result?p=@umijs/deps)
1 lines • 588 kB
JavaScript
module.exports=(()=>{var __webpack_modules__={3633:(e,a,i)=>{"use strict";var n=i(5385);var t=i(3583);e.exports=Accepts;function Accepts(e){if(!(this instanceof Accepts)){return new Accepts(e)}this.headers=e.headers;this.negotiator=new n(e)}Accepts.prototype.type=Accepts.prototype.types=function(e){var a=e;if(a&&!Array.isArray(a)){a=new Array(arguments.length);for(var i=0;i<a.length;i++){a[i]=arguments[i]}}if(!a||a.length===0){return this.negotiator.mediaTypes()}if(!this.headers.accept){return a[0]}var n=a.map(extToMime);var t=this.negotiator.mediaTypes(n.filter(validMime));var r=t[0];return r?a[n.indexOf(r)]:false};Accepts.prototype.encoding=Accepts.prototype.encodings=function(e){var a=e;if(a&&!Array.isArray(a)){a=new Array(arguments.length);for(var i=0;i<a.length;i++){a[i]=arguments[i]}}if(!a||a.length===0){return this.negotiator.encodings()}return this.negotiator.encodings(a)[0]||false};Accepts.prototype.charset=Accepts.prototype.charsets=function(e){var a=e;if(a&&!Array.isArray(a)){a=new Array(arguments.length);for(var i=0;i<a.length;i++){a[i]=arguments[i]}}if(!a||a.length===0){return this.negotiator.charsets()}return this.negotiator.charsets(a)[0]||false};Accepts.prototype.lang=Accepts.prototype.langs=Accepts.prototype.language=Accepts.prototype.languages=function(e){var a=e;if(a&&!Array.isArray(a)){a=new Array(arguments.length);for(var i=0;i<a.length;i++){a[i]=arguments[i]}}if(!a||a.length===0){return this.negotiator.languages()}return this.negotiator.languages(a)[0]||false};function extToMime(e){return e.indexOf("/")===-1?t.lookup(e):e}function validMime(e){return typeof e==="string"}},3723:e=>{"use strict";e.exports=arrayFlatten;function flattenWithDepth(e,a,i){for(var n=0;n<e.length;n++){var t=e[n];if(i>0&&Array.isArray(t)){flattenWithDepth(t,a,i-1)}else{a.push(t)}}return a}function flattenForever(e,a){for(var i=0;i<e.length;i++){var n=e[i];if(Array.isArray(n)){flattenForever(n,a)}else{a.push(n)}}return a}function arrayFlatten(e,a){if(a==null){return flattenForever(e,[])}return flattenWithDepth(e,[],a)}},7076:(e,a,i)=>{"use strict";var n=i(8883)("body-parser");var t=Object.create(null);a=e.exports=n.function(bodyParser,"bodyParser: use individual json/urlencoded middlewares");Object.defineProperty(a,"json",{configurable:true,enumerable:true,get:createParserGetter("json")});Object.defineProperty(a,"raw",{configurable:true,enumerable:true,get:createParserGetter("raw")});Object.defineProperty(a,"text",{configurable:true,enumerable:true,get:createParserGetter("text")});Object.defineProperty(a,"urlencoded",{configurable:true,enumerable:true,get:createParserGetter("urlencoded")});function bodyParser(e){var i={};if(e){for(var n in e){if(n!=="type"){i[n]=e[n]}}}var t=a.urlencoded(i);var r=a.json(i);return function bodyParser(e,a,i){r(e,a,function(n){if(n)return i(n);t(e,a,i)})}}function createParserGetter(e){return function get(){return loadParser(e)}}function loadParser(e){var a=t[e];if(a!==undefined){return a}switch(e){case"json":a=i(859);break;case"raw":a=i(9609);break;case"text":a=i(6382);break;case"urlencoded":a=i(6100);break}return t[e]=a}},8862:(e,a,i)=>{"use strict";var n=i(5193);var t=i(7742);var r=i(9032);var o=i(4694);var s=i(8761);e.exports=read;function read(e,a,i,s,c,p){var l;var u=p;var d;e._body=true;var m=u.encoding!==null?u.encoding:null;var f=u.verify;try{d=contentstream(e,c,u.inflate);l=d.length;d.length=undefined}catch(e){return i(e)}u.length=l;u.encoding=f?null:m;if(u.encoding===null&&m!==null&&!r.encodingExists(m)){return i(n(415,'unsupported charset "'+m.toUpperCase()+'"',{charset:m.toLowerCase(),type:"charset.unsupported"}))}c("read body");t(d,u,function(t,p){if(t){var l;if(t.type==="encoding.unsupported"){l=n(415,'unsupported charset "'+m.toUpperCase()+'"',{charset:m.toLowerCase(),type:"charset.unsupported"})}else{l=n(400,t)}d.resume();o(e,function onfinished(){i(n(400,l))});return}if(f){try{c("verify body");f(e,a,p,m)}catch(e){i(n(403,e,{body:p,type:e.type||"entity.verify.failed"}));return}}var u=p;try{c("parse body");u=typeof p!=="string"&&m!==null?r.decode(p,m):p;e.body=s(u)}catch(e){i(n(400,e,{body:u,type:e.type||"entity.parse.failed"}));return}i()})}function contentstream(e,a,i){var t=(e.headers["content-encoding"]||"identity").toLowerCase();var r=e.headers["content-length"];var o;a('content-encoding "%s"',t);if(i===false&&t!=="identity"){throw n(415,"content encoding unsupported",{encoding:t,type:"encoding.unsupported"})}switch(t){case"deflate":o=s.createInflate();a("inflate body");e.pipe(o);break;case"gzip":o=s.createGunzip();a("gunzip body");e.pipe(o);break;case"identity":o=e;o.length=r;break;default:throw n(415,'unsupported content encoding "'+t+'"',{encoding:t,type:"encoding.unsupported"})}return o}},859:(e,a,i)=>{"use strict";var n=i(6966);var t=i(9915);var r=i(5193);var o=i(1492)("body-parser:json");var s=i(8862);var c=i(1159);e.exports=json;var p=/^[\x20\x09\x0a\x0d]*(.)/;function json(e){var a=e||{};var i=typeof a.limit!=="number"?n.parse(a.limit||"100kb"):a.limit;var t=a.inflate!==false;var p=a.reviver;var l=a.strict!==false;var u=a.type||"application/json";var d=a.verify||false;if(d!==false&&typeof d!=="function"){throw new TypeError("option verify must be function")}var m=typeof u!=="function"?typeChecker(u):u;function parse(e){if(e.length===0){return{}}if(l){var a=firstchar(e);if(a!=="{"&&a!=="["){o("strict violation");throw createStrictSyntaxError(e,a)}}try{o("parse json");return JSON.parse(e,p)}catch(e){throw normalizeJsonSyntaxError(e,{message:e.message,stack:e.stack})}}return function jsonParser(e,a,n){if(e._body){o("body already parsed");n();return}e.body=e.body||{};if(!c.hasBody(e)){o("skip empty body");n();return}o("content-type %j",e.headers["content-type"]);if(!m(e)){o("skip parsing");n();return}var p=getCharset(e)||"utf-8";if(p.substr(0,4)!=="utf-"){o("invalid charset");n(r(415,'unsupported charset "'+p.toUpperCase()+'"',{charset:p,type:"charset.unsupported"}));return}s(e,a,n,parse,o,{encoding:p,inflate:t,limit:i,verify:d})}}function createStrictSyntaxError(e,a){var i=e.indexOf(a);var n=e.substring(0,i)+"#";try{JSON.parse(n);throw new SyntaxError("strict violation")}catch(e){return normalizeJsonSyntaxError(e,{message:e.message.replace("#",a),stack:e.stack})}}function firstchar(e){return p.exec(e)[1]}function getCharset(e){try{return(t.parse(e).parameters.charset||"").toLowerCase()}catch(e){return undefined}}function normalizeJsonSyntaxError(e,a){var i=Object.getOwnPropertyNames(e);for(var n=0;n<i.length;n++){var t=i[n];if(t!=="stack"&&t!=="message"){delete e[t]}}e.stack=a.stack.replace(e.message,a.message);e.message=a.message;return e}function typeChecker(e){return function checkType(a){return Boolean(c(a,e))}}},9609:(e,a,i)=>{"use strict";var n=i(6966);var t=i(1492)("body-parser:raw");var r=i(8862);var o=i(1159);e.exports=raw;function raw(e){var a=e||{};var i=a.inflate!==false;var s=typeof a.limit!=="number"?n.parse(a.limit||"100kb"):a.limit;var c=a.type||"application/octet-stream";var p=a.verify||false;if(p!==false&&typeof p!=="function"){throw new TypeError("option verify must be function")}var l=typeof c!=="function"?typeChecker(c):c;function parse(e){return e}return function rawParser(e,a,n){if(e._body){t("body already parsed");n();return}e.body=e.body||{};if(!o.hasBody(e)){t("skip empty body");n();return}t("content-type %j",e.headers["content-type"]);if(!l(e)){t("skip parsing");n();return}r(e,a,n,parse,t,{encoding:null,inflate:i,limit:s,verify:p})}}function typeChecker(e){return function checkType(a){return Boolean(o(a,e))}}},6382:(e,a,i)=>{"use strict";var n=i(6966);var t=i(9915);var r=i(1492)("body-parser:text");var o=i(8862);var s=i(1159);e.exports=text;function text(e){var a=e||{};var i=a.defaultCharset||"utf-8";var t=a.inflate!==false;var c=typeof a.limit!=="number"?n.parse(a.limit||"100kb"):a.limit;var p=a.type||"text/plain";var l=a.verify||false;if(l!==false&&typeof l!=="function"){throw new TypeError("option verify must be function")}var u=typeof p!=="function"?typeChecker(p):p;function parse(e){return e}return function textParser(e,a,n){if(e._body){r("body already parsed");n();return}e.body=e.body||{};if(!s.hasBody(e)){r("skip empty body");n();return}r("content-type %j",e.headers["content-type"]);if(!u(e)){r("skip parsing");n();return}var p=getCharset(e)||i;o(e,a,n,parse,r,{encoding:p,inflate:t,limit:c,verify:l})}}function getCharset(e){try{return(t.parse(e).parameters.charset||"").toLowerCase()}catch(e){return undefined}}function typeChecker(e){return function checkType(a){return Boolean(s(a,e))}}},6100:(e,a,i)=>{"use strict";var n=i(6966);var t=i(9915);var r=i(5193);var o=i(1492)("body-parser:urlencoded");var s=i(8883)("body-parser");var c=i(8862);var p=i(1159);e.exports=urlencoded;var l=Object.create(null);function urlencoded(e){var a=e||{};if(a.extended===undefined){s("undefined extended: provide extended option")}var i=a.extended!==false;var t=a.inflate!==false;var l=typeof a.limit!=="number"?n.parse(a.limit||"100kb"):a.limit;var u=a.type||"application/x-www-form-urlencoded";var d=a.verify||false;if(d!==false&&typeof d!=="function"){throw new TypeError("option verify must be function")}var m=i?extendedparser(a):simpleparser(a);var f=typeof u!=="function"?typeChecker(u):u;function parse(e){return e.length?m(e):{}}return function urlencodedParser(e,a,i){if(e._body){o("body already parsed");i();return}e.body=e.body||{};if(!p.hasBody(e)){o("skip empty body");i();return}o("content-type %j",e.headers["content-type"]);if(!f(e)){o("skip parsing");i();return}var n=getCharset(e)||"utf-8";if(n!=="utf-8"){o("invalid charset");i(r(415,'unsupported charset "'+n.toUpperCase()+'"',{charset:n,type:"charset.unsupported"}));return}c(e,a,i,parse,o,{debug:o,encoding:n,inflate:t,limit:l,verify:d})}}function extendedparser(e){var a=e.parameterLimit!==undefined?e.parameterLimit:1e3;var i=parser("qs");if(isNaN(a)||a<1){throw new TypeError("option parameterLimit must be a positive number")}if(isFinite(a)){a=a|0}return function queryparse(e){var n=parameterCount(e,a);if(n===undefined){o("too many parameters");throw r(413,"too many parameters",{type:"parameters.too.many"})}var t=Math.max(100,n);o("parse extended urlencoding");return i(e,{allowPrototypes:true,arrayLimit:t,depth:Infinity,parameterLimit:a})}}function getCharset(e){try{return(t.parse(e).parameters.charset||"").toLowerCase()}catch(e){return undefined}}function parameterCount(e,a){var i=0;var n=0;while((n=e.indexOf("&",n))!==-1){i++;n++;if(i===a){return undefined}}return i}function parser(e){var a=l[e];if(a!==undefined){return a.parse}switch(e){case"qs":a=i(2760);break;case"querystring":a=i(1191);break}l[e]=a;return a.parse}function simpleparser(e){var a=e.parameterLimit!==undefined?e.parameterLimit:1e3;var i=parser("querystring");if(isNaN(a)||a<1){throw new TypeError("option parameterLimit must be a positive number")}if(isFinite(a)){a=a|0}return function queryparse(e){var n=parameterCount(e,a);if(n===undefined){o("too many parameters");throw r(413,"too many parameters",{type:"parameters.too.many"})}o("parse urlencoding");return i(e,undefined,undefined,{maxKeys:a})}}function typeChecker(e){return function checkType(a){return Boolean(p(a,e))}}},6966:e=>{"use strict";e.exports=bytes;e.exports.format=format;e.exports.parse=parse;var a=/\B(?=(\d{3})+(?!\d))/g;var i=/(?:\.0*|(\.[^0]+)0+)$/;var n={b:1,kb:1<<10,mb:1<<20,gb:1<<30,tb:Math.pow(1024,4),pb:Math.pow(1024,5)};var t=/^((-|\+)?(\d+(?:\.\d+)?)) *(kb|mb|gb|tb|pb)$/i;function bytes(e,a){if(typeof e==="string"){return parse(e)}if(typeof e==="number"){return format(e,a)}return null}function format(e,t){if(!Number.isFinite(e)){return null}var r=Math.abs(e);var o=t&&t.thousandsSeparator||"";var s=t&&t.unitSeparator||"";var c=t&&t.decimalPlaces!==undefined?t.decimalPlaces:2;var p=Boolean(t&&t.fixedDecimals);var l=t&&t.unit||"";if(!l||!n[l.toLowerCase()]){if(r>=n.pb){l="PB"}else if(r>=n.tb){l="TB"}else if(r>=n.gb){l="GB"}else if(r>=n.mb){l="MB"}else if(r>=n.kb){l="KB"}else{l="B"}}var u=e/n[l.toLowerCase()];var d=u.toFixed(c);if(!p){d=d.replace(i,"$1")}if(o){d=d.replace(a,o)}return d+s+l}function parse(e){if(typeof e==="number"&&!isNaN(e)){return e}if(typeof e!=="string"){return null}var a=t.exec(e);var i;var r="b";if(!a){i=parseInt(e,10);r="b"}else{i=parseFloat(a[1]);r=a[4].toLowerCase()}return Math.floor(n[r]*i)}},3921:(e,a,i)=>{"use strict";e.exports=contentDisposition;e.exports.parse=parse;var n=i(5622).basename;var t=i(8558).Buffer;var r=/[\x00-\x20"'()*,/:;<=>?@[\\\]{}\x7f]/g;var o=/%[0-9A-Fa-f]{2}/;var s=/%([0-9A-Fa-f]{2})/g;var c=/[^\x20-\x7e\xa0-\xff]/g;var p=/\\([\u0000-\u007f])/g;var l=/([\\"])/g;var u=/;[\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;var d=/^[\x20-\x7e\x80-\xff]+$/;var m=/^[!#$%&'*+.0-9A-Z^_`a-z|~-]+$/;var f=/^([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!#$&+.^_`|~-])+)$/;var v=/^([!#$%&'*+.0-9A-Z^_`a-z|~-]+)[\x09\x20]*(?:$|;)/;function contentDisposition(e,a){var i=a||{};var n=i.type||"attachment";var t=createparams(e,i.fallback);return format(new ContentDisposition(n,t))}function createparams(e,a){if(e===undefined){return}var i={};if(typeof e!=="string"){throw new TypeError("filename must be a string")}if(a===undefined){a=true}if(typeof a!=="string"&&typeof a!=="boolean"){throw new TypeError("fallback must be a string or boolean")}if(typeof a==="string"&&c.test(a)){throw new TypeError("fallback must be ISO-8859-1 string")}var t=n(e);var r=d.test(t);var s=typeof a!=="string"?a&&getlatin1(t):n(a);var p=typeof s==="string"&&s!==t;if(p||!r||o.test(t)){i["filename*"]=t}if(r||p){i.filename=p?s:t}return i}function format(e){var a=e.parameters;var i=e.type;if(!i||typeof i!=="string"||!m.test(i)){throw new TypeError("invalid type")}var n=String(i).toLowerCase();if(a&&typeof a==="object"){var t;var r=Object.keys(a).sort();for(var o=0;o<r.length;o++){t=r[o];var s=t.substr(-1)==="*"?ustring(a[t]):qstring(a[t]);n+="; "+t+"="+s}}return n}function decodefield(e){var a=f.exec(e);if(!a){throw new TypeError("invalid extended field value")}var i=a[1].toLowerCase();var n=a[2];var r;var o=n.replace(s,pdecode);switch(i){case"iso-8859-1":r=getlatin1(o);break;case"utf-8":r=t.from(o,"binary").toString("utf8");break;default:throw new TypeError("unsupported charset in extended field")}return r}function getlatin1(e){return String(e).replace(c,"?")}function parse(e){if(!e||typeof e!=="string"){throw new TypeError("argument string is required")}var a=v.exec(e);if(!a){throw new TypeError("invalid type format")}var i=a[0].length;var n=a[1].toLowerCase();var t;var r=[];var o={};var s;i=u.lastIndex=a[0].substr(-1)===";"?i-1:i;while(a=u.exec(e)){if(a.index!==i){throw new TypeError("invalid parameter format")}i+=a[0].length;t=a[1].toLowerCase();s=a[2];if(r.indexOf(t)!==-1){throw new TypeError("invalid duplicate parameter")}r.push(t);if(t.indexOf("*")+1===t.length){t=t.slice(0,-1);s=decodefield(s);o[t]=s;continue}if(typeof o[t]==="string"){continue}if(s[0]==='"'){s=s.substr(1,s.length-2).replace(p,"$1")}o[t]=s}if(i!==-1&&i!==e.length){throw new TypeError("invalid parameter format")}return new ContentDisposition(n,o)}function pdecode(e,a){return String.fromCharCode(parseInt(a,16))}function pencode(e){return"%"+String(e).charCodeAt(0).toString(16).toUpperCase()}function qstring(e){var a=String(e);return'"'+a.replace(l,"\\$1")+'"'}function ustring(e){var a=String(e);var i=encodeURIComponent(a).replace(r,pencode);return"UTF-8''"+i}function ContentDisposition(e,a){this.type=e;this.parameters=a}},8558:(e,a,i)=>{var n=i(4293);var t=n.Buffer;function copyProps(e,a){for(var i in e){a[i]=e[i]}}if(t.from&&t.alloc&&t.allocUnsafe&&t.allocUnsafeSlow){e.exports=n}else{copyProps(n,a);a.Buffer=SafeBuffer}function SafeBuffer(e,a,i){return t(e,a,i)}copyProps(t,SafeBuffer);SafeBuffer.from=function(e,a,i){if(typeof e==="number"){throw new TypeError("Argument must not be a number")}return t(e,a,i)};SafeBuffer.alloc=function(e,a,i){if(typeof e!=="number"){throw new TypeError("Argument must be a number")}var n=t(e);if(a!==undefined){if(typeof i==="string"){n.fill(a,i)}else{n.fill(a)}}else{n.fill(0)}return n};SafeBuffer.allocUnsafe=function(e){if(typeof e!=="number"){throw new TypeError("Argument must be a number")}return t(e)};SafeBuffer.allocUnsafeSlow=function(e){if(typeof e!=="number"){throw new TypeError("Argument must be a number")}return n.SlowBuffer(e)}},9915:(e,a)=>{"use strict";var i=/; *([!#$%&'*+.^_`|~0-9A-Za-z-]+) *= *("(?:[\u000b\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u000b\u0020-\u00ff])*"|[!#$%&'*+.^_`|~0-9A-Za-z-]+) */g;var n=/^[\u000b\u0020-\u007e\u0080-\u00ff]+$/;var t=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+$/;var r=/\\([\u000b\u0020-\u00ff])/g;var o=/([\\"])/g;var s=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/;a.format=format;a.parse=parse;function format(e){if(!e||typeof e!=="object"){throw new TypeError("argument obj is required")}var a=e.parameters;var i=e.type;if(!i||!s.test(i)){throw new TypeError("invalid type")}var n=i;if(a&&typeof a==="object"){var r;var o=Object.keys(a).sort();for(var c=0;c<o.length;c++){r=o[c];if(!t.test(r)){throw new TypeError("invalid parameter name")}n+="; "+r+"="+qstring(a[r])}}return n}function parse(e){if(!e){throw new TypeError("argument string is required")}var a=typeof e==="object"?getcontenttype(e):e;if(typeof a!=="string"){throw new TypeError("argument string is required to be a string")}var n=a.indexOf(";");var t=n!==-1?a.substr(0,n).trim():a.trim();if(!s.test(t)){throw new TypeError("invalid media type")}var o=new ContentType(t.toLowerCase());if(n!==-1){var c;var p;var l;i.lastIndex=n;while(p=i.exec(a)){if(p.index!==n){throw new TypeError("invalid parameter format")}n+=p[0].length;c=p[1].toLowerCase();l=p[2];if(l[0]==='"'){l=l.substr(1,l.length-2).replace(r,"$1")}o.parameters[c]=l}if(n!==a.length){throw new TypeError("invalid parameter format")}}return o}function getcontenttype(e){var a;if(typeof e.getHeader==="function"){a=e.getHeader("content-type")}else if(typeof e.headers==="object"){a=e.headers&&e.headers["content-type"]}if(typeof a!=="string"){throw new TypeError("content-type header is missing from object")}return a}function qstring(e){var a=String(e);if(t.test(a)){return a}if(a.length>0&&!n.test(a)){throw new TypeError("invalid parameter value")}return'"'+a.replace(o,"\\$1")+'"'}function ContentType(e){this.parameters=Object.create(null);this.type=e}},1579:(e,a,i)=>{var n=i(6417);a.sign=function(e,a){if("string"!=typeof e)throw new TypeError("Cookie value must be provided as a string.");if("string"!=typeof a)throw new TypeError("Secret string must be provided.");return e+"."+n.createHmac("sha256",a).update(e).digest("base64").replace(/\=+$/,"")};a.unsign=function(e,i){if("string"!=typeof e)throw new TypeError("Signed cookie string must be provided.");if("string"!=typeof i)throw new TypeError("Secret string must be provided.");var n=e.slice(0,e.lastIndexOf(".")),t=a.sign(n,i);return sha1(t)==sha1(e)?n:false};function sha1(e){return n.createHash("sha1").update(e).digest("hex")}},3658:(e,a)=>{"use strict";a.parse=parse;a.serialize=serialize;var i=decodeURIComponent;var n=encodeURIComponent;var t=/; */;var r=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function parse(e,a){if(typeof e!=="string"){throw new TypeError("argument str must be a string")}var n={};var r=a||{};var o=e.split(t);var s=r.decode||i;for(var c=0;c<o.length;c++){var p=o[c];var l=p.indexOf("=");if(l<0){continue}var u=p.substr(0,l).trim();var d=p.substr(++l,p.length).trim();if('"'==d[0]){d=d.slice(1,-1)}if(undefined==n[u]){n[u]=tryDecode(d,s)}}return n}function serialize(e,a,i){var t=i||{};var o=t.encode||n;if(typeof o!=="function"){throw new TypeError("option encode is invalid")}if(!r.test(e)){throw new TypeError("argument name is invalid")}var s=o(a);if(s&&!r.test(s)){throw new TypeError("argument val is invalid")}var c=e+"="+s;if(null!=t.maxAge){var p=t.maxAge-0;if(isNaN(p))throw new Error("maxAge should be a Number");c+="; Max-Age="+Math.floor(p)}if(t.domain){if(!r.test(t.domain)){throw new TypeError("option domain is invalid")}c+="; Domain="+t.domain}if(t.path){if(!r.test(t.path)){throw new TypeError("option path is invalid")}c+="; Path="+t.path}if(t.expires){if(typeof t.expires.toUTCString!=="function"){throw new TypeError("option expires is invalid")}c+="; Expires="+t.expires.toUTCString()}if(t.httpOnly){c+="; HttpOnly"}if(t.secure){c+="; Secure"}if(t.sameSite){var l=typeof t.sameSite==="string"?t.sameSite.toLowerCase():t.sameSite;switch(l){case true:c+="; SameSite=Strict";break;case"lax":c+="; SameSite=Lax";break;case"strict":c+="; SameSite=Strict";break;case"none":c+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}}return c}function tryDecode(e,a){try{return a(e)}catch(a){return e}}},8883:(module,__unused_webpack_exports,__nccwpck_require__)=>{var callSiteToString=__nccwpck_require__(9829).callSiteToString;var eventListenerCount=__nccwpck_require__(9829).eventListenerCount;var relative=__nccwpck_require__(5622).relative;module.exports=depd;var basePath=process.cwd();function containsNamespace(e,a){var i=e.split(/[ ,]+/);var n=String(a).toLowerCase();for(var t=0;t<i.length;t++){var r=i[t];if(r&&(r==="*"||r.toLowerCase()===n)){return true}}return false}function convertDataDescriptorToAccessor(e,a,i){var n=Object.getOwnPropertyDescriptor(e,a);var t=n.value;n.get=function getter(){return t};if(n.writable){n.set=function setter(e){return t=e}}delete n.value;delete n.writable;Object.defineProperty(e,a,n);return n}function createArgumentsString(e){var a="";for(var i=0;i<e;i++){a+=", arg"+i}return a.substr(2)}function createStackString(e){var a=this.name+": "+this.namespace;if(this.message){a+=" deprecated "+this.message}for(var i=0;i<e.length;i++){a+="\n at "+callSiteToString(e[i])}return a}function depd(e){if(!e){throw new TypeError("argument namespace is required")}var a=getStack();var i=callSiteLocation(a[1]);var n=i[0];function deprecate(e){log.call(deprecate,e)}deprecate._file=n;deprecate._ignored=isignored(e);deprecate._namespace=e;deprecate._traced=istraced(e);deprecate._warned=Object.create(null);deprecate.function=wrapfunction;deprecate.property=wrapproperty;return deprecate}function isignored(e){if(process.noDeprecation){return true}var a=process.env.NO_DEPRECATION||"";return containsNamespace(a,e)}function istraced(e){if(process.traceDeprecation){return true}var a=process.env.TRACE_DEPRECATION||"";return containsNamespace(a,e)}function log(e,a){var i=eventListenerCount(process,"deprecation")!==0;if(!i&&this._ignored){return}var n;var t;var r;var o;var s=0;var c=false;var p=getStack();var l=this._file;if(a){o=a;r=callSiteLocation(p[1]);r.name=o.name;l=r[0]}else{s=2;o=callSiteLocation(p[s]);r=o}for(;s<p.length;s++){n=callSiteLocation(p[s]);t=n[0];if(t===l){c=true}else if(t===this._file){l=this._file}else if(c){break}}var u=n?o.join(":")+"__"+n.join(":"):undefined;if(u!==undefined&&u in this._warned){return}this._warned[u]=true;var d=e;if(!d){d=r===o||!r.name?defaultMessage(o):defaultMessage(r)}if(i){var m=DeprecationError(this._namespace,d,p.slice(s));process.emit("deprecation",m);return}var f=process.stderr.isTTY?formatColor:formatPlain;var v=f.call(this,d,n,p.slice(s));process.stderr.write(v+"\n","utf8")}function callSiteLocation(e){var a=e.getFileName()||"<anonymous>";var i=e.getLineNumber();var n=e.getColumnNumber();if(e.isEval()){a=e.getEvalOrigin()+", "+a}var t=[a,i,n];t.callSite=e;t.name=e.getFunctionName();return t}function defaultMessage(e){var a=e.callSite;var i=e.name;if(!i){i="<anonymous@"+formatLocation(e)+">"}var n=a.getThis();var t=n&&a.getTypeName();if(t==="Object"){t=undefined}if(t==="Function"){t=n.name||t}return t&&a.getMethodName()?t+"."+i:i}function formatPlain(e,a,i){var n=(new Date).toUTCString();var t=n+" "+this._namespace+" deprecated "+e;if(this._traced){for(var r=0;r<i.length;r++){t+="\n at "+callSiteToString(i[r])}return t}if(a){t+=" at "+formatLocation(a)}return t}function formatColor(e,a,i){var n="[36;1m"+this._namespace+"[22;39m"+" [33;1mdeprecated[22;39m"+" [0m"+e+"[39m";if(this._traced){for(var t=0;t<i.length;t++){n+="\n [36mat "+callSiteToString(i[t])+"[39m"}return n}if(a){n+=" [36m"+formatLocation(a)+"[39m"}return n}function formatLocation(e){return relative(basePath,e[0])+":"+e[1]+":"+e[2]}function getStack(){var e=Error.stackTraceLimit;var a={};var i=Error.prepareStackTrace;Error.prepareStackTrace=prepareObjectStackTrace;Error.stackTraceLimit=Math.max(10,e);Error.captureStackTrace(a);var n=a.stack.slice(1);Error.prepareStackTrace=i;Error.stackTraceLimit=e;return n}function prepareObjectStackTrace(e,a){return a}function wrapfunction(fn,message){if(typeof fn!=="function"){throw new TypeError("argument fn must be a function")}var args=createArgumentsString(fn.length);var deprecate=this;var stack=getStack();var site=callSiteLocation(stack[1]);site.name=fn.name;var deprecatedfn=eval("(function ("+args+") {\n"+'"use strict"\n'+"log.call(deprecate, message, site)\n"+"return fn.apply(this, arguments)\n"+"})");return deprecatedfn}function wrapproperty(e,a,i){if(!e||typeof e!=="object"&&typeof e!=="function"){throw new TypeError("argument obj must be object")}var n=Object.getOwnPropertyDescriptor(e,a);if(!n){throw new TypeError("must call property on owner object")}if(!n.configurable){throw new TypeError("property must be configurable")}var t=this;var r=getStack();var o=callSiteLocation(r[1]);o.name=a;if("value"in n){n=convertDataDescriptorToAccessor(e,a,i)}var s=n.get;var c=n.set;if(typeof s==="function"){n.get=function getter(){log.call(t,i,o);return s.apply(this,arguments)}}if(typeof c==="function"){n.set=function setter(){log.call(t,i,o);return c.apply(this,arguments)}}Object.defineProperty(e,a,n)}function DeprecationError(e,a,i){var n=new Error;var t;Object.defineProperty(n,"constructor",{value:DeprecationError});Object.defineProperty(n,"message",{configurable:true,enumerable:false,value:a,writable:true});Object.defineProperty(n,"name",{enumerable:false,configurable:true,value:"DeprecationError",writable:true});Object.defineProperty(n,"namespace",{configurable:true,enumerable:false,value:e,writable:true});Object.defineProperty(n,"stack",{configurable:true,enumerable:false,get:function(){if(t!==undefined){return t}return t=createStackString.call(this,i)},set:function setter(e){t=e}});return n}},5554:e=>{"use strict";e.exports=callSiteToString;function callSiteFileLocation(e){var a;var i="";if(e.isNative()){i="native"}else if(e.isEval()){a=e.getScriptNameOrSourceURL();if(!a){i=e.getEvalOrigin()}}else{a=e.getFileName()}if(a){i+=a;var n=e.getLineNumber();if(n!=null){i+=":"+n;var t=e.getColumnNumber();if(t){i+=":"+t}}}return i||"unknown source"}function callSiteToString(e){var a=true;var i=callSiteFileLocation(e);var n=e.getFunctionName();var t=e.isConstructor();var r=!(e.isToplevel()||t);var o="";if(r){var s=e.getMethodName();var c=getConstructorName(e);if(n){if(c&&n.indexOf(c)!==0){o+=c+"."}o+=n;if(s&&n.lastIndexOf("."+s)!==n.length-s.length-1){o+=" [as "+s+"]"}}else{o+=c+"."+(s||"<anonymous>")}}else if(t){o+="new "+(n||"<anonymous>")}else if(n){o+=n}else{a=false;o+=i}if(a){o+=" ("+i+")"}return o}function getConstructorName(e){var a=e.receiver;return a.constructor&&a.constructor.name||null}},2078:e=>{"use strict";e.exports=eventListenerCount;function eventListenerCount(e,a){return e.listeners(a).length}},9829:(e,a,i)=>{"use strict";var n=i(8614).EventEmitter;lazyProperty(e.exports,"callSiteToString",function callSiteToString(){var e=Error.stackTraceLimit;var a={};var n=Error.prepareStackTrace;function prepareObjectStackTrace(e,a){return a}Error.prepareStackTrace=prepareObjectStackTrace;Error.stackTraceLimit=2;Error.captureStackTrace(a);var t=a.stack.slice();Error.prepareStackTrace=n;Error.stackTraceLimit=e;return t[0].toString?toString:i(5554)});lazyProperty(e.exports,"eventListenerCount",function eventListenerCount(){return n.listenerCount||i(2078)});function lazyProperty(e,a,i){function get(){var n=i();Object.defineProperty(e,a,{configurable:true,enumerable:true,value:n});return n}Object.defineProperty(e,a,{configurable:true,enumerable:true,get:get})}function toString(e){return e.toString()}},3225:(e,a,i)=>{"use strict";var n=i(5747).ReadStream;var t=i(2413);e.exports=destroy;function destroy(e){if(e instanceof n){return destroyReadStream(e)}if(!(e instanceof t)){return e}if(typeof e.destroy==="function"){e.destroy()}return e}function destroyReadStream(e){e.destroy();if(typeof e.close==="function"){e.on("open",onOpenClose)}return e}function onOpenClose(){if(typeof this.fd==="number"){this.close()}}},4401:e=>{"use strict";e.exports=first;function first(e,a){if(!Array.isArray(e))throw new TypeError("arg must be an array of [ee, events...] arrays");var i=[];for(var n=0;n<e.length;n++){var t=e[n];if(!Array.isArray(t)||t.length<2)throw new TypeError("each array member must be [ee, events...]");var r=t[0];for(var o=1;o<t.length;o++){var s=t[o];var c=listener(s,callback);r.on(s,c);i.push({ee:r,event:s,fn:c})}}function callback(){cleanup();a.apply(null,arguments)}function cleanup(){var e;for(var a=0;a<i.length;a++){e=i[a];e.ee.removeListener(e.event,e.fn)}}function thunk(e){a=e}thunk.cancel=cleanup;return thunk}function listener(e,a){return function onevent(i){var n=new Array(arguments.length);var t=this;var r=e==="error"?i:null;for(var o=0;o<n.length;o++){n[o]=arguments[o]}a(r,t,e,n)}}},6592:e=>{"use strict";e.exports=encodeUrl;var a=/(?:[^\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;var i=/(^|[^\uD800-\uDBFF])[\uDC00-\uDFFF]|[\uD800-\uDBFF]([^\uDC00-\uDFFF]|$)/g;var n="$1�$2";function encodeUrl(e){return String(e).replace(i,n).replace(a,encodeURI)}},4070:e=>{"use strict";var a=/["'&<>]/;e.exports=escapeHtml;function escapeHtml(e){var i=""+e;var n=a.exec(i);if(!n){return i}var t;var r="";var o=0;var s=0;for(o=n.index;o<i.length;o++){switch(i.charCodeAt(o)){case 34:t=""";break;case 38:t="&";break;case 39:t="'";break;case 60:t="<";break;case 62:t=">";break;default:continue}if(s!==o){r+=i.substring(s,o)}s=o+1;r+=t}return s!==o?r+i.substring(s,o):r}},9972:(e,a,i)=>{"use strict";e.exports=etag;var n=i(6417);var t=i(5747).Stats;var r=Object.prototype.toString;function entitytag(e){if(e.length===0){return'"0-2jmj7l5rSw0yVb/vlWAYkK/YBwk"'}var a=n.createHash("sha1").update(e,"utf8").digest("base64").substring(0,27);var i=typeof e==="string"?Buffer.byteLength(e,"utf8"):e.length;return'"'+i.toString(16)+"-"+a+'"'}function etag(e,a){if(e==null){throw new TypeError("argument entity is required")}var i=isstats(e);var n=a&&typeof a.weak==="boolean"?a.weak:i;if(!i&&typeof e!=="string"&&!Buffer.isBuffer(e)){throw new TypeError("argument entity must be string, Buffer, or fs.Stats")}var t=i?stattag(e):entitytag(e);return n?"W/"+t:t}function isstats(e){if(typeof t==="function"&&e instanceof t){return true}return e&&typeof e==="object"&&"ctime"in e&&r.call(e.ctime)==="[object Date]"&&"mtime"in e&&r.call(e.mtime)==="[object Date]"&&"ino"in e&&typeof e.ino==="number"&&"size"in e&&typeof e.size==="number"}function stattag(e){var a=e.mtime.getTime().toString(16);var i=e.size.toString(16);return'"'+i+"-"+a+'"'}},1204:(e,a,i)=>{"use strict";e.exports=i(2587)},313:(e,a,i)=>{"use strict";var n=i(810);var t=i(4963);var r=i(8752);var o=i(2636);var s=i(9768);var c=i(1492)("express:application");var p=i(9209);var l=i(8605);var u=i(3561).compileETag;var d=i(3561).compileQueryParser;var m=i(3561).compileTrust;var f=i(8883)("express");var v=i(3723);var x=i(4429);var h=i(5622).resolve;var g=i(414);var b=Array.prototype.slice;var y=a=e.exports={};var w="@@symbol:trust_proxy_default";y.init=function init(){this.cache={};this.engines={};this.settings={};this.defaultConfiguration()};y.defaultConfiguration=function defaultConfiguration(){var e=process.env.NODE_ENV||"development";this.enable("x-powered-by");this.set("etag","weak");this.set("env",e);this.set("query parser","extended");this.set("subdomain offset",2);this.set("trust proxy",false);Object.defineProperty(this.settings,w,{configurable:true,value:true});c("booting in %s mode",e);this.on("mount",function onmount(e){if(this.settings[w]===true&&typeof e.settings["trust proxy fn"]==="function"){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",h("views"));this.set("jsonp callback name","callback");if(e==="production"){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.")}})};y.lazyrouter=function lazyrouter(){if(!this._router){this._router=new t({caseSensitive:this.enabled("case sensitive routing"),strict:this.enabled("strict routing")});this._router.use(s(this.get("query parser fn")));this._router.use(o.init(this))}};y.handle=function handle(e,a,i){var t=this._router;var r=i||n(e,a,{env:this.get("env"),onerror:logerror.bind(this)});if(!t){c("no routes defined on app");r();return}t.handle(e,a,r)};y.use=function use(e){var a=0;var i="/";if(typeof e!=="function"){var n=e;while(Array.isArray(n)&&n.length!==0){n=n[0]}if(typeof n!=="function"){a=1;i=e}}var t=v(b.call(arguments,a));if(t.length===0){throw new TypeError("app.use() requires a middleware function")}this.lazyrouter();var r=this._router;t.forEach(function(e){if(!e||!e.handle||!e.set){return r.use(i,e)}c(".use app under %s",i);e.mountpath=i;e.parent=this;r.use(i,function mounted_app(a,i,n){var t=a.app;e.handle(a,i,function(e){g(a,t.request);g(i,t.response);n(e)})});e.emit("mount",this)},this);return this};y.route=function route(e){this.lazyrouter();return this._router.route(e)};y.engine=function engine(e,a){if(typeof a!=="function"){throw new Error("callback function required")}var i=e[0]!=="."?"."+e:e;this.engines[i]=a;return this};y.param=function param(e,a){this.lazyrouter();if(Array.isArray(e)){for(var i=0;i<e.length;i++){this.param(e[i],a)}return this}this._router.param(e,a);return this};y.set=function set(e,a){if(arguments.length===1){return this.settings[e]}c('set "%s" to %o',e,a);this.settings[e]=a;switch(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",m(a));Object.defineProperty(this.settings,w,{configurable:true,value:false});break}return this};y.path=function path(){return this.parent?this.parent.path()+this.mountpath:""};y.enabled=function enabled(e){return Boolean(this.set(e))};y.disabled=function disabled(e){return!this.set(e)};y.enable=function enable(e){return this.set(e,true)};y.disable=function disable(e){return this.set(e,false)};r.forEach(function(e){y[e]=function(a){if(e==="get"&&arguments.length===1){return this.set(a)}this.lazyrouter();var i=this._router.route(a);i[e].apply(i,b.call(arguments,1));return this}});y.all=function all(e){this.lazyrouter();var a=this._router.route(e);var i=b.call(arguments,1);for(var n=0;n<r.length;n++){a[r[n]].apply(a,i)}return this};y.del=f.function(y.delete,"app.del: Use app.delete instead");y.render=function render(e,a,i){var n=this.cache;var t=i;var r=this.engines;var o=a;var s={};var c;if(typeof a==="function"){t=a;o={}}x(s,this.locals);if(o._locals){x(s,o._locals)}x(s,o);if(s.cache==null){s.cache=this.enabled("view cache")}if(s.cache){c=n[e]}if(!c){var p=this.get("view");c=new p(e,{defaultEngine:this.get("view engine"),root:this.get("views"),engines:r});if(!c.path){var l=Array.isArray(c.root)&&c.root.length>1?'directories "'+c.root.slice(0,-1).join('", "')+'" or "'+c.root[c.root.length-1]+'"':'directory "'+c.root+'"';var u=new Error('Failed to lookup view "'+e+'" in views '+l);u.view=c;return t(u)}if(s.cache){n[e]=c}}tryRender(c,s,t)};y.listen=function listen(){var e=l.createServer(this);return e.listen.apply(e,arguments)};function logerror(e){if(this.get("env")!=="test")console.error(e.stack||e.toString())}function tryRender(e,a,i){try{e.render(a,i)}catch(e){i(e)}}},2587:(e,a,i)=>{"use strict";var n=i(7076);var t=i(8614).EventEmitter;var r=i(1149);var o=i(313);var s=i(3699);var c=i(4963);var p=i(8467);var l=i(4934);a=e.exports=createApplication;function createApplication(){var e=function(a,i,n){e.handle(a,i,n)};r(e,t.prototype,false);r(e,o,false);e.request=Object.create(p,{app:{configurable:true,enumerable:true,writable:true,value:e}});e.response=Object.create(l,{app:{configurable:true,enumerable:true,writable:true,value:e}});e.init();return e}a.application=o;a.request=p;a.response=l;a.Route=s;a.Router=c;a.json=n.json;a.query=i(9768);a.raw=n.raw;a.static=i(3146);a.text=n.text;a.urlencoded=n.urlencoded;var u=["bodyParser","compress","cookieSession","session","logger","cookieParser","favicon","responseTime","errorHandler","timeout","methodOverride","vhost","csrf","directory","limit","multipart","staticCache"];u.forEach(function(e){Object.defineProperty(a,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:true})})},2636:(e,a,i)=>{"use strict";var n=i(414);a.init=function(e){return function expressInit(a,i,t){if(e.enabled("x-powered-by"))i.setHeader("X-Powered-By","Express");a.res=i;i.req=a;a.next=t;n(a,e.request);n(i,e.response);i.locals=i.locals||Object.create(null);t()}}},9768:(e,a,i)=>{"use strict";var n=i(4429);var t=i(9808);var r=i(2760);e.exports=function query(e){var a=n({},e);var i=r.parse;if(typeof e==="function"){i=e;a=undefined}if(a!==undefined&&a.allowPrototypes===undefined){a.allowPrototypes=true}return function query(e,n,r){if(!e.query){var o=t(e).query;e.query=i(o,a)}r()}}},8467:(e,a,i)=>{"use strict";var n=i(3633);var t=i(8883)("express");var r=i(1631).isIP;var o=i(1159);var s=i(8605);var c=i(3136);var p=i(6435);var l=i(9808);var u=i(140);var d=Object.create(s.IncomingMessage.prototype);e.exports=d;d.get=d.header=function header(e){if(!e){throw new TypeError("name argument is required to req.get")}if(typeof e!=="string"){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]}};d.accepts=function(){var e=n(this);return e.types.apply(e,arguments)};d.acceptsEncodings=function(){var e=n(this);return e.encodings.apply(e,arguments)};d.acceptsEncoding=t.function(d.acceptsEncodings,"req.acceptsEncoding: Use acceptsEncodings instead");d.acceptsCharsets=function(){var e=n(this);return e.charsets.apply(e,arguments)};d.acceptsCharset=t.function(d.acceptsCharsets,"req.acceptsCharset: Use acceptsCharsets instead");d.acceptsLanguages=function(){var e=n(this);return e.languages.apply(e,arguments)};d.acceptsLanguage=t.function(d.acceptsLanguages,"req.acceptsLanguage: Use acceptsLanguages instead");d.range=function range(e,a){var range=this.get("Range");if(!range)return;return p(e,range,a)};d.param=function param(e,a){var i=this.params||{};var n=this.body||{};var r=this.query||{};var o=arguments.length===1?"name":"name, default";t("req.param("+o+"): Use req.params, req.body, or req.query instead");if(null!=i[e]&&i.hasOwnProperty(e))return i[e];if(null!=n[e])return n[e];if(null!=r[e])return r[e];return a};d.is=function is(e){var a=e;if(!Array.isArray(e)){a=new Array(arguments.length);for(var i=0;i<a.length;i++){a[i]=arguments[i]}}return o(this,a)};defineGetter(d,"protocol",function protocol(){var e=this.connection.encrypted?"https":"http";var a=this.app.get("trust proxy fn");if(!a(this.connection.remoteAddress,0)){return e}var i=this.get("X-Forwarded-Proto")||e;var n=i.indexOf(",");return n!==-1?i.substring(0,n).trim():i.trim()});defineGetter(d,"secure",function secure(){return this.protocol==="https"});defineGetter(d,"ip",function ip(){var e=this.app.get("trust proxy fn");return u(this,e)});defineGetter(d,"ips",function ips(){var e=this.app.get("trust proxy fn");var a=u.all(this,e);a.reverse().pop();return a});defineGetter(d,"subdomains",function subdomains(){var e=this.hostname;if(!e)return[];var a=this.app.get("subdomain offset");var subdomains=!r(e)?e.split(".").reverse():[e];return subdomains.slice(a)});defineGetter(d,"path",function path(){return l(this).pathname});defineGetter(d,"hostname",function hostname(){var e=this.app.get("trust proxy fn");var a=this.get("X-Forwarded-Host");if(!a||!e(this.connection.remoteAddress,0)){a=this.get("Host")}else if(a.indexOf(",")!==-1){a=a.substring(0,a.indexOf(",")).trimRight()}if(!a)return;var i=a[0]==="["?a.indexOf("]")+1:0;var n=a.indexOf(":",i);return n!==-1?a.substring(0,n):a});defineGetter(d,"host",t.function(function host(){return this.hostname},"req.host: Use req.hostname instead"));defineGetter(d,"fresh",function(){var e=this.method;var a=this.res;var i=a.statusCode;if("GET"!==e&&"HEAD"!==e)return false;if(i>=200&&i<300||304===i){return c(this.headers,{etag:a.get("ETag"),"last-modified":a.get("Last-Modified")})}return false});defineGetter(d,"stale",function stale(){return!this.fresh});defineGetter(d,"xhr",function xhr(){var e=this.get("X-Requested-With")||"";return e.toLowerCase()==="xmlhttprequest"});function defineGetter(e,a,i){Object.defineProperty(e,a,{configurable:true,enumerable:true,get:i})}},4934:(e,a,i)=>{"use strict";var n=i(1894).Buffer;var t=i(3921);var r=i(8883)("express");var o=i(6592);var s=i(4070);var c=i(8605);var p=i(3561).isAbsolute;var l=i(4694);var u=i(5622);var d=i(7415);var m=i(4429);var f=i(1579).sign;var v=i(3561).normalizeType;var x=i(3561).normalizeTypes;var h=i(3561).setCharset;var g=i(3658);var b=i(5287);var y=u.extname;var w=b.mime;var k=u.resolve;var j=i(5931);var E=Object.create(c.ServerResponse.prototype);e.exports=E;var S=/;\s*charset\s*=/;E.status=function status(e){this.statusCode=e;return this};E.links=function(e){var a=this.get("Link")||"";if(a)a+=", ";return this.set("Link",a+Object.keys(e).map(function(a){return"<"+e[a]+'>; rel="'+a+'"'}).join(", "))};E.send=function send(e){var a=e;var i;var t=this.req;var o;var s=this.app;if(arguments.length===2){if(typeof arguments[0]!=="number"&&typeof arguments[1]==="number"){r("res.send(body, status): Use res.status(status).send(body) instead");this.statusCode=arguments[1]}else{r("res.send(status, body): Use res.status(status).send(body) instead");this.statusCode=arguments[0];a=arguments[1]}}if(typeof a==="number"&&arguments.length===1){if(!this.get("Content-Type")){this.type("txt")}r("res.send(status): Use res.sendStatus(status) instead");this.statusCode=a;a=d[a]}switch(typeof a){case"string":if(!this.get("Content-Type")){this.type("html")}break;case"boolean":case"number":case"object":if(a===null){a=""}else if(n.isBuffer(a)){if(!this.get("Content-Type")){this.type("bin")}}else{return this.json(a)}break}if(typeof a==="string"){i="utf8";o=this.get("Content-Type");if(typeof o==="string"){this.set("Content-Type",h(o,"utf-8"))}}var c=s.get("etag fn");var p=!this.get("ETag")&&typeof c==="function";var l;if(a!==undefined){if(n.isBuffer(a)){l=a.length}else if(!p&&a.length<1e3){l=n.byteLength(a,i)}else{a=n.from(a,i);i=undefined;l=a.length}this.set("Content-Length",l)}var u;if(p&&l!==undefined){if(u=c(a,i)){this.set("ETag",u)}}if(t.fresh)this.statusCode=304;if(204===this.statusCode||304===this.statusCode){this.removeHeader("Content-Type");this.removeHeader("Content-Length");this.removeHeader("Transfer-Encoding");a=""}if(t.method==="HEAD"){this.end()}else{this.end(a,i)}return this};E.json=function json(e){var a=e;if(arguments.length===2){if(typeof arguments[1]==="number"){r("res.json(obj, status): Use res.status(status).json(obj) instead");this.statusCode=arguments[1]}else{r("res.json(status, obj): Use res.status(status).json(obj) instead");this.statusCode=arguments[0];a=arguments[1]}}var i=this.app;var n=i.get("json escape");var t=i.get("json replacer");var o=i.get("json spaces");var s=stringify(a,t,o,n);if(!this.get("Content-Type")){this.set("Content-Type","application/json")}return this.send(s)};E.jsonp=function jsonp(e){var a=e;if(arguments.length===2){if(typeof arguments[1]==="number"){r("res.jsonp(obj, status): Use res.status(status).json(obj) instead");this.statusCode=arguments[1]}else{r("res.jsonp(status, obj): Use res.status(status).jsonp(obj) instead");this.statusCode=arguments[0];a=arguments[1]}}var i=this.app;var n=i.get("json escape");var t=i.get("json replacer");var o=i.get("json spaces");var s=stringify(a,t,o,n);var c=this.req.query[i.get("jsonp callback name")];if(!this.get("Content-Type")){this.set("X-Content-Type-Options","nosniff");this.set("Content-Type","application/json")}if(Array.isArray(c)){c=c[0]}if(typeof c==="string"&&c.length!==0){this.set("X-Content-Type-Options","nosniff");this.set("Content-Type","text/javascript");c=c.replace(/[^\[\]\w$.]/g,"");s=s.replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029");s="/**/ typeof "+c+" === 'function' && "+c+"("+s+");"}return this.send(s)};E.sendStatus=function sendStatus(e){var a=d[e]||String(e);this.statusCode=e;this.type("txt");return this.send(a)};E.sendFile=function sendFile(e,a,i){var n=i;var t=this.req;var r=this;var o=t.next;var s=a||{};if(!e){throw new TypeError("path argument is required to res.sendFile")}if(typeof e!=="string"){throw new TypeError("path must be a string to res.sendFile")}if(typeof a==="function"){n=a;s={}}if(!s.root&&!p(e)){throw new TypeError("path must be absolute or specify root to res.sendFile")}var c=encodeURI(e);var l=b(t,c,s);sendfile(r,l,s,function(e){if(n)return n(e);if(e&&e.code==="EISDIR")return o();if(e&&e.code!=="ECONNABORTED"&&e.syscall!=="write"){o(e)}})};E.sendfile=function(e,a,i){var n=i;var t=this.req;var r=this;var o=t.next;var s=a||{};if(typeof a==="function"){n=a;s={}}var c=b(t,e,s);sendfile(r,c,s,function(e){if(n)return n(e);if(e&&e.code==="EISDIR")return o();if(e&&e.code!=="ECONNABORTED"&&e.syscall!=="write"){o(e)}})};E.sendfile=r.function(E.sendfile,"res.sendfile: Use res.sendFile instead");E.download=function download(e,a,i,n){var r=n;var o=a;var s=i||null;if(typeof a==="function"){r=a;o=null;s=null}else if(typeof i==="function"){r=i;s=null}var c={"Content-Disposition":t(o||e)};if(s&&s.headers){var p=Object.keys(s.headers);for(var l=0;l<p.length;l++){var u=p[l];if(u.toLowerCase()!=="content-disposition"){c[u]=s.headers[u]}}}s=Object.create(s);s.headers=c;var d=k(e);return this.sendFile(d,s,r)};E.contentType=E.type=function contentType(e){var a=e.indexOf("/")===-1?w.lookup(e):e;return this.set("Content-Type",a)};E.format=function(e){var a=this.req;var i=a.next;var n=e.default;if(n)delete e.default;var t=Object.keys(e);var r=t.length>0?a.accepts(t):false;this.vary("Accept");if(r){this.set("Content-Type",v(r).value);e[r](a,this,i)}else if(n){n()}else{var o=new Error("Not Acceptable");o.status=o.statusCode=406;o.types=x(t).map(function(e){return e.value});i(o)}return this};E.attachment=function attachment(e){if(e){this.type(y(e))}this.set("Content-Disposition",t(e));return this};E.append=function append(e,a){var i=this.get(e);var n=a;if(i){n=Array.isArray(i)?i.concat(a):Array.isArray(a)?[i].concat(a):[i,a]}return this.set(e,n)};E.set=E.header=function header(e,a){if(arguments.length===2){var i=Array.isArray(a)?a.map(String):String(a);if(e.toLowerCase()==="content-type"){if(Array.isArray(i)){throw new TypeError("Content-Type cannot be set to an Array")}if(!S.test(i)){var n=w.charsets.lookup(i.split(";")[0]);if(n)i+="; charset="+n.toLowerCase()}}this.setHeader(e,i)}else{for(var t in e){this.set(t,e[t])}}return this};E.get=function(e){return this.getHeader(e)};E.clearCookie=function clearCookie(e,a){var i=m({expires:new Date(1),path:"/"},a);return this.cookie(e,"",i)};E.cookie=function(e,a,i){var n=m({},i);var t=this.req.secret;var r=n.signed;if(r&&!t){throw new Error('cookieParser("secret") required for signed cookies')}var o=typeof a==="object"?"j:"+JSON.stringify(a):String(a);if(r){o="s:"+f(o,t)}if("maxAge"in n){n.expires=new Date(Date.now()+n.maxAge);n.maxAge/=1e3}if(n.path==null){n.path="/"}this.append("Set-Cookie",g.serialize(e,String(o),n));return this};E.location=function location(e){var a=e;if(e==="back"){a=this.req.get("Referrer")||"/"}return this.set("Location",o(a))};E.redirect=function redirect(e){var a=e;var i;var t=302;if(arguments.length===2){if(typeof arguments[0]==="number"){t=arguments[0];a=arguments[1]}else{r("res.redirect(url, status): Use res.redirect(status, url) instead");t=arguments[1]}}a=this.location(a).get("Location");this.format({text:function(){i=d[t]+". Redirecting to "+a},html:function(){var e=s(a);i="<p>"+d[t]+'. Redirecting to <a href="'+e+'">'+e+"</a></p>"},default:function(){i=""}});this.statusCode=t;this.set("Content-Length",n.byteLength(i));if(this.req.method==="HEAD"){this.end()}else{this.end(i)}};E.vary=function(e){if(!e||Array.isArray(e)&&!e.length){r("res.vary(): Provide a field name");return this}j(this,e);return this};E.render=function render(e,a,i){var n=this.req.app;var t=i;var r=a||{};var o=this.req;var s=this;if(typeof a==="function"){t=a;r={}}r._locals=s.locals;t=t||function(e,a){if(e)return o.next(e);s.send(a)};n.render(e,r,t)};function sendfile(e,a,i,n){var t=false;var r;function onaborted(){if(t)return;t=true;var e=new Error("Request aborted");e.code="ECONNABORTED";n(e)}function ondirectory(){if(t)return;t=true;var e=new Error("EISDIR, read");e.code="EISDIR";n(e)}function onerror(e){if(t)return;t=true;n(e)}function onend(){if(t)return;t=true;n()}function onfile(){r=false}function onfinish(e){if(e&&e.code==="ECONNRESET")return onaborted();if(e)return onerror(e);if(t)return;setImmediate(function(){if(r!==false&&!t){onaborted();return}if(t)return;t=true;n()})}function onstream(){r=true}a.on("directory",ondirectory);a.on("end