themes-cli
Version:
A CLI to process zid theme folder
2 lines • 792 kB
JavaScript
/*! For license information please see zid-theme.js.LICENSE.txt */
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("archiver")):"function"==typeof define&&define.amd?define(["archiver"],t):"object"==typeof exports?exports.cli=t(require("archiver")):e.cli=t(e.archiver)}(global,(e=>(()=>{var t={2594:(e,t,n)=>{"use strict";var i=n(1297),a=n(6049);function o(e){if(!(this instanceof o))return new o(e);this.headers=e.headers,this.negotiator=new i(e)}function r(e){return-1===e.indexOf("/")?a.lookup(e):e}function s(e){return"string"==typeof e}e.exports=o,o.prototype.type=o.prototype.types=function(e){var t=e;if(t&&!Array.isArray(t)){t=new Array(arguments.length);for(var n=0;n<t.length;n++)t[n]=arguments[n]}if(!t||0===t.length)return this.negotiator.mediaTypes();if(!this.headers.accept)return t[0];var i=t.map(r),a=this.negotiator.mediaTypes(i.filter(s))[0];return!!a&&t[i.indexOf(a)]},o.prototype.encoding=o.prototype.encodings=function(e){var t=e;if(t&&!Array.isArray(t)){t=new Array(arguments.length);for(var n=0;n<t.length;n++)t[n]=arguments[n]}return t&&0!==t.length?this.negotiator.encodings(t)[0]||!1:this.negotiator.encodings()},o.prototype.charset=o.prototype.charsets=function(e){var t=e;if(t&&!Array.isArray(t)){t=new Array(arguments.length);for(var n=0;n<t.length;n++)t[n]=arguments[n]}return t&&0!==t.length?this.negotiator.charsets(t)[0]||!1:this.negotiator.charsets()},o.prototype.lang=o.prototype.langs=o.prototype.language=o.prototype.languages=function(e){var t=e;if(t&&!Array.isArray(t)){t=new Array(arguments.length);for(var n=0;n<t.length;n++)t[n]=arguments[n]}return t&&0!==t.length?this.negotiator.languages(t)[0]||!1:this.negotiator.languages()}},283:(e,t,n)=>{const i=n(4070),a=n(6928),o=n(16),r=n(7224),s=(e,t)=>"boolean"==typeof e?e:t,c=(e,t)=>"string"==typeof e?e:t,p={noSort:!1,readEntries:!1,method:i.Constants.NONE,fs:null};e.exports=function(e,t){let n=null;const l=Object.assign(Object.create(null),p);e&&"object"==typeof e&&(e instanceof Uint8Array||(Object.assign(l,e),e=l.input?l.input:void 0,l.input&&delete l.input),Buffer.isBuffer(e)&&(n=e,l.method=i.Constants.BUFFER,e=void 0)),Object.assign(l,t);const u=new i(l);if(e&&"string"==typeof e){if(!u.fs.existsSync(e))throw new Error(i.Errors.INVALID_FILENAME);l.method=i.Constants.FILE,l.filename=e,n=u.fs.readFileSync(e)}const d=new r(n,l),{canonical:f,sanitize:m}=i;function h(e){var t;return e&&d&&("string"==typeof e&&(t=d.getEntry(e)),"object"==typeof e&&void 0!==e.entryName&&void 0!==e.header&&(t=d.getEntry(e.entryName)),t)?t:null}function v(e){const{join:t,normalize:n,sep:i}=a.posix;return t(".",n(i+e.split("\\").join(i)+i))}return{readFile:function(e,t){var n=h(e);return n&&n.getData(t)||null},readFileAsync:function(e,t){var n=h(e);n?n.getDataAsync(t):t(null,"getEntry failed for:"+e)},readAsText:function(e,t){var n=h(e);if(n){var i=n.getData();if(i&&i.length)return i.toString(t||"utf8")}return""},readAsTextAsync:function(e,t,n){var i=h(e);i?i.getDataAsync((function(e,i){i?t(e,i):e&&e.length?t(e.toString(n||"utf8")):t("")})):t("")},deleteFile:function(e){var t=h(e);t&&d.deleteEntry(t.entryName)},addZipComment:function(e){d.comment=e},getZipComment:function(){return d.comment||""},addZipEntryComment:function(e,t){var n=h(e);n&&(n.comment=t)},getZipEntryComment:function(e){var t=h(e);return t&&t.comment||""},updateFile:function(e,t){var n=h(e);n&&n.setData(t)},addLocalFile:function(e,t,n,a){if(!u.fs.existsSync(e))throw new Error(i.Errors.FILE_NOT_FOUND.replace("%s",e));{t=t?v(t):"";var o=e.split("\\").join("/").split("/").pop();t+=n||o;const i=u.fs.statSync(e);this.addFile(t,u.fs.readFileSync(e),a,i)}},addLocalFolder:function(e,t,n,o){var r;if(n instanceof RegExp?(r=n,n=function(e){return r.test(e)}):"function"!=typeof n&&(n=function(){return!0}),t=t?v(t):"",e=a.normalize(e),!u.fs.existsSync(e))throw new Error(i.Errors.FILE_NOT_FOUND.replace("%s",e));{const i=u.findFiles(e),r=this;i.length&&i.forEach((function(i){var s=a.relative(e,i).split("\\").join("/");if(n(s)){var c=u.fs.statSync(i);c.isFile()?r.addFile(t+s,u.fs.readFileSync(i),"",o||c):r.addFile(t+s+"/",Buffer.alloc(0),"",o||c)}}))}},addLocalFolderAsync:function(e,t,n,o){var r;o instanceof RegExp?(r=o,o=function(e){return r.test(e)}):"function"!=typeof o&&(o=function(){return!0}),n=n?v(n):"",e=a.normalize(e);var s=this;u.fs.open(e,"r",(function(r){if(r&&"ENOENT"===r.code)t(void 0,i.Errors.FILE_NOT_FOUND.replace("%s",e));else if(r)t(void 0,r);else{var c=u.findFiles(e),p=-1,l=function(){if((p+=1)<c.length){var i=c[p],r=a.relative(e,i).split("\\").join("/");r=r.normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/[^\x20-\x7E]/g,""),o(r)?u.fs.stat(i,(function(e,a){e&&t(void 0,e),a.isFile()?u.fs.readFile(i,(function(e,i){e?t(void 0,e):(s.addFile(n+r,i,"",a),l())})):(s.addFile(n+r+"/",Buffer.alloc(0),"",a),l())})):process.nextTick((()=>{l()}))}else t(!0,void 0)};l()}}))},addLocalFolderPromise:function(e,t){return new Promise(((n,i)=>{const{filter:a,zipPath:o}=Object.assign({},t);this.addLocalFolderAsync(e,((e,t)=>{t&&i(t),e&&n(this)}),o,a)}))},addFile:function(e,t,n,a){let r=h(e);const s=null!=r;s||(r=new o,r.entryName=i.canonical(e)),r.comment=n||"";const c="object"==typeof a&&a instanceof u.fs.Stats;c&&(r.header.time=a.mtime);var p=r.isDirectory?16:0;let l=r.isDirectory?16384:32768;return l|=c?4095&a.mode:"number"==typeof a?4095&a:r.isDirectory?493:420,p=(p|l<<16)>>>0,r.attr=p,r.setData(t),s||d.setEntry(r),r},getEntries:function(e){return d.password=e,d?d.entries:[]},getEntry:function(e){return h(e)},getEntryCount:function(){return d.getEntryCount()},forEach:function(e){return d.forEach(e)},extractEntryTo:function(e,t,n,o,r,p){o=s(o,!1),r=s(r,!1),n=s(n,!0),p=c(p,c(r,void 0));var l=h(e);if(!l)throw new Error(i.Errors.NO_ENTRY);var v=f(l.entryName),g=m(t,p&&!l.isDirectory?p:n?v:a.basename(v));if(l.isDirectory)return d.getEntryChildren(l).forEach((function(e){if(e.isDirectory)return;var s=e.getData();if(!s)throw new Error(i.Errors.CANT_EXTRACT_FILE);var c=f(e.entryName),p=m(t,n?c:a.basename(c));const l=r?e.header.fileAttr:void 0;u.writeFileTo(p,s,o,l)})),!0;var x=l.getData(d.password);if(!x)throw new Error(i.Errors.CANT_EXTRACT_FILE);if(u.fs.existsSync(g)&&!o)throw new Error(i.Errors.CANT_OVERRIDE);const b=r?e.header.fileAttr:void 0;return u.writeFileTo(g,x,o,b),!0},test:function(e){if(!d)return!1;for(var t in d.entries)try{if(t.isDirectory)continue;if(!d.entries[t].getData(e))return!1}catch(e){return!1}return!0},extractAllTo:function(e,t,n,a){if(t=s(t,!1),a=c(n,a),n=s(n,!1),!d)throw new Error(i.Errors.NO_ZIP);d.entries.forEach((function(o){var r=m(e,f(o.entryName.toString()));if(o.isDirectory)return void u.makeDir(r);var s=o.getData(a);if(!s)throw new Error(i.Errors.CANT_EXTRACT_FILE);const c=n?o.header.fileAttr:void 0;u.writeFileTo(r,s,t,c);try{u.fs.utimesSync(r,o.header.time,o.header.time)}catch(e){throw new Error(i.Errors.CANT_EXTRACT_FILE)}}))},extractAllToAsync:function(e,t,n,o){if("function"!=typeof t||o||(o=t),t=s(t,!1),"function"!=typeof n||o||(o=n),n=s(n,!1),!o)return new Promise(((i,a)=>{this.extractAllToAsync(e,t,n,(function(e){e?a(e):i(this)}))}));if(!d)return void o(new Error(i.Errors.NO_ZIP));e=a.resolve(e);const r=t=>m(e,a.normalize(f(t.entryName.toString()))),c=(e,t)=>new Error(e+': "'+t+'"'),p=[],l=[];d.entries.forEach((e=>{e.isDirectory?p.push(e):l.push(e)}));for(const e of p){const t=r(e),i=n?e.header.fileAttr:void 0;try{u.makeDir(t),i&&u.fs.chmodSync(t,i),u.fs.utimesSync(t,e.header.time,e.header.time)}catch(e){o(c("Unable to create folder",t))}}l.reverse().reduce((function(o,r){return function(s){if(s)o(s);else{const s=a.normalize(f(r.entryName.toString())),p=m(e,s);r.getDataAsync((function(e,a){if(a)o(new Error(a));else if(e){const i=n?r.header.fileAttr:void 0;u.writeFileToAsync(p,e,t,i,(function(e){e||o(c("Unable to write file",p)),u.fs.utimes(p,r.header.time,r.header.time,(function(e){e?o(c("Unable to set times",p)):o()}))}))}else o(new Error(i.Errors.CANT_EXTRACT_FILE))}))}}}),o)()},writeZip:function(e,t){if(1===arguments.length&&"function"==typeof e&&(t=e,e=""),!e&&l.filename&&(e=l.filename),e){var n=d.compressToBuffer();if(n){var i=u.writeFileTo(e,n,!0);"function"==typeof t&&t(i?null:new Error("failed"),"")}}},writeZipPromise:function(e,t){const{overwrite:n,perm:i}=Object.assign({overwrite:!0},t);return new Promise(((t,a)=>{!e&&l.filename&&(e=l.filename),e||a("ADM-ZIP: ZIP File Name Missing"),this.toBufferPromise().then((o=>{u.writeFileToAsync(e,o,n,i,(e=>e?t(e):a("ADM-ZIP: Wasn't able to write zip file")))}),a)}))},toBufferPromise:function(){return new Promise(((e,t)=>{d.toAsyncBuffer(e,t)}))},toBuffer:function(e,t,n,i){return this.valueOf=2,"function"==typeof e?(d.toAsyncBuffer(e,t,n,i),null):d.compressToBuffer()}}}},974:(e,t,n)=>{var i=n(4070),a=i.Constants;e.exports=function(){var e=20,t=10,n=0,o=0,r=0,s=0,c=0,p=0,l=0,u=0,d=0,f=0,m=0,h=0,v=0;e|=i.isWin?2560:768,n|=a.FLG_EFS;var g={};function x(e){e=new Date(e),r=(e.getFullYear()-1980&127)<<25|e.getMonth()+1<<21|e.getDate()<<16|e.getHours()<<11|e.getMinutes()<<5|e.getSeconds()>>1}return x(+new Date),{get made(){return e},set made(t){e=t},get version(){return t},set version(e){t=e},get flags(){return n},set flags(e){n=e},get method(){return o},set method(e){switch(e){case a.STORED:this.version=10;case a.DEFLATED:default:this.version=20}o=e},get time(){return new Date(1980+(r>>25&127),(r>>21&15)-1,r>>16&31,r>>11&31,r>>5&63,(31&r)<<1)},set time(e){x(e)},get timeHighByte(){return r>>>8&255},get crc(){return s},set crc(e){s=Math.max(0,e)>>>0},get compressedSize(){return c},set compressedSize(e){c=Math.max(0,e)>>>0},get size(){return p},set size(e){p=Math.max(0,e)>>>0},get fileNameLength(){return l},set fileNameLength(e){l=e},get extraLength(){return u},set extraLength(e){u=e},get commentLength(){return d},set commentLength(e){d=e},get diskNumStart(){return f},set diskNumStart(e){f=Math.max(0,e)>>>0},get inAttr(){return m},set inAttr(e){m=Math.max(0,e)>>>0},get attr(){return h},set attr(e){h=Math.max(0,e)>>>0},get fileAttr(){return h?h>>>0>>16&4095:0},get offset(){return v},set offset(e){v=Math.max(0,e)>>>0},get encrypted(){return!(1&~n)},get centralHeaderSize(){return a.CENHDR+l+u+d},get realDataOffset(){return v+a.LOCHDR+g.fnameLen+g.extraLen},get localHeader(){return g},loadLocalHeaderFromBinary:function(e){var t=e.slice(v,v+a.LOCHDR);if(t.readUInt32LE(0)!==a.LOCSIG)throw new Error(i.Errors.INVALID_LOC);g={version:t.readUInt16LE(a.LOCVER),flags:t.readUInt16LE(a.LOCFLG),method:t.readUInt16LE(a.LOCHOW),time:t.readUInt32LE(a.LOCTIM),crc:t.readUInt32LE(a.LOCCRC),compressedSize:t.readUInt32LE(a.LOCSIZ),size:t.readUInt32LE(a.LOCLEN),fnameLen:t.readUInt16LE(a.LOCNAM),extraLen:t.readUInt16LE(a.LOCEXT)}},loadFromBinary:function(g){if(g.length!==a.CENHDR||g.readUInt32LE(0)!==a.CENSIG)throw new Error(i.Errors.INVALID_CEN);e=g.readUInt16LE(a.CENVEM),t=g.readUInt16LE(a.CENVER),n=g.readUInt16LE(a.CENFLG),o=g.readUInt16LE(a.CENHOW),r=g.readUInt32LE(a.CENTIM),s=g.readUInt32LE(a.CENCRC),c=g.readUInt32LE(a.CENSIZ),p=g.readUInt32LE(a.CENLEN),l=g.readUInt16LE(a.CENNAM),u=g.readUInt16LE(a.CENEXT),d=g.readUInt16LE(a.CENCOM),f=g.readUInt16LE(a.CENDSK),m=g.readUInt16LE(a.CENATT),h=g.readUInt32LE(a.CENATX),v=g.readUInt32LE(a.CENOFF)},localHeaderToBinary:function(){var e=Buffer.alloc(a.LOCHDR);return e.writeUInt32LE(a.LOCSIG,0),e.writeUInt16LE(t,a.LOCVER),e.writeUInt16LE(n,a.LOCFLG),e.writeUInt16LE(o,a.LOCHOW),e.writeUInt32LE(r,a.LOCTIM),e.writeUInt32LE(s,a.LOCCRC),e.writeUInt32LE(c,a.LOCSIZ),e.writeUInt32LE(p,a.LOCLEN),e.writeUInt16LE(l,a.LOCNAM),e.writeUInt16LE(u,a.LOCEXT),e},centralHeaderToBinary:function(){var i=Buffer.alloc(a.CENHDR+l+u+d);return i.writeUInt32LE(a.CENSIG,0),i.writeUInt16LE(e,a.CENVEM),i.writeUInt16LE(t,a.CENVER),i.writeUInt16LE(n,a.CENFLG),i.writeUInt16LE(o,a.CENHOW),i.writeUInt32LE(r,a.CENTIM),i.writeUInt32LE(s,a.CENCRC),i.writeUInt32LE(c,a.CENSIZ),i.writeUInt32LE(p,a.CENLEN),i.writeUInt16LE(l,a.CENNAM),i.writeUInt16LE(u,a.CENEXT),i.writeUInt16LE(d,a.CENCOM),i.writeUInt16LE(f,a.CENDSK),i.writeUInt16LE(m,a.CENATT),i.writeUInt32LE(h,a.CENATX),i.writeUInt32LE(v,a.CENOFF),i.fill(0,a.CENHDR),i},toJSON:function(){const r=function(e){return e+" bytes"};return{made:e,version:t,flags:n,method:i.methodToString(o),time:this.time,crc:"0x"+s.toString(16).toUpperCase(),compressedSize:r(c),size:r(p),fileNameLength:r(l),extraLength:r(u),commentLength:r(d),diskNumStart:f,inAttr:m,attr:h,offset:v,centralHeaderSize:r(a.CENHDR+l+u+d)}},toString:function(){return JSON.stringify(this.toJSON(),null,"\t")}}}},6780:(e,t,n)=>{t.EntryHeader=n(974),t.MainHeader=n(2138)},2138:(e,t,n)=>{var i=n(4070),a=i.Constants;e.exports=function(){var e=0,t=0,n=0,o=0,r=0;return{get diskEntries(){return e},set diskEntries(n){e=t=n},get totalEntries(){return t},set totalEntries(n){t=e=n},get size(){return n},set size(e){n=e},get offset(){return o},set offset(e){o=e},get commentLength(){return r},set commentLength(e){r=e},get mainHeaderSize(){return a.ENDHDR+r},loadFromBinary:function(s){if((s.length!==a.ENDHDR||s.readUInt32LE(0)!==a.ENDSIG)&&(s.length<a.ZIP64HDR||s.readUInt32LE(0)!==a.ZIP64SIG))throw new Error(i.Errors.INVALID_END);s.readUInt32LE(0)===a.ENDSIG?(e=s.readUInt16LE(a.ENDSUB),t=s.readUInt16LE(a.ENDTOT),n=s.readUInt32LE(a.ENDSIZ),o=s.readUInt32LE(a.ENDOFF),r=s.readUInt16LE(a.ENDCOM)):(e=i.readBigUInt64LE(s,a.ZIP64SUB),t=i.readBigUInt64LE(s,a.ZIP64TOT),n=i.readBigUInt64LE(s,a.ZIP64SIZE),o=i.readBigUInt64LE(s,a.ZIP64OFF),r=0)},toBinary:function(){var i=Buffer.alloc(a.ENDHDR+r);return i.writeUInt32LE(a.ENDSIG,0),i.writeUInt32LE(0,4),i.writeUInt16LE(e,a.ENDSUB),i.writeUInt16LE(t,a.ENDTOT),i.writeUInt32LE(n,a.ENDSIZ),i.writeUInt32LE(o,a.ENDOFF),i.writeUInt16LE(r,a.ENDCOM),i.fill(" ",a.ENDHDR),i},toJSON:function(){return{diskEntries:e,totalEntries:t,size:n+" bytes",offset:function(e){let t=e.toString(16).toUpperCase();for(;t.length<4;)t="0"+t;return"0x"+t}(o),commentLength:r}},toString:function(){return JSON.stringify(this.toJSON(),null,"\t")}}}},3601:(e,t,n)=>{e.exports=function(e){var t=n(3106),i={chunkSize:1024*(parseInt(e.length/1024)+1)};return{deflate:function(){return t.deflateRawSync(e,i)},deflateAsync:function(n){var a=t.createDeflateRaw(i),o=[],r=0;a.on("data",(function(e){o.push(e),r+=e.length})),a.on("end",(function(){var e=Buffer.alloc(r),t=0;e.fill(0);for(var i=0;i<o.length;i++){var a=o[i];a.copy(e,t),t+=a.length}n&&n(e)})),a.end(e)}}}},5776:(e,t,n)=>{t.Deflater=n(3601),t.Inflater=n(5821),t.ZipCrypto=n(4014)},5821:(e,t,n)=>{const i=+(process.versions?process.versions.node:"").split(".")[0]||0;e.exports=function(e,t){var a=n(3106);const o=i>=15&&t>0?{maxOutputLength:t}:{};return{inflate:function(){return a.inflateRawSync(e,o)},inflateAsync:function(t){var n=a.createInflateRaw(o),i=[],r=0;n.on("data",(function(e){i.push(e),r+=e.length})),n.on("end",(function(){var e=Buffer.alloc(r),n=0;e.fill(0);for(var a=0;a<i.length;a++){var o=i[a];o.copy(e,n),n+=o.length}t&&t(e)})),n.end(e)}}}},4014:(e,t,n)=>{"use strict";const{randomFillSync:i}=n(6982),a=new Uint32Array(256).map(((e,t)=>{for(let e=0;e<8;e++)1&t?t=t>>>1^3988292384:t>>>=1;return t>>>0})),o=(e,t)=>Math.imul(e,t)>>>0,r=(e,t)=>a[255&(e^t)]^e>>>8,s=()=>"function"==typeof i?i(Buffer.alloc(12)):s.node();s.node=()=>{const e=Buffer.alloc(12),t=e.length;for(let n=0;n<t;n++)e[n]=256*Math.random()&255;return e};const c={genSalt:s};function p(e){const t=Buffer.isBuffer(e)?e:Buffer.from(e);this.keys=new Uint32Array([305419896,591751049,878082192]);for(let e=0;e<t.length;e++)this.updateKeys(t[e])}p.prototype.updateKeys=function(e){const t=this.keys;return t[0]=r(t[0],e),t[1]+=255&t[0],t[1]=o(t[1],134775813)+1,t[2]=r(t[2],t[1]>>>24),e},p.prototype.next=function(){const e=(2|this.keys[2])>>>0;return o(e,1^e)>>8&255},e.exports={decrypt:function(e,t,n){if(!e||!Buffer.isBuffer(e)||e.length<12)return Buffer.alloc(0);const i=function(e){const t=new p(e);return function(e){const n=Buffer.alloc(e.length);let i=0;for(let a of e)n[i++]=t.updateKeys(a^t.next());return n}}(n),a=i(e.slice(0,12)),o=8&~t.flags?t.crc>>>24:t.timeHighByte;if(a[11]!==o)throw"ADM-ZIP: Wrong Password";return i(e.slice(12))},encrypt:function(e,t,n,i=!1){null==e&&(e=Buffer.alloc(0)),Buffer.isBuffer(e)||(e=Buffer.from(e.toString()));const a=function(e){const t=new p(e);return function(e,n,i=0){n||(n=Buffer.alloc(e.length));for(let a of e){const e=t.next();n[i++]=a^e,t.updateKeys(a)}return n}}(n),o=c.genSalt();o[11]=t.crc>>>24&255,i&&(o[10]=t.crc>>>16&255);const r=Buffer.alloc(e.length+12);return a(o,r),a(e,r,12)},_salter:function(e){Buffer.isBuffer(e)&&e.length>=12?c.genSalt=function(){return e.slice(0,12)}:c.genSalt="node"===e?s.node:s}}},1383:e=>{e.exports={LOCHDR:30,LOCSIG:67324752,LOCVER:4,LOCFLG:6,LOCHOW:8,LOCTIM:10,LOCCRC:14,LOCSIZ:18,LOCLEN:22,LOCNAM:26,LOCEXT:28,EXTSIG:134695760,EXTHDR:16,EXTCRC:4,EXTSIZ:8,EXTLEN:12,CENHDR:46,CENSIG:33639248,CENVEM:4,CENVER:6,CENFLG:8,CENHOW:10,CENTIM:12,CENCRC:16,CENSIZ:20,CENLEN:24,CENNAM:28,CENEXT:30,CENCOM:32,CENDSK:34,CENATT:36,CENATX:38,CENOFF:42,ENDHDR:22,ENDSIG:101010256,ENDSUB:8,ENDTOT:10,ENDSIZ:12,ENDOFF:16,ENDCOM:20,END64HDR:20,END64SIG:117853008,END64START:4,END64OFF:8,END64NUMDISKS:16,ZIP64SIG:101075792,ZIP64HDR:56,ZIP64LEAD:12,ZIP64SIZE:4,ZIP64VEM:12,ZIP64VER:14,ZIP64DSK:16,ZIP64DSKDIR:20,ZIP64SUB:24,ZIP64TOT:32,ZIP64SIZB:40,ZIP64OFF:48,ZIP64EXTRA:56,STORED:0,SHRUNK:1,REDUCED1:2,REDUCED2:3,REDUCED3:4,REDUCED4:5,IMPLODED:6,DEFLATED:8,ENHANCED_DEFLATED:9,PKWARE:10,BZIP2:12,LZMA:14,IBM_TERSE:18,IBM_LZ77:19,AES_ENCRYPT:99,FLG_ENC:1,FLG_COMP1:2,FLG_COMP2:4,FLG_DESC:8,FLG_ENH:16,FLG_PATCH:32,FLG_STR:64,FLG_EFS:2048,FLG_MSK:4096,FILE:2,BUFFER:1,NONE:0,EF_ID:0,EF_SIZE:2,ID_ZIP64:1,ID_AVINFO:7,ID_PFS:8,ID_OS2:9,ID_NTFS:10,ID_OPENVMS:12,ID_UNIX:13,ID_FORK:14,ID_PATCH:15,ID_X509_PKCS7:20,ID_X509_CERTID_F:21,ID_X509_CERTID_C:22,ID_STRONGENC:23,ID_RECORD_MGT:24,ID_X509_PKCS7_RL:25,ID_IBM1:101,ID_IBM2:102,ID_POSZIP:18064,EF_ZIP64_OR_32:4294967295,EF_ZIP64_OR_16:65535,EF_ZIP64_SUNCOMP:0,EF_ZIP64_SCOMP:8,EF_ZIP64_RHO:16,EF_ZIP64_DSN:24}},1243:e=>{e.exports={INVALID_LOC:"Invalid LOC header (bad signature)",INVALID_CEN:"Invalid CEN header (bad signature)",INVALID_END:"Invalid END header (bad signature)",NO_DATA:"Nothing to decompress",BAD_CRC:"CRC32 checksum failed",FILE_IN_THE_WAY:"There is a file in the way: %s",UNKNOWN_METHOD:"Invalid/unsupported compression method",AVAIL_DATA:"inflate::Available inflate data did not terminate",INVALID_DISTANCE:"inflate::Invalid literal/length or distance code in fixed or dynamic block",TO_MANY_CODES:"inflate::Dynamic block code description: too many length or distance codes",INVALID_REPEAT_LEN:"inflate::Dynamic block code description: repeat more than specified lengths",INVALID_REPEAT_FIRST:"inflate::Dynamic block code description: repeat lengths with no first length",INCOMPLETE_CODES:"inflate::Dynamic block code description: code lengths codes incomplete",INVALID_DYN_DISTANCE:"inflate::Dynamic block code description: invalid distance code lengths",INVALID_CODES_LEN:"inflate::Dynamic block code description: invalid literal/length code lengths",INVALID_STORE_BLOCK:"inflate::Stored block length did not match one's complement",INVALID_BLOCK_TYPE:"inflate::Invalid block type (type == 3)",CANT_EXTRACT_FILE:"Could not extract the file",CANT_OVERRIDE:"Target file already exists",DISK_ENTRY_TOO_LARGE:"Number of disk entries is too large",NO_ZIP:"No zip file was loaded",NO_ENTRY:"Entry doesn't exist",DIRECTORY_CONTENT_ERROR:"A directory cannot have content",FILE_NOT_FOUND:"File not found: %s",NOT_IMPLEMENTED:"Not implemented",INVALID_FILENAME:"Invalid filename",INVALID_FORMAT:"Invalid or unsupported zip format. No END header found"}},7819:(e,t,n)=>{const i=n(7807).require(),a=n(6928);i.existsSync=i.existsSync||a.existsSync,e.exports=function(e){var t=e||"",n={directory:!1,readonly:!1,hidden:!1,executable:!1,mtime:0,atime:0},o=null;return t&&i.existsSync(t)?(o=i.statSync(t),n.directory=o.isDirectory(),n.mtime=o.mtime,n.atime=o.atime,n.executable=!!(73&o.mode),n.readonly=!(128&o.mode),n.hidden="."===a.basename(t)[0]):console.warn("Invalid path: "+t),{get directory(){return n.directory},get readOnly(){return n.readonly},get hidden(){return n.hidden},get mtime(){return n.mtime},get atime(){return n.atime},get executable(){return n.executable},decodeAttributes:function(){},encodeAttributes:function(){},toJSON:function(){return{path:t,isDirectory:n.directory,isReadOnly:n.readonly,isHidden:n.hidden,isExecutable:n.executable,mTime:n.mtime,aTime:n.atime}},toString:function(){return JSON.stringify(this.toJSON(),null,"\t")}}}},7807:(e,t,n)=>{t.require=function(){if("object"==typeof process&&process.versions&&process.versions.electron)try{const e=n(522);if(Object.keys(e).length>0)return e}catch(e){}return n(9896)}},4070:(e,t,n)=>{e.exports=n(1527),e.exports.Constants=n(1383),e.exports.Errors=n(1243),e.exports.FileAttr=n(7819)},1527:(e,t,n)=>{const i=n(7807).require(),a=n(6928),o=n(1383),r=n(1243),s="object"==typeof process&&"win32"===process.platform,c=e=>e&&"object"==typeof e,p=new Uint32Array(256).map(((e,t)=>{for(let e=0;e<8;e++)1&t?t=3988292384^t>>>1:t>>>=1;return t>>>0}));function l(e){this.sep=a.sep,this.fs=i,c(e)&&c(e.fs)&&"function"==typeof e.fs.statSync&&(this.fs=e.fs)}e.exports=l,l.prototype.makeDir=function(e){const t=this;!function(e){let n=e.split(t.sep)[0];e.split(t.sep).forEach((function(e){if(e&&":"!==e.substr(-1,1)){var i;n+=t.sep+e;try{i=t.fs.statSync(n)}catch(e){t.fs.mkdirSync(n)}if(i&&i.isFile())throw r.FILE_IN_THE_WAY.replace("%s",n)}}))}(e)},l.prototype.writeFileTo=function(e,t,n,i){const o=this;if(o.fs.existsSync(e)){if(!n)return!1;if(o.fs.statSync(e).isDirectory())return!1}var r,s=a.dirname(e);o.fs.existsSync(s)||o.makeDir(s);try{r=o.fs.openSync(e,"w",438)}catch(t){o.fs.chmodSync(e,438),r=o.fs.openSync(e,"w",438)}if(r)try{o.fs.writeSync(r,t,0,t.length,0)}finally{o.fs.closeSync(r)}return o.fs.chmodSync(e,i||438),!0},l.prototype.writeFileToAsync=function(e,t,n,i,o){"function"==typeof i&&(o=i,i=void 0);const r=this;r.fs.exists(e,(function(s){if(s&&!n)return o(!1);r.fs.stat(e,(function(n,c){if(s&&c.isDirectory())return o(!1);var p=a.dirname(e);r.fs.exists(p,(function(n){n||r.makeDir(p),r.fs.open(e,"w",438,(function(n,a){n?r.fs.chmod(e,438,(function(){r.fs.open(e,"w",438,(function(n,a){r.fs.write(a,t,0,t.length,0,(function(){r.fs.close(a,(function(){r.fs.chmod(e,i||438,(function(){o(!0)}))}))}))}))})):a?r.fs.write(a,t,0,t.length,0,(function(){r.fs.close(a,(function(){r.fs.chmod(e,i||438,(function(){o(!0)}))}))})):r.fs.chmod(e,i||438,(function(){o(!0)}))}))}))}))}))},l.prototype.findFiles=function(e){const t=this;return function e(n,i,o){"boolean"==typeof i&&(o=i,i=void 0);let r=[];return t.fs.readdirSync(n).forEach((function(s){var c=a.join(n,s);t.fs.statSync(c).isDirectory()&&o&&(r=r.concat(e(c,i,o))),i&&!i.test(c)||r.push(a.normalize(c)+(t.fs.statSync(c).isDirectory()?t.sep:""))})),r}(e,void 0,!0)},l.prototype.getAttributes=function(){},l.prototype.setAttributes=function(){},l.crc32update=function(e,t){return p[255&(e^t)]^e>>>8},l.crc32=function(e){"string"==typeof e&&(e=Buffer.from(e,"utf8")),p.length||genCRCTable();let t=e.length,n=-1;for(let i=0;i<t;)n=l.crc32update(n,e[i++]);return~n>>>0},l.methodToString=function(e){switch(e){case o.STORED:return"STORED ("+e+")";case o.DEFLATED:return"DEFLATED ("+e+")";default:return"UNSUPPORTED ("+e+")"}},l.canonical=function(e){if(!e)return"";var t=a.posix.normalize("/"+e.split("\\").join("/"));return a.join(".",t)},l.sanitize=function(e,t){e=a.resolve(a.normalize(e));for(var n=t.split("/"),i=0,o=n.length;i<o;i++){var r=a.normalize(a.join(e,n.slice(i,o).join(a.sep)));if(0===r.indexOf(e))return r}return a.normalize(a.join(e,a.basename(t)))},l.toBuffer=function(e){return Buffer.isBuffer(e)?e:e instanceof Uint8Array?Buffer.from(e):"string"==typeof e?Buffer.from(e,"utf8"):Buffer.alloc(0)},l.readBigUInt64LE=function(e,t){var n=Buffer.from(e.slice(t,t+8));return n.swap64(),parseInt(`0x${n.toString("hex")}`)},l.isWin=s,l.crcTable=p},16:(e,t,n)=>{var i=n(4070),a=n(6780),o=i.Constants,r=n(5776);e.exports=function(e){var t=new a.EntryHeader,n=Buffer.alloc(0),s=Buffer.alloc(0),c=!1,p=null,l=Buffer.alloc(0);function u(){return e&&e instanceof Uint8Array?(t.loadLocalHeaderFromBinary(e),e.slice(t.realDataOffset,t.realDataOffset+t.compressedSize)):Buffer.alloc(0)}function d(e){return!(8&~t.flags&&i.crc32(e)!==t.localHeader.crc)}function f(e,a,o){if(void 0===a&&"string"==typeof e&&(o=e,e=void 0),c)return e&&a&&a(Buffer.alloc(0),i.Errors.DIRECTORY_CONTENT_ERROR),Buffer.alloc(0);var s=u();if(0===s.length)return e&&a&&a(s),s;if(t.encrypted){if("string"!=typeof o&&!Buffer.isBuffer(o))throw new Error("ADM-ZIP: Incompatible password parameter");s=r.ZipCrypto.decrypt(s,t,o)}var p=Buffer.alloc(t.size);switch(t.method){case i.Constants.STORED:if(s.copy(p),d(p))return e&&a&&a(p),p;throw e&&a&&a(p,i.Errors.BAD_CRC),new Error(i.Errors.BAD_CRC);case i.Constants.DEFLATED:var l=new r.Inflater(s,t.size);if(!e){if(l.inflate(p).copy(p,0),!d(p))throw new Error(i.Errors.BAD_CRC+" "+n.toString());return p}l.inflateAsync((function(e){e.copy(e,0),a&&(d(e)?a(e):a(e,i.Errors.BAD_CRC))}));break;default:throw e&&a&&a(Buffer.alloc(0),i.Errors.UNKNOWN_METHOD),new Error(i.Errors.UNKNOWN_METHOD)}}function m(n,a){if((!p||!p.length)&&Buffer.isBuffer(e))return n&&a&&a(u()),u();if(p.length&&!c){var o;switch(t.method){case i.Constants.STORED:return t.compressedSize=t.size,o=Buffer.alloc(p.length),p.copy(o),n&&a&&a(o),o;default:case i.Constants.DEFLATED:var s=new r.Deflater(p);if(!n){var l=s.deflate();return t.compressedSize=l.length,l}s.deflateAsync((function(e){o=Buffer.alloc(e.length),t.compressedSize=e.length,e.copy(o),a&&a(o)})),s=null}}else{if(!n||!a)return Buffer.alloc(0);a(Buffer.alloc(0))}}function h(e,t){return(e.readUInt32LE(t+4)<<4)+e.readUInt32LE(t)}function v(e){var n,i,a,r;e.length>=o.EF_ZIP64_SCOMP&&(n=h(e,o.EF_ZIP64_SUNCOMP),t.size===o.EF_ZIP64_OR_32&&(t.size=n)),e.length>=o.EF_ZIP64_RHO&&(i=h(e,o.EF_ZIP64_SCOMP),t.compressedSize===o.EF_ZIP64_OR_32&&(t.compressedSize=i)),e.length>=o.EF_ZIP64_DSN&&(a=h(e,o.EF_ZIP64_RHO),t.offset===o.EF_ZIP64_OR_32&&(t.offset=a)),e.length>=o.EF_ZIP64_DSN+4&&(r=e.readUInt32LE(o.EF_ZIP64_DSN),t.diskNumStart===o.EF_ZIP64_OR_16&&(t.diskNumStart=r))}return{get entryName(){return n.toString()},get rawEntryName(){return n},set entryName(e){var a=(n=i.toBuffer(e))[n.length-1];c=47===a||92===a,t.fileNameLength=n.length},get extra(){return l},set extra(e){l=e,t.extraLength=e.length,function(e){for(var t,n,i,a=0;a<e.length;)t=e.readUInt16LE(a),a+=2,n=e.readUInt16LE(a),a+=2,i=e.slice(a,a+n),a+=n,o.ID_ZIP64===t&&v(i)}(e)},get comment(){return s.toString()},set comment(e){s=i.toBuffer(e),t.commentLength=s.length},get name(){var e=n.toString();return c?e.substr(e.length-1).split("/").pop():e.split("/").pop()},get isDirectory(){return c},getCompressedData:function(){return m(!1,null)},getCompressedDataAsync:function(e){m(!0,e)},setData:function(e){p=i.toBuffer(e),!c&&p.length?(t.size=p.length,t.method=i.Constants.DEFLATED,t.crc=i.crc32(e),t.changed=!0):t.method=i.Constants.STORED},getData:function(e){return t.changed?p:f(!1,null,e)},getDataAsync:function(e,n){t.changed?e(p):f(!0,e,n)},set attr(e){t.attr=e},get attr(){return t.attr},set header(e){t.loadFromBinary(e)},get header(){return t},packCentralHeader:function(){var e=t.centralHeaderToBinary(),a=i.Constants.CENHDR;return n.copy(e,a),a+=n.length,t.extraLength&&(l.copy(e,a),a+=t.extraLength),t.commentLength&&s.copy(e,a),e},packLocalHeader:function(){let e=0;const i=t.localHeaderToBinary(),a=Buffer.alloc(i.length+n.length+l.length);return i.copy(a,e),e+=i.length,n.copy(a,e),e+=n.length,l.copy(a,e),e+=l.length,a},toJSON:function(){const n=function(e){return"<"+(e&&e.length+" bytes buffer"||"null")+">"};return{entryName:this.entryName,name:this.name,comment:this.comment,isDirectory:this.isDirectory,header:t.toJSON(),compressedData:n(e),data:n(p)}},toString:function(){return JSON.stringify(this.toJSON(),null,"\t")}}}},7224:(e,t,n)=>{const i=n(16),a=n(6780),o=n(4070);e.exports=function(e,t){var n=[],r={},s=Buffer.alloc(0),c=new a.MainHeader,p=!1;const l=Object.assign(Object.create(null),t),{noSort:u}=l;function d(){if(p=!0,r={},c.diskEntries>(e.length-c.offset)/o.Constants.CENHDR)throw new Error(o.Errors.DISK_ENTRY_TOO_LARGE);n=new Array(c.diskEntries);for(var t=c.offset,a=0;a<n.length;a++){var s=t,l=new i(e);l.header=e.slice(s,s+=o.Constants.CENHDR),l.entryName=e.slice(s,s+=l.header.fileNameLength),l.header.extraLength&&(l.extra=e.slice(s,s+=l.header.extraLength)),l.header.commentLength&&(l.comment=e.slice(s,s+l.header.commentLength)),t+=l.header.centralHeaderSize,n[a]=l,r[l.entryName]=l}}function f(){n.length>1&&!u&&n.sort(((e,t)=>e.entryName.toLowerCase().localeCompare(t.entryName.toLowerCase())))}return e?function(t){for(var n=e.length-o.Constants.ENDHDR,i=Math.max(0,n-65535),a=i,r=e.length,p=-1,l=0;n>=a;n--)if(80===e[n])if(e.readUInt32LE(n)!==o.Constants.ENDSIG)if(e.readUInt32LE(n)!==o.Constants.END64SIG){if(e.readUInt32LE(n)===o.Constants.ZIP64SIG){p=n,r=n+o.readBigUInt64LE(e,n+o.Constants.ZIP64SIZE)+o.Constants.ZIP64LEAD;break}}else a=i;else p=n,l=n,r=n+o.Constants.ENDHDR,a=n-o.Constants.END64HDR;if(!~p)throw new Error(o.Errors.INVALID_FORMAT);c.loadFromBinary(e.slice(p,r)),c.commentLength&&(s=e.slice(l+o.Constants.ENDHDR)),t&&d()}(l.readEntries):p=!0,{get entries(){return p||d(),n},get comment(){return s.toString()},set comment(e){s=o.toBuffer(e),c.commentLength=s.length},getEntryCount:function(){return p?n.length:c.diskEntries},forEach:function(t){p?n.forEach(t):function(t){const n=c.diskEntries;let a=c.offset;for(let r=0;r<n;r++){let n=a;const r=new i(e);r.header=e.slice(n,n+=o.Constants.CENHDR),r.entryName=e.slice(n,n+=r.header.fileNameLength),a+=r.header.centralHeaderSize,t(r)}}(t)},getEntry:function(e){return p||d(),r[e]||null},setEntry:function(e){p||d(),n.push(e),r[e.entryName]=e,c.totalEntries=n.length},deleteEntry:function(e){p||d();var t=r[e];if(t&&t.isDirectory){var i=this;this.getEntryChildren(t).forEach((function(t){t.entryName!==e&&i.deleteEntry(t.entryName)}))}n.splice(n.indexOf(t),1),delete r[e],c.totalEntries=n.length},getEntryChildren:function(e){if(p||d(),e&&e.isDirectory){const t=[],i=e.entryName,a=i.length;return n.forEach((function(e){e.entryName.substr(0,a)===i&&t.push(e)})),t}return[]},compressToBuffer:function(){p||d(),f();const e=[],t=[];let i=0,a=0;c.size=0,c.offset=0;for(const o of n){const n=o.getCompressedData();o.header.offset=a;const r=o.packLocalHeader(),s=r.length+n.length;a+=s,e.push(r),e.push(n);const p=o.packCentralHeader();t.push(p),c.size+=p.length,i+=s+p.length}i+=c.mainHeaderSize,c.offset=a,a=0;const r=Buffer.alloc(i);for(const t of e)t.copy(r,a),a+=t.length;for(const e of t)e.copy(r,a),a+=e.length;const l=c.toBinary();return s&&s.copy(l,o.Constants.ENDHDR),l.copy(r,a),r},toAsyncBuffer:function(e,t,i,a){try{p||d(),f();const t=[],r=[];let l=0,u=0;c.size=0,c.offset=0;const m=function(n){if(n.length>0){const e=n.shift(),o=e.entryName+e.extra.toString();i&&i(o),e.getCompressedDataAsync((function(i){a&&a(o),e.header.offset=u;const s=e.packLocalHeader(),p=s.length+i.length;u+=p,t.push(s),t.push(i);const d=e.packCentralHeader();r.push(d),c.size+=d.length,l+=p+d.length,m(n)}))}else{l+=c.mainHeaderSize,c.offset=u,u=0;const n=Buffer.alloc(l);t.forEach((function(e){e.copy(n,u),u+=e.length})),r.forEach((function(e){e.copy(n,u),u+=e.length}));const i=c.toBinary();s&&s.copy(i,o.Constants.ENDHDR),i.copy(n,u),e(n)}};m(Array.from(n))}catch(e){t(e)}}}}},3031:e=>{"use strict";function t(e,n,i){for(var a=0;a<e.length;a++){var o=e[a];i>0&&Array.isArray(o)?t(o,n,i-1):n.push(o)}return n}function n(e,t){for(var i=0;i<e.length;i++){var a=e[i];Array.isArray(a)?n(a,t):t.push(a)}return t}e.exports=function(e,i){return null==i?n(e,[]):t(e,[],i)}},1873:(e,t,n)=>{e.exports={parallel:n(8798),serial:n(2081),serialOrdered:n(28)}},4555:e=>{function t(e){"function"==typeof this.jobs[e]&&this.jobs[e]()}e.exports=function(e){Object.keys(e.jobs).forEach(t.bind(e)),e.jobs={}}},2313:(e,t,n)=>{var i=n(405);e.exports=function(e){var t=!1;return i((function(){t=!0})),function(n,a){t?e(n,a):i((function(){e(n,a)}))}}},405:e=>{e.exports=function(e){var t="function"==typeof setImmediate?setImmediate:"object"==typeof process&&"function"==typeof process.nextTick?process.nextTick:null;t?t(e):setTimeout(e,0)}},8051:(e,t,n)=>{var i=n(2313),a=n(4555);e.exports=function(e,t,n,o){var r=n.keyedList?n.keyedList[n.index]:n.index;n.jobs[r]=function(e,t,n,a){return 2==e.length?e(n,i(a)):e(n,t,i(a))}(t,r,e[r],(function(e,t){r in n.jobs&&(delete n.jobs[r],e?a(n):n.results[r]=t,o(e,n.results))}))}},9500:e=>{e.exports=function(e,t){var n=!Array.isArray(e),i={index:0,keyedList:n||t?Object.keys(e):null,jobs:{},results:n?{}:[],size:n?Object.keys(e).length:e.length};return t&&i.keyedList.sort(n?t:function(n,i){return t(e[n],e[i])}),i}},6276:(e,t,n)=>{var i=n(4555),a=n(2313);e.exports=function(e){Object.keys(this.jobs).length&&(this.index=this.size,i(this),a(e)(null,this.results))}},8798:(e,t,n)=>{var i=n(8051),a=n(9500),o=n(6276);e.exports=function(e,t,n){for(var r=a(e);r.index<(r.keyedList||e).length;)i(e,t,r,(function(e,t){e?n(e,t):0!==Object.keys(r.jobs).length||n(null,r.results)})),r.index++;return o.bind(r,n)}},2081:(e,t,n)=>{var i=n(28);e.exports=function(e,t,n){return i(e,t,null,n)}},28:(e,t,n)=>{var i=n(8051),a=n(9500),o=n(6276);function r(e,t){return e<t?-1:e>t?1:0}e.exports=function(e,t,n,r){var s=a(e,n);return i(e,t,s,(function n(a,o){a?r(a,o):(s.index++,s.index<(s.keyedList||e).length?i(e,t,s,n):r(null,s.results))})),o.bind(s,r)},e.exports.ascending=r,e.exports.descending=function(e,t){return-1*r(e,t)}},7059:(e,t,n)=>{"use strict";var i=n(6330)("body-parser"),a=Object.create(null);function o(e){return function(){return function(e){var t=a[e];if(void 0!==t)return t;switch(e){case"json":t=n(2899);break;case"raw":t=n(1827);break;case"text":t=n(1962);break;case"urlencoded":t=n(4244)}return a[e]=t}(e)}}t=e.exports=i.function((function(e){var n=Object.create(e||null,{type:{configurable:!0,enumerable:!0,value:void 0,writable:!0}}),i=t.urlencoded(n),a=t.json(n);return function(e,t,n){a(e,t,(function(a){if(a)return n(a);i(e,t,n)}))}}),"bodyParser: use individual json/urlencoded middlewares"),Object.defineProperty(t,"json",{configurable:!0,enumerable:!0,get:o("json")}),Object.defineProperty(t,"raw",{configurable:!0,enumerable:!0,get:o("raw")}),Object.defineProperty(t,"text",{configurable:!0,enumerable:!0,get:o("text")}),Object.defineProperty(t,"urlencoded",{configurable:!0,enumerable:!0,get:o("urlencoded")})},3499:(e,t,n)=>{"use strict";var i=n(2771),a=n(7013),o=n(7680),r=n(5249),s=n(5649),c=n(1170),p=n(3106);e.exports=function(e,t,n,l,u,d){var f,m,h=d;e._body=!0;var v=null!==h.encoding?h.encoding:null,g=h.verify;try{m=function(e,t,n){var a,o=(e.headers["content-encoding"]||"identity").toLowerCase(),r=e.headers["content-length"];if(t('content-encoding "%s"',o),!1===n&&"identity"!==o)throw i(415,"content encoding unsupported",{encoding:o,type:"encoding.unsupported"});switch(o){case"deflate":a=p.createInflate(),t("inflate body"),e.pipe(a);break;case"gzip":a=p.createGunzip(),t("gunzip body"),e.pipe(a);break;case"identity":(a=e).length=r;break;default:throw i(415,'unsupported content encoding "'+o+'"',{encoding:o,type:"encoding.unsupported"})}return a}(e,u,h.inflate),f=m.length,m.length=void 0}catch(e){return n(e)}if(h.length=f,h.encoding=g?null:v,null===h.encoding&&null!==v&&!r.encodingExists(v))return n(i(415,'unsupported charset "'+v.toUpperCase()+'"',{charset:v.toLowerCase(),type:"charset.unsupported"}));u("read body"),o(m,h,(function(o,p){var d;if(o)return d="encoding.unsupported"===o.type?i(415,'unsupported charset "'+v.toUpperCase()+'"',{charset:v.toLowerCase(),type:"charset.unsupported"}):i(400,o),m!==e&&(c(e),a(m,!0)),void function(e,t){s.isFinished(e)?t():(s(e,t),e.resume())}(e,(function(){n(i(400,d))}));if(g)try{u("verify body"),g(e,t,p,v)}catch(e){return void n(i(403,e,{body:p,type:e.type||"entity.verify.failed"}))}var f=p;try{u("parse body"),f="string"!=typeof p&&null!==v?r.decode(p,v):p,e.body=l(f)}catch(e){return void n(i(400,e,{body:f,type:e.type||"entity.parse.failed"}))}n()}))}},2899:(e,t,n)=>{"use strict";var i=n(5508),a=n(8597),o=n(2771),r=n(5753)("body-parser:json"),s=n(3499),c=n(1592);e.exports=function(e){var t=e||{},n="number"!=typeof t.limit?i.parse(t.limit||"100kb"):t.limit,f=!1!==t.inflate,m=t.reviver,h=!1!==t.strict,v=t.type||"application/json",g=t.verify||!1;if(!1!==g&&"function"!=typeof g)throw new TypeError("option verify must be function");var x="function"!=typeof v?function(e){return function(t){return Boolean(c(t,e))}}(v):v;function b(e){if(0===e.length)return{};if(h){var t=(n=e,(i=p.exec(n))?i[1]:void 0);if("{"!==t&&"["!==t)throw r("strict violation"),function(e,t){var n=e.indexOf(t),i="";if(-1!==n){i=e.substring(0,n)+l;for(var a=n+1;a<e.length;a++)i+=l}try{throw JSON.parse(i),new SyntaxError("strict violation")}catch(t){return d(t,{message:t.message.replace(u,(function(t){return e.substring(n,n+t.length)})),stack:t.stack})}}(e,t)}var n,i;try{return r("parse json"),JSON.parse(e,m)}catch(e){throw d(e,{message:e.message,stack:e.stack})}}return function(e,t,i){if(e._body)return r("body already parsed"),void i();if(e.body=e.body||{},!c.hasBody(e))return r("skip empty body"),void i();if(r("content-type %j",e.headers["content-type"]),!x(e))return r("skip parsing"),void i();var p=function(e){try{return(a.parse(e).parameters.charset||"").toLowerCase()}catch(e){return}}(e)||"utf-8";if("utf-"!==p.slice(0,4))return r("invalid charset"),void i(o(415,'unsupported charset "'+p.toUpperCase()+'"',{charset:p,type:"charset.unsupported"}));s(e,t,i,b,r,{encoding:p,inflate:f,limit:n,verify:g})}};var p=/^[\x20\x09\x0a\x0d]*([^\x20\x09\x0a\x0d])/,l="#",u=/#+/g;function d(e,t){for(var n=Object.getOwnPropertyNames(e),i=0;i<n.length;i++){var a=n[i];"stack"!==a&&"message"!==a&&delete e[a]}return e.stack=t.stack.replace(e.message,t.message),e.message=t.message,e}},1827:(e,t,n)=>{"use strict";var i=n(5508),a=n(5753)("body-parser:raw"),o=n(3499),r=n(1592);e.exports=function(e){var t=e||{},n=!1!==t.inflate,s="number"!=typeof t.limit?i.parse(t.limit||"100kb"):t.limit,c=t.type||"application/octet-stream",p=t.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(t){return Boolean(r(t,e))}}(c):c;function u(e){return e}return function(e,t,i){return e._body?(a("body already parsed"),void i()):(e.body=e.body||{},r.hasBody(e)?(a("content-type %j",e.headers["content-type"]),l(e)?void o(e,t,i,u,a,{encoding:null,inflate:n,limit:s,verify:p}):(a("skip parsing"),void i())):(a("skip empty body"),void i()))}}},1962:(e,t,n)=>{"use strict";var i=n(5508),a=n(8597),o=n(5753)("body-parser:text"),r=n(3499),s=n(1592);e.exports=function(e){var t=e||{},n=t.defaultCharset||"utf-8",c=!1!==t.inflate,p="number"!=typeof t.limit?i.parse(t.limit||"100kb"):t.limit,l=t.type||"text/plain",u=t.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(t){return Boolean(s(t,e))}}(l):l;function f(e){return e}return function(e,t,i){if(e._body)return o("body already parsed"),void i();if(e.body=e.body||{},!s.hasBody(e))return o("skip empty body"),void i();if(o("content-type %j",e.headers["content-type"]),!d(e))return o("skip parsing"),void i();var l=function(e){try{return(a.parse(e).parameters.charset||"").toLowerCase()}catch(e){return}}(e)||n;r(e,t,i,f,o,{encoding:l,inflate:c,limit:p,verify:u})}}},4244:(e,t,n)=>{"use strict";var i=n(5508),a=n(8597),o=n(2771),r=n(5753)("body-parser:urlencoded"),s=n(6330)("body-parser"),c=n(3499),p=n(1592);e.exports=function(e){var t=e||{};void 0===t.extended&&s("undefined extended: provide extended option");var n=!1!==t.extended,l=!1!==t.inflate,f="number"!=typeof t.limit?i.parse(t.limit||"100kb"):t.limit,m=t.type||"application/x-www-form-urlencoded",h=t.verify||!1;if(!1!==h&&"function"!=typeof h)throw new TypeError("option verify must be function");var v=n?function(e){var t=void 0!==e.parameterLimit?e.parameterLimit:1e3,n=d("qs");if(isNaN(t)||t<1)throw new TypeError("option parameterLimit must be a positive number");return isFinite(t)&&(t|=0),function(e){var i=u(e,t);if(void 0===i)throw r("too many parameters"),o(413,"too many parameters",{type:"parameters.too.many"});var a=Math.max(100,i);return r("parse extended urlencoding"),n(e,{allowPrototypes:!0,arrayLimit:a,depth:1/0,parameterLimit:t})}}(t):function(e){var t=void 0!==e.parameterLimit?e.parameterLimit:1e3,n=d("querystring");if(isNaN(t)||t<1)throw new TypeError("option parameterLimit must be a positive number");return isFinite(t)&&(t|=0),function(e){if(void 0===u(e,t))throw r("too many parameters"),o(413,"too many parameters",{type:"parameters.too.many"});return r("parse urlencoding"),n(e,void 0,void 0,{maxKeys:t})}}(t),g="function"!=typeof m?function(e){return function(t){return Boolean(p(t,e))}}(m):m;function x(e){return e.length?v(e):{}}return function(e,t,n){if(e._body)return r("body already parsed"),void n();if(e.body=e.body||{},!p.hasBody(e))return r("skip empty body"),void n();if(r("content-type %j",e.headers["content-type"]),!g(e))return r("skip parsing"),void n();var i=function(e){try{return(a.parse(e).parameters.charset||"").toLowerCase()}catch(e){return}}(e)||"utf-8";if("utf-8"!==i)return r("invalid charset"),void n(o(415,'unsupported charset "'+i.toUpperCase()+'"',{charset:i,type:"charset.unsupported"}));c(e,t,n,x,r,{debug:r,encoding:i,inflate:l,limit:f,verify:h})}};var l=Object.create(null);function u(e,t){for(var n=0,i=0;-1!==(i=e.indexOf("&",i));)if(i++,++n===t)return;return n}function d(e){var t=l[e];if(void 0!==t)return t.parse;switch(e){case"qs":t=n(5373);break;case"querystring":t=n(3480)}return l[e]=t,t.parse}},6489:e=>{"use strict";e.exports={mask:(e,t,n,i,a)=>{for(var o=0;o<a;o++)n[i+o]=e[o]^t[3&o]},unmask:(e,t)=>{const n=e.length;for(var i=0;i<n;i++)e[i]^=t[3&i]}}},2627:(e,t,n)=>{"use strict";try{e.exports=n(8169)(__dirname)}catch(t){e.exports=n(6489)}},5508:e=>{"use strict";e.exports=function(e,t){return"string"==typeof e?r(e):"number"==typeof e?o(e,t):null},e.exports.format=o,e.exports.parse=r;var t=/\B(?=(\d{3})+(?!\d))/g,n=/(?:\.0*|(\.[^0]+)0+)$/,i={b:1,kb:1024,mb:1<<20,gb:1<<30,tb:Math.pow(1024,4),pb:Math.pow(1024,5)},a=/^((-|\+)?(\d+(?:\.\d+)?)) *(kb|mb|gb|tb|pb)$/i;function o(e,a){if(!Number.isFinite(e))return null;var o=Math.abs(e),r=a&&a.thousandsSeparator||"",s=a&&a.unitSeparator||"",c=a&&void 0!==a.decimalPlaces?a.decimalPlaces:2,p=Boolean(a&&a.fixedDecimals),l=a&&a.unit||"";l&&i[l.toLowerCase()]||(l=o>=i.pb?"PB":o>=i.tb?"TB":o>=i.gb?"GB":o>=i.mb?"MB":o>=i.kb?"KB":"B");var u=(e/i[l.toLowerCase()]).toFixed(c);return p||(u=u.replace(n,"$1")),r&&(u=u.split(".").map((function(e,n){return 0===n?e.replace(t,r):e})).join(".")),u+s+l}function r(e){if("number"==typeof e&&!isNaN(e))return e;if("string"!=typeof e)return null;var t,n=a.exec(e),o="b";return n?(t=parseFloat(n[1]),o=n[4].toLowerCase()):(t=parseInt(e,10),o="b"),isNaN(t)?null:Math.floor(i[o]*t)}},8075:(e,t,n)=>{"use strict";var i=n(453),a=n(487),o=a(i("String.prototype.indexOf"));e.exports=function(e,t){var n=i(e,!!t);return"function"==typeof n&&o(e,".prototype.")>-1?a(n):n}},487:(e,t,n)=>{"use strict";var i=n(6743),a=n(453),o=n(6897),r=n(9675),s=a("%Function.prototype.apply%"),c=a("%Function.prototype.call%"),p=a("%Reflect.apply%",!0)||i.call(c,s),l=n(655),u=a("%Math.max%");e.exports=function(e){if("function"!=typeof e)throw new r("a function is required");var t=p(i,c,arguments);return o(t,1+u(0,e.length-(arguments.length-1)),!0)};var d=function(){return p(i,s,arguments)};l?l(e.exports,"apply",{value:d}):e.exports.apply=d},801:(e,t,n)=>{var i=n(9023),a=n(2203).Stream,o=n(8069);function r(){this.writable=!1,this.readable=!0,this.dataSize=0,this.maxDataSize=2097152,this.pauseStreams=!0,this._released=!1,this._streams=[],this._currentStream=null,this._insideLoop=!1,this._pendingNext=!1}e.exports=r,i.inherits(r,a),r.create=function(e){var t=new this;for(var n in e=e||{})t[n]=e[n];return t},r.isStreamLike=function(e){return"function"!=typeof e&&"string"!=typeof e&&"boolean"!=typeof e&&"number"!=typeof e&&!Buffer.isBuffer(e)},r.prototype.append=function(e){if(r.isStreamLike(e)){if(!(e instanceof o)){var t=o.create(e,{maxDataSize:1/0,pauseStream:this.pauseStreams});e.on("data",this._checkDataSize.bind(this)),e=t}this._handleErrors(e),this.pauseStreams&&e.pause()}return this._streams.push(e),this},r.prototype.pipe=function(e,t){return a.prototype.pipe.call(this,e,t),this.resume(),e},r.prototype._getNext=function(){if(this._currentStream=null,this._insideLoop)this._pendingNext=!0;else{this._insideLoop=!0;try{do{this._pendingNext=!1,this._realGetNext()}while(this._pendingNext)}finally{this._insideLoop=!1}}},r.prototype._realGetNext=function(){var e=this._streams.shift();void 0!==e?"function"==typeof e?e(function(e){r.isStreamLike(e)&&(e.on("data",this._checkDataSize.bind(this)),this._handleErrors(e)),this._pipeNext(e)}.bind(this)):this._pipeNext(e):this.end()},r.prototype._pipeNext=function(e){if(this._currentStream=e,r.isStreamLike(e))return e.on("end",this._getNext.bind(this)),void e.pipe(this,{end:!1});var t=e;this.write(t),this._getNext()},r.prototype._handleErrors=function(e){var t=this;e.on("error",(function(e){t._emitError(e)}))},r.prototype.write=function(e){this.emit("data",e)},r.prototype.pause=function(){this.pauseStreams&&(this.pauseStreams&&this._currentStream&&"function"==typeof this._currentStream.pause&&this._currentStream.pause(),this.emit("pause"))},r.prototype.resume=function(){this._released||(this._released=!0,this.writable=!0,this._getNext()),this.pauseStreams&&this._currentStream&&"function"==typeof this._currentStream.resume&&this._currentStream.resume(),this.emit("resume")},r.prototype.end=function(){this._reset(),this.emit("end")},r.prototype.destroy=function(){this._reset(),this.emit("close")},r.prototype._reset=function(){this.writable=!1,this._streams=[],this._currentStream=null},r.prototype._checkDataSize=function(){if(this._updateDataSize(),!(this.dataSize<=this.maxDataSize)){var e="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this._emitError(new Error(e))}},r.prototype._updateDataSize=function(){this.dataSize=0;var e=this;this._streams.forEach((function(t){t.dataSize&&(e.dataSize+=t.dataSize)})),this._currentStream&&this._currentStream.dataSize&&(this.dataSize+=this._currentStream.dataSize)},r.prototype._emitError=function(e){this._reset(),this.emit("error",e)}},1164:(e,t,n)=>{"use strict";e.exports=function(e,t){var n=t||{},a=n.type||"attachment",o=function(e,t){if(void 0!==e){var n={};if("string"!=typeof e)throw new TypeError("filename must be a string");if(void 0===t&&(t=!0),"string"!=typeof t&&"boolean"!=typeof t)throw new TypeError("fallback must be a string or boolean");if("string"==typeof t&&c.test(t))throw new TypeError("fallback must be ISO-8859-1 string");var a=i(e),o=d.test(a),s="string"!=typeof t?t&&g(a):i(t),p="string"==typeof s&&s!==a;return(p||!o||r.test(a))&&(n["filename*"]=a),(o||p)&&(n.filename=p?s:a),n}}(e,n.fallback);return function(e){var t=e.parameters,n=e.type;if(!n||"string"!=typeof n||!f.test(n))throw new TypeError("invalid type");var i=String(n).toLowerCase();if(t&&"object"==typeof t)for(var a,o=Object.keys(t).sort(),r=0;r<o.length;r++){var s="*"===(a=o[r]).substr(-1)?w(t[a]):y(t[a]);i+="; "+a+"="+s}return i}(new _(a,o))},e.exports.parse=function(e){if(!e||"string"!=typeof e)throw new TypeError("argument string is required");var t=h.exec(e);if(!t)throw new TypeError("invalid type format");var n,i,a=t[0].length,o=t[1].toLowerCase(),r=[],s={};for(a=u.lastIndex=";"===t[0].substr(-1)?a-1:a;t=u.exec(e);){if(t.index!==a)throw new TypeError("invalid parameter format");if(a+=t[0].length,n=t[1].toLowerCase(),i=t[2],-1!==r.indexOf(n))throw new TypeError("invalid duplicate parameter");r.push(n),n.indexOf("*")+1!==n.length?"string"!=typeof s[n]&&('"'===i[0]&&(i=i.substr(1,i.length-2).replace(p,"$1")),s[n]=i):(n=n.slice(0,-1),i=v(i),s[n]=i)}if(-1!==a&&a!==e.length)throw new TypeError("invalid parameter format");return new _(o,s)};var i=n(6928).basename,a=n(7342).Buffer,o=/[\x00-\x20"'()*,/:;<=>?@[\\\]{}\x7f]/g,r=/%[0-9A-Fa-f]{2}/,s=/%([0-9A-Fa-f]{2})/g,c=/[^\x20-\x7e\xa0-\xff]/g,p=/\\([\u0000-\u007f])/g,l=/([\\"])/g,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,d=/^[\x20-\x7e\x80-\xff]+$/,f=/^[!#$%&'*+.0-9A-Z^_`a-z|~-]+$/,m=/^([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!#$&+.^_`|~-])+)$/,h=/^([!#$%&'*+.0-9A-Z^_`a-z|~-]+)[\x09\x20]*(?:$|;)/;function v(e){var t=m.exec(e);if(!t)throw new TypeError("invalid extended field value");var n,i=t[1].toLowerCase(),o=t[2].replace(s,x);switch(i){case"iso-8859-1":n=g(o);break;case"utf-8":n=a.from(o,"binary").toString("utf8");break;default:throw new TypeError("unsupported charset in extended field")}return n}function g(e){return String(e).replace(c,"?")}function x(e,t){return String.fromCharCode(parseInt(t,16))}function b(e){return"%"+String(e).charCodeAt(0).toString(16).toUpperCase()}function y(e){return'"'+String(e).replace(l,"\\$1")+'"'}function w(e){var t=String(e);return"UTF-8''"+encodeURIComponent(t).replace(o,b)}function _(e,t){this.type=e,this.parameters=t}},7342:(e,t,n)=>{var i=n(181),a=i.Buffer;function o(e,t){for(var n in e)t[n]=e[n]}function r(e,t,n){return a(e,t,n)}a.from&&a.alloc&&a.allocUnsafe&&a.allocUnsafeSlow?e.exports=i:(o(i,t),t.Buffer=r),r.prototype=Object.create(a.prototype),o(a,r),r.from=function(e,t,n){if("number"==typeof e)throw new TypeError("Argument must not be a number");return a(e,t,n)},r.alloc=function(e,t,n){if("number"!=typeof e)throw new TypeError("Argument must be a number");var i=a