electron-multi-app-kit 0.1.0

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.
Files changed (42) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +611 -0
  3. package/dist/core/context.d.ts +15 -0
  4. package/dist/core/eventBus.d.ts +2 -0
  5. package/dist/core/lifecycle.d.ts +9 -0
  6. package/dist/create-app.d.ts +30 -0
  7. package/dist/index-CtN4cHF_.mjs +4 -0
  8. package/dist/index.d.ts +28 -0
  9. package/dist/index.js +1 -0
  10. package/dist/modules/autoLaunch.d.ts +47 -0
  11. package/dist/modules/batchDownloader.d.ts +89 -0
  12. package/dist/modules/downloader.d.ts +38 -0
  13. package/dist/modules/downloader.optimized.d.ts +45 -0
  14. package/dist/modules/instance.d.ts +8 -0
  15. package/dist/modules/ipc/builtins/dialog.d.ts +6 -0
  16. package/dist/modules/ipc/builtins/downloader.d.ts +6 -0
  17. package/dist/modules/ipc/builtins/fs-api.d.ts +4 -0
  18. package/dist/modules/ipc/builtins/notification.d.ts +5 -0
  19. package/dist/modules/ipc/builtins/shell.d.ts +5 -0
  20. package/dist/modules/ipc/builtins/window-control.d.ts +5 -0
  21. package/dist/modules/ipc/builtins/window-move.d.ts +7 -0
  22. package/dist/modules/ipc/index.d.ts +15 -0
  23. package/dist/modules/session.d.ts +6 -0
  24. package/dist/modules/tray.d.ts +7 -0
  25. package/dist/modules/updater.d.ts +5 -0
  26. package/dist/modules/window/manager.d.ts +103 -0
  27. package/dist/modules/window/useFloatWin.d.ts +6 -0
  28. package/dist/modules/window/useWinDrag.d.ts +8 -0
  29. package/dist/preload/base.d.ts +34 -0
  30. package/dist/preload/events.d.ts +6 -0
  31. package/dist/preload/index.d.ts +1 -0
  32. package/dist/preload/index.js +1 -0
  33. package/dist/renderer/composable/useIpcRenderer.d.ts +28 -0
  34. package/dist/renderer/composable/useWindowMove.d.ts +23 -0
  35. package/dist/renderer/index.d.ts +4 -0
  36. package/dist/renderer/index.js +1 -0
  37. package/dist/renderer/style.css +1 -0
  38. package/dist/types.d.ts +127 -0
  39. package/dist/utils/clone.d.ts +4 -0
  40. package/dist/utils/debounce.d.ts +4 -0
  41. package/dist/utils/merge.d.ts +7 -0
  42. package/package.json +62 -0
