ndjjd-vite-plugin-federation 0.0.1 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,7 @@
1
- (function(G,re){typeof exports=="object"&&typeof module<"u"?re(exports):typeof define=="function"&&define.amd?define(["exports"],re):(G=typeof globalThis<"u"?globalThis:G||self,re(G.VitePluginFederation={}))})(this,(function(G){"use strict";function re(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function an(t){if(Object.prototype.hasOwnProperty.call(t,"__esModule"))return t;var e=t.default;if(typeof e=="function"){var n=function r(){var o=!1;try{o=this instanceof r}catch{}return o?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};n.prototype=e.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(t).forEach(function(r){var o=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(n,r,o.get?o:{enumerable:!0,get:function(){return t[r]}})}),n}var X={exports:{}};const H={},W=an(Object.freeze(Object.defineProperty({__proto__:null,default:H},Symbol.toStringTag,{value:"Module"})));var Oe,Ke;function Ye(){return Ke||(Ke=1,Oe={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}),Oe}var De={},Qe;function Re(){return Qe||(Qe=1,(function(t){const e={INVALID_LOC:"Invalid LOC header (bad signature)",INVALID_CEN:"Invalid CEN header (bad signature)",INVALID_END:"Invalid END header (bad signature)",DESCRIPTOR_NOT_EXIST:"No descriptor present",DESCRIPTOR_UNKNOWN:"Unknown descriptor format",DESCRIPTOR_FAULTY:"Descriptor data is malformed",NO_DATA:"Nothing to decompress",BAD_CRC:"CRC32 checksum failed {0}",FILE_IN_THE_WAY:"There is a file in the way: {0}",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: "{0}"',NOT_IMPLEMENTED:"Not implemented",INVALID_FILENAME:"Invalid filename",INVALID_FORMAT:"Invalid or unsupported zip format. No END header found",INVALID_PASS_PARAM:"Incompatible password parameter",WRONG_PASSWORD:"Wrong Password",COMMENT_TOO_LONG:"Comment is too long",EXTRA_FIELD_PARSE_ERROR:"Extra field parsing error"};function n(r){return function(...o){return o.length&&(r=r.replace(/\{(\d)\}/g,(i,s)=>o[s]||"")),new Error("ADM-ZIP: "+r)}}for(const r of Object.keys(e))t[r]=n(e[r])})(De)),De}var _e,et;function cn(){if(et)return _e;et=1;const t=W,e=W,n=Ye(),r=Re(),o=typeof process=="object"&&process.platform==="win32",i=a=>typeof a=="object"&&a!==null,s=new Uint32Array(256).map((a,f)=>{for(let d=0;d<8;d++)(f&1)!==0?f=3988292384^f>>>1:f>>>=1;return f>>>0});function c(a){this.sep=e.sep,this.fs=t,i(a)&&i(a.fs)&&typeof a.fs.statSync=="function"&&(this.fs=a.fs)}return _e=c,c.prototype.makeDir=function(a){const f=this;function d(g){let N=g.split(f.sep)[0];g.split(f.sep).forEach(function(y){if(!(!y||y.substr(-1,1)===":")){N+=f.sep+y;var E;try{E=f.fs.statSync(N)}catch{f.fs.mkdirSync(N)}if(E&&E.isFile())throw r.FILE_IN_THE_WAY(`"${N}"`)}})}d(a)},c.prototype.writeFileTo=function(a,f,d,g){const N=this;if(N.fs.existsSync(a)){if(!d)return!1;var y=N.fs.statSync(a);if(y.isDirectory())return!1}var E=e.dirname(a);N.fs.existsSync(E)||N.makeDir(E);var C;try{C=N.fs.openSync(a,"w",438)}catch{N.fs.chmodSync(a,438),C=N.fs.openSync(a,"w",438)}if(C)try{N.fs.writeSync(C,f,0,f.length,0)}finally{N.fs.closeSync(C)}return N.fs.chmodSync(a,g||438),!0},c.prototype.writeFileToAsync=function(a,f,d,g,N){typeof g=="function"&&(N=g,g=void 0);const y=this;y.fs.exists(a,function(E){if(E&&!d)return N(!1);y.fs.stat(a,function(C,L){if(E&&L.isDirectory())return N(!1);var D=e.dirname(a);y.fs.exists(D,function(I){I||y.makeDir(D),y.fs.open(a,"w",438,function(R,h){R?y.fs.chmod(a,438,function(){y.fs.open(a,"w",438,function(u,S){y.fs.write(S,f,0,f.length,0,function(){y.fs.close(S,function(){y.fs.chmod(a,g||438,function(){N(!0)})})})})}):h?y.fs.write(h,f,0,f.length,0,function(){y.fs.close(h,function(){y.fs.chmod(a,g||438,function(){N(!0)})})}):y.fs.chmod(a,g||438,function(){N(!0)})})})})})},c.prototype.findFiles=function(a){const f=this;function d(g,N,y){let E=[];return f.fs.readdirSync(g).forEach(function(C){const L=e.join(g,C),D=f.fs.statSync(L);E.push(e.normalize(L)+(D.isDirectory()?f.sep:"")),D.isDirectory()&&y&&(E=E.concat(d(L,N,y)))}),E}return d(a,void 0,!0)},c.prototype.findFilesAsync=function(a,f){const d=this;let g=[];d.fs.readdir(a,function(N,y){if(N)return f(N);let E=y.length;if(!E)return f(null,g);y.forEach(function(C){C=e.join(a,C),d.fs.stat(C,function(L,D){if(L)return f(L);D&&(g.push(e.normalize(C)+(D.isDirectory()?d.sep:"")),D.isDirectory()?d.findFilesAsync(C,function(I,R){if(I)return f(I);g=g.concat(R),--E||f(null,g)}):--E||f(null,g))})})})},c.prototype.getAttributes=function(){},c.prototype.setAttributes=function(){},c.crc32update=function(a,f){return s[(a^f)&255]^a>>>8},c.crc32=function(a){typeof a=="string"&&(a=Buffer.from(a,"utf8"));let f=a.length,d=-1;for(let g=0;g<f;)d=c.crc32update(d,a[g++]);return~d>>>0},c.methodToString=function(a){switch(a){case n.STORED:return"STORED ("+a+")";case n.DEFLATED:return"DEFLATED ("+a+")";default:return"UNSUPPORTED ("+a+")"}},c.canonical=function(a){if(!a)return"";const f=e.posix.normalize("/"+a.split("\\").join("/"));return e.join(".",f)},c.zipnamefix=function(a){if(!a)return"";const f=e.posix.normalize("/"+a.split("\\").join("/"));return e.posix.join(".",f)},c.findLast=function(a,f){if(!Array.isArray(a))throw new TypeError("arr is not array");const d=a.length>>>0;for(let g=d-1;g>=0;g--)if(f(a[g],g,a))return a[g]},c.sanitize=function(a,f){a=e.resolve(e.normalize(a));for(var d=f.split("/"),g=0,N=d.length;g<N;g++){var y=e.normalize(e.join(a,d.slice(g,N).join(e.sep)));if(y.indexOf(a)===0)return y}return e.normalize(e.join(a,e.basename(f)))},c.toBuffer=function(f,d){return Buffer.isBuffer(f)?f:f instanceof Uint8Array?Buffer.from(f):typeof f=="string"?d(f):Buffer.alloc(0)},c.readBigUInt64LE=function(a,f){var d=Buffer.from(a.slice(f,f+8));return d.swap64(),parseInt(`0x${d.toString("hex")}`)},c.fromDOS2Date=function(a){return new Date((a>>25&127)+1980,Math.max((a>>21&15)-1,0),Math.max(a>>16&31,1),a>>11&31,a>>5&63,(a&31)<<1)},c.fromDate2DOS=function(a){let f=0,d=0;return a.getFullYear()>1979&&(f=(a.getFullYear()-1980&127)<<9|a.getMonth()+1<<5|a.getDate(),d=a.getHours()<<11|a.getMinutes()<<5|a.getSeconds()>>1),f<<16|d},c.isWin=o,c.crcTable=s,_e}var Te,tt;function fn(){if(tt)return Te;tt=1;const t=W;return Te=function(e,{fs:n}){var r=e||"",o=s(),i=null;function s(){return{directory:!1,readonly:!1,hidden:!1,executable:!1,mtime:0,atime:0}}return r&&n.existsSync(r)?(i=n.statSync(r),o.directory=i.isDirectory(),o.mtime=i.mtime,o.atime=i.atime,o.executable=(73&i.mode)!==0,o.readonly=(128&i.mode)===0,o.hidden=t.basename(r)[0]==="."):console.warn("Invalid path: "+r),{get directory(){return o.directory},get readOnly(){return o.readonly},get hidden(){return o.hidden},get mtime(){return o.mtime},get atime(){return o.atime},get executable(){return o.executable},decodeAttributes:function(){},encodeAttributes:function(){},toJSON:function(){return{path:r,isDirectory:o.directory,isReadOnly:o.readonly,isHidden:o.hidden,isExecutable:o.executable,mTime:o.mtime,aTime:o.atime}},toString:function(){return JSON.stringify(this.toJSON(),null," ")}}},Te}var Ae,nt;function un(){return nt||(nt=1,Ae={efs:!0,encode:t=>Buffer.from(t,"utf8"),decode:t=>t.toString("utf8")}),Ae}var rt;function oe(){return rt||(rt=1,X.exports=cn(),X.exports.Constants=Ye(),X.exports.Errors=Re(),X.exports.FileAttr=fn(),X.exports.decoder=un()),X.exports}var he={},Fe,ot;function ln(){if(ot)return Fe;ot=1;var t=oe(),e=t.Constants;return Fe=function(){var n=20,r=10,o=0,i=0,s=0,c=0,a=0,f=0,d=0,g=0,N=0,y=0,E=0,C=0,L=0;n|=t.isWin?2560:768,o|=e.FLG_EFS;const D={extraLen:0},I=h=>Math.max(0,h)>>>0,R=h=>Math.max(0,h)&255;return s=t.fromDate2DOS(new Date),{get made(){return n},set made(h){n=h},get version(){return r},set version(h){r=h},get flags(){return o},set flags(h){o=h},get flags_efs(){return(o&e.FLG_EFS)>0},set flags_efs(h){h?o|=e.FLG_EFS:o&=~e.FLG_EFS},get flags_desc(){return(o&e.FLG_DESC)>0},set flags_desc(h){h?o|=e.FLG_DESC:o&=~e.FLG_DESC},get method(){return i},set method(h){switch(h){case e.STORED:this.version=10;case e.DEFLATED:default:this.version=20}i=h},get time(){return t.fromDOS2Date(this.timeval)},set time(h){this.timeval=t.fromDate2DOS(h)},get timeval(){return s},set timeval(h){s=I(h)},get timeHighByte(){return R(s>>>8)},get crc(){return c},set crc(h){c=I(h)},get compressedSize(){return a},set compressedSize(h){a=I(h)},get size(){return f},set size(h){f=I(h)},get fileNameLength(){return d},set fileNameLength(h){d=h},get extraLength(){return g},set extraLength(h){g=h},get extraLocalLength(){return D.extraLen},set extraLocalLength(h){D.extraLen=h},get commentLength(){return N},set commentLength(h){N=h},get diskNumStart(){return y},set diskNumStart(h){y=I(h)},get inAttr(){return E},set inAttr(h){E=I(h)},get attr(){return C},set attr(h){C=I(h)},get fileAttr(){return(C||0)>>16&4095},get offset(){return L},set offset(h){L=I(h)},get encrypted(){return(o&e.FLG_ENC)===e.FLG_ENC},get centralHeaderSize(){return e.CENHDR+d+g+N},get realDataOffset(){return L+e.LOCHDR+D.fnameLen+D.extraLen},get localHeader(){return D},loadLocalHeaderFromBinary:function(h){var u=h.slice(L,L+e.LOCHDR);if(u.readUInt32LE(0)!==e.LOCSIG)throw t.Errors.INVALID_LOC();D.version=u.readUInt16LE(e.LOCVER),D.flags=u.readUInt16LE(e.LOCFLG),D.method=u.readUInt16LE(e.LOCHOW),D.time=u.readUInt32LE(e.LOCTIM),D.crc=u.readUInt32LE(e.LOCCRC),D.compressedSize=u.readUInt32LE(e.LOCSIZ),D.size=u.readUInt32LE(e.LOCLEN),D.fnameLen=u.readUInt16LE(e.LOCNAM),D.extraLen=u.readUInt16LE(e.LOCEXT);const S=L+e.LOCHDR+D.fnameLen,l=S+D.extraLen;return h.slice(S,l)},loadFromBinary:function(h){if(h.length!==e.CENHDR||h.readUInt32LE(0)!==e.CENSIG)throw t.Errors.INVALID_CEN();n=h.readUInt16LE(e.CENVEM),r=h.readUInt16LE(e.CENVER),o=h.readUInt16LE(e.CENFLG),i=h.readUInt16LE(e.CENHOW),s=h.readUInt32LE(e.CENTIM),c=h.readUInt32LE(e.CENCRC),a=h.readUInt32LE(e.CENSIZ),f=h.readUInt32LE(e.CENLEN),d=h.readUInt16LE(e.CENNAM),g=h.readUInt16LE(e.CENEXT),N=h.readUInt16LE(e.CENCOM),y=h.readUInt16LE(e.CENDSK),E=h.readUInt16LE(e.CENATT),C=h.readUInt32LE(e.CENATX),L=h.readUInt32LE(e.CENOFF)},localHeaderToBinary:function(){var h=Buffer.alloc(e.LOCHDR);return h.writeUInt32LE(e.LOCSIG,0),h.writeUInt16LE(r,e.LOCVER),h.writeUInt16LE(o,e.LOCFLG),h.writeUInt16LE(i,e.LOCHOW),h.writeUInt32LE(s,e.LOCTIM),h.writeUInt32LE(c,e.LOCCRC),h.writeUInt32LE(a,e.LOCSIZ),h.writeUInt32LE(f,e.LOCLEN),h.writeUInt16LE(d,e.LOCNAM),h.writeUInt16LE(D.extraLen,e.LOCEXT),h},centralHeaderToBinary:function(){var h=Buffer.alloc(e.CENHDR+d+g+N);return h.writeUInt32LE(e.CENSIG,0),h.writeUInt16LE(n,e.CENVEM),h.writeUInt16LE(r,e.CENVER),h.writeUInt16LE(o,e.CENFLG),h.writeUInt16LE(i,e.CENHOW),h.writeUInt32LE(s,e.CENTIM),h.writeUInt32LE(c,e.CENCRC),h.writeUInt32LE(a,e.CENSIZ),h.writeUInt32LE(f,e.CENLEN),h.writeUInt16LE(d,e.CENNAM),h.writeUInt16LE(g,e.CENEXT),h.writeUInt16LE(N,e.CENCOM),h.writeUInt16LE(y,e.CENDSK),h.writeUInt16LE(E,e.CENATT),h.writeUInt32LE(C,e.CENATX),h.writeUInt32LE(L,e.CENOFF),h},toJSON:function(){const h=function(u){return u+" bytes"};return{made:n,version:r,flags:o,method:t.methodToString(i),time:this.time,crc:"0x"+c.toString(16).toUpperCase(),compressedSize:h(a),size:h(f),fileNameLength:h(d),extraLength:h(g),commentLength:h(N),diskNumStart:y,inAttr:E,attr:C,offset:L,centralHeaderSize:h(e.CENHDR+d+g+N)}},toString:function(){return JSON.stringify(this.toJSON(),null," ")}}},Fe}var be,st;function dn(){if(st)return be;st=1;var t=oe(),e=t.Constants;return be=function(){var n=0,r=0,o=0,i=0,s=0;return{get diskEntries(){return n},set diskEntries(c){n=r=c},get totalEntries(){return r},set totalEntries(c){r=n=c},get size(){return o},set size(c){o=c},get offset(){return i},set offset(c){i=c},get commentLength(){return s},set commentLength(c){s=c},get mainHeaderSize(){return e.ENDHDR+s},loadFromBinary:function(c){if((c.length!==e.ENDHDR||c.readUInt32LE(0)!==e.ENDSIG)&&(c.length<e.ZIP64HDR||c.readUInt32LE(0)!==e.ZIP64SIG))throw t.Errors.INVALID_END();c.readUInt32LE(0)===e.ENDSIG?(n=c.readUInt16LE(e.ENDSUB),r=c.readUInt16LE(e.ENDTOT),o=c.readUInt32LE(e.ENDSIZ),i=c.readUInt32LE(e.ENDOFF),s=c.readUInt16LE(e.ENDCOM)):(n=t.readBigUInt64LE(c,e.ZIP64SUB),r=t.readBigUInt64LE(c,e.ZIP64TOT),o=t.readBigUInt64LE(c,e.ZIP64SIZE),i=t.readBigUInt64LE(c,e.ZIP64OFF),s=0)},toBinary:function(){var c=Buffer.alloc(e.ENDHDR+s);return c.writeUInt32LE(e.ENDSIG,0),c.writeUInt32LE(0,4),c.writeUInt16LE(n,e.ENDSUB),c.writeUInt16LE(r,e.ENDTOT),c.writeUInt32LE(o,e.ENDSIZ),c.writeUInt32LE(i,e.ENDOFF),c.writeUInt16LE(s,e.ENDCOM),c.fill(" ",e.ENDHDR),c},toJSON:function(){const c=function(a,f){let d=a.toString(16).toUpperCase();for(;d.length<f;)d="0"+d;return"0x"+d};return{diskEntries:n,totalEntries:r,size:o+" bytes",offset:c(i,4),commentLength:s}},toString:function(){return JSON.stringify(this.toJSON(),null," ")}}},be}var it;function at(){return it||(it=1,he.EntryHeader=ln(),he.MainHeader=dn()),he}var se={},xe,ct;function hn(){return ct||(ct=1,xe=function(t){var e=W,n={chunkSize:(parseInt(t.length/1024)+1)*1024};return{deflate:function(){return e.deflateRawSync(t,n)},deflateAsync:function(r){var o=e.createDeflateRaw(n),i=[],s=0;o.on("data",function(c){i.push(c),s+=c.length}),o.on("end",function(){var c=Buffer.alloc(s),a=0;c.fill(0);for(var f=0;f<i.length;f++){var d=i[f];d.copy(c,a),a+=d.length}r&&r(c)}),o.end(t)}}}),xe}var Ue,ft;function En(){if(ft)return Ue;ft=1;const t=+(process.versions?process.versions.node:"").split(".")[0]||0;return Ue=function(e,n){var r=W;const o=t>=15&&n>0?{maxOutputLength:n}:{};return{inflate:function(){return r.inflateRawSync(e,o)},inflateAsync:function(i){var s=r.createInflateRaw(o),c=[],a=0;s.on("data",function(f){c.push(f),a+=f.length}),s.on("end",function(){var f=Buffer.alloc(a),d=0;f.fill(0);for(var g=0;g<c.length;g++){var N=c[g];N.copy(f,d),d+=N.length}i&&i(f)}),s.end(e)}}},Ue}var Pe,ut;function mn(){if(ut)return Pe;ut=1;const{randomFillSync:t}=W,e=Re(),n=new Uint32Array(256).map((y,E)=>{for(let C=0;C<8;C++)(E&1)!==0?E=E>>>1^3988292384:E>>>=1;return E>>>0}),r=(y,E)=>Math.imul(y,E)>>>0,o=(y,E)=>n[(y^E)&255]^y>>>8,i=()=>typeof t=="function"?t(Buffer.alloc(12)):i.node();i.node=()=>{const y=Buffer.alloc(12),E=y.length;for(let C=0;C<E;C++)y[C]=Math.random()*256&255;return y};const s={genSalt:i};function c(y){const E=Buffer.isBuffer(y)?y:Buffer.from(y);this.keys=new Uint32Array([305419896,591751049,878082192]);for(let C=0;C<E.length;C++)this.updateKeys(E[C])}c.prototype.updateKeys=function(y){const E=this.keys;return E[0]=o(E[0],y),E[1]+=E[0]&255,E[1]=r(E[1],134775813)+1,E[2]=o(E[2],E[1]>>>24),y},c.prototype.next=function(){const y=(this.keys[2]|2)>>>0;return r(y,y^1)>>8&255};function a(y){const E=new c(y);return function(C){const L=Buffer.alloc(C.length);let D=0;for(let I of C)L[D++]=E.updateKeys(I^E.next());return L}}function f(y){const E=new c(y);return function(C,L,D=0){L||(L=Buffer.alloc(C.length));for(let I of C){const R=E.next();L[D++]=I^R,E.updateKeys(I)}return L}}function d(y,E,C){if(!y||!Buffer.isBuffer(y)||y.length<12)return Buffer.alloc(0);const L=a(C),D=L(y.slice(0,12)),I=(E.flags&8)===8?E.timeHighByte:E.crc>>>24;if(D[11]!==I)throw e.WRONG_PASSWORD();return L(y.slice(12))}function g(y){Buffer.isBuffer(y)&&y.length>=12?s.genSalt=function(){return y.slice(0,12)}:y==="node"?s.genSalt=i.node:s.genSalt=i}function N(y,E,C,L=!1){y==null&&(y=Buffer.alloc(0)),Buffer.isBuffer(y)||(y=Buffer.from(y.toString()));const D=f(C),I=s.genSalt();I[11]=E.crc>>>24&255,L&&(I[10]=E.crc>>>16&255);const R=Buffer.alloc(y.length+12);return D(I,R),D(y,R,12)}return Pe={decrypt:d,encrypt:N,_salter:g},Pe}var lt;function pn(){return lt||(lt=1,se.Deflater=hn(),se.Inflater=En(),se.ZipCrypto=mn()),se}var Be,dt;function ht(){if(dt)return Be;dt=1;var t=oe(),e=at(),n=t.Constants,r=pn();return Be=function(o,i){var s=new e.EntryHeader,c=Buffer.alloc(0),a=Buffer.alloc(0),f=!1,d=null,g=Buffer.alloc(0),N=Buffer.alloc(0),y=!0;const E=o,C=typeof E.decoder=="object"?E.decoder:t.decoder;y=C.hasOwnProperty("efs")?C.efs:!1;function L(){return!i||!(i instanceof Uint8Array)?Buffer.alloc(0):(N=s.loadLocalHeaderFromBinary(i),i.slice(s.realDataOffset,s.realDataOffset+s.compressedSize))}function D(l){if(s.flags_desc){const p={},w=s.realDataOffset+s.compressedSize;if(i.readUInt32LE(w)==n.LOCSIG||i.readUInt32LE(w)==n.CENSIG)throw t.Errors.DESCRIPTOR_NOT_EXIST();if(i.readUInt32LE(w)==n.EXTSIG)p.crc=i.readUInt32LE(w+n.EXTCRC),p.compressedSize=i.readUInt32LE(w+n.EXTSIZ),p.size=i.readUInt32LE(w+n.EXTLEN);else if(i.readUInt16LE(w+12)===19280)p.crc=i.readUInt32LE(w+n.EXTCRC-4),p.compressedSize=i.readUInt32LE(w+n.EXTSIZ-4),p.size=i.readUInt32LE(w+n.EXTLEN-4);else throw t.Errors.DESCRIPTOR_UNKNOWN();if(p.compressedSize!==s.compressedSize||p.size!==s.size||p.crc!==s.crc)throw t.Errors.DESCRIPTOR_FAULTY();if(t.crc32(l)!==p.crc)return!1}else if(t.crc32(l)!==s.localHeader.crc)return!1;return!0}function I(l,p,w){if(typeof p>"u"&&typeof l=="string"&&(w=l,l=void 0),f)return l&&p&&p(Buffer.alloc(0),t.Errors.DIRECTORY_CONTENT_ERROR()),Buffer.alloc(0);var _=L();if(_.length===0)return l&&p&&p(_),_;if(s.encrypted){if(typeof w!="string"&&!Buffer.isBuffer(w))throw t.Errors.INVALID_PASS_PARAM();_=r.ZipCrypto.decrypt(_,s,w)}var T=Buffer.alloc(s.size);switch(s.method){case t.Constants.STORED:if(_.copy(T),D(T))return l&&p&&p(T),T;throw l&&p&&p(T,t.Errors.BAD_CRC()),t.Errors.BAD_CRC();case t.Constants.DEFLATED:var F=new r.Inflater(_,s.size);if(l)F.inflateAsync(function(O){O.copy(O,0),p&&(D(O)?p(O):p(O,t.Errors.BAD_CRC()))});else{if(F.inflate(T).copy(T,0),!D(T))throw t.Errors.BAD_CRC(`"${C.decode(c)}"`);return T}break;default:throw l&&p&&p(Buffer.alloc(0),t.Errors.UNKNOWN_METHOD()),t.Errors.UNKNOWN_METHOD()}}function R(l,p){if((!d||!d.length)&&Buffer.isBuffer(i))return l&&p&&p(L()),L();if(d.length&&!f){var w;switch(s.method){case t.Constants.STORED:return s.compressedSize=s.size,w=Buffer.alloc(d.length),d.copy(w),l&&p&&p(w),w;default:case t.Constants.DEFLATED:var _=new r.Deflater(d);if(l)_.deflateAsync(function(F){w=Buffer.alloc(F.length),s.compressedSize=F.length,F.copy(w),p&&p(w)});else{var T=_.deflate();return s.compressedSize=T.length,T}_=null;break}}else if(l&&p)p(Buffer.alloc(0));else return Buffer.alloc(0)}function h(l,p){return(l.readUInt32LE(p+4)<<4)+l.readUInt32LE(p)}function u(l){try{for(var p=0,w,_,T;p+4<l.length;)w=l.readUInt16LE(p),p+=2,_=l.readUInt16LE(p),p+=2,T=l.slice(p,p+_),p+=_,n.ID_ZIP64===w&&S(T)}catch{throw t.Errors.EXTRA_FIELD_PARSE_ERROR()}}function S(l){var p,w,_,T;l.length>=n.EF_ZIP64_SCOMP&&(p=h(l,n.EF_ZIP64_SUNCOMP),s.size===n.EF_ZIP64_OR_32&&(s.size=p)),l.length>=n.EF_ZIP64_RHO&&(w=h(l,n.EF_ZIP64_SCOMP),s.compressedSize===n.EF_ZIP64_OR_32&&(s.compressedSize=w)),l.length>=n.EF_ZIP64_DSN&&(_=h(l,n.EF_ZIP64_RHO),s.offset===n.EF_ZIP64_OR_32&&(s.offset=_)),l.length>=n.EF_ZIP64_DSN+4&&(T=l.readUInt32LE(n.EF_ZIP64_DSN),s.diskNumStart===n.EF_ZIP64_OR_16&&(s.diskNumStart=T))}return{get entryName(){return C.decode(c)},get rawEntryName(){return c},set entryName(l){c=t.toBuffer(l,C.encode);var p=c[c.length-1];f=p===47||p===92,s.fileNameLength=c.length},get efs(){return typeof y=="function"?y(this.entryName):y},get extra(){return g},set extra(l){g=l,s.extraLength=l.length,u(l)},get comment(){return C.decode(a)},set comment(l){if(a=t.toBuffer(l,C.encode),s.commentLength=a.length,a.length>65535)throw t.Errors.COMMENT_TOO_LONG()},get name(){var l=C.decode(c);return f?l.substr(l.length-1).split("/").pop():l.split("/").pop()},get isDirectory(){return f},getCompressedData:function(){return R(!1,null)},getCompressedDataAsync:function(l){R(!0,l)},setData:function(l){d=t.toBuffer(l,t.decoder.encode),!f&&d.length?(s.size=d.length,s.method=t.Constants.DEFLATED,s.crc=t.crc32(l),s.changed=!0):s.method=t.Constants.STORED},getData:function(l){return s.changed?d:I(!1,null,l)},getDataAsync:function(l,p){s.changed?l(d):I(!0,l,p)},set attr(l){s.attr=l},get attr(){return s.attr},set header(l){s.loadFromBinary(l)},get header(){return s},packCentralHeader:function(){s.flags_efs=this.efs,s.extraLength=g.length;var l=s.centralHeaderToBinary(),p=t.Constants.CENHDR;return c.copy(l,p),p+=c.length,g.copy(l,p),p+=s.extraLength,a.copy(l,p),l},packLocalHeader:function(){let l=0;s.flags_efs=this.efs,s.extraLocalLength=N.length;const p=s.localHeaderToBinary(),w=Buffer.alloc(p.length+c.length+s.extraLocalLength);return p.copy(w,l),l+=p.length,c.copy(w,l),l+=c.length,N.copy(w,l),l+=N.length,w},toJSON:function(){const l=function(p){return"<"+(p&&p.length+" bytes buffer"||"null")+">"};return{entryName:this.entryName,name:this.name,comment:this.comment,isDirectory:this.isDirectory,header:s.toJSON(),compressedData:l(i),data:l(d)}},toString:function(){return JSON.stringify(this.toJSON(),null," ")}}},Be}var ve,Et;function yn(){if(Et)return ve;Et=1;const t=ht(),e=at(),n=oe();return ve=function(r,o){var i=[],s={},c=Buffer.alloc(0),a=new e.MainHeader,f=!1;const d=new Set,g=o,{noSort:N,decoder:y}=g;r?L(g.readEntries):f=!0;function E(){const I=new Set;for(const R of Object.keys(s)){const h=R.split("/");if(h.pop(),!!h.length)for(let u=0;u<h.length;u++){const S=h.slice(0,u+1).join("/")+"/";I.add(S)}}for(const R of I)if(!(R in s)){const h=new t(g);h.entryName=R,h.attr=16,h.temporary=!0,i.push(h),s[h.entryName]=h,d.add(h)}}function C(){if(f=!0,s={},a.diskEntries>(r.length-a.offset)/n.Constants.CENHDR)throw n.Errors.DISK_ENTRY_TOO_LARGE();i=new Array(a.diskEntries);for(var I=a.offset,R=0;R<i.length;R++){var h=I,u=new t(g,r);u.header=r.slice(h,h+=n.Constants.CENHDR),u.entryName=r.slice(h,h+=u.header.fileNameLength),u.header.extraLength&&(u.extra=r.slice(h,h+=u.header.extraLength)),u.header.commentLength&&(u.comment=r.slice(h,h+u.header.commentLength)),I+=u.header.centralHeaderSize,i[R]=u,s[u.entryName]=u}d.clear(),E()}function L(I){var R=r.length-n.Constants.ENDHDR,h=Math.max(0,R-65535),u=h,S=r.length,l=-1,p=0;for(typeof g.trailingSpace=="boolean"&&g.trailingSpace&&(h=0),R;R>=u;R--)if(r[R]===80){if(r.readUInt32LE(R)===n.Constants.ENDSIG){l=R,p=R,S=R+n.Constants.ENDHDR,u=R-n.Constants.END64HDR;continue}if(r.readUInt32LE(R)===n.Constants.END64SIG){u=h;continue}if(r.readUInt32LE(R)===n.Constants.ZIP64SIG){l=R,S=R+n.readBigUInt64LE(r,R+n.Constants.ZIP64SIZE)+n.Constants.ZIP64LEAD;break}}if(l==-1)throw n.Errors.INVALID_FORMAT();a.loadFromBinary(r.slice(l,S)),a.commentLength&&(c=r.slice(p+n.Constants.ENDHDR)),I&&C()}function D(){i.length>1&&!N&&i.sort((I,R)=>I.entryName.toLowerCase().localeCompare(R.entryName.toLowerCase()))}return{get entries(){return f||C(),i.filter(I=>!d.has(I))},get comment(){return y.decode(c)},set comment(I){c=n.toBuffer(I,y.encode),a.commentLength=c.length},getEntryCount:function(){return f?i.length:a.diskEntries},forEach:function(I){this.entries.forEach(I)},getEntry:function(I){return f||C(),s[I]||null},setEntry:function(I){f||C(),i.push(I),s[I.entryName]=I,a.totalEntries=i.length},deleteFile:function(I,R=!0){f||C();const h=s[I];this.getEntryChildren(h,R).map(S=>S.entryName).forEach(this.deleteEntry)},deleteEntry:function(I){f||C();const R=s[I],h=i.indexOf(R);h>=0&&(i.splice(h,1),delete s[I],a.totalEntries=i.length)},getEntryChildren:function(I,R=!0){if(f||C(),typeof I=="object")if(I.isDirectory&&R){const h=[],u=I.entryName;for(const S of i)S.entryName.startsWith(u)&&h.push(S);return h}else return[I];return[]},getChildCount:function(I){if(I&&I.isDirectory){const R=this.getEntryChildren(I);return R.includes(I)?R.length-1:R.length}return 0},compressToBuffer:function(){f||C(),D();const I=[],R=[];let h=0,u=0;a.size=0,a.offset=0;let S=0;for(const w of this.entries){const _=w.getCompressedData();w.header.offset=u;const T=w.packLocalHeader(),F=T.length+_.length;u+=F,I.push(T),I.push(_);const O=w.packCentralHeader();R.push(O),a.size+=O.length,h+=F+O.length,S++}h+=a.mainHeaderSize,a.offset=u,a.totalEntries=S,u=0;const l=Buffer.alloc(h);for(const w of I)w.copy(l,u),u+=w.length;for(const w of R)w.copy(l,u),u+=w.length;const p=a.toBinary();return c&&c.copy(p,n.Constants.ENDHDR),p.copy(l,u),r=l,f=!1,l},toAsyncBuffer:function(I,R,h,u){try{f||C(),D();const S=[],l=[];let p=0,w=0,_=0;a.size=0,a.offset=0;const T=function(F){if(F.length>0){const O=F.shift(),b=O.entryName+O.extra.toString();h&&h(b),O.getCompressedDataAsync(function(x){u&&u(b),O.header.offset=w;const U=O.packLocalHeader(),B=U.length+x.length;w+=B,S.push(U),S.push(x);const P=O.packCentralHeader();l.push(P),a.size+=P.length,p+=B+P.length,_++,T(F)})}else{p+=a.mainHeaderSize,a.offset=w,a.totalEntries=_,w=0;const O=Buffer.alloc(p);S.forEach(function(x){x.copy(O,w),w+=x.length}),l.forEach(function(x){x.copy(O,w),w+=x.length});const b=a.toBinary();c&&c.copy(b,n.Constants.ENDHDR),b.copy(O,w),r=O,f=!1,I(O)}};T(Array.from(this.entries))}catch(S){R(S)}}}},ve}var He,mt;function gn(){if(mt)return He;mt=1;const t=oe(),e=W,n=ht(),r=yn(),o=(...a)=>t.findLast(a,f=>typeof f=="boolean"),i=(...a)=>t.findLast(a,f=>typeof f=="string"),s=(...a)=>t.findLast(a,f=>typeof f=="function"),c={noSort:!1,readEntries:!1,method:t.Constants.NONE,fs:null};return He=function(a,f){let d=null;const g=Object.assign(Object.create(null),c);a&&typeof a=="object"&&(a instanceof Uint8Array||(Object.assign(g,a),a=g.input?g.input:void 0,g.input&&delete g.input),Buffer.isBuffer(a)&&(d=a,g.method=t.Constants.BUFFER,a=void 0)),Object.assign(g,f);const N=new t(g);if((typeof g.decoder!="object"||typeof g.decoder.encode!="function"||typeof g.decoder.decode!="function")&&(g.decoder=t.decoder),a&&typeof a=="string")if(N.fs.existsSync(a))g.method=t.Constants.FILE,g.filename=a,d=N.fs.readFileSync(a);else throw t.Errors.INVALID_FILENAME();const y=new r(d,g),{canonical:E,sanitize:C,zipnamefix:L}=t;function D(u){if(u&&y){var S;if(typeof u=="string"&&(S=y.getEntry(e.posix.normalize(u))),typeof u=="object"&&typeof u.entryName<"u"&&typeof u.header<"u"&&(S=y.getEntry(u.entryName)),S)return S}return null}function I(u){const{join:S,normalize:l,sep:p}=e.posix;return S(".",l(p+u.split("\\").join(p)+p))}function R(u){return u instanceof RegExp?(function(S){return function(l){return S.test(l)}})(u):typeof u!="function"?()=>!0:u}const h=(u,S)=>{let l=S.slice(-1);return l=l===N.sep?N.sep:"",e.relative(u,S)+l};return{readFile:function(u,S){var l=D(u);return l&&l.getData(S)||null},childCount:function(u){const S=D(u);if(S)return y.getChildCount(S)},readFileAsync:function(u,S){var l=D(u);l?l.getDataAsync(S):S(null,"getEntry failed for:"+u)},readAsText:function(u,S){var l=D(u);if(l){var p=l.getData();if(p&&p.length)return p.toString(S||"utf8")}return""},readAsTextAsync:function(u,S,l){var p=D(u);p?p.getDataAsync(function(w,_){if(_){S(w,_);return}w&&w.length?S(w.toString(l||"utf8")):S("")}):S("")},deleteFile:function(u,S=!0){var l=D(u);l&&y.deleteFile(l.entryName,S)},deleteEntry:function(u){var S=D(u);S&&y.deleteEntry(S.entryName)},addZipComment:function(u){y.comment=u},getZipComment:function(){return y.comment||""},addZipEntryComment:function(u,S){var l=D(u);l&&(l.comment=S)},getZipEntryComment:function(u){var S=D(u);return S&&S.comment||""},updateFile:function(u,S){var l=D(u);l&&l.setData(S)},addLocalFile:function(u,S,l,p){if(N.fs.existsSync(u)){S=S?I(S):"";const w=e.win32.basename(e.win32.normalize(u));S+=l||w;const _=N.fs.statSync(u),T=_.isFile()?N.fs.readFileSync(u):Buffer.alloc(0);_.isDirectory()&&(S+=N.sep),this.addFile(S,T,p,_)}else throw t.Errors.FILE_NOT_FOUND(u)},addLocalFileAsync:function(u,S){u=typeof u=="object"?u:{localPath:u};const l=e.resolve(u.localPath),{comment:p}=u;let{zipPath:w,zipName:_}=u;const T=this;N.fs.stat(l,function(F,O){if(F)return S(F,!1);w=w?I(w):"";const b=e.win32.basename(e.win32.normalize(l));if(w+=_||b,O.isFile())N.fs.readFile(l,function(x,U){return x?S(x,!1):(T.addFile(w,U,p,O),setImmediate(S,void 0,!0))});else if(O.isDirectory())return w+=N.sep,T.addFile(w,Buffer.alloc(0),p,O),setImmediate(S,void 0,!0)})},addLocalFolder:function(u,S,l){if(l=R(l),S=S?I(S):"",u=e.normalize(u),N.fs.existsSync(u)){const p=N.findFiles(u),w=this;if(p.length)for(const _ of p){const T=e.join(S,h(u,_));l(T)&&w.addLocalFile(_,e.dirname(T))}}else throw t.Errors.FILE_NOT_FOUND(u)},addLocalFolderAsync:function(u,S,l,p){p=R(p),l=l?I(l):"",u=e.normalize(u);var w=this;N.fs.open(u,"r",function(_){if(_&&_.code==="ENOENT")S(void 0,t.Errors.FILE_NOT_FOUND(u));else if(_)S(void 0,_);else{var T=N.findFiles(u),F=-1,O=function(){if(F+=1,F<T.length){var b=T[F],x=h(u,b).split("\\").join("/");x=x.normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/[^\x20-\x7E]/g,""),p(x)?N.fs.stat(b,function(U,B){U&&S(void 0,U),B.isFile()?N.fs.readFile(b,function(P,Z){P?S(void 0,P):(w.addFile(l+x,Z,"",B),O())}):(w.addFile(l+x+"/",Buffer.alloc(0),"",B),O())}):process.nextTick(()=>{O()})}else S(!0,void 0)};O()}})},addLocalFolderAsync2:function(u,S){const l=this;u=typeof u=="object"?u:{localPath:u},localPath=e.resolve(I(u.localPath));let{zipPath:p,filter:w,namefix:_}=u;w instanceof RegExp?w=(function(O){return function(b){return O.test(b)}})(w):typeof w!="function"&&(w=function(){return!0}),p=p?I(p):"",_=="latin1"&&(_=O=>O.normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/[^\x20-\x7E]/g,"")),typeof _!="function"&&(_=O=>O);const T=O=>e.join(p,_(h(localPath,O))),F=O=>e.win32.basename(e.win32.normalize(_(O)));N.fs.open(localPath,"r",function(O){O&&O.code==="ENOENT"?S(void 0,t.Errors.FILE_NOT_FOUND(localPath)):O?S(void 0,O):N.findFilesAsync(localPath,function(b,x){if(b)return S(b);x=x.filter(U=>w(T(U))),x.length||S(void 0,!1),setImmediate(x.reverse().reduce(function(U,B){return function(P,Z){if(P||Z===!1)return setImmediate(U,P,!1);l.addLocalFileAsync({localPath:B,zipPath:e.dirname(T(B)),zipName:F(B)},U)}},S))})})},addLocalFolderPromise:function(u,S){return new Promise((l,p)=>{this.addLocalFolderAsync2(Object.assign({localPath:u},S),(w,_)=>{w&&p(w),_&&l(this)})})},addFile:function(u,S,l,p){u=L(u);let w=D(u);const _=w!=null;_||(w=new n(g),w.entryName=u),w.comment=l||"";const T=typeof p=="object"&&p instanceof N.fs.Stats;T&&(w.header.time=p.mtime);var F=w.isDirectory?16:0;let O=w.isDirectory?16384:32768;return T?O|=4095&p.mode:typeof p=="number"?O|=4095&p:O|=w.isDirectory?493:420,F=(F|O<<16)>>>0,w.attr=F,w.setData(S),_||y.setEntry(w),w},getEntries:function(u){return y.password=u,y?y.entries:[]},getEntry:function(u){return D(u)},getEntryCount:function(){return y.getEntryCount()},forEach:function(u){return y.forEach(u)},extractEntryTo:function(u,S,l,p,w,_){p=o(!1,p),w=o(!1,w),l=o(!0,l),_=i(w,_);var T=D(u);if(!T)throw t.Errors.NO_ENTRY();var F=E(T.entryName),O=C(S,_&&!T.isDirectory?_:l?F:e.basename(F));if(T.isDirectory){var b=y.getEntryChildren(T);return b.forEach(function(B){if(B.isDirectory)return;var P=B.getData();if(!P)throw t.Errors.CANT_EXTRACT_FILE();var Z=E(B.entryName),de=C(S,l?Z:e.basename(Z));const q=w?B.header.fileAttr:void 0;N.writeFileTo(de,P,p,q)}),!0}var x=T.getData(y.password);if(!x)throw t.Errors.CANT_EXTRACT_FILE();if(N.fs.existsSync(O)&&!p)throw t.Errors.CANT_OVERRIDE();const U=w?u.header.fileAttr:void 0;return N.writeFileTo(O,x,p,U),!0},test:function(u){if(!y)return!1;for(var S in y.entries)try{if(S.isDirectory)continue;var l=y.entries[S].getData(u);if(!l)return!1}catch{return!1}return!0},extractAllTo:function(u,S,l,p){if(l=o(!1,l),p=i(l,p),S=o(!1,S),!y)throw t.Errors.NO_ZIP();y.entries.forEach(function(w){var _=C(u,E(w.entryName));if(w.isDirectory){N.makeDir(_);return}var T=w.getData(p);if(!T)throw t.Errors.CANT_EXTRACT_FILE();const F=l?w.header.fileAttr:void 0;N.writeFileTo(_,T,S,F);try{N.fs.utimesSync(_,w.header.time,w.header.time)}catch{throw t.Errors.CANT_EXTRACT_FILE()}})},extractAllToAsync:function(u,S,l,p){if(p=s(S,l,p),l=o(!1,l),S=o(!1,S),!p)return new Promise((O,b)=>{this.extractAllToAsync(u,S,l,function(x){x?b(x):O(this)})});if(!y){p(t.Errors.NO_ZIP());return}u=e.resolve(u);const w=O=>C(u,e.normalize(E(O.entryName))),_=(O,b)=>new Error(O+': "'+b+'"'),T=[],F=[];y.entries.forEach(O=>{O.isDirectory?T.push(O):F.push(O)});for(const O of T){const b=w(O),x=l?O.header.fileAttr:void 0;try{N.makeDir(b),x&&N.fs.chmodSync(b,x),N.fs.utimesSync(b,O.header.time,O.header.time)}catch{p(_("Unable to create folder",b))}}F.reverse().reduce(function(O,b){return function(x){if(x)O(x);else{const U=e.normalize(E(b.entryName)),B=C(u,U);b.getDataAsync(function(P,Z){if(Z)O(Z);else if(!P)O(t.Errors.CANT_EXTRACT_FILE());else{const de=l?b.header.fileAttr:void 0;N.writeFileToAsync(B,P,S,de,function(q){q||O(_("Unable to write file",B)),N.fs.utimes(B,b.header.time,b.header.time,function(V){V?O(_("Unable to set times",B)):O()})})}})}}},p)()},writeZip:function(u,S){if(arguments.length===1&&typeof u=="function"&&(S=u,u=""),!u&&g.filename&&(u=g.filename),!!u){var l=y.compressToBuffer();if(l){var p=N.writeFileTo(u,l,!0);typeof S=="function"&&S(p?null:new Error("failed"),"")}}},writeZipPromise:function(u,S){const{overwrite:l,perm:p}=Object.assign({overwrite:!0},S);return new Promise((w,_)=>{!u&&g.filename&&(u=g.filename),u||_("ADM-ZIP: ZIP File Name Missing"),this.toBufferPromise().then(T=>{const F=O=>O?w(O):_("ADM-ZIP: Wasn't able to write zip file");N.writeFileToAsync(u,T,l,p,F)},_)})},toBufferPromise:function(){return new Promise((u,S)=>{y.toAsyncBuffer(u,S)})},toBuffer:function(u,S,l,p){return typeof u=="function"?(y.toAsyncBuffer(u,S,l,p),null):y.compressToBuffer()}}},He}var Sn=gn();const wn=re(Sn);function pt(t,e){return function(){return t.apply(e,arguments)}}const{toString:Cn}=Object.prototype,{getPrototypeOf:Me}=Object,{iterator:Ee,toStringTag:yt}=Symbol,me=(t=>e=>{const n=Cn.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),k=t=>(t=t.toLowerCase(),e=>me(e)===t),pe=t=>e=>typeof e===t,{isArray:Q}=Array,ee=pe("undefined");function ie(t){return t!==null&&!ee(t)&&t.constructor!==null&&!ee(t.constructor)&&j(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const gt=k("ArrayBuffer");function Nn(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&gt(t.buffer),e}const Ln=pe("string"),j=pe("function"),St=pe("number"),ae=t=>t!==null&&typeof t=="object",In=t=>t===!0||t===!1,ye=t=>{if(me(t)!=="object")return!1;const e=Me(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(yt in t)&&!(Ee in t)},On=t=>{if(!ae(t)||ie(t))return!1;try{return Object.keys(t).length===0&&Object.getPrototypeOf(t)===Object.prototype}catch{return!1}},Dn=k("Date"),Rn=k("File"),_n=k("Blob"),Tn=k("FileList"),An=t=>ae(t)&&j(t.pipe),Fn=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||j(t.append)&&((e=me(t))==="formdata"||e==="object"&&j(t.toString)&&t.toString()==="[object FormData]"))},bn=k("URLSearchParams"),[xn,Un,Pn,Bn]=["ReadableStream","Request","Response","Headers"].map(k),vn=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ce(t,e,{allOwnKeys:n=!1}={}){if(t===null||typeof t>"u")return;let r,o;if(typeof t!="object"&&(t=[t]),Q(t))for(r=0,o=t.length;r<o;r++)e.call(null,t[r],r,t);else{if(ie(t))return;const i=n?Object.getOwnPropertyNames(t):Object.keys(t),s=i.length;let c;for(r=0;r<s;r++)c=i[r],e.call(null,t[c],c,t)}}function wt(t,e){if(ie(t))return null;e=e.toLowerCase();const n=Object.keys(t);let r=n.length,o;for(;r-- >0;)if(o=n[r],e===o.toLowerCase())return o;return null}const J=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Ct=t=>!ee(t)&&t!==J;function je(){const{caseless:t,skipUndefined:e}=Ct(this)&&this||{},n={},r=(o,i)=>{const s=t&&wt(n,i)||i;ye(n[s])&&ye(o)?n[s]=je(n[s],o):ye(o)?n[s]=je({},o):Q(o)?n[s]=o.slice():(!e||!ee(o))&&(n[s]=o)};for(let o=0,i=arguments.length;o<i;o++)arguments[o]&&ce(arguments[o],r);return n}const Hn=(t,e,n,{allOwnKeys:r}={})=>(ce(e,(o,i)=>{n&&j(o)?t[i]=pt(o,n):t[i]=o},{allOwnKeys:r}),t),Mn=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),jn=(t,e,n,r)=>{t.prototype=Object.create(e.prototype,r),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},zn=(t,e,n,r)=>{let o,i,s;const c={};if(e=e||{},t==null)return e;do{for(o=Object.getOwnPropertyNames(t),i=o.length;i-- >0;)s=o[i],(!r||r(s,t,e))&&!c[s]&&(e[s]=t[s],c[s]=!0);t=n!==!1&&Me(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},Zn=(t,e,n)=>{t=String(t),(n===void 0||n>t.length)&&(n=t.length),n-=e.length;const r=t.indexOf(e,n);return r!==-1&&r===n},qn=t=>{if(!t)return null;if(Q(t))return t;let e=t.length;if(!St(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},kn=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&Me(Uint8Array)),$n=(t,e)=>{const r=(t&&t[Ee]).call(t);let o;for(;(o=r.next())&&!o.done;){const i=o.value;e.call(t,i[0],i[1])}},Vn=(t,e)=>{let n;const r=[];for(;(n=t.exec(e))!==null;)r.push(n);return r},Gn=k("HTMLFormElement"),Xn=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),Nt=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),Wn=k("RegExp"),Lt=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),r={};ce(n,(o,i)=>{let s;(s=e(o,i,t))!==!1&&(r[i]=s||o)}),Object.defineProperties(t,r)},Jn=t=>{Lt(t,(e,n)=>{if(j(t)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=t[n];if(j(r)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},Kn=(t,e)=>{const n={},r=o=>{o.forEach(i=>{n[i]=!0})};return Q(t)?r(t):r(String(t).split(e)),n},Yn=()=>{},Qn=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e;function er(t){return!!(t&&j(t.append)&&t[yt]==="FormData"&&t[Ee])}const tr=t=>{const e=new Array(10),n=(r,o)=>{if(ae(r)){if(e.indexOf(r)>=0)return;if(ie(r))return r;if(!("toJSON"in r)){e[o]=r;const i=Q(r)?[]:{};return ce(r,(s,c)=>{const a=n(s,o+1);!ee(a)&&(i[c]=a)}),e[o]=void 0,i}}return r};return n(t,0)},nr=k("AsyncFunction"),rr=t=>t&&(ae(t)||j(t))&&j(t.then)&&j(t.catch),It=((t,e)=>t?setImmediate:e?((n,r)=>(J.addEventListener("message",({source:o,data:i})=>{o===J&&i===n&&r.length&&r.shift()()},!1),o=>{r.push(o),J.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",j(J.postMessage)),or=typeof queueMicrotask<"u"?queueMicrotask.bind(J):typeof process<"u"&&process.nextTick||It,m={isArray:Q,isArrayBuffer:gt,isBuffer:ie,isFormData:Fn,isArrayBufferView:Nn,isString:Ln,isNumber:St,isBoolean:In,isObject:ae,isPlainObject:ye,isEmptyObject:On,isReadableStream:xn,isRequest:Un,isResponse:Pn,isHeaders:Bn,isUndefined:ee,isDate:Dn,isFile:Rn,isBlob:_n,isRegExp:Wn,isFunction:j,isStream:An,isURLSearchParams:bn,isTypedArray:kn,isFileList:Tn,forEach:ce,merge:je,extend:Hn,trim:vn,stripBOM:Mn,inherits:jn,toFlatObject:zn,kindOf:me,kindOfTest:k,endsWith:Zn,toArray:qn,forEachEntry:$n,matchAll:Vn,isHTMLForm:Gn,hasOwnProperty:Nt,hasOwnProp:Nt,reduceDescriptors:Lt,freezeMethods:Jn,toObjectSet:Kn,toCamelCase:Xn,noop:Yn,toFiniteNumber:Qn,findKey:wt,global:J,isContextDefined:Ct,isSpecCompliantForm:er,toJSONObject:tr,isAsyncFn:nr,isThenable:rr,setImmediate:It,asap:or,isIterable:t=>t!=null&&j(t[Ee])};function A(t,e,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=t,this.name="AxiosError",e&&(this.code=e),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o,this.status=o.status?o.status:null)}m.inherits(A,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:m.toJSONObject(this.config),code:this.code,status:this.status}}});const Ot=A.prototype,Dt={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(t=>{Dt[t]={value:t}}),Object.defineProperties(A,Dt),Object.defineProperty(Ot,"isAxiosError",{value:!0}),A.from=(t,e,n,r,o,i)=>{const s=Object.create(Ot);m.toFlatObject(t,s,function(d){return d!==Error.prototype},f=>f!=="isAxiosError");const c=t&&t.message?t.message:"Error",a=e==null&&t?t.code:e;return A.call(s,c,a,n,r,o),t&&s.cause==null&&Object.defineProperty(s,"cause",{value:t,configurable:!0}),s.name=t&&t.name||"Error",i&&Object.assign(s,i),s};const sr=null;function ze(t){return m.isPlainObject(t)||m.isArray(t)}function Rt(t){return m.endsWith(t,"[]")?t.slice(0,-2):t}function _t(t,e,n){return t?t.concat(e).map(function(o,i){return o=Rt(o),!n&&i?"["+o+"]":o}).join(n?".":""):e}function ir(t){return m.isArray(t)&&!t.some(ze)}const ar=m.toFlatObject(m,{},null,function(e){return/^is[A-Z]/.test(e)});function ge(t,e,n){if(!m.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,n=m.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(C,L){return!m.isUndefined(L[C])});const r=n.metaTokens,o=n.visitor||d,i=n.dots,s=n.indexes,a=(n.Blob||typeof Blob<"u"&&Blob)&&m.isSpecCompliantForm(e);if(!m.isFunction(o))throw new TypeError("visitor must be a function");function f(E){if(E===null)return"";if(m.isDate(E))return E.toISOString();if(m.isBoolean(E))return E.toString();if(!a&&m.isBlob(E))throw new A("Blob is not supported. Use a Buffer instead.");return m.isArrayBuffer(E)||m.isTypedArray(E)?a&&typeof Blob=="function"?new Blob([E]):Buffer.from(E):E}function d(E,C,L){let D=E;if(E&&!L&&typeof E=="object"){if(m.endsWith(C,"{}"))C=r?C:C.slice(0,-2),E=JSON.stringify(E);else if(m.isArray(E)&&ir(E)||(m.isFileList(E)||m.endsWith(C,"[]"))&&(D=m.toArray(E)))return C=Rt(C),D.forEach(function(R,h){!(m.isUndefined(R)||R===null)&&e.append(s===!0?_t([C],h,i):s===null?C:C+"[]",f(R))}),!1}return ze(E)?!0:(e.append(_t(L,C,i),f(E)),!1)}const g=[],N=Object.assign(ar,{defaultVisitor:d,convertValue:f,isVisitable:ze});function y(E,C){if(!m.isUndefined(E)){if(g.indexOf(E)!==-1)throw Error("Circular reference detected in "+C.join("."));g.push(E),m.forEach(E,function(D,I){(!(m.isUndefined(D)||D===null)&&o.call(e,D,m.isString(I)?I.trim():I,C,N))===!0&&y(D,C?C.concat(I):[I])}),g.pop()}}if(!m.isObject(t))throw new TypeError("data must be an object");return y(t),e}function Tt(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(r){return e[r]})}function Ze(t,e){this._pairs=[],t&&ge(t,this,e)}const At=Ze.prototype;At.append=function(e,n){this._pairs.push([e,n])},At.toString=function(e){const n=e?function(r){return e.call(this,r,Tt)}:Tt;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function cr(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Ft(t,e,n){if(!e)return t;const r=n&&n.encode||cr;m.isFunction(n)&&(n={serialize:n});const o=n&&n.serialize;let i;if(o?i=o(e,n):i=m.isURLSearchParams(e)?e.toString():new Ze(e,n).toString(r),i){const s=t.indexOf("#");s!==-1&&(t=t.slice(0,s)),t+=(t.indexOf("?")===-1?"?":"&")+i}return t}class bt{constructor(){this.handlers=[]}use(e,n,r){return this.handlers.push({fulfilled:e,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){m.forEach(this.handlers,function(r){r!==null&&e(r)})}}const xt={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},fr={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:Ze,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},qe=typeof window<"u"&&typeof document<"u",ke=typeof navigator=="object"&&navigator||void 0,ur=qe&&(!ke||["ReactNative","NativeScript","NS"].indexOf(ke.product)<0),lr=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",dr=qe&&window.location.href||"http://localhost",M={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:qe,hasStandardBrowserEnv:ur,hasStandardBrowserWebWorkerEnv:lr,navigator:ke,origin:dr},Symbol.toStringTag,{value:"Module"})),...fr};function hr(t,e){return ge(t,new M.classes.URLSearchParams,{visitor:function(n,r,o,i){return M.isNode&&m.isBuffer(n)?(this.append(r,n.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)},...e})}function Er(t){return m.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function mr(t){const e={},n=Object.keys(t);let r;const o=n.length;let i;for(r=0;r<o;r++)i=n[r],e[i]=t[i];return e}function Ut(t){function e(n,r,o,i){let s=n[i++];if(s==="__proto__")return!0;const c=Number.isFinite(+s),a=i>=n.length;return s=!s&&m.isArray(o)?o.length:s,a?(m.hasOwnProp(o,s)?o[s]=[o[s],r]:o[s]=r,!c):((!o[s]||!m.isObject(o[s]))&&(o[s]=[]),e(n,r,o[s],i)&&m.isArray(o[s])&&(o[s]=mr(o[s])),!c)}if(m.isFormData(t)&&m.isFunction(t.entries)){const n={};return m.forEachEntry(t,(r,o)=>{e(Er(r),o,n,0)}),n}return null}function pr(t,e,n){if(m.isString(t))try{return(e||JSON.parse)(t),m.trim(t)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(t)}const fe={transitional:xt,adapter:["xhr","http","fetch"],transformRequest:[function(e,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,i=m.isObject(e);if(i&&m.isHTMLForm(e)&&(e=new FormData(e)),m.isFormData(e))return o?JSON.stringify(Ut(e)):e;if(m.isArrayBuffer(e)||m.isBuffer(e)||m.isStream(e)||m.isFile(e)||m.isBlob(e)||m.isReadableStream(e))return e;if(m.isArrayBufferView(e))return e.buffer;if(m.isURLSearchParams(e))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let c;if(i){if(r.indexOf("application/x-www-form-urlencoded")>-1)return hr(e,this.formSerializer).toString();if((c=m.isFileList(e))||r.indexOf("multipart/form-data")>-1){const a=this.env&&this.env.FormData;return ge(c?{"files[]":e}:e,a&&new a,this.formSerializer)}}return i||o?(n.setContentType("application/json",!1),pr(e)):e}],transformResponse:[function(e){const n=this.transitional||fe.transitional,r=n&&n.forcedJSONParsing,o=this.responseType==="json";if(m.isResponse(e)||m.isReadableStream(e))return e;if(e&&m.isString(e)&&(r&&!this.responseType||o)){const s=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(e,this.parseReviver)}catch(c){if(s)throw c.name==="SyntaxError"?A.from(c,A.ERR_BAD_RESPONSE,this,null,this.response):c}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:M.classes.FormData,Blob:M.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};m.forEach(["delete","get","head","post","put","patch"],t=>{fe.headers[t]={}});const yr=m.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),gr=t=>{const e={};let n,r,o;return t&&t.split(`
2
- `).forEach(function(s){o=s.indexOf(":"),n=s.substring(0,o).trim().toLowerCase(),r=s.substring(o+1).trim(),!(!n||e[n]&&yr[n])&&(n==="set-cookie"?e[n]?e[n].push(r):e[n]=[r]:e[n]=e[n]?e[n]+", "+r:r)}),e},Pt=Symbol("internals");function ue(t){return t&&String(t).trim().toLowerCase()}function Se(t){return t===!1||t==null?t:m.isArray(t)?t.map(Se):String(t)}function Sr(t){const e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(t);)e[r[1]]=r[2];return e}const wr=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function $e(t,e,n,r,o){if(m.isFunction(r))return r.call(this,e,n);if(o&&(e=n),!!m.isString(e)){if(m.isString(r))return e.indexOf(r)!==-1;if(m.isRegExp(r))return r.test(e)}}function Cr(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,n,r)=>n.toUpperCase()+r)}function Nr(t,e){const n=m.toCamelCase(" "+e);["get","set","has"].forEach(r=>{Object.defineProperty(t,r+n,{value:function(o,i,s){return this[r].call(this,e,o,i,s)},configurable:!0})})}let z=class{constructor(e){e&&this.set(e)}set(e,n,r){const o=this;function i(c,a,f){const d=ue(a);if(!d)throw new Error("header name must be a non-empty string");const g=m.findKey(o,d);(!g||o[g]===void 0||f===!0||f===void 0&&o[g]!==!1)&&(o[g||a]=Se(c))}const s=(c,a)=>m.forEach(c,(f,d)=>i(f,d,a));if(m.isPlainObject(e)||e instanceof this.constructor)s(e,n);else if(m.isString(e)&&(e=e.trim())&&!wr(e))s(gr(e),n);else if(m.isObject(e)&&m.isIterable(e)){let c={},a,f;for(const d of e){if(!m.isArray(d))throw TypeError("Object iterator must return a key-value pair");c[f=d[0]]=(a=c[f])?m.isArray(a)?[...a,d[1]]:[a,d[1]]:d[1]}s(c,n)}else e!=null&&i(n,e,r);return this}get(e,n){if(e=ue(e),e){const r=m.findKey(this,e);if(r){const o=this[r];if(!n)return o;if(n===!0)return Sr(o);if(m.isFunction(n))return n.call(this,o,r);if(m.isRegExp(n))return n.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,n){if(e=ue(e),e){const r=m.findKey(this,e);return!!(r&&this[r]!==void 0&&(!n||$e(this,this[r],r,n)))}return!1}delete(e,n){const r=this;let o=!1;function i(s){if(s=ue(s),s){const c=m.findKey(r,s);c&&(!n||$e(r,r[c],c,n))&&(delete r[c],o=!0)}}return m.isArray(e)?e.forEach(i):i(e),o}clear(e){const n=Object.keys(this);let r=n.length,o=!1;for(;r--;){const i=n[r];(!e||$e(this,this[i],i,e,!0))&&(delete this[i],o=!0)}return o}normalize(e){const n=this,r={};return m.forEach(this,(o,i)=>{const s=m.findKey(r,i);if(s){n[s]=Se(o),delete n[i];return}const c=e?Cr(i):String(i).trim();c!==i&&delete n[i],n[c]=Se(o),r[c]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const n=Object.create(null);return m.forEach(this,(r,o)=>{r!=null&&r!==!1&&(n[o]=e&&m.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,n])=>e+": "+n).join(`
3
- `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...n){const r=new this(e);return n.forEach(o=>r.set(o)),r}static accessor(e){const r=(this[Pt]=this[Pt]={accessors:{}}).accessors,o=this.prototype;function i(s){const c=ue(s);r[c]||(Nr(o,s),r[c]=!0)}return m.isArray(e)?e.forEach(i):i(e),this}};z.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),m.reduceDescriptors(z.prototype,({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(r){this[n]=r}}}),m.freezeMethods(z);function Ve(t,e){const n=this||fe,r=e||n,o=z.from(r.headers);let i=r.data;return m.forEach(t,function(c){i=c.call(n,i,o.normalize(),e?e.status:void 0)}),o.normalize(),i}function Bt(t){return!!(t&&t.__CANCEL__)}function te(t,e,n){A.call(this,t??"canceled",A.ERR_CANCELED,e,n),this.name="CanceledError"}m.inherits(te,A,{__CANCEL__:!0});function vt(t,e,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?t(n):e(new A("Request failed with status code "+n.status,[A.ERR_BAD_REQUEST,A.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function Lr(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function Ir(t,e){t=t||10;const n=new Array(t),r=new Array(t);let o=0,i=0,s;return e=e!==void 0?e:1e3,function(a){const f=Date.now(),d=r[i];s||(s=f),n[o]=a,r[o]=f;let g=i,N=0;for(;g!==o;)N+=n[g++],g=g%t;if(o=(o+1)%t,o===i&&(i=(i+1)%t),f-s<e)return;const y=d&&f-d;return y?Math.round(N*1e3/y):void 0}}function Or(t,e){let n=0,r=1e3/e,o,i;const s=(f,d=Date.now())=>{n=d,o=null,i&&(clearTimeout(i),i=null),t(...f)};return[(...f)=>{const d=Date.now(),g=d-n;g>=r?s(f,d):(o=f,i||(i=setTimeout(()=>{i=null,s(o)},r-g)))},()=>o&&s(o)]}const we=(t,e,n=3)=>{let r=0;const o=Ir(50,250);return Or(i=>{const s=i.loaded,c=i.lengthComputable?i.total:void 0,a=s-r,f=o(a),d=s<=c;r=s;const g={loaded:s,total:c,progress:c?s/c:void 0,bytes:a,rate:f||void 0,estimated:f&&c&&d?(c-s)/f:void 0,event:i,lengthComputable:c!=null,[e?"download":"upload"]:!0};t(g)},n)},Ht=(t,e)=>{const n=t!=null;return[r=>e[0]({lengthComputable:n,total:t,loaded:r}),e[1]]},Mt=t=>(...e)=>m.asap(()=>t(...e)),Dr=M.hasStandardBrowserEnv?((t,e)=>n=>(n=new URL(n,M.origin),t.protocol===n.protocol&&t.host===n.host&&(e||t.port===n.port)))(new URL(M.origin),M.navigator&&/(msie|trident)/i.test(M.navigator.userAgent)):()=>!0,Rr=M.hasStandardBrowserEnv?{write(t,e,n,r,o,i,s){if(typeof document>"u")return;const c=[`${t}=${encodeURIComponent(e)}`];m.isNumber(n)&&c.push(`expires=${new Date(n).toUTCString()}`),m.isString(r)&&c.push(`path=${r}`),m.isString(o)&&c.push(`domain=${o}`),i===!0&&c.push("secure"),m.isString(s)&&c.push(`SameSite=${s}`),document.cookie=c.join("; ")},read(t){if(typeof document>"u")return null;const e=document.cookie.match(new RegExp("(?:^|; )"+t+"=([^;]*)"));return e?decodeURIComponent(e[1]):null},remove(t){this.write(t,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function _r(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function Tr(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function jt(t,e,n){let r=!_r(e);return t&&(r||n==!1)?Tr(t,e):e}const zt=t=>t instanceof z?{...t}:t;function K(t,e){e=e||{};const n={};function r(f,d,g,N){return m.isPlainObject(f)&&m.isPlainObject(d)?m.merge.call({caseless:N},f,d):m.isPlainObject(d)?m.merge({},d):m.isArray(d)?d.slice():d}function o(f,d,g,N){if(m.isUndefined(d)){if(!m.isUndefined(f))return r(void 0,f,g,N)}else return r(f,d,g,N)}function i(f,d){if(!m.isUndefined(d))return r(void 0,d)}function s(f,d){if(m.isUndefined(d)){if(!m.isUndefined(f))return r(void 0,f)}else return r(void 0,d)}function c(f,d,g){if(g in e)return r(f,d);if(g in t)return r(void 0,f)}const a={url:i,method:i,data:i,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:c,headers:(f,d,g)=>o(zt(f),zt(d),g,!0)};return m.forEach(Object.keys({...t,...e}),function(d){const g=a[d]||o,N=g(t[d],e[d],d);m.isUndefined(N)&&g!==c||(n[d]=N)}),n}const Zt=t=>{const e=K({},t);let{data:n,withXSRFToken:r,xsrfHeaderName:o,xsrfCookieName:i,headers:s,auth:c}=e;if(e.headers=s=z.from(s),e.url=Ft(jt(e.baseURL,e.url,e.allowAbsoluteUrls),t.params,t.paramsSerializer),c&&s.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):""))),m.isFormData(n)){if(M.hasStandardBrowserEnv||M.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if(m.isFunction(n.getHeaders)){const a=n.getHeaders(),f=["content-type","content-length"];Object.entries(a).forEach(([d,g])=>{f.includes(d.toLowerCase())&&s.set(d,g)})}}if(M.hasStandardBrowserEnv&&(r&&m.isFunction(r)&&(r=r(e)),r||r!==!1&&Dr(e.url))){const a=o&&i&&Rr.read(i);a&&s.set(o,a)}return e},Ar=typeof XMLHttpRequest<"u"&&function(t){return new Promise(function(n,r){const o=Zt(t);let i=o.data;const s=z.from(o.headers).normalize();let{responseType:c,onUploadProgress:a,onDownloadProgress:f}=o,d,g,N,y,E;function C(){y&&y(),E&&E(),o.cancelToken&&o.cancelToken.unsubscribe(d),o.signal&&o.signal.removeEventListener("abort",d)}let L=new XMLHttpRequest;L.open(o.method.toUpperCase(),o.url,!0),L.timeout=o.timeout;function D(){if(!L)return;const R=z.from("getAllResponseHeaders"in L&&L.getAllResponseHeaders()),u={data:!c||c==="text"||c==="json"?L.responseText:L.response,status:L.status,statusText:L.statusText,headers:R,config:t,request:L};vt(function(l){n(l),C()},function(l){r(l),C()},u),L=null}"onloadend"in L?L.onloadend=D:L.onreadystatechange=function(){!L||L.readyState!==4||L.status===0&&!(L.responseURL&&L.responseURL.indexOf("file:")===0)||setTimeout(D)},L.onabort=function(){L&&(r(new A("Request aborted",A.ECONNABORTED,t,L)),L=null)},L.onerror=function(h){const u=h&&h.message?h.message:"Network Error",S=new A(u,A.ERR_NETWORK,t,L);S.event=h||null,r(S),L=null},L.ontimeout=function(){let h=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const u=o.transitional||xt;o.timeoutErrorMessage&&(h=o.timeoutErrorMessage),r(new A(h,u.clarifyTimeoutError?A.ETIMEDOUT:A.ECONNABORTED,t,L)),L=null},i===void 0&&s.setContentType(null),"setRequestHeader"in L&&m.forEach(s.toJSON(),function(h,u){L.setRequestHeader(u,h)}),m.isUndefined(o.withCredentials)||(L.withCredentials=!!o.withCredentials),c&&c!=="json"&&(L.responseType=o.responseType),f&&([N,E]=we(f,!0),L.addEventListener("progress",N)),a&&L.upload&&([g,y]=we(a),L.upload.addEventListener("progress",g),L.upload.addEventListener("loadend",y)),(o.cancelToken||o.signal)&&(d=R=>{L&&(r(!R||R.type?new te(null,t,L):R),L.abort(),L=null)},o.cancelToken&&o.cancelToken.subscribe(d),o.signal&&(o.signal.aborted?d():o.signal.addEventListener("abort",d)));const I=Lr(o.url);if(I&&M.protocols.indexOf(I)===-1){r(new A("Unsupported protocol "+I+":",A.ERR_BAD_REQUEST,t));return}L.send(i||null)})},Fr=(t,e)=>{const{length:n}=t=t?t.filter(Boolean):[];if(e||n){let r=new AbortController,o;const i=function(f){if(!o){o=!0,c();const d=f instanceof Error?f:this.reason;r.abort(d instanceof A?d:new te(d instanceof Error?d.message:d))}};let s=e&&setTimeout(()=>{s=null,i(new A(`timeout ${e} of ms exceeded`,A.ETIMEDOUT))},e);const c=()=>{t&&(s&&clearTimeout(s),s=null,t.forEach(f=>{f.unsubscribe?f.unsubscribe(i):f.removeEventListener("abort",i)}),t=null)};t.forEach(f=>f.addEventListener("abort",i));const{signal:a}=r;return a.unsubscribe=()=>m.asap(c),a}},br=function*(t,e){let n=t.byteLength;if(n<e){yield t;return}let r=0,o;for(;r<n;)o=r+e,yield t.slice(r,o),r=o},xr=async function*(t,e){for await(const n of Ur(t))yield*br(n,e)},Ur=async function*(t){if(t[Symbol.asyncIterator]){yield*t;return}const e=t.getReader();try{for(;;){const{done:n,value:r}=await e.read();if(n)break;yield r}}finally{await e.cancel()}},qt=(t,e,n,r)=>{const o=xr(t,e);let i=0,s,c=a=>{s||(s=!0,r&&r(a))};return new ReadableStream({async pull(a){try{const{done:f,value:d}=await o.next();if(f){c(),a.close();return}let g=d.byteLength;if(n){let N=i+=g;n(N)}a.enqueue(new Uint8Array(d))}catch(f){throw c(f),f}},cancel(a){return c(a),o.return()}},{highWaterMark:2})},kt=64*1024,{isFunction:Ce}=m,Pr=(({Request:t,Response:e})=>({Request:t,Response:e}))(m.global),{ReadableStream:$t,TextEncoder:Vt}=m.global,Gt=(t,...e)=>{try{return!!t(...e)}catch{return!1}},Br=t=>{t=m.merge.call({skipUndefined:!0},Pr,t);const{fetch:e,Request:n,Response:r}=t,o=e?Ce(e):typeof fetch=="function",i=Ce(n),s=Ce(r);if(!o)return!1;const c=o&&Ce($t),a=o&&(typeof Vt=="function"?(E=>C=>E.encode(C))(new Vt):async E=>new Uint8Array(await new n(E).arrayBuffer())),f=i&&c&&Gt(()=>{let E=!1;const C=new n(M.origin,{body:new $t,method:"POST",get duplex(){return E=!0,"half"}}).headers.has("Content-Type");return E&&!C}),d=s&&c&&Gt(()=>m.isReadableStream(new r("").body)),g={stream:d&&(E=>E.body)};o&&["text","arrayBuffer","blob","formData","stream"].forEach(E=>{!g[E]&&(g[E]=(C,L)=>{let D=C&&C[E];if(D)return D.call(C);throw new A(`Response type '${E}' is not supported`,A.ERR_NOT_SUPPORT,L)})});const N=async E=>{if(E==null)return 0;if(m.isBlob(E))return E.size;if(m.isSpecCompliantForm(E))return(await new n(M.origin,{method:"POST",body:E}).arrayBuffer()).byteLength;if(m.isArrayBufferView(E)||m.isArrayBuffer(E))return E.byteLength;if(m.isURLSearchParams(E)&&(E=E+""),m.isString(E))return(await a(E)).byteLength},y=async(E,C)=>{const L=m.toFiniteNumber(E.getContentLength());return L??N(C)};return async E=>{let{url:C,method:L,data:D,signal:I,cancelToken:R,timeout:h,onDownloadProgress:u,onUploadProgress:S,responseType:l,headers:p,withCredentials:w="same-origin",fetchOptions:_}=Zt(E),T=e||fetch;l=l?(l+"").toLowerCase():"text";let F=Fr([I,R&&R.toAbortSignal()],h),O=null;const b=F&&F.unsubscribe&&(()=>{F.unsubscribe()});let x;try{if(S&&f&&L!=="get"&&L!=="head"&&(x=await y(p,D))!==0){let q=new n(C,{method:"POST",body:D,duplex:"half"}),V;if(m.isFormData(D)&&(V=q.headers.get("content-type"))&&p.setContentType(V),q.body){const[Je,Ie]=Ht(x,we(Mt(S)));D=qt(q.body,kt,Je,Ie)}}m.isString(w)||(w=w?"include":"omit");const U=i&&"credentials"in n.prototype,B={..._,signal:F,method:L.toUpperCase(),headers:p.normalize().toJSON(),body:D,duplex:"half",credentials:U?w:void 0};O=i&&new n(C,B);let P=await(i?T(O,_):T(C,B));const Z=d&&(l==="stream"||l==="response");if(d&&(u||Z&&b)){const q={};["status","statusText","headers"].forEach(on=>{q[on]=P[on]});const V=m.toFiniteNumber(P.headers.get("content-length")),[Je,Ie]=u&&Ht(V,we(Mt(u),!0))||[];P=new r(qt(P.body,kt,Je,()=>{Ie&&Ie(),b&&b()}),q)}l=l||"text";let de=await g[m.findKey(g,l)||"text"](P,E);return!Z&&b&&b(),await new Promise((q,V)=>{vt(q,V,{data:de,headers:z.from(P.headers),status:P.status,statusText:P.statusText,config:E,request:O})})}catch(U){throw b&&b(),U&&U.name==="TypeError"&&/Load failed|fetch/i.test(U.message)?Object.assign(new A("Network Error",A.ERR_NETWORK,E,O),{cause:U.cause||U}):A.from(U,U&&U.code,E,O)}}},vr=new Map,Xt=t=>{let e=t&&t.env||{};const{fetch:n,Request:r,Response:o}=e,i=[r,o,n];let s=i.length,c=s,a,f,d=vr;for(;c--;)a=i[c],f=d.get(a),f===void 0&&d.set(a,f=c?new Map:Br(e)),d=f;return f};Xt();const Ge={http:sr,xhr:Ar,fetch:{get:Xt}};m.forEach(Ge,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const Wt=t=>`- ${t}`,Hr=t=>m.isFunction(t)||t===null||t===!1;function Mr(t,e){t=m.isArray(t)?t:[t];const{length:n}=t;let r,o;const i={};for(let s=0;s<n;s++){r=t[s];let c;if(o=r,!Hr(r)&&(o=Ge[(c=String(r)).toLowerCase()],o===void 0))throw new A(`Unknown adapter '${c}'`);if(o&&(m.isFunction(o)||(o=o.get(e))))break;i[c||"#"+s]=o}if(!o){const s=Object.entries(i).map(([a,f])=>`adapter ${a} `+(f===!1?"is not supported by the environment":"is not available in the build"));let c=n?s.length>1?`since :
4
- `+s.map(Wt).join(`
5
- `):" "+Wt(s[0]):"as no adapter specified";throw new A("There is no suitable adapter to dispatch the request "+c,"ERR_NOT_SUPPORT")}return o}const Jt={getAdapter:Mr,adapters:Ge};function Xe(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new te(null,t)}function Kt(t){return Xe(t),t.headers=z.from(t.headers),t.data=Ve.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),Jt.getAdapter(t.adapter||fe.adapter,t)(t).then(function(r){return Xe(t),r.data=Ve.call(t,t.transformResponse,r),r.headers=z.from(r.headers),r},function(r){return Bt(r)||(Xe(t),r&&r.response&&(r.response.data=Ve.call(t,t.transformResponse,r.response),r.response.headers=z.from(r.response.headers))),Promise.reject(r)})}const Yt="1.13.2",Ne={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{Ne[t]=function(r){return typeof r===t||"a"+(e<1?"n ":" ")+t}});const Qt={};Ne.transitional=function(e,n,r){function o(i,s){return"[Axios v"+Yt+"] Transitional option '"+i+"'"+s+(r?". "+r:"")}return(i,s,c)=>{if(e===!1)throw new A(o(s," has been removed"+(n?" in "+n:"")),A.ERR_DEPRECATED);return n&&!Qt[s]&&(Qt[s]=!0,console.warn(o(s," has been deprecated since v"+n+" and will be removed in the near future"))),e?e(i,s,c):!0}},Ne.spelling=function(e){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${e}`),!0)};function jr(t,e,n){if(typeof t!="object")throw new A("options must be an object",A.ERR_BAD_OPTION_VALUE);const r=Object.keys(t);let o=r.length;for(;o-- >0;){const i=r[o],s=e[i];if(s){const c=t[i],a=c===void 0||s(c,i,t);if(a!==!0)throw new A("option "+i+" must be "+a,A.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new A("Unknown option "+i,A.ERR_BAD_OPTION)}}const Le={assertOptions:jr,validators:Ne},$=Le.validators;let Y=class{constructor(e){this.defaults=e||{},this.interceptors={request:new bt,response:new bt}}async request(e,n){try{return await this._request(e,n)}catch(r){if(r instanceof Error){let o={};Error.captureStackTrace?Error.captureStackTrace(o):o=new Error;const i=o.stack?o.stack.replace(/^.+\n/,""):"";try{r.stack?i&&!String(r.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(r.stack+=`
6
- `+i):r.stack=i}catch{}}throw r}}_request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=K(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:i}=n;r!==void 0&&Le.assertOptions(r,{silentJSONParsing:$.transitional($.boolean),forcedJSONParsing:$.transitional($.boolean),clarifyTimeoutError:$.transitional($.boolean)},!1),o!=null&&(m.isFunction(o)?n.paramsSerializer={serialize:o}:Le.assertOptions(o,{encode:$.function,serialize:$.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),Le.assertOptions(n,{baseUrl:$.spelling("baseURL"),withXsrfToken:$.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let s=i&&m.merge(i.common,i[n.method]);i&&m.forEach(["delete","get","head","post","put","patch","common"],E=>{delete i[E]}),n.headers=z.concat(s,i);const c=[];let a=!0;this.interceptors.request.forEach(function(C){typeof C.runWhen=="function"&&C.runWhen(n)===!1||(a=a&&C.synchronous,c.unshift(C.fulfilled,C.rejected))});const f=[];this.interceptors.response.forEach(function(C){f.push(C.fulfilled,C.rejected)});let d,g=0,N;if(!a){const E=[Kt.bind(this),void 0];for(E.unshift(...c),E.push(...f),N=E.length,d=Promise.resolve(n);g<N;)d=d.then(E[g++],E[g++]);return d}N=c.length;let y=n;for(;g<N;){const E=c[g++],C=c[g++];try{y=E(y)}catch(L){C.call(this,L);break}}try{d=Kt.call(this,y)}catch(E){return Promise.reject(E)}for(g=0,N=f.length;g<N;)d=d.then(f[g++],f[g++]);return d}getUri(e){e=K(this.defaults,e);const n=jt(e.baseURL,e.url,e.allowAbsoluteUrls);return Ft(n,e.params,e.paramsSerializer)}};m.forEach(["delete","get","head","options"],function(e){Y.prototype[e]=function(n,r){return this.request(K(r||{},{method:e,url:n,data:(r||{}).data}))}}),m.forEach(["post","put","patch"],function(e){function n(r){return function(i,s,c){return this.request(K(c||{},{method:e,headers:r?{"Content-Type":"multipart/form-data"}:{},url:i,data:s}))}}Y.prototype[e]=n(),Y.prototype[e+"Form"]=n(!0)});let zr=class sn{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(i){n=i});const r=this;this.promise.then(o=>{if(!r._listeners)return;let i=r._listeners.length;for(;i-- >0;)r._listeners[i](o);r._listeners=null}),this.promise.then=o=>{let i;const s=new Promise(c=>{r.subscribe(c),i=c}).then(o);return s.cancel=function(){r.unsubscribe(i)},s},e(function(i,s,c){r.reason||(r.reason=new te(i,s,c),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const n=this._listeners.indexOf(e);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const e=new AbortController,n=r=>{e.abort(r)};return this.subscribe(n),e.signal.unsubscribe=()=>this.unsubscribe(n),e.signal}static source(){let e;return{token:new sn(function(o){e=o}),cancel:e}}};function Zr(t){return function(n){return t.apply(null,n)}}function qr(t){return m.isObject(t)&&t.isAxiosError===!0}const We={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(We).forEach(([t,e])=>{We[e]=t});function en(t){const e=new Y(t),n=pt(Y.prototype.request,e);return m.extend(n,Y.prototype,e,{allOwnKeys:!0}),m.extend(n,e,null,{allOwnKeys:!0}),n.create=function(o){return en(K(t,o))},n}const v=en(fe);v.Axios=Y,v.CanceledError=te,v.CancelToken=zr,v.isCancel=Bt,v.VERSION=Yt,v.toFormData=ge,v.AxiosError=A,v.Cancel=v.CanceledError,v.all=function(e){return Promise.all(e)},v.spread=Zr,v.isAxiosError=qr,v.mergeConfig=K,v.AxiosHeaders=z,v.formToJSON=t=>Ut(m.isHTMLForm(t)?new FormData(t):t),v.getAdapter=Jt.getAdapter,v.HttpStatusCode=We,v.default=v;const{Axios:to,AxiosError:no,CanceledError:ro,isCancel:oo,CancelToken:so,VERSION:io,all:ao,Cancel:co,isAxiosError:fo,spread:uo,toFormData:lo,AxiosHeaders:ho,HttpStatusCode:Eo,formToJSON:mo,getAdapter:po,mergeConfig:yo}=v;async function kr(t){return fetch(`https://api.ndjjd.top/ndd/api/v1/component/pubapi/query?name=${t}`,{method:"GET"}).then(e=>e.text()).then(e=>{try{const n=JSON.parse(e);return Promise.reject(n.message)}catch{return e}})}const $r=(t,e,n)=>{const r=H.createHash("md5").update(n).digest("hex");return H.resolve(t,e,r)};async function tn(t){const e=["index.js","Index.js","INDEX.JS"],n=await H.readdir(t,{withFileTypes:!0});for(const r of n){const o=H.resolve(t,r.name);if(r.isFile()&&e.includes(r.name))return o;if(r.isDirectory()){const i=await tn(o);if(i)return i}}return null}async function nn(t){const e=[],n=[".css",".CSS"],r=await H.readdir(t,{withFileTypes:!0});for(const o of r){const i=H.resolve(t,o.name);if(o.isFile()&&n.some(s=>o.name.endsWith(s))&&e.push(i),o.isDirectory()){const s=await nn(i);e.push(...s)}}return e}async function Vr(t,e){const n=await H.readFile(t,"utf-8"),r=H.dirname(t);return["// 自动生成:整合所有CSS样式 + 原入口JS内容",...e.map(s=>`import './${H.relative(r,s).replace(/\\/g,"/")}';`),"",n].join(`
7
- `)}const Gr=async(t,e)=>{try{await H.mkdir(e,{recursive:!0});const r=await v.get(t,{responseType:"arraybuffer",timeout:1e8,headers:{Accept:"application/zip"}});new wn(Buffer.from(r.data)).extractAllTo(e,!0);const i=await tn(e);if(!i)throw new Error(`在缓存目录 ${e} 及其子目录中未找到 index.js(支持大小写:index.js、Index.js、INDEX.JS)入口文件`);const s=await nn(e),c=await Vr(i,s),a=H.dirname(i),f=H.resolve(a,"integrated.entry.js");return await H.writeFile(f,c,"utf-8"),f}catch(r){try{await H.rm(e,{recursive:!0,force:!0})}catch(o){console.warn(`[vr-plugin] 清理无效缓存目录失败:${o.message}`)}throw new Error(`[vr-plugin] 组件处理失败:${r.message}`)}},ne=new Map,le=new Map;function rn(t){const e=t?.prefix||"vr:",n=t?.cacheDir??"./node_modules/.vr-cache",r=t?.search||kr,o=t?.enableCache??!0;let i;return{name:"vite-ndd-plugin-federation",enforce:"pre",configResolved(s){i=s.root},async resolveId(s,c){if(s.startsWith(e)){const a=s.slice(e.length).trim();if(!a)throw new Error(`[vr-plugin] 无效的导入格式:${s},格式应为 vr:组件名称`);const f=i??process.cwd(),d=$r(f,n,a);if(o&&ne.has(s)){const y=ne.get(s);try{return await H.access(y),{id:y,external:!1,moduleSideEffects:!0}}catch{ne.delete(s)}}if(le.has(a)){await le.get(a);const y=ne.get(s);if(y)return{id:y,external:!1,moduleSideEffects:!0}}const g=await r(a);if(!g)throw new Error(`[vr-plugin] 未找到组件 ${a} 的 URL,请检查 search 函数`);const N=Gr(g,d);le.set(a,N);try{const y=await N;return ne.set(s,y),{id:y,external:!1,moduleSideEffects:!0}}finally{le.delete(a)}}return null},async load(s){const c=i??process.cwd(),a=H.resolve(c,n);if(!s.startsWith(a))return null;try{return await H.readFile(s,"utf-8")}catch(f){throw new Error(`[vr-plugin] 加载文件失败 ${s}:${f.message}`)}},closeBundle(){ne.clear(),le.clear()}}}G.FederationPlugin=rn,G.default=rn,Object.defineProperties(G,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
1
+ (function(G,re){typeof exports=="object"&&typeof module<"u"?re(exports,require("fs"),require("path")):typeof define=="function"&&define.amd?define(["exports","fs","path"],re):(G=typeof globalThis<"u"?globalThis:G||self,re(G.VitePluginFederation={},G.require$$0$1,G.path))})(this,(function(G,re,q){"use strict";function cn(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function fn(t){if(Object.prototype.hasOwnProperty.call(t,"__esModule"))return t;var e=t.default;if(typeof e=="function"){var n=function r(){var o=!1;try{o=this instanceof r}catch{}return o?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};n.prototype=e.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(t).forEach(function(r){var o=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(n,r,o.get?o:{enumerable:!0,get:function(){return t[r]}})}),n}var W={exports:{}},Oe,Ye;function Qe(){return Ye||(Ye=1,Oe={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}),Oe}var De={},et;function Re(){return et||(et=1,(function(t){const e={INVALID_LOC:"Invalid LOC header (bad signature)",INVALID_CEN:"Invalid CEN header (bad signature)",INVALID_END:"Invalid END header (bad signature)",DESCRIPTOR_NOT_EXIST:"No descriptor present",DESCRIPTOR_UNKNOWN:"Unknown descriptor format",DESCRIPTOR_FAULTY:"Descriptor data is malformed",NO_DATA:"Nothing to decompress",BAD_CRC:"CRC32 checksum failed {0}",FILE_IN_THE_WAY:"There is a file in the way: {0}",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: "{0}"',NOT_IMPLEMENTED:"Not implemented",INVALID_FILENAME:"Invalid filename",INVALID_FORMAT:"Invalid or unsupported zip format. No END header found",INVALID_PASS_PARAM:"Incompatible password parameter",WRONG_PASSWORD:"Wrong Password",COMMENT_TOO_LONG:"Comment is too long",EXTRA_FIELD_PARSE_ERROR:"Extra field parsing error"};function n(r){return function(...o){return o.length&&(r=r.replace(/\{(\d)\}/g,(i,s)=>o[s]||"")),new Error("ADM-ZIP: "+r)}}for(const r of Object.keys(e))t[r]=n(e[r])})(De)),De}var _e,tt;function un(){if(tt)return _e;tt=1;const t=re,e=q,n=Qe(),r=Re(),o=typeof process=="object"&&process.platform==="win32",i=a=>typeof a=="object"&&a!==null,s=new Uint32Array(256).map((a,f)=>{for(let d=0;d<8;d++)(f&1)!==0?f=3988292384^f>>>1:f>>>=1;return f>>>0});function c(a){this.sep=e.sep,this.fs=t,i(a)&&i(a.fs)&&typeof a.fs.statSync=="function"&&(this.fs=a.fs)}return _e=c,c.prototype.makeDir=function(a){const f=this;function d(g){let N=g.split(f.sep)[0];g.split(f.sep).forEach(function(y){if(!(!y||y.substr(-1,1)===":")){N+=f.sep+y;var E;try{E=f.fs.statSync(N)}catch{f.fs.mkdirSync(N)}if(E&&E.isFile())throw r.FILE_IN_THE_WAY(`"${N}"`)}})}d(a)},c.prototype.writeFileTo=function(a,f,d,g){const N=this;if(N.fs.existsSync(a)){if(!d)return!1;var y=N.fs.statSync(a);if(y.isDirectory())return!1}var E=e.dirname(a);N.fs.existsSync(E)||N.makeDir(E);var C;try{C=N.fs.openSync(a,"w",438)}catch{N.fs.chmodSync(a,438),C=N.fs.openSync(a,"w",438)}if(C)try{N.fs.writeSync(C,f,0,f.length,0)}finally{N.fs.closeSync(C)}return N.fs.chmodSync(a,g||438),!0},c.prototype.writeFileToAsync=function(a,f,d,g,N){typeof g=="function"&&(N=g,g=void 0);const y=this;y.fs.exists(a,function(E){if(E&&!d)return N(!1);y.fs.stat(a,function(C,L){if(E&&L.isDirectory())return N(!1);var D=e.dirname(a);y.fs.exists(D,function(I){I||y.makeDir(D),y.fs.open(a,"w",438,function(R,h){R?y.fs.chmod(a,438,function(){y.fs.open(a,"w",438,function(u,S){y.fs.write(S,f,0,f.length,0,function(){y.fs.close(S,function(){y.fs.chmod(a,g||438,function(){N(!0)})})})})}):h?y.fs.write(h,f,0,f.length,0,function(){y.fs.close(h,function(){y.fs.chmod(a,g||438,function(){N(!0)})})}):y.fs.chmod(a,g||438,function(){N(!0)})})})})})},c.prototype.findFiles=function(a){const f=this;function d(g,N,y){let E=[];return f.fs.readdirSync(g).forEach(function(C){const L=e.join(g,C),D=f.fs.statSync(L);E.push(e.normalize(L)+(D.isDirectory()?f.sep:"")),D.isDirectory()&&y&&(E=E.concat(d(L,N,y)))}),E}return d(a,void 0,!0)},c.prototype.findFilesAsync=function(a,f){const d=this;let g=[];d.fs.readdir(a,function(N,y){if(N)return f(N);let E=y.length;if(!E)return f(null,g);y.forEach(function(C){C=e.join(a,C),d.fs.stat(C,function(L,D){if(L)return f(L);D&&(g.push(e.normalize(C)+(D.isDirectory()?d.sep:"")),D.isDirectory()?d.findFilesAsync(C,function(I,R){if(I)return f(I);g=g.concat(R),--E||f(null,g)}):--E||f(null,g))})})})},c.prototype.getAttributes=function(){},c.prototype.setAttributes=function(){},c.crc32update=function(a,f){return s[(a^f)&255]^a>>>8},c.crc32=function(a){typeof a=="string"&&(a=Buffer.from(a,"utf8"));let f=a.length,d=-1;for(let g=0;g<f;)d=c.crc32update(d,a[g++]);return~d>>>0},c.methodToString=function(a){switch(a){case n.STORED:return"STORED ("+a+")";case n.DEFLATED:return"DEFLATED ("+a+")";default:return"UNSUPPORTED ("+a+")"}},c.canonical=function(a){if(!a)return"";const f=e.posix.normalize("/"+a.split("\\").join("/"));return e.join(".",f)},c.zipnamefix=function(a){if(!a)return"";const f=e.posix.normalize("/"+a.split("\\").join("/"));return e.posix.join(".",f)},c.findLast=function(a,f){if(!Array.isArray(a))throw new TypeError("arr is not array");const d=a.length>>>0;for(let g=d-1;g>=0;g--)if(f(a[g],g,a))return a[g]},c.sanitize=function(a,f){a=e.resolve(e.normalize(a));for(var d=f.split("/"),g=0,N=d.length;g<N;g++){var y=e.normalize(e.join(a,d.slice(g,N).join(e.sep)));if(y.indexOf(a)===0)return y}return e.normalize(e.join(a,e.basename(f)))},c.toBuffer=function(f,d){return Buffer.isBuffer(f)?f:f instanceof Uint8Array?Buffer.from(f):typeof f=="string"?d(f):Buffer.alloc(0)},c.readBigUInt64LE=function(a,f){var d=Buffer.from(a.slice(f,f+8));return d.swap64(),parseInt(`0x${d.toString("hex")}`)},c.fromDOS2Date=function(a){return new Date((a>>25&127)+1980,Math.max((a>>21&15)-1,0),Math.max(a>>16&31,1),a>>11&31,a>>5&63,(a&31)<<1)},c.fromDate2DOS=function(a){let f=0,d=0;return a.getFullYear()>1979&&(f=(a.getFullYear()-1980&127)<<9|a.getMonth()+1<<5|a.getDate(),d=a.getHours()<<11|a.getMinutes()<<5|a.getSeconds()>>1),f<<16|d},c.isWin=o,c.crcTable=s,_e}var Te,nt;function ln(){if(nt)return Te;nt=1;const t=q;return Te=function(e,{fs:n}){var r=e||"",o=s(),i=null;function s(){return{directory:!1,readonly:!1,hidden:!1,executable:!1,mtime:0,atime:0}}return r&&n.existsSync(r)?(i=n.statSync(r),o.directory=i.isDirectory(),o.mtime=i.mtime,o.atime=i.atime,o.executable=(73&i.mode)!==0,o.readonly=(128&i.mode)===0,o.hidden=t.basename(r)[0]==="."):console.warn("Invalid path: "+r),{get directory(){return o.directory},get readOnly(){return o.readonly},get hidden(){return o.hidden},get mtime(){return o.mtime},get atime(){return o.atime},get executable(){return o.executable},decodeAttributes:function(){},encodeAttributes:function(){},toJSON:function(){return{path:r,isDirectory:o.directory,isReadOnly:o.readonly,isHidden:o.hidden,isExecutable:o.executable,mTime:o.mtime,aTime:o.atime}},toString:function(){return JSON.stringify(this.toJSON(),null," ")}}},Te}var Ae,rt;function dn(){return rt||(rt=1,Ae={efs:!0,encode:t=>Buffer.from(t,"utf8"),decode:t=>t.toString("utf8")}),Ae}var ot;function oe(){return ot||(ot=1,W.exports=un(),W.exports.Constants=Qe(),W.exports.Errors=Re(),W.exports.FileAttr=ln(),W.exports.decoder=dn()),W.exports}var he={},Fe,st;function hn(){if(st)return Fe;st=1;var t=oe(),e=t.Constants;return Fe=function(){var n=20,r=10,o=0,i=0,s=0,c=0,a=0,f=0,d=0,g=0,N=0,y=0,E=0,C=0,L=0;n|=t.isWin?2560:768,o|=e.FLG_EFS;const D={extraLen:0},I=h=>Math.max(0,h)>>>0,R=h=>Math.max(0,h)&255;return s=t.fromDate2DOS(new Date),{get made(){return n},set made(h){n=h},get version(){return r},set version(h){r=h},get flags(){return o},set flags(h){o=h},get flags_efs(){return(o&e.FLG_EFS)>0},set flags_efs(h){h?o|=e.FLG_EFS:o&=~e.FLG_EFS},get flags_desc(){return(o&e.FLG_DESC)>0},set flags_desc(h){h?o|=e.FLG_DESC:o&=~e.FLG_DESC},get method(){return i},set method(h){switch(h){case e.STORED:this.version=10;case e.DEFLATED:default:this.version=20}i=h},get time(){return t.fromDOS2Date(this.timeval)},set time(h){this.timeval=t.fromDate2DOS(h)},get timeval(){return s},set timeval(h){s=I(h)},get timeHighByte(){return R(s>>>8)},get crc(){return c},set crc(h){c=I(h)},get compressedSize(){return a},set compressedSize(h){a=I(h)},get size(){return f},set size(h){f=I(h)},get fileNameLength(){return d},set fileNameLength(h){d=h},get extraLength(){return g},set extraLength(h){g=h},get extraLocalLength(){return D.extraLen},set extraLocalLength(h){D.extraLen=h},get commentLength(){return N},set commentLength(h){N=h},get diskNumStart(){return y},set diskNumStart(h){y=I(h)},get inAttr(){return E},set inAttr(h){E=I(h)},get attr(){return C},set attr(h){C=I(h)},get fileAttr(){return(C||0)>>16&4095},get offset(){return L},set offset(h){L=I(h)},get encrypted(){return(o&e.FLG_ENC)===e.FLG_ENC},get centralHeaderSize(){return e.CENHDR+d+g+N},get realDataOffset(){return L+e.LOCHDR+D.fnameLen+D.extraLen},get localHeader(){return D},loadLocalHeaderFromBinary:function(h){var u=h.slice(L,L+e.LOCHDR);if(u.readUInt32LE(0)!==e.LOCSIG)throw t.Errors.INVALID_LOC();D.version=u.readUInt16LE(e.LOCVER),D.flags=u.readUInt16LE(e.LOCFLG),D.method=u.readUInt16LE(e.LOCHOW),D.time=u.readUInt32LE(e.LOCTIM),D.crc=u.readUInt32LE(e.LOCCRC),D.compressedSize=u.readUInt32LE(e.LOCSIZ),D.size=u.readUInt32LE(e.LOCLEN),D.fnameLen=u.readUInt16LE(e.LOCNAM),D.extraLen=u.readUInt16LE(e.LOCEXT);const S=L+e.LOCHDR+D.fnameLen,l=S+D.extraLen;return h.slice(S,l)},loadFromBinary:function(h){if(h.length!==e.CENHDR||h.readUInt32LE(0)!==e.CENSIG)throw t.Errors.INVALID_CEN();n=h.readUInt16LE(e.CENVEM),r=h.readUInt16LE(e.CENVER),o=h.readUInt16LE(e.CENFLG),i=h.readUInt16LE(e.CENHOW),s=h.readUInt32LE(e.CENTIM),c=h.readUInt32LE(e.CENCRC),a=h.readUInt32LE(e.CENSIZ),f=h.readUInt32LE(e.CENLEN),d=h.readUInt16LE(e.CENNAM),g=h.readUInt16LE(e.CENEXT),N=h.readUInt16LE(e.CENCOM),y=h.readUInt16LE(e.CENDSK),E=h.readUInt16LE(e.CENATT),C=h.readUInt32LE(e.CENATX),L=h.readUInt32LE(e.CENOFF)},localHeaderToBinary:function(){var h=Buffer.alloc(e.LOCHDR);return h.writeUInt32LE(e.LOCSIG,0),h.writeUInt16LE(r,e.LOCVER),h.writeUInt16LE(o,e.LOCFLG),h.writeUInt16LE(i,e.LOCHOW),h.writeUInt32LE(s,e.LOCTIM),h.writeUInt32LE(c,e.LOCCRC),h.writeUInt32LE(a,e.LOCSIZ),h.writeUInt32LE(f,e.LOCLEN),h.writeUInt16LE(d,e.LOCNAM),h.writeUInt16LE(D.extraLen,e.LOCEXT),h},centralHeaderToBinary:function(){var h=Buffer.alloc(e.CENHDR+d+g+N);return h.writeUInt32LE(e.CENSIG,0),h.writeUInt16LE(n,e.CENVEM),h.writeUInt16LE(r,e.CENVER),h.writeUInt16LE(o,e.CENFLG),h.writeUInt16LE(i,e.CENHOW),h.writeUInt32LE(s,e.CENTIM),h.writeUInt32LE(c,e.CENCRC),h.writeUInt32LE(a,e.CENSIZ),h.writeUInt32LE(f,e.CENLEN),h.writeUInt16LE(d,e.CENNAM),h.writeUInt16LE(g,e.CENEXT),h.writeUInt16LE(N,e.CENCOM),h.writeUInt16LE(y,e.CENDSK),h.writeUInt16LE(E,e.CENATT),h.writeUInt32LE(C,e.CENATX),h.writeUInt32LE(L,e.CENOFF),h},toJSON:function(){const h=function(u){return u+" bytes"};return{made:n,version:r,flags:o,method:t.methodToString(i),time:this.time,crc:"0x"+c.toString(16).toUpperCase(),compressedSize:h(a),size:h(f),fileNameLength:h(d),extraLength:h(g),commentLength:h(N),diskNumStart:y,inAttr:E,attr:C,offset:L,centralHeaderSize:h(e.CENHDR+d+g+N)}},toString:function(){return JSON.stringify(this.toJSON(),null," ")}}},Fe}var xe,it;function En(){if(it)return xe;it=1;var t=oe(),e=t.Constants;return xe=function(){var n=0,r=0,o=0,i=0,s=0;return{get diskEntries(){return n},set diskEntries(c){n=r=c},get totalEntries(){return r},set totalEntries(c){r=n=c},get size(){return o},set size(c){o=c},get offset(){return i},set offset(c){i=c},get commentLength(){return s},set commentLength(c){s=c},get mainHeaderSize(){return e.ENDHDR+s},loadFromBinary:function(c){if((c.length!==e.ENDHDR||c.readUInt32LE(0)!==e.ENDSIG)&&(c.length<e.ZIP64HDR||c.readUInt32LE(0)!==e.ZIP64SIG))throw t.Errors.INVALID_END();c.readUInt32LE(0)===e.ENDSIG?(n=c.readUInt16LE(e.ENDSUB),r=c.readUInt16LE(e.ENDTOT),o=c.readUInt32LE(e.ENDSIZ),i=c.readUInt32LE(e.ENDOFF),s=c.readUInt16LE(e.ENDCOM)):(n=t.readBigUInt64LE(c,e.ZIP64SUB),r=t.readBigUInt64LE(c,e.ZIP64TOT),o=t.readBigUInt64LE(c,e.ZIP64SIZE),i=t.readBigUInt64LE(c,e.ZIP64OFF),s=0)},toBinary:function(){var c=Buffer.alloc(e.ENDHDR+s);return c.writeUInt32LE(e.ENDSIG,0),c.writeUInt32LE(0,4),c.writeUInt16LE(n,e.ENDSUB),c.writeUInt16LE(r,e.ENDTOT),c.writeUInt32LE(o,e.ENDSIZ),c.writeUInt32LE(i,e.ENDOFF),c.writeUInt16LE(s,e.ENDCOM),c.fill(" ",e.ENDHDR),c},toJSON:function(){const c=function(a,f){let d=a.toString(16).toUpperCase();for(;d.length<f;)d="0"+d;return"0x"+d};return{diskEntries:n,totalEntries:r,size:o+" bytes",offset:c(i,4),commentLength:s}},toString:function(){return JSON.stringify(this.toJSON(),null," ")}}},xe}var at;function ct(){return at||(at=1,he.EntryHeader=hn(),he.MainHeader=En()),he}var se={};const $={},be=fn(Object.freeze(Object.defineProperty({__proto__:null,default:$},Symbol.toStringTag,{value:"Module"})));var Ue,ft;function mn(){return ft||(ft=1,Ue=function(t){var e=be,n={chunkSize:(parseInt(t.length/1024)+1)*1024};return{deflate:function(){return e.deflateRawSync(t,n)},deflateAsync:function(r){var o=e.createDeflateRaw(n),i=[],s=0;o.on("data",function(c){i.push(c),s+=c.length}),o.on("end",function(){var c=Buffer.alloc(s),a=0;c.fill(0);for(var f=0;f<i.length;f++){var d=i[f];d.copy(c,a),a+=d.length}r&&r(c)}),o.end(t)}}}),Ue}var Pe,ut;function pn(){if(ut)return Pe;ut=1;const t=+(process.versions?process.versions.node:"").split(".")[0]||0;return Pe=function(e,n){var r=be;const o=t>=15&&n>0?{maxOutputLength:n}:{};return{inflate:function(){return r.inflateRawSync(e,o)},inflateAsync:function(i){var s=r.createInflateRaw(o),c=[],a=0;s.on("data",function(f){c.push(f),a+=f.length}),s.on("end",function(){var f=Buffer.alloc(a),d=0;f.fill(0);for(var g=0;g<c.length;g++){var N=c[g];N.copy(f,d),d+=N.length}i&&i(f)}),s.end(e)}}},Pe}var Be,lt;function yn(){if(lt)return Be;lt=1;const{randomFillSync:t}=be,e=Re(),n=new Uint32Array(256).map((y,E)=>{for(let C=0;C<8;C++)(E&1)!==0?E=E>>>1^3988292384:E>>>=1;return E>>>0}),r=(y,E)=>Math.imul(y,E)>>>0,o=(y,E)=>n[(y^E)&255]^y>>>8,i=()=>typeof t=="function"?t(Buffer.alloc(12)):i.node();i.node=()=>{const y=Buffer.alloc(12),E=y.length;for(let C=0;C<E;C++)y[C]=Math.random()*256&255;return y};const s={genSalt:i};function c(y){const E=Buffer.isBuffer(y)?y:Buffer.from(y);this.keys=new Uint32Array([305419896,591751049,878082192]);for(let C=0;C<E.length;C++)this.updateKeys(E[C])}c.prototype.updateKeys=function(y){const E=this.keys;return E[0]=o(E[0],y),E[1]+=E[0]&255,E[1]=r(E[1],134775813)+1,E[2]=o(E[2],E[1]>>>24),y},c.prototype.next=function(){const y=(this.keys[2]|2)>>>0;return r(y,y^1)>>8&255};function a(y){const E=new c(y);return function(C){const L=Buffer.alloc(C.length);let D=0;for(let I of C)L[D++]=E.updateKeys(I^E.next());return L}}function f(y){const E=new c(y);return function(C,L,D=0){L||(L=Buffer.alloc(C.length));for(let I of C){const R=E.next();L[D++]=I^R,E.updateKeys(I)}return L}}function d(y,E,C){if(!y||!Buffer.isBuffer(y)||y.length<12)return Buffer.alloc(0);const L=a(C),D=L(y.slice(0,12)),I=(E.flags&8)===8?E.timeHighByte:E.crc>>>24;if(D[11]!==I)throw e.WRONG_PASSWORD();return L(y.slice(12))}function g(y){Buffer.isBuffer(y)&&y.length>=12?s.genSalt=function(){return y.slice(0,12)}:y==="node"?s.genSalt=i.node:s.genSalt=i}function N(y,E,C,L=!1){y==null&&(y=Buffer.alloc(0)),Buffer.isBuffer(y)||(y=Buffer.from(y.toString()));const D=f(C),I=s.genSalt();I[11]=E.crc>>>24&255,L&&(I[10]=E.crc>>>16&255);const R=Buffer.alloc(y.length+12);return D(I,R),D(y,R,12)}return Be={decrypt:d,encrypt:N,_salter:g},Be}var dt;function gn(){return dt||(dt=1,se.Deflater=mn(),se.Inflater=pn(),se.ZipCrypto=yn()),se}var ve,ht;function Et(){if(ht)return ve;ht=1;var t=oe(),e=ct(),n=t.Constants,r=gn();return ve=function(o,i){var s=new e.EntryHeader,c=Buffer.alloc(0),a=Buffer.alloc(0),f=!1,d=null,g=Buffer.alloc(0),N=Buffer.alloc(0),y=!0;const E=o,C=typeof E.decoder=="object"?E.decoder:t.decoder;y=C.hasOwnProperty("efs")?C.efs:!1;function L(){return!i||!(i instanceof Uint8Array)?Buffer.alloc(0):(N=s.loadLocalHeaderFromBinary(i),i.slice(s.realDataOffset,s.realDataOffset+s.compressedSize))}function D(l){if(s.flags_desc){const p={},w=s.realDataOffset+s.compressedSize;if(i.readUInt32LE(w)==n.LOCSIG||i.readUInt32LE(w)==n.CENSIG)throw t.Errors.DESCRIPTOR_NOT_EXIST();if(i.readUInt32LE(w)==n.EXTSIG)p.crc=i.readUInt32LE(w+n.EXTCRC),p.compressedSize=i.readUInt32LE(w+n.EXTSIZ),p.size=i.readUInt32LE(w+n.EXTLEN);else if(i.readUInt16LE(w+12)===19280)p.crc=i.readUInt32LE(w+n.EXTCRC-4),p.compressedSize=i.readUInt32LE(w+n.EXTSIZ-4),p.size=i.readUInt32LE(w+n.EXTLEN-4);else throw t.Errors.DESCRIPTOR_UNKNOWN();if(p.compressedSize!==s.compressedSize||p.size!==s.size||p.crc!==s.crc)throw t.Errors.DESCRIPTOR_FAULTY();if(t.crc32(l)!==p.crc)return!1}else if(t.crc32(l)!==s.localHeader.crc)return!1;return!0}function I(l,p,w){if(typeof p>"u"&&typeof l=="string"&&(w=l,l=void 0),f)return l&&p&&p(Buffer.alloc(0),t.Errors.DIRECTORY_CONTENT_ERROR()),Buffer.alloc(0);var _=L();if(_.length===0)return l&&p&&p(_),_;if(s.encrypted){if(typeof w!="string"&&!Buffer.isBuffer(w))throw t.Errors.INVALID_PASS_PARAM();_=r.ZipCrypto.decrypt(_,s,w)}var T=Buffer.alloc(s.size);switch(s.method){case t.Constants.STORED:if(_.copy(T),D(T))return l&&p&&p(T),T;throw l&&p&&p(T,t.Errors.BAD_CRC()),t.Errors.BAD_CRC();case t.Constants.DEFLATED:var F=new r.Inflater(_,s.size);if(l)F.inflateAsync(function(O){O.copy(O,0),p&&(D(O)?p(O):p(O,t.Errors.BAD_CRC()))});else{if(F.inflate(T).copy(T,0),!D(T))throw t.Errors.BAD_CRC(`"${C.decode(c)}"`);return T}break;default:throw l&&p&&p(Buffer.alloc(0),t.Errors.UNKNOWN_METHOD()),t.Errors.UNKNOWN_METHOD()}}function R(l,p){if((!d||!d.length)&&Buffer.isBuffer(i))return l&&p&&p(L()),L();if(d.length&&!f){var w;switch(s.method){case t.Constants.STORED:return s.compressedSize=s.size,w=Buffer.alloc(d.length),d.copy(w),l&&p&&p(w),w;default:case t.Constants.DEFLATED:var _=new r.Deflater(d);if(l)_.deflateAsync(function(F){w=Buffer.alloc(F.length),s.compressedSize=F.length,F.copy(w),p&&p(w)});else{var T=_.deflate();return s.compressedSize=T.length,T}_=null;break}}else if(l&&p)p(Buffer.alloc(0));else return Buffer.alloc(0)}function h(l,p){return(l.readUInt32LE(p+4)<<4)+l.readUInt32LE(p)}function u(l){try{for(var p=0,w,_,T;p+4<l.length;)w=l.readUInt16LE(p),p+=2,_=l.readUInt16LE(p),p+=2,T=l.slice(p,p+_),p+=_,n.ID_ZIP64===w&&S(T)}catch{throw t.Errors.EXTRA_FIELD_PARSE_ERROR()}}function S(l){var p,w,_,T;l.length>=n.EF_ZIP64_SCOMP&&(p=h(l,n.EF_ZIP64_SUNCOMP),s.size===n.EF_ZIP64_OR_32&&(s.size=p)),l.length>=n.EF_ZIP64_RHO&&(w=h(l,n.EF_ZIP64_SCOMP),s.compressedSize===n.EF_ZIP64_OR_32&&(s.compressedSize=w)),l.length>=n.EF_ZIP64_DSN&&(_=h(l,n.EF_ZIP64_RHO),s.offset===n.EF_ZIP64_OR_32&&(s.offset=_)),l.length>=n.EF_ZIP64_DSN+4&&(T=l.readUInt32LE(n.EF_ZIP64_DSN),s.diskNumStart===n.EF_ZIP64_OR_16&&(s.diskNumStart=T))}return{get entryName(){return C.decode(c)},get rawEntryName(){return c},set entryName(l){c=t.toBuffer(l,C.encode);var p=c[c.length-1];f=p===47||p===92,s.fileNameLength=c.length},get efs(){return typeof y=="function"?y(this.entryName):y},get extra(){return g},set extra(l){g=l,s.extraLength=l.length,u(l)},get comment(){return C.decode(a)},set comment(l){if(a=t.toBuffer(l,C.encode),s.commentLength=a.length,a.length>65535)throw t.Errors.COMMENT_TOO_LONG()},get name(){var l=C.decode(c);return f?l.substr(l.length-1).split("/").pop():l.split("/").pop()},get isDirectory(){return f},getCompressedData:function(){return R(!1,null)},getCompressedDataAsync:function(l){R(!0,l)},setData:function(l){d=t.toBuffer(l,t.decoder.encode),!f&&d.length?(s.size=d.length,s.method=t.Constants.DEFLATED,s.crc=t.crc32(l),s.changed=!0):s.method=t.Constants.STORED},getData:function(l){return s.changed?d:I(!1,null,l)},getDataAsync:function(l,p){s.changed?l(d):I(!0,l,p)},set attr(l){s.attr=l},get attr(){return s.attr},set header(l){s.loadFromBinary(l)},get header(){return s},packCentralHeader:function(){s.flags_efs=this.efs,s.extraLength=g.length;var l=s.centralHeaderToBinary(),p=t.Constants.CENHDR;return c.copy(l,p),p+=c.length,g.copy(l,p),p+=s.extraLength,a.copy(l,p),l},packLocalHeader:function(){let l=0;s.flags_efs=this.efs,s.extraLocalLength=N.length;const p=s.localHeaderToBinary(),w=Buffer.alloc(p.length+c.length+s.extraLocalLength);return p.copy(w,l),l+=p.length,c.copy(w,l),l+=c.length,N.copy(w,l),l+=N.length,w},toJSON:function(){const l=function(p){return"<"+(p&&p.length+" bytes buffer"||"null")+">"};return{entryName:this.entryName,name:this.name,comment:this.comment,isDirectory:this.isDirectory,header:s.toJSON(),compressedData:l(i),data:l(d)}},toString:function(){return JSON.stringify(this.toJSON(),null," ")}}},ve}var He,mt;function Sn(){if(mt)return He;mt=1;const t=Et(),e=ct(),n=oe();return He=function(r,o){var i=[],s={},c=Buffer.alloc(0),a=new e.MainHeader,f=!1;const d=new Set,g=o,{noSort:N,decoder:y}=g;r?L(g.readEntries):f=!0;function E(){const I=new Set;for(const R of Object.keys(s)){const h=R.split("/");if(h.pop(),!!h.length)for(let u=0;u<h.length;u++){const S=h.slice(0,u+1).join("/")+"/";I.add(S)}}for(const R of I)if(!(R in s)){const h=new t(g);h.entryName=R,h.attr=16,h.temporary=!0,i.push(h),s[h.entryName]=h,d.add(h)}}function C(){if(f=!0,s={},a.diskEntries>(r.length-a.offset)/n.Constants.CENHDR)throw n.Errors.DISK_ENTRY_TOO_LARGE();i=new Array(a.diskEntries);for(var I=a.offset,R=0;R<i.length;R++){var h=I,u=new t(g,r);u.header=r.slice(h,h+=n.Constants.CENHDR),u.entryName=r.slice(h,h+=u.header.fileNameLength),u.header.extraLength&&(u.extra=r.slice(h,h+=u.header.extraLength)),u.header.commentLength&&(u.comment=r.slice(h,h+u.header.commentLength)),I+=u.header.centralHeaderSize,i[R]=u,s[u.entryName]=u}d.clear(),E()}function L(I){var R=r.length-n.Constants.ENDHDR,h=Math.max(0,R-65535),u=h,S=r.length,l=-1,p=0;for(typeof g.trailingSpace=="boolean"&&g.trailingSpace&&(h=0),R;R>=u;R--)if(r[R]===80){if(r.readUInt32LE(R)===n.Constants.ENDSIG){l=R,p=R,S=R+n.Constants.ENDHDR,u=R-n.Constants.END64HDR;continue}if(r.readUInt32LE(R)===n.Constants.END64SIG){u=h;continue}if(r.readUInt32LE(R)===n.Constants.ZIP64SIG){l=R,S=R+n.readBigUInt64LE(r,R+n.Constants.ZIP64SIZE)+n.Constants.ZIP64LEAD;break}}if(l==-1)throw n.Errors.INVALID_FORMAT();a.loadFromBinary(r.slice(l,S)),a.commentLength&&(c=r.slice(p+n.Constants.ENDHDR)),I&&C()}function D(){i.length>1&&!N&&i.sort((I,R)=>I.entryName.toLowerCase().localeCompare(R.entryName.toLowerCase()))}return{get entries(){return f||C(),i.filter(I=>!d.has(I))},get comment(){return y.decode(c)},set comment(I){c=n.toBuffer(I,y.encode),a.commentLength=c.length},getEntryCount:function(){return f?i.length:a.diskEntries},forEach:function(I){this.entries.forEach(I)},getEntry:function(I){return f||C(),s[I]||null},setEntry:function(I){f||C(),i.push(I),s[I.entryName]=I,a.totalEntries=i.length},deleteFile:function(I,R=!0){f||C();const h=s[I];this.getEntryChildren(h,R).map(S=>S.entryName).forEach(this.deleteEntry)},deleteEntry:function(I){f||C();const R=s[I],h=i.indexOf(R);h>=0&&(i.splice(h,1),delete s[I],a.totalEntries=i.length)},getEntryChildren:function(I,R=!0){if(f||C(),typeof I=="object")if(I.isDirectory&&R){const h=[],u=I.entryName;for(const S of i)S.entryName.startsWith(u)&&h.push(S);return h}else return[I];return[]},getChildCount:function(I){if(I&&I.isDirectory){const R=this.getEntryChildren(I);return R.includes(I)?R.length-1:R.length}return 0},compressToBuffer:function(){f||C(),D();const I=[],R=[];let h=0,u=0;a.size=0,a.offset=0;let S=0;for(const w of this.entries){const _=w.getCompressedData();w.header.offset=u;const T=w.packLocalHeader(),F=T.length+_.length;u+=F,I.push(T),I.push(_);const O=w.packCentralHeader();R.push(O),a.size+=O.length,h+=F+O.length,S++}h+=a.mainHeaderSize,a.offset=u,a.totalEntries=S,u=0;const l=Buffer.alloc(h);for(const w of I)w.copy(l,u),u+=w.length;for(const w of R)w.copy(l,u),u+=w.length;const p=a.toBinary();return c&&c.copy(p,n.Constants.ENDHDR),p.copy(l,u),r=l,f=!1,l},toAsyncBuffer:function(I,R,h,u){try{f||C(),D();const S=[],l=[];let p=0,w=0,_=0;a.size=0,a.offset=0;const T=function(F){if(F.length>0){const O=F.shift(),x=O.entryName+O.extra.toString();h&&h(x),O.getCompressedDataAsync(function(b){u&&u(x),O.header.offset=w;const U=O.packLocalHeader(),B=U.length+b.length;w+=B,S.push(U),S.push(b);const P=O.packCentralHeader();l.push(P),a.size+=P.length,p+=B+P.length,_++,T(F)})}else{p+=a.mainHeaderSize,a.offset=w,a.totalEntries=_,w=0;const O=Buffer.alloc(p);S.forEach(function(b){b.copy(O,w),w+=b.length}),l.forEach(function(b){b.copy(O,w),w+=b.length});const x=a.toBinary();c&&c.copy(x,n.Constants.ENDHDR),x.copy(O,w),r=O,f=!1,I(O)}};T(Array.from(this.entries))}catch(S){R(S)}}}},He}var Me,pt;function wn(){if(pt)return Me;pt=1;const t=oe(),e=q,n=Et(),r=Sn(),o=(...a)=>t.findLast(a,f=>typeof f=="boolean"),i=(...a)=>t.findLast(a,f=>typeof f=="string"),s=(...a)=>t.findLast(a,f=>typeof f=="function"),c={noSort:!1,readEntries:!1,method:t.Constants.NONE,fs:null};return Me=function(a,f){let d=null;const g=Object.assign(Object.create(null),c);a&&typeof a=="object"&&(a instanceof Uint8Array||(Object.assign(g,a),a=g.input?g.input:void 0,g.input&&delete g.input),Buffer.isBuffer(a)&&(d=a,g.method=t.Constants.BUFFER,a=void 0)),Object.assign(g,f);const N=new t(g);if((typeof g.decoder!="object"||typeof g.decoder.encode!="function"||typeof g.decoder.decode!="function")&&(g.decoder=t.decoder),a&&typeof a=="string")if(N.fs.existsSync(a))g.method=t.Constants.FILE,g.filename=a,d=N.fs.readFileSync(a);else throw t.Errors.INVALID_FILENAME();const y=new r(d,g),{canonical:E,sanitize:C,zipnamefix:L}=t;function D(u){if(u&&y){var S;if(typeof u=="string"&&(S=y.getEntry(e.posix.normalize(u))),typeof u=="object"&&typeof u.entryName<"u"&&typeof u.header<"u"&&(S=y.getEntry(u.entryName)),S)return S}return null}function I(u){const{join:S,normalize:l,sep:p}=e.posix;return S(".",l(p+u.split("\\").join(p)+p))}function R(u){return u instanceof RegExp?(function(S){return function(l){return S.test(l)}})(u):typeof u!="function"?()=>!0:u}const h=(u,S)=>{let l=S.slice(-1);return l=l===N.sep?N.sep:"",e.relative(u,S)+l};return{readFile:function(u,S){var l=D(u);return l&&l.getData(S)||null},childCount:function(u){const S=D(u);if(S)return y.getChildCount(S)},readFileAsync:function(u,S){var l=D(u);l?l.getDataAsync(S):S(null,"getEntry failed for:"+u)},readAsText:function(u,S){var l=D(u);if(l){var p=l.getData();if(p&&p.length)return p.toString(S||"utf8")}return""},readAsTextAsync:function(u,S,l){var p=D(u);p?p.getDataAsync(function(w,_){if(_){S(w,_);return}w&&w.length?S(w.toString(l||"utf8")):S("")}):S("")},deleteFile:function(u,S=!0){var l=D(u);l&&y.deleteFile(l.entryName,S)},deleteEntry:function(u){var S=D(u);S&&y.deleteEntry(S.entryName)},addZipComment:function(u){y.comment=u},getZipComment:function(){return y.comment||""},addZipEntryComment:function(u,S){var l=D(u);l&&(l.comment=S)},getZipEntryComment:function(u){var S=D(u);return S&&S.comment||""},updateFile:function(u,S){var l=D(u);l&&l.setData(S)},addLocalFile:function(u,S,l,p){if(N.fs.existsSync(u)){S=S?I(S):"";const w=e.win32.basename(e.win32.normalize(u));S+=l||w;const _=N.fs.statSync(u),T=_.isFile()?N.fs.readFileSync(u):Buffer.alloc(0);_.isDirectory()&&(S+=N.sep),this.addFile(S,T,p,_)}else throw t.Errors.FILE_NOT_FOUND(u)},addLocalFileAsync:function(u,S){u=typeof u=="object"?u:{localPath:u};const l=e.resolve(u.localPath),{comment:p}=u;let{zipPath:w,zipName:_}=u;const T=this;N.fs.stat(l,function(F,O){if(F)return S(F,!1);w=w?I(w):"";const x=e.win32.basename(e.win32.normalize(l));if(w+=_||x,O.isFile())N.fs.readFile(l,function(b,U){return b?S(b,!1):(T.addFile(w,U,p,O),setImmediate(S,void 0,!0))});else if(O.isDirectory())return w+=N.sep,T.addFile(w,Buffer.alloc(0),p,O),setImmediate(S,void 0,!0)})},addLocalFolder:function(u,S,l){if(l=R(l),S=S?I(S):"",u=e.normalize(u),N.fs.existsSync(u)){const p=N.findFiles(u),w=this;if(p.length)for(const _ of p){const T=e.join(S,h(u,_));l(T)&&w.addLocalFile(_,e.dirname(T))}}else throw t.Errors.FILE_NOT_FOUND(u)},addLocalFolderAsync:function(u,S,l,p){p=R(p),l=l?I(l):"",u=e.normalize(u);var w=this;N.fs.open(u,"r",function(_){if(_&&_.code==="ENOENT")S(void 0,t.Errors.FILE_NOT_FOUND(u));else if(_)S(void 0,_);else{var T=N.findFiles(u),F=-1,O=function(){if(F+=1,F<T.length){var x=T[F],b=h(u,x).split("\\").join("/");b=b.normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/[^\x20-\x7E]/g,""),p(b)?N.fs.stat(x,function(U,B){U&&S(void 0,U),B.isFile()?N.fs.readFile(x,function(P,z){P?S(void 0,P):(w.addFile(l+b,z,"",B),O())}):(w.addFile(l+b+"/",Buffer.alloc(0),"",B),O())}):process.nextTick(()=>{O()})}else S(!0,void 0)};O()}})},addLocalFolderAsync2:function(u,S){const l=this;u=typeof u=="object"?u:{localPath:u},localPath=e.resolve(I(u.localPath));let{zipPath:p,filter:w,namefix:_}=u;w instanceof RegExp?w=(function(O){return function(x){return O.test(x)}})(w):typeof w!="function"&&(w=function(){return!0}),p=p?I(p):"",_=="latin1"&&(_=O=>O.normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/[^\x20-\x7E]/g,"")),typeof _!="function"&&(_=O=>O);const T=O=>e.join(p,_(h(localPath,O))),F=O=>e.win32.basename(e.win32.normalize(_(O)));N.fs.open(localPath,"r",function(O){O&&O.code==="ENOENT"?S(void 0,t.Errors.FILE_NOT_FOUND(localPath)):O?S(void 0,O):N.findFilesAsync(localPath,function(x,b){if(x)return S(x);b=b.filter(U=>w(T(U))),b.length||S(void 0,!1),setImmediate(b.reverse().reduce(function(U,B){return function(P,z){if(P||z===!1)return setImmediate(U,P,!1);l.addLocalFileAsync({localPath:B,zipPath:e.dirname(T(B)),zipName:F(B)},U)}},S))})})},addLocalFolderPromise:function(u,S){return new Promise((l,p)=>{this.addLocalFolderAsync2(Object.assign({localPath:u},S),(w,_)=>{w&&p(w),_&&l(this)})})},addFile:function(u,S,l,p){u=L(u);let w=D(u);const _=w!=null;_||(w=new n(g),w.entryName=u),w.comment=l||"";const T=typeof p=="object"&&p instanceof N.fs.Stats;T&&(w.header.time=p.mtime);var F=w.isDirectory?16:0;let O=w.isDirectory?16384:32768;return T?O|=4095&p.mode:typeof p=="number"?O|=4095&p:O|=w.isDirectory?493:420,F=(F|O<<16)>>>0,w.attr=F,w.setData(S),_||y.setEntry(w),w},getEntries:function(u){return y.password=u,y?y.entries:[]},getEntry:function(u){return D(u)},getEntryCount:function(){return y.getEntryCount()},forEach:function(u){return y.forEach(u)},extractEntryTo:function(u,S,l,p,w,_){p=o(!1,p),w=o(!1,w),l=o(!0,l),_=i(w,_);var T=D(u);if(!T)throw t.Errors.NO_ENTRY();var F=E(T.entryName),O=C(S,_&&!T.isDirectory?_:l?F:e.basename(F));if(T.isDirectory){var x=y.getEntryChildren(T);return x.forEach(function(B){if(B.isDirectory)return;var P=B.getData();if(!P)throw t.Errors.CANT_EXTRACT_FILE();var z=E(B.entryName),de=C(S,l?z:e.basename(z));const Z=w?B.header.fileAttr:void 0;N.writeFileTo(de,P,p,Z)}),!0}var b=T.getData(y.password);if(!b)throw t.Errors.CANT_EXTRACT_FILE();if(N.fs.existsSync(O)&&!p)throw t.Errors.CANT_OVERRIDE();const U=w?u.header.fileAttr:void 0;return N.writeFileTo(O,b,p,U),!0},test:function(u){if(!y)return!1;for(var S in y.entries)try{if(S.isDirectory)continue;var l=y.entries[S].getData(u);if(!l)return!1}catch{return!1}return!0},extractAllTo:function(u,S,l,p){if(l=o(!1,l),p=i(l,p),S=o(!1,S),!y)throw t.Errors.NO_ZIP();y.entries.forEach(function(w){var _=C(u,E(w.entryName));if(w.isDirectory){N.makeDir(_);return}var T=w.getData(p);if(!T)throw t.Errors.CANT_EXTRACT_FILE();const F=l?w.header.fileAttr:void 0;N.writeFileTo(_,T,S,F);try{N.fs.utimesSync(_,w.header.time,w.header.time)}catch{throw t.Errors.CANT_EXTRACT_FILE()}})},extractAllToAsync:function(u,S,l,p){if(p=s(S,l,p),l=o(!1,l),S=o(!1,S),!p)return new Promise((O,x)=>{this.extractAllToAsync(u,S,l,function(b){b?x(b):O(this)})});if(!y){p(t.Errors.NO_ZIP());return}u=e.resolve(u);const w=O=>C(u,e.normalize(E(O.entryName))),_=(O,x)=>new Error(O+': "'+x+'"'),T=[],F=[];y.entries.forEach(O=>{O.isDirectory?T.push(O):F.push(O)});for(const O of T){const x=w(O),b=l?O.header.fileAttr:void 0;try{N.makeDir(x),b&&N.fs.chmodSync(x,b),N.fs.utimesSync(x,O.header.time,O.header.time)}catch{p(_("Unable to create folder",x))}}F.reverse().reduce(function(O,x){return function(b){if(b)O(b);else{const U=e.normalize(E(x.entryName)),B=C(u,U);x.getDataAsync(function(P,z){if(z)O(z);else if(!P)O(t.Errors.CANT_EXTRACT_FILE());else{const de=l?x.header.fileAttr:void 0;N.writeFileToAsync(B,P,S,de,function(Z){Z||O(_("Unable to write file",B)),N.fs.utimes(B,x.header.time,x.header.time,function(X){X?O(_("Unable to set times",B)):O()})})}})}}},p)()},writeZip:function(u,S){if(arguments.length===1&&typeof u=="function"&&(S=u,u=""),!u&&g.filename&&(u=g.filename),!!u){var l=y.compressToBuffer();if(l){var p=N.writeFileTo(u,l,!0);typeof S=="function"&&S(p?null:new Error("failed"),"")}}},writeZipPromise:function(u,S){const{overwrite:l,perm:p}=Object.assign({overwrite:!0},S);return new Promise((w,_)=>{!u&&g.filename&&(u=g.filename),u||_("ADM-ZIP: ZIP File Name Missing"),this.toBufferPromise().then(T=>{const F=O=>O?w(O):_("ADM-ZIP: Wasn't able to write zip file");N.writeFileToAsync(u,T,l,p,F)},_)})},toBufferPromise:function(){return new Promise((u,S)=>{y.toAsyncBuffer(u,S)})},toBuffer:function(u,S,l,p){return typeof u=="function"?(y.toAsyncBuffer(u,S,l,p),null):y.compressToBuffer()}}},Me}var Cn=wn();const Nn=cn(Cn);function yt(t,e){return function(){return t.apply(e,arguments)}}const{toString:Ln}=Object.prototype,{getPrototypeOf:je}=Object,{iterator:Ee,toStringTag:gt}=Symbol,me=(t=>e=>{const n=Ln.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),k=t=>(t=t.toLowerCase(),e=>me(e)===t),pe=t=>e=>typeof e===t,{isArray:Q}=Array,ee=pe("undefined");function ie(t){return t!==null&&!ee(t)&&t.constructor!==null&&!ee(t.constructor)&&M(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const St=k("ArrayBuffer");function In(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&St(t.buffer),e}const On=pe("string"),M=pe("function"),wt=pe("number"),ae=t=>t!==null&&typeof t=="object",Dn=t=>t===!0||t===!1,ye=t=>{if(me(t)!=="object")return!1;const e=je(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(gt in t)&&!(Ee in t)},Rn=t=>{if(!ae(t)||ie(t))return!1;try{return Object.keys(t).length===0&&Object.getPrototypeOf(t)===Object.prototype}catch{return!1}},_n=k("Date"),Tn=k("File"),An=k("Blob"),Fn=k("FileList"),xn=t=>ae(t)&&M(t.pipe),bn=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||M(t.append)&&((e=me(t))==="formdata"||e==="object"&&M(t.toString)&&t.toString()==="[object FormData]"))},Un=k("URLSearchParams"),[Pn,Bn,vn,Hn]=["ReadableStream","Request","Response","Headers"].map(k),Mn=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ce(t,e,{allOwnKeys:n=!1}={}){if(t===null||typeof t>"u")return;let r,o;if(typeof t!="object"&&(t=[t]),Q(t))for(r=0,o=t.length;r<o;r++)e.call(null,t[r],r,t);else{if(ie(t))return;const i=n?Object.getOwnPropertyNames(t):Object.keys(t),s=i.length;let c;for(r=0;r<s;r++)c=i[r],e.call(null,t[c],c,t)}}function Ct(t,e){if(ie(t))return null;e=e.toLowerCase();const n=Object.keys(t);let r=n.length,o;for(;r-- >0;)if(o=n[r],e===o.toLowerCase())return o;return null}const J=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Nt=t=>!ee(t)&&t!==J;function ze(){const{caseless:t,skipUndefined:e}=Nt(this)&&this||{},n={},r=(o,i)=>{const s=t&&Ct(n,i)||i;ye(n[s])&&ye(o)?n[s]=ze(n[s],o):ye(o)?n[s]=ze({},o):Q(o)?n[s]=o.slice():(!e||!ee(o))&&(n[s]=o)};for(let o=0,i=arguments.length;o<i;o++)arguments[o]&&ce(arguments[o],r);return n}const jn=(t,e,n,{allOwnKeys:r}={})=>(ce(e,(o,i)=>{n&&M(o)?t[i]=yt(o,n):t[i]=o},{allOwnKeys:r}),t),zn=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),Zn=(t,e,n,r)=>{t.prototype=Object.create(e.prototype,r),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},qn=(t,e,n,r)=>{let o,i,s;const c={};if(e=e||{},t==null)return e;do{for(o=Object.getOwnPropertyNames(t),i=o.length;i-- >0;)s=o[i],(!r||r(s,t,e))&&!c[s]&&(e[s]=t[s],c[s]=!0);t=n!==!1&&je(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},kn=(t,e,n)=>{t=String(t),(n===void 0||n>t.length)&&(n=t.length),n-=e.length;const r=t.indexOf(e,n);return r!==-1&&r===n},$n=t=>{if(!t)return null;if(Q(t))return t;let e=t.length;if(!wt(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},Vn=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&je(Uint8Array)),Gn=(t,e)=>{const r=(t&&t[Ee]).call(t);let o;for(;(o=r.next())&&!o.done;){const i=o.value;e.call(t,i[0],i[1])}},Xn=(t,e)=>{let n;const r=[];for(;(n=t.exec(e))!==null;)r.push(n);return r},Wn=k("HTMLFormElement"),Jn=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),Lt=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),Kn=k("RegExp"),It=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),r={};ce(n,(o,i)=>{let s;(s=e(o,i,t))!==!1&&(r[i]=s||o)}),Object.defineProperties(t,r)},Yn=t=>{It(t,(e,n)=>{if(M(t)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=t[n];if(M(r)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},Qn=(t,e)=>{const n={},r=o=>{o.forEach(i=>{n[i]=!0})};return Q(t)?r(t):r(String(t).split(e)),n},er=()=>{},tr=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e;function nr(t){return!!(t&&M(t.append)&&t[gt]==="FormData"&&t[Ee])}const rr=t=>{const e=new Array(10),n=(r,o)=>{if(ae(r)){if(e.indexOf(r)>=0)return;if(ie(r))return r;if(!("toJSON"in r)){e[o]=r;const i=Q(r)?[]:{};return ce(r,(s,c)=>{const a=n(s,o+1);!ee(a)&&(i[c]=a)}),e[o]=void 0,i}}return r};return n(t,0)},or=k("AsyncFunction"),sr=t=>t&&(ae(t)||M(t))&&M(t.then)&&M(t.catch),Ot=((t,e)=>t?setImmediate:e?((n,r)=>(J.addEventListener("message",({source:o,data:i})=>{o===J&&i===n&&r.length&&r.shift()()},!1),o=>{r.push(o),J.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",M(J.postMessage)),ir=typeof queueMicrotask<"u"?queueMicrotask.bind(J):typeof process<"u"&&process.nextTick||Ot,m={isArray:Q,isArrayBuffer:St,isBuffer:ie,isFormData:bn,isArrayBufferView:In,isString:On,isNumber:wt,isBoolean:Dn,isObject:ae,isPlainObject:ye,isEmptyObject:Rn,isReadableStream:Pn,isRequest:Bn,isResponse:vn,isHeaders:Hn,isUndefined:ee,isDate:_n,isFile:Tn,isBlob:An,isRegExp:Kn,isFunction:M,isStream:xn,isURLSearchParams:Un,isTypedArray:Vn,isFileList:Fn,forEach:ce,merge:ze,extend:jn,trim:Mn,stripBOM:zn,inherits:Zn,toFlatObject:qn,kindOf:me,kindOfTest:k,endsWith:kn,toArray:$n,forEachEntry:Gn,matchAll:Xn,isHTMLForm:Wn,hasOwnProperty:Lt,hasOwnProp:Lt,reduceDescriptors:It,freezeMethods:Yn,toObjectSet:Qn,toCamelCase:Jn,noop:er,toFiniteNumber:tr,findKey:Ct,global:J,isContextDefined:Nt,isSpecCompliantForm:nr,toJSONObject:rr,isAsyncFn:or,isThenable:sr,setImmediate:Ot,asap:ir,isIterable:t=>t!=null&&M(t[Ee])};function A(t,e,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=t,this.name="AxiosError",e&&(this.code=e),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o,this.status=o.status?o.status:null)}m.inherits(A,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:m.toJSONObject(this.config),code:this.code,status:this.status}}});const Dt=A.prototype,Rt={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(t=>{Rt[t]={value:t}}),Object.defineProperties(A,Rt),Object.defineProperty(Dt,"isAxiosError",{value:!0}),A.from=(t,e,n,r,o,i)=>{const s=Object.create(Dt);m.toFlatObject(t,s,function(d){return d!==Error.prototype},f=>f!=="isAxiosError");const c=t&&t.message?t.message:"Error",a=e==null&&t?t.code:e;return A.call(s,c,a,n,r,o),t&&s.cause==null&&Object.defineProperty(s,"cause",{value:t,configurable:!0}),s.name=t&&t.name||"Error",i&&Object.assign(s,i),s};const ar=null;function Ze(t){return m.isPlainObject(t)||m.isArray(t)}function _t(t){return m.endsWith(t,"[]")?t.slice(0,-2):t}function Tt(t,e,n){return t?t.concat(e).map(function(o,i){return o=_t(o),!n&&i?"["+o+"]":o}).join(n?".":""):e}function cr(t){return m.isArray(t)&&!t.some(Ze)}const fr=m.toFlatObject(m,{},null,function(e){return/^is[A-Z]/.test(e)});function ge(t,e,n){if(!m.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,n=m.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(C,L){return!m.isUndefined(L[C])});const r=n.metaTokens,o=n.visitor||d,i=n.dots,s=n.indexes,a=(n.Blob||typeof Blob<"u"&&Blob)&&m.isSpecCompliantForm(e);if(!m.isFunction(o))throw new TypeError("visitor must be a function");function f(E){if(E===null)return"";if(m.isDate(E))return E.toISOString();if(m.isBoolean(E))return E.toString();if(!a&&m.isBlob(E))throw new A("Blob is not supported. Use a Buffer instead.");return m.isArrayBuffer(E)||m.isTypedArray(E)?a&&typeof Blob=="function"?new Blob([E]):Buffer.from(E):E}function d(E,C,L){let D=E;if(E&&!L&&typeof E=="object"){if(m.endsWith(C,"{}"))C=r?C:C.slice(0,-2),E=JSON.stringify(E);else if(m.isArray(E)&&cr(E)||(m.isFileList(E)||m.endsWith(C,"[]"))&&(D=m.toArray(E)))return C=_t(C),D.forEach(function(R,h){!(m.isUndefined(R)||R===null)&&e.append(s===!0?Tt([C],h,i):s===null?C:C+"[]",f(R))}),!1}return Ze(E)?!0:(e.append(Tt(L,C,i),f(E)),!1)}const g=[],N=Object.assign(fr,{defaultVisitor:d,convertValue:f,isVisitable:Ze});function y(E,C){if(!m.isUndefined(E)){if(g.indexOf(E)!==-1)throw Error("Circular reference detected in "+C.join("."));g.push(E),m.forEach(E,function(D,I){(!(m.isUndefined(D)||D===null)&&o.call(e,D,m.isString(I)?I.trim():I,C,N))===!0&&y(D,C?C.concat(I):[I])}),g.pop()}}if(!m.isObject(t))throw new TypeError("data must be an object");return y(t),e}function At(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(r){return e[r]})}function qe(t,e){this._pairs=[],t&&ge(t,this,e)}const Ft=qe.prototype;Ft.append=function(e,n){this._pairs.push([e,n])},Ft.toString=function(e){const n=e?function(r){return e.call(this,r,At)}:At;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function ur(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function xt(t,e,n){if(!e)return t;const r=n&&n.encode||ur;m.isFunction(n)&&(n={serialize:n});const o=n&&n.serialize;let i;if(o?i=o(e,n):i=m.isURLSearchParams(e)?e.toString():new qe(e,n).toString(r),i){const s=t.indexOf("#");s!==-1&&(t=t.slice(0,s)),t+=(t.indexOf("?")===-1?"?":"&")+i}return t}class bt{constructor(){this.handlers=[]}use(e,n,r){return this.handlers.push({fulfilled:e,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){m.forEach(this.handlers,function(r){r!==null&&e(r)})}}const Ut={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},lr={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:qe,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},ke=typeof window<"u"&&typeof document<"u",$e=typeof navigator=="object"&&navigator||void 0,dr=ke&&(!$e||["ReactNative","NativeScript","NS"].indexOf($e.product)<0),hr=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Er=ke&&window.location.href||"http://localhost",H={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:ke,hasStandardBrowserEnv:dr,hasStandardBrowserWebWorkerEnv:hr,navigator:$e,origin:Er},Symbol.toStringTag,{value:"Module"})),...lr};function mr(t,e){return ge(t,new H.classes.URLSearchParams,{visitor:function(n,r,o,i){return H.isNode&&m.isBuffer(n)?(this.append(r,n.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)},...e})}function pr(t){return m.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function yr(t){const e={},n=Object.keys(t);let r;const o=n.length;let i;for(r=0;r<o;r++)i=n[r],e[i]=t[i];return e}function Pt(t){function e(n,r,o,i){let s=n[i++];if(s==="__proto__")return!0;const c=Number.isFinite(+s),a=i>=n.length;return s=!s&&m.isArray(o)?o.length:s,a?(m.hasOwnProp(o,s)?o[s]=[o[s],r]:o[s]=r,!c):((!o[s]||!m.isObject(o[s]))&&(o[s]=[]),e(n,r,o[s],i)&&m.isArray(o[s])&&(o[s]=yr(o[s])),!c)}if(m.isFormData(t)&&m.isFunction(t.entries)){const n={};return m.forEachEntry(t,(r,o)=>{e(pr(r),o,n,0)}),n}return null}function gr(t,e,n){if(m.isString(t))try{return(e||JSON.parse)(t),m.trim(t)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(t)}const fe={transitional:Ut,adapter:["xhr","http","fetch"],transformRequest:[function(e,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,i=m.isObject(e);if(i&&m.isHTMLForm(e)&&(e=new FormData(e)),m.isFormData(e))return o?JSON.stringify(Pt(e)):e;if(m.isArrayBuffer(e)||m.isBuffer(e)||m.isStream(e)||m.isFile(e)||m.isBlob(e)||m.isReadableStream(e))return e;if(m.isArrayBufferView(e))return e.buffer;if(m.isURLSearchParams(e))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let c;if(i){if(r.indexOf("application/x-www-form-urlencoded")>-1)return mr(e,this.formSerializer).toString();if((c=m.isFileList(e))||r.indexOf("multipart/form-data")>-1){const a=this.env&&this.env.FormData;return ge(c?{"files[]":e}:e,a&&new a,this.formSerializer)}}return i||o?(n.setContentType("application/json",!1),gr(e)):e}],transformResponse:[function(e){const n=this.transitional||fe.transitional,r=n&&n.forcedJSONParsing,o=this.responseType==="json";if(m.isResponse(e)||m.isReadableStream(e))return e;if(e&&m.isString(e)&&(r&&!this.responseType||o)){const s=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(e,this.parseReviver)}catch(c){if(s)throw c.name==="SyntaxError"?A.from(c,A.ERR_BAD_RESPONSE,this,null,this.response):c}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:H.classes.FormData,Blob:H.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};m.forEach(["delete","get","head","post","put","patch"],t=>{fe.headers[t]={}});const Sr=m.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),wr=t=>{const e={};let n,r,o;return t&&t.split(`
2
+ `).forEach(function(s){o=s.indexOf(":"),n=s.substring(0,o).trim().toLowerCase(),r=s.substring(o+1).trim(),!(!n||e[n]&&Sr[n])&&(n==="set-cookie"?e[n]?e[n].push(r):e[n]=[r]:e[n]=e[n]?e[n]+", "+r:r)}),e},Bt=Symbol("internals");function ue(t){return t&&String(t).trim().toLowerCase()}function Se(t){return t===!1||t==null?t:m.isArray(t)?t.map(Se):String(t)}function Cr(t){const e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(t);)e[r[1]]=r[2];return e}const Nr=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function Ve(t,e,n,r,o){if(m.isFunction(r))return r.call(this,e,n);if(o&&(e=n),!!m.isString(e)){if(m.isString(r))return e.indexOf(r)!==-1;if(m.isRegExp(r))return r.test(e)}}function Lr(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,n,r)=>n.toUpperCase()+r)}function Ir(t,e){const n=m.toCamelCase(" "+e);["get","set","has"].forEach(r=>{Object.defineProperty(t,r+n,{value:function(o,i,s){return this[r].call(this,e,o,i,s)},configurable:!0})})}let j=class{constructor(e){e&&this.set(e)}set(e,n,r){const o=this;function i(c,a,f){const d=ue(a);if(!d)throw new Error("header name must be a non-empty string");const g=m.findKey(o,d);(!g||o[g]===void 0||f===!0||f===void 0&&o[g]!==!1)&&(o[g||a]=Se(c))}const s=(c,a)=>m.forEach(c,(f,d)=>i(f,d,a));if(m.isPlainObject(e)||e instanceof this.constructor)s(e,n);else if(m.isString(e)&&(e=e.trim())&&!Nr(e))s(wr(e),n);else if(m.isObject(e)&&m.isIterable(e)){let c={},a,f;for(const d of e){if(!m.isArray(d))throw TypeError("Object iterator must return a key-value pair");c[f=d[0]]=(a=c[f])?m.isArray(a)?[...a,d[1]]:[a,d[1]]:d[1]}s(c,n)}else e!=null&&i(n,e,r);return this}get(e,n){if(e=ue(e),e){const r=m.findKey(this,e);if(r){const o=this[r];if(!n)return o;if(n===!0)return Cr(o);if(m.isFunction(n))return n.call(this,o,r);if(m.isRegExp(n))return n.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,n){if(e=ue(e),e){const r=m.findKey(this,e);return!!(r&&this[r]!==void 0&&(!n||Ve(this,this[r],r,n)))}return!1}delete(e,n){const r=this;let o=!1;function i(s){if(s=ue(s),s){const c=m.findKey(r,s);c&&(!n||Ve(r,r[c],c,n))&&(delete r[c],o=!0)}}return m.isArray(e)?e.forEach(i):i(e),o}clear(e){const n=Object.keys(this);let r=n.length,o=!1;for(;r--;){const i=n[r];(!e||Ve(this,this[i],i,e,!0))&&(delete this[i],o=!0)}return o}normalize(e){const n=this,r={};return m.forEach(this,(o,i)=>{const s=m.findKey(r,i);if(s){n[s]=Se(o),delete n[i];return}const c=e?Lr(i):String(i).trim();c!==i&&delete n[i],n[c]=Se(o),r[c]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const n=Object.create(null);return m.forEach(this,(r,o)=>{r!=null&&r!==!1&&(n[o]=e&&m.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,n])=>e+": "+n).join(`
3
+ `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...n){const r=new this(e);return n.forEach(o=>r.set(o)),r}static accessor(e){const r=(this[Bt]=this[Bt]={accessors:{}}).accessors,o=this.prototype;function i(s){const c=ue(s);r[c]||(Ir(o,s),r[c]=!0)}return m.isArray(e)?e.forEach(i):i(e),this}};j.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),m.reduceDescriptors(j.prototype,({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(r){this[n]=r}}}),m.freezeMethods(j);function Ge(t,e){const n=this||fe,r=e||n,o=j.from(r.headers);let i=r.data;return m.forEach(t,function(c){i=c.call(n,i,o.normalize(),e?e.status:void 0)}),o.normalize(),i}function vt(t){return!!(t&&t.__CANCEL__)}function te(t,e,n){A.call(this,t??"canceled",A.ERR_CANCELED,e,n),this.name="CanceledError"}m.inherits(te,A,{__CANCEL__:!0});function Ht(t,e,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?t(n):e(new A("Request failed with status code "+n.status,[A.ERR_BAD_REQUEST,A.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function Or(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function Dr(t,e){t=t||10;const n=new Array(t),r=new Array(t);let o=0,i=0,s;return e=e!==void 0?e:1e3,function(a){const f=Date.now(),d=r[i];s||(s=f),n[o]=a,r[o]=f;let g=i,N=0;for(;g!==o;)N+=n[g++],g=g%t;if(o=(o+1)%t,o===i&&(i=(i+1)%t),f-s<e)return;const y=d&&f-d;return y?Math.round(N*1e3/y):void 0}}function Rr(t,e){let n=0,r=1e3/e,o,i;const s=(f,d=Date.now())=>{n=d,o=null,i&&(clearTimeout(i),i=null),t(...f)};return[(...f)=>{const d=Date.now(),g=d-n;g>=r?s(f,d):(o=f,i||(i=setTimeout(()=>{i=null,s(o)},r-g)))},()=>o&&s(o)]}const we=(t,e,n=3)=>{let r=0;const o=Dr(50,250);return Rr(i=>{const s=i.loaded,c=i.lengthComputable?i.total:void 0,a=s-r,f=o(a),d=s<=c;r=s;const g={loaded:s,total:c,progress:c?s/c:void 0,bytes:a,rate:f||void 0,estimated:f&&c&&d?(c-s)/f:void 0,event:i,lengthComputable:c!=null,[e?"download":"upload"]:!0};t(g)},n)},Mt=(t,e)=>{const n=t!=null;return[r=>e[0]({lengthComputable:n,total:t,loaded:r}),e[1]]},jt=t=>(...e)=>m.asap(()=>t(...e)),_r=H.hasStandardBrowserEnv?((t,e)=>n=>(n=new URL(n,H.origin),t.protocol===n.protocol&&t.host===n.host&&(e||t.port===n.port)))(new URL(H.origin),H.navigator&&/(msie|trident)/i.test(H.navigator.userAgent)):()=>!0,Tr=H.hasStandardBrowserEnv?{write(t,e,n,r,o,i,s){if(typeof document>"u")return;const c=[`${t}=${encodeURIComponent(e)}`];m.isNumber(n)&&c.push(`expires=${new Date(n).toUTCString()}`),m.isString(r)&&c.push(`path=${r}`),m.isString(o)&&c.push(`domain=${o}`),i===!0&&c.push("secure"),m.isString(s)&&c.push(`SameSite=${s}`),document.cookie=c.join("; ")},read(t){if(typeof document>"u")return null;const e=document.cookie.match(new RegExp("(?:^|; )"+t+"=([^;]*)"));return e?decodeURIComponent(e[1]):null},remove(t){this.write(t,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function Ar(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function Fr(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function zt(t,e,n){let r=!Ar(e);return t&&(r||n==!1)?Fr(t,e):e}const Zt=t=>t instanceof j?{...t}:t;function K(t,e){e=e||{};const n={};function r(f,d,g,N){return m.isPlainObject(f)&&m.isPlainObject(d)?m.merge.call({caseless:N},f,d):m.isPlainObject(d)?m.merge({},d):m.isArray(d)?d.slice():d}function o(f,d,g,N){if(m.isUndefined(d)){if(!m.isUndefined(f))return r(void 0,f,g,N)}else return r(f,d,g,N)}function i(f,d){if(!m.isUndefined(d))return r(void 0,d)}function s(f,d){if(m.isUndefined(d)){if(!m.isUndefined(f))return r(void 0,f)}else return r(void 0,d)}function c(f,d,g){if(g in e)return r(f,d);if(g in t)return r(void 0,f)}const a={url:i,method:i,data:i,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:c,headers:(f,d,g)=>o(Zt(f),Zt(d),g,!0)};return m.forEach(Object.keys({...t,...e}),function(d){const g=a[d]||o,N=g(t[d],e[d],d);m.isUndefined(N)&&g!==c||(n[d]=N)}),n}const qt=t=>{const e=K({},t);let{data:n,withXSRFToken:r,xsrfHeaderName:o,xsrfCookieName:i,headers:s,auth:c}=e;if(e.headers=s=j.from(s),e.url=xt(zt(e.baseURL,e.url,e.allowAbsoluteUrls),t.params,t.paramsSerializer),c&&s.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):""))),m.isFormData(n)){if(H.hasStandardBrowserEnv||H.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if(m.isFunction(n.getHeaders)){const a=n.getHeaders(),f=["content-type","content-length"];Object.entries(a).forEach(([d,g])=>{f.includes(d.toLowerCase())&&s.set(d,g)})}}if(H.hasStandardBrowserEnv&&(r&&m.isFunction(r)&&(r=r(e)),r||r!==!1&&_r(e.url))){const a=o&&i&&Tr.read(i);a&&s.set(o,a)}return e},xr=typeof XMLHttpRequest<"u"&&function(t){return new Promise(function(n,r){const o=qt(t);let i=o.data;const s=j.from(o.headers).normalize();let{responseType:c,onUploadProgress:a,onDownloadProgress:f}=o,d,g,N,y,E;function C(){y&&y(),E&&E(),o.cancelToken&&o.cancelToken.unsubscribe(d),o.signal&&o.signal.removeEventListener("abort",d)}let L=new XMLHttpRequest;L.open(o.method.toUpperCase(),o.url,!0),L.timeout=o.timeout;function D(){if(!L)return;const R=j.from("getAllResponseHeaders"in L&&L.getAllResponseHeaders()),u={data:!c||c==="text"||c==="json"?L.responseText:L.response,status:L.status,statusText:L.statusText,headers:R,config:t,request:L};Ht(function(l){n(l),C()},function(l){r(l),C()},u),L=null}"onloadend"in L?L.onloadend=D:L.onreadystatechange=function(){!L||L.readyState!==4||L.status===0&&!(L.responseURL&&L.responseURL.indexOf("file:")===0)||setTimeout(D)},L.onabort=function(){L&&(r(new A("Request aborted",A.ECONNABORTED,t,L)),L=null)},L.onerror=function(h){const u=h&&h.message?h.message:"Network Error",S=new A(u,A.ERR_NETWORK,t,L);S.event=h||null,r(S),L=null},L.ontimeout=function(){let h=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const u=o.transitional||Ut;o.timeoutErrorMessage&&(h=o.timeoutErrorMessage),r(new A(h,u.clarifyTimeoutError?A.ETIMEDOUT:A.ECONNABORTED,t,L)),L=null},i===void 0&&s.setContentType(null),"setRequestHeader"in L&&m.forEach(s.toJSON(),function(h,u){L.setRequestHeader(u,h)}),m.isUndefined(o.withCredentials)||(L.withCredentials=!!o.withCredentials),c&&c!=="json"&&(L.responseType=o.responseType),f&&([N,E]=we(f,!0),L.addEventListener("progress",N)),a&&L.upload&&([g,y]=we(a),L.upload.addEventListener("progress",g),L.upload.addEventListener("loadend",y)),(o.cancelToken||o.signal)&&(d=R=>{L&&(r(!R||R.type?new te(null,t,L):R),L.abort(),L=null)},o.cancelToken&&o.cancelToken.subscribe(d),o.signal&&(o.signal.aborted?d():o.signal.addEventListener("abort",d)));const I=Or(o.url);if(I&&H.protocols.indexOf(I)===-1){r(new A("Unsupported protocol "+I+":",A.ERR_BAD_REQUEST,t));return}L.send(i||null)})},br=(t,e)=>{const{length:n}=t=t?t.filter(Boolean):[];if(e||n){let r=new AbortController,o;const i=function(f){if(!o){o=!0,c();const d=f instanceof Error?f:this.reason;r.abort(d instanceof A?d:new te(d instanceof Error?d.message:d))}};let s=e&&setTimeout(()=>{s=null,i(new A(`timeout ${e} of ms exceeded`,A.ETIMEDOUT))},e);const c=()=>{t&&(s&&clearTimeout(s),s=null,t.forEach(f=>{f.unsubscribe?f.unsubscribe(i):f.removeEventListener("abort",i)}),t=null)};t.forEach(f=>f.addEventListener("abort",i));const{signal:a}=r;return a.unsubscribe=()=>m.asap(c),a}},Ur=function*(t,e){let n=t.byteLength;if(n<e){yield t;return}let r=0,o;for(;r<n;)o=r+e,yield t.slice(r,o),r=o},Pr=async function*(t,e){for await(const n of Br(t))yield*Ur(n,e)},Br=async function*(t){if(t[Symbol.asyncIterator]){yield*t;return}const e=t.getReader();try{for(;;){const{done:n,value:r}=await e.read();if(n)break;yield r}}finally{await e.cancel()}},kt=(t,e,n,r)=>{const o=Pr(t,e);let i=0,s,c=a=>{s||(s=!0,r&&r(a))};return new ReadableStream({async pull(a){try{const{done:f,value:d}=await o.next();if(f){c(),a.close();return}let g=d.byteLength;if(n){let N=i+=g;n(N)}a.enqueue(new Uint8Array(d))}catch(f){throw c(f),f}},cancel(a){return c(a),o.return()}},{highWaterMark:2})},$t=64*1024,{isFunction:Ce}=m,vr=(({Request:t,Response:e})=>({Request:t,Response:e}))(m.global),{ReadableStream:Vt,TextEncoder:Gt}=m.global,Xt=(t,...e)=>{try{return!!t(...e)}catch{return!1}},Hr=t=>{t=m.merge.call({skipUndefined:!0},vr,t);const{fetch:e,Request:n,Response:r}=t,o=e?Ce(e):typeof fetch=="function",i=Ce(n),s=Ce(r);if(!o)return!1;const c=o&&Ce(Vt),a=o&&(typeof Gt=="function"?(E=>C=>E.encode(C))(new Gt):async E=>new Uint8Array(await new n(E).arrayBuffer())),f=i&&c&&Xt(()=>{let E=!1;const C=new n(H.origin,{body:new Vt,method:"POST",get duplex(){return E=!0,"half"}}).headers.has("Content-Type");return E&&!C}),d=s&&c&&Xt(()=>m.isReadableStream(new r("").body)),g={stream:d&&(E=>E.body)};o&&["text","arrayBuffer","blob","formData","stream"].forEach(E=>{!g[E]&&(g[E]=(C,L)=>{let D=C&&C[E];if(D)return D.call(C);throw new A(`Response type '${E}' is not supported`,A.ERR_NOT_SUPPORT,L)})});const N=async E=>{if(E==null)return 0;if(m.isBlob(E))return E.size;if(m.isSpecCompliantForm(E))return(await new n(H.origin,{method:"POST",body:E}).arrayBuffer()).byteLength;if(m.isArrayBufferView(E)||m.isArrayBuffer(E))return E.byteLength;if(m.isURLSearchParams(E)&&(E=E+""),m.isString(E))return(await a(E)).byteLength},y=async(E,C)=>{const L=m.toFiniteNumber(E.getContentLength());return L??N(C)};return async E=>{let{url:C,method:L,data:D,signal:I,cancelToken:R,timeout:h,onDownloadProgress:u,onUploadProgress:S,responseType:l,headers:p,withCredentials:w="same-origin",fetchOptions:_}=qt(E),T=e||fetch;l=l?(l+"").toLowerCase():"text";let F=br([I,R&&R.toAbortSignal()],h),O=null;const x=F&&F.unsubscribe&&(()=>{F.unsubscribe()});let b;try{if(S&&f&&L!=="get"&&L!=="head"&&(b=await y(p,D))!==0){let Z=new n(C,{method:"POST",body:D,duplex:"half"}),X;if(m.isFormData(D)&&(X=Z.headers.get("content-type"))&&p.setContentType(X),Z.body){const[Ke,Ie]=Mt(b,we(jt(S)));D=kt(Z.body,$t,Ke,Ie)}}m.isString(w)||(w=w?"include":"omit");const U=i&&"credentials"in n.prototype,B={..._,signal:F,method:L.toUpperCase(),headers:p.normalize().toJSON(),body:D,duplex:"half",credentials:U?w:void 0};O=i&&new n(C,B);let P=await(i?T(O,_):T(C,B));const z=d&&(l==="stream"||l==="response");if(d&&(u||z&&x)){const Z={};["status","statusText","headers"].forEach(sn=>{Z[sn]=P[sn]});const X=m.toFiniteNumber(P.headers.get("content-length")),[Ke,Ie]=u&&Mt(X,we(jt(u),!0))||[];P=new r(kt(P.body,$t,Ke,()=>{Ie&&Ie(),x&&x()}),Z)}l=l||"text";let de=await g[m.findKey(g,l)||"text"](P,E);return!z&&x&&x(),await new Promise((Z,X)=>{Ht(Z,X,{data:de,headers:j.from(P.headers),status:P.status,statusText:P.statusText,config:E,request:O})})}catch(U){throw x&&x(),U&&U.name==="TypeError"&&/Load failed|fetch/i.test(U.message)?Object.assign(new A("Network Error",A.ERR_NETWORK,E,O),{cause:U.cause||U}):A.from(U,U&&U.code,E,O)}}},Mr=new Map,Wt=t=>{let e=t&&t.env||{};const{fetch:n,Request:r,Response:o}=e,i=[r,o,n];let s=i.length,c=s,a,f,d=Mr;for(;c--;)a=i[c],f=d.get(a),f===void 0&&d.set(a,f=c?new Map:Hr(e)),d=f;return f};Wt();const Xe={http:ar,xhr:xr,fetch:{get:Wt}};m.forEach(Xe,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const Jt=t=>`- ${t}`,jr=t=>m.isFunction(t)||t===null||t===!1;function zr(t,e){t=m.isArray(t)?t:[t];const{length:n}=t;let r,o;const i={};for(let s=0;s<n;s++){r=t[s];let c;if(o=r,!jr(r)&&(o=Xe[(c=String(r)).toLowerCase()],o===void 0))throw new A(`Unknown adapter '${c}'`);if(o&&(m.isFunction(o)||(o=o.get(e))))break;i[c||"#"+s]=o}if(!o){const s=Object.entries(i).map(([a,f])=>`adapter ${a} `+(f===!1?"is not supported by the environment":"is not available in the build"));let c=n?s.length>1?`since :
4
+ `+s.map(Jt).join(`
5
+ `):" "+Jt(s[0]):"as no adapter specified";throw new A("There is no suitable adapter to dispatch the request "+c,"ERR_NOT_SUPPORT")}return o}const Kt={getAdapter:zr,adapters:Xe};function We(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new te(null,t)}function Yt(t){return We(t),t.headers=j.from(t.headers),t.data=Ge.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),Kt.getAdapter(t.adapter||fe.adapter,t)(t).then(function(r){return We(t),r.data=Ge.call(t,t.transformResponse,r),r.headers=j.from(r.headers),r},function(r){return vt(r)||(We(t),r&&r.response&&(r.response.data=Ge.call(t,t.transformResponse,r.response),r.response.headers=j.from(r.response.headers))),Promise.reject(r)})}const Qt="1.13.2",Ne={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{Ne[t]=function(r){return typeof r===t||"a"+(e<1?"n ":" ")+t}});const en={};Ne.transitional=function(e,n,r){function o(i,s){return"[Axios v"+Qt+"] Transitional option '"+i+"'"+s+(r?". "+r:"")}return(i,s,c)=>{if(e===!1)throw new A(o(s," has been removed"+(n?" in "+n:"")),A.ERR_DEPRECATED);return n&&!en[s]&&(en[s]=!0,console.warn(o(s," has been deprecated since v"+n+" and will be removed in the near future"))),e?e(i,s,c):!0}},Ne.spelling=function(e){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${e}`),!0)};function Zr(t,e,n){if(typeof t!="object")throw new A("options must be an object",A.ERR_BAD_OPTION_VALUE);const r=Object.keys(t);let o=r.length;for(;o-- >0;){const i=r[o],s=e[i];if(s){const c=t[i],a=c===void 0||s(c,i,t);if(a!==!0)throw new A("option "+i+" must be "+a,A.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new A("Unknown option "+i,A.ERR_BAD_OPTION)}}const Le={assertOptions:Zr,validators:Ne},V=Le.validators;let Y=class{constructor(e){this.defaults=e||{},this.interceptors={request:new bt,response:new bt}}async request(e,n){try{return await this._request(e,n)}catch(r){if(r instanceof Error){let o={};Error.captureStackTrace?Error.captureStackTrace(o):o=new Error;const i=o.stack?o.stack.replace(/^.+\n/,""):"";try{r.stack?i&&!String(r.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(r.stack+=`
6
+ `+i):r.stack=i}catch{}}throw r}}_request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=K(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:i}=n;r!==void 0&&Le.assertOptions(r,{silentJSONParsing:V.transitional(V.boolean),forcedJSONParsing:V.transitional(V.boolean),clarifyTimeoutError:V.transitional(V.boolean)},!1),o!=null&&(m.isFunction(o)?n.paramsSerializer={serialize:o}:Le.assertOptions(o,{encode:V.function,serialize:V.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),Le.assertOptions(n,{baseUrl:V.spelling("baseURL"),withXsrfToken:V.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let s=i&&m.merge(i.common,i[n.method]);i&&m.forEach(["delete","get","head","post","put","patch","common"],E=>{delete i[E]}),n.headers=j.concat(s,i);const c=[];let a=!0;this.interceptors.request.forEach(function(C){typeof C.runWhen=="function"&&C.runWhen(n)===!1||(a=a&&C.synchronous,c.unshift(C.fulfilled,C.rejected))});const f=[];this.interceptors.response.forEach(function(C){f.push(C.fulfilled,C.rejected)});let d,g=0,N;if(!a){const E=[Yt.bind(this),void 0];for(E.unshift(...c),E.push(...f),N=E.length,d=Promise.resolve(n);g<N;)d=d.then(E[g++],E[g++]);return d}N=c.length;let y=n;for(;g<N;){const E=c[g++],C=c[g++];try{y=E(y)}catch(L){C.call(this,L);break}}try{d=Yt.call(this,y)}catch(E){return Promise.reject(E)}for(g=0,N=f.length;g<N;)d=d.then(f[g++],f[g++]);return d}getUri(e){e=K(this.defaults,e);const n=zt(e.baseURL,e.url,e.allowAbsoluteUrls);return xt(n,e.params,e.paramsSerializer)}};m.forEach(["delete","get","head","options"],function(e){Y.prototype[e]=function(n,r){return this.request(K(r||{},{method:e,url:n,data:(r||{}).data}))}}),m.forEach(["post","put","patch"],function(e){function n(r){return function(i,s,c){return this.request(K(c||{},{method:e,headers:r?{"Content-Type":"multipart/form-data"}:{},url:i,data:s}))}}Y.prototype[e]=n(),Y.prototype[e+"Form"]=n(!0)});let qr=class an{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(i){n=i});const r=this;this.promise.then(o=>{if(!r._listeners)return;let i=r._listeners.length;for(;i-- >0;)r._listeners[i](o);r._listeners=null}),this.promise.then=o=>{let i;const s=new Promise(c=>{r.subscribe(c),i=c}).then(o);return s.cancel=function(){r.unsubscribe(i)},s},e(function(i,s,c){r.reason||(r.reason=new te(i,s,c),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const n=this._listeners.indexOf(e);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const e=new AbortController,n=r=>{e.abort(r)};return this.subscribe(n),e.signal.unsubscribe=()=>this.unsubscribe(n),e.signal}static source(){let e;return{token:new an(function(o){e=o}),cancel:e}}};function kr(t){return function(n){return t.apply(null,n)}}function $r(t){return m.isObject(t)&&t.isAxiosError===!0}const Je={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Je).forEach(([t,e])=>{Je[e]=t});function tn(t){const e=new Y(t),n=yt(Y.prototype.request,e);return m.extend(n,Y.prototype,e,{allOwnKeys:!0}),m.extend(n,e,null,{allOwnKeys:!0}),n.create=function(o){return tn(K(t,o))},n}const v=tn(fe);v.Axios=Y,v.CanceledError=te,v.CancelToken=qr,v.isCancel=vt,v.VERSION=Qt,v.toFormData=ge,v.AxiosError=A,v.Cancel=v.CanceledError,v.all=function(e){return Promise.all(e)},v.spread=kr,v.isAxiosError=$r,v.mergeConfig=K,v.AxiosHeaders=j,v.formToJSON=t=>Pt(m.isHTMLForm(t)?new FormData(t):t),v.getAdapter=Kt.getAdapter,v.HttpStatusCode=Je,v.default=v;const{Axios:ro,AxiosError:oo,CanceledError:so,isCancel:io,CancelToken:ao,VERSION:co,all:fo,Cancel:uo,isAxiosError:lo,spread:ho,toFormData:Eo,AxiosHeaders:mo,HttpStatusCode:po,formToJSON:yo,getAdapter:go,mergeConfig:So}=v;async function Vr(t){return fetch(`https://api.ndjjd.top/ndd/api/v1/component/pubapi/query?name=${t}`,{method:"GET"}).then(e=>e.text()).then(e=>{try{const n=JSON.parse(e);return Promise.reject(n.message)}catch{return e}})}const Gr=(t,e,n)=>{const r=$.createHash("md5").update(n).digest("hex");return q.resolve(t,e,r)};async function nn(t){const e=["index.js","Index.js","INDEX.JS"],n=await $.readdir(t,{withFileTypes:!0});for(const r of n){const o=q.resolve(t,r.name);if(r.isFile()&&e.includes(r.name))return o;if(r.isDirectory()){const i=await nn(o);if(i)return i}}return null}async function rn(t){const e=[],n=[".css",".CSS"],r=await $.readdir(t,{withFileTypes:!0});for(const o of r){const i=q.resolve(t,o.name);if(o.isFile()&&n.some(s=>o.name.endsWith(s))&&e.push(i),o.isDirectory()){const s=await rn(i);e.push(...s)}}return e}async function Xr(t,e){const n=await $.readFile(t,"utf-8"),r=q.dirname(t);return["// 自动生成:整合所有CSS样式 + 原入口JS内容",...e.map(s=>`import './${q.relative(r,s).replace(/\\/g,"/")}';`),"",n].join(`
7
+ `)}const Wr=async(t,e)=>{try{await $.mkdir(e,{recursive:!0});const r=await v.get(t,{responseType:"arraybuffer",timeout:1e8,headers:{Accept:"application/zip"}});new Nn(Buffer.from(r.data)).extractAllTo(e,!0);const i=await nn(e);if(!i)throw new Error(`在缓存目录 ${e} 及其子目录中未找到 index.js(支持大小写:index.js、Index.js、INDEX.JS)入口文件`);const s=await rn(e),c=await Xr(i,s),a=q.dirname(i),f=q.resolve(a,"integrated.entry.js");return await $.writeFile(f,c,"utf-8"),f}catch(r){try{await $.rm(e,{recursive:!0,force:!0})}catch(o){console.warn(`[vr-plugin] 清理无效缓存目录失败:${o.message}`)}throw new Error(`[vr-plugin] 组件处理失败:${r.message}`)}},ne=new Map,le=new Map;function on(t){const e=t?.prefix||"vr:",n=t?.cacheDir??"./node_modules/.vr-cache",r=t?.search||Vr,o=t?.enableCache??!0;let i;return{name:"vite-ndd-plugin-federation",enforce:"pre",configResolved(s){i=s.root},async resolveId(s,c){if(s.startsWith(e)){const a=s.slice(e.length).trim();if(!a)throw new Error(`[vr-plugin] 无效的导入格式:${s},格式应为 vr:组件名称`);const f=i??process.cwd(),d=Gr(f,n,a);if(o&&ne.has(s)){const y=ne.get(s);try{return await $.access(y),{id:y,external:!1,moduleSideEffects:!0}}catch{ne.delete(s)}}if(le.has(a)){await le.get(a);const y=ne.get(s);if(y)return{id:y,external:!1,moduleSideEffects:!0}}const g=await r(a);if(!g)throw new Error(`[vr-plugin] 未找到组件 ${a} 的 URL,请检查 search 函数`);const N=Wr(g,d);le.set(a,N);try{const y=await N;return ne.set(s,y),{id:y,external:!1,moduleSideEffects:!0}}finally{le.delete(a)}}return null},async load(s){const c=i??process.cwd(),a=q.resolve(c,n);if(!s.startsWith(a))return null;try{return await $.readFile(s,"utf-8")}catch(f){throw new Error(`[vr-plugin] 加载文件失败 ${s}:${f.message}`)}},closeBundle(){ne.clear(),le.clear()}}}G.FederationPlugin=on,G.default=on,Object.defineProperties(G,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ndjjd-vite-plugin-federation",
3
- "version": "0.0.1",
3
+ "version": "0.0.3",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",
@@ -15,6 +15,7 @@
15
15
  "files": [
16
16
  "dist",
17
17
  "src/types/global.d.ts",
18
+ "src/types/vite.d.ts",
18
19
  "package.json",
19
20
  "README.md"
20
21
  ],
@@ -26,6 +27,9 @@
26
27
  "dependencies": {
27
28
  "vue": "^3.5.24"
28
29
  },
30
+ "peerDependencies":{
31
+ "vite": "^7.0.0"
32
+ },
29
33
  "devDependencies": {
30
34
  "@types/adm-zip": "^0.5.7",
31
35
  "@types/node": "^24.10.4",
@@ -0,0 +1,31 @@
1
+ import type { Plugin } from 'vite';
2
+
3
+ export interface FederationPluginOptions {
4
+ /**
5
+ * 远程模块导入前缀,默认值:'vr:'
6
+ */
7
+ prefix?: string;
8
+ /**
9
+ * 自定义搜索函数,用于根据组件名称获取远程ZIP包地址
10
+ * @param name 组件名称
11
+ * @returns 远程ZIP包地址Promise
12
+ */
13
+ search?: (name: string) => Promise<string>;
14
+ /**
15
+ * 组件缓存目录,默认值:'./node_modules/.vr-cache'
16
+ */
17
+ cacheDir?: string;
18
+ /**
19
+ * 是否启用缓存,默认值:true
20
+ */
21
+ enableCache?: boolean;
22
+ }
23
+
24
+ /**
25
+ * Vite 远程组件联邦插件
26
+ * @param options 插件配置项
27
+ * @returns Vite Plugin 实例
28
+ */
29
+ export function FederationPlugin(options?: FederationPluginOptions): Plugin;
30
+
31
+ export default FederationPlugin;
package/dist/global.d.ts DELETED
@@ -1,14 +0,0 @@
1
- // src/types/global.d.ts
2
- /**
3
- * 内置全局类型声明:消除 TS 找不到 vr:* 模块的报错
4
- * 使用者无需手动创建 env.d.ts,安装包后自动生效
5
- */
6
- declare module 'vr:*' {
7
- // 支持默认导出(import Default from 'vr:xxx')
8
- const defaultExport: any;
9
- // 支持命名导出/整体导出(import * as Mod from 'vr:xxx')
10
- const namedExports: Record<string, any>;
11
-
12
- export default defaultExport;
13
- export = namedExports;
14
- }
@@ -1,14 +0,0 @@
1
- // src/types/global.d.ts
2
- /**
3
- * 内置全局类型声明:消除 TS 找不到 vr:* 模块的报错
4
- * 使用者无需手动创建 env.d.ts,安装包后自动生效
5
- */
6
- declare module 'vr:*' {
7
- // 支持默认导出(import Default from 'vr:xxx')
8
- const defaultExport: any;
9
- // 支持命名导出/整体导出(import * as Mod from 'vr:xxx')
10
- const namedExports: Record<string, any>;
11
-
12
- export default defaultExport;
13
- export = namedExports;
14
- }