@@ -0,0 +1,4 @@
1
+ import*as t from"fs";import{Stats as e,lstat as r,createReadStream as n,readlinkSync as i}from"fs";import s,{EventEmitter as o}from"events";import{resolve as a,dirname as l,relative as u}from"path";import h from"util";import c from"buffer";import"stream";import{DeflateRaw as f}from"zlib";function d(t,{checkOpen:e=!0}={}){return null!==t&&"object"==typeof t&&(t.writable||t.readable||!e||void 0===t.writable&&void 0===t.readable)&&"function"==typeof t.pipe}const p=(t,e,r)=>{const n=t instanceof RegExp?b(t,r):t,i=e instanceof RegExp?b(e,r):e,s=null!==n&&null!=i&&g(n,i,r);return s&&{start:s[0],end:s[1],pre:r.slice(0,s[0]),body:r.slice(s[0]+n.length,s[1]),post:r.slice(s[1]+i.length)}},b=(t,e)=>{const r=e.match(t);return r?r[0]:null},g=(t,e,r)=>{let n,i,s,o,a,l=r.indexOf(t),u=r.indexOf(e,l+1),h=l;if(l>=0&&u>0){if(t===e)return[l,u];for(n=[],s=r.length;h>=0&&!a;){if(h===l)n.push(h),l=r.indexOf(t,h+1);else if(1===n.length){const t=n.pop();void 0!==t&&(a=[t,u])}else i=n.pop(),void 0!==i&&i<s&&(s=i,o=u),u=r.indexOf(e,h+1);h=l<u&&l>=0?l:u}n.length&&void 0!==o&&(a=[s,o])}return a},y="\0SLASH"+Math.random()+"\0",m="\0OPEN"+Math.random()+"\0",_="\0CLOSE"+Math.random()+"\0",w="\0COMMA"+Math.random()+"\0",S="\0PERIOD"+Math.random()+"\0",v=new RegExp(y,"g"),E=new RegExp(m,"g"),x=new RegExp(_,"g"),k=new RegExp(w,"g"),T=new RegExp(S,"g"),R=/\\\\/g,A=/\\{/g,L=/\\}/g,M=/\\,/g,N=/\\\./g,D=1e5;function O(t){return isNaN(t)?t.charCodeAt(0):parseInt(t,10)}function P(t){return t.replace(v,"\\").replace(E,"{").replace(x,"}").replace(k,",").replace(T,".")}function I(t){if(!t)return[""];const e=[],r=p("{","}",t);if(!r)return t.split(",");const{pre:n,body:i,post:s}=r,o=n.split(",");o[o.length-1]+="{"+i+"}";const a=I(s);return s.length&&(o[o.length-1]+=a.shift(),o.push.apply(o,a)),e.push.apply(e,o),e}function C(t,e={}){if(!t)return[];const{max:r=D}=e;return"{}"===t.slice(0,2)&&(t="\\{\\}"+t.slice(2)),F(function(t){return t.replace(R,y).replace(A,m).replace(L,_).replace(M,w).replace(N,S)}(t),r,!0).map(P)}function j(t){return"{"+t+"}"}function W(t){return/^-?0\d/.test(t)}function U(t,e){return t<=e}function B(t,e){return t>=e}function F(t,e,r){const n=[],i=p("{","}",t);if(!i)return[t];const s=i.pre,o=i.post.length?F(i.post,e,!1):[""];if(/\$$/.test(i.pre))for(let a=0;a<o.length&&a<e;a++){const t=s+"{"+i.body+"}"+o[a];n.push(t)}else{const a=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(i.body),l=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(i.body),u=a||l,h=i.body.indexOf(",")>=0;if(!u&&!h)return i.post.match(/,(?!,).*\}/)?F(t=i.pre+"{"+i.body+_+i.post,e,!0):[t];let c,f;if(u)c=i.body.split(/\.\./);else if(c=I(i.body),1===c.length&&void 0!==c[0]&&(c=F(c[0],e,!1).map(j),1===c.length))return o.map(t=>i.pre+c[0]+t);if(u&&void 0!==c[0]&&void 0!==c[1]){const t=O(c[0]),r=O(c[1]),n=Math.max(c[0].length,c[1].length);let i=3===c.length&&void 0!==c[2]?Math.max(Math.abs(O(c[2])),1):1,s=U;r<t&&(i*=-1,s=B);const o=c.some(W);f=[];for(let a=t;s(a,r)&&f.length<e;a+=i){let t;if(l)t=String.fromCharCode(a),"\\"===t&&(t="");else if(t=String(a),o){const e=n-t.length;if(e>0){const r=new Array(e+1).join("0");t=a<0?"-"+r+t.slice(1):r+t}}f.push(t)}}else{f=[];for(let t=0;t<c.length;t++)f.push.apply(f,F(c[t],e,!1))}for(let t=0;t<f.length;t++)for(let i=0;i<o.length&&n.length<e;i++){const e=s+f[t]+o[i];(!r||u||e)&&n.push(e)}}return n}const z=t=>{if("string"!=typeof t)throw new TypeError("invalid pattern");if(t.length>65536)throw new TypeError("pattern is too long")},$={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},G=t=>t.replace(/[[\]\\-]/g,"\\$&"),H=t=>t.join(""),q=(t,e)=>{const r=e;if("["!==t.charAt(r))throw new Error("not in a brace expression");const n=[],i=[];let s=r+1,o=!1,a=!1,l=!1,u=!1,h=r,c="";t:for(;s<t.length;){const e=t.charAt(s);if("!"!==e&&"^"!==e||s!==r+1){if("]"===e&&o&&!l){h=s+1;break}if(o=!0,"\\"!==e||l){if("["===e&&!l)for(const[e,[o,l,u]]of Object.entries($))if(t.startsWith(e,s)){if(c)return["$.",!1,t.length-r,!0];s+=e.length,u?i.push(o):n.push(o),a=a||l;continue t}l=!1,c?(e>c?n.push(G(c)+"-"+G(e)):e===c&&n.push(G(e)),c="",s++):t.startsWith("-]",s+1)?(n.push(G(e+"-")),s+=2):t.startsWith("-",s+1)?(c=e,s+=2):(n.push(G(e)),s++)}else l=!0,s++}else u=!0,s++}if(h<s)return["",!1,0,!1];if(!n.length&&!i.length)return["$.",!1,t.length-r,!0];if(0===i.length&&1===n.length&&/^\\?.$/.test(n[0])&&!u){const t=2===n[0].length?n[0].slice(-1):n[0];return[(f=t,f.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")),!1,h-r,!1]}var f;const d="["+(u?"^":"")+H(n)+"]",p="["+(u?"":"^")+H(i)+"]";return[n.length&&i.length?"("+d+"|"+p+")":n.length?d:p,a,h-r,!0]},V=(t,{windowsPathsNoEscape:e=!1,magicalBraces:r=!0}={})=>r?e?t.replace(/\[([^/\\])\]/g,"$1"):t.replace(/((?!\\).|^)\[([^/\\])\]/g,"$1$2").replace(/\\([^/])/g,"$1"):e?t.replace(/\[([^/\\{}])\]/g,"$1"):t.replace(/((?!\\).|^)\[([^/\\{}])\]/g,"$1$2").replace(/\\([^/{}])/g,"$1");var Y;const Q=/* @__PURE__ */new Set(["!","?","+","*","@"]),K=t=>Q.has(t),Z=t=>K(t.type),J=/* @__PURE__ */new Map([["!",["@"]],["?",["?","@"]],["@",["@"]],["*",["*","+","?","@"]],["+",["+","@"]]]),X=/* @__PURE__ */new Map([["!",["?"]],["@",["?"]],["+",["?","*"]]]),tt=/* @__PURE__ */new Map([["!",["?","@"]],["?",["?","@"]],["@",["?","@"]],["*",["*","+","?","@"]],["+",["+","@","?","*"]]]),et=/* @__PURE__ */new Map([["!",/* @__PURE__ */new Map([["!","@"]])],["?",
2
+ /* @__PURE__ */new Map([["*","*"],["+","*"]])],["@",
3
+ /* @__PURE__ */new Map([["!","!"],["?","?"],["@","@"],["*","*"],["+","+"]])],["+",
4
+ /* @__PURE__ */new Map([["?","*"],["*","*"]])]]),rt="(?!\\.)",nt=/* @__PURE__ */new Set(["[","."]),it=/* @__PURE__ */new Set(["..","."]),st=new Set("().*{}+?[]^$\\!"),ot=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),at="[^/]",lt=at+"*?",ut=at+"+?";let ht=0;class ct{type;#t;#e;#r=!1;#n=[];#i;#s;#o;#a=!1;#l;#u;#h=!1;id=++ht;get depth(){return(this.#i?.depth??-1)+1}[/* @__PURE__ */Symbol.for("nodejs.util.inspect.custom")](){return{"@@type":"AST",id:this.id,type:this.type,root:this.#t.id,parent:this.#i?.id,depth:this.depth,partsLength:this.#n.length,parts:this.#n}}constructor(t,e,r={}){this.type=t,t&&(this.#e=!0),this.#i=e,this.#t=this.#i?this.#i.#t:this,this.#l=this.#t===this?r:this.#t.#l,this.#o=this.#t===this?[]:this.#t.#o,"!"!==t||this.#t.#a||this.#o.push(this),this.#s=this.#i?this.#i.#n.length:0}get hasMagic(){if(void 0!==this.#e)return this.#e;for(const t of this.#n)if("string"!=typeof t&&(t.type||t.hasMagic))return this.#e=!0;return this.#e}toString(){return void 0!==this.#u?this.#u:this.type?this.#u=this.type+"("+this.#n.map(t=>String(t)).join("|")+")":this.#u=this.#n.map(t=>String(t)).join("")}#c(){if(this!==this.#t)throw new Error("should only call on root");if(this.#a)return this;let t;for(this.toString(),this.#a=!0;t=this.#o.pop();){if("!"!==t.type)continue;let e=t,r=e.#i;for(;r;){for(let n=e.#s+1;!r.type&&n<r.#n.length;n++)for(const e of t.#n){if("string"==typeof e)throw new Error("string part in extglob AST??");e.copyIn(r.#n[n])}e=r,r=e.#i}}return this}push(...t){for(const e of t)if(""!==e){if("string"!=typeof e&&!(e instanceof Y&&e.#i===this))throw new Error("invalid part: "+e);this.#n.push(e)}}toJSON(){const t=null===this.type?this.#n.slice().map(t=>"string"==typeof t?t:t.toJSON()):[this.type,...this.#n.map(t=>t.toJSON())];return this.isStart()&&!this.type&&t.unshift([]),this.isEnd()&&(this===this.#t||this.#t.#a&&"!"===this.#i?.type)&&t.push({}),t}isStart(){if(this.#t===this)return!0;if(!this.#i?.isStart())return!1;if(0===this.#s)return!0;const t=this.#i;for(let e=0;e<this.#s;e++){const r=t.#n[e];if(!(r instanceof Y&&"!"===r.type))return!1}return!0}isEnd(){if(this.#t===this)return!0;if("!"===this.#i?.type)return!0;if(!this.#i?.isEnd())return!1;if(!this.type)return this.#i?.isEnd();const t=this.#i?this.#i.#n.length:0;return this.#s===t-1}copyIn(t){"string"==typeof t?this.push(t):this.push(t.clone(this))}clone(t){const e=new Y(this.type,t);for(const r of this.#n)e.copyIn(r);return e}static#f(t,e,r,n,i){const s=n.maxExtglobRecursion??2;let o=!1,a=!1,l=-1,u=!1;if(null===e.type){let h=r,c="";for(;h<t.length;){const r=t.charAt(h++);if(o||"\\"===r){o=!o,c+=r;continue}if(a){h===l+1?"^"!==r&&"!"!==r||(u=!0):"]"!==r||h===l+2&&u||(a=!1),c+=r;continue}if("["===r){a=!0,l=h,u=!1,c+=r;continue}if(!n.noext&&K(r)&&"("===t.charAt(h)&&i<=s){e.push(c),c="";const s=new Y(r,e);h=Y.#f(t,s,h,n,i+1),e.push(s);continue}c+=r}return e.push(c),h}let h=r+1,c=new Y(null,e);const f=[];let d="";for(;h<t.length;){const r=t.charAt(h++);if(o||"\\"===r){o=!o,d+=r;continue}if(a){h===l+1?"^"!==r&&"!"!==r||(u=!0):"]"!==r||h===l+2&&u||(a=!1),d+=r;continue}if("["===r){a=!0,l=h,u=!1,d+=r;continue}if(!n.noext&&K(r)&&"("===t.charAt(h)&&(i<=s||e&&e.#d(r))){const s=e&&e.#d(r)?0:1;c.push(d),d="";const o=new Y(r,c);c.push(o),h=Y.#f(t,o,h,n,i+s);continue}if("|"!==r){if(")"===r)return""===d&&0===e.#n.length&&(e.#h=!0),c.push(d),d="",e.push(...f,c),h;d+=r}else c.push(d),d="",f.push(c),c=new Y(null,e)}return e.type=null,e.#e=void 0,e.#n=[t.substring(r-1)],h}#p(t){return this.#b(t,X)}#b(t,e=J){if(!t||"object"!=typeof t||null!==t.type||1!==t.#n.length||null===this.type)return!1;const r=t.#n[0];return!(!r||"object"!=typeof r||null===r.type)&&this.#d(r.type,e)}#d(t,e=tt){return!!e.get(this.type)?.includes(t)}#g(t,e){const r=t.#n[0],n=new Y(null,r,this.options);n.#n.push(""),r.push(n),this.#y(t,e)}#y(t,e){const r=t.#n[0];this.#n.splice(e,1,...r.#n);for(const n of r.#n)"object"==typeof n&&(n.#i=this);this.#u=void 0}#m(t){const e=et.get(this.type);return!!e?.has(t)}#_(t){if(!t||"object"!=typeof t||null!==t.type||1!==t.#n.length||null===this.type||1!==this.#n.length)return!1;const e=t.#n[0];return!(!e||"object"!=typeof e||null===e.type)&&this.#m(e.type)}#w(t){const e=et.get(this.type),r=t.#n[0],n=e?.get(r.type);if(!n)return!1;this.#n=r.#n;for(const i of this.#n)"object"==typeof i&&(i.#i=this);this.type=n,this.#u=void 0,this.#h=!1}static fromGlob(t,e={}){const r=new Y(null,void 0,e);return Y.#f(t,r,0,e,0),r}toMMPattern(){if(this!==this.#t)return this.#t.toMMPattern();const t=this.toString(),[e,r,n,i]=this.toRegExpSource();if(!(n||this.#e||this.#l.nocase&&!this.#l.nocaseMagicOnly&&t.toUpperCase()!==t.toLowerCase()))return r;const s=(this.#l.nocase?"i":"")+(i?"u":"");return Object.assign(new RegExp(`^${e}$`,s),{_src:e,_glob:t})}get options(){return this.#l}toRegExpSource(t){const e=t??!!this.#l.dot;if(this.#t===this&&(this.#S(),this.#c()),!Z(this)){const r=this.isStart()&&this.isEnd()&&!this.#n.some(t=>"string"!=typeof t),n=this.#n.map(e=>{const[n,i,s,o]="string"==typeof e?Y.#v(e,this.#e,r):e.toRegExpSource(t);return this.#e=this.#e||s,this.#r=this.#r||o,n}).join("");let i="";if(this.isStart()&&"string"==typeof this.#n[0]){if(!(1===this.#n.length&&it.has(this.#n[0]))){const r=nt,s=e&&r.has(n.charAt(0))||n.startsWith("\\.")&&r.has(n.charAt(2))||n.startsWith("\\.\\.")&&r.has(n.charAt(4)),o=!e&&!t&&r.has(n.charAt(0));i=s?"(?!(?:^|/)\\.\\.?(?:$|/))":o?rt:""}}let s="";this.isEnd()&&this.#t.#a&&"!"===this.#i?.type&&(s="(?:$|\\/)");return[i+n+s,V(n),this.#e=!!this.#e,this.#r]}const r="*"===this.type||"+"===this.type,n="!"===this.type?"(?:(?!(?:":"(?:";let i=this.#E(e);if(this.isStart()&&this.isEnd()&&!i&&"!"!==this.type){const t=this.toString(),e=this;return e.#n=[t],e.type=null,e.#e=void 0,[t,V(this.toString()),!1,!1]}let s=!r||t||e?"":this.#E(!0);s===i&&(s=""),s&&(i=`(?:${i})(?:${s})*?`);let o="";if("!"===this.type&&this.#h)o=(this.isStart()&&!e?rt:"")+ut;else{o=n+i+("!"===this.type?"))"+(!this.isStart()||e||t?"":rt)+lt+")":"@"===this.type?")":"?"===this.type?")?":"+"===this.type&&s?")":"*"===this.type&&s?")?":`)${this.type}`)}return[o,V(i),this.#e=!!this.#e,this.#r]}#S(){if(Z(this)){let t=0,e=!1;do{e=!0;for(let t=0;t<this.#n.length;t++){const r=this.#n[t];"object"==typeof r&&(r.#S(),this.#b(r)?(e=!1,this.#y(r,t)):this.#p(r)?(e=!1,this.#g(r,t)):this.#_(r)&&(e=!1,this.#w(r)))}}while(!e&&++t<10)}else for(const t of this.#n)"object"==typeof t&&t.#S();this.#u=void 0}#E(t){return this.#n.map(e=>{if("string"==typeof e)throw new Error("string type in extglob ast??");const[r,n,i,s]=e.toRegExpSource(t);return this.#r=this.#r||s,r}).filter(t=>!(this.isStart()&&this.isEnd()&&!t)).join("|")}static#v(t,e,r=!1){let n=!1,i="",s=!1,o=!1;for(let a=0;a<t.length;a++){const l=t.charAt(a);if(n)n=!1,i+=(st.has(l)?"\\":"")+l;else if("*"!==l)if(o=!1,"\\"!==l){if("["===l){const[r,n,o,l]=q(t,a);if(o){i+=r,s=s||n,a+=o-1,e=e||l;continue}}"?"!==l?i+=ot(l):(i+=at,e=!0)}else a===t.length-1?i+="\\\\":n=!0;else{if(o)continue;o=!0,i+=r&&/^[*]+$/.test(t)?ut:lt,e=!0}}return[i,V(t),!!e,s]}}Y=ct;const ft=(t,e,r={})=>(z(e),!(!r.nocomment&&"#"===e.charAt(0))&&new Wt(e,r).match(t)),dt=/^\*+([^+@!?*[(]*)$/,pt=t=>e=>!e.startsWith(".")&&e.endsWith(t),bt=t=>e=>e.endsWith(t),gt=t=>(t=t.toLowerCase(),e=>!e.startsWith(".")&&e.toLowerCase().endsWith(t)),yt=t=>(t=t.toLowerCase(),e=>e.toLowerCase().endsWith(t)),mt=/^\*+\.\*+$/,_t=t=>!t.startsWith(".")&&t.includes("."),wt=t=>"."!==t&&".."!==t&&t.includes("."),St=/^\.\*+$/,vt=t=>"."!==t&&".."!==t&&t.startsWith("."),Et=/^\*+$/,xt=t=>0!==t.length&&!t.startsWith("."),kt=t=>0!==t.length&&"."!==t&&".."!==t,Tt=/^\?+([^+@!?*[(]*)?$/,Rt=([t,e=""])=>{const r=Nt([t]);return e?(e=e.toLowerCase(),t=>r(t)&&t.toLowerCase().endsWith(e)):r},At=([t,e=""])=>{const r=Dt([t]);return e?(e=e.toLowerCase(),t=>r(t)&&t.toLowerCase().endsWith(e)):r},Lt=([t,e=""])=>{const r=Dt([t]);return e?t=>r(t)&&t.endsWith(e):r},Mt=([t,e=""])=>{const r=Nt([t]);return e?t=>r(t)&&t.endsWith(e):r},Nt=([t])=>{const e=t.length;return t=>t.length===e&&!t.startsWith(".")},Dt=([t])=>{const e=t.length;return t=>t.length===e&&"."!==t&&".."!==t},Ot="object"==typeof process&&process?"object"==typeof process.env&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix";ft.sep="win32"===Ot?{sep:"\\"}.sep:{sep:"/"}.sep;const Pt=/* @__PURE__ */Symbol("globstar **");ft.GLOBSTAR=Pt;ft.filter=(t,e={})=>r=>ft(r,t,e);const It=(t,e={})=>Object.assign({},t,e);ft.defaults=t=>{if(!t||"object"!=typeof t||!Object.keys(t).length)return ft;const e=ft;return Object.assign((r,n,i={})=>e(r,n,It(t,i)),{Minimatch:class extends e.Minimatch{constructor(e,r={}){super(e,It(t,r))}static defaults(r){return e.defaults(It(t,r)).Minimatch}},AST:class extends e.AST{constructor(e,r,n={}){super(e,r,It(t,n))}static fromGlob(r,n={}){return e.AST.fromGlob(r,It(t,n))}},unescape:(r,n={})=>e.unescape(r,It(t,n)),escape:(r,n={})=>e.escape(r,It(t,n)),filter:(r,n={})=>e.filter(r,It(t,n)),defaults:r=>e.defaults(It(t,r)),makeRe:(r,n={})=>e.makeRe(r,It(t,n)),braceExpand:(r,n={})=>e.braceExpand(r,It(t,n)),match:(r,n,i={})=>e.match(r,n,It(t,i)),sep:e.sep,GLOBSTAR:Pt})};const Ct=(t,e={})=>(z(t),e.nobrace||!/\{(?:(?!\{).)*\}/.test(t)?[t]:C(t,{max:e.braceExpandMax}));ft.braceExpand=Ct;ft.makeRe=(t,e={})=>new Wt(t,e).makeRe();ft.match=(t,e,r={})=>{const n=new Wt(e,r);return t=t.filter(t=>n.match(t)),n.options.nonull&&!t.length&&t.push(e),t};const jt=/[?*]|[+@!]\(.*?\)|\[|\]/;class Wt{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;maxGlobstarRecursion;regexp;constructor(t,e={}){z(t),e=e||{},this.options=e,this.maxGlobstarRecursion=e.maxGlobstarRecursion??200,this.pattern=t,this.platform=e.platform||Ot,this.isWindows="win32"===this.platform;this.windowsPathsNoEscape=!!e.windowsPathsNoEscape||!1===e.allowWindowsEscape,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!e.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!e.nonegate,this.comment=!1,this.empty=!1,this.partial=!!e.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=void 0!==e.windowsNoMagicRoot?e.windowsNoMagicRoot:!(!this.isWindows||!this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(const t of this.set)for(const e of t)if("string"!=typeof e)return!0;return!1}debug(...t){}make(){const t=this.pattern,e=this.options;if(!e.nocomment&&"#"===t.charAt(0))return void(this.comment=!0);if(!t)return void(this.empty=!0);this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],e.debug&&(this.debug=(...t)=>console.error(...t)),this.debug(this.pattern,this.globSet);const r=this.globSet.map(t=>this.slashSplit(t));this.globParts=this.preprocess(r),this.debug(this.pattern,this.globParts);let n=this.globParts.map((t,e,r)=>{if(this.isWindows&&this.windowsNoMagicRoot){const e=!(""!==t[0]||""!==t[1]||"?"!==t[2]&&jt.test(t[2])||jt.test(t[3])),r=/^[a-z]:/i.test(t[0]);if(e)return[...t.slice(0,4),...t.slice(4).map(t=>this.parse(t))];if(r)return[t[0],...t.slice(1).map(t=>this.parse(t))]}return t.map(t=>this.parse(t))});if(this.debug(this.pattern,n),this.set=n.filter(t=>-1===t.indexOf(!1)),this.isWindows)for(let i=0;i<this.set.length;i++){const t=this.set[i];""===t[0]&&""===t[1]&&"?"===this.globParts[i][2]&&"string"==typeof t[3]&&/^[a-z]:$/i.test(t[3])&&(t[2]="?")}this.debug(this.pattern,this.set)}preprocess(t){if(this.options.noglobstar)for(const r of t)for(let t=0;t<r.length;t++)"**"===r[t]&&(r[t]="*");const{optimizationLevel:e=1}=this.options;return e>=2?(t=this.firstPhasePreProcess(t),t=this.secondPhasePreProcess(t)):t=e>=1?this.levelOneOptimize(t):this.adjascentGlobstarOptimize(t),t}adjascentGlobstarOptimize(t){return t.map(t=>{let e=-1;for(;-1!==(e=t.indexOf("**",e+1));){let r=e;for(;"**"===t[r+1];)r++;r!==e&&t.splice(e,r-e)}return t})}levelOneOptimize(t){return t.map(t=>0===(t=t.reduce((t,e)=>{const r=t[t.length-1];return"**"===e&&"**"===r?t:".."===e&&r&&".."!==r&&"."!==r&&"**"!==r?(t.pop(),t):(t.push(e),t)},[])).length?[""]:t)}levelTwoFileOptimize(t){Array.isArray(t)||(t=this.slashSplit(t));let e=!1;do{if(e=!1,!this.preserveMultipleSlashes){for(let r=1;r<t.length-1;r++){const n=t[r];1===r&&""===n&&""===t[0]||("."!==n&&""!==n||(e=!0,t.splice(r,1),r--))}"."!==t[0]||2!==t.length||"."!==t[1]&&""!==t[1]||(e=!0,t.pop())}let r=0;for(;-1!==(r=t.indexOf("..",r+1));){const n=t[r-1];!n||"."===n||".."===n||"**"===n||this.isWindows&&/^[a-z]:$/i.test(n)||(e=!0,t.splice(r-1,2),r-=2)}}while(e);return 0===t.length?[""]:t}firstPhasePreProcess(t){let e=!1;do{e=!1;for(let r of t){let n=-1;for(;-1!==(n=r.indexOf("**",n+1));){let i=n;for(;"**"===r[i+1];)i++;i>n&&r.splice(n+1,i-n);let s=r[n+1];const o=r[n+2],a=r[n+3];if(".."!==s)continue;if(!o||"."===o||".."===o||!a||"."===a||".."===a)continue;e=!0,r.splice(n,1);const l=r.slice(0);l[n]="**",t.push(l),n--}if(!this.preserveMultipleSlashes){for(let t=1;t<r.length-1;t++){const n=r[t];1===t&&""===n&&""===r[0]||("."!==n&&""!==n||(e=!0,r.splice(t,1),t--))}"."!==r[0]||2!==r.length||"."!==r[1]&&""!==r[1]||(e=!0,r.pop())}let i=0;for(;-1!==(i=r.indexOf("..",i+1));){const t=r[i-1];if(t&&"."!==t&&".."!==t&&"**"!==t){e=!0;const t=1===i&&"**"===r[i+1]?["."]:[];r.splice(i-1,2,...t),0===r.length&&r.push(""),i-=2}}}}while(e);return t}secondPhasePreProcess(t){for(let e=0;e<t.length-1;e++)for(let r=e+1;r<t.length;r++){const n=this.partsMatch(t[e],t[r],!this.preserveMultipleSlashes);if(n){t[e]=[],t[r]=n;break}}return t.filter(t=>t.length)}partsMatch(t,e,r=!1){let n=0,i=0,s=[],o="";for(;n<t.length&&i<e.length;)if(t[n]===e[i])s.push("b"===o?e[i]:t[n]),n++,i++;else if(r&&"**"===t[n]&&e[i]===t[n+1])s.push(t[n]),n++;else if(r&&"**"===e[i]&&t[n]===e[i+1])s.push(e[i]),i++;else if("*"!==t[n]||!e[i]||!this.options.dot&&e[i].startsWith(".")||"**"===e[i]){if("*"!==e[i]||!t[n]||!this.options.dot&&t[n].startsWith(".")||"**"===t[n])return!1;if("a"===o)return!1;o="b",s.push(e[i]),n++,i++}else{if("b"===o)return!1;o="a",s.push(t[n]),n++,i++}return t.length===e.length&&s}parseNegate(){if(this.nonegate)return;const t=this.pattern;let e=!1,r=0;for(let n=0;n<t.length&&"!"===t.charAt(n);n++)e=!e,r++;r&&(this.pattern=t.slice(r)),this.negate=e}matchOne(t,e,r=!1){let n=0,i=0;if(this.isWindows){const r="string"==typeof t[0]&&/^[a-z]:$/i.test(t[0]),s=!r&&""===t[0]&&""===t[1]&&"?"===t[2]&&/^[a-z]:$/i.test(t[3]),o="string"==typeof e[0]&&/^[a-z]:$/i.test(e[0]),a=s?3:r?0:void 0,l=!o&&""===e[0]&&""===e[1]&&"?"===e[2]&&"string"==typeof e[3]&&/^[a-z]:$/i.test(e[3])?3:o?0:void 0;if("number"==typeof a&&"number"==typeof l){const[r,s]=[t[a],e[l]];r.toLowerCase()===s.toLowerCase()&&(e[l]=r,i=l,n=a)}}const{optimizationLevel:s=1}=this.options;return s>=2&&(t=this.levelTwoFileOptimize(t)),e.includes(Pt)?this.#x(t,e,r,n,i):this.#k(t,e,r,n,i)}#x(t,e,r,n,i){const s=e.indexOf(Pt,i),o=e.lastIndexOf(Pt),[a,l,u]=r?[e.slice(i,s),e.slice(s+1),[]]:[e.slice(i,s),e.slice(s+1,o),e.slice(o+1)];if(a.length){const e=t.slice(n,n+a.length);if(!this.#k(e,a,r,0,0))return!1;n+=a.length,i+=a.length}let h=0;if(u.length){if(u.length+n>t.length)return!1;let e=t.length-u.length;if(this.#k(t,u,r,e,0))h=u.length;else{if(""!==t[t.length-1]||n+u.length===t.length)return!1;if(e--,!this.#k(t,u,r,e,0))return!1;h=u.length+1}}if(!l.length){let e=!!h;for(let r=n;r<t.length-h;r++){const n=String(t[r]);if(e=!0,"."===n||".."===n||!this.options.dot&&n.startsWith("."))return!1}return r||e}const c=[[[],0]];let f=c[0],d=0;const p=[0];for(const y of l)y===Pt?(p.push(d),f=[[],0],c.push(f)):(f[0].push(y),d++);let b=c.length-1;const g=t.length-h;for(const y of c)y[1]=g-(p[b--]+y[0].length);return!!this.#T(t,c,n,0,r,0,!!h)}#T(t,e,r,n,i,s,o){const a=e[n];if(!a){for(let e=r;e<t.length;e++){o=!0;const r=t[e];if("."===r||".."===r||!this.options.dot&&r.startsWith("."))return!1}return o}const[l,u]=a;for(;r<=u;){if(this.#k(t.slice(0,r+l.length),l,i,r,0)&&s<this.maxGlobstarRecursion){const a=this.#T(t,e,r+l.length,n+1,i,s+1,o);if(!1!==a)return a}const a=t[r];if("."===a||".."===a||!this.options.dot&&a.startsWith("."))return!1;r++}return i||null}#k(t,e,r,n,i){let s,o,a,l;for(s=n,o=i,l=t.length,a=e.length;s<l&&o<a;s++,o++){this.debug("matchOne loop");let r,n=e[o],i=t[s];if(this.debug(e,n,i),!1===n||n===Pt)return!1;if("string"==typeof n?(r=i===n,this.debug("string match",n,i,r)):(r=n.test(i),this.debug("pattern match",n,i,r)),!r)return!1}if(s===l&&o===a)return!0;if(s===l)return r;if(o===a)return s===l-1&&""===t[s];throw new Error("wtf?")}braceExpand(){return Ct(this.pattern,this.options)}parse(t){z(t);const e=this.options;if("**"===t)return Pt;if(""===t)return"";let r,n=null;(r=t.match(Et))?n=e.dot?kt:xt:(r=t.match(dt))?n=(e.nocase?e.dot?yt:gt:e.dot?bt:pt)(r[1]):(r=t.match(Tt))?n=(e.nocase?e.dot?At:Rt:e.dot?Lt:Mt)(r):(r=t.match(mt))?n=e.dot?wt:_t:(r=t.match(St))&&(n=vt);const i=ct.fromGlob(t,this.options).toMMPattern();return n&&"object"==typeof i&&Reflect.defineProperty(i,"test",{value:n}),i}makeRe(){if(this.regexp||!1===this.regexp)return this.regexp;const t=this.set;if(!t.length)return this.regexp=!1,this.regexp;const e=this.options,r=e.noglobstar?"[^/]*?":e.dot?"(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?":"(?:(?!(?:\\/|^)\\.).)*?",n=new Set(e.nocase?["i"]:[]);let i=t.map(t=>{const e=t.map(t=>{if(t instanceof RegExp)for(const e of t.flags.split(""))n.add(e);return"string"==typeof t?t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"):t===Pt?Pt:t._src});e.forEach((t,n)=>{const i=e[n+1],s=e[n-1];t===Pt&&s!==Pt&&(void 0===s?void 0!==i&&i!==Pt?e[n+1]="(?:\\/|"+r+"\\/)?"+i:e[n]=r:void 0===i?e[n-1]=s+"(?:\\/|\\/"+r+")?":i!==Pt&&(e[n-1]=s+"(?:\\/|\\/"+r+"\\/)"+i,e[n+1]=Pt))});const i=e.filter(t=>t!==Pt);if(this.partial&&i.length>=1){const t=[];for(let e=1;e<=i.length;e++)t.push(i.slice(0,e).join("/"));return"(?:"+t.join("|")+")"}return i.join("/")}).join("|");const[s,o]=t.length>1?["(?:",")"]:["",""];i="^"+s+i+o+"$",this.partial&&(i="^(?:\\/|"+s+i.slice(1,-1)+o+")$"),this.negate&&(i="^(?!"+i+").+$");try{this.regexp=new RegExp(i,[...n].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(t){return this.preserveMultipleSlashes?t.split("/"):this.isWindows&&/^\/\/[^/]+/.test(t)?["",...t.split(/\/+/)]:t.split(/\/+/)}match(t,e=this.partial){if(this.debug("match",t,this.pattern),this.comment)return!1;if(this.empty)return""===t;if("/"===t&&e)return!0;const r=this.options;this.isWindows&&(t=t.split("\\").join("/"));const n=this.slashSplit(t);this.debug(this.pattern,"split",n);const i=this.set;this.debug(this.pattern,"set",i);let s=n[n.length-1];if(!s)for(let o=n.length-2;!s&&o>=0;o--)s=n[o];for(const o of i){let t=n;r.matchBase&&1===o.length&&(t=[s]);if(this.matchOne(t,o,e))return!!r.flipNegate||!this.negate}return!r.flipNegate&&this.negate}static defaults(t){return ft.defaults(t).Minimatch}}function Ut(e,r){return new Promise(n=>{(r?t.stat:t.lstat)(e,(t,i)=>{if(t)if("ENOENT"===t.code)n(r?Ut(e,!1):null);else n(null);else n(i)})})}async function*Bt(e,r,n,i,s,o){let a=await function(e,r){return new Promise((n,i)=>{t.readdir(e,{withFileTypes:!0},(t,e)=>{if(t)switch(t.code){case"ENOTDIR":r?i(t):n([]);break;case"ENOTSUP":case"ENOENT":case"ENAMETOOLONG":case"UNKNOWN":n([]);break;default:i(t)}else n(e)})})}(r+e,o);for(const t of a){const o=e+"/"+t.name,a=o.slice(1),l=r+"/"+a;let u=t;(i||n)&&(u=await Ut(l,n)??u),u.isDirectory()?s(a)||(yield{relative:a,absolute:l,stat:u},yield*Bt(o,r,n,i,s,!1)):yield{relative:a,absolute:l,stat:u}}}ft.AST=ct,ft.Minimatch=Wt,ft.escape=(t,{windowsPathsNoEscape:e=!1,magicalBraces:r=!1}={})=>r?e?t.replace(/[?*()[\]{}]/g,"[$&]"):t.replace(/[?*()[\]\\{}]/g,"\\$&"):e?t.replace(/[?*()[\]]/g,"[$&]"):t.replace(/[?*()[\]\\]/g,"\\$&"),ft.unescape=V;var Ft=class extends o{options;matchers;ignoreMatchers;skipMatchers;paused;aborted;inactive;iterator;constructor(t,e,r){if(super(),"function"==typeof e&&(r=e,e=void 0),this.options=function(t){return{pattern:t.pattern,dot:!!t.dot,noglobstar:!!t.noglobstar,matchBase:!!t.matchBase,nocase:!!t.nocase,ignore:t.ignore,skip:t.skip,follow:!!t.follow,stat:!!t.stat,nodir:!!t.nodir,mark:!!t.mark,silent:!!t.silent,absolute:!!t.absolute}}(e||{}),this.matchers=[],this.options.pattern){const t=Array.isArray(this.options.pattern)?this.options.pattern:[this.options.pattern];this.matchers=t.map(t=>new Wt(t,{dot:this.options.dot,noglobstar:this.options.noglobstar,matchBase:this.options.matchBase,nocase:this.options.nocase}))}if(this.ignoreMatchers=[],this.options.ignore){const t=Array.isArray(this.options.ignore)?this.options.ignore:[this.options.ignore];this.ignoreMatchers=t.map(t=>new Wt(t,{dot:!0}))}if(this.skipMatchers=[],this.options.skip){const t=Array.isArray(this.options.skip)?this.options.skip:[this.options.skip];this.skipMatchers=t.map(t=>new Wt(t,{dot:!0}))}if(this.iterator=async function*(t,e,r,n){yield*Bt("",t,e,r,n,!0)}(a(t||"."),this.options.follow,this.options.stat,this._shouldSkipDirectory.bind(this)),this.paused=!1,this.inactive=!1,this.aborted=!1,r){const t=r,e=[];this.on("match",t=>e.push(this.options.absolute?t.absolute:t.relative)),this.on("error",e=>t(e)),this.on("end",()=>t(null,e))}setTimeout(()=>this._next())}_shouldSkipDirectory(t){return this.skipMatchers.some(e=>e.match(t))}_fileMatches(t,e){const r=t+(e?"/":"");return(0===this.matchers.length||this.matchers.some(t=>t.match(r)))&&!this.ignoreMatchers.some(t=>t.match(r))&&(!this.options.nodir||!e)}_next(){this.paused||this.aborted?this.inactive=!0:this.iterator.next().then(t=>{if(t.done)this.emit("end");else{const e=t.value.stat.isDirectory();if(this._fileMatches(t.value.relative,e)){let r=t.value.relative,n=t.value.absolute;this.options.mark&&e&&(r+="/",n+="/"),this.options.stat?this.emit("match",{relative:r,absolute:n,stat:t.value.stat}):this.emit("match",{relative:r,absolute:n})}this._next()}}).catch(t=>{this.abort(),this.emit("error",t),t.code||this.options.silent||console.error(t)})}abort(){this.aborted=!0}pause(){this.paused=!0}resume(){this.paused=!1,this.inactive&&(this.inactive=!1,this._next())}};const zt=(t,e,r)=>new Ft(t,e,r);zt.ReaddirGlob=Ft;var $t=zt,Gt="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function Ht(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var qt,Vt,Yt,Qt,Kt,Zt={exports:{}},Jt={exports:{}};function Xt(){if(qt)return Jt.exports;return qt=1,"undefined"==typeof process||!process.version||0===process.version.indexOf("v0.")||0===process.version.indexOf("v1.")&&0!==process.version.indexOf("v1.8.")?Jt.exports={nextTick:function(t,e,r,n){if("function"!=typeof t)throw new TypeError('"callback" argument must be a function');var i,s,o=arguments.length;switch(o){case 0:case 1:return process.nextTick(t);case 2:return process.nextTick(function(){t.call(null,e)});case 3:return process.nextTick(function(){t.call(null,e,r)});case 4:return process.nextTick(function(){t.call(null,e,r,n)});default:for(i=new Array(o-1),s=0;s<i.length;)i[s++]=arguments[s];return process.nextTick(function(){t.apply(null,i)})}}}:Jt.exports=process,Jt.exports}function te(){return Kt?Qt:(Kt=1,Qt=s.EventEmitter)}var ee,re={exports:{}};function ne(){return ee||(ee=1,function(t,e){var r=c,n=r.Buffer;function i(t,e){for(var r in t)e[r]=t[r]}function s(t,e,r){return n(t,e,r)}n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow?t.exports=r:(i(r,e),e.Buffer=s),i(n,s),s.from=function(t,e,r){if("number"==typeof t)throw new TypeError("Argument must not be a number");return n(t,e,r)},s.alloc=function(t,e,r){if("number"!=typeof t)throw new TypeError("Argument must be a number");var i=n(t);return void 0!==e?"string"==typeof r?i.fill(e,r):i.fill(e):i.fill(0),i},s.allocUnsafe=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return n(t)},s.allocUnsafeSlow=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return r.SlowBuffer(t)}}(re,re.exports)),re.exports}var ie,se={};function oe(){if(ie)return se;function t(t){return Object.prototype.toString.call(t)}return ie=1,se.isArray=function(e){return Array.isArray?Array.isArray(e):"[object Array]"===t(e)},se.isBoolean=function(t){return"boolean"==typeof t},se.isNull=function(t){return null===t},se.isNullOrUndefined=function(t){return null==t},se.isNumber=function(t){return"number"==typeof t},se.isString=function(t){return"string"==typeof t},se.isSymbol=function(t){return"symbol"==typeof t},se.isUndefined=function(t){return void 0===t},se.isRegExp=function(e){return"[object RegExp]"===t(e)},se.isObject=function(t){return"object"==typeof t&&null!==t},se.isDate=function(e){return"[object Date]"===t(e)},se.isError=function(e){return"[object Error]"===t(e)||e instanceof Error},se.isFunction=function(t){return"function"==typeof t},se.isPrimitive=function(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||void 0===t},se.isBuffer=c.Buffer.isBuffer,se}var ae,le={exports:{}};function ue(){return ae||(ae=1,"function"==typeof Object.create?le.exports=function(t,e){e&&(t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:le.exports=function(t,e){if(e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}}),le.exports}var he,ce,fe,de,pe,be,ge,ye,me,_e={exports:{}};function we(){return he||(he=1,function(t){var e=ne().Buffer,r=h;function n(t,e,r){t.copy(e,r)}t.exports=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.head=null,this.tail=null,this.length=0}return t.prototype.push=function(t){var e={data:t,next:null};this.length>0?this.tail.next=e:this.head=e,this.tail=e,++this.length},t.prototype.unshift=function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length},t.prototype.shift=function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}},t.prototype.clear=function(){this.head=this.tail=null,this.length=0},t.prototype.join=function(t){if(0===this.length)return"";for(var e=this.head,r=""+e.data;e=e.next;)r+=t+e.data;return r},t.prototype.concat=function(t){if(0===this.length)return e.alloc(0);for(var r=e.allocUnsafe(t>>>0),i=this.head,s=0;i;)n(i.data,r,s),s+=i.data.length,i=i.next;return r},t}(),r&&r.inspect&&r.inspect.custom&&(t.exports.prototype[r.inspect.custom]=function(){var t=r.inspect({length:this.length});return this.constructor.name+" "+t})}(_e)),_e.exports}function Se(){if(fe)return ce;fe=1;var t=Xt();function e(t,e){t.emit("error",e)}return ce={destroy:function(r,n){var i=this,s=this._readableState&&this._readableState.destroyed,o=this._writableState&&this._writableState.destroyed;return s||o?(n?n(r):r&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,t.nextTick(e,this,r)):t.nextTick(e,this,r)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(r||null,function(r){!n&&r?i._writableState?i._writableState.errorEmitted||(i._writableState.errorEmitted=!0,t.nextTick(e,i,r)):t.nextTick(e,i,r):n&&n(r)}),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}}function ve(){if(pe)return de;function t(t){try{if(!Gt.localStorage)return!1}catch(r){return!1}var e=Gt.localStorage[t];return null!=e&&"true"===String(e).toLowerCase()}return pe=1,de=function(e,r){if(t("noDeprecation"))return e;var n=!1;return function(){if(!n){if(t("throwDeprecation"))throw new Error(r);t("traceDeprecation")&&console.trace(r),n=!0}return e.apply(this,arguments)}},de}function Ee(){if(ge)return be;ge=1;var t=Xt();function e(t){var e=this;this.next=null,this.entry=null,this.finish=function(){!function(t,e,r){var n=t.entry;t.entry=null;for(;n;){var i=n.callback;e.pendingcb--,i(r),n=n.next}e.corkedRequestsFree.next=t}(e,t)}}be=d;var r,n=!process.browser&&["v0.10","v0.9."].indexOf(process.version.slice(0,5))>-1?setImmediate:t.nextTick;d.WritableState=f;var i=Object.create(oe());i.inherits=ue();var s={deprecate:ve()},o=te(),a=ne().Buffer,l=(void 0!==Gt?Gt:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){};var u,h=Se();function c(){}function f(i,s){r=r||xe(),i=i||{};var o=s instanceof r;this.objectMode=!!i.objectMode,o&&(this.objectMode=this.objectMode||!!i.writableObjectMode);var a=i.highWaterMark,l=i.writableHighWaterMark,u=this.objectMode?16:16384;this.highWaterMark=a||0===a?a:o&&(l||0===l)?l:u,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var h=!1===i.decodeStrings;this.decodeStrings=!h,this.defaultEncoding=i.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,r){var i=e._writableState,s=i.sync,o=i.writecb;if(function(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}(i),r)!function(e,r,n,i,s){--r.pendingcb,n?(t.nextTick(s,i),t.nextTick(_,e,r),e._writableState.errorEmitted=!0,e.emit("error",i)):(s(i),e._writableState.errorEmitted=!0,e.emit("error",i),_(e,r))}(e,i,s,r,o);else{var a=y(i);a||i.corked||i.bufferProcessing||!i.bufferedRequest||g(e,i),s?n(b,e,i,a,o):b(e,i,a,o)}}(s,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new e(this)}function d(t){if(r=r||xe(),!(u.call(d,this)||this instanceof r))return new d(t);this._writableState=new f(t,this),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final)),o.call(this)}function p(t,e,r,n,i,s,o){e.writelen=n,e.writecb=o,e.writing=!0,e.sync=!0,r?t._writev(i,e.onwrite):t._write(i,s,e.onwrite),e.sync=!1}function b(t,e,r,n){r||function(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}(t,e),e.pendingcb--,n(),_(t,e)}function g(t,r){r.bufferProcessing=!0;var n=r.bufferedRequest;if(t._writev&&n&&n.next){var i=r.bufferedRequestCount,s=new Array(i),o=r.corkedRequestsFree;o.entry=n;for(var a=0,l=!0;n;)s[a]=n,n.isBuf||(l=!1),n=n.next,a+=1;s.allBuffers=l,p(t,r,!0,r.length,s,"",o.finish),r.pendingcb++,r.lastBufferedRequest=null,o.next?(r.corkedRequestsFree=o.next,o.next=null):r.corkedRequestsFree=new e(r),r.bufferedRequestCount=0}else{for(;n;){var u=n.chunk,h=n.encoding,c=n.callback;if(p(t,r,!1,r.objectMode?1:u.length,u,h,c),n=n.next,r.bufferedRequestCount--,r.writing)break}null===n&&(r.lastBufferedRequest=null)}r.bufferedRequest=n,r.bufferProcessing=!1}function y(t){return t.ending&&0===t.length&&null===t.bufferedRequest&&!t.finished&&!t.writing}function m(t,e){t._final(function(r){e.pendingcb--,r&&t.emit("error",r),e.prefinished=!0,t.emit("prefinish"),_(t,e)})}function _(e,r){var n=y(r);return n&&(!function(e,r){r.prefinished||r.finalCalled||("function"==typeof e._final?(r.pendingcb++,r.finalCalled=!0,t.nextTick(m,e,r)):(r.prefinished=!0,e.emit("prefinish")))}(e,r),0===r.pendingcb&&(r.finished=!0,e.emit("finish"))),n}return i.inherits(d,o),f.prototype.getBuffer=function(){for(var t=this.bufferedRequest,e=[];t;)e.push(t),t=t.next;return e},function(){try{Object.defineProperty(f.prototype,"buffer",{get:s.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(t){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(u=Function.prototype[Symbol.hasInstance],Object.defineProperty(d,Symbol.hasInstance,{value:function(t){return!!u.call(this,t)||this===d&&(t&&t._writableState instanceof f)}})):u=function(t){return t instanceof this},d.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},d.prototype.write=function(e,r,n){var i,s=this._writableState,o=!1,u=!s.objectMode&&(i=e,a.isBuffer(i)||i instanceof l);return u&&!a.isBuffer(e)&&(e=function(t){return a.from(t)}(e)),"function"==typeof r&&(n=r,r=null),u?r="buffer":r||(r=s.defaultEncoding),"function"!=typeof n&&(n=c),s.ended?function(e,r){var n=new Error("write after end");e.emit("error",n),t.nextTick(r,n)}(this,n):(u||function(e,r,n,i){var s=!0,o=!1;return null===n?o=new TypeError("May not write null values to stream"):"string"==typeof n||void 0===n||r.objectMode||(o=new TypeError("Invalid non-string/buffer chunk")),o&&(e.emit("error",o),t.nextTick(i,o),s=!1),s}(this,s,e,n))&&(s.pendingcb++,o=function(t,e,r,n,i,s){if(!r){var o=function(t,e,r){t.objectMode||!1===t.decodeStrings||"string"!=typeof e||(e=a.from(e,r));return e}(e,n,i);n!==o&&(r=!0,i="buffer",n=o)}var l=e.objectMode?1:n.length;e.length+=l;var u=e.length<e.highWaterMark;u||(e.needDrain=!0);if(e.writing||e.corked){var h=e.lastBufferedRequest;e.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:s,next:null},h?h.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else p(t,e,!1,l,n,i,s);return u}(this,s,u,e,r,n)),o},d.prototype.cork=function(){this._writableState.corked++},d.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,t.writing||t.corked||t.bufferProcessing||!t.bufferedRequest||g(this,t))},d.prototype.setDefaultEncoding=function(t){if("string"==typeof t&&(t=t.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(d.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),d.prototype._write=function(t,e,r){r(new Error("_write() is not implemented"))},d.prototype._writev=null,d.prototype.end=function(e,r,n){var i=this._writableState;"function"==typeof e?(n=e,e=null,r=null):"function"==typeof r&&(n=r,r=null),null!=e&&this.write(e,r),i.corked&&(i.corked=1,this.uncork()),i.ending||function(e,r,n){r.ending=!0,_(e,r),n&&(r.finished?t.nextTick(n):e.once("finish",n));r.ended=!0,e.writable=!1}(this,i,n)},Object.defineProperty(d.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),d.prototype.destroy=h.destroy,d.prototype._undestroy=h.undestroy,d.prototype._destroy=function(t,e){this.end(),e(t)},be}function xe(){if(me)return ye;me=1;var t=Xt(),e=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};ye=l;var r=Object.create(oe());r.inherits=ue();var n=Ue(),i=Ee();r.inherits(l,n);for(var s=e(i.prototype),o=0;o<s.length;o++){var a=s[o];l.prototype[a]||(l.prototype[a]=i.prototype[a])}function l(t){if(!(this instanceof l))return new l(t);n.call(this,t),i.call(this,t),t&&!1===t.readable&&(this.readable=!1),t&&!1===t.writable&&(this.writable=!1),this.allowHalfOpen=!0,t&&!1===t.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",u)}function u(){this.allowHalfOpen||this._writableState.ended||t.nextTick(h,this)}function h(t){t.end()}return Object.defineProperty(l.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(l.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(t){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=t,this._writableState.destroyed=t)}}),l.prototype._destroy=function(e,r){this.push(null),this.end(),t.nextTick(r,e)},ye}var ke,Te,Re,Ae,Le,Me,Ne,De,Oe,Pe,Ie,Ce,je={};function We(){if(ke)return je;ke=1;var t=ne().Buffer,e=t.isEncoding||function(t){switch((t=""+t)&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function r(r){var n;switch(this.encoding=function(r){var n=function(t){if(!t)return"utf8";for(var e;;)switch(t){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}(r);if("string"!=typeof n&&(t.isEncoding===e||!e(r)))throw new Error("Unknown encoding: "+r);return n||r}(r),this.encoding){case"utf16le":this.text=s,this.end=o,n=4;break;case"utf8":this.fillLast=i,n=4;break;case"base64":this.text=a,this.end=l,n=3;break;default:return this.write=u,void(this.end=h)}this.lastNeed=0,this.lastTotal=0,this.lastChar=t.allocUnsafe(n)}function n(t){return t<=127?0:t>>5==6?2:t>>4==14?3:t>>3==30?4:t>>6==2?-1:-2}function i(t){var e=this.lastTotal-this.lastNeed,r=function(t,e){if(128!=(192&e[0]))return t.lastNeed=0,"�";if(t.lastNeed>1&&e.length>1){if(128!=(192&e[1]))return t.lastNeed=1,"�";if(t.lastNeed>2&&e.length>2&&128!=(192&e[2]))return t.lastNeed=2,"�"}}(this,t);return void 0!==r?r:this.lastNeed<=t.length?(t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(t.copy(this.lastChar,e,0,t.length),void(this.lastNeed-=t.length))}function s(t,e){if((t.length-e)%2==0){var r=t.toString("utf16le",e);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function o(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,r)}return e}function a(t,e){var r=(t.length-e)%3;return 0===r?t.toString("base64",e):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-r))}function l(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function u(t){return t.toString(this.encoding)}function h(t){return t&&t.length?this.write(t):""}return je.StringDecoder=r,r.prototype.write=function(t){if(0===t.length)return"";var e,r;if(this.lastNeed){if(void 0===(e=this.fillLast(t)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<t.length?e?e+this.text(t,r):this.text(t,r):e||""},r.prototype.end=function(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"�":e},r.prototype.text=function(t,e){var r=function(t,e,r){var i=e.length-1;if(i<r)return 0;var s=n(e[i]);if(s>=0)return s>0&&(t.lastNeed=s-1),s;if(--i<r||-2===s)return 0;if(s=n(e[i]),s>=0)return s>0&&(t.lastNeed=s-2),s;if(--i<r||-2===s)return 0;if(s=n(e[i]),s>=0)return s>0&&(2===s?s=0:t.lastNeed=s-3),s;return 0}(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=r;var i=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,i),t.toString("utf8",e,i)},r.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length},je}function Ue(){if(Re)return Te;Re=1;var t=Xt();Te=y;var e,r=function(){if(Yt)return Vt;Yt=1;var t={}.toString;return Vt=Array.isArray||function(e){return"[object Array]"==t.call(e)}}();y.ReadableState=g,s.EventEmitter;var n=function(t,e){return t.listeners(e).length},i=te(),o=ne().Buffer,a=(void 0!==Gt?Gt:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){};var l=Object.create(oe());l.inherits=ue();var u=h,c=void 0;c=u&&u.debuglog?u.debuglog("stream"):function(){};var f,d=we(),p=Se();l.inherits(y,i);var b=["error","close","destroy","pause","resume"];function g(t,r){t=t||{};var n=r instanceof(e=e||xe());this.objectMode=!!t.objectMode,n&&(this.objectMode=this.objectMode||!!t.readableObjectMode);var i=t.highWaterMark,s=t.readableHighWaterMark,o=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:n&&(s||0===s)?s:o,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new d,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(f||(f=We().StringDecoder),this.decoder=new f(t.encoding),this.encoding=t.encoding)}function y(t){if(e=e||xe(),!(this instanceof y))return new y(t);this._readableState=new g(t,this),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),i.call(this)}function m(t,e,r,n,i){var s,l=t._readableState;null===e?(l.reading=!1,function(t,e){if(e.ended)return;if(e.decoder){var r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,v(t)}(t,l)):(i||(s=function(t,e){var r;n=e,o.isBuffer(n)||n instanceof a||"string"==typeof e||void 0===e||t.objectMode||(r=new TypeError("Invalid non-string/buffer chunk"));var n;return r}(l,e)),s?t.emit("error",s):l.objectMode||e&&e.length>0?("string"==typeof e||l.objectMode||Object.getPrototypeOf(e)===o.prototype||(e=function(t){return o.from(t)}(e)),n?l.endEmitted?t.emit("error",new Error("stream.unshift() after end event")):_(t,l,e,!0):l.ended?t.emit("error",new Error("stream.push() after EOF")):(l.reading=!1,l.decoder&&!r?(e=l.decoder.write(e),l.objectMode||0!==e.length?_(t,l,e,!1):x(t,l)):_(t,l,e,!1))):n||(l.reading=!1));return function(t){return!t.ended&&(t.needReadable||t.length<t.highWaterMark||0===t.length)}(l)}function _(t,e,r,n){e.flowing&&0===e.length&&!e.sync?(t.emit("data",r),t.read(0)):(e.length+=e.objectMode?1:r.length,n?e.buffer.unshift(r):e.buffer.push(r),e.needReadable&&v(t)),x(t,e)}Object.defineProperty(y.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(t){this._readableState&&(this._readableState.destroyed=t)}}),y.prototype.destroy=p.destroy,y.prototype._undestroy=p.undestroy,y.prototype._destroy=function(t,e){this.push(null),e(t)},y.prototype.push=function(t,e){var r,n=this._readableState;return n.objectMode?r=!0:"string"==typeof t&&((e=e||n.defaultEncoding)!==n.encoding&&(t=o.from(t,e),e=""),r=!0),m(this,t,e,!1,r)},y.prototype.unshift=function(t){return m(this,t,null,!0,!1)},y.prototype.isPaused=function(){return!1===this._readableState.flowing},y.prototype.setEncoding=function(t){return f||(f=We().StringDecoder),this._readableState.decoder=new f(t),this._readableState.encoding=t,this};var w=8388608;function S(t,e){return t<=0||0===e.length&&e.ended?0:e.objectMode?1:t!=t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=function(t){return t>=w?t=w:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function v(e){var r=e._readableState;r.needReadable=!1,r.emittedReadable||(c("emitReadable",r.flowing),r.emittedReadable=!0,r.sync?t.nextTick(E,e):E(e))}function E(t){c("emit readable"),t.emit("readable"),A(t)}function x(e,r){r.readingMore||(r.readingMore=!0,t.nextTick(k,e,r))}function k(t,e){for(var r=e.length;!e.reading&&!e.flowing&&!e.ended&&e.length<e.highWaterMark&&(c("maybeReadMore read 0"),t.read(0),r!==e.length);)r=e.length;e.readingMore=!1}function T(t){c("readable nexttick read 0"),t.read(0)}function R(t,e){e.reading||(c("resume read 0"),t.read(0)),e.resumeScheduled=!1,e.awaitDrain=0,t.emit("resume"),A(t),e.flowing&&!e.reading&&t.read(0)}function A(t){var e=t._readableState;for(c("flow",e.flowing);e.flowing&&null!==t.read(););}function L(t,e){return 0===e.length?null:(e.objectMode?r=e.buffer.shift():!t||t>=e.length?(r=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.head.data:e.buffer.concat(e.length),e.buffer.clear()):r=function(t,e,r){var n;t<e.head.data.length?(n=e.head.data.slice(0,t),e.head.data=e.head.data.slice(t)):n=t===e.head.data.length?e.shift():r?function(t,e){var r=e.head,n=1,i=r.data;t-=i.length;for(;r=r.next;){var s=r.data,o=t>s.length?s.length:t;if(o===s.length?i+=s:i+=s.slice(0,t),0===(t-=o)){o===s.length?(++n,r.next?e.head=r.next:e.head=e.tail=null):(e.head=r,r.data=s.slice(o));break}++n}return e.length-=n,i}(t,e):function(t,e){var r=o.allocUnsafe(t),n=e.head,i=1;n.data.copy(r),t-=n.data.length;for(;n=n.next;){var s=n.data,a=t>s.length?s.length:t;if(s.copy(r,r.length-t,0,a),0===(t-=a)){a===s.length?(++i,n.next?e.head=n.next:e.head=e.tail=null):(e.head=n,n.data=s.slice(a));break}++i}return e.length-=i,r}(t,e);return n}(t,e.buffer,e.decoder),r);var r}function M(e){var r=e._readableState;if(r.length>0)throw new Error('"endReadable()" called on non-empty stream');r.endEmitted||(r.ended=!0,t.nextTick(N,r,e))}function N(t,e){t.endEmitted||0!==t.length||(t.endEmitted=!0,e.readable=!1,e.emit("end"))}function D(t,e){for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r;return-1}return y.prototype.read=function(t){c("read",t),t=parseInt(t,10);var e=this._readableState,r=t;if(0!==t&&(e.emittedReadable=!1),0===t&&e.needReadable&&(e.length>=e.highWaterMark||e.ended))return c("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?M(this):v(this),null;if(0===(t=S(t,e))&&e.ended)return 0===e.length&&M(this),null;var n,i=e.needReadable;return c("need readable",i),(0===e.length||e.length-t<e.highWaterMark)&&c("length less than watermark",i=!0),e.ended||e.reading?c("reading or ended",i=!1):i&&(c("do read"),e.reading=!0,e.sync=!0,0===e.length&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=S(r,e))),null===(n=t>0?L(t,e):null)?(e.needReadable=!0,t=0):e.length-=t,0===e.length&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&M(this)),null!==n&&this.emit("data",n),n},y.prototype._read=function(t){this.emit("error",new Error("_read() is not implemented"))},y.prototype.pipe=function(e,i){var s=this,o=this._readableState;switch(o.pipesCount){case 0:o.pipes=e;break;case 1:o.pipes=[o.pipes,e];break;default:o.pipes.push(e)}o.pipesCount+=1,c("pipe count=%d opts=%j",o.pipesCount,i);var a=(!i||!1!==i.end)&&e!==process.stdout&&e!==process.stderr?u:m;function l(t,r){c("onunpipe"),t===s&&r&&!1===r.hasUnpiped&&(r.hasUnpiped=!0,c("cleanup"),e.removeListener("close",g),e.removeListener("finish",y),e.removeListener("drain",h),e.removeListener("error",b),e.removeListener("unpipe",l),s.removeListener("end",u),s.removeListener("end",m),s.removeListener("data",p),f=!0,!o.awaitDrain||e._writableState&&!e._writableState.needDrain||h())}function u(){c("onend"),e.end()}o.endEmitted?t.nextTick(a):s.once("end",a),e.on("unpipe",l);var h=function(t){return function(){var e=t._readableState;c("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&n(t,"data")&&(e.flowing=!0,A(t))}}(s);e.on("drain",h);var f=!1;var d=!1;function p(t){c("ondata"),d=!1,!1!==e.write(t)||d||((1===o.pipesCount&&o.pipes===e||o.pipesCount>1&&-1!==D(o.pipes,e))&&!f&&(c("false write response, pause",o.awaitDrain),o.awaitDrain++,d=!0),s.pause())}function b(t){c("onerror",t),m(),e.removeListener("error",b),0===n(e,"error")&&e.emit("error",t)}function g(){e.removeListener("finish",y),m()}function y(){c("onfinish"),e.removeListener("close",g),m()}function m(){c("unpipe"),s.unpipe(e)}return s.on("data",p),function(t,e,n){if("function"==typeof t.prependListener)return t.prependListener(e,n);t._events&&t._events[e]?r(t._events[e])?t._events[e].unshift(n):t._events[e]=[n,t._events[e]]:t.on(e,n)}(e,"error",b),e.once("close",g),e.once("finish",y),e.emit("pipe",s),o.flowing||(c("pipe resume"),s.resume()),e},y.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes||(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,r)),this;if(!t){var n=e.pipes,i=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var s=0;s<i;s++)n[s].emit("unpipe",this,{hasUnpiped:!1});return this}var o=D(e.pipes,t);return-1===o||(e.pipes.splice(o,1),e.pipesCount-=1,1===e.pipesCount&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,r)),this},y.prototype.on=function(e,r){var n=i.prototype.on.call(this,e,r);if("data"===e)!1!==this._readableState.flowing&&this.resume();else if("readable"===e){var s=this._readableState;s.endEmitted||s.readableListening||(s.readableListening=s.needReadable=!0,s.emittedReadable=!1,s.reading?s.length&&v(this):t.nextTick(T,this))}return n},y.prototype.addListener=y.prototype.on,y.prototype.resume=function(){var e=this._readableState;return e.flowing||(c("resume"),e.flowing=!0,function(e,r){r.resumeScheduled||(r.resumeScheduled=!0,t.nextTick(R,e,r))}(this,e)),this},y.prototype.pause=function(){return c("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(c("pause"),this._readableState.flowing=!1,this.emit("pause")),this},y.prototype.wrap=function(t){var e=this,r=this._readableState,n=!1;for(var i in t.on("end",function(){if(c("wrapped end"),r.decoder&&!r.ended){var t=r.decoder.end();t&&t.length&&e.push(t)}e.push(null)}),t.on("data",function(i){(c("wrapped data"),r.decoder&&(i=r.decoder.write(i)),r.objectMode&&null==i)||(r.objectMode||i&&i.length)&&(e.push(i)||(n=!0,t.pause()))}),t)void 0===this[i]&&"function"==typeof t[i]&&(this[i]=/* @__PURE__ */function(e){return function(){return t[e].apply(t,arguments)}}(i));for(var s=0;s<b.length;s++)t.on(b[s],this.emit.bind(this,b[s]));return this._read=function(e){c("wrapped _read",e),n&&(n=!1,t.resume())},this},Object.defineProperty(y.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),y._fromList=L,Te}function Be(){if(Le)return Ae;Le=1,Ae=n;var t=xe(),e=Object.create(oe());function r(t,e){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(!n)return this.emit("error",new Error("write callback called multiple times"));r.writechunk=null,r.writecb=null,null!=e&&this.push(e),n(t);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function n(e){if(!(this instanceof n))return new n(e);t.call(this,e),this._transformState={afterTransform:r.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",i)}function i(){var t=this;"function"==typeof this._flush?this._flush(function(e,r){s(t,e,r)}):s(this,null,null)}function s(t,e,r){if(e)return t.emit("error",e);if(null!=r&&t.push(r),t._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(t._transformState.transforming)throw new Error("Calling transform done when still transforming");return t.push(null)}return e.inherits=ue(),e.inherits(n,t),n.prototype.push=function(e,r){return this._transformState.needTransform=!1,t.prototype.push.call(this,e,r)},n.prototype._transform=function(t,e,r){throw new Error("_transform() is not implemented")},n.prototype._write=function(t,e,r){var n=this._transformState;if(n.writecb=r,n.writechunk=t,n.writeencoding=e,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},n.prototype._read=function(t){var e=this._transformState;null!==e.writechunk&&e.writecb&&!e.transforming?(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform)):e.needTransform=!0},n.prototype._destroy=function(e,r){var n=this;t.prototype._destroy.call(this,e,function(t){r(t),n.emit("close")})},Ae}function Fe(){return De||(De=1,t=Zt.exports,(t=Zt.exports=Ue()).Stream=t,t.Readable=t,t.Writable=Ee(),t.Duplex=xe(),t.Transform=Be(),t.PassThrough=function(){if(Ne)return Me;Ne=1,Me=r;var t=Be(),e=Object.create(oe());function r(e){if(!(this instanceof r))return new r(e);t.call(this,e)}return e.inherits=ue(),e.inherits(r,t),r.prototype._transform=function(t,e,r){r(null,t)},Me}()),Zt.exports;var t}var ze=function(){if(Ce)return Ie;Ce=1;var t=h,e=Pe?Oe:(Pe=1,Oe=Fe().PassThrough);function r(t,e,r){t[e]=function(){return delete t[e],r.apply(this,arguments),this[e].apply(this,arguments)}}function n(t,i){if(!(this instanceof n))return new n(t,i);e.call(this,i),r(this,"_read",function(){var e=t.call(this,i),r=this.emit.bind(this,"error");e.on("error",r),e.pipe(this)}),this.emit("readable")}function i(t,n){if(!(this instanceof i))return new i(t,n);e.call(this,n),r(this,"_write",function(){var e=t.call(this,n),r=this.emit.bind(this,"error");e.on("error",r),this.pipe(e)}),this.emit("writable")}return Ie={Readable:n,Writable:i},t.inherits(n,e),t.inherits(i,e),Ie}();var $e,Ge="function"==typeof queueMicrotask&&queueMicrotask,He="function"==typeof setImmediate&&setImmediate,qe="object"==typeof process&&"function"==typeof process.nextTick;$e=Ge?queueMicrotask:He?setImmediate:qe?process.nextTick:function(t){setTimeout(t,0)};var Ve,Ye=(Ve=$e,(t,...e)=>Ve(()=>t(...e)));function Qe(t,e){return t.then(t=>{Ke(e,null,t)},t=>{Ke(e,t&&(t instanceof Error||t.message)?t:new Error(t))})}function Ke(t,e,r){try{t(e,r)}catch(n){Ye(t=>{throw t},n)}}function Ze(t){return"AsyncFunction"===t[Symbol.toStringTag]}function Je(t){if("function"!=typeof t)throw new Error("expected a function");return Ze(t)?Ze(e=t)?function(...t){const r=t.pop();return Qe(e.apply(this,t),r)}:(r=function(t,r){var n;try{n=e.apply(this,t)}catch(i){return r(i)}if(n&&"function"==typeof n.then)return Qe(n,r);r(null,n)},function(...t){var e=t.pop();return r.call(this,t,e)}):t;var e,r}function Xe(t,e){if(e||(e=t.length),!e)throw new Error("arity is undefined");return function(...r){return"function"==typeof r[e-1]?t.apply(this,r):new Promise((n,i)=>{r[e-1]=(t,...e)=>{if(t)return i(t);n(e.length>1?e:e[0])},t.apply(this,r)})}}function tr(t,e,r,n){e=e||[];var i=[],s=0,o=Je(r);return t(e,(t,e,r)=>{var n=s++;o(t,(t,e)=>{i[n]=e,r(t)})},t=>{n(t,i)})}function er(t){return t&&"number"==typeof t.length&&t.length>=0&&t.length%1==0}const rr={};function nr(t){function e(...e){if(null!==t){var r=t;t=null,r.apply(this,e)}}return Object.assign(e,t),e}function ir(t){if(er(t))return function(t){var e=-1,r=t.length;return function(){return++e<r?{value:t[e],key:e}:null}}(t);var e,r,n,i,s=function(t){return t[Symbol.iterator]&&t[Symbol.iterator]()}(t);return s?function(t){var e=-1;return function(){var r=t.next();return r.done?null:(e++,{value:r.value,key:e})}}(s):(r=(e=t)?Object.keys(e):[],n=-1,i=r.length,function t(){var s=r[++n];return"__proto__"===s?t():n<i?{value:e[s],key:s}:null})}function sr(t){return function(...e){if(null===t)throw new Error("Callback was already called.");var r=t;t=null,r.apply(this,e)}}function or(t,e,r,n){let i=!1,s=!1,o=!1,a=0,l=0;function u(){a>=e||o||i||(o=!0,t.next().then(({value:t,done:e})=>{if(!s&&!i){if(o=!1,e)return i=!0,void(a<=0&&n(null));a++,r(t,l,h),l++,u()}}).catch(c))}function h(t,e){if(a-=1,!s)return t?c(t):!1===t?(i=!0,void(s=!0)):e===rr||i&&a<=0?(i=!0,n(null)):void u()}function c(t){s||(o=!1,i=!0,n(t))}u()}var ar=t=>(e,r,n)=>{if(n=nr(n),t<=0)throw new RangeError("concurrency limit cannot be less than 1");if(!e)return n(null);if("AsyncGenerator"===e[Symbol.toStringTag])return or(e,t,r,n);if(function(t){return"function"==typeof t[Symbol.asyncIterator]}(e))return or(e[Symbol.asyncIterator](),t,r,n);var i=ir(e),s=!1,o=!1,a=0,l=!1;function u(t,e){if(!o)if(a-=1,t)s=!0,n(t);else if(!1===t)s=!0,o=!0;else{if(e===rr||s&&a<=0)return s=!0,n(null);l||h()}}function h(){for(l=!0;a<t&&!s;){var e=i();if(null===e)return s=!0,void(a<=0&&n(null));a+=1,r(e.value,e.key,sr(u))}l=!1}h()};var lr=Xe(function(t,e,r,n){return ar(e)(t,Je(r),n)},4);function ur(t,e,r){r=nr(r);var n=0,i=0,{length:s}=t,o=!1;function a(t,e){!1===t&&(o=!0),!0!==o&&(t?r(t):++i!==s&&e!==rr||r(null))}for(0===s&&r(null);n<s;n++)e(t[n],n,sr(a))}function hr(t,e,r){return lr(t,1/0,e,r)}var cr=Xe(function(t,e,r){return(er(t)?ur:hr)(t,Je(e),r)},3);var fr=Xe(function(t,e,r){return tr(cr,t,e,r)},3);var dr=Xe(function(t,e,r){return lr(t,1,e,r)},3);Xe(function(t,e,r){return tr(dr,t,e,r)},3);class pr{constructor(){this.head=this.tail=null,this.length=0}removeLink(t){return t.prev?t.prev.next=t.next:this.head=t.next,t.next?t.next.prev=t.prev:this.tail=t.prev,t.prev=t.next=null,this.length-=1,t}empty(){for(;this.head;)this.shift();return this}insertAfter(t,e){e.prev=t,e.next=t.next,t.next?t.next.prev=e:this.tail=e,t.next=e,this.length+=1}insertBefore(t,e){e.prev=t.prev,e.next=t,t.prev?t.prev.next=e:this.head=e,t.prev=e,this.length+=1}unshift(t){this.head?this.insertBefore(this.head,t):br(this,t)}push(t){this.tail?this.insertAfter(this.tail,t):br(this,t)}shift(){return this.head&&this.removeLink(this.head)}pop(){return this.tail&&this.removeLink(this.tail)}toArray(){return[...this]}*[Symbol.iterator](){for(var t=this.head;t;)yield t.data,t=t.next}remove(t){for(var e=this.head;e;){var{next:r}=e;t(e)&&this.removeLink(e),e=r}return this}}function br(t,e){t.length=1,t.head=t.tail=e}function gr(t,e,r){if(null==e)e=1;else if(0===e)throw new RangeError("Concurrency must not be zero");var n=Je(t),i=0,s=[];const o={error:[],drain:[],saturated:[],unsaturated:[],empty:[]};function a(t,e){return t?e?void(o[t]=o[t].filter(t=>t!==e)):o[t]=[]:Object.keys(o).forEach(t=>o[t]=[])}function l(t,...e){o[t].forEach(t=>t(...e))}var u=!1;function h(t,e,r,n){if(null!=n&&"function"!=typeof n)throw new Error("task callback must be a function");var i,s;function o(t,...e){return t?r?s(t):i():e.length<=1?i(e[0]):void i(e)}b.started=!0;var a=b._createTaskItem(t,r?o:n||o);if(e?b._tasks.unshift(a):b._tasks.push(a),u||(u=!0,Ye(()=>{u=!1,b.process()})),r||!n)return new Promise((t,e)=>{i=t,s=e})}function c(t){return function(e,...r){i-=1;for(var n=0,o=t.length;n<o;n++){var a=t[n],u=s.indexOf(a);0===u?s.shift():u>0&&s.splice(u,1),a.callback(e,...r),null!=e&&l("error",e,a.data)}i<=b.concurrency-b.buffer&&l("unsaturated"),b.idle()&&l("drain"),b.process()}}function f(t){return!(0!==t.length||!b.idle())&&(Ye(()=>l("drain")),!0)}const d=t=>e=>{if(!e)return new Promise((e,r)=>{!function(t,e){const r=(...n)=>{a(t,r),e(...n)};o[t].push(r)}(t,(t,n)=>{if(t)return r(t);e(n)})});a(t),function(t,e){o[t].push(e)}(t,e)};var p=!1,b={_tasks:new pr,_createTaskItem:(t,e)=>({data:t,callback:e}),*[Symbol.iterator](){yield*b._tasks[Symbol.iterator]()},concurrency:e,payload:r,buffer:e/4,started:!1,paused:!1,push(t,e){if(Array.isArray(t)){if(f(t))return;return t.map(t=>h(t,!1,!1,e))}return h(t,!1,!1,e)},pushAsync(t,e){if(Array.isArray(t)){if(f(t))return;return t.map(t=>h(t,!1,!0,e))}return h(t,!1,!0,e)},kill(){a(),b._tasks.empty()},unshift(t,e){if(Array.isArray(t)){if(f(t))return;return t.map(t=>h(t,!0,!1,e))}return h(t,!0,!1,e)},unshiftAsync(t,e){if(Array.isArray(t)){if(f(t))return;return t.map(t=>h(t,!0,!0,e))}return h(t,!0,!0,e)},remove(t){b._tasks.remove(t)},process(){if(!p){for(p=!0;!b.paused&&i<b.concurrency&&b._tasks.length;){var t=[],e=[],r=b._tasks.length;b.payload&&(r=Math.min(r,b.payload));for(var o=0;o<r;o++){var a=b._tasks.shift();t.push(a),s.push(a),e.push(a.data)}i+=1,0===b._tasks.length&&l("empty"),i===b.concurrency&&l("saturated");var u=sr(c(t));n(e,u)}p=!1}},length:()=>b._tasks.length,running:()=>i,workersList:()=>s,idle:()=>b._tasks.length+i===0,pause(){b.paused=!0},resume(){!1!==b.paused&&(b.paused=!1,Ye(b.process))}};return Object.defineProperties(b,{saturated:{writable:!1,value:d("saturated")},unsaturated:{writable:!1,value:d("unsaturated")},empty:{writable:!1,value:d("empty")},drain:{writable:!1,value:d("drain")},error:{writable:!1,value:d("error")}}),b}Xe(function(t,e,r,n){n=nr(n);var i=Je(r);return dr(t,(t,r,n)=>{i(e,t,(t,r)=>{e=r,n(t)})},t=>n(t,e))},4);var yr=Xe(function(t,e,r,n){return tr(ar(e),t,r,n)},4);var mr=Xe(function(t,e,r,n){var i=Je(r);return yr(t,e,(t,e)=>{i(t,(t,...r)=>t?e(t):e(t,r))},(t,e)=>{for(var r=[],i=0;i<e.length;i++)e[i]&&(r=r.concat(...e[i]));return n(t,r)})},4);function _r(t,e){return(r,n,i,s)=>{var o,a=!1;const l=Je(i);r(n,(r,n,i)=>{l(r,(n,s)=>n||!1===n?i(n):t(s)&&!o?(a=!0,o=e(!0,r),i(null,rr)):void i())},t=>{if(t)return s(t);s(null,a?o:e(!1))})}}function wr(t){return(e,r,n)=>t(e,n)}Xe(function(t,e,r){return mr(t,1/0,e,r)},3),Xe(function(t,e,r){return mr(t,1,e,r)},3),Xe(function(t,e,r){return _r(t=>t,(t,e)=>e)(cr,t,e,r)},3),Xe(function(t,e,r,n){return _r(t=>t,(t,e)=>e)(ar(e),t,r,n)},4),Xe(function(t,e,r){return _r(t=>t,(t,e)=>e)(ar(1),t,e,r)},3),Xe(function(t,e,r){r=sr(r);var n,i=Je(t),s=Je(e);function o(t,...e){if(t)return r(t);!1!==t&&(n=e,s(...e,a))}function a(t,e){return t?r(t):!1!==t?e?void i(o):r(null,...n):void 0}return a(null,!0)},3),Xe(function(t,e,r){return cr(t,wr(Je(e)),r)},3);var Sr=Xe(function(t,e,r,n){return ar(e)(t,wr(Je(r)),n)},4);var vr=Xe(function(t,e,r){return Sr(t,1,e,r)},3);function Er(t,e,r,n){var i=new Array(e.length);t(e,(t,e,n)=>{r(t,(t,r)=>{i[e]=!!r,n(t)})},t=>{if(t)return n(t);for(var r=[],s=0;s<e.length;s++)i[s]&&r.push(e[s]);n(null,r)})}function xr(t,e,r,n){var i=[];t(e,(t,e,n)=>{r(t,(r,s)=>{if(r)return n(r);s&&i.push({index:e,value:t}),n(r)})},t=>{if(t)return n(t);n(null,i.sort((t,e)=>t.index-e.index).map(t=>t.value))})}function kr(t,e,r,n){return(er(e)?Er:xr)(t,e,Je(r),n)}function Tr(t,e){var r=Je(t);return gr((t,e)=>{r(t[0],e)},e,1)}function Rr(t,e,r,n){const i=Je(r);return kr(t,e,(t,e)=>{i(t,(t,r)=>{e(t,!r)})},n)}Xe(function(t,e,r){return _r(t=>!t,t=>!t)(cr,t,e,r)},3),Xe(function(t,e,r,n){return _r(t=>!t,t=>!t)(ar(e),t,r,n)},4),Xe(function(t,e,r){return _r(t=>!t,t=>!t)(dr,t,e,r)},3),Xe(function(t,e,r){return kr(cr,t,e,r)},3),Xe(function(t,e,r,n){return kr(ar(e),t,r,n)},4),Xe(function(t,e,r){return kr(dr,t,e,r)},3),Xe(function(t,e){var r=sr(e),n=Je(function(t){return Ze(t)?t:function(...e){var r=e.pop(),n=!0;e.push((...t)=>{n?Ye(()=>r(...t)):r(...t)}),t.apply(this,e),n=!1}}(t));return function t(e){if(e)return r(e);!1!==e&&n(t)}()},2),Xe(function(t,e,r,n){var i=Je(r);return yr(t,e,(t,e)=>{i(t,(r,n)=>r?e(r):e(r,{key:n,val:t}))},(t,e)=>{for(var r={},{hasOwnProperty:i}=Object.prototype,s=0;s<e.length;s++)if(e[s]){var{key:o}=e[s],{val:a}=e[s];i.call(r,o)?r[o].push(a):r[o]=[a]}return n(t,r)})},4),Xe(function(t,e,r,n){n=nr(n);var i={},s=Je(r);return ar(e)(t,(t,e,r)=>{s(t,e,(t,n)=>{if(t)return r(t);i[e]=n,r(t)})},t=>n(t,i))},4),qe?process.nextTick:He&&setImmediate,Xe((t,e,r)=>{var n=er(e)?[]:{};t(e,(t,e,r)=>{Je(t)((t,...i)=>{i.length<2&&([i]=i),n[e]=i,r(t)})},t=>r(t,n))},3),Xe(function(t,e){if(e=nr(e),!Array.isArray(t))return e(new TypeError("First argument to race must be an array of functions"));if(!t.length)return e();for(var r=0,n=t.length;r<n;r++)Je(t[r])(e)},2),Xe(function(t,e,r){return Rr(cr,t,e,r)},3),Xe(function(t,e,r,n){return Rr(ar(e),t,r,n)},4),Xe(function(t,e,r){return Rr(dr,t,e,r)},3),Xe(function(t,e,r){return _r(Boolean,t=>t)(cr,t,e,r)},3),Xe(function(t,e,r,n){return _r(Boolean,t=>t)(ar(e),t,r,n)},4),Xe(function(t,e,r){return _r(Boolean,t=>t)(dr,t,e,r)},3),Xe(function(t,e,r){var n=Je(e);return fr(t,(t,e)=>{n(t,(r,n)=>{if(r)return e(r);e(r,{value:t,criteria:n})})},(t,e)=>{if(t)return r(t);r(null,e.sort(i).map(t=>t.value))});function i(t,e){var r=t.criteria,n=e.criteria;return r<n?-1:r>n?1:0}},3),Xe(function(t,e){var r,n=null;return vr(t,(t,e)=>{Je(t)((t,...i)=>{if(!1===t)return e(t);i.length<2?[r]=i:r=i,n=t,e(t?null:{})})},()=>e(n,r))}),Xe(function(t,e,r){r=sr(r);var n=Je(e),i=Je(t),s=[];function o(t,...e){if(t)return r(t);s=e,!1!==t&&i(a)}function a(t,e){return t?r(t):!1!==t?e?void n(o):r(null,...s):void 0}return i(a)},3),Xe(function(t,e){if(e=nr(e),!Array.isArray(t))return e(new Error("First argument to waterfall must be an array of functions"));if(!t.length)return e();var r=0;function n(e){Je(t[r++])(...e,sr(i))}function i(i,...s){if(!1!==i)return i||r===t.length?e(i,...s):void n(s)}n([])});const Ar={ABORTED:"archive was aborted",DIRECTORYDIRPATHREQUIRED:"diretory dirpath argument must be a non-empty string value",DIRECTORYFUNCTIONINVALIDDATA:"invalid data returned by directory custom data function",ENTRYNAMEREQUIRED:"entry name must be a non-empty string value",FILEFILEPATHREQUIRED:"file filepath argument must be a non-empty string value",FINALIZING:"archive already finalizing",QUEUECLOSED:"queue closed",NOENDMETHOD:"no suitable finalize/end method defined by module",DIRECTORYNOTSUPPORTED:"support for directory entries not defined by module",FORMATSET:"archive format already set",INPUTSTEAMBUFFERREQUIRED:"input source must be valid Stream or Buffer instance",MODULESET:"module already set",SYMLINKNOTSUPPORTED:"support for symlink entries not defined by module",SYMLINKFILEPATHREQUIRED:"symlink filepath argument must be a non-empty string value",SYMLINKTARGETREQUIRED:"symlink target argument must be a non-empty string value",ENTRYNOTSUPPORTED:"entry not supported"};function Lr(t,e){Error.captureStackTrace(this,this.constructor),this.message=Ar[t]||t,this.code=t,this.data=e}h.inherits(Lr,Error);var Mr,Nr,Dr={exports:{}},Or={exports:{}};function Pr(){if(Nr)return Mr;Nr=1;class t extends Error{constructor(t){if(!Array.isArray(t))throw new TypeError("Expected input to be an Array, got "+typeof t);let e="";for(let r=0;r<t.length;r++)e+=` ${t[r].stack}\n`;super(e),this.name="AggregateError",this.errors=t}}return Mr={AggregateError:t,ArrayIsArray:t=>Array.isArray(t),ArrayPrototypeIncludes:(t,e)=>t.includes(e),ArrayPrototypeIndexOf:(t,e)=>t.indexOf(e),ArrayPrototypeJoin:(t,e)=>t.join(e),ArrayPrototypeMap:(t,e)=>t.map(e),ArrayPrototypePop:(t,e)=>t.pop(e),ArrayPrototypePush:(t,e)=>t.push(e),ArrayPrototypeSlice:(t,e,r)=>t.slice(e,r),Error:Error,FunctionPrototypeCall:(t,e,...r)=>t.call(e,...r),FunctionPrototypeSymbolHasInstance:(t,e)=>Function.prototype[Symbol.hasInstance].call(t,e),MathFloor:Math.floor,Number:Number,NumberIsInteger:Number.isInteger,NumberIsNaN:Number.isNaN,NumberMAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER,NumberMIN_SAFE_INTEGER:Number.MIN_SAFE_INTEGER,NumberParseInt:Number.parseInt,ObjectDefineProperties:(t,e)=>Object.defineProperties(t,e),ObjectDefineProperty:(t,e,r)=>Object.defineProperty(t,e,r),ObjectGetOwnPropertyDescriptor:(t,e)=>Object.getOwnPropertyDescriptor(t,e),ObjectKeys:t=>Object.keys(t),ObjectSetPrototypeOf:(t,e)=>Object.setPrototypeOf(t,e),Promise:Promise,PromisePrototypeCatch:(t,e)=>t.catch(e),PromisePrototypeThen:(t,e,r)=>t.then(e,r),PromiseReject:t=>Promise.reject(t),PromiseResolve:t=>Promise.resolve(t),ReflectApply:Reflect.apply,RegExpPrototypeTest:(t,e)=>t.test(e),SafeSet:Set,String:String,StringPrototypeSlice:(t,e,r)=>t.slice(e,r),StringPrototypeToLowerCase:t=>t.toLowerCase(),StringPrototypeToUpperCase:t=>t.toUpperCase(),StringPrototypeTrim:t=>t.trim(),Symbol:Symbol,SymbolFor:Symbol.for,SymbolAsyncIterator:Symbol.asyncIterator,SymbolHasInstance:Symbol.hasInstance,SymbolIterator:Symbol.iterator,SymbolDispose:Symbol.dispose||/* @__PURE__ */Symbol("Symbol.dispose"),SymbolAsyncDispose:Symbol.asyncDispose||/* @__PURE__ */Symbol("Symbol.asyncDispose"),TypedArrayPrototypeSet:(t,e,r)=>t.set(e,r),Boolean:Boolean,Uint8Array:Uint8Array}}var Ir,Cr,jr,Wr,Ur={exports:{}};function Br(){return Cr?Ir:(Cr=1,Ir={format:(t,...e)=>t.replace(/%([sdifj])/g,function(...[t,r]){const n=e.shift();if("f"===r)return n.toFixed(6);if("j"===r)return JSON.stringify(n);if("s"===r&&"object"==typeof n){return`${n.constructor!==Object?n.constructor.name:""} {}`.trim()}return n.toString()}),inspect(t){switch(typeof t){case"string":if(t.includes("'")){if(!t.includes('"'))return`"${t}"`;if(!t.includes("`")&&!t.includes("${"))return`\`${t}\``}return`'${t}'`;case"number":return isNaN(t)?"NaN":Object.is(t,-0)?String(t):t;case"bigint":return`${String(t)}n`;case"boolean":case"undefined":return String(t);case"object":return"{}"}}})}function Fr(){if(Wr)return jr;Wr=1;const{format:t,inspect:e}=Br(),{AggregateError:r}=Pr(),n=globalThis.AggregateError||r,i=/* @__PURE__ */Symbol("kIsNodeError"),s=["string","function","number","object","Function","Object","boolean","bigint","symbol"],o=/^([A-Z][a-z0-9]*)+$/,a={};function l(t,e){if(!t)throw new a.ERR_INTERNAL_ASSERTION(e)}function u(t){let e="",r=t.length;const n="-"===t[0]?1:0;for(;r>=n+4;r-=3)e=`_${t.slice(r-3,r)}${e}`;return`${t.slice(0,r)}${e}`}function h(e,r,n){n||(n=Error);class s extends n{constructor(...n){super(function(e,r,n){if("function"==typeof r)return l(r.length<=n.length,`Code: ${e}; The provided arguments length (${n.length}) does not match the required ones (${r.length}).`),r(...n);const i=(r.match(/%[dfijoOs]/g)||[]).length;return l(i===n.length,`Code: ${e}; The provided arguments length (${n.length}) does not match the required ones (${i}).`),0===n.length?r:t(r,...n)}(e,r,n))}toString(){return`${this.name} [${e}]: ${this.message}`}}Object.defineProperties(s.prototype,{name:{value:n.name,writable:!0,enumerable:!1,configurable:!0},toString:{value(){return`${this.name} [${e}]: ${this.message}`},writable:!0,enumerable:!1,configurable:!0}}),s.prototype.code=e,s.prototype[i]=!0,a[e]=s}function c(t){const e="__node_internal_"+t.name;return Object.defineProperty(t,"name",{value:e}),t}class f extends Error{constructor(t="The operation was aborted",e=void 0){if(void 0!==e&&"object"!=typeof e)throw new a.ERR_INVALID_ARG_TYPE("options","Object",e);super(t,e),this.code="ABORT_ERR",this.name="AbortError"}}return h("ERR_ASSERTION","%s",Error),h("ERR_INVALID_ARG_TYPE",(t,r,n)=>{l("string"==typeof t,"'name' must be a string"),Array.isArray(r)||(r=[r]);let i="The ";t.endsWith(" argument")?i+=`${t} `:i+=`"${t}" ${t.includes(".")?"property":"argument"} `,i+="must be ";const a=[],u=[],h=[];for(const e of r)l("string"==typeof e,"All expected entries have to be of type string"),s.includes(e)?a.push(e.toLowerCase()):o.test(e)?u.push(e):(l("object"!==e,'The value "object" should be written as "Object"'),h.push(e));if(u.length>0){const t=a.indexOf("object");-1!==t&&(a.splice(a,t,1),u.push("Object"))}if(a.length>0){switch(a.length){case 1:i+=`of type ${a[0]}`;break;case 2:i+=`one of type ${a[0]} or ${a[1]}`;break;default:{const t=a.pop();i+=`one of type ${a.join(", ")}, or ${t}`}}(u.length>0||h.length>0)&&(i+=" or ")}if(u.length>0){switch(u.length){case 1:i+=`an instance of ${u[0]}`;break;case 2:i+=`an instance of ${u[0]} or ${u[1]}`;break;default:{const t=u.pop();i+=`an instance of ${u.join(", ")}, or ${t}`}}h.length>0&&(i+=" or ")}switch(h.length){case 0:break;case 1:h[0].toLowerCase()!==h[0]&&(i+="an "),i+=`${h[0]}`;break;case 2:i+=`one of ${h[0]} or ${h[1]}`;break;default:{const t=h.pop();i+=`one of ${h.join(", ")}, or ${t}`}}if(null==n)i+=`. Received ${n}`;else if("function"==typeof n&&n.name)i+=`. Received function ${n.name}`;else if("object"==typeof n){var c;if(null!==(c=n.constructor)&&void 0!==c&&c.name)i+=`. Received an instance of ${n.constructor.name}`;else{i+=`. Received ${e(n,{depth:-1})}`}}else{let t=e(n,{colors:!1});t.length>25&&(t=`${t.slice(0,25)}...`),i+=`. Received type ${typeof n} (${t})`}return i},TypeError),h("ERR_INVALID_ARG_VALUE",(t,r,n="is invalid")=>{let i=e(r);i.length>128&&(i=i.slice(0,128)+"...");return`The ${t.includes(".")?"property":"argument"} '${t}' ${n}. Received ${i}`},TypeError),h("ERR_INVALID_RETURN_VALUE",(t,e,r)=>{var n;return`Expected ${t} to be returned from the "${e}" function but got ${null!=r&&null!==(n=r.constructor)&&void 0!==n&&n.name?`instance of ${r.constructor.name}`:"type "+typeof r}.`},TypeError),h("ERR_MISSING_ARGS",(...t)=>{let e;l(t.length>0,"At least one arg needs to be specified");const r=t.length;switch(t=(Array.isArray(t)?t:[t]).map(t=>`"${t}"`).join(" or "),r){case 1:e+=`The ${t[0]} argument`;break;case 2:e+=`The ${t[0]} and ${t[1]} arguments`;break;default:{const r=t.pop();e+=`The ${t.join(", ")}, and ${r} arguments`}}return`${e} must be specified`},TypeError),h("ERR_OUT_OF_RANGE",(t,r,n)=>{let i;if(l(r,'Missing "range" argument'),Number.isInteger(n)&&Math.abs(n)>2**32)i=u(String(n));else if("bigint"==typeof n){i=String(n);const t=BigInt(2)**BigInt(32);(n>t||n<-t)&&(i=u(i)),i+="n"}else i=e(n);return`The value of "${t}" is out of range. It must be ${r}. Received ${i}`},RangeError),h("ERR_MULTIPLE_CALLBACK","Callback called multiple times",Error),h("ERR_METHOD_NOT_IMPLEMENTED","The %s method is not implemented",Error),h("ERR_STREAM_ALREADY_FINISHED","Cannot call %s after a stream was finished",Error),h("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable",Error),h("ERR_STREAM_DESTROYED","Cannot call %s after a stream was destroyed",Error),h("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),h("ERR_STREAM_PREMATURE_CLOSE","Premature close",Error),h("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF",Error),h("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event",Error),h("ERR_STREAM_WRITE_AFTER_END","write after end",Error),h("ERR_UNKNOWN_ENCODING","Unknown encoding: %s",TypeError),jr={AbortError:f,aggregateTwoErrors:c(function(t,e){if(t&&e&&t!==e){if(Array.isArray(e.errors))return e.errors.push(t),e;const r=new n([e,t],e.message);return r.code=e.code,r}return t||e}),hideStackFrames:c,codes:a}}var zr,$r,Gr={exports:{}};function Hr(){if(zr)return Gr.exports;zr=1;const{AbortController:t,AbortSignal:e}="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0;return Gr.exports=t,Gr.exports.AbortSignal=e,Gr.exports.default=t,Gr.exports}function qr(){return $r||($r=1,function(t){const e=c,{format:r,inspect:n}=Br(),{codes:{ERR_INVALID_ARG_TYPE:i}}=Fr(),{kResistStopPropagation:o,AggregateError:a,SymbolDispose:l}=Pr(),u=globalThis.AbortSignal||Hr().AbortSignal,h=globalThis.AbortController||Hr().AbortController,f=Object.getPrototypeOf(async function(){}).constructor,d=globalThis.Blob||e.Blob,p=void 0!==d?function(t){return t instanceof d}:function(t){return!1},b=(t,e)=>{if(void 0!==t&&(null===t||"object"!=typeof t||!("aborted"in t)))throw new i(e,"AbortSignal",t)};t.exports={AggregateError:a,kEmptyObject:Object.freeze({}),once(t){let e=!1;return function(...r){e||(e=!0,t.apply(this,r))}},createDeferredPromise:function(){let t,e;return{promise:new Promise((r,n)=>{t=r,e=n}),resolve:t,reject:e}},promisify:t=>new Promise((e,r)=>{t((t,...n)=>t?r(t):e(...n))}),debuglog:()=>function(){},format:r,inspect:n,types:{isAsyncFunction:t=>t instanceof f,isArrayBufferView:t=>ArrayBuffer.isView(t)},isBlob:p,deprecate:(t,e)=>t,addAbortListener:s.addAbortListener||function(t,e){if(void 0===t)throw new i("signal","AbortSignal",t);let r;return b(t,"signal"),((t,e)=>{if("function"!=typeof t)throw new i(e,"Function",t)})(e,"listener"),t.aborted?queueMicrotask(()=>e()):(t.addEventListener("abort",e,{__proto__:null,once:!0,[o]:!0}),r=()=>{t.removeEventListener("abort",e)}),{__proto__:null,[l](){var t;null===(t=r)||void 0===t||t()}}},AbortSignalAny:u.any||function(t){if(1===t.length)return t[0];const e=new h,r=()=>e.abort();return t.forEach(t=>{b(t,"signals"),t.addEventListener("abort",r,{once:!0})}),e.signal.addEventListener("abort",()=>{t.forEach(t=>t.removeEventListener("abort",r))},{once:!0}),e.signal}},t.exports.promisify.custom=/* @__PURE__ */Symbol.for("nodejs.util.promisify.custom")}(Ur)),Ur.exports}var Vr,Yr,Qr={};function Kr(){if(Yr)return Vr;Yr=1;const{ArrayIsArray:t,ArrayPrototypeIncludes:e,ArrayPrototypeJoin:r,ArrayPrototypeMap:n,NumberIsInteger:i,NumberIsNaN:s,NumberMAX_SAFE_INTEGER:o,NumberMIN_SAFE_INTEGER:a,NumberParseInt:l,ObjectPrototypeHasOwnProperty:u,RegExpPrototypeExec:h,String:c,StringPrototypeToUpperCase:f,StringPrototypeTrim:d}=Pr(),{hideStackFrames:p,codes:{ERR_SOCKET_BAD_PORT:b,ERR_INVALID_ARG_TYPE:g,ERR_INVALID_ARG_VALUE:y,ERR_OUT_OF_RANGE:m,ERR_UNKNOWN_SIGNAL:_}}=Fr(),{normalizeEncoding:w}=qr(),{isAsyncFunction:S,isArrayBufferView:v}=qr().types,E={};const x=/^[0-7]+$/;const k=p((t,e,r=a,n=o)=>{if("number"!=typeof t)throw new g(e,"number",t);if(!i(t))throw new m(e,"an integer",t);if(t<r||t>n)throw new m(e,`>= ${r} && <= ${n}`,t)}),T=p((t,e,r=-2147483648,n=2147483647)=>{if("number"!=typeof t)throw new g(e,"number",t);if(!i(t))throw new m(e,"an integer",t);if(t<r||t>n)throw new m(e,`>= ${r} && <= ${n}`,t)}),R=p((t,e,r=!1)=>{if("number"!=typeof t)throw new g(e,"number",t);if(!i(t))throw new m(e,"an integer",t);const n=r?1:0,s=4294967295;if(t<n||t>s)throw new m(e,`>= ${n} && <= ${s}`,t)});function A(t,e){if("string"!=typeof t)throw new g(e,"string",t)}const L=p((t,i,s)=>{if(!e(s,t)){const e=r(n(s,t=>"string"==typeof t?`'${t}'`:c(t)),", ");throw new y(i,t,"must be one of: "+e)}});function M(t,e){if("boolean"!=typeof t)throw new g(e,"boolean",t)}function N(t,e,r){return null!=t&&u(t,e)?t[e]:r}const D=p((e,r,n=null)=>{const i=N(n,"allowArray",!1),s=N(n,"allowFunction",!1);if(!N(n,"nullable",!1)&&null===e||!i&&t(e)||"object"!=typeof e&&(!s||"function"!=typeof e))throw new g(r,"Object",e)}),O=p((t,e)=>{if(null!=t&&"object"!=typeof t&&"function"!=typeof t)throw new g(e,"a dictionary",t)}),P=p((e,r,n=0)=>{if(!t(e))throw new g(r,"Array",e);if(e.length<n){throw new y(r,e,`must be longer than ${n}`)}});const I=p((t,e="buffer")=>{if(!v(t))throw new g(e,["Buffer","TypedArray","DataView"],t)});const C=p((t,e)=>{if(void 0!==t&&(null===t||"object"!=typeof t||!("aborted"in t)))throw new g(e,"AbortSignal",t)}),j=p((t,e)=>{if("function"!=typeof t)throw new g(e,"Function",t)}),W=p((t,e)=>{if("function"!=typeof t||S(t))throw new g(e,"Function",t)}),U=p((t,e)=>{if(void 0!==t)throw new g(e,"undefined",t)});const B=/^(?:<[^>]*>)(?:\s*;\s*[^;"\s]+(?:=(")?[^;"\s]*\1)?)*$/;function F(t,e){if(void 0===t||!h(B,t))throw new y(e,t,'must be an array or string of format "</styles.css>; rel=preload; as=style"')}return Vr={isInt32:function(t){return t===(0|t)},isUint32:function(t){return t===t>>>0},parseFileMode:function(t,e,r){if(void 0===t&&(t=r),"string"==typeof t){if(null===h(x,t))throw new y(e,t,"must be a 32-bit unsigned integer or an octal string");t=l(t,8)}return R(t,e),t},validateArray:P,validateStringArray:function(t,e){P(t,e);for(let r=0;r<t.length;r++)A(t[r],`${e}[${r}]`)},validateBooleanArray:function(t,e){P(t,e);for(let r=0;r<t.length;r++)M(t[r],`${e}[${r}]`)},validateAbortSignalArray:function(t,e){P(t,e);for(let r=0;r<t.length;r++){const n=t[r],i=`${e}[${r}]`;if(null==n)throw new g(i,"AbortSignal",n);C(n,i)}},validateBoolean:M,validateBuffer:I,validateDictionary:O,validateEncoding:function(t,e){const r=w(e),n=t.length;if("hex"===r&&n%2!=0)throw new y("encoding",e,`is invalid for data of length ${n}`)},validateFunction:j,validateInt32:T,validateInteger:k,validateNumber:function(t,e,r=void 0,n){if("number"!=typeof t)throw new g(e,"number",t);if(null!=r&&t<r||null!=n&&t>n||(null!=r||null!=n)&&s(t))throw new m(e,`${null!=r?`>= ${r}`:""}${null!=r&&null!=n?" && ":""}${null!=n?`<= ${n}`:""}`,t)},validateObject:D,validateOneOf:L,validatePlainFunction:W,validatePort:function(t,e="Port",r=!0){if("number"!=typeof t&&"string"!=typeof t||"string"==typeof t&&0===d(t).length||+t!==+t>>>0||t>65535||0===t&&!r)throw new b(e,t,r);return 0|t},validateSignalName:function(t,e="signal"){if(A(t,e),void 0===E[t]){if(void 0!==E[f(t)])throw new _(t+" (signals must use all capital letters)");throw new _(t)}},validateString:A,validateUint32:R,validateUndefined:U,validateUnion:function(t,n,i){if(!e(i,t))throw new g(n,`('${r(i,"|")}')`,t)},validateAbortSignal:C,validateLinkHeaderValue:function(e){if("string"==typeof e)return F(e,"hints"),e;if(t(e)){const t=e.length;let r="";if(0===t)return r;for(let n=0;n<t;n++){const i=e[n];F(i,"hints"),r+=i,n!==t-1&&(r+=", ")}return r}throw new y("hints",e,'must be an array or string of format "</styles.css>; rel=preload; as=style"')}}}var Zr,Jr,Xr,tn,en,rn,nn,sn,on={exports:{}},an={exports:{}};function ln(){if(Zr)return an.exports;Zr=1;var t,e,r=an.exports={};function n(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function s(e){if(t===setTimeout)return setTimeout(e,0);if((t===n||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(r){try{return t.call(null,e,0)}catch(i){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:n}catch(r){t=n}try{e="function"==typeof clearTimeout?clearTimeout:i}catch(r){e=i}}();var o,a=[],l=!1,u=-1;function h(){l&&o&&(l=!1,o.length?a=o.concat(a):u=-1,a.length&&c())}function c(){if(!l){var t=s(h);l=!0;for(var r=a.length;r;){for(o=a,a=[];++u<r;)o&&o[u].run();u=-1,r=a.length}o=null,l=!1,function(t){if(e===clearTimeout)return clearTimeout(t);if((e===i||!e)&&clearTimeout)return e=clearTimeout,clearTimeout(t);try{return e(t)}catch(r){try{return e.call(null,t)}catch(n){return e.call(this,t)}}}(t)}}function f(t,e){this.fun=t,this.array=e}function d(){}return r.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];a.push(new f(t,e)),1!==a.length||l||s(c)},f.prototype.run=function(){this.fun.apply(null,this.array)},r.title="browser",r.browser=!0,r.env={},r.argv=[],r.version="",r.versions={},r.on=d,r.addListener=d,r.once=d,r.off=d,r.removeListener=d,r.removeAllListeners=d,r.emit=d,r.prependListener=d,r.prependOnceListener=d,r.listeners=function(t){return[]},r.binding=function(t){throw new Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(t){throw new Error("process.chdir is not supported")},r.umask=function(){return 0},an.exports}function un(){if(Xr)return Jr;Xr=1;const{SymbolAsyncIterator:t,SymbolIterator:e,SymbolFor:r}=Pr(),n=r("nodejs.stream.destroyed"),i=r("nodejs.stream.errored"),s=r("nodejs.stream.readable"),o=r("nodejs.stream.writable"),a=r("nodejs.stream.disturbed"),l=r("nodejs.webstream.isClosedPromise"),u=r("nodejs.webstream.controllerErrorFunction");function h(t,e=!1){var r;return!(!t||"function"!=typeof t.pipe||"function"!=typeof t.on||e&&("function"!=typeof t.pause||"function"!=typeof t.resume)||t._writableState&&!1===(null===(r=t._readableState)||void 0===r?void 0:r.readable)||t._writableState&&!t._readableState)}function c(t){var e;return!(!t||"function"!=typeof t.write||"function"!=typeof t.on||t._readableState&&!1===(null===(e=t._writableState)||void 0===e?void 0:e.writable))}function f(t){return t&&(t._readableState||t._writableState||"function"==typeof t.write&&"function"==typeof t.on||"function"==typeof t.pipe&&"function"==typeof t.on)}function d(t){return!(!t||f(t)||"function"!=typeof t.pipeThrough||"function"!=typeof t.getReader||"function"!=typeof t.cancel)}function p(t){return!(!t||f(t)||"function"!=typeof t.getWriter||"function"!=typeof t.abort)}function b(t){return!(!t||f(t)||"object"!=typeof t.readable||"object"!=typeof t.writable)}function g(t){if(!f(t))return null;const e=t._writableState,r=t._readableState,i=e||r;return!!(t.destroyed||t[n]||null!=i&&i.destroyed)}function y(t){if(!c(t))return null;if(!0===t.writableEnded)return!0;const e=t._writableState;return(null==e||!e.errored)&&("boolean"!=typeof(null==e?void 0:e.ended)?null:e.ended)}function m(t,e){if(!h(t))return null;const r=t._readableState;return(null==r||!r.errored)&&("boolean"!=typeof(null==r?void 0:r.endEmitted)?null:!!(r.endEmitted||!1===e&&!0===r.ended&&0===r.length))}function _(t){return t&&null!=t[s]?t[s]:"boolean"!=typeof(null==t?void 0:t.readable)?null:!g(t)&&(h(t)&&t.readable&&!m(t))}function w(t){return t&&null!=t[o]?t[o]:"boolean"!=typeof(null==t?void 0:t.writable)?null:!g(t)&&(c(t)&&t.writable&&!y(t))}function S(t){return"boolean"==typeof t._closed&&"boolean"==typeof t._defaultKeepAlive&&"boolean"==typeof t._removedConnection&&"boolean"==typeof t._removedContLen}function v(t){return"boolean"==typeof t._sent100&&S(t)}return Jr={isDestroyed:g,kIsDestroyed:n,isDisturbed:function(t){var e;return!(!t||!(null!==(e=t[a])&&void 0!==e?e:t.readableDidRead||t.readableAborted))},kIsDisturbed:a,isErrored:function(t){var e,r,n,s,o,a,l,u,h,c;return!(!t||!(null!==(e=null!==(r=null!==(n=null!==(s=null!==(o=null!==(a=t[i])&&void 0!==a?a:t.readableErrored)&&void 0!==o?o:t.writableErrored)&&void 0!==s?s:null===(l=t._readableState)||void 0===l?void 0:l.errorEmitted)&&void 0!==n?n:null===(u=t._writableState)||void 0===u?void 0:u.errorEmitted)&&void 0!==r?r:null===(h=t._readableState)||void 0===h?void 0:h.errored)&&void 0!==e?e:null===(c=t._writableState)||void 0===c?void 0:c.errored))},kIsErrored:i,isReadable:_,kIsReadable:s,kIsClosedPromise:l,kControllerErrorFunction:u,kIsWritable:o,isClosed:function(t){if(!f(t))return null;if("boolean"==typeof t.closed)return t.closed;const e=t._writableState,r=t._readableState;return"boolean"==typeof(null==e?void 0:e.closed)||"boolean"==typeof(null==r?void 0:r.closed)?(null==e?void 0:e.closed)||(null==r?void 0:r.closed):"boolean"==typeof t._closed&&S(t)?t._closed:null},isDuplexNodeStream:function(t){return!(!t||"function"!=typeof t.pipe||!t._readableState||"function"!=typeof t.on||"function"!=typeof t.write)},isFinished:function(t,e){return f(t)?!!g(t)||(!1===(null==e?void 0:e.readable)||!_(t))&&(!1===(null==e?void 0:e.writable)||!w(t)):null},isIterable:function(r,n){return null!=r&&(!0===n?"function"==typeof r[t]:!1===n?"function"==typeof r[e]:"function"==typeof r[t]||"function"==typeof r[e])},isReadableNodeStream:h,isReadableStream:d,isReadableEnded:function(t){if(!h(t))return null;if(!0===t.readableEnded)return!0;const e=t._readableState;return!(!e||e.errored)&&("boolean"!=typeof(null==e?void 0:e.ended)?null:e.ended)},isReadableFinished:m,isReadableErrored:function(t){var e,r;return f(t)?t.readableErrored?t.readableErrored:null!==(e=null===(r=t._readableState)||void 0===r?void 0:r.errored)&&void 0!==e?e:null:null},isNodeStream:f,isWebStream:function(t){return d(t)||p(t)||b(t)},isWritable:w,isWritableNodeStream:c,isWritableStream:p,isWritableEnded:y,isWritableFinished:function(t,e){if(!c(t))return null;if(!0===t.writableFinished)return!0;const r=t._writableState;return(null==r||!r.errored)&&("boolean"!=typeof(null==r?void 0:r.finished)?null:!!(r.finished||!1===e&&!0===r.ended&&0===r.length))},isWritableErrored:function(t){var e,r;return f(t)?t.writableErrored?t.writableErrored:null!==(e=null===(r=t._writableState)||void 0===r?void 0:r.errored)&&void 0!==e?e:null:null},isServerRequest:function(t){var e;return"boolean"==typeof t._consuming&&"boolean"==typeof t._dumped&&void 0===(null===(e=t.req)||void 0===e?void 0:e.upgradeOrConnect)},isServerResponse:v,willEmitClose:function(t){if(!f(t))return null;const e=t._writableState,r=t._readableState,n=e||r;return!n&&v(t)||!!(n&&n.autoDestroy&&n.emitClose&&!1===n.closed)},isTransformStream:b}}function hn(){if(tn)return on.exports;tn=1;const t=ln(),{AbortError:e,codes:r}=Fr(),{ERR_INVALID_ARG_TYPE:n,ERR_STREAM_PREMATURE_CLOSE:i}=r,{kEmptyObject:s,once:o}=qr(),{validateAbortSignal:a,validateFunction:l,validateObject:u,validateBoolean:h}=Kr(),{Promise:c,PromisePrototypeThen:f,SymbolDispose:d}=Pr(),{isClosed:p,isReadable:b,isReadableNodeStream:g,isReadableStream:y,isReadableFinished:m,isReadableErrored:_,isWritable:w,isWritableNodeStream:S,isWritableStream:v,isWritableFinished:E,isWritableErrored:x,isNodeStream:k,willEmitClose:T,kIsClosedPromise:R}=un();let A;const L=()=>{};function M(r,h,c){var M,N;if(2===arguments.length?(c=h,h=s):null==h?h=s:u(h,"options"),l(c,"callback"),a(h.signal,"options.signal"),c=o(c),y(r)||v(r))return function(r,n,i){let s=!1,a=L;if(n.signal)if(a=()=>{s=!0,i.call(r,new e(void 0,{cause:n.signal.reason}))},n.signal.aborted)t.nextTick(a);else{A=A||qr().addAbortListener;const t=A(n.signal,a),e=i;i=o((...n)=>{t[d](),e.apply(r,n)})}const l=(...e)=>{s||t.nextTick(()=>i.apply(r,e))};return f(r[R].promise,l,l),L}(r,h,c);if(!k(r))throw new n("stream",["ReadableStream","WritableStream","Stream"],r);const D=null!==(M=h.readable)&&void 0!==M?M:g(r),O=null!==(N=h.writable)&&void 0!==N?N:S(r),P=r._writableState,I=r._readableState,C=()=>{r.writable||U()};let j=T(r)&&g(r)===D&&S(r)===O,W=E(r,!1);const U=()=>{W=!0,r.destroyed&&(j=!1),(!j||r.readable&&!D)&&(D&&!B||c.call(r))};let B=m(r,!1);const F=()=>{B=!0,r.destroyed&&(j=!1),(!j||r.writable&&!O)&&(O&&!W||c.call(r))},z=t=>{c.call(r,t)};let $=p(r);const G=()=>{$=!0;const t=x(r)||_(r);return t&&"boolean"!=typeof t?c.call(r,t):D&&!B&&g(r,!0)&&!m(r,!1)?c.call(r,new i):!O||W||E(r,!1)?void c.call(r):c.call(r,new i)},H=()=>{$=!0;const t=x(r)||_(r);if(t&&"boolean"!=typeof t)return c.call(r,t);c.call(r)},q=()=>{r.req.on("finish",U)};!function(t){return t.setHeader&&"function"==typeof t.abort}(r)?O&&!P&&(r.on("end",C),r.on("close",C)):(r.on("complete",U),j||r.on("abort",G),r.req?q():r.on("request",q)),j||"boolean"!=typeof r.aborted||r.on("aborted",G),r.on("end",F),r.on("finish",U),!1!==h.error&&r.on("error",z),r.on("close",G),$?t.nextTick(G):null!=P&&P.errorEmitted||null!=I&&I.errorEmitted?j||t.nextTick(H):(D||j&&!b(r)||!W&&!1!==w(r))&&(O||j&&!w(r)||!B&&!1!==b(r))?I&&r.req&&r.aborted&&t.nextTick(H):t.nextTick(H);const V=()=>{c=L,r.removeListener("aborted",G),r.removeListener("complete",U),r.removeListener("abort",G),r.removeListener("request",q),r.req&&r.req.removeListener("finish",U),r.removeListener("end",C),r.removeListener("close",C),r.removeListener("finish",U),r.removeListener("end",F),r.removeListener("error",z),r.removeListener("close",G)};if(h.signal&&!$){const n=()=>{const t=c;V(),t.call(r,new e(void 0,{cause:h.signal.reason}))};if(h.signal.aborted)t.nextTick(n);else{A=A||qr().addAbortListener;const t=A(h.signal,n),e=c;c=o((...n)=>{t[d](),e.apply(r,n)})}}return V}return on.exports=M,on.exports.finished=function(t,e){var r;let n=!1;return null===e&&(e=s),null!==(r=e)&&void 0!==r&&r.cleanup&&(h(e.cleanup,"cleanup"),n=e.cleanup),new c((r,i)=>{const s=M(t,e,t=>{n&&s(),t?i(t):r()})})},on.exports}function cn(){if(rn)return en;rn=1;const t=ln(),{aggregateTwoErrors:e,codes:{ERR_MULTIPLE_CALLBACK:r},AbortError:n}=Fr(),{Symbol:i}=Pr(),{kIsDestroyed:s,isDestroyed:o,isFinished:a,isServerRequest:l}=un(),u=i("kDestroy"),h=i("kConstruct");function c(t,e,r){t&&(t.stack,e&&!e.errored&&(e.errored=t),r&&!r.errored&&(r.errored=t))}function f(e,r,n){let i=!1;function s(r){if(i)return;i=!0;const s=e._readableState,o=e._writableState;c(r,o,s),o&&(o.closed=!0),s&&(s.closed=!0),"function"==typeof n&&n(r),r?t.nextTick(d,e,r):t.nextTick(p,e)}try{e._destroy(r||null,s)}catch(o){s(o)}}function d(t,e){b(t,e),p(t)}function p(t){const e=t._readableState,r=t._writableState;r&&(r.closeEmitted=!0),e&&(e.closeEmitted=!0),(null!=r&&r.emitClose||null!=e&&e.emitClose)&&t.emit("close")}function b(t,e){const r=t._readableState,n=t._writableState;null!=n&&n.errorEmitted||null!=r&&r.errorEmitted||(n&&(n.errorEmitted=!0),r&&(r.errorEmitted=!0),t.emit("error",e))}function g(e,r,n){const i=e._readableState,s=e._writableState;if(null!=s&&s.destroyed||null!=i&&i.destroyed)return this;null!=i&&i.autoDestroy||null!=s&&s.autoDestroy?e.destroy(r):r&&(r.stack,s&&!s.errored&&(s.errored=r),i&&!i.errored&&(i.errored=r),n?t.nextTick(b,e,r):b(e,r))}function y(e){let n=!1;function i(i){if(n)return void g(e,null!=i?i:new r);n=!0;const s=e._readableState,o=e._writableState,a=o||s;s&&(s.constructed=!0),o&&(o.constructed=!0),a.destroyed?e.emit(u,i):i?g(e,i,!0):t.nextTick(m,e)}try{e._construct(e=>{t.nextTick(i,e)})}catch(s){t.nextTick(i,s)}}function m(t){t.emit(h)}function _(t){return(null==t?void 0:t.setHeader)&&"function"==typeof t.abort}function w(t){t.emit("close")}function S(e,r){e.emit("error",r),t.nextTick(w,e)}return en={construct:function(e,r){if("function"!=typeof e._construct)return;const n=e._readableState,i=e._writableState;n&&(n.constructed=!1),i&&(i.constructed=!1),e.once(h,r),e.listenerCount(h)>1||t.nextTick(y,e)},destroyer:function(e,r){e&&!o(e)&&(r||a(e)||(r=new n),l(e)?(e.socket=null,e.destroy(r)):_(e)?e.abort():_(e.req)?e.req.abort():"function"==typeof e.destroy?e.destroy(r):"function"==typeof e.close?e.close():r?t.nextTick(S,e,r):t.nextTick(w,e),e.destroyed||(e[s]=!0))},destroy:function(t,r){const n=this._readableState,i=this._writableState,s=i||n;return null!=i&&i.destroyed||null!=n&&n.destroyed?("function"==typeof r&&r(),this):(c(t,i,n),i&&(i.destroyed=!0),n&&(n.destroyed=!0),s.constructed?f(this,t,r):this.once(u,function(n){f(this,e(n,t),r)}),this)},undestroy:function(){const t=this._readableState,e=this._writableState;t&&(t.constructed=!0,t.closed=!1,t.closeEmitted=!1,t.destroyed=!1,t.errored=null,t.errorEmitted=!1,t.reading=!1,t.ended=!1===t.readable,t.endEmitted=!1===t.readable),e&&(e.constructed=!0,e.destroyed=!1,e.closed=!1,e.closeEmitted=!1,e.errored=null,e.errorEmitted=!1,e.finalCalled=!1,e.prefinished=!1,e.ended=!1===e.writable,e.ending=!1===e.writable,e.finished=!1===e.writable)},errorOrDestroy:g}}function fn(){if(sn)return nn;sn=1;const{ArrayIsArray:t,ObjectSetPrototypeOf:e}=Pr(),{EventEmitter:r}=s;function n(t){r.call(this,t)}function i(e,r,n){if("function"==typeof e.prependListener)return e.prependListener(r,n);e._events&&e._events[r]?t(e._events[r])?e._events[r].unshift(n):e._events[r]=[n,e._events[r]]:e.on(r,n)}return e(n.prototype,r.prototype),e(n,r),n.prototype.pipe=function(t,e){const n=this;function s(e){t.writable&&!1===t.write(e)&&n.pause&&n.pause()}function o(){n.readable&&n.resume&&n.resume()}n.on("data",s),t.on("drain",o),t._isStdio||e&&!1===e.end||(n.on("end",l),n.on("close",u));let a=!1;function l(){a||(a=!0,t.end())}function u(){a||(a=!0,"function"==typeof t.destroy&&t.destroy())}function h(t){c(),0===r.listenerCount(this,"error")&&this.emit("error",t)}function c(){n.removeListener("data",s),t.removeListener("drain",o),n.removeListener("end",l),n.removeListener("close",u),n.removeListener("error",h),t.removeListener("error",h),n.removeListener("end",c),n.removeListener("close",c),t.removeListener("close",c)}return i(n,"error",h),i(t,"error",h),n.on("end",c),n.on("close",c),t.on("close",c),t.emit("pipe",n),t},nn={Stream:n,prependListener:i}}var dn,pn,bn,gn,yn,mn={exports:{}};function _n(){return dn||(dn=1,function(t){const{SymbolDispose:e}=Pr(),{AbortError:r,codes:n}=Fr(),{isNodeStream:i,isWebStream:s,kControllerErrorFunction:o}=un(),a=hn(),{ERR_INVALID_ARG_TYPE:l}=n;let u;t.exports.addAbortSignal=function(e,r){if(((t,e)=>{if("object"!=typeof t||!("aborted"in t))throw new l(e,"AbortSignal",t)})(e,"signal"),!i(r)&&!s(r))throw new l("stream",["ReadableStream","WritableStream","Stream"],r);return t.exports.addAbortSignalNoValidate(e,r)},t.exports.addAbortSignalNoValidate=function(t,n){if("object"!=typeof t||!("aborted"in t))return n;const s=i(n)?()=>{n.destroy(new r(void 0,{cause:t.reason}))}:()=>{n[o](new r(void 0,{cause:t.reason}))};if(t.aborted)s();else{u=u||qr().addAbortListener;const r=u(t,s);a(n,r[e])}return n}}(mn)),mn.exports}function wn(){if(yn)return gn;yn=1;const{MathFloor:t,NumberIsInteger:e}=Pr(),{validateInteger:r}=Kr(),{ERR_INVALID_ARG_VALUE:n}=Fr().codes;let i=16384,s=16;function o(t){return t?s:i}return gn={getHighWaterMark:function(r,i,s,a){const l=function(t,e,r){return null!=t.highWaterMark?t.highWaterMark:e?t[r]:null}(i,a,s);if(null!=l){if(!e(l)||l<0){throw new n(a?`options.${s}`:"options.highWaterMark",l)}return t(l)}return o(r.objectMode)},getDefaultHighWaterMark:o,setDefaultHighWaterMark:function(t,e){r(e,"value",0),t?s=e:i=e}}}var Sn,vn,En,xn,kn,Tn,Rn,An,Ln,Mn,Nn,Dn,On,Pn,In,Cn,jn,Wn,Un,Bn,Fn,zn,$n,Gn,Hn,qn={},Vn={exports:{}};function Yn(){if(vn)return qn;vn=1;var t=(Sn||(Sn=1,function(t,e){var r=c,n=r.Buffer;function i(t,e){for(var r in t)e[r]=t[r]}function s(t,e,r){return n(t,e,r)}n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow?t.exports=r:(i(r,e),e.Buffer=s),s.prototype=Object.create(n.prototype),i(n,s),s.from=function(t,e,r){if("number"==typeof t)throw new TypeError("Argument must not be a number");return n(t,e,r)},s.alloc=function(t,e,r){if("number"!=typeof t)throw new TypeError("Argument must be a number");var i=n(t);return void 0!==e?"string"==typeof r?i.fill(e,r):i.fill(e):i.fill(0),i},s.allocUnsafe=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return n(t)},s.allocUnsafeSlow=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return r.SlowBuffer(t)}}(Vn,Vn.exports)),Vn.exports).Buffer,e=t.isEncoding||function(t){switch((t=""+t)&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function r(r){var n;switch(this.encoding=function(r){var n=function(t){if(!t)return"utf8";for(var e;;)switch(t){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}(r);if("string"!=typeof n&&(t.isEncoding===e||!e(r)))throw new Error("Unknown encoding: "+r);return n||r}(r),this.encoding){case"utf16le":this.text=s,this.end=o,n=4;break;case"utf8":this.fillLast=i,n=4;break;case"base64":this.text=a,this.end=l,n=3;break;default:return this.write=u,void(this.end=h)}this.lastNeed=0,this.lastTotal=0,this.lastChar=t.allocUnsafe(n)}function n(t){return t<=127?0:t>>5==6?2:t>>4==14?3:t>>3==30?4:t>>6==2?-1:-2}function i(t){var e=this.lastTotal-this.lastNeed,r=function(t,e){if(128!=(192&e[0]))return t.lastNeed=0,"�";if(t.lastNeed>1&&e.length>1){if(128!=(192&e[1]))return t.lastNeed=1,"�";if(t.lastNeed>2&&e.length>2&&128!=(192&e[2]))return t.lastNeed=2,"�"}}(this,t);return void 0!==r?r:this.lastNeed<=t.length?(t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(t.copy(this.lastChar,e,0,t.length),void(this.lastNeed-=t.length))}function s(t,e){if((t.length-e)%2==0){var r=t.toString("utf16le",e);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function o(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,r)}return e}function a(t,e){var r=(t.length-e)%3;return 0===r?t.toString("base64",e):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-r))}function l(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function u(t){return t.toString(this.encoding)}function h(t){return t&&t.length?this.write(t):""}return qn.StringDecoder=r,r.prototype.write=function(t){if(0===t.length)return"";var e,r;if(this.lastNeed){if(void 0===(e=this.fillLast(t)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<t.length?e?e+this.text(t,r):this.text(t,r):e||""},r.prototype.end=function(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"�":e},r.prototype.text=function(t,e){var r=function(t,e,r){var i=e.length-1;if(i<r)return 0;var s=n(e[i]);if(s>=0)return s>0&&(t.lastNeed=s-1),s;if(--i<r||-2===s)return 0;if(s=n(e[i]),s>=0)return s>0&&(t.lastNeed=s-2),s;if(--i<r||-2===s)return 0;if(s=n(e[i]),s>=0)return s>0&&(2===s?s=0:t.lastNeed=s-3),s;return 0}(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=r;var i=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,i),t.toString("utf8",e,i)},r.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length},qn}function Qn(){if(xn)return En;xn=1;const t=ln(),{PromisePrototypeThen:e,SymbolAsyncIterator:r,SymbolIterator:n}=Pr(),{Buffer:i}=c,{ERR_INVALID_ARG_TYPE:s,ERR_STREAM_NULL_VALUES:o}=Fr().codes;return En=function(a,l,u){let h,c;if("string"==typeof l||l instanceof i)return new a({objectMode:!0,...u,read(){this.push(l),this.push(null)}});if(l&&l[r])c=!0,h=l[r]();else{if(!l||!l[n])throw new s("iterable",["Iterable"],l);c=!1,h=l[n]()}const f=new a({objectMode:!0,highWaterMark:1,...u});let d=!1;return f._read=function(){d||(d=!0,async function(){for(;;){try{const{value:t,done:e}=c?await h.next():h.next();if(e)f.push(null);else{const e=t&&"function"==typeof t.then?await t:t;if(null===e)throw d=!1,new o;if(f.push(e))continue;d=!1}}catch(t){f.destroy(t)}break}}())},f._destroy=function(r,n){e(async function(t){const e=null!=t,r="function"==typeof h.throw;if(e&&r){const{value:e,done:r}=await h.throw(t);if(await e,r)return}if("function"==typeof h.return){const{value:t}=await h.return();await t}}(r),()=>t.nextTick(n,r),e=>t.nextTick(n,e||r))},f}}function Kn(){if(Tn)return kn;Tn=1;const t=ln(),{ArrayPrototypeIndexOf:e,NumberIsInteger:r,NumberIsNaN:n,NumberParseInt:i,ObjectDefineProperties:o,ObjectKeys:a,ObjectSetPrototypeOf:l,Promise:u,SafeSet:h,SymbolAsyncDispose:f,SymbolAsyncIterator:d,Symbol:p}=Pr();kn=q,q.ReadableState=H;const{EventEmitter:b}=s,{Stream:g,prependListener:y}=fn(),{Buffer:m}=c,{addAbortSignal:_}=_n(),w=hn();let S=qr().debuglog("stream",t=>{S=t});const v=function(){if(bn)return pn;bn=1;const{StringPrototypeSlice:t,SymbolIterator:e,TypedArrayPrototypeSet:r,Uint8Array:n}=Pr(),{Buffer:i}=c,{inspect:s}=qr();return pn=class{constructor(){this.head=null,this.tail=null,this.length=0}push(t){const e={data:t,next:null};this.length>0?this.tail.next=e:this.head=e,this.tail=e,++this.length}unshift(t){const e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length}shift(){if(0===this.length)return;const t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}clear(){this.head=this.tail=null,this.length=0}join(t){if(0===this.length)return"";let e=this.head,r=""+e.data;for(;null!==(e=e.next);)r+=t+e.data;return r}concat(t){if(0===this.length)return i.alloc(0);const e=i.allocUnsafe(t>>>0);let n=this.head,s=0;for(;n;)r(e,n.data,s),s+=n.data.length,n=n.next;return e}consume(t,e){const r=this.head.data;if(t<r.length){const e=r.slice(0,t);return this.head.data=r.slice(t),e}return t===r.length?this.shift():e?this._getString(t):this._getBuffer(t)}first(){return this.head.data}*[e](){for(let t=this.head;t;t=t.next)yield t.data}_getString(e){let r="",n=this.head,i=0;do{const s=n.data;if(!(e>s.length)){e===s.length?(r+=s,++i,n.next?this.head=n.next:this.head=this.tail=null):(r+=t(s,0,e),this.head=n,n.data=t(s,e));break}r+=s,e-=s.length,++i}while(null!==(n=n.next));return this.length-=i,r}_getBuffer(t){const e=i.allocUnsafe(t),s=t;let o=this.head,a=0;do{const i=o.data;if(!(t>i.length)){t===i.length?(r(e,i,s-t),++a,o.next?this.head=o.next:this.head=this.tail=null):(r(e,new n(i.buffer,i.byteOffset,t),s-t),this.head=o,o.data=i.slice(t));break}r(e,i,s-t),t-=i.length,++a}while(null!==(o=o.next));return this.length-=a,e}[/* @__PURE__ */Symbol.for("nodejs.util.inspect.custom")](t,e){return s(this,{...e,depth:0,customInspect:!1})}}}(),E=cn(),{getHighWaterMark:x,getDefaultHighWaterMark:k}=wn(),{aggregateTwoErrors:T,codes:{ERR_INVALID_ARG_TYPE:R,ERR_METHOD_NOT_IMPLEMENTED:A,ERR_OUT_OF_RANGE:L,ERR_STREAM_PUSH_AFTER_EOF:M,ERR_STREAM_UNSHIFT_AFTER_END_EVENT:N},AbortError:D}=Fr(),{validateObject:O}=Kr(),P=p("kPaused"),{StringDecoder:I}=Yn(),C=Qn();l(q.prototype,g.prototype),l(q,g);const j=()=>{},{errorOrDestroy:W}=E,U=1,B=16,F=32,z=2048,$=4096;function G(t){return{enumerable:!1,get(){return 0!==(this.state&t)},set(e){e?this.state|=t:this.state&=~t}}}function H(t,e,r){"boolean"!=typeof r&&(r=e instanceof Xn()),this.state=z|$|B|F,t&&t.objectMode&&(this.state|=U),r&&t&&t.readableObjectMode&&(this.state|=U),this.highWaterMark=t?x(this,t,"readableHighWaterMark",r):k(!1),this.buffer=new v,this.length=0,this.pipes=[],this.flowing=null,this[P]=null,t&&!1===t.emitClose&&(this.state&=~z),t&&!1===t.autoDestroy&&(this.state&=~$),this.errored=null,this.defaultEncoding=t&&t.defaultEncoding||"utf8",this.awaitDrainWriters=null,this.decoder=null,this.encoding=null,t&&t.encoding&&(this.decoder=new I(t.encoding),this.encoding=t.encoding)}function q(t){if(!(this instanceof q))return new q(t);const e=this instanceof Xn();this._readableState=new H(t,this,e),t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.construct&&(this._construct=t.construct),t.signal&&!e&&_(t.signal,this)),g.call(this,t),E.construct(this,()=>{this._readableState.needReadable&&J(this,this._readableState)})}function V(t,e,r,n){S("readableAddChunk",e);const i=t._readableState;let s;if(0===(i.state&U)&&("string"==typeof e?(r=r||i.defaultEncoding,i.encoding!==r&&(n&&i.encoding?e=m.from(e,r).toString(i.encoding):(e=m.from(e,r),r=""))):e instanceof m?r="":g._isUint8Array(e)?(e=g._uint8ArrayToBuffer(e),r=""):null!=e&&(s=new R("chunk",["string","Buffer","Uint8Array"],e))),s)W(t,s);else if(null===e)i.state&=-9,function(t,e){if(S("onEofChunk"),e.ended)return;if(e.decoder){const t=e.decoder.end();t&&t.length&&(e.buffer.push(t),e.length+=e.objectMode?1:t.length)}e.ended=!0,e.sync?K(t):(e.needReadable=!1,e.emittedReadable=!0,Z(t))}(t,i);else if(0!==(i.state&U)||e&&e.length>0)if(n)if(4&i.state)W(t,new N);else{if(i.destroyed||i.errored)return!1;Y(t,i,e,!0)}else if(i.ended)W(t,new M);else{if(i.destroyed||i.errored)return!1;i.state&=-9,i.decoder&&!r?(e=i.decoder.write(e),i.objectMode||0!==e.length?Y(t,i,e,!1):J(t,i)):Y(t,i,e,!1)}else n||(i.state&=-9,J(t,i));return!i.ended&&(i.length<i.highWaterMark||0===i.length)}function Y(t,e,r,n){e.flowing&&0===e.length&&!e.sync&&t.listenerCount("data")>0?(65536&e.state?e.awaitDrainWriters.clear():e.awaitDrainWriters=null,e.dataEmitted=!0,t.emit("data",r)):(e.length+=e.objectMode?1:r.length,n?e.buffer.unshift(r):e.buffer.push(r),64&e.state&&K(t)),J(t,e)}o(H.prototype,{objectMode:G(U),ended:G(2),endEmitted:G(4),reading:G(8),constructed:G(B),sync:G(F),needReadable:G(64),emittedReadable:G(128),readableListening:G(256),resumeScheduled:G(512),errorEmitted:G(1024),emitClose:G(z),autoDestroy:G($),destroyed:G(8192),closed:G(16384),closeEmitted:G(32768),multiAwaitDrain:G(65536),readingMore:G(1<<17),dataEmitted:G(1<<18)}),q.prototype.destroy=E.destroy,q.prototype._undestroy=E.undestroy,q.prototype._destroy=function(t,e){e(t)},q.prototype[b.captureRejectionSymbol]=function(t){this.destroy(t)},q.prototype[f]=function(){let t;return this.destroyed||(t=this.readableEnded?null:new D,this.destroy(t)),new u((e,r)=>w(this,n=>n&&n!==t?r(n):e(null)))},q.prototype.push=function(t,e){return V(this,t,e,!1)},q.prototype.unshift=function(t,e){return V(this,t,e,!0)},q.prototype.isPaused=function(){const t=this._readableState;return!0===t[P]||!1===t.flowing},q.prototype.setEncoding=function(t){const e=new I(t);this._readableState.decoder=e,this._readableState.encoding=this._readableState.decoder.encoding;const r=this._readableState.buffer;let n="";for(const i of r)n+=e.write(i);return r.clear(),""!==n&&r.push(n),this._readableState.length=n.length,this};function Q(t,e){return t<=0||0===e.length&&e.ended?0:0!==(e.state&U)?1:n(t)?e.flowing&&e.length?e.buffer.first().length:e.length:t<=e.length?t:e.ended?e.length:0}function K(e){const r=e._readableState;S("emitReadable",r.needReadable,r.emittedReadable),r.needReadable=!1,r.emittedReadable||(S("emitReadable",r.flowing),r.emittedReadable=!0,t.nextTick(Z,e))}function Z(t){const e=t._readableState;S("emitReadable_",e.destroyed,e.length,e.ended),e.destroyed||e.errored||!e.length&&!e.ended||(t.emit("readable"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,nt(t)}function J(e,r){!r.readingMore&&r.constructed&&(r.readingMore=!0,t.nextTick(X,e,r))}function X(t,e){for(;!e.reading&&!e.ended&&(e.length<e.highWaterMark||e.flowing&&0===e.length);){const r=e.length;if(S("maybeReadMore read 0"),t.read(0),r===e.length)break}e.readingMore=!1}function tt(t){const e=t._readableState;e.readableListening=t.listenerCount("readable")>0,e.resumeScheduled&&!1===e[P]?e.flowing=!0:t.listenerCount("data")>0?t.resume():e.readableListening||(e.flowing=null)}function et(t){S("readable nexttick read 0"),t.read(0)}function rt(t,e){S("resume",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit("resume"),nt(t),e.flowing&&!e.reading&&t.read(0)}function nt(t){const e=t._readableState;for(S("flow",e.flowing);e.flowing&&null!==t.read(););}function it(t,e){"function"!=typeof t.read&&(t=q.wrap(t,{objectMode:!0}));const r=async function*(t,e){let r,n=j;function i(e){this===t?(n(),n=j):n=e}t.on("readable",i);const s=w(t,{writable:!1},t=>{r=t?T(r,t):null,n(),n=j});try{for(;;){const e=t.destroyed?null:t.read();if(null!==e)yield e;else{if(r)throw r;if(null===r)return;await new u(i)}}}catch(o){throw r=T(r,o),r}finally{!r&&!1===(null==e?void 0:e.destroyOnReturn)||void 0!==r&&!t._readableState.autoDestroy?(t.off("readable",i),s()):E.destroyer(t,null)}}(t,e);return r.stream=t,r}function st(t,e){if(0===e.length)return null;let r;return e.objectMode?r=e.buffer.shift():!t||t>=e.length?(r=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.first():e.buffer.concat(e.length),e.buffer.clear()):r=e.buffer.consume(t,e.decoder),r}function ot(e){const r=e._readableState;S("endReadable",r.endEmitted),r.endEmitted||(r.ended=!0,t.nextTick(at,r,e))}function at(e,r){if(S("endReadableNT",e.endEmitted,e.length),!e.errored&&!e.closeEmitted&&!e.endEmitted&&0===e.length)if(e.endEmitted=!0,r.emit("end"),r.writable&&!1===r.allowHalfOpen)t.nextTick(lt,r);else if(e.autoDestroy){const t=r._writableState;(!t||t.autoDestroy&&(t.finished||!1===t.writable))&&r.destroy()}}function lt(t){t.writable&&!t.writableEnded&&!t.destroyed&&t.end()}let ut;function ht(){return void 0===ut&&(ut={}),ut}return q.prototype.read=function(t){S("read",t),void 0===t?t=NaN:r(t)||(t=i(t,10));const e=this._readableState,n=t;if(t>e.highWaterMark&&(e.highWaterMark=function(t){if(t>1073741824)throw new L("size","<= 1GiB",t);return t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,++t}(t)),0!==t&&(e.state&=-129),0===t&&e.needReadable&&((0!==e.highWaterMark?e.length>=e.highWaterMark:e.length>0)||e.ended))return S("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?ot(this):K(this),null;if(0===(t=Q(t,e))&&e.ended)return 0===e.length&&ot(this),null;let s,o=!!(64&e.state);if(S("need readable",o),(0===e.length||e.length-t<e.highWaterMark)&&(o=!0,S("length less than watermark",o)),e.ended||e.reading||e.destroyed||e.errored||!e.constructed)o=!1,S("reading, ended or constructing",o);else if(o){S("do read"),e.state|=8|F,0===e.length&&(e.state|=64);try{this._read(e.highWaterMark)}catch(a){W(this,a)}e.state&=~F,e.reading||(t=Q(n,e))}return s=t>0?st(t,e):null,null===s?(e.needReadable=e.length<=e.highWaterMark,t=0):(e.length-=t,e.multiAwaitDrain?e.awaitDrainWriters.clear():e.awaitDrainWriters=null),0===e.length&&(e.ended||(e.needReadable=!0),n!==t&&e.ended&&ot(this)),null===s||e.errorEmitted||e.closeEmitted||(e.dataEmitted=!0,this.emit("data",s)),s},q.prototype._read=function(t){throw new A("_read()")},q.prototype.pipe=function(e,r){const n=this,i=this._readableState;1===i.pipes.length&&(i.multiAwaitDrain||(i.multiAwaitDrain=!0,i.awaitDrainWriters=new h(i.awaitDrainWriters?[i.awaitDrainWriters]:[]))),i.pipes.push(e),S("pipe count=%d opts=%j",i.pipes.length,r);const s=(!r||!1!==r.end)&&e!==t.stdout&&e!==t.stderr?a:g;function o(t,r){S("onunpipe"),t===n&&r&&!1===r.hasUnpiped&&(r.hasUnpiped=!0,function(){S("cleanup"),e.removeListener("close",p),e.removeListener("finish",b),l&&e.removeListener("drain",l);e.removeListener("error",d),e.removeListener("unpipe",o),n.removeListener("end",a),n.removeListener("end",g),n.removeListener("data",f),u=!0,l&&i.awaitDrainWriters&&(!e._writableState||e._writableState.needDrain)&&l()}())}function a(){S("onend"),e.end()}let l;i.endEmitted?t.nextTick(s):n.once("end",s),e.on("unpipe",o);let u=!1;function c(){u||(1===i.pipes.length&&i.pipes[0]===e?(S("false write response, pause",0),i.awaitDrainWriters=e,i.multiAwaitDrain=!1):i.pipes.length>1&&i.pipes.includes(e)&&(S("false write response, pause",i.awaitDrainWriters.size),i.awaitDrainWriters.add(e)),n.pause()),l||(l=function(t,e){return function(){const r=t._readableState;r.awaitDrainWriters===e?(S("pipeOnDrain",1),r.awaitDrainWriters=null):r.multiAwaitDrain&&(S("pipeOnDrain",r.awaitDrainWriters.size),r.awaitDrainWriters.delete(e)),r.awaitDrainWriters&&0!==r.awaitDrainWriters.size||!t.listenerCount("data")||t.resume()}}(n,e),e.on("drain",l))}function f(t){S("ondata");const r=e.write(t);S("dest.write",r),!1===r&&c()}function d(t){if(S("onerror",t),g(),e.removeListener("error",d),0===e.listenerCount("error")){const r=e._writableState||e._readableState;r&&!r.errorEmitted?W(e,t):e.emit("error",t)}}function p(){e.removeListener("finish",b),g()}function b(){S("onfinish"),e.removeListener("close",p),g()}function g(){S("unpipe"),n.unpipe(e)}return n.on("data",f),y(e,"error",d),e.once("close",p),e.once("finish",b),e.emit("pipe",n),!0===e.writableNeedDrain?c():i.flowing||(S("pipe resume"),n.resume()),e},q.prototype.unpipe=function(t){const r=this._readableState;if(0===r.pipes.length)return this;if(!t){const t=r.pipes;r.pipes=[],this.pause();for(let e=0;e<t.length;e++)t[e].emit("unpipe",this,{hasUnpiped:!1});return this}const n=e(r.pipes,t);return-1===n||(r.pipes.splice(n,1),0===r.pipes.length&&this.pause(),t.emit("unpipe",this,{hasUnpiped:!1})),this},q.prototype.on=function(e,r){const n=g.prototype.on.call(this,e,r),i=this._readableState;return"data"===e?(i.readableListening=this.listenerCount("readable")>0,!1!==i.flowing&&this.resume()):"readable"===e&&(i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,S("on readable",i.length,i.reading),i.length?K(this):i.reading||t.nextTick(et,this))),n},q.prototype.addListener=q.prototype.on,q.prototype.removeListener=function(e,r){const n=g.prototype.removeListener.call(this,e,r);return"readable"===e&&t.nextTick(tt,this),n},q.prototype.off=q.prototype.removeListener,q.prototype.removeAllListeners=function(e){const r=g.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||t.nextTick(tt,this),r},q.prototype.resume=function(){const e=this._readableState;return e.flowing||(S("resume"),e.flowing=!e.readableListening,function(e,r){r.resumeScheduled||(r.resumeScheduled=!0,t.nextTick(rt,e,r))}(this,e)),e[P]=!1,this},q.prototype.pause=function(){return S("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(S("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState[P]=!0,this},q.prototype.wrap=function(t){let e=!1;t.on("data",r=>{!this.push(r)&&t.pause&&(e=!0,t.pause())}),t.on("end",()=>{this.push(null)}),t.on("error",t=>{W(this,t)}),t.on("close",()=>{this.destroy()}),t.on("destroy",()=>{this.destroy()}),this._read=()=>{e&&t.resume&&(e=!1,t.resume())};const r=a(t);for(let n=1;n<r.length;n++){const e=r[n];void 0===this[e]&&"function"==typeof t[e]&&(this[e]=t[e].bind(t))}return this},q.prototype[d]=function(){return it(this)},q.prototype.iterator=function(t){return void 0!==t&&O(t,"options"),it(this,t)},o(q.prototype,{readable:{__proto__:null,get(){const t=this._readableState;return!(!t||!1===t.readable||t.destroyed||t.errorEmitted||t.endEmitted)},set(t){this._readableState&&(this._readableState.readable=!!t)}},readableDidRead:{__proto__:null,enumerable:!1,get:function(){return this._readableState.dataEmitted}},readableAborted:{__proto__:null,enumerable:!1,get:function(){return!(!1===this._readableState.readable||!this._readableState.destroyed&&!this._readableState.errored||this._readableState.endEmitted)}},readableHighWaterMark:{__proto__:null,enumerable:!1,get:function(){return this._readableState.highWaterMark}},readableBuffer:{__proto__:null,enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}},readableFlowing:{__proto__:null,enumerable:!1,get:function(){return this._readableState.flowing},set:function(t){this._readableState&&(this._readableState.flowing=t)}},readableLength:{__proto__:null,enumerable:!1,get(){return this._readableState.length}},readableObjectMode:{__proto__:null,enumerable:!1,get(){return!!this._readableState&&this._readableState.objectMode}},readableEncoding:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.encoding:null}},errored:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.errored:null}},closed:{__proto__:null,get(){return!!this._readableState&&this._readableState.closed}},destroyed:{__proto__:null,enumerable:!1,get(){return!!this._readableState&&this._readableState.destroyed},set(t){this._readableState&&(this._readableState.destroyed=t)}},readableEnded:{__proto__:null,enumerable:!1,get(){return!!this._readableState&&this._readableState.endEmitted}}}),o(H.prototype,{pipesCount:{__proto__:null,get(){return this.pipes.length}},paused:{__proto__:null,get(){return!1!==this[P]},set(t){this[P]=!!t}}}),q._fromList=st,q.from=function(t,e){return C(q,t,e)},q.fromWeb=function(t,e){return ht().newStreamReadableFromReadableStream(t,e)},q.toWeb=function(t,e){return ht().newReadableStreamFromStreamReadable(t,e)},q.wrap=function(t,e){var r,n;return new q({objectMode:null===(r=null!==(n=t.readableObjectMode)&&void 0!==n?n:t.objectMode)||void 0===r||r,...e,destroy(e,r){E.destroyer(t,e),r(e)}}).wrap(t)},kn}function Zn(){if(An)return Rn;An=1;const t=ln(),{ArrayPrototypeSlice:e,Error:r,FunctionPrototypeSymbolHasInstance:n,ObjectDefineProperty:i,ObjectDefineProperties:o,ObjectSetPrototypeOf:a,StringPrototypeToLowerCase:l,Symbol:u,SymbolHasInstance:h}=Pr();Rn=O,O.WritableState=N;const{EventEmitter:f}=s,d=fn().Stream,{Buffer:p}=c,b=cn(),{addAbortSignal:g}=_n(),{getHighWaterMark:y,getDefaultHighWaterMark:m}=wn(),{ERR_INVALID_ARG_TYPE:_,ERR_METHOD_NOT_IMPLEMENTED:w,ERR_MULTIPLE_CALLBACK:S,ERR_STREAM_CANNOT_PIPE:v,ERR_STREAM_DESTROYED:E,ERR_STREAM_ALREADY_FINISHED:x,ERR_STREAM_NULL_VALUES:k,ERR_STREAM_WRITE_AFTER_END:T,ERR_UNKNOWN_ENCODING:R}=Fr().codes,{errorOrDestroy:A}=b;function L(){}a(O.prototype,d.prototype),a(O,d);const M=u("kOnFinished");function N(t,e,r){"boolean"!=typeof r&&(r=e instanceof Xn()),this.objectMode=!(!t||!t.objectMode),r&&(this.objectMode=this.objectMode||!(!t||!t.writableObjectMode)),this.highWaterMark=t?y(this,t,"writableHighWaterMark",r):m(!1),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;const n=!(!t||!1!==t.decodeStrings);this.decodeStrings=!n,this.defaultEncoding=t&&t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=j.bind(void 0,e),this.writecb=null,this.writelen=0,this.afterWriteTickInfo=null,D(this),this.pendingcb=0,this.constructed=!0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!t||!1!==t.emitClose,this.autoDestroy=!t||!1!==t.autoDestroy,this.errored=null,this.closed=!1,this.closeEmitted=!1,this[M]=[]}function D(t){t.buffered=[],t.bufferedIndex=0,t.allBuffers=!0,t.allNoop=!0}function O(t){const e=this instanceof Xn();if(!e&&!n(O,this))return new O(t);this._writableState=new N(t,this,e),t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final),"function"==typeof t.construct&&(this._construct=t.construct),t.signal&&g(t.signal,this)),d.call(this,t),b.construct(this,()=>{const t=this._writableState;t.writing||F(this,t),G(this,t)})}function P(e,r,n,i){const s=e._writableState;if("function"==typeof n)i=n,n=s.defaultEncoding;else{if(n){if("buffer"!==n&&!p.isEncoding(n))throw new R(n)}else n=s.defaultEncoding;"function"!=typeof i&&(i=L)}if(null===r)throw new k;if(!s.objectMode)if("string"==typeof r)!1!==s.decodeStrings&&(r=p.from(r,n),n="buffer");else if(r instanceof p)n="buffer";else{if(!d._isUint8Array(r))throw new _("chunk",["string","Buffer","Uint8Array"],r);r=d._uint8ArrayToBuffer(r),n="buffer"}let o;return s.ending?o=new T:s.destroyed&&(o=new E("write")),o?(t.nextTick(i,o),A(e,o,!0),o):(s.pendingcb++,function(t,e,r,n,i){const s=e.objectMode?1:r.length;e.length+=s;const o=e.length<e.highWaterMark;o||(e.needDrain=!0);e.writing||e.corked||e.errored||!e.constructed?(e.buffered.push({chunk:r,encoding:n,callback:i}),e.allBuffers&&"buffer"!==n&&(e.allBuffers=!1),e.allNoop&&i!==L&&(e.allNoop=!1)):(e.writelen=s,e.writecb=i,e.writing=!0,e.sync=!0,t._write(r,n,e.onwrite),e.sync=!1);return o&&!e.errored&&!e.destroyed}(e,s,r,n,i))}function I(t,e,r,n,i,s,o){e.writelen=n,e.writecb=o,e.writing=!0,e.sync=!0,e.destroyed?e.onwrite(new E("write")):r?t._writev(i,e.onwrite):t._write(i,s,e.onwrite),e.sync=!1}function C(t,e,r,n){--e.pendingcb,n(r),B(e),A(t,r)}function j(e,r){const n=e._writableState,i=n.sync,s=n.writecb;"function"==typeof s?(n.writing=!1,n.writecb=null,n.length-=n.writelen,n.writelen=0,r?(r.stack,n.errored||(n.errored=r),e._readableState&&!e._readableState.errored&&(e._readableState.errored=r),i?t.nextTick(C,e,n,r,s):C(e,n,r,s)):(n.buffered.length>n.bufferedIndex&&F(e,n),i?null!==n.afterWriteTickInfo&&n.afterWriteTickInfo.cb===s?n.afterWriteTickInfo.count++:(n.afterWriteTickInfo={count:1,cb:s,stream:e,state:n},t.nextTick(W,n.afterWriteTickInfo)):U(e,n,1,s))):A(e,new S)}function W({stream:t,state:e,count:r,cb:n}){return e.afterWriteTickInfo=null,U(t,e,r,n)}function U(t,e,r,n){for(!e.ending&&!t.destroyed&&0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"));r-- >0;)e.pendingcb--,n();e.destroyed&&B(e),G(t,e)}function B(t){if(t.writing)return;for(let i=t.bufferedIndex;i<t.buffered.length;++i){var e;const{chunk:r,callback:n}=t.buffered[i],s=t.objectMode?1:r.length;t.length-=s,n(null!==(e=t.errored)&&void 0!==e?e:new E("write"))}const r=t[M].splice(0);for(let i=0;i<r.length;i++){var n;r[i](null!==(n=t.errored)&&void 0!==n?n:new E("end"))}D(t)}function F(t,r){if(r.corked||r.bufferProcessing||r.destroyed||!r.constructed)return;const{buffered:n,bufferedIndex:i,objectMode:s}=r,o=n.length-i;if(!o)return;let a=i;if(r.bufferProcessing=!0,o>1&&t._writev){r.pendingcb-=o-1;const i=r.allNoop?L:t=>{for(let e=a;e<n.length;++e)n[e].callback(t)},s=r.allNoop&&0===a?n:e(n,a);s.allBuffers=r.allBuffers,I(t,r,!0,r.length,s,"",i),D(r)}else{do{const{chunk:e,encoding:i,callback:o}=n[a];n[a++]=null;I(t,r,!1,s?1:e.length,e,i,o)}while(a<n.length&&!r.writing);a===n.length?D(r):a>256?(n.splice(0,a),r.bufferedIndex=0):r.bufferedIndex=a}r.bufferProcessing=!1}function z(t){return t.ending&&!t.destroyed&&t.constructed&&0===t.length&&!t.errored&&0===t.buffered.length&&!t.finished&&!t.writing&&!t.errorEmitted&&!t.closeEmitted}function $(e,r){r.prefinished||r.finalCalled||("function"!=typeof e._final||r.destroyed?(r.prefinished=!0,e.emit("prefinish")):(r.finalCalled=!0,function(e,r){let n=!1;function i(i){if(n)A(e,null!=i?i:S());else if(n=!0,r.pendingcb--,i){const t=r[M].splice(0);for(let e=0;e<t.length;e++)t[e](i);A(e,i,r.sync)}else z(r)&&(r.prefinished=!0,e.emit("prefinish"),r.pendingcb++,t.nextTick(H,e,r))}r.sync=!0,r.pendingcb++;try{e._final(i)}catch(s){i(s)}r.sync=!1}(e,r)))}function G(e,r,n){z(r)&&($(e,r),0===r.pendingcb&&(n?(r.pendingcb++,t.nextTick((t,e)=>{z(e)?H(t,e):e.pendingcb--},e,r)):z(r)&&(r.pendingcb++,H(e,r))))}function H(t,e){e.pendingcb--,e.finished=!0;const r=e[M].splice(0);for(let n=0;n<r.length;n++)r[n]();if(t.emit("finish"),e.autoDestroy){const e=t._readableState;(!e||e.autoDestroy&&(e.endEmitted||!1===e.readable))&&t.destroy()}}N.prototype.getBuffer=function(){return e(this.buffered,this.bufferedIndex)},i(N.prototype,"bufferedRequestCount",{__proto__:null,get(){return this.buffered.length-this.bufferedIndex}}),i(O,h,{__proto__:null,value:function(t){return!!n(this,t)||this===O&&(t&&t._writableState instanceof N)}}),O.prototype.pipe=function(){A(this,new v)},O.prototype.write=function(t,e,r){return!0===P(this,t,e,r)},O.prototype.cork=function(){this._writableState.corked++},O.prototype.uncork=function(){const t=this._writableState;t.corked&&(t.corked--,t.writing||F(this,t))},O.prototype.setDefaultEncoding=function(t){if("string"==typeof t&&(t=l(t)),!p.isEncoding(t))throw new R(t);return this._writableState.defaultEncoding=t,this},O.prototype._write=function(t,e,r){if(!this._writev)throw new w("_write()");this._writev([{chunk:t,encoding:e}],r)},O.prototype._writev=null,O.prototype.end=function(e,n,i){const s=this._writableState;let o;if("function"==typeof e?(i=e,e=null,n=null):"function"==typeof n&&(i=n,n=null),null!=e){const t=P(this,e,n);t instanceof r&&(o=t)}return s.corked&&(s.corked=1,this.uncork()),o||(s.errored||s.ending?s.finished?o=new x("end"):s.destroyed&&(o=new E("end")):(s.ending=!0,G(this,s,!0),s.ended=!0)),"function"==typeof i&&(o||s.finished?t.nextTick(i,o):s[M].push(i)),this},o(O.prototype,{closed:{__proto__:null,get(){return!!this._writableState&&this._writableState.closed}},destroyed:{__proto__:null,get(){return!!this._writableState&&this._writableState.destroyed},set(t){this._writableState&&(this._writableState.destroyed=t)}},writable:{__proto__:null,get(){const t=this._writableState;return!(!t||!1===t.writable||t.destroyed||t.errored||t.ending||t.ended)},set(t){this._writableState&&(this._writableState.writable=!!t)}},writableFinished:{__proto__:null,get(){return!!this._writableState&&this._writableState.finished}},writableObjectMode:{__proto__:null,get(){return!!this._writableState&&this._writableState.objectMode}},writableBuffer:{__proto__:null,get(){return this._writableState&&this._writableState.getBuffer()}},writableEnded:{__proto__:null,get(){return!!this._writableState&&this._writableState.ending}},writableNeedDrain:{__proto__:null,get(){const t=this._writableState;return!!t&&(!t.destroyed&&!t.ending&&t.needDrain)}},writableHighWaterMark:{__proto__:null,get(){return this._writableState&&this._writableState.highWaterMark}},writableCorked:{__proto__:null,get(){return this._writableState?this._writableState.corked:0}},writableLength:{__proto__:null,get(){return this._writableState&&this._writableState.length}},errored:{__proto__:null,enumerable:!1,get(){return this._writableState?this._writableState.errored:null}},writableAborted:{__proto__:null,enumerable:!1,get:function(){return!(!1===this._writableState.writable||!this._writableState.destroyed&&!this._writableState.errored||this._writableState.finished)}}});const q=b.destroy;let V;function Y(){return void 0===V&&(V={}),V}return O.prototype.destroy=function(e,r){const n=this._writableState;return!n.destroyed&&(n.bufferedIndex<n.buffered.length||n[M].length)&&t.nextTick(B,n),q.call(this,e,r),this},O.prototype._undestroy=b.undestroy,O.prototype._destroy=function(t,e){e(t)},O.prototype[f.captureRejectionSymbol]=function(t){this.destroy(t)},O.fromWeb=function(t,e){return Y().newStreamWritableFromWritableStream(t,e)},O.toWeb=function(t){return Y().newWritableStreamFromStreamWritable(t)},Rn}function Jn(){if(Mn)return Ln;Mn=1;const t=ln(),e=c,{isReadable:r,isWritable:n,isIterable:i,isNodeStream:s,isReadableNodeStream:o,isWritableNodeStream:a,isDuplexNodeStream:l,isReadableStream:u,isWritableStream:h}=un(),f=hn(),{AbortError:d,codes:{ERR_INVALID_ARG_TYPE:p,ERR_INVALID_RETURN_VALUE:b}}=Fr(),{destroyer:g}=cn(),y=Xn(),m=Kn(),_=Zn(),{createDeferredPromise:w}=qr(),S=Qn(),v=globalThis.Blob||e.Blob,E=void 0!==v?function(t){return t instanceof v}:function(t){return!1},x=globalThis.AbortController||Hr().AbortController,{FunctionPrototypeCall:k}=Pr();class T extends y{constructor(t){super(t),!1===(null==t?void 0:t.readable)&&(this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0),!1===(null==t?void 0:t.writable)&&(this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0)}}function R(t){const e=t.readable&&"function"!=typeof t.readable.read?m.wrap(t.readable):t.readable,i=t.writable;let s,o,a,l,u,h=!!r(e),c=!!n(i);function p(t){const e=l;l=null,e?e(t):t&&u.destroy(t)}return u=new T({readableObjectMode:!(null==e||!e.readableObjectMode),writableObjectMode:!(null==i||!i.writableObjectMode),readable:h,writable:c}),c&&(f(i,t=>{c=!1,t&&g(e,t),p(t)}),u._write=function(t,e,r){i.write(t,e)?r():s=r},u._final=function(t){i.end(),o=t},i.on("drain",function(){if(s){const t=s;s=null,t()}}),i.on("finish",function(){if(o){const t=o;o=null,t()}})),h&&(f(e,t=>{h=!1,t&&g(e,t),p(t)}),e.on("readable",function(){if(a){const t=a;a=null,t()}}),e.on("end",function(){u.push(null)}),u._read=function(){for(;;){const t=e.read();if(null===t)return void(a=u._read);if(!u.push(t))return}}),u._destroy=function(t,r){t||null===l||(t=new d),a=null,s=null,o=null,null===l?r(t):(l=r,g(i,t),g(e,t))},u}return Ln=function e(r,n){if(l(r))return r;if(o(r))return R({readable:r});if(a(r))return R({writable:r});if(s(r))return R({writable:!1,readable:!1});if(u(r))return R({readable:m.fromWeb(r)});if(h(r))return R({writable:_.fromWeb(r)});if("function"==typeof r){const{value:e,write:s,final:o,destroy:a}=function(e){let{promise:r,resolve:n}=w();const i=new x,s=i.signal,o=e(async function*(){for(;;){const e=r;r=null;const{chunk:i,done:o,cb:a}=await e;if(t.nextTick(a),o)return;if(s.aborted)throw new d(void 0,{cause:s.reason});({promise:r,resolve:n}=w()),yield i}}(),{signal:s});return{value:o,write(t,e,r){const i=n;n=null,i({chunk:t,done:!1,cb:r})},final(t){const e=n;n=null,e({done:!0,cb:t})},destroy(t,e){i.abort(),e(t)}}}(r);if(i(e))return S(T,e,{objectMode:!0,write:s,final:o,destroy:a});const l=null==e?void 0:e.then;if("function"==typeof l){let r;const n=k(l,e,t=>{if(null!=t)throw new b("nully","body",t)},t=>{g(r,t)});return r=new T({objectMode:!0,readable:!1,write:s,final(e){o(async()=>{try{await n,t.nextTick(e,null)}catch(r){t.nextTick(e,r)}})},destroy:a})}throw new b("Iterable, AsyncIterable or AsyncFunction",n,e)}if(E(r))return e(r.arrayBuffer());if(i(r))return S(T,r,{objectMode:!0,writable:!1});if(u(null==r?void 0:r.readable)&&h(null==r?void 0:r.writable))return T.fromWeb(r);if("object"==typeof(null==r?void 0:r.writable)||"object"==typeof(null==r?void 0:r.readable)){return R({readable:null!=r&&r.readable?o(null==r?void 0:r.readable)?null==r?void 0:r.readable:e(r.readable):void 0,writable:null!=r&&r.writable?a(null==r?void 0:r.writable)?null==r?void 0:r.writable:e(r.writable):void 0})}const c=null==r?void 0:r.then;if("function"==typeof c){let t;return k(c,r,e=>{null!=e&&t.push(e),t.push(null)},e=>{g(t,e)}),t=new T({objectMode:!0,writable:!1,read(){}})}throw new p(n,["Blob","ReadableStream","WritableStream","Stream","Iterable","AsyncIterable","Function","{ readable, writable } pair","Promise"],r)}}function Xn(){if(Dn)return Nn;Dn=1;const{ObjectDefineProperties:t,ObjectGetOwnPropertyDescriptor:e,ObjectKeys:r,ObjectSetPrototypeOf:n}=Pr();Nn=o;const i=Kn(),s=Zn();n(o.prototype,i.prototype),n(o,i);{const t=r(s.prototype);for(let e=0;e<t.length;e++){const r=t[e];o.prototype[r]||(o.prototype[r]=s.prototype[r])}}function o(t){if(!(this instanceof o))return new o(t);i.call(this,t),s.call(this,t),t?(this.allowHalfOpen=!1!==t.allowHalfOpen,!1===t.readable&&(this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0),!1===t.writable&&(this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0)):this.allowHalfOpen=!0}let a,l;function u(){return void 0===a&&(a={}),a}return t(o.prototype,{writable:{__proto__:null,...e(s.prototype,"writable")},writableHighWaterMark:{__proto__:null,...e(s.prototype,"writableHighWaterMark")},writableObjectMode:{__proto__:null,...e(s.prototype,"writableObjectMode")},writableBuffer:{__proto__:null,...e(s.prototype,"writableBuffer")},writableLength:{__proto__:null,...e(s.prototype,"writableLength")},writableFinished:{__proto__:null,...e(s.prototype,"writableFinished")},writableCorked:{__proto__:null,...e(s.prototype,"writableCorked")},writableEnded:{__proto__:null,...e(s.prototype,"writableEnded")},writableNeedDrain:{__proto__:null,...e(s.prototype,"writableNeedDrain")},destroyed:{__proto__:null,get(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set(t){this._readableState&&this._writableState&&(this._readableState.destroyed=t,this._writableState.destroyed=t)}}}),o.fromWeb=function(t,e){return u().newStreamDuplexFromReadableWritablePair(t,e)},o.toWeb=function(t){return u().newReadableWritablePairFromDuplex(t)},o.from=function(t){return l||(l=Jn()),l(t,"body")},Nn}function ti(){if(Pn)return On;Pn=1;const{ObjectSetPrototypeOf:t,Symbol:e}=Pr();On=o;const{ERR_METHOD_NOT_IMPLEMENTED:r}=Fr().codes,n=Xn(),{getHighWaterMark:i}=wn();t(o.prototype,n.prototype),t(o,n);const s=e("kCallback");function o(t){if(!(this instanceof o))return new o(t);const e=t?i(this,t,"readableHighWaterMark",!0):null;0===e&&(t={...t,highWaterMark:null,readableHighWaterMark:e,writableHighWaterMark:t.writableHighWaterMark||0}),n.call(this,t),this._readableState.sync=!1,this[s]=null,t&&("function"==typeof t.transform&&(this._transform=t.transform),"function"==typeof t.flush&&(this._flush=t.flush)),this.on("prefinish",l)}function a(t){"function"!=typeof this._flush||this.destroyed?(this.push(null),t&&t()):this._flush((e,r)=>{e?t?t(e):this.destroy(e):(null!=r&&this.push(r),this.push(null),t&&t())})}function l(){this._final!==a&&a.call(this)}return o.prototype._final=a,o.prototype._transform=function(t,e,n){throw new r("_transform()")},o.prototype._write=function(t,e,r){const n=this._readableState,i=this._writableState,o=n.length;this._transform(t,e,(t,e)=>{t?r(t):(null!=e&&this.push(e),i.ended||o===n.length||n.length<n.highWaterMark?r():this[s]=r)})},o.prototype._read=function(){if(this[s]){const t=this[s];this[s]=null,t()}},On}function ei(){if(Cn)return In;Cn=1;const{ObjectSetPrototypeOf:t}=Pr();In=r;const e=ti();function r(t){if(!(this instanceof r))return new r(t);e.call(this,t)}return t(r.prototype,e.prototype),t(r,e),r.prototype._transform=function(t,e,r){r(null,t)},In}function ri(){if(Wn)return jn;Wn=1;const t=ln(),{ArrayIsArray:e,Promise:r,SymbolAsyncIterator:n,SymbolDispose:i}=Pr(),s=hn(),{once:o}=qr(),a=cn(),l=Xn(),{aggregateTwoErrors:u,codes:{ERR_INVALID_ARG_TYPE:h,ERR_INVALID_RETURN_VALUE:c,ERR_MISSING_ARGS:f,ERR_STREAM_DESTROYED:d,ERR_STREAM_PREMATURE_CLOSE:p},AbortError:b}=Fr(),{validateFunction:g,validateAbortSignal:y}=Kr(),{isIterable:m,isReadable:_,isReadableNodeStream:w,isNodeStream:S,isTransformStream:v,isWebStream:E,isReadableStream:x,isReadableFinished:k}=un(),T=globalThis.AbortController||Hr().AbortController;let R,A,L;function M(t,e,r){let n=!1;t.on("close",()=>{n=!0});return{destroy:e=>{n||(n=!0,a.destroyer(t,e||new d("pipe")))},cleanup:s(t,{readable:e,writable:r},t=>{n=!t})}}function N(t){if(m(t))return t;if(w(t))return async function*(t){A||(A=Kn());yield*A.prototype[n].call(t)}(t);throw new h("val",["Readable","Iterable","AsyncIterable"],t)}async function D(t,e,n,{end:i}){let o,a=null;const l=t=>{if(t&&(o=t),a){const t=a;a=null,t()}},h=()=>new r((t,e)=>{o?e(o):a=()=>{o?e(o):t()}});e.on("drain",l);const c=s(e,{readable:!1},l);try{e.writableNeedDrain&&await h();for await(const r of t)e.write(r)||await h();i&&(e.end(),await h()),n()}catch(f){n(o!==f?u(o,f):f)}finally{c(),e.off("drain",l)}}async function O(t,e,r,{end:n}){v(e)&&(e=e.writable);const i=e.getWriter();try{for await(const e of t)await i.ready,i.write(e).catch(()=>{});await i.ready,n&&await i.close(),r()}catch(s){try{await i.abort(s),r(s)}catch(o){r(o)}}}function P(r,n,s){if(1===r.length&&e(r[0])&&(r=r[0]),r.length<2)throw new f("streams");const o=new T,a=o.signal,u=null==s?void 0:s.signal,d=[];function p(){U(new b)}let g,k,A;y(u,"options.signal"),L=L||qr().addAbortListener,u&&(g=L(u,p));const P=[];let C,j=0;function W(t){U(t,0===--j)}function U(e,r){var s;if(!e||k&&"ERR_STREAM_PREMATURE_CLOSE"!==k.code||(k=e),k||r){for(;P.length;)P.shift()(k);null===(s=g)||void 0===s||s[i](),o.abort(),r&&(k||d.forEach(t=>t()),t.nextTick(n,k,A))}}for(let e=0;e<r.length;e++){const n=r[e],i=e<r.length-1,o=e>0,u=i||!1!==(null==s?void 0:s.end),f=e===r.length-1;if(S(n)){let t=function(t){t&&"AbortError"!==t.name&&"ERR_STREAM_PREMATURE_CLOSE"!==t.code&&W(t)};if(u){const{destroy:t,cleanup:e}=M(n,i,o);P.push(t),_(n)&&f&&d.push(e)}n.on("error",t),_(n)&&f&&d.push(()=>{n.removeListener("error",t)})}if(0===e)if("function"==typeof n){if(C=n({signal:a}),!m(C))throw new c("Iterable, AsyncIterable or Stream","source",C)}else C=m(n)||w(n)||v(n)?n:l.from(n);else if("function"==typeof n){var B;if(v(C))C=N(null===(B=C)||void 0===B?void 0:B.readable);else C=N(C);if(C=n(C,{signal:a}),i){if(!m(C,!0))throw new c("AsyncIterable",`transform[${e-1}]`,C)}else{var F;R||(R=ei());const e=new R({objectMode:!0}),r=null===(F=C)||void 0===F?void 0:F.then;if("function"==typeof r)j++,r.call(C,r=>{A=r,null!=r&&e.write(r),u&&e.end(),t.nextTick(W)},r=>{e.destroy(r),t.nextTick(W,r)});else if(m(C,!0))j++,D(C,e,W,{end:u});else{if(!x(C)&&!v(C))throw new c("AsyncIterable or Promise","destination",C);{const t=C.readable||C;j++,D(t,e,W,{end:u})}}C=e;const{destroy:n,cleanup:i}=M(C,!1,!0);P.push(n),f&&d.push(i)}}else if(S(n)){if(w(C)){j+=2;const t=I(C,n,W,{end:u});_(n)&&f&&d.push(t)}else if(v(C)||x(C)){const t=C.readable||C;j++,D(t,n,W,{end:u})}else{if(!m(C))throw new h("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],C);j++,D(C,n,W,{end:u})}C=n}else if(E(n)){if(w(C))j++,O(N(C),n,W,{end:u});else if(x(C)||m(C))j++,O(C,n,W,{end:u});else{if(!v(C))throw new h("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],C);j++,O(C.readable,n,W,{end:u})}C=n}else C=l.from(n)}return(null!=a&&a.aborted||null!=u&&u.aborted)&&t.nextTick(p),C}function I(e,r,n,{end:i}){let o=!1;if(r.on("close",()=>{o||n(new p)}),e.pipe(r,{end:!1}),i){let n=function(){o=!0,r.end()};k(e)?t.nextTick(n):e.once("end",n)}else n();return s(e,{readable:!0,writable:!1},t=>{const r=e._readableState;t&&"ERR_STREAM_PREMATURE_CLOSE"===t.code&&r&&r.ended&&!r.errored&&!r.errorEmitted?e.once("end",n).once("error",n):n(t)}),s(r,{readable:!1,writable:!0},n)}return jn={pipelineImpl:P,pipeline:function(...t){return P(t,o(function(t){return g(t[t.length-1],"streams[stream.length - 1]"),t.pop()}(t)))}}}function ni(){if(Bn)return Un;Bn=1;const{pipeline:t}=ri(),e=Xn(),{destroyer:r}=cn(),{isNodeStream:n,isReadable:i,isWritable:s,isWebStream:o,isTransformStream:a,isWritableStream:l,isReadableStream:u}=un(),{AbortError:h,codes:{ERR_INVALID_ARG_VALUE:c,ERR_MISSING_ARGS:f}}=Fr(),d=hn();return Un=function(...p){if(0===p.length)throw new f("streams");if(1===p.length)return e.from(p[0]);const b=[...p];if("function"==typeof p[0]&&(p[0]=e.from(p[0])),"function"==typeof p[p.length-1]){const t=p.length-1;p[t]=e.from(p[t])}for(let t=0;t<p.length;++t)if(n(p[t])||o(p[t])){if(t<p.length-1&&!(i(p[t])||u(p[t])||a(p[t])))throw new c(`streams[${t}]`,b[t],"must be readable");if(t>0&&!(s(p[t])||l(p[t])||a(p[t])))throw new c(`streams[${t}]`,b[t],"must be writable")}let g,y,m,_,w;const S=p[0],v=t(p,function(t){const e=_;_=null,e?e(t):t?w.destroy(t):x||E||w.destroy()}),E=!!(s(S)||l(S)||a(S)),x=!!(i(v)||u(v)||a(v));if(w=new e({writableObjectMode:!(null==S||!S.writableObjectMode),readableObjectMode:!(null==v||!v.readableObjectMode),writable:E,readable:x}),E){if(n(S))w._write=function(t,e,r){S.write(t,e)?r():g=r},w._final=function(t){S.end(),y=t},S.on("drain",function(){if(g){const t=g;g=null,t()}});else if(o(S)){const t=(a(S)?S.writable:S).getWriter();w._write=async function(e,r,n){try{await t.ready,t.write(e).catch(()=>{}),n()}catch(i){n(i)}},w._final=async function(e){try{await t.ready,t.close().catch(()=>{}),y=e}catch(r){e(r)}}}const t=a(v)?v.readable:v;d(t,()=>{if(y){const t=y;y=null,t()}})}if(x)if(n(v))v.on("readable",function(){if(m){const t=m;m=null,t()}}),v.on("end",function(){w.push(null)}),w._read=function(){for(;;){const t=v.read();if(null===t)return void(m=w._read);if(!w.push(t))return}};else if(o(v)){const t=(a(v)?v.readable:v).getReader();w._read=async function(){for(;;)try{const{value:e,done:r}=await t.read();if(!w.push(e))return;if(r)return void w.push(null)}catch{return}}}return w._destroy=function(t,e){t||null===_||(t=new h),m=null,g=null,y=null,null===_?e(t):(_=e,n(v)&&r(v,t))},w}}function ii(){if($n)return zn;$n=1;const{ArrayPrototypePop:t,Promise:e}=Pr(),{isIterable:r,isNodeStream:n,isWebStream:i}=un(),{pipelineImpl:s}=ri(),{finished:o}=hn();return si(),zn={finished:o,pipeline:function(...o){return new e((e,a)=>{let l,u;const h=o[o.length-1];if(h&&"object"==typeof h&&!n(h)&&!r(h)&&!i(h)){const e=t(o);l=e.signal,u=e.end}s(o,(t,r)=>{t?a(t):e(r)},{signal:l,end:u})})}}}function si(){if(Gn)return Or.exports;Gn=1;const{Buffer:t}=c,{ObjectDefineProperty:e,ObjectKeys:r,ReflectApply:n}=Pr(),{promisify:{custom:i}}=qr(),{streamReturningOperators:s,promiseReturningOperators:o}=function(){if(Fn)return Qr;Fn=1;const t=globalThis.AbortController||Hr().AbortController,{codes:{ERR_INVALID_ARG_VALUE:e,ERR_INVALID_ARG_TYPE:r,ERR_MISSING_ARGS:n,ERR_OUT_OF_RANGE:i},AbortError:s}=Fr(),{validateAbortSignal:o,validateInteger:a,validateObject:l}=Kr(),u=Pr().Symbol("kWeak"),h=Pr().Symbol("kResistStopPropagation"),{finished:c}=hn(),f=ni(),{addAbortSignalNoValidate:d}=_n(),{isWritable:p,isNodeStream:b}=un(),{deprecate:g}=qr(),{ArrayPrototypePush:y,Boolean:m,MathFloor:_,Number:w,NumberIsNaN:S,Promise:v,PromiseReject:E,PromiseResolve:x,PromisePrototypeThen:k,Symbol:T}=Pr(),R=T("kEmpty"),A=T("kEof");function L(t,e){if("function"!=typeof t)throw new r("fn",["Function","AsyncFunction"],t);null!=e&&l(e,"options"),null!=(null==e?void 0:e.signal)&&o(e.signal,"options.signal");let n=1;null!=(null==e?void 0:e.concurrency)&&(n=_(e.concurrency));let i=n-1;return null!=(null==e?void 0:e.highWaterMark)&&(i=_(e.highWaterMark)),a(n,"options.concurrency",1),a(i,"options.highWaterMark",0),i+=n,async function*(){const r=qr().AbortSignalAny([null==e?void 0:e.signal].filter(m)),o=this,a=[],l={signal:r};let u,h,c=!1,f=0;function d(){c=!0,p()}function p(){f-=1,b()}function b(){h&&!c&&f<n&&a.length<i&&(h(),h=null)}!async function(){try{for await(let b of o){if(c)return;if(r.aborted)throw new s;try{if(b=t(b,l),b===R)continue;b=x(b)}catch(e){b=E(e)}f+=1,k(b,p,d),a.push(b),u&&(u(),u=null),!c&&(a.length>=i||f>=n)&&await new v(t=>{h=t})}a.push(A)}catch(e){const t=E(e);k(t,p,d),a.push(t)}finally{c=!0,u&&(u(),u=null)}}();try{for(;;){for(;a.length>0;){const t=await a[0];if(t===A)return;if(r.aborted)throw new s;t!==R&&(yield t),a.shift(),b()}await new v(t=>{u=t})}}finally{c=!0,h&&(h(),h=null)}}.call(this)}async function M(t,e=void 0){for await(const r of N.call(this,t,e))return!0;return!1}function N(t,e){if("function"!=typeof t)throw new r("fn",["Function","AsyncFunction"],t);return L.call(this,async function(e,r){return await t(e,r)?e:R},e)}class D extends n{constructor(){super("reduce"),this.message="Reduce of an empty stream requires an initial value"}}function O(t){if(t=w(t),S(t))return 0;if(t<0)throw new i("number",">= 0",t);return t}return Qr.streamReturningOperators={asIndexedPairs:g(function(t=void 0){return null!=t&&l(t,"options"),null!=(null==t?void 0:t.signal)&&o(t.signal,"options.signal"),async function*(){let e=0;for await(const n of this){var r;if(null!=t&&null!==(r=t.signal)&&void 0!==r&&r.aborted)throw new s({cause:t.signal.reason});yield[e++,n]}}.call(this)},"readable.asIndexedPairs will be removed in a future version."),drop:function(t,e=void 0){return null!=e&&l(e,"options"),null!=(null==e?void 0:e.signal)&&o(e.signal,"options.signal"),t=O(t),async function*(){var r;if(null!=e&&null!==(r=e.signal)&&void 0!==r&&r.aborted)throw new s;for await(const i of this){var n;if(null!=e&&null!==(n=e.signal)&&void 0!==n&&n.aborted)throw new s;t--<=0&&(yield i)}}.call(this)},filter:N,flatMap:function(t,e){const r=L.call(this,t,e);return async function*(){for await(const t of r)yield*t}.call(this)},map:L,take:function(t,e=void 0){return null!=e&&l(e,"options"),null!=(null==e?void 0:e.signal)&&o(e.signal,"options.signal"),t=O(t),async function*(){var r;if(null!=e&&null!==(r=e.signal)&&void 0!==r&&r.aborted)throw new s;for await(const i of this){var n;if(null!=e&&null!==(n=e.signal)&&void 0!==n&&n.aborted)throw new s;if(t-- >0&&(yield i),t<=0)return}}.call(this)},compose:function(t,r){if(null!=r&&l(r,"options"),null!=(null==r?void 0:r.signal)&&o(r.signal,"options.signal"),b(t)&&!p(t))throw new e("stream",t,"must be writable");const n=f(this,t);return null!=r&&r.signal&&d(r.signal,n),n}},Qr.promiseReturningOperators={every:async function(t,e=void 0){if("function"!=typeof t)throw new r("fn",["Function","AsyncFunction"],t);return!(await M.call(this,async(...e)=>!(await t(...e)),e))},forEach:async function(t,e){if("function"!=typeof t)throw new r("fn",["Function","AsyncFunction"],t);for await(const r of L.call(this,async function(e,r){return await t(e,r),R},e));},reduce:async function(e,n,i){var a;if("function"!=typeof e)throw new r("reducer",["Function","AsyncFunction"],e);null!=i&&l(i,"options"),null!=(null==i?void 0:i.signal)&&o(i.signal,"options.signal");let f=arguments.length>1;if(null!=i&&null!==(a=i.signal)&&void 0!==a&&a.aborted){const t=new s(void 0,{cause:i.signal.reason});throw this.once("error",()=>{}),await c(this.destroy(t)),t}const d=new t,p=d.signal;if(null!=i&&i.signal){const t={once:!0,[u]:this,[h]:!0};i.signal.addEventListener("abort",()=>d.abort(),t)}let b=!1;try{for await(const t of this){var g;if(b=!0,null!=i&&null!==(g=i.signal)&&void 0!==g&&g.aborted)throw new s;f?n=await e(n,t,{signal:p}):(n=t,f=!0)}if(!b&&!f)throw new D}finally{d.abort()}return n},toArray:async function(t){null!=t&&l(t,"options"),null!=(null==t?void 0:t.signal)&&o(t.signal,"options.signal");const e=[];for await(const n of this){var r;if(null!=t&&null!==(r=t.signal)&&void 0!==r&&r.aborted)throw new s(void 0,{cause:t.signal.reason});y(e,n)}return e},some:M,find:async function(t,e){for await(const r of N.call(this,t,e))return r}},Qr}(),{codes:{ERR_ILLEGAL_CONSTRUCTOR:a}}=Fr(),l=ni(),{setDefaultHighWaterMark:u,getDefaultHighWaterMark:h}=wn(),{pipeline:f}=ri(),{destroyer:d}=cn(),p=hn(),b=ii(),g=un(),y=Or.exports=fn().Stream;y.isDestroyed=g.isDestroyed,y.isDisturbed=g.isDisturbed,y.isErrored=g.isErrored,y.isReadable=g.isReadable,y.isWritable=g.isWritable,y.Readable=Kn();for(const c of r(s)){let t=function(...t){if(new.target)throw a();return y.Readable.from(n(r,this,t))};const r=s[c];e(t,"name",{__proto__:null,value:r.name}),e(t,"length",{__proto__:null,value:r.length}),e(y.Readable.prototype,c,{__proto__:null,value:t,enumerable:!1,configurable:!0,writable:!0})}for(const c of r(o)){let t=function(...t){if(new.target)throw a();return n(r,this,t)};const r=o[c];e(t,"name",{__proto__:null,value:r.name}),e(t,"length",{__proto__:null,value:r.length}),e(y.Readable.prototype,c,{__proto__:null,value:t,enumerable:!1,configurable:!0,writable:!0})}y.Writable=Zn(),y.Duplex=Xn(),y.Transform=ti(),y.PassThrough=ei(),y.pipeline=f;const{addAbortSignal:m}=_n();return y.addAbortSignal=m,y.finished=p,y.destroy=d,y.compose=l,y.setDefaultHighWaterMark=u,y.getDefaultHighWaterMark=h,e(y,"promises",{__proto__:null,configurable:!0,enumerable:!0,get:()=>b}),e(f,i,{__proto__:null,enumerable:!0,get:()=>b.pipeline}),e(p,i,{__proto__:null,enumerable:!0,get:()=>b.finished}),y.Stream=y,y._isUint8Array=function(t){return t instanceof Uint8Array},y._uint8ArrayToBuffer=function(e){return t.from(e.buffer,e.byteOffset,e.byteLength)},Or.exports}var oi,ai,li=(Hn||(Hn=1,function(t){const e=si(),r=ii(),n=e.Readable.destroy;t.exports=e.Readable,t.exports._uint8ArrayToBuffer=e._uint8ArrayToBuffer,t.exports._isUint8Array=e._isUint8Array,t.exports.isDisturbed=e.isDisturbed,t.exports.isErrored=e.isErrored,t.exports.isReadable=e.isReadable,t.exports.Readable=e.Readable,t.exports.Writable=e.Writable,t.exports.Duplex=e.Duplex,t.exports.Transform=e.Transform,t.exports.PassThrough=e.PassThrough,t.exports.addAbortSignal=e.addAbortSignal,t.exports.finished=e.finished,t.exports.destroy=e.destroy,t.exports.destroy=n,t.exports.pipeline=e.pipeline,t.exports.compose=e.compose,Object.defineProperty(e,"promises",{configurable:!0,enumerable:!0,get:()=>r}),t.exports.Stream=e.Stream,t.exports.default=t.exports}(Dr)),Dr.exports);const ui=/* @__PURE__ */Ht(ai?oi:(ai=1,oi=function(t,e){if("string"!=typeof t)throw new TypeError("expected path to be a string");if("\\"===t||"/"===t)return"/";var r=t.length;if(r<=1)return t;var n="";if(r>4&&"\\"===t[3]){var i=t[2];"?"!==i&&"."!==i||"\\\\"!==t.slice(0,2)||(t=t.slice(2),n="//")}var s=t.split(/[/\\]+/);return!1!==e&&""===s[s.length-1]&&s.pop(),n+s.join("/")}));function hi(t){return"/"!==t.slice(-1)?t+"/":t}const{ReaddirGlob:ci}=$t,fi="win32"===process.platform;class di extends li.Transform{_supportsDirectory=!1;_supportsSymlink=!1;constructor(t){super(t={highWaterMark:1048576,statConcurrency:4,...t}),this.options=t,this._format=!1,this._module=!1,this._pending=0,this._pointer=0,this._entriesCount=0,this._entriesProcessedCount=0,this._fsEntriesTotalBytes=0,this._fsEntriesProcessedBytes=0,this._queue=Tr(this._onQueueTask.bind(this),1),this._queue.drain(this._onQueueDrain.bind(this)),this._statQueue=Tr(this._onStatQueueTask.bind(this),t.statConcurrency),this._statQueue.drain(this._onQueueDrain.bind(this)),this._state={aborted:!1,finalize:!1,finalizing:!1,finalized:!1,modulePiped:!1},this._streams=[]}_abort(){this._state.aborted=!0,this._queue.kill(),this._statQueue.kill(),this._queue.idle()&&this._shutdown()}_append(t,r){let n={source:null,filepath:t};(r=r||{}).name||(r.name=t),r.sourcePath=t,n.data=r,this._entriesCount++,r.stats&&r.stats instanceof e?(n=this._updateQueueTaskWithStats(n,r.stats),n&&(r.stats.size&&(this._fsEntriesTotalBytes+=r.stats.size),this._queue.push(n))):this._statQueue.push(n)}_finalize(){this._state.finalizing||this._state.finalized||this._state.aborted||(this._state.finalizing=!0,this._moduleFinalize(),this._state.finalizing=!1,this._state.finalized=!0)}_maybeFinalize(){return!(this._state.finalizing||this._state.finalized||this._state.aborted)&&(!!(this._state.finalize&&0===this._pending&&this._queue.idle()&&this._statQueue.idle())&&(this._finalize(),!0))}_moduleAppend(t,e,r){this._state.aborted?r():this._module.append(t,e,function(t){if(this._task=null,this._state.aborted)this._shutdown();else{if(t)return this.emit("error",t),void setImmediate(r);this.emit("entry",e),this._entriesProcessedCount++,e.stats&&e.stats.size&&(this._fsEntriesProcessedBytes+=e.stats.size),this.emit("progress",{entries:{total:this._entriesCount,processed:this._entriesProcessedCount},fs:{totalBytes:this._fsEntriesTotalBytes,processedBytes:this._fsEntriesProcessedBytes}}),setImmediate(r)}}.bind(this))}_moduleFinalize(){"function"==typeof this._module.finalize?this._module.finalize():"function"==typeof this._module.end?this._module.end():this.emit("error",new Lr("NOENDMETHOD"))}_modulePipe(){this._module.on("error",this._onModuleError.bind(this)),this._module.pipe(this),this._state.modulePiped=!0}_moduleUnpipe(){this._module.unpipe(this),this._state.modulePiped=!1}_normalizeEntryData(t,e){t={type:"file",name:null,date:null,mode:null,prefix:null,sourcePath:null,stats:!1,...t},e&&!1===t.stats&&(t.stats=e);let r="directory"===t.type;var n,i;return t.name&&("string"==typeof t.prefix&&""!==t.prefix&&(t.name=t.prefix+"/"+t.name,t.prefix=null),t.name=(n=t.name,ui(n,!1).replace(/^\w+:/,"").replace(/^(\.\.\/|\/)+/,"")),"symlink"!==t.type&&"/"===t.name.slice(-1)?(r=!0,t.type="directory"):r&&(t.name+="/")),"number"==typeof t.mode?t.mode&=fi?511:4095:t.stats&&null===t.mode?(t.mode=fi?511&t.stats.mode:4095&t.stats.mode,fi&&r&&(t.mode=493)):null===t.mode&&(t.mode=r?493:420),t.stats&&null===t.date?t.date=t.stats.mtime:t.date=((i=(i=t.date)||/* @__PURE__ */new Date)instanceof Date||(i="string"==typeof i?new Date(i):/* @__PURE__ */new Date),i),t}_onModuleError(t){this.emit("error",t)}_onQueueDrain(){this._state.finalizing||this._state.finalized||this._state.aborted||this._state.finalize&&0===this._pending&&this._queue.idle()&&this._statQueue.idle()&&this._finalize()}_onQueueTask(t,e){const r=()=>{t.data.callback&&t.data.callback(),e()};this._state.finalizing||this._state.finalized||this._state.aborted?r():(this._task=t,this._moduleAppend(t.source,t.data,r))}_onStatQueueTask(t,e){this._state.finalizing||this._state.finalized||this._state.aborted?e():r(t.filepath,function(r,n){if(this._state.aborted)setImmediate(e);else{if(r)return this._entriesCount--,this.emit("warning",r),void setImmediate(e);(t=this._updateQueueTaskWithStats(t,n))&&(n.size&&(this._fsEntriesTotalBytes+=n.size),this._queue.push(t)),setImmediate(e)}}.bind(this))}_shutdown(){this._moduleUnpipe(),this.end()}_transform(t,e,r){t&&(this._pointer+=t.length),r(null,t)}_updateQueueTaskWithStats(t,e){if(e.isFile())t.data.type="file",t.data.sourceType="stream",t.source=new ze.Readable(function(){return n(t.filepath)});else if(e.isDirectory()&&this._supportsDirectory)t.data.name=hi(t.data.name),t.data.type="directory",t.data.sourcePath=hi(t.filepath),t.data.sourceType="buffer",t.source=Buffer.concat([]);else{if(!e.isSymbolicLink()||!this._supportsSymlink)return e.isDirectory()?this.emit("warning",new Lr("DIRECTORYNOTSUPPORTED",t.data)):e.isSymbolicLink()?this.emit("warning",new Lr("SYMLINKNOTSUPPORTED",t.data)):this.emit("warning",new Lr("ENTRYNOTSUPPORTED",t.data)),null;{const e=i(t.filepath),r=l(t.filepath);t.data.type="symlink",t.data.linkname=u(r,a(r,e)),t.data.sourceType="buffer",t.source=Buffer.concat([])}}return t.data=this._normalizeEntryData(t.data,e),t}abort(){return this._state.aborted||this._state.finalized||this._abort(),this}append(t,e){if(this._state.finalize||this._state.aborted)return this.emit("error",new Lr("QUEUECLOSED")),this;if("string"!=typeof(e=this._normalizeEntryData(e)).name||0===e.name.length)return this.emit("error",new Lr("ENTRYNAMEREQUIRED")),this;if("directory"===e.type&&!this._supportsDirectory)return this.emit("error",new Lr("DIRECTORYNOTSUPPORTED",{name:e.name})),this;if(t=function(t){return null===t?Buffer.alloc(0):"string"==typeof t?Buffer.from(t):d(t)?t.pipe(new li.PassThrough):t}(t),Buffer.isBuffer(t))e.sourceType="buffer";else{if(!d(t))return this.emit("error",new Lr("INPUTSTEAMBUFFERREQUIRED",{name:e.name})),this;e.sourceType="stream"}return this._entriesCount++,this._queue.push({data:e,source:t}),this}directory(t,e,r){if(this._state.finalize||this._state.aborted)return this.emit("error",new Lr("QUEUECLOSED")),this;if("string"!=typeof t||0===t.length)return this.emit("error",new Lr("DIRECTORYDIRPATHREQUIRED")),this;this._pending++,!1===e?e="":"string"!=typeof e&&(e=t);var n=!1;"function"==typeof r?(n=r,r={}):"object"!=typeof r&&(r={});const i=$t(t,{stat:!0,dot:!0});return i.on("error",function(t){this.emit("error",t)}.bind(this)),i.on("match",function(s){i.pause();let o=!1,a=Object.assign({},r);a.name=s.relative,a.prefix=e,a.stats=s.stat,a.callback=i.resume.bind(i);try{if(n)if(a=n(a),!1===a)o=!0;else if("object"!=typeof a)throw new Lr("DIRECTORYFUNCTIONINVALIDDATA",{dirpath:t})}catch(l){return void this.emit("error",l)}o?i.resume():this._append(s.absolute,a)}.bind(this)),i.on("end",function(){this._pending--,this._maybeFinalize()}.bind(this)),this}file(t,e){return this._state.finalize||this._state.aborted?(this.emit("error",new Lr("QUEUECLOSED")),this):"string"!=typeof t||0===t.length?(this.emit("error",new Lr("FILEFILEPATHREQUIRED")),this):(this._append(t,e),this)}glob(t,e,r){this._pending++,e={stat:!0,pattern:t,...e};const n=new ci(e.cwd||".",e);return n.on("error",function(t){this.emit("error",t)}.bind(this)),n.on("match",function(t){n.pause();const e=Object.assign({},r);e.callback=n.resume.bind(n),e.stats=t.stat,e.name=t.relative,this._append(t.absolute,e)}.bind(this)),n.on("end",function(){this._pending--,this._maybeFinalize()}.bind(this)),this}finalize(){if(this._state.aborted){var t=new Lr("ABORTED");return this.emit("error",t),Promise.reject(t)}if(this._state.finalize){var e=new Lr("FINALIZING");return this.emit("error",e),Promise.reject(e)}this._state.finalize=!0,0===this._pending&&this._queue.idle()&&this._statQueue.idle()&&this._finalize();var r=this;return new Promise(function(t,e){var n;r._module.on("end",function(){n||t()}),r._module.on("error",function(t){n=!0,e(t)})})}symlink(t,e,r){if(this._state.finalize||this._state.aborted)return this.emit("error",new Lr("QUEUECLOSED")),this;if("string"!=typeof t||0===t.length)return this.emit("error",new Lr("SYMLINKFILEPATHREQUIRED")),this;if("string"!=typeof e||0===e.length)return this.emit("error",new Lr("SYMLINKTARGETREQUIRED",{filepath:t})),this;if(!this._supportsSymlink)return this.emit("error",new Lr("SYMLINKNOTSUPPORTED",{filepath:t})),this;var n={type:"symlink"};return n.name=t.replace(/\\/g,"/"),n.linkname=e.replace(/\\/g,"/"),n.sourceType="buffer","number"==typeof r&&(n.mode=r),this._entriesCount++,this._queue.push({data:n,source:Buffer.concat([])}),this}pointer(){return this._pointer}}class pi{getName(){}getSize(){}getLastModifiedDate(){}isDirectory(){}}function bi(t){var e=Buffer.alloc(8);return e.writeUInt32LE(t%4294967296,0),e.writeUInt32LE(t/4294967296|0,4),e}function gi(t){var e=Buffer.alloc(2);return e.writeUInt16LE((65535&t)>>>0,0),e}function yi(t){var e=Buffer.alloc(4);return e.writeUInt32LE((4294967295&t)>>>0,0),e}class mi{constructor(){return this.descriptor=!1,this.encryption=!1,this.utf8=!1,this.numberOfShannonFanoTrees=0,this.strongEncryption=!1,this.slidingDictionarySize=0,this}encode(){return gi((this.descriptor?8:0)|(this.utf8?2048:0)|(this.encryption?1:0)|(this.strongEncryption?64:0))}static parse(t,e){var r=function(t,e){return t.readUInt16LE(e)}(t,e),n=new mi;return n.useDataDescriptor(!!(8&r)),n.useUTF8ForNames(!!(2048&r)),n.useStrongEncryption(!!(64&r)),n.useEncryption(!!(1&r)),n.setSlidingDictionarySize(2&r?8192:4096),n.setNumberOfShannonFanoTrees(4&r?3:2),n}setNumberOfShannonFanoTrees(t){this.numberOfShannonFanoTrees=t}getNumberOfShannonFanoTrees(){return this.numberOfShannonFanoTrees}setSlidingDictionarySize(t){this.slidingDictionarySize=t}getSlidingDictionarySize(){return this.slidingDictionarySize}useDataDescriptor(t){this.descriptor=t}usesDataDescriptor(){return this.descriptor}useEncryption(t){this.encryption=t}usesEncryption(){return this.encryption}useStrongEncryption(t){this.strongEncryption=t}usesStrongEncryption(){return this.strongEncryption}useUTF8ForNames(t){this.utf8=t}usesUTF8ForNames(){return this.utf8}}const _i=61440,wi=40960,Si=Buffer.alloc(0),vi=Buffer.from(Array(2)),Ei=Buffer.from(Array(4)),xi=4294967295;class ki extends pi{constructor(t){super(),this.platform=0,this.method=-1,this.name=null,this.size=0,this.csize=0,this.gpb=new mi,this.crc=0,this.time=-1,this.minver=10,this.mode=-1,this.extra=null,this.exattr=0,this.inattr=0,this.comment=null,t&&this.setName(t)}getCentralDirectoryExtra(){return this.getExtra()}getComment(){return null!==this.comment?this.comment:""}getCompressedSize(){return this.csize}getCrc(){return this.crc}getExternalAttributes=function(){return this.exattr};getExtra(){return null!==this.extra?this.extra:Si}getGeneralPurposeBit(){return this.gpb}getInternalAttributes(){return this.inattr}getLastModifiedDate(){return this.getTime()}getLocalFileDataExtra(){return this.getExtra()}getMethod(){return this.method}getName(){return this.name}getPlatform(){return this.platform}getSize(){return this.size}getTime(){return-1!==this.time?(t=this.time,new Date(1980+(t>>25&127),(t>>21&15)-1,t>>16&31,t>>11&31,t>>5&63,(31&t)<<1)):-1;var t}getTimeDos(){return-1!==this.time?this.time:0}getUnixMode(){return 3!==this.platform?0:this.getExternalAttributes()>>16&65535}getVersionNeededToExtract(){return this.minver}setComment(t){Buffer.byteLength(t)!==t.length&&this.getGeneralPurposeBit().useUTF8ForNames(!0),this.comment=t}setCompressedSize(t){if(t<0)throw new Error("invalid entry compressed size");this.csize=t}setCrc(t){if(t<0)throw new Error("invalid entry crc32");this.crc=t}setExternalAttributes(t){this.exattr=t>>>0}setExtra(t){this.extra=t}setGeneralPurposeBit(t){if(!(t instanceof mi))throw new Error("invalid entry GeneralPurposeBit");this.gpb=t}setInternalAttributes(t){this.inattr=t}setMethod(t){if(t<0)throw new Error("invalid entry compression method");this.method=t}setName(t,e=!1){t=ui(t,!1).replace(/^\w+:/,"").replace(/^(\.\.\/|\/)+/,""),e&&(t=`/${t}`),Buffer.byteLength(t)!==t.length&&this.getGeneralPurposeBit().useUTF8ForNames(!0),this.name=t}setPlatform(t){this.platform=t}setSize(t){if(t<0)throw new Error("invalid entry size");this.size=t}setTime(t,e){if(!(t instanceof Date))throw new Error("invalid entry time");this.time=function(t,e){var r=(e=e||!1)?t.getFullYear():t.getUTCFullYear();return r<1980?2162688:r>=2044?2141175677:r-1980<<25|(e?t.getMonth():t.getUTCMonth())+1<<21|(e?t.getDate():t.getUTCDate())<<16|(e?t.getHours():t.getUTCHours())<<11|(e?t.getMinutes():t.getUTCMinutes())<<5|(e?t.getSeconds():t.getUTCSeconds())/2}(t,e)}setUnixMode(t){var e=0;e|=(t|=this.isDirectory()?16384:32768)<<16|(this.isDirectory()?16:32),this.setExternalAttributes(e),this.mode=4095&t,this.platform=3}setVersionNeededToExtract(t){this.minver=t}isDirectory(){return"/"===this.getName().slice(-1)}isUnixSymlink(){return(this.getUnixMode()&_i)===wi}isZip64(){return this.csize>xi||this.size>xi}}class Ti extends li.Transform{constructor(t){super(t),this.offset=0,this._archive={finish:!1,finished:!1,processing:!1}}_appendBuffer(t,e,r){}_appendStream(t,e,r){}_emitErrorCallback=function(t){t&&this.emit("error",t)};_finish(t){}_normalizeEntry(t){}_transform(t,e,r){r(null,t)}entry(t,e,r){if(e=e||null,"function"!=typeof r&&(r=this._emitErrorCallback.bind(this)),t instanceof pi)if(this._archive.finish||this._archive.finished)r(new Error("unacceptable entry after finish"));else{if(!this._archive.processing){if(this._archive.processing=!0,this._normalizeEntry(t),this._entry=t,e=function(t){if(null===t)return Buffer.alloc(0);if("string"==typeof t)return Buffer.from(t);if(d(t)&&!t._readableState){var e=new li.PassThrough;return t.pipe(e),e}return t}(e),Buffer.isBuffer(e))this._appendBuffer(t,e,r);else{if(!d(e))return this._archive.processing=!1,void r(new Error("input source must be valid Stream or Buffer instance"));this._appendStream(t,e,r)}return this}r(new Error("already processing an entry"))}else r(new Error("not a valid instance of ArchiveEntry"))}finish(){this._archive.processing?this._archive.finish=!0:this._finish()}getBytesWritten(){return this.offset}write(t,e){return t&&(this.offset+=t.length),super.write(t,e)}}var Ri,Ai,Li={};const Mi=/* @__PURE__ */Ht((Ri||(Ri=1,Ai=function(t){t.version="1.2.2";var e=function(){for(var t=0,e=new Array(256),r=0;256!=r;++r)t=1&(t=1&(t=1&(t=1&(t=1&(t=1&(t=1&(t=1&(t=r)?-306674912^t>>>1:t>>>1)?-306674912^t>>>1:t>>>1)?-306674912^t>>>1:t>>>1)?-306674912^t>>>1:t>>>1)?-306674912^t>>>1:t>>>1)?-306674912^t>>>1:t>>>1)?-306674912^t>>>1:t>>>1)?-306674912^t>>>1:t>>>1,e[r]=t;return"undefined"!=typeof Int32Array?new Int32Array(e):e}(),r=function(t){var e=0,r=0,n=0,i="undefined"!=typeof Int32Array?new Int32Array(4096):new Array(4096);for(n=0;256!=n;++n)i[n]=t[n];for(n=0;256!=n;++n)for(r=t[n],e=256+n;e<4096;e+=256)r=i[e]=r>>>8^t[255&r];var s=[];for(n=1;16!=n;++n)s[n-1]="undefined"!=typeof Int32Array?i.subarray(256*n,256*n+256):i.slice(256*n,256*n+256);return s}(e),n=r[0],i=r[1],s=r[2],o=r[3],a=r[4],l=r[5],u=r[6],h=r[7],c=r[8],f=r[9],d=r[10],p=r[11],b=r[12],g=r[13],y=r[14];t.table=e,t.bstr=function(t,r){for(var n=-1^r,i=0,s=t.length;i<s;)n=n>>>8^e[255&(n^t.charCodeAt(i++))];return~n},t.buf=function(t,r){for(var m=-1^r,_=t.length-15,w=0;w<_;)m=y[t[w++]^255&m]^g[t[w++]^m>>8&255]^b[t[w++]^m>>16&255]^p[t[w++]^m>>>24]^d[t[w++]]^f[t[w++]]^c[t[w++]]^h[t[w++]]^u[t[w++]]^l[t[w++]]^a[t[w++]]^o[t[w++]]^s[t[w++]]^i[t[w++]]^n[t[w++]]^e[t[w++]];for(_+=15;w<_;)m=m>>>8^e[255&(m^t[w++])];return~m},t.str=function(t,r){for(var n=-1^r,i=0,s=t.length,o=0,a=0;i<s;)(o=t.charCodeAt(i++))<128?n=n>>>8^e[255&(n^o)]:o<2048?n=(n=n>>>8^e[255&(n^(192|o>>6&31))])>>>8^e[255&(n^(128|63&o))]:o>=55296&&o<57344?(o=64+(1023&o),a=1023&t.charCodeAt(i++),n=(n=(n=(n=n>>>8^e[255&(n^(240|o>>8&7))])>>>8^e[255&(n^(128|o>>2&63))])>>>8^e[255&(n^(128|a>>6&15|(3&o)<<4))])>>>8^e[255&(n^(128|63&a))]):n=(n=(n=n>>>8^e[255&(n^(224|o>>12&15))])>>>8^e[255&(n^(128|o>>6&63))])>>>8^e[255&(n^(128|63&o))];return~n}},"undefined"==typeof DO_NOT_EXPORT_CRC?Ai(Li):Ai({})),Li));class Ni extends li.Transform{constructor(t){super(t),this.checksum=Buffer.allocUnsafe(4),this.checksum.writeInt32BE(0,0),this.rawSize=0}_transform(t,e,r){t&&(this.checksum=Mi.buf(t,this.checksum)>>>0,this.rawSize+=t.length),r(null,t)}digest(t){const e=Buffer.allocUnsafe(4);return e.writeUInt32BE(this.checksum>>>0,0),t?e.toString(t):e}hex(){return this.digest("hex").toUpperCase()}size(){return this.rawSize}}class Di extends f{constructor(t){super(t),this.checksum=Buffer.allocUnsafe(4),this.checksum.writeInt32BE(0,0),this.rawSize=0,this.compressedSize=0}push(t,e){return t&&(this.compressedSize+=t.length),super.push(t,e)}_transform(t,e,r){t&&(this.checksum=Mi.buf(t,this.checksum)>>>0,this.rawSize+=t.length),super._transform(t,e,r)}digest(t){const e=Buffer.allocUnsafe(4);return e.writeUInt32BE(this.checksum>>>0,0),t?e.toString(t):e}hex(){return this.digest("hex").toUpperCase()}size(t=!1){return t?this.compressedSize:this.rawSize}}class Oi extends Ti{constructor(t){const e=("object"!=typeof(r=t)&&(r={}),"object"!=typeof r.zlib&&(r.zlib={}),"number"!=typeof r.zlib.level&&(r.zlib.level=1),r.forceZip64=!!r.forceZip64,r.forceLocalTime=!!r.forceLocalTime,r);var r;super(e),this.options=e,this._entry=null,this._entries=[],this._archive={centralLength:0,centralOffset:0,comment:"",finish:!1,finished:!1,processing:!1,forceZip64:e.forceZip64,forceLocalTime:e.forceLocalTime}}_afterAppend(t){this._entries.push(t),t.getGeneralPurposeBit().usesDataDescriptor()&&this._writeDataDescriptor(t),this._archive.processing=!1,this._entry=null,this._archive.finish&&!this._archive.finished&&this._finish()}_appendBuffer(t,e,r){0===e.length&&t.setMethod(0);var n=t.getMethod();return 0===n&&(t.setSize(e.length),t.setCompressedSize(e.length),t.setCrc(Mi.buf(e)>>>0)),this._writeLocalFileHeader(t),0===n?(this.write(e),this._afterAppend(t),void r(null,t)):8===n?void this._smartStream(t,r).end(e):void r(new Error("compression method "+n+" not implemented"))}_appendStream(t,e,r){t.getGeneralPurposeBit().useDataDescriptor(!0),t.setVersionNeededToExtract(20),this._writeLocalFileHeader(t);var n=this._smartStream(t,r);e.once("error",function(t){n.emit("error",t),n.end()}),e.pipe(n)}_finish(){this._archive.centralOffset=this.offset,this._entries.forEach(function(t){this._writeCentralFileHeader(t)}.bind(this)),this._archive.centralLength=this.offset-this._archive.centralOffset,this.isZip64()&&this._writeCentralDirectoryZip64(),this._writeCentralDirectoryEnd(),this._archive.processing=!1,this._archive.finish=!0,this._archive.finished=!0,this.end()}_normalizeEntry(t){-1===t.getMethod()&&t.setMethod(8),8===t.getMethod()&&(t.getGeneralPurposeBit().useDataDescriptor(!0),t.setVersionNeededToExtract(20)),-1===t.getTime()&&t.setTime(/* @__PURE__ */new Date,this._archive.forceLocalTime),t._offsets={file:0,data:0,contents:0}}_smartStream(t,e){var r=8===t.getMethod()?new Di(this.options.zlib):new Ni,n=null;return r.once("end",function(){var i=r.digest().readUInt32BE(0);t.setCrc(i),t.setSize(r.size()),t.setCompressedSize(r.size(!0)),this._afterAppend(t),e(n,t)}.bind(this)),r.once("error",function(t){n=t}),r.pipe(this,{end:!1}),r}_writeCentralDirectoryEnd(){var t=this._entries.length,e=this._archive.centralLength,r=this._archive.centralOffset;this.isZip64()&&(t=65535,e=xi,r=xi),this.write(yi(101010256)),this.write(vi),this.write(vi),this.write(gi(t)),this.write(gi(t)),this.write(yi(e)),this.write(yi(r));var n=this.getComment(),i=Buffer.byteLength(n);this.write(gi(i)),this.write(n)}_writeCentralDirectoryZip64(){this.write(yi(101075792)),this.write(bi(44)),this.write(gi(45)),this.write(gi(45)),this.write(Ei),this.write(Ei),this.write(bi(this._entries.length)),this.write(bi(this._entries.length)),this.write(bi(this._archive.centralLength)),this.write(bi(this._archive.centralOffset)),this.write(yi(117853008)),this.write(Ei),this.write(bi(this._archive.centralOffset+this._archive.centralLength)),this.write(yi(1))}_writeCentralFileHeader(t){var e=t.getGeneralPurposeBit(),r=t.getMethod(),n=t._offsets.file,i=t.getSize(),s=t.getCompressedSize();if(t.isZip64()||n>xi){i=xi,s=xi,n=xi,t.setVersionNeededToExtract(45);var o=Buffer.concat([gi(1),gi(24),bi(t.getSize()),bi(t.getCompressedSize()),bi(t._offsets.file)],28);t.setExtra(o)}this.write(yi(33639248)),this.write(gi(t.getPlatform()<<8|45)),this.write(gi(t.getVersionNeededToExtract())),this.write(e.encode()),this.write(gi(r)),this.write(yi(t.getTimeDos())),this.write(yi(t.getCrc())),this.write(yi(s)),this.write(yi(i));var a=t.getName(),l=t.getComment(),u=t.getCentralDirectoryExtra();e.usesUTF8ForNames()&&(a=Buffer.from(a),l=Buffer.from(l)),this.write(gi(a.length)),this.write(gi(u.length)),this.write(gi(l.length)),this.write(vi),this.write(gi(t.getInternalAttributes())),this.write(yi(t.getExternalAttributes())),this.write(yi(n)),this.write(a),this.write(u),this.write(l)}_writeDataDescriptor(t){this.write(yi(134695760)),this.write(yi(t.getCrc())),t.isZip64()?(this.write(bi(t.getCompressedSize())),this.write(bi(t.getSize()))):(this.write(yi(t.getCompressedSize())),this.write(yi(t.getSize())))}_writeLocalFileHeader(t){var e=t.getGeneralPurposeBit(),r=t.getMethod(),n=t.getName(),i=t.getLocalFileDataExtra();t.isZip64()&&(e.useDataDescriptor(!0),t.setVersionNeededToExtract(45)),e.usesUTF8ForNames()&&(n=Buffer.from(n)),t._offsets.file=this.offset,this.write(yi(67324752)),this.write(gi(t.getVersionNeededToExtract())),this.write(e.encode()),this.write(gi(r)),this.write(yi(t.getTimeDos())),t._offsets.data=this.offset,e.usesDataDescriptor()?(this.write(Ei),this.write(Ei),this.write(Ei)):(this.write(yi(t.getCrc())),this.write(yi(t.getCompressedSize())),this.write(yi(t.getSize()))),this.write(gi(n.length)),this.write(gi(i.length)),this.write(n),this.write(i),t._offsets.contents=this.offset}getComment(t){return null!==this._archive.comment?this._archive.comment:""}isZip64(){return this._archive.forceZip64||this._entries.length>65535||this._archive.centralLength>xi||this._archive.centralOffset>xi}setComment(t){this._archive.comment=t}}class Pi extends Oi{constructor(t){(t=t||{}).zlib=t.zlib||{},"number"==typeof t.level&&t.level>=0&&(t.zlib.level=t.level,delete t.level),t.forceZip64||"number"!=typeof t.zlib.level||0!==t.zlib.level||(t.store=!0),t.namePrependSlash=t.namePrependSlash||!1,super(t),t.comment&&t.comment.length>0&&this.setComment(t.comment)}_normalizeFileData(t){let e="directory"===(t={type:"file",name:null,namePrependSlash:this.options.namePrependSlash,linkname:null,date:null,mode:null,store:this.options.store,comment:"",...t}).type;const r="symlink"===t.type;var n,i;return t.name&&(t.name=(n=t.name,ui(n,!1).replace(/^\w+:/,"").replace(/^(\.\.\/|\/)+/,"")),r||"/"!==t.name.slice(-1)?e&&(t.name+="/"):(e=!0,t.type="directory")),(e||r)&&(t.store=!0),t.date=((i=(i=t.date)||/* @__PURE__ */new Date)instanceof Date||(i="string"==typeof i?new Date(i):/* @__PURE__ */new Date),i),t}entry(t,e,r){if("function"!=typeof r&&(r=this._emitErrorCallback.bind(this)),"file"!==(e=this._normalizeFileData(e)).type&&"directory"!==e.type&&"symlink"!==e.type)return void r(new Error(e.type+" entries not currently supported"));if("string"!=typeof e.name||0===e.name.length)return void r(new Error("entry name must be a non-empty string value"));if("symlink"===e.type&&"string"!=typeof e.linkname)return void r(new Error("entry linkname must be a non-empty string value when type equals symlink"));const n=new ki(e.name);return n.setTime(e.date,this.options.forceLocalTime),e.namePrependSlash&&n.setName(e.name,!0),e.store&&n.setMethod(0),e.comment.length>0&&n.setComment(e.comment),"symlink"===e.type&&"number"!=typeof e.mode&&(e.mode=40960),"number"==typeof e.mode&&("symlink"===e.type&&(e.mode|=40960),n.setUnixMode(e.mode)),"symlink"===e.type&&"string"==typeof e.linkname&&(t=Buffer.from(e.linkname)),super.entry(n,t,r)}finalize(){this.finish()}}class Ii{constructor(t){t=this.options={comment:"",forceUTC:!1,namePrependSlash:!1,store:!1,...t},this.engine=new Pi(t)}append(t,e,r){this.engine.entry(t,e,r)}finalize(){this.engine.finalize()}on(){return this.engine.on.apply(this.engine,arguments)}pipe(){return this.engine.pipe.apply(this.engine,arguments)}unpipe(){return this.engine.unpipe.apply(this.engine,arguments)}}var Ci,ji,Wi,Ui,Bi,Fi,zi={};function $i(){if(Fi)return Bi;Fi=1;const t=Ui?Wi:(Ui=1,Wi=class{constructor(t){if(!(t>0)||t-1&t)throw new Error("Max size for a FixedFIFO should be a power of two");this.buffer=new Array(t),this.mask=t-1,this.top=0,this.btm=0,this.next=null}clear(){this.top=this.btm=0,this.next=null,this.buffer.fill(void 0)}push(t){return void 0===this.buffer[this.top]&&(this.buffer[this.top]=t,this.top=this.top+1&this.mask,!0)}shift(){const t=this.buffer[this.btm];if(void 0!==t)return this.buffer[this.btm]=void 0,this.btm=this.btm+1&this.mask,t}peek(){return this.buffer[this.btm]}isEmpty(){return void 0===this.buffer[this.btm]}});return Bi=class{constructor(e){this.hwm=e||16,this.head=new t(this.hwm),this.tail=this.head,this.length=0}clear(){this.head=this.tail,this.head.clear(),this.length=0}push(e){if(this.length++,!this.head.push(e)){const r=this.head;this.head=r.next=new t(2*this.head.buffer.length),this.head.push(e)}}shift(){0!==this.length&&this.length--;const t=this.tail.shift();if(void 0===t&&this.tail.next){const t=this.tail.next;return this.tail.next=null,this.tail=t,this.tail.shift()}return t}peek(){const t=this.tail.peek();return void 0===t&&this.tail.next?this.tail.next.peek():t}isEmpty(){return 0===this.length}}}var Gi,Hi,qi,Vi,Yi,Qi,Ki,Zi,Ji,Xi,ts,es,rs,ns,is,ss,os,as,ls,us,hs,cs,fs,ds={exports:{}};function ps(){return rs||(rs=1,function(t,e){const r=Hi?Gi:(Hi=1,Gi={byteLength:function(t){return t.length},toString:function(t){const e=t.byteLength;let r="";for(let n=0;n<e;n++)r+=String.fromCharCode(127&t[n]);return r},write:function(t,e){const r=t.byteLength;for(let n=0;n<r;n++)t[n]=e.charCodeAt(n);return r}}),n=function(){if(Vi)return qi;Vi=1;const t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",e=new Uint8Array(256);for(let r=0;r<64;r++)e[t.charCodeAt(r)]=r;return e[45]=62,e[95]=63,qi={byteLength:function(t){let e=t.length;return 61===t.charCodeAt(e-1)&&e--,e>1&&61===t.charCodeAt(e-1)&&e--,3*e>>>2},toString:function(e){const r=e.byteLength;let n="";for(let i=0;i<r;i+=3)n+=t[e[i]>>2]+t[(3&e[i])<<4|e[i+1]>>4]+t[(15&e[i+1])<<2|e[i+2]>>6]+t[63&e[i+2]];return r%3==2?n=n.substring(0,n.length-1)+"=":r%3==1&&(n=n.substring(0,n.length-2)+"=="),n},write:function(t,r){const n=t.byteLength;for(let i=0,s=0;s<n;i+=4){const n=e[r.charCodeAt(i)],o=e[r.charCodeAt(i+1)],a=e[r.charCodeAt(i+2)],l=e[r.charCodeAt(i+3)];t[s++]=n<<2|o>>4,t[s++]=(15&o)<<4|a>>2,t[s++]=(3&a)<<6|63&l}return n}}}(),i=function(){if(Qi)return Yi;function t(t){return t>=48&&t<=57?t-48:t>=65&&t<=70?t-65+10:t>=97&&t<=102?t-97+10:void 0}return Qi=1,Yi={byteLength:function(t){return t.length>>>1},toString:function(t){const e=t.byteLength;t=new DataView(t.buffer,t.byteOffset,e);let r="",n=0;for(let i=e-e%4;n<i;n+=4)r+=t.getUint32(n).toString(16).padStart(8,"0");for(;n<e;n++)r+=t.getUint8(n).toString(16).padStart(2,"0");return r},write:function(e,r){const n=e.byteLength;for(let i=0;i<n;i++){const n=t(r.charCodeAt(2*i)),s=t(r.charCodeAt(2*i+1));if(void 0===n||void 0===s)return i;e[i]=n<<4|s}return n}}}(),s=Zi?Ki:(Zi=1,Ki={byteLength:function(t){return t.length},toString:function(t){const e=t.byteLength;let r="";for(let n=0;n<e;n++)r+=String.fromCharCode(t[n]);return r},write:function(t,e){const r=t.byteLength;for(let n=0;n<r;n++)t[n]=e.charCodeAt(n);return r}}),o=function(){if(Xi)return Ji;let t,e;if(Xi=1,"undefined"!=typeof TextDecoder){const e=new TextDecoder;t=function(t){return e.decode(t)}}else t=function(t){const e=t.byteLength;let r="",n=0;for(;n<e;){let i=t[n];if(i<=127){r+=String.fromCharCode(i),n++;continue}let s=0,o=0;if(i<=223?(s=1,o=31&i):i<=239?(s=2,o=15&i):i<=244&&(s=3,o=7&i),e-n-s>0){let e=0;for(;e<s;)i=t[n+e+1],o=o<<6|63&i,e+=1}else o=65533,s=e-n;r+=String.fromCodePoint(o),n+=s+1}return r};if("undefined"!=typeof TextEncoder){const t=new TextEncoder;e=function(e,r){return t.encodeInto(r,e).written}}else e=function(t,e){const r=t.byteLength;let n=0,i=0;for(;n<e.length;){const s=e.codePointAt(n);if(s<=127){if(i+1>r)break;t[i++]=s,n++;continue}let o=0,a=0;if(s<=2047?(o=6,a=192):s<=65535?(o=12,a=224):s<=2097151&&(o=18,a=240),i+o/6+1>r)break;for(t[i++]=a|s>>o,o-=6;o>=0;)t[i++]=128|s>>o&63,o-=6;n+=s>=65536?2:1}return i};return Ji={byteLength:function(t){let e=0;for(let r=0,n=t.length;r<n;r++){const i=t.charCodeAt(r);if(i>=55296&&i<=56319&&r+1<n){const n=t.charCodeAt(r+1);if(n>=56320&&n<=57343){e+=4,r++;continue}}e+=i<=127?1:i<=2047?2:3}return e},toString:t,write:e}}(),a=es?ts:(es=1,ts={byteLength:function(t){return 2*t.length},toString:function(t){const e=t.byteLength;let r="";for(let n=0;n<e-1;n+=2)r+=String.fromCharCode(t[n]+256*t[n+1]);return r},write:function(t,e){const r=t.byteLength;let n=r;for(let i=0;i<e.length&&!((n-=2)<0);++i){const r=e.charCodeAt(i),n=r>>8,s=r%256;t[2*i]=s,t[2*i+1]=n}return r}}),l=255===new Uint8Array(Uint16Array.of(255).buffer)[0];function u(t){switch(t){case"ascii":return r;case"base64":return n;case"hex":return i;case"binary":case"latin1":return s;case"utf8":case"utf-8":case void 0:case null:return o;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return a;default:throw new Error(`Unknown encoding '${t}'`)}}function h(t,e){if(t===e)return 0;const r=Math.min(t.byteLength,e.byteLength);t=new DataView(t.buffer,t.byteOffset,t.byteLength),e=new DataView(e.buffer,e.byteOffset,e.byteLength);let n=0;for(let i=r-r%4;n<i;n+=4){if(t.getUint32(n,l)!==e.getUint32(n,l))break}for(;n<r;n++){const r=t.getUint8(n),i=e.getUint8(n);if(r<i)return-1;if(r>i)return 1}return t.byteLength>e.byteLength?1:t.byteLength<e.byteLength?-1:0}function c(t,e,r){return"string"==typeof t?function(t,e){const r=u(e),n=new Uint8Array(r.byteLength(t));return r.write(n,t),n}(t,e):Array.isArray(t)?function(t){const e=new Uint8Array(t.length);return e.set(t),e}(t):ArrayBuffer.isView(t)?function(t){const e=new Uint8Array(t.byteLength);return e.set(t),e}(t):function(t,e,r){return new Uint8Array(t,e,r)}(t,e,r)}function f(t,e,r,n){return d(t,e,r,n,!0)}function d(t,e,r,n,i){if(0===t.byteLength)return-1;if("string"==typeof r?(n=r,r=0):void 0===r?r=i?0:t.length-1:r<0&&(r+=t.byteLength),r>=t.byteLength){if(i)return-1;r=t.byteLength-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof e)e=c(e,n);else if("number"==typeof e)return e&=255,i?t.indexOf(e,r):t.lastIndexOf(e,r);if(0===e.byteLength)return-1;if(i){let n=-1;for(let i=r;i<t.byteLength;i++)if(t[i]===e[-1===n?0:i-n]){if(-1===n&&(n=i),i-n+1===e.byteLength)return n}else-1!==n&&(i-=i-n),n=-1}else{r+e.byteLength>t.byteLength&&(r=t.byteLength-e.byteLength);for(let n=r;n>=0;n--){let r=!0;for(let i=0;i<e.byteLength;i++)if(t[n+i]!==e[i]){r=!1;break}if(r)return n}}return-1}function p(t,e,r){const n=t[e];t[e]=t[r],t[r]=n}t.exports=e={isBuffer:function(t){return t instanceof Uint8Array},isEncoding:function(t){try{return u(t),!0}catch{return!1}},alloc:function(t,r,n){const i=new Uint8Array(t);return void 0!==r&&e.fill(i,r,0,i.byteLength,n),i},allocUnsafe:function(t){return new Uint8Array(t)},allocUnsafeSlow:function(t){return new Uint8Array(t)},byteLength:function(t,e){return u(e).byteLength(t)},compare:h,concat:function(t,e){void 0===e&&(e=t.reduce((t,e)=>t+e.byteLength,0));const r=new Uint8Array(e);let n=0;for(const i of t){if(n+i.byteLength>r.byteLength)return r.set(i.subarray(0,r.byteLength-n),n),r;r.set(i,n),n+=i.byteLength}return r},copy:function(t,e,r=0,n=0,i=t.byteLength){if(r<0&&(r=0),r>=e.byteLength)return 0;const s=e.byteLength-r;if(n<0&&(n=0),n>=t.byteLength)return 0;if(i<=n)return 0;i>t.byteLength&&(i=t.byteLength),i-n>s&&(i=n+s);const o=i-n;return t===e?e.copyWithin(r,n,i):(0===n&&i===t.byteLength||(t=t.subarray(n,i)),e.set(t,r)),o},equals:function(t,e){return t===e||t.byteLength===e.byteLength&&0===h(t,e)},fill:function(t,r,n=0,i=t.byteLength,s="utf8"){if("string"==typeof r?"string"==typeof n?(s=n,n=0,i=t.byteLength):"string"==typeof i&&(s=i,i=t.byteLength):"number"==typeof r?r&=255:"boolean"==typeof r&&(r=+r),n<0&&(n=0),n>=t.byteLength)return t;if(i<=n)return t;if(i>t.byteLength&&(i=t.byteLength),"number"==typeof r)return t.fill(r,n,i);"string"==typeof r&&(r=e.from(r,s));const o=r.byteLength;for(let e=0,a=i-n;e<a;++e)t[e+n]=r[e%o];return t},from:c,includes:function(t,e,r,n){return-1!==f(t,e,r,n)},indexOf:f,lastIndexOf:function(t,e,r,n){return d(t,e,r,n,!1)},swap16:function(t){const e=t.byteLength;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let r=0;r<e;r+=2)p(t,r,r+1);return t},swap32:function(t){const e=t.byteLength;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let r=0;r<e;r+=4)p(t,r,r+3),p(t,r+1,r+2);return t},swap64:function(t){const e=t.byteLength;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let r=0;r<e;r+=8)p(t,r,r+7),p(t,r+1,r+6),p(t,r+2,r+5),p(t,r+3,r+4);return t},toBuffer:function(t){return t},toString:function(t,e="utf8",r=0,n=t.byteLength){return 1===arguments.length?o.toString(t):2===arguments.length?u(e).toString(t):(r<0&&(r=0),r>=t.byteLength||n<=r?"":(n>t.byteLength&&(n=t.byteLength),0===r&&n===t.byteLength||(t=t.subarray(r,n)),u(e).toString(t)))},write:function(t,r,n=0,i=t.byteLength,s){if(2===arguments.length)return o.write(t,r);"string"==typeof n?(s=n,n=0,i=t.byteLength):"string"==typeof i&&(s=i,i=t.byteLength-n),i=Math.min(i,e.byteLength(r,s));let a=n;if(a<0&&(a=0),a>=t.byteLength)return 0;let l=n+i;return l<=a?0:(l>t.byteLength&&(l=t.byteLength),0===a&&l===t.byteLength||(t=t.subarray(a,l)),u(s).write(t,r))},readDoubleBE:function(t,e=0){return new DataView(t.buffer,t.byteOffset,t.byteLength).getFloat64(e,!1)},readDoubleLE:function(t,e=0){return new DataView(t.buffer,t.byteOffset,t.byteLength).getFloat64(e,!0)},readFloatBE:function(t,e=0){return new DataView(t.buffer,t.byteOffset,t.byteLength).getFloat32(e,!1)},readFloatLE:function(t,e=0){return new DataView(t.buffer,t.byteOffset,t.byteLength).getFloat32(e,!0)},readInt32BE:function(t,e=0){return new DataView(t.buffer,t.byteOffset,t.byteLength).getInt32(e,!1)},readInt32LE:function(t,e=0){return new DataView(t.buffer,t.byteOffset,t.byteLength).getInt32(e,!0)},readUInt32BE:function(t,e=0){return new DataView(t.buffer,t.byteOffset,t.byteLength).getUint32(e,!1)},readUInt32LE:function(t,e=0){return new DataView(t.buffer,t.byteOffset,t.byteLength).getUint32(e,!0)},writeDoubleBE:function(t,e,r=0){return new DataView(t.buffer,t.byteOffset,t.byteLength).setFloat64(r,e,!1),r+8},writeDoubleLE:function(t,e,r=0){return new DataView(t.buffer,t.byteOffset,t.byteLength).setFloat64(r,e,!0),r+8},writeFloatBE:function(t,e,r=0){return new DataView(t.buffer,t.byteOffset,t.byteLength).setFloat32(r,e,!1),r+4},writeFloatLE:function(t,e,r=0){return new DataView(t.buffer,t.byteOffset,t.byteLength).setFloat32(r,e,!0),r+4},writeInt32BE:function(t,e,r=0){return new DataView(t.buffer,t.byteOffset,t.byteLength).setInt32(r,e,!1),r+4},writeInt32LE:function(t,e,r=0){return new DataView(t.buffer,t.byteOffset,t.byteLength).setInt32(r,e,!0),r+4},writeUInt32BE:function(t,e,r=0){return new DataView(t.buffer,t.byteOffset,t.byteLength).setUint32(r,e,!1),r+4},writeUInt32LE:function(t,e,r=0){return new DataView(t.buffer,t.byteOffset,t.byteLength).setUint32(r,e,!0),r+4}}}(ds,ds.exports)),ds.exports}function bs(){if(os)return ss;os=1;const t=ps();function e(t,e){const r=t.byteLength;if(r<=e)return 0;const n=Math.max(e,r-4);let i=r-1;for(;i>n&&128==(192&t[i]);)i--;if(i<e)return 0;const s=t[i];let o;if(s<=127)return 0;if(s>=194&&s<=223)o=2;else if(s>=224&&s<=239)o=3;else{if(!(s>=240&&s<=244))return 0;o=4}const a=r-i;return a<o?a:0}return ss=class{constructor(){this._reset()}get remaining(){return this.bytesSeen}decode(r){if(0===r.byteLength)return"";if(0===this.bytesNeeded&&0===e(r,0))return this.bytesSeen=function(t){const e=t.byteLength;if(0===e)return 0;const r=t[e-1];if(r<=127)return 0;if(128!=(192&r))return 1;const n=Math.max(0,e-4);let i=e-2;for(;i>=n&&128==(192&t[i]);)i--;if(i<0)return 1;const s=t[i];let o;if(s>=194&&s<=223)o=2;else if(s>=224&&s<=239)o=3;else{if(!(s>=240&&s<=244))return 1;o=4}if(e-i!==o)return 1;if(o>=3){const e=t[i+1];if(224===s&&e<160)return 1;if(237===s&&e>159)return 1;if(240===s&&e<144)return 1;if(244===s&&e>143)return 1}return 0}(r),t.toString(r,"utf8");let n="",i=0;if(this.bytesNeeded>0){for(;i<r.byteLength;){const t=r[i];if(t<this.lowerBoundary||t>this.upperBoundary){n+="�",this._reset();break}if(this.lowerBoundary=128,this.upperBoundary=191,this.codePoint=this.codePoint<<6|63&t,this.bytesSeen++,i++,this.bytesSeen===this.bytesNeeded){n+=String.fromCodePoint(this.codePoint),this._reset();break}}if(this.bytesNeeded>0)return n}const s=e(r,i),o=r.byteLength-s;o>i&&(n+=t.toString(r,"utf8",i,o));for(let t=o;t<r.byteLength;t++){const e=r[t];0!==this.bytesNeeded?e<this.lowerBoundary||e>this.upperBoundary?(n+="�",t--,this._reset()):(this.lowerBoundary=128,this.upperBoundary=191,this.codePoint=this.codePoint<<6|63&e,this.bytesSeen++,this.bytesSeen===this.bytesNeeded&&(n+=String.fromCodePoint(this.codePoint),this._reset())):e<=127?(this.bytesSeen=0,n+=String.fromCharCode(e)):e>=194&&e<=223?(this.bytesNeeded=2,this.bytesSeen=1,this.codePoint=31&e):e>=224&&e<=239?(224===e?this.lowerBoundary=160:237===e&&(this.upperBoundary=159),this.bytesNeeded=3,this.bytesSeen=1,this.codePoint=15&e):e>=240&&e<=244?(240===e?this.lowerBoundary=144:244===e&&(this.upperBoundary=143),this.bytesNeeded=4,this.bytesSeen=1,this.codePoint=7&e):(this.bytesSeen=1,n+="�")}return n}flush(){const t=this.bytesNeeded>0?"�":"";return this._reset(),t}_reset(){this.codePoint=0,this.bytesNeeded=0,this.bytesSeen=0,this.lowerBoundary=128,this.upperBoundary=191}}}function gs(){if(ls)return as;ls=1;const t=function(){if(is)return ns;is=1;const t=ps();return ns=class{constructor(t){this.encoding=t}get remaining(){return 0}decode(e){return t.toString(e,this.encoding)}flush(){return""}}}(),e=bs();return as=class{constructor(r="utf8"){switch(this.encoding=function(t){switch(t=t.toLowerCase()){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return t;default:throw new Error("Unknown encoding: "+t)}}(r),this.encoding){case"utf8":this.decoder=new e;break;case"utf16le":case"base64":throw new Error("Unsupported encoding: "+this.encoding);default:this.decoder=new t(this.encoding)}}get remaining(){return this.decoder.remaining}push(t){return"string"==typeof t?t:this.decoder.decode(t)}write(t){return this.push(t)}end(t){let e="";return t&&(e=this.push(t)),e+=this.decoder.flush(),e}}}function ys(){if(fs)return cs;fs=1;const{EventEmitter:t}=ji?Ci:(ji=1,Ci=s),e=$i(),r=gs(),n=hs?us:(hs=1,us=class t extends Error{constructor(e,r,n=t){super(e),this.code=r,Error.captureStackTrace&&Error.captureStackTrace(this,n)}static isStreamDestroyed(t){return t&&"STREAM_DESTROYED"===t.code}static isPrematureClose(t){return t&&"PREMATURE_CLOSE"===t.code}static isAborted(t){return t&&"ABORTED"===t.code}static isBadArgument(t){return t&&"BAD_ARGUMENT"===t.code}get name(){return"StreamError"}static STREAM_DESTROYED(){return new t("Stream was destroyed","STREAM_DESTROYED",t.STREAM_DESTROYED)}static PREMATURE_CLOSE(e="Premature close"){return new t(e,"PREMATURE_CLOSE",t.PREMATURE_CLOSE)}static ABORTED(){return new t("Stream aborted","ABORTED",t.ABORTED)}static BAD_ARGUMENT(e="Bad argument"){return new t(e,"BAD_ARGUMENT",t.BAD_ARGUMENT)}}),i="undefined"==typeof queueMicrotask?t=>Gt.process.nextTick(t):queueMicrotask,o=536870911,a=1^o,l=2^o,u=32,h=64,c=128,f=256,d=1024,p=2048,b=4096,g=8192,y=16384,m=32768,_=131072,w=131328,S=16^o,v=536805375,E=768^o,x=536838143,k=536739839,T=1<<18,R=2<<18,A=4<<18,L=8<<18,M=16<<18,N=32<<18,D=64<<18,O=128<<18,P=256<<18,I=512<<18,C=1024<<18,j=535822335,W=503316479,U=268435455,B=262160,F=536608751,z=8404992,$=14,G=15,H=8405006,q=33587200,V=33587215,Y=2359296,Q=270794767,K=Symbol.asyncIterator||/* @__PURE__ */Symbol("asyncIterator");class Z{constructor(t,{highWaterMark:r=16384,map:n=null,mapWritable:i,byteLength:s,byteLengthWritable:o}={}){this.stream=t,this.queue=new e,this.highWaterMark=r,this.buffered=0,this.error=null,this.pipeline=null,this.drains=null,this.byteLength=o||s||vt,this.map=i||n,this.afterWrite=it.bind(this),this.afterUpdateNextTick=at.bind(this)}get ending(){return 0!==(this.stream._duplexState&I)}get ended(){return 0!==(this.stream._duplexState&N)}push(t){return!(142606350&this.stream._duplexState)&&(null!==this.map&&(t=this.map(t)),this.buffered+=this.byteLength(t),this.queue.push(t),this.buffered<this.highWaterMark?(this.stream._duplexState|=L,!0):(this.stream._duplexState|=6291456,!1))}shift(){const t=this.queue.shift();return this.buffered-=this.byteLength(t),0===this.buffered&&(this.stream._duplexState&=534773759),t}end(t){"function"==typeof t?this.stream.once("finish",t):null!=t&&this.push(t),this.stream._duplexState=(this.stream._duplexState|I)&j}autoBatch(t,e){const r=[],n=this.stream;for(r.push(t);(n._duplexState&Q)===Y;)r.push(n._writableState.shift());if(0!==(n._duplexState&G))return e(null);n._writev(r,e)}update(){const t=this.stream;t._duplexState|=R;do{for(;(t._duplexState&Q)===L;){const e=this.shift();t._duplexState|=67371008,t._write(e,this.afterWrite)}1310720&t._duplexState||this.updateNonPrimary()}while(!0===this.continueUpdate());t._duplexState&=536346623}updateNonPrimary(){const t=this.stream;if((144965647&t._duplexState)===I)return t._duplexState=t._duplexState|T,void t._final(rt.bind(this));4!==(t._duplexState&$)?1===(t._duplexState&V)&&(t._duplexState=(t._duplexState|B)&a,t._open(lt.bind(this))):0===(t._duplexState&q)&&(t._duplexState|=B,t._destroy(nt.bind(this)))}continueUpdate(){return 0!==(this.stream._duplexState&O)&&(this.stream._duplexState&=W,!0)}updateCallback(){(35127311&this.stream._duplexState)===A?this.update():this.updateNextTick()}updateNextTick(){0===(this.stream._duplexState&O)&&(this.stream._duplexState|=O,0===(this.stream._duplexState&R)&&i(this.afterUpdateNextTick))}}class J{constructor(t,{highWaterMark:r=16384,map:n=null,mapReadable:i,byteLength:s,byteLengthReadable:o}={}){this.stream=t,this.queue=new e,this.highWaterMark=0===r?1:r,this.buffered=0,this.readAhead=r>0,this.error=null,this.pipeline=null,this.byteLength=o||s||vt,this.map=i||n,this.pipeTo=null,this.afterRead=st.bind(this),this.afterUpdateNextTick=ot.bind(this)}get ending(){return 0!==(this.stream._duplexState&d)}get ended(){return 0!==(this.stream._duplexState&y)}pipe(t,e){if(null!==this.pipeTo)throw n.BAD_ARGUMENT("Can only pipe to one destination");if("function"!=typeof e&&(e=null),this.stream._duplexState|=512,this.pipeTo=t,this.pipeline=new tt(this.stream,t,e),e&&this.stream.on("error",Et),St(t))t._writableState.pipeline=this.pipeline,e&&t.on("error",Et),t.on("finish",this.pipeline.finished.bind(this.pipeline));else{const e=this.pipeline.done.bind(this.pipeline,t),r=this.pipeline.done.bind(this.pipeline,t,null);t.on("error",e),t.on("close",r),t.on("finish",this.pipeline.finished.bind(this.pipeline))}t.on("drain",et.bind(this)),this.stream.emit("piping",t),t.emit("pipe",this.stream)}push(t){const e=this.stream;return null===t?(this.highWaterMark=0,e._duplexState=536805311&e._duplexState|1024,!1):null!==this.map&&null===(t=this.map(t))?(e._duplexState&=v,this.buffered<this.highWaterMark):(this.buffered+=this.byteLength(t),this.queue.push(t),e._duplexState=(e._duplexState|c)&v,this.buffered<this.highWaterMark)}shift(){const t=this.queue.shift();return this.buffered-=this.byteLength(t),0===this.buffered&&(this.stream._duplexState&=536862591),t}unshift(t){const e=[null!==this.map?this.map(t):t];for(;this.buffered>0;)e.push(this.shift());for(let r=0;r<e.length-1;r++){const t=e[r];this.buffered+=this.byteLength(t),this.queue.push(t)}this.push(e[e.length-1])}read(){const t=this.stream;if((16527&t._duplexState)===c){const e=this.shift();return null!==this.pipeTo&&!1===this.pipeTo.write(e)&&(t._duplexState&=E),0!==(t._duplexState&p)&&t.emit("data",e),e}return!1===this.readAhead&&(t._duplexState|=_,this.updateNextTick()),null}drain(){const t=this.stream;for(;(16527&t._duplexState)===c&&768&t._duplexState;){const e=this.shift();null!==this.pipeTo&&!1===this.pipeTo.write(e)&&(t._duplexState&=E),0!==(t._duplexState&p)&&t.emit("data",e)}}update(){const t=this.stream;t._duplexState|=u;do{for(this.drain();this.buffered<this.highWaterMark&&(214047&t._duplexState)===_;)t._duplexState|=65552,t._read(this.afterRead),this.drain();4224==(12431&t._duplexState)&&(t._duplexState|=g,t.emit("readable")),80&t._duplexState||this.updateNonPrimary()}while(!0===this.continueUpdate());t._duplexState&=536870879}updateNonPrimary(){const t=this.stream;(1167&t._duplexState)===d&&(t._duplexState=536869887&t._duplexState|16384,t.emit("end"),(t._duplexState&H)===z&&(t._duplexState|=4),null!==this.pipeTo&&this.pipeTo.end()),4!==(t._duplexState&$)?1===(t._duplexState&V)&&(t._duplexState=(t._duplexState|B)&a,t._open(lt.bind(this))):0===(t._duplexState&q)&&(t._duplexState|=B,t._destroy(nt.bind(this)))}continueUpdate(){return 0!==(this.stream._duplexState&m)&&(this.stream._duplexState&=x,!0)}updateCallback(){(32879&this.stream._duplexState)===h?this.update():this.updateNextTick()}updateNextTickIfOpen(){32769&this.stream._duplexState||(this.stream._duplexState|=m,0===(this.stream._duplexState&u)&&i(this.afterUpdateNextTick))}updateNextTick(){0===(this.stream._duplexState&m)&&(this.stream._duplexState|=m,0===(this.stream._duplexState&u)&&i(this.afterUpdateNextTick))}}class X{constructor(t){this.data=null,this.afterTransform=ut.bind(t),this.afterFinal=null}}class tt{constructor(t,e,r){this.from=t,this.to=e,this.afterPipe=r,this.error=null,this.pipeToFinished=!1}finished(){this.pipeToFinished=!0}done(t,e){e&&(this.error=e),t!==this.to||(this.to=null,null===this.from)?t!==this.from||(this.from=null,null===this.to)?(null!==this.afterPipe&&this.afterPipe(this.error),this.to=this.from=this.afterPipe=null):0===(t._duplexState&y)&&this.to.destroy(this.error||n.PREMATURE_CLOSE("Readable stream closed")):0!==(this.from._duplexState&y)&&this.pipeToFinished||this.from.destroy(this.error||n.PREMATURE_CLOSE("Writable stream closed"))}}function et(){this.stream._duplexState|=512,this.updateCallback()}function rt(t){const e=this.stream;t&&e.destroy(t),0===(e._duplexState&$)&&(e._duplexState|=N,e.emit("finish")),(e._duplexState&H)===z&&(e._duplexState|=4),e._duplexState&=402391039,0===(e._duplexState&R)?this.update():this.updateNextTick()}function nt(t){const e=this.stream;t||n.isStreamDestroyed(this.error)||(t=this.error),t&&e.emit("error",t),e._duplexState|=8,e.emit("close");const r=e._readableState,i=e._writableState;if(null!==r&&null!==r.pipeline&&r.pipeline.done(e,t),null!==i){for(;null!==i.drains&&i.drains.length>0;)i.drains.shift().resolve(!1);null!==i.pipeline&&i.pipeline.done(e,t)}}function it(t){const e=this.stream;t&&e.destroy(t),e._duplexState&=469499903,null!==this.drains&&function(t){for(let e=0;e<t.length;e++)0===--t[e].writes&&(t.shift().resolve(!0),e--)}(this.drains),(6553615&e._duplexState)===M&&(e._duplexState&=532676607,(e._duplexState&D)===D&&e.emit("drain")),this.updateCallback()}function st(t){t&&this.stream.destroy(t),this.stream._duplexState&=S,!1===this.readAhead&&0===(this.stream._duplexState&f)&&(this.stream._duplexState&=k),this.updateCallback()}function ot(){0===(this.stream._duplexState&u)&&(this.stream._duplexState&=x,this.update())}function at(){0===(this.stream._duplexState&R)&&(this.stream._duplexState&=W,this.update())}function lt(t){const e=this.stream;t&&e.destroy(t),4&e._duplexState||(17423&e._duplexState||(e._duplexState|=h),142606351&e._duplexState||(e._duplexState|=A),e.emit("open")),e._duplexState&=F,null!==e._writableState&&e._writableState.updateCallback(),null!==e._readableState&&e._readableState.updateCallback()}function ut(t,e){null!=e&&this.push(e),this._writableState.afterWrite(t)}function ht(t){null!==this._readableState&&("data"===t&&(this._duplexState|=133376,this._readableState.updateNextTick()),"readable"===t&&(this._duplexState|=b,this._readableState.updateNextTick())),null!==this._writableState&&"drain"===t&&(this._duplexState|=D,this._writableState.updateNextTick())}class ct extends t{constructor(t){super(),this._duplexState=0,this._readableState=null,this._writableState=null,t&&(t.open&&(this._open=t.open),t.destroy&&(this._destroy=t.destroy),t.predestroy&&(this._predestroy=t.predestroy),t.signal&&t.signal.addEventListener("abort",xt.bind(this))),this.on("newListener",ht)}_open(t){t(null)}_destroy(t){t(null)}_predestroy(){}get readable(){return null!==this._readableState||void 0}get writable(){return null!==this._writableState||void 0}get destroyed(){return!!(8&this._duplexState)}get destroying(){return 0!==(this._duplexState&$)}destroy(t){0===(this._duplexState&$)&&(t||(t=n.STREAM_DESTROYED()),this._duplexState=535822271&this._duplexState|4,null!==this._readableState&&(this._readableState.highWaterMark=0,this._readableState.error=t),null!==this._writableState&&(this._writableState.highWaterMark=0,this._writableState.error=t),this._duplexState|=2,this._predestroy(),this._duplexState&=l,null!==this._readableState&&this._readableState.updateNextTick(),null!==this._writableState&&this._writableState.updateNextTick())}}class ft extends ct{constructor(t){super(t),this._duplexState|=8519681,this._readableState=new J(this,t),t&&(!1===this._readableState.readAhead&&(this._duplexState&=k),t.read&&(this._read=t.read),t.eagerOpen&&this._readableState.updateNextTick(),t.encoding&&this.setEncoding(t.encoding))}static deferred(t,e){const r=new gt(e);return t().then(t=>{if(null===t)return r.end();r.destroying||mt(t,r,Et)}).catch(t=>r.destroy(t)),r}setEncoding(t){const e=new r(t),n=this._readableState.map||_t;return this._readableState.map=function(t){const r=e.push(t);return""===r&&(0!==t.byteLength||e.remaining>0)?null:n(r)},this}_read(t){t(null)}pipe(t,e){return this._readableState.updateNextTick(),this._readableState.pipe(t,e),t}read(){return this._readableState.updateNextTick(),this._readableState.read()}push(t){return this._readableState.updateNextTickIfOpen(),this._readableState.push(t)}unshift(t){return this._readableState.updateNextTickIfOpen(),this._readableState.unshift(t)}resume(){return this._duplexState|=w,this._readableState.updateNextTick(),this}pause(){return this._duplexState&=!1===this._readableState.readAhead?536739583:536870655,this}static _fromAsyncIterator(t,e){let r;const n=new ft({...e,read(e){t.next().then(i).then(e.bind(null,null)).catch(e)},predestroy(){r=t.return()},destroy(t){if(!r)return t(null);r.then(t.bind(null,null)).catch(t)}});return n;function i(t){t.done?n.push(null):n.push(t.value)}}static from(t,e){if(St(r=t)&&r.readable)return t;var r;if(t[K])return this._fromAsyncIterator(t[K](),e);Array.isArray(t)||(t=void 0===t?[]:[t]);let n=0;return new ft({...e,read(e){this.push(n===t.length?null:t[n++]),e(null)}})}static isBackpressured(t){return!!(17422&t._duplexState)||t._readableState.buffered>=t._readableState.highWaterMark}static isPaused(t){return 0===(t._duplexState&f)}[K](){const t=this;let e=null,r=null,i=null;return this.on("error",t=>{e=t}),this.on("readable",function(){null!==r&&s(t.read())}),this.on("close",function(){null!==r&&s(null)}),{[K](){return this},next:()=>new Promise(function(e,n){r=e,i=n;const o=t.read();null!==o?s(o):8&t._duplexState&&s(null)}),return:()=>o(null),throw:t=>o(t)};function s(s){null!==i&&(e?i(e):null===s&&0===(t._duplexState&y)?i(n.STREAM_DESTROYED()):r({value:s,done:null===s}),i=r=null)}function o(e){return t.destroy(e),new Promise((r,n)=>{if(8&t._duplexState)return r({value:void 0,done:!0});t.once("close",function(){e?n(e):r({value:void 0,done:!0})})})}}}class dt extends ct{constructor(t){super(t),this._duplexState|=16385,this._writableState=new Z(this,t),t&&(t.writev&&(this._writev=t.writev),t.write&&(this._write=t.write),t.final&&(this._final=t.final),t.eagerOpen&&this._writableState.updateNextTick())}cork(){this._duplexState|=C}uncork(){this._duplexState&=U,this._writableState.updateNextTick()}_writev(t,e){e(null)}_write(t,e){this._writableState.autoBatch(t,e)}_final(t){t(null)}static isBackpressured(t){return!!(146800654&t._duplexState)}static drained(t){if(t.destroyed)return Promise.resolve(!1);const e=t._writableState;var r;const n=((r=t)._writev!==dt.prototype._writev&&r._writev!==pt.prototype._writev?Math.min(1,e.queue.length):e.queue.length)+(t._duplexState&P?1:0);return 0===n?Promise.resolve(!0):(null===e.drains&&(e.drains=[]),new Promise(t=>{e.drains.push({writes:n,resolve:t})}))}write(t){return this._writableState.updateNextTick(),this._writableState.push(t)}end(t){return this._writableState.updateNextTick(),this._writableState.end(t),this}}class pt extends ft{constructor(t){super(t),this._duplexState=1|this._duplexState&_,this._writableState=new Z(this,t),t&&(t.writev&&(this._writev=t.writev),t.write&&(this._write=t.write),t.final&&(this._final=t.final))}cork(){this._duplexState|=C}uncork(){this._duplexState&=U,this._writableState.updateNextTick()}_writev(t,e){e(null)}_write(t,e){this._writableState.autoBatch(t,e)}_final(t){t(null)}write(t){return this._writableState.updateNextTick(),this._writableState.push(t)}end(t){return this._writableState.updateNextTick(),this._writableState.end(t),this}}class bt extends pt{constructor(t){super(t),this._transformState=new X(this),t&&(t.transform&&(this._transform=t.transform),t.flush&&(this._flush=t.flush))}_write(t,e){this._readableState.buffered>=this._readableState.highWaterMark?this._transformState.data=t:this._transform(t,this._transformState.afterTransform)}_read(t){if(null!==this._transformState.data){const e=this._transformState.data;this._transformState.data=null,t(null),this._transform(e,this._transformState.afterTransform)}else t(null)}destroy(t){super.destroy(t),null!==this._transformState.data&&(this._transformState.data=null,this._transformState.afterTransform())}_transform(t,e){e(null,t)}_flush(t){t(null)}_final(t){this._transformState.afterFinal=t,this._flush(yt.bind(this))}}class gt extends bt{}function yt(t,e){const r=this._transformState.afterFinal;if(t)return r(t);null!=e&&this.push(e),this.push(null),r(null)}function mt(t,...e){const r=Array.isArray(t)?[...t,...e]:[t,...e],i=r.length&&"function"==typeof r[r.length-1]?r.pop():null;if(r.length<2)throw n.BAD_ARGUMENT("Pipeline requires at least 2 streams");let s=r[0],o=null,a=null;for(let n=1;n<r.length;n++)o=r[n],St(s)?s.pipe(o,u):(l(s,!0,n>1,u),s.pipe(o)),s=o;if(i){let t=!1;const e=St(o)||!(!o._writableState||!o._writableState.autoDestroy);o.on("error",t=>{null===a&&(a=t)}),o.on("finish",()=>{t=!0,e||i(a)}),e&&o.on("close",()=>i(a||(t?null:n.PREMATURE_CLOSE())))}return o;function l(t,e,r,i){t.on("error",i),t.on("close",function(){if(t._readableState&&!t._readableState.ended)return i(n.PREMATURE_CLOSE());if(r&&t._writableState&&!t._writableState.ended)return i(n.PREMATURE_CLOSE())})}function u(t){if(t&&!a){a=t;for(const e of r)e.destroy(t)}}}function _t(t){return t}function wt(t){return!!t._readableState||!!t._writableState}function St(t){return"number"==typeof t._duplexState&&wt(t)}function vt(t){return function(t){return"object"==typeof t&&null!==t&&"number"==typeof t.byteLength}(t)?t.byteLength:1024}function Et(){}function xt(){this.destroy(n.ABORTED())}return cs={pipeline:mt,pipelinePromise:function(...t){return new Promise((e,r)=>mt(...t,t=>{if(t)return r(t);e()}))},isStream:wt,isStreamx:St,isEnding:function(t){return!!t._readableState&&t._readableState.ending},isEnded:function(t){return!!t._readableState&&t._readableState.ended},isFinishing:function(t){return!!t._writableState&&t._writableState.ending},isFinished:function(t){return!!t._writableState&&t._writableState.ended},isDisturbed:function(t){return!(!(1&~t._duplexState)&&4&~t._duplexState&&0===(t._duplexState&q))},getStreamError:function(t,e={}){const r=t._readableState&&t._readableState.error||t._writableState&&t._writableState.error;return!e.all&&n.isStreamDestroyed(r)?null:r},Stream:ct,Writable:dt,Readable:ft,Duplex:pt,Transform:bt,PassThrough:gt}}var ms,_s,ws,Ss={};function vs(){if(ms)return Ss;ms=1;const t=ps(),e="0".charCodeAt(0),r=t.from([117,115,116,97,114,0]),n=t.from([e,e]),i=t.from([117,115,116,97,114,32]),s=t.from([32,0]),o=257,a=263;function l(t,e,r,n){for(;r<n;r++)if(t[r]===e)return r;return n}function u(t){let e=256;for(let r=0;r<148;r++)e+=t[r];for(let r=156;r<512;r++)e+=t[r];return e}function h(t,e){return(t=t.toString(8)).length>e?"7777777777777777777".slice(0,e)+" ":"0000000000000000000".slice(0,e-t.length)+t+" "}function c(e,r,n){if(128&(e=e.subarray(r,r+n))[r=0])return function(t){let e;if(128===t[0])e=!0;else{if(255!==t[0])return null;e=!1}const r=[];let n;for(n=t.length-1;n>0;n--){const i=t[n];e?r.push(i):r.push(255-i)}let i=0;const s=r.length;for(n=0;n<s;n++)i+=r[n]*Math.pow(256,n);return e?i:-1*i}(e);{for(;r<e.length&&32===e[r];)r++;const n=(i=l(e,32,r,e.length),s=e.length,o=e.length,"number"!=typeof i?o:(i=~~i)>=s?s:i>=0||(i+=s)>=0?i:0);for(;r<n&&0===e[r];)r++;return n===r?0:parseInt(t.toString(e.subarray(r,n)),8)}var i,s,o}function f(e,r,n,i){return t.toString(e.subarray(r,l(e,0,r,r+n)),i)}function d(e){const r=t.byteLength(e);let n=Math.floor(Math.log(r)/Math.log(10))+1;return r+n>=Math.pow(10,n)&&n++,r+n+e}return Ss.decodeLongPath=function(t,e){return f(t,0,t.length,e)},Ss.encodePax=function(e){let r="";e.name&&(r+=d(" path="+e.name+"\n")),e.linkname&&(r+=d(" linkpath="+e.linkname+"\n"));const n=e.pax;if(n)for(const t in n)r+=d(" "+t+"="+n[t]+"\n");return t.from(r)},Ss.decodePax=function(e){const r={};for(;e.length;){let n=0;for(;n<e.length&&32!==e[n];)n++;const i=parseInt(t.toString(e.subarray(0,n)),10);if(!i)return r;const s=t.toString(e.subarray(n+1,i-1)),o=s.indexOf("=");if(-1===o)return r;r[s.slice(0,o)]=s.slice(o+1),e=e.subarray(i)}return r},Ss.encode=function(i){const s=t.alloc(512);let a=i.name,l="";if(5===i.typeflag&&"/"!==a[a.length-1]&&(a+="/"),t.byteLength(a)!==a.length)return null;for(;t.byteLength(a)>100;){const t=a.indexOf("/");if(-1===t)return null;l+=l?"/"+a.slice(0,t):a.slice(0,t),a=a.slice(t+1)}return t.byteLength(a)>100||t.byteLength(l)>155||i.linkname&&t.byteLength(i.linkname)>100?null:(t.write(s,a),t.write(s,h(4095&i.mode,6),100),t.write(s,h(i.uid,6),108),t.write(s,h(i.gid,6),116),function(e,r,n){e.toString(8).length>11?function(t,e,r){e[r]=128;for(let n=11;n>0;n--)e[r+n]=255&t,t=Math.floor(t/256)}(e,r,n):t.write(r,h(e,11),n)}(i.size,s,124),t.write(s,h(i.mtime.getTime()/1e3|0,11),136),s[156]=e+function(t){switch(t){case"file":return 0;case"link":return 1;case"symlink":return 2;case"character-device":return 3;case"block-device":return 4;case"directory":return 5;case"fifo":return 6;case"contiguous-file":return 7;case"pax-header":return 72}return 0}(i.type),i.linkname&&t.write(s,i.linkname,157),t.copy(r,s,o),t.copy(n,s,263),i.uname&&t.write(s,i.uname,265),i.gname&&t.write(s,i.gname,297),t.write(s,h(i.devmajor||0,6),329),t.write(s,h(i.devminor||0,6),337),l&&t.write(s,l,345),t.write(s,h(u(s),6),148),s)},Ss.decode=function(n,l,h){let d=0===n[156]?0:n[156]-e,p=f(n,0,100,l);const b=c(n,100,8),g=c(n,108,8),y=c(n,116,8),m=c(n,124,12),_=c(n,136,12),w=function(t){switch(t){case 0:return"file";case 1:return"link";case 2:return"symlink";case 3:return"character-device";case 4:return"block-device";case 5:return"directory";case 6:return"fifo";case 7:return"contiguous-file";case 72:return"pax-header";case 55:return"pax-global-header";case 27:return"gnu-long-link-path";case 28:case 30:return"gnu-long-path"}return null}(d),S=0===n[157]?null:f(n,157,100,l),v=f(n,265,32),E=f(n,297,32),x=c(n,329,8),k=c(n,337,8),T=u(n);if(256===T)return null;if(T!==c(n,148,8))throw new Error("Invalid tar header. Maybe the tar is corrupted or it needs to be gunzipped?");if(function(e){return t.equals(r,e.subarray(o,263))}(n))n[345]&&(p=f(n,345,155,l)+"/"+p);else if(function(e){return t.equals(i,e.subarray(o,263))&&t.equals(s,e.subarray(a,265))}(n));else if(!h)throw new Error("Invalid tar header: unknown format.");return 0===d&&p&&"/"===p[p.length-1]&&(d=5),{name:p,mode:b,uid:g,gid:y,size:m,byteOffset:0,mtime:new Date(1e3*_),type:w,linkname:S,uname:v,gname:E,devmajor:x,devminor:k,pax:null}},Ss}var Es,xs,ks,Ts,Rs={exports:{}};function As(){if(ks)return xs;ks=1;const{Readable:t,Writable:e,getStreamError:r}=ys(),n=ps(),i=function(){if(Es)return Rs.exports;Es=1;const t={S_IFMT:61440,S_IFDIR:16384,S_IFCHR:8192,S_IFBLK:24576,S_IFIFO:4096,S_IFLNK:40960};try{Rs.exports=require("fs").constants||t}catch{Rs.exports=t}return Rs.exports}(),s=vs(),o=n.alloc(1024);class a extends e{constructor(t,e,r){super({mapWritable:c,eagerOpen:!0}),this.written=0,this.header=e,this._callback=r,this._linkname=null,this._isLinkname="symlink"===e.type&&!e.linkname,this._isVoid="file"!==e.type&&"contiguous-file"!==e.type,this._finished=!1,this._pack=t,this._openCallback=null,null===this._pack._stream?this._pack._stream=this:this._pack._pending.push(this)}_open(t){this._openCallback=t,this._pack._stream===this&&this._continueOpen()}_continuePack(t){if(null===this._callback)return;const e=this._callback;this._callback=null,e(t)}_continueOpen(){null===this._pack._stream&&(this._pack._stream=this);const t=this._openCallback;if(this._openCallback=null,null!==t){if(this._pack.destroying)return t(new Error("pack stream destroyed"));if(this._pack._finalized)return t(new Error("pack stream is already finalized"));this._pack._stream=this,this._isLinkname||this._pack._encode(this.header),this._isVoid&&(this._finish(),this._continuePack(null)),t(null)}}_write(t,e){return this._isLinkname?(this._linkname=this._linkname?n.concat([this._linkname,t]):t,e(null)):this._isVoid?t.byteLength>0?e(new Error("No body allowed for this entry")):e():(this.written+=t.byteLength,this._pack.push(t)?e():void(this._pack._drain=e))}_finish(){this._finished||(this._finished=!0,this._isLinkname&&(this.header.linkname=this._linkname?n.toString(this._linkname,"utf-8"):"",this._pack._encode(this.header)),h(this._pack,this.header.size),this._pack._done(this))}_final(t){if(this.written!==this.header.size)return t(new Error("Size mismatch"));this._finish(),t(null)}_getError(){return r(this)||new Error("tar entry destroyed")}_predestroy(){this._pack.destroy(this._getError())}_destroy(t){this._pack._done(this),this._continuePack(this._finished?null:this._getError()),t()}}class l extends t{constructor(t){super(t),this._drain=u,this._finalized=!1,this._finalizing=!1,this._pending=[],this._stream=null}entry(t,e,r){if(this._finalized||this.destroying)throw new Error("already finalized or destroyed");"function"==typeof e&&(r=e,e=null),r||(r=u),t.size&&"symlink"!==t.type||(t.size=0),t.type||(t.type=function(t){switch(t&i.S_IFMT){case i.S_IFBLK:return"block-device";case i.S_IFCHR:return"character-device";case i.S_IFDIR:return"directory";case i.S_IFIFO:return"fifo";case i.S_IFLNK:return"symlink"}return"file"}(t.mode)),t.mode||(t.mode="directory"===t.type?493:420),t.uid||(t.uid=0),t.gid||(t.gid=0),t.mtime||(t.mtime=/* @__PURE__ */new Date),"string"==typeof e&&(e=n.from(e));const s=new a(this,t,r);return n.isBuffer(e)?(t.size=e.byteLength,s.write(e),s.end(),s):(s._isVoid,s)}finalize(){this._stream||this._pending.length>0?this._finalizing=!0:this._finalized||(this._finalized=!0,this.push(o),this.push(null))}_done(t){t===this._stream&&(this._stream=null,this._finalizing&&this.finalize(),this._pending.length&&this._pending.shift()._continueOpen())}_encode(t){if(!t.pax){const e=s.encode(t);if(e)return void this.push(e)}this._encodePax(t)}_encodePax(t){const e=s.encodePax({name:t.name,linkname:t.linkname,pax:t.pax}),r={name:"PaxHeader",mode:t.mode,uid:t.uid,gid:t.gid,size:e.byteLength,mtime:t.mtime,type:"pax-header",linkname:t.linkname&&"PaxHeader",uname:t.uname,gname:t.gname,devmajor:t.devmajor,devminor:t.devminor};this.push(s.encode(r)),this.push(e),h(this,e.byteLength),r.size=t.size,r.type=t.type,this.push(s.encode(r))}_doDrain(){const t=this._drain;this._drain=u,t()}_predestroy(){const t=r(this);for(this._stream&&this._stream.destroy(t);this._pending.length;){const e=this._pending.shift();e.destroy(t),e._continueOpen()}this._doDrain()}_read(t){this._doDrain(),t()}}function u(){}function h(t,e){(e&=511)&&t.push(o.subarray(0,512-e))}function c(t){return n.isBuffer(t)?t:n.from(t)}return xs=function(t){return new l(t)}}Ts||(Ts=1,zi.extract=function(){if(ws)return _s;ws=1;const{Writable:t,Readable:e,getStreamError:r}=ys(),n=$i(),i=ps(),s=vs(),o=i.alloc(0);class a{constructor(){this.buffered=0,this.shifted=0,this.queue=new n,this._offset=0}push(t){this.buffered+=t.byteLength,this.queue.push(t)}shiftFirst(t){return 0===this.buffered?null:this._next(t)}shift(t){if(t>this.buffered)return null;if(0===t)return o;let e=this._next(t);if(t===e.byteLength)return e;const r=[e];for(;(t-=e.byteLength)>0;)e=this._next(t),r.push(e);return i.concat(r)}_next(t){const e=this.queue.peek(),r=e.byteLength-this._offset;if(t>=r){const t=this._offset?e.subarray(this._offset,e.byteLength):e;return this.queue.shift(),this._offset=0,this.buffered-=r,this.shifted+=r,t}return this.buffered-=t,this.shifted+=t,e.subarray(this._offset,this._offset+=t)}}class l extends e{constructor(t,e,r){super(),this.header=e,this.offset=r,this._parent=t}_read(t){0===this.header.size&&this.push(null),this._parent._stream===this&&this._parent._update(),t(null)}_predestroy(){this._parent.destroy(r(this))}_detach(){this._parent._stream===this&&(this._parent._stream=null,this._parent._missing=c(this.header.size),this._parent._update())}_destroy(t){this._detach(),t(null)}}class u extends t{constructor(t){super(t),t||(t={}),this._buffer=new a,this._offset=0,this._header=null,this._stream=null,this._missing=0,this._longHeader=!1,this._callback=h,this._locked=!1,this._finished=!1,this._pax=null,this._paxGlobal=null,this._gnuLongPath=null,this._gnuLongLinkPath=null,this._filenameEncoding=t.filenameEncoding||"utf-8",this._allowUnknownFormat=!!t.allowUnknownFormat,this._unlockBound=this._unlock.bind(this)}_unlock(t){if(this._locked=!1,t)return this.destroy(t),void this._continueWrite(t);this._update()}_consumeHeader(){if(this._locked)return!1;this._offset=this._buffer.shifted;try{this._header=s.decode(this._buffer.shift(512),this._filenameEncoding,this._allowUnknownFormat)}catch(t){return this._continueWrite(t),!1}if(!this._header)return!0;switch(this._header.byteOffset=this._buffer.shifted,this._header.type){case"gnu-long-path":case"gnu-long-link-path":case"pax-global-header":case"pax-header":return this._longHeader=!0,this._missing=this._header.size,!(this._missing>4194304&&(this._continueWrite(new Error("Header exceeds max size")),1))}return this._locked=!0,this._applyLongHeaders(),this._header.size>=0?0===this._header.size||"directory"===this._header.type?(this.emit("entry",this._header,this._createStream(),this._unlockBound),!0):(this._stream=this._createStream(),this._missing=this._header.size,this.emit("entry",this._header,this._stream,this._unlockBound),!0):(this._continueWrite(new Error("Invalid header")),!1)}_applyLongHeaders(){this._gnuLongPath&&(this._header.name=this._gnuLongPath,this._gnuLongPath=null),this._gnuLongLinkPath&&(this._header.linkname=this._gnuLongLinkPath,this._gnuLongLinkPath=null),this._pax&&(this._pax.path&&(this._header.name=this._pax.path),this._pax.linkpath&&(this._header.linkname=this._pax.linkpath),this._pax.size&&(this._header.size=parseInt(this._pax.size,10)),this._header.pax=this._pax,this._pax=null)}_decodeLongHeader(t){switch(this._header.type){case"gnu-long-path":this._gnuLongPath=s.decodeLongPath(t,this._filenameEncoding);break;case"gnu-long-link-path":this._gnuLongLinkPath=s.decodeLongPath(t,this._filenameEncoding);break;case"pax-global-header":this._paxGlobal=s.decodePax(t);break;case"pax-header":this._pax=null===this._paxGlobal?s.decodePax(t):Object.assign({},this._paxGlobal,s.decodePax(t))}}_consumeLongHeader(){this._longHeader=!1,this._missing=c(this._header.size);const t=this._buffer.shift(this._header.size);try{this._decodeLongHeader(t)}catch(e){return this._continueWrite(e),!1}return!0}_consumeStream(){const t=this._buffer.shiftFirst(this._missing);if(null===t)return!1;this._missing-=t.byteLength;const e=this._stream.push(t);return 0===this._missing?(this._stream.push(null),e&&this._stream._detach(),e&&!1===this._locked):e}_createStream(){return new l(this,this._header,this._offset)}_update(){for(;this._buffer.buffered>0&&!this.destroying;){if(this._missing>0){if(null!==this._stream){if(!1===this._consumeStream())return;continue}if(!0===this._longHeader){if(this._missing>this._buffer.buffered)break;if(!1===this._consumeLongHeader())return!1;continue}const t=this._buffer.shiftFirst(this._missing);null!==t&&(this._missing-=t.byteLength);continue}if(this._buffer.buffered<512)break;if(null!==this._stream||!1===this._consumeHeader())return}this._continueWrite(null)}_continueWrite(t){const e=this._callback;this._callback=h,e(t)}_write(t,e){this._callback=e,this._buffer.push(t),this._update()}_final(t){this._finished=0===this._missing&&0===this._buffer.buffered,t(this._finished?null:new Error("Unexpected end of data"))}_predestroy(){this._continueWrite(null)}_destroy(t){this._stream&&this._stream.destroy(r(this)),t(null)}[Symbol.asyncIterator](){let t=null,e=null,r=null,n=null,i=null;const s=this;return this.on("entry",function(t,s,o){i=o,s.on("error",h),e?(e({value:s,done:!1}),e=r=null):n=s}),this.on("error",e=>{t=e}),this.on("close",function(){o(t),e&&(t?r(t):e({value:void 0,done:!0}),e=r=null)}),{[Symbol.asyncIterator](){return this},next:()=>new Promise(a),return:()=>l(null),throw:t=>l(t)};function o(t){if(!i)return;const e=i;i=null,e(t)}function a(i,a){return t?a(t):n?(i({value:n,done:!1}),void(n=null)):(e=i,r=a,o(null),void(s._finished&&e&&(e({value:void 0,done:!0}),e=r=null)))}function l(t){return s.destroy(t),o(t),new Promise((e,r)=>{if(s.destroyed)return e({value:void 0,done:!0});s.once("close",function(){t?r(t):e({value:void 0,done:!0})})})}}}function h(){}function c(t){return(t&=511)&&512-t}return _s=function(t){return new u(t)}}(),zi.pack=As());class Ls extends di{constructor(t){super(t),this._format="zip",this._module=new Ii(t),this._supportsDirectory=!0,this._supportsSymlink=!0,this._modulePipe()}}export{di as Archiver,Ls as ZipArchive};