@js-utils-kit/types 1.3.0 → 1.5.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.
- package/dist/index.cjs +3 -3
- package/dist/index.d.cts +142 -1
- package/dist/index.d.mts +142 -1
- package/dist/index.mjs +2 -2
- package/package.json +14 -14
package/dist/index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var e=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),t=e(((e,t)=>{t.exports=typeof process==`object`&&process&&process.platform===`win32`?{sep:`\\`}:{sep:`/`}})),n=e(((e,t)=>{t.exports=n;function n(e,t,n){e instanceof RegExp&&(e=r(e,n)),t instanceof RegExp&&(t=r(t,n));var a=i(e,t,n);return a&&{start:a[0],end:a[1],pre:n.slice(0,a[0]),body:n.slice(a[0]+e.length,a[1]),post:n.slice(a[1]+t.length)}}function r(e,t){var n=t.match(e);return n?n[0]:null}n.range=i;function i(e,t,n){var r,i,a,o,s,c=n.indexOf(e),l=n.indexOf(t,c+1),u=c;if(c>=0&&l>0){if(e===t)return[c,l];for(r=[],a=n.length;u>=0&&!s;)u==c?(r.push(u),c=n.indexOf(e,u+1)):r.length==1?s=[r.pop(),l]:(i=r.pop(),i<a&&(a=i,o=l),l=n.indexOf(t,u+1)),u=c<l&&c>=0?c:l;r.length&&(s=[a,o])}return s}})),r=e(((e,t)=>{var r=n();t.exports=p;var i=`\0SLASH`+Math.random()+`\0`,a=`\0OPEN`+Math.random()+`\0`,o=`\0CLOSE`+Math.random()+`\0`,s=`\0COMMA`+Math.random()+`\0`,c=`\0PERIOD`+Math.random()+`\0`;function l(e){return parseInt(e,10)==e?parseInt(e,10):e.charCodeAt(0)}function u(e){return e.split(`\\\\`).join(i).split(`\\{`).join(a).split(`\\}`).join(o).split(`\\,`).join(s).split(`\\.`).join(c)}function d(e){return e.split(i).join(`\\`).split(a).join(`{`).split(o).join(`}`).split(s).join(`,`).split(c).join(`.`)}function f(e){if(!e)return[``];var t=[],n=r(`{`,`}`,e);if(!n)return e.split(`,`);var i=n.pre,a=n.body,o=n.post,s=i.split(`,`);s[s.length-1]+=`{`+a+`}`;var c=f(o);return o.length&&(s[s.length-1]+=c.shift(),s.push.apply(s,c)),t.push.apply(t,s),t}function p(e){return e?(e.substr(0,2)===`{}`&&(e=`\\{\\}`+e.substr(2)),y(u(e),!0).map(d)):[]}function m(e){return`{`+e+`}`}function h(e){return/^-?0\d/.test(e)}function g(e,t){return e<=t}function v(e,t){return e>=t}function y(e,t){var n=[],i=r(`{`,`}`,e);if(!i)return[e];var a=i.pre,s=i.post.length?y(i.post,!1):[``];if(/\$$/.test(i.pre))for(var c=0;c<s.length;c++){var u=a+`{`+i.body+`}`+s[c];n.push(u)}else{var d=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(i.body),p=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(i.body),b=d||p,x=i.body.indexOf(`,`)>=0;if(!b&&!x)return i.post.match(/,(?!,).*\}/)?(e=i.pre+`{`+i.body+o+i.post,y(e)):[e];var S;if(b)S=i.body.split(/\.\./);else if(S=f(i.body),S.length===1&&(S=y(S[0],!1).map(m),S.length===1))return s.map(function(e){return i.pre+S[0]+e});var C;if(b){var w=l(S[0]),T=l(S[1]),E=Math.max(S[0].length,S[1].length),D=S.length==3?Math.abs(l(S[2])):1,O=g;T<w&&(D*=-1,O=v);var k=S.some(h);C=[];for(var A=w;O(A,T);A+=D){var j;if(p)j=String.fromCharCode(A),j===`\\`&&(j=``);else if(j=String(A),k){var M=E-j.length;if(M>0){var N=Array(M+1).join(`0`);j=A<0?`-`+N+j.slice(1):N+j}}C.push(j)}}else{C=[];for(var P=0;P<S.length;P++)C.push.apply(C,y(S[P],!1))}for(var P=0;P<C.length;P++)for(var c=0;c<s.length;c++){var u=a+C[P]+s[c];(!t||b||u)&&n.push(u)}}return n}})),i=e(((e,n)=>{let i=n.exports=(e,t,n={})=>(v(t),!n.nocomment&&t.charAt(0)===`#`?!1:new w(t,n).match(e));n.exports=i;let a=t();i.sep=a.sep;let o=Symbol(`globstar **`);i.GLOBSTAR=o;let s=r(),c={"!":{open:`(?:(?!(?:`,close:`))[^/]*?)`},"?":{open:`(?:`,close:`)?`},"+":{open:`(?:`,close:`)+`},"*":{open:`(?:`,close:`)*`},"@":{open:`(?:`,close:`)`}},l=`[^/]`,u=l+`*?`,d=e=>e.split(``).reduce((e,t)=>(e[t]=!0,e),{}),f=d(`().*{}+?[]^$\\!`),p=d(`[.(`),m=/\/+/;i.filter=(e,t={})=>(n,r,a)=>i(n,e,t);let h=(e,t={})=>{let n={};return Object.keys(e).forEach(t=>n[t]=e[t]),Object.keys(t).forEach(e=>n[e]=t[e]),n};i.defaults=e=>{if(!e||typeof e!=`object`||!Object.keys(e).length)return i;let t=i,n=(n,r,i)=>t(n,r,h(e,i));return n.Minimatch=class extends t.Minimatch{constructor(t,n){super(t,h(e,n))}},n.Minimatch.defaults=n=>t.defaults(h(e,n)).Minimatch,n.filter=(n,r)=>t.filter(n,h(e,r)),n.defaults=n=>t.defaults(h(e,n)),n.makeRe=(n,r)=>t.makeRe(n,h(e,r)),n.braceExpand=(n,r)=>t.braceExpand(n,h(e,r)),n.match=(n,r,i)=>t.match(n,r,h(e,i)),n},i.braceExpand=(e,t)=>g(e,t);let g=(e,t={})=>(v(e),t.nobrace||!/\{(?:(?!\{).)*\}/.test(e)?[e]:s(e)),v=e=>{if(typeof e!=`string`)throw TypeError(`invalid pattern`);if(e.length>65536)throw TypeError(`pattern is too long`)},y=Symbol(`subparse`);i.makeRe=(e,t)=>new w(e,t||{}).makeRe(),i.match=(e,t,n={})=>{let r=new w(t,n);return e=e.filter(e=>r.match(e)),r.options.nonull&&!e.length&&e.push(t),e};let b=e=>e.replace(/\\(.)/g,`$1`),x=e=>e.replace(/\\([^-\]])/g,`$1`),S=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,`\\$&`),C=e=>e.replace(/[[\]\\]/g,`\\$&`);var w=class{constructor(e,t){v(e),t||={},this.options=t,this.set=[],this.pattern=e,this.windowsPathsNoEscape=!!t.windowsPathsNoEscape||t.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,`/`)),this.regexp=null,this.negate=!1,this.comment=!1,this.empty=!1,this.partial=!!t.partial,this.make()}debug(){}make(){let e=this.pattern,t=this.options;if(!t.nocomment&&e.charAt(0)===`#`){this.comment=!0;return}if(!e){this.empty=!0;return}this.parseNegate();let n=this.globSet=this.braceExpand();t.debug&&(this.debug=(...e)=>console.error(...e)),this.debug(this.pattern,n),n=this.globParts=n.map(e=>e.split(m)),this.debug(this.pattern,n),n=n.map((e,t,n)=>e.map(this.parse,this)),this.debug(this.pattern,n),n=n.filter(e=>e.indexOf(!1)===-1),this.debug(this.pattern,n),this.set=n}parseNegate(){if(this.options.nonegate)return;let e=this.pattern,t=!1,n=0;for(let r=0;r<e.length&&e.charAt(r)===`!`;r++)t=!t,n++;n&&(this.pattern=e.slice(n)),this.negate=t}matchOne(e,t,n){var r=this.options;this.debug(`matchOne`,{this:this,file:e,pattern:t}),this.debug(`matchOne`,e.length,t.length);for(var i=0,a=0,s=e.length,c=t.length;i<s&&a<c;i++,a++){this.debug(`matchOne loop`);var l=t[a],u=e[i];if(this.debug(t,l,u),l===!1)return!1;if(l===o){this.debug(`GLOBSTAR`,[t,l,u]);var d=i,f=a+1;if(f===c){for(this.debug(`** at the end`);i<s;i++)if(e[i]===`.`||e[i]===`..`||!r.dot&&e[i].charAt(0)===`.`)return!1;return!0}for(;d<s;){var p=e[d];if(this.debug(`
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),t=e(((e,t)=>{t.exports=typeof process==`object`&&process&&process.platform===`win32`?{sep:`\\`}:{sep:`/`}})),n=e(((e,t)=>{t.exports=n;function n(e,t,n){e instanceof RegExp&&(e=r(e,n)),t instanceof RegExp&&(t=r(t,n));var a=i(e,t,n);return a&&{start:a[0],end:a[1],pre:n.slice(0,a[0]),body:n.slice(a[0]+e.length,a[1]),post:n.slice(a[1]+t.length)}}function r(e,t){var n=t.match(e);return n?n[0]:null}n.range=i;function i(e,t,n){var r,i,a,o,s,c=n.indexOf(e),l=n.indexOf(t,c+1),u=c;if(c>=0&&l>0){if(e===t)return[c,l];for(r=[],a=n.length;u>=0&&!s;)u==c?(r.push(u),c=n.indexOf(e,u+1)):r.length==1?s=[r.pop(),l]:(i=r.pop(),i<a&&(a=i,o=l),l=n.indexOf(t,u+1)),u=c<l&&c>=0?c:l;r.length&&(s=[a,o])}return s}})),r=e(((e,t)=>{var r=n();t.exports=p;var i=`\0SLASH`+Math.random()+`\0`,a=`\0OPEN`+Math.random()+`\0`,o=`\0CLOSE`+Math.random()+`\0`,s=`\0COMMA`+Math.random()+`\0`,c=`\0PERIOD`+Math.random()+`\0`;function l(e){return parseInt(e,10)==e?parseInt(e,10):e.charCodeAt(0)}function u(e){return e.split(`\\\\`).join(i).split(`\\{`).join(a).split(`\\}`).join(o).split(`\\,`).join(s).split(`\\.`).join(c)}function d(e){return e.split(i).join(`\\`).split(a).join(`{`).split(o).join(`}`).split(s).join(`,`).split(c).join(`.`)}function f(e){if(!e)return[``];var t=[],n=r(`{`,`}`,e);if(!n)return e.split(`,`);var i=n.pre,a=n.body,o=n.post,s=i.split(`,`);s[s.length-1]+=`{`+a+`}`;var c=f(o);return o.length&&(s[s.length-1]+=c.shift(),s.push.apply(s,c)),t.push.apply(t,s),t}function p(e){return e?(e.substr(0,2)===`{}`&&(e=`\\{\\}`+e.substr(2)),y(u(e),!0).map(d)):[]}function m(e){return`{`+e+`}`}function h(e){return/^-?0\d/.test(e)}function g(e,t){return e<=t}function v(e,t){return e>=t}function y(e,t){var n=[],i=r(`{`,`}`,e);if(!i)return[e];var a=i.pre,s=i.post.length?y(i.post,!1):[``];if(/\$$/.test(i.pre))for(var c=0;c<s.length;c++){var u=a+`{`+i.body+`}`+s[c];n.push(u)}else{var d=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(i.body),p=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(i.body),b=d||p,x=i.body.indexOf(`,`)>=0;if(!b&&!x)return i.post.match(/,(?!,).*\}/)?(e=i.pre+`{`+i.body+o+i.post,y(e)):[e];var S;if(b)S=i.body.split(/\.\./);else if(S=f(i.body),S.length===1&&(S=y(S[0],!1).map(m),S.length===1))return s.map(function(e){return i.pre+S[0]+e});var C;if(b){var w=l(S[0]),T=l(S[1]),E=Math.max(S[0].length,S[1].length),D=S.length==3?Math.abs(l(S[2])):1,O=g;T<w&&(D*=-1,O=v);var k=S.some(h);C=[];for(var A=w;O(A,T);A+=D){var j;if(p)j=String.fromCharCode(A),j===`\\`&&(j=``);else if(j=String(A),k){var M=E-j.length;if(M>0){var N=Array(M+1).join(`0`);j=A<0?`-`+N+j.slice(1):N+j}}C.push(j)}}else{C=[];for(var P=0;P<S.length;P++)C.push.apply(C,y(S[P],!1))}for(var P=0;P<C.length;P++)for(var c=0;c<s.length;c++){var u=a+C[P]+s[c];(!t||b||u)&&n.push(u)}}return n}})),i=e(((e,n)=>{let i=n.exports=(e,t,n={})=>(v(t),!n.nocomment&&t.charAt(0)===`#`?!1:new w(t,n).match(e));n.exports=i;let a=t();i.sep=a.sep;let o=Symbol(`globstar **`);i.GLOBSTAR=o;let s=r(),c={"!":{open:`(?:(?!(?:`,close:`))[^/]*?)`},"?":{open:`(?:`,close:`)?`},"+":{open:`(?:`,close:`)+`},"*":{open:`(?:`,close:`)*`},"@":{open:`(?:`,close:`)`}},l=`[^/]`,u=l+`*?`,d=e=>e.split(``).reduce((e,t)=>(e[t]=!0,e),{}),f=d(`().*{}+?[]^$\\!`),p=d(`[.(`),m=/\/+/;i.filter=(e,t={})=>(n,r,a)=>i(n,e,t);let h=(e,t={})=>{let n={};return Object.keys(e).forEach(t=>n[t]=e[t]),Object.keys(t).forEach(e=>n[e]=t[e]),n};i.defaults=e=>{if(!e||typeof e!=`object`||!Object.keys(e).length)return i;let t=i,n=(n,r,i)=>t(n,r,h(e,i));return n.Minimatch=class extends t.Minimatch{constructor(t,n){super(t,h(e,n))}},n.Minimatch.defaults=n=>t.defaults(h(e,n)).Minimatch,n.filter=(n,r)=>t.filter(n,h(e,r)),n.defaults=n=>t.defaults(h(e,n)),n.makeRe=(n,r)=>t.makeRe(n,h(e,r)),n.braceExpand=(n,r)=>t.braceExpand(n,h(e,r)),n.match=(n,r,i)=>t.match(n,r,h(e,i)),n},i.braceExpand=(e,t)=>g(e,t);let g=(e,t={})=>(v(e),t.nobrace||!/\{(?:(?!\{).)*\}/.test(e)?[e]:s(e)),v=e=>{if(typeof e!=`string`)throw TypeError(`invalid pattern`);if(e.length>65536)throw TypeError(`pattern is too long`)},y=Symbol(`subparse`);i.makeRe=(e,t)=>new w(e,t||{}).makeRe(),i.match=(e,t,n={})=>{let r=new w(t,n);return e=e.filter(e=>r.match(e)),r.options.nonull&&!e.length&&e.push(t),e};let b=e=>e.replace(/\\(.)/g,`$1`),x=e=>e.replace(/\\([^-\]])/g,`$1`),S=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,`\\$&`),C=e=>e.replace(/[[\]\\]/g,`\\$&`);var w=class{constructor(e,t){v(e),t||={},this.options=t,this.set=[],this.pattern=e,this.windowsPathsNoEscape=!!t.windowsPathsNoEscape||t.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,`/`)),this.regexp=null,this.negate=!1,this.comment=!1,this.empty=!1,this.partial=!!t.partial,this.make()}debug(){}make(){let e=this.pattern,t=this.options;if(!t.nocomment&&e.charAt(0)===`#`){this.comment=!0;return}if(!e){this.empty=!0;return}this.parseNegate();let n=this.globSet=this.braceExpand();t.debug&&(this.debug=(...e)=>console.error(...e)),this.debug(this.pattern,n),n=this.globParts=n.map(e=>e.split(m)),this.debug(this.pattern,n),n=n.map((e,t,n)=>e.map(this.parse,this)),this.debug(this.pattern,n),n=n.filter(e=>e.indexOf(!1)===-1),this.debug(this.pattern,n),this.set=n}parseNegate(){if(this.options.nonegate)return;let e=this.pattern,t=!1,n=0;for(let r=0;r<e.length&&e.charAt(r)===`!`;r++)t=!t,n++;n&&(this.pattern=e.slice(n)),this.negate=t}matchOne(e,t,n){var r=this.options;this.debug(`matchOne`,{this:this,file:e,pattern:t}),this.debug(`matchOne`,e.length,t.length);for(var i=0,a=0,s=e.length,c=t.length;i<s&&a<c;i++,a++){this.debug(`matchOne loop`);var l=t[a],u=e[i];if(this.debug(t,l,u),l===!1)return!1;if(l===o){this.debug(`GLOBSTAR`,[t,l,u]);var d=i,f=a+1;if(f===c){for(this.debug(`** at the end`);i<s;i++)if(e[i]===`.`||e[i]===`..`||!r.dot&&e[i].charAt(0)===`.`)return!1;return!0}for(;d<s;){var p=e[d];if(this.debug(`
|
|
2
2
|
globstar while`,e,d,t,f,p),this.matchOne(e.slice(d),t.slice(f),n))return this.debug(`globstar found match!`,d,s,p),!0;if(p===`.`||p===`..`||!r.dot&&p.charAt(0)===`.`){this.debug(`dot detected!`,e,d,t,f);break}this.debug(`globstar swallow a segment, and continue`),d++}return!!(n&&(this.debug(`
|
|
3
3
|
>>> no match, partial?`,e,d,t,f),d===s))}var m;if(typeof l==`string`?(m=u===l,this.debug(`string match`,l,u,m)):(m=u.match(l),this.debug(`pattern match`,l,u,m)),!m)return!1}if(i===s&&a===c)return!0;if(i===s)return n;if(a===c)return i===s-1&&e[i]===``;throw Error(`wtf?`)}braceExpand(){return g(this.pattern,this.options)}parse(e,t){v(e);let n=this.options;if(e===`**`)if(n.noglobstar)e=`*`;else return o;if(e===``)return``;let r=``,i=!1,a=!1,s=[],d=[],m,h=!1,g=-1,S=-1,w,T,E,D=e.charAt(0)===`.`,O=n.dot||D,k=()=>D?``:O?`(?!(?:^|\\/)\\.{1,2}(?:$|\\/))`:`(?!\\.)`,A=e=>e.charAt(0)===`.`?``:n.dot?`(?!(?:^|\\/)\\.{1,2}(?:$|\\/))`:`(?!\\.)`,j=()=>{if(m){switch(m){case`*`:r+=u,i=!0;break;case`?`:r+=l,i=!0;break;default:r+=`\\`+m;break}this.debug(`clearStateChar %j %j`,m,r),m=!1}};for(let t=0,o;t<e.length&&(o=e.charAt(t));t++){if(this.debug(`%s %s %s %j`,e,t,r,o),a){if(o===`/`)return!1;f[o]&&(r+=`\\`),r+=o,a=!1;continue}switch(o){case`/`:return!1;case`\\`:if(h&&e.charAt(t+1)===`-`){r+=o;continue}j(),a=!0;continue;case`?`:case`*`:case`+`:case`@`:case`!`:if(this.debug(`%s %s %s %j <-- stateChar`,e,t,r,o),h){this.debug(` in class`),o===`!`&&t===S+1&&(o=`^`),r+=o;continue}this.debug(`call clearStateChar %j`,m),j(),m=o,n.noext&&j();continue;case`(`:{if(h){r+=`(`;continue}if(!m){r+=`\\(`;continue}let n={type:m,start:t-1,reStart:r.length,open:c[m].open,close:c[m].close};this.debug(this.pattern,` `,n),s.push(n),r+=n.open,n.start===0&&n.type!==`!`&&(D=!0,r+=A(e.slice(t+1))),this.debug(`plType %j %j`,m,r),m=!1;continue}case`)`:{let e=s[s.length-1];if(h||!e){r+=`\\)`;continue}s.pop(),j(),i=!0,T=e,r+=T.close,T.type===`!`&&d.push(Object.assign(T,{reEnd:r.length}));continue}case`|`:{let n=s[s.length-1];if(h||!n){r+=`\\|`;continue}j(),r+=`|`,n.start===0&&n.type!==`!`&&(D=!0,r+=A(e.slice(t+1)));continue}case`[`:if(j(),h){r+=`\\`+o;continue}h=!0,S=t,g=r.length,r+=o;continue;case`]`:if(t===S+1||!h){r+=`\\`+o;continue}w=e.substring(S+1,t);try{RegExp(`[`+C(x(w))+`]`),r+=o}catch{r=r.substring(0,g)+`(?:$.)`}i=!0,h=!1;continue;default:j(),f[o]&&!(o===`^`&&h)&&(r+=`\\`),r+=o;break}}for(h&&(w=e.slice(S+1),E=this.parse(w,y),r=r.substring(0,g)+`\\[`+E[0],i||=E[1]),T=s.pop();T;T=s.pop()){let e;e=r.slice(T.reStart+T.open.length),this.debug(`setting tail`,r,T),e=e.replace(/((?:\\{2}){0,64})(\\?)\|/g,(e,t,n)=>(n||=`\\`,t+t+n+`|`)),this.debug(`tail=%j
|
|
4
4
|
%s`,e,e,T,r);let t=T.type===`*`?u:T.type===`?`?l:`\\`+T.type;i=!0,r=r.slice(0,T.reStart)+t+`\\(`+e}j(),a&&(r+=`\\\\`);let M=p[r.charAt(0)];for(let e=d.length-1;e>-1;e--){let n=d[e],i=r.slice(0,n.reStart),a=r.slice(n.reStart,n.reEnd-8),o=r.slice(n.reEnd),s=r.slice(n.reEnd-8,n.reEnd)+o,c=i.split(`)`).length,l=i.split(`(`).length-c,u=o;for(let e=0;e<l;e++)u=u.replace(/\)[+*?]?/,``);o=u;let f=o===``&&t!==y?`(?:$|\\/)`:``;r=i+a+o+f+s}if(r!==``&&i&&(r=`(?=.)`+r),M&&(r=k()+r),t===y)return[r,i];if(n.nocase&&!i&&(i=e.toUpperCase()!==e.toLowerCase()),!i)return b(e);let N=n.nocase?`i`:``;try{return Object.assign(RegExp(`^`+r+`$`,N),{_glob:e,_src:r})}catch{return RegExp(`$.`)}}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let e=this.set;if(!e.length)return this.regexp=!1,this.regexp;let t=this.options,n=t.noglobstar?u:t.dot?`(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?`:`(?:(?!(?:\\/|^)\\.).)*?`,r=t.nocase?`i`:``,i=e.map(e=>(e=e.map(e=>typeof e==`string`?S(e):e===o?o:e._src).reduce((e,t)=>(e[e.length-1]===o&&t===o||e.push(t),e),[]),e.forEach((t,r)=>{t!==o||e[r-1]===o||(r===0?e.length>1?e[r+1]=`(?:\\/|`+n+`\\/)?`+e[r+1]:e[r]=n:r===e.length-1?e[r-1]+=`(?:\\/|`+n+`)?`:(e[r-1]+=`(?:\\/|\\/`+n+`\\/)`+e[r+1],e[r+1]=o))}),e.filter(e=>e!==o).join(`/`))).join(`|`);i=`^(?:`+i+`)$`,this.negate&&(i=`^(?!`+i+`).*$`);try{this.regexp=new RegExp(i,r)}catch{this.regexp=!1}return this.regexp}match(e,t=this.partial){if(this.debug(`match`,e,this.pattern),this.comment)return!1;if(this.empty)return e===``;if(e===`/`&&t)return!0;let n=this.options;a.sep!==`/`&&(e=e.split(a.sep).join(`/`)),e=e.split(m),this.debug(this.pattern,`split`,e);let r=this.set;this.debug(this.pattern,`set`,r);let i;for(let t=e.length-1;t>=0&&(i=e[t],!i);t--);for(let a=0;a<r.length;a++){let o=r[a],s=e;if(n.matchBase&&o.length===1&&(s=[i]),this.matchOne(s,o,t))return n.flipNegate?!0:!this.negate}return n.flipNegate?!1:this.negate}static defaults(e){return i.defaults(e).Minimatch}};i.Minimatch=w})),a=e(((e,t)=>{t.exports=p;let n=require(`fs`),{EventEmitter:r}=require(`events`),{Minimatch:a}=i(),{resolve:o}=require(`path`);function s(e,t){return new Promise((r,i)=>{n.readdir(e,{withFileTypes:!0},(e,n)=>{if(e)switch(e.code){case`ENOTDIR`:t?i(e):r([]);break;case`ENOTSUP`:case`ENOENT`:case`ENAMETOOLONG`:case`UNKNOWN`:r([]);break;default:i(e);break}else r(n)})})}function c(e,t){return new Promise((r,i)=>{(t?n.stat:n.lstat)(e,(n,i)=>{if(n)switch(n.code){case`ENOENT`:r(t?c(e,!1):null);break;default:r(null);break}else r(i)})})}async function*l(e,t,n,r,i,a){let o=await s(t+e,a);for(let a of o){let o=a.name;o===void 0&&(o=a,r=!0);let s=e+`/`+o,u=s.slice(1),d=t+`/`+u,f=null;(r||n)&&(f=await c(d,n)),!f&&a.name!==void 0&&(f=a),f===null&&(f={isDirectory:()=>!1}),f.isDirectory()?i(u)||(yield{relative:u,absolute:d,stats:f},yield*l(s,t,n,r,i,!1)):yield{relative:u,absolute:d,stats:f}}}async function*u(e,t,n,r){yield*l(``,e,t,n,r,!0)}function d(e){return{pattern:e.pattern,dot:!!e.dot,noglobstar:!!e.noglobstar,matchBase:!!e.matchBase,nocase:!!e.nocase,ignore:e.ignore,skip:e.skip,follow:!!e.follow,stat:!!e.stat,nodir:!!e.nodir,mark:!!e.mark,silent:!!e.silent,absolute:!!e.absolute}}var f=class extends r{constructor(e,t,n){super(),typeof t==`function`&&(n=t,t=null),this.options=d(t||{}),this.matchers=[],this.options.pattern&&(this.matchers=(Array.isArray(this.options.pattern)?this.options.pattern:[this.options.pattern]).map(e=>new a(e,{dot:this.options.dot,noglobstar:this.options.noglobstar,matchBase:this.options.matchBase,nocase:this.options.nocase}))),this.ignoreMatchers=[],this.options.ignore&&(this.ignoreMatchers=(Array.isArray(this.options.ignore)?this.options.ignore:[this.options.ignore]).map(e=>new a(e,{dot:!0}))),this.skipMatchers=[],this.options.skip&&(this.skipMatchers=(Array.isArray(this.options.skip)?this.options.skip:[this.options.skip]).map(e=>new a(e,{dot:!0}))),this.iterator=u(o(e||`.`),this.options.follow,this.options.stat,this._shouldSkipDirectory.bind(this)),this.paused=!1,this.inactive=!1,this.aborted=!1,n&&(this._matches=[],this.on(`match`,e=>this._matches.push(this.options.absolute?e.absolute:e.relative)),this.on(`error`,e=>n(e)),this.on(`end`,()=>n(null,this._matches))),setTimeout(()=>this._next(),0)}_shouldSkipDirectory(e){return this.skipMatchers.some(t=>t.match(e))}_fileMatches(e,t){let n=e+(t?`/`:``);return(this.matchers.length===0||this.matchers.some(e=>e.match(n)))&&!this.ignoreMatchers.some(e=>e.match(n))&&(!this.options.nodir||!t)}_next(){!this.paused&&!this.aborted?this.iterator.next().then(e=>{if(e.done)this.emit(`end`);else{let t=e.value.stats.isDirectory();if(this._fileMatches(e.value.relative,t)){let n=e.value.relative,r=e.value.absolute;this.options.mark&&t&&(n+=`/`,r+=`/`),this.options.stat?this.emit(`match`,{relative:n,absolute:r,stat:e.value.stats}):this.emit(`match`,{relative:n,absolute:r})}this._next(this.iterator)}}).catch(e=>{this.abort(),this.emit(`error`,e),!e.code&&!this.options.silent&&console.error(e)}):this.inactive=!0}abort(){this.aborted=!0}pause(){this.paused=!0}resume(){this.paused=!1,this.inactive&&(this.inactive=!1,this._next())}};function p(e,t,n){return new f(e,t,n)}p.ReaddirGlob=f})),o=e(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?r(e):typeof define==`function`&&define.amd?define([`exports`],r):(n=typeof globalThis<`u`?globalThis:n||self,r(n.async={}))})(e,(function(e){"use strict";function t(e,...t){return(...n)=>e(...t,...n)}function n(e){return function(...t){var n=t.pop();return e.call(this,t,n)}}var r=typeof queueMicrotask==`function`&&queueMicrotask,i=typeof setImmediate==`function`&&setImmediate,a=typeof process==`object`&&typeof process.nextTick==`function`;function o(e){setTimeout(e,0)}function s(e){return(t,...n)=>e(()=>t(...n))}var c=s(r?queueMicrotask:i?setImmediate:a?process.nextTick:o);function l(e){return f(e)?function(...t){let n=t.pop();return u(e.apply(this,t),n)}:n(function(t,n){var r;try{r=e.apply(this,t)}catch(e){return n(e)}if(r&&typeof r.then==`function`)return u(r,n);n(null,r)})}function u(e,t){return e.then(e=>{d(t,null,e)},e=>{d(t,e&&(e instanceof Error||e.message)?e:Error(e))})}function d(e,t,n){try{e(t,n)}catch(e){c(e=>{throw e},e)}}function f(e){return e[Symbol.toStringTag]===`AsyncFunction`}function p(e){return e[Symbol.toStringTag]===`AsyncGenerator`}function m(e){return typeof e[Symbol.asyncIterator]==`function`}function h(e){if(typeof e!=`function`)throw Error(`expected a function`);return f(e)?l(e):e}function g(e,t){if(t||=e.length,!t)throw Error(`arity is undefined`);function n(...n){return typeof n[t-1]==`function`?e.apply(this,n):new Promise((r,i)=>{n[t-1]=(e,...t)=>{if(e)return i(e);r(t.length>1?t:t[0])},e.apply(this,n)})}return n}function v(e){return function(t,...n){return g(function(r){var i=this;return e(t,(e,t)=>{h(e).apply(i,n.concat(t))},r)})}}function y(e,t,n,r){t||=[];var i=[],a=0,o=h(n);return e(t,(e,t,n)=>{var r=a++;o(e,(e,t)=>{i[r]=t,n(e)})},e=>{r(e,i)})}function b(e){return e&&typeof e.length==`number`&&e.length>=0&&e.length%1==0}let x={};function S(e){function t(...t){if(e!==null){var n=e;e=null,n.apply(this,t)}}return Object.assign(t,e),t}function C(e){return e[Symbol.iterator]&&e[Symbol.iterator]()}function w(e){var t=-1,n=e.length;return function(){return++t<n?{value:e[t],key:t}:null}}function T(e){var t=-1;return function(){var n=e.next();return n.done?null:(t++,{value:n.value,key:t})}}function E(e){var t=e?Object.keys(e):[],n=-1,r=t.length;return function i(){var a=t[++n];return a===`__proto__`?i():n<r?{value:e[a],key:a}:null}}function D(e){if(b(e))return w(e);var t=C(e);return t?T(t):E(e)}function O(e){return function(...t){if(e===null)throw Error(`Callback was already called.`);var n=e;e=null,n.apply(this,t)}}function k(e,t,n,r){let i=!1,a=!1,o=!1,s=0,c=0;function l(){s>=t||o||i||(o=!0,e.next().then(({value:e,done:t})=>{if(!(a||i)){if(o=!1,t){i=!0,s<=0&&r(null);return}s++,n(e,c,u),c++,l()}}).catch(d))}function u(e,t){if(--s,!a){if(e)return d(e);if(e===!1){i=!0,a=!0;return}if(t===x||i&&s<=0)return i=!0,r(null);l()}}function d(e){a||(o=!1,i=!0,r(e))}l()}var A=e=>(t,n,r)=>{if(r=S(r),e<=0)throw RangeError(`concurrency limit cannot be less than 1`);if(!t)return r(null);if(p(t))return k(t,e,n,r);if(m(t))return k(t[Symbol.asyncIterator](),e,n,r);var i=D(t),a=!1,o=!1,s=0,c=!1;function l(e,t){if(!o)if(--s,e)a=!0,r(e);else if(e===!1)a=!0,o=!0;else if(t===x||a&&s<=0)return a=!0,r(null);else c||u()}function u(){for(c=!0;s<e&&!a;){var t=i();if(t===null){a=!0,s<=0&&r(null);return}s+=1,n(t.value,t.key,O(l))}c=!1}u()};function j(e,t,n,r){return A(t)(e,h(n),r)}var M=g(j,4);function N(e,t,n){n=S(n);var r=0,i=0,{length:a}=e,o=!1;a===0&&n(null);function s(e,t){e===!1&&(o=!0),o!==!0&&(e?n(e):(++i===a||t===x)&&n(null))}for(;r<a;r++)t(e[r],r,O(s))}function P(e,t,n){return M(e,1/0,t,n)}function F(e,t,n){return(b(e)?N:P)(e,h(t),n)}var I=g(F,3);function L(e,t,n){return y(I,e,t,n)}var R=g(L,3),z=v(R);function B(e,t,n){return M(e,1,t,n)}var V=g(B,3);function H(e,t,n){return y(V,e,t,n)}var U=g(H,3),W=v(U);let G=Symbol(`promiseCallback`);function K(){let e,t;function n(n,...r){if(n)return t(n);e(r.length>1?r:r[0])}return n[G]=new Promise((n,r)=>{e=n,t=r}),n}function q(e,t,n){typeof t!=`number`&&(n=t,t=null),n=S(n||K());var r=Object.keys(e).length;if(!r)return n(null);t||=r;var i={},a=0,o=!1,s=!1,c=Object.create(null),l=[],u=[],d={};Object.keys(e).forEach(t=>{var n=e[t];if(!Array.isArray(n)){f(t,[n]),u.push(t);return}var r=n.slice(0,n.length-1),i=r.length;if(i===0){f(t,n),u.push(t);return}d[t]=i,r.forEach(a=>{if(!e[a])throw Error("async.auto task `"+t+"` has a non-existent dependency `"+a+"` in "+r.join(`, `));m(a,()=>{i--,i===0&&f(t,n)})})}),y(),p();function f(e,t){l.push(()=>v(e,t))}function p(){if(!o){if(l.length===0&&a===0)return n(null,i);for(;l.length&&a<t;)l.shift()()}}function m(e,t){var n=c[e];n||=c[e]=[],n.push(t)}function g(e){(c[e]||[]).forEach(e=>e()),p()}function v(e,t){if(!s){var r=O((t,...r)=>{if(a--,t===!1){o=!0;return}if(r.length<2&&([r]=r),t){var l={};if(Object.keys(i).forEach(e=>{l[e]=i[e]}),l[e]=r,s=!0,c=Object.create(null),o)return;n(t,l)}else i[e]=r,g(e)});a++;var l=h(t[t.length-1]);t.length>1?l(i,r):l(r)}}function y(){for(var e,t=0;u.length;)e=u.pop(),t++,b(e).forEach(e=>{--d[e]===0&&u.push(e)});if(t!==r)throw Error(`async.auto cannot execute tasks due to a recursive dependency`)}function b(t){var n=[];return Object.keys(e).forEach(r=>{let i=e[r];Array.isArray(i)&&i.indexOf(t)>=0&&n.push(r)}),n}return n[G]}var ee=/^(?:async\s)?(?:function)?\s*(?:\w+\s*)?\(([^)]+)\)(?:\s*{)/,te=/^(?:async\s)?\s*(?:\(\s*)?((?:[^)=\s]\s*)*)(?:\)\s*)?=>/,J=/,/,ne=/(=.+)?(\s*)$/;function re(e){let t=``,n=0,r=e.indexOf(`*/`);for(;n<e.length;)if(e[n]===`/`&&e[n+1]===`/`){let t=e.indexOf(`
|
|
@@ -16,7 +16,7 @@ t.exports=function(e,t){if(typeof e!=`string`)throw TypeError(`expected path to
|
|
|
16
16
|
/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
17
17
|
var n=require(`buffer`),r=n.Buffer;function i(e,t){for(var n in e)t[n]=e[n]}r.from&&r.alloc&&r.allocUnsafe&&r.allocUnsafeSlow?t.exports=n:(i(n,e),e.Buffer=a);function a(e,t,n){return r(e,t,n)}a.prototype=Object.create(r.prototype),i(r,a),a.from=function(e,t,n){if(typeof e==`number`)throw TypeError(`Argument must not be a number`);return r(e,t,n)},a.alloc=function(e,t,n){if(typeof e!=`number`)throw TypeError(`Argument must be a number`);var i=r(e);return t===void 0?i.fill(0):typeof n==`string`?i.fill(t,n):i.fill(t),i},a.allocUnsafe=function(e){if(typeof e!=`number`)throw TypeError(`Argument must be a number`);return r(e)},a.allocUnsafeSlow=function(e){if(typeof e!=`number`)throw TypeError(`Argument must be a number`);return n.SlowBuffer(e)}})),Be=e((e=>{var t=ze().Buffer,n=t.isEncoding||function(e){switch(e=``+e,e&&e.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(e){if(!e)return`utf8`;for(var t;;)switch(e){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 e;default:if(t)return;e=(``+e).toLowerCase(),t=!0}}function i(e){var i=r(e);if(typeof i!=`string`&&(t.isEncoding===n||!n(e)))throw Error(`Unknown encoding: `+e);return i||e}e.StringDecoder=a;function a(e){this.encoding=i(e);var n;switch(this.encoding){case`utf16le`:this.text=f,this.end=p,n=4;break;case`utf8`:this.fillLast=l,n=4;break;case`base64`:this.text=m,this.end=h,n=3;break;default:this.write=g,this.end=v;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=t.allocUnsafe(n)}a.prototype.write=function(e){if(e.length===0)return``;var t,n;if(this.lastNeed){if(t=this.fillLast(e),t===void 0)return``;n=this.lastNeed,this.lastNeed=0}else n=0;return n<e.length?t?t+this.text(e,n):this.text(e,n):t||``},a.prototype.end=d,a.prototype.text=u,a.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length};function o(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function s(e,t,n){var r=t.length-1;if(r<n)return 0;var i=o(t[r]);return i>=0?(i>0&&(e.lastNeed=i-1),i):--r<n||i===-2?0:(i=o(t[r]),i>=0?(i>0&&(e.lastNeed=i-2),i):--r<n||i===-2?0:(i=o(t[r]),i>=0?(i>0&&(i===2?i=0:e.lastNeed=i-3),i):0))}function c(e,t,n){if((t[0]&192)!=128)return e.lastNeed=0,`�`;if(e.lastNeed>1&&t.length>1){if((t[1]&192)!=128)return e.lastNeed=1,`�`;if(e.lastNeed>2&&t.length>2&&(t[2]&192)!=128)return e.lastNeed=2,`�`}}function l(e){var t=this.lastTotal-this.lastNeed,n=c(this,e,t);if(n!==void 0)return n;if(this.lastNeed<=e.length)return e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,t,0,e.length),this.lastNeed-=e.length}function u(e,t){var n=s(this,e,t);if(!this.lastNeed)return e.toString(`utf8`,t);this.lastTotal=n;var r=e.length-(n-this.lastNeed);return e.copy(this.lastChar,0,r),e.toString(`utf8`,t,r)}function d(e){var t=e&&e.length?this.write(e):``;return this.lastNeed?t+`�`:t}function f(e,t){if((e.length-t)%2==0){var n=e.toString(`utf16le`,t);if(n){var r=n.charCodeAt(n.length-1);if(r>=55296&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString(`utf16le`,t,e.length-1)}function p(e){var t=e&&e.length?this.write(e):``;if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return t+this.lastChar.toString(`utf16le`,0,n)}return t}function m(e,t){var n=(e.length-t)%3;return n===0?e.toString(`base64`,t):(this.lastNeed=3-n,this.lastTotal=3,n===1?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString(`base64`,t,e.length-n))}function h(e){var t=e&&e.length?this.write(e):``;return this.lastNeed?t+this.lastChar.toString(`base64`,0,3-this.lastNeed):t}function g(e){return e.toString(this.encoding)}function v(e){return e&&e.length?this.write(e):``}})),Ve=e(((e,t)=>{let n=je(),{PromisePrototypeThen:r,SymbolAsyncIterator:i,SymbolIterator:a}=Z(),{Buffer:o}=require(`buffer`),{ERR_INVALID_ARG_TYPE:s,ERR_STREAM_NULL_VALUES:c}=Q().codes;function l(e,t,l){let u;if(typeof t==`string`||t instanceof o)return new e({objectMode:!0,...l,read(){this.push(t),this.push(null)}});let d;if(t&&t[i])d=!0,u=t[i]();else if(t&&t[a])d=!1,u=t[a]();else throw new s(`iterable`,[`Iterable`],t);let f=new e({objectMode:!0,highWaterMark:1,...l}),p=!1;f._read=function(){p||(p=!0,h())},f._destroy=function(e,t){r(m(e),()=>n.nextTick(t,e),r=>n.nextTick(t,r||e))};async function m(e){let t=e!=null,n=typeof u.throw==`function`;if(t&&n){let{value:t,done:n}=await u.throw(e);if(await t,n)return}if(typeof u.return==`function`){let{value:e}=await u.return();await e}}async function h(){for(;;){try{let{value:e,done:t}=d?await u.next():u.next();if(t)f.push(null);else{let t=e&&typeof e.then==`function`?await e:e;if(t===null)throw p=!1,new c;if(f.push(t))continue;p=!1}}catch(e){f.destroy(e)}break}}return f}t.exports=l})),He=e(((e,t)=>{let n=je(),{ArrayPrototypeIndexOf:r,NumberIsInteger:i,NumberIsNaN:a,NumberParseInt:o,ObjectDefineProperties:s,ObjectKeys:c,ObjectSetPrototypeOf:l,Promise:u,SafeSet:d,SymbolAsyncDispose:f,SymbolAsyncIterator:p,Symbol:m}=Z();t.exports=G,G.ReadableState=W;let{EventEmitter:h}=require(`events`),{Stream:g,prependListener:v}=Fe(),{Buffer:y}=require(`buffer`),{addAbortSignal:b}=Ie(),x=Ne(),S=$().debuglog(`stream`,e=>{S=e}),C=Le(),w=Pe(),{getHighWaterMark:T,getDefaultHighWaterMark:E}=Re(),{aggregateTwoErrors:D,codes:{ERR_INVALID_ARG_TYPE:O,ERR_METHOD_NOT_IMPLEMENTED:k,ERR_OUT_OF_RANGE:A,ERR_STREAM_PUSH_AFTER_EOF:j,ERR_STREAM_UNSHIFT_AFTER_END_EVENT:M},AbortError:N}=Q(),{validateObject:P}=Ae(),F=m(`kPaused`),{StringDecoder:I}=Be(),L=Ve();l(G.prototype,g.prototype),l(G,g);let R=()=>{},{errorOrDestroy:z}=w,B=2048,V=4096,H=65536;function U(e){return{enumerable:!1,get(){return(this.state&e)!==0},set(t){t?this.state|=e:this.state&=~e}}}s(W.prototype,{objectMode:U(1),ended:U(2),endEmitted:U(4),reading:U(8),constructed:U(16),sync:U(32),needReadable:U(64),emittedReadable:U(128),readableListening:U(256),resumeScheduled:U(512),errorEmitted:U(1024),emitClose:U(B),autoDestroy:U(V),destroyed:U(8192),closed:U(16384),closeEmitted:U(32768),multiAwaitDrain:U(H),readingMore:U(131072),dataEmitted:U(262144)});function W(e,t,n){typeof n!=`boolean`&&(n=t instanceof Ge()),this.state=6192,e&&e.objectMode&&(this.state|=1),n&&e&&e.readableObjectMode&&(this.state|=1),this.highWaterMark=e?T(this,e,`readableHighWaterMark`,n):E(!1),this.buffer=new C,this.length=0,this.pipes=[],this.flowing=null,this[F]=null,e&&e.emitClose===!1&&(this.state&=~B),e&&e.autoDestroy===!1&&(this.state&=~V),this.errored=null,this.defaultEncoding=e&&e.defaultEncoding||`utf8`,this.awaitDrainWriters=null,this.decoder=null,this.encoding=null,e&&e.encoding&&(this.decoder=new I(e.encoding),this.encoding=e.encoding)}function G(e){if(!(this instanceof G))return new G(e);let t=this instanceof Ge();this._readableState=new W(e,this,t),e&&(typeof e.read==`function`&&(this._read=e.read),typeof e.destroy==`function`&&(this._destroy=e.destroy),typeof e.construct==`function`&&(this._construct=e.construct),e.signal&&!t&&b(e.signal,this)),g.call(this,e),w.construct(this,()=>{this._readableState.needReadable&&Y(this,this._readableState)})}G.prototype.destroy=w.destroy,G.prototype._undestroy=w.undestroy,G.prototype._destroy=function(e,t){t(e)},G.prototype[h.captureRejectionSymbol]=function(e){this.destroy(e)},G.prototype[f]=function(){let e;return this.destroyed||(e=this.readableEnded?null:new N,this.destroy(e)),new u((t,n)=>x(this,r=>r&&r!==e?n(r):t(null)))},G.prototype.push=function(e,t){return K(this,e,t,!1)},G.prototype.unshift=function(e,t){return K(this,e,t,!0)};function K(e,t,n,r){S(`readableAddChunk`,t);let i=e._readableState,a;if(i.state&1||(typeof t==`string`?(n||=i.defaultEncoding,i.encoding!==n&&(r&&i.encoding?t=y.from(t,n).toString(i.encoding):(t=y.from(t,n),n=``))):t instanceof y?n=``:g._isUint8Array(t)?(t=g._uint8ArrayToBuffer(t),n=``):t!=null&&(a=new O(`chunk`,[`string`,`Buffer`,`Uint8Array`],t))),a)z(e,a);else if(t===null)i.state&=-9,J(e,i);else if(i.state&1||t&&t.length>0)if(r)if(i.state&4)z(e,new M);else if(i.destroyed||i.errored)return!1;else q(e,i,t,!0);else if(i.ended)z(e,new j);else if(i.destroyed||i.errored)return!1;else i.state&=-9,i.decoder&&!n?(t=i.decoder.write(t),i.objectMode||t.length!==0?q(e,i,t,!1):Y(e,i)):q(e,i,t,!1);else r||(i.state&=-9,Y(e,i));return!i.ended&&(i.length<i.highWaterMark||i.length===0)}function q(e,t,n,r){t.flowing&&t.length===0&&!t.sync&&e.listenerCount(`data`)>0?((t.state&H)===0?t.awaitDrainWriters=null:t.awaitDrainWriters.clear(),t.dataEmitted=!0,e.emit(`data`,n)):(t.length+=t.objectMode?1:n.length,r?t.buffer.unshift(n):t.buffer.push(n),t.state&64&&ne(e)),Y(e,t)}G.prototype.isPaused=function(){let e=this._readableState;return e[F]===!0||e.flowing===!1},G.prototype.setEncoding=function(e){let t=new I(e);this._readableState.decoder=t,this._readableState.encoding=this._readableState.decoder.encoding;let n=this._readableState.buffer,r=``;for(let e of n)r+=t.write(e);return n.clear(),r!==``&&n.push(r),this._readableState.length=r.length,this};function ee(e){if(e>1073741824)throw new A(`size`,`<= 1GiB`,e);return e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++,e}function te(e,t){return e<=0||t.length===0&&t.ended?0:t.state&1?1:a(e)?t.flowing&&t.length?t.buffer.first().length:t.length:e<=t.length?e:t.ended?t.length:0}G.prototype.read=function(e){S(`read`,e),e===void 0?e=NaN:i(e)||(e=o(e,10));let t=this._readableState,n=e;if(e>t.highWaterMark&&(t.highWaterMark=ee(e)),e!==0&&(t.state&=-129),e===0&&t.needReadable&&((t.highWaterMark===0?t.length>0:t.length>=t.highWaterMark)||t.ended))return S(`read: emitReadable`,t.length,t.ended),t.length===0&&t.ended?me(this):ne(this),null;if(e=te(e,t),e===0&&t.ended)return t.length===0&&me(this),null;let r=(t.state&64)!=0;if(S(`need readable`,r),(t.length===0||t.length-e<t.highWaterMark)&&(r=!0,S(`length less than watermark`,r)),t.ended||t.reading||t.destroyed||t.errored||!t.constructed)r=!1,S(`reading, ended or constructing`,r);else if(r){S(`do read`),t.state|=40,t.length===0&&(t.state|=64);try{this._read(t.highWaterMark)}catch(e){z(this,e)}t.state&=-33,t.reading||(e=te(n,t))}let a;return a=e>0?pe(e,t):null,a===null?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.multiAwaitDrain?t.awaitDrainWriters.clear():t.awaitDrainWriters=null),t.length===0&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&me(this)),a!==null&&!t.errorEmitted&&!t.closeEmitted&&(t.dataEmitted=!0,this.emit(`data`,a)),a};function J(e,t){if(S(`onEofChunk`),!t.ended){if(t.decoder){let e=t.decoder.end();e&&e.length&&(t.buffer.push(e),t.length+=t.objectMode?1:e.length)}t.ended=!0,t.sync?ne(e):(t.needReadable=!1,t.emittedReadable=!0,re(e))}}function ne(e){let t=e._readableState;S(`emitReadable`,t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(S(`emitReadable`,t.flowing),t.emittedReadable=!0,n.nextTick(re,e))}function re(e){let t=e._readableState;S(`emitReadable_`,t.destroyed,t.length,t.ended),!t.destroyed&&!t.errored&&(t.length||t.ended)&&(e.emit(`readable`),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,ue(e)}function Y(e,t){!t.readingMore&&t.constructed&&(t.readingMore=!0,n.nextTick(ie,e,t))}function ie(e,t){for(;!t.reading&&!t.ended&&(t.length<t.highWaterMark||t.flowing&&t.length===0);){let n=t.length;if(S(`maybeReadMore read 0`),e.read(0),n===t.length)break}t.readingMore=!1}G.prototype._read=function(e){throw new k(`_read()`)},G.prototype.pipe=function(e,t){let r=this,i=this._readableState;i.pipes.length===1&&(i.multiAwaitDrain||(i.multiAwaitDrain=!0,i.awaitDrainWriters=new d(i.awaitDrainWriters?[i.awaitDrainWriters]:[]))),i.pipes.push(e),S(`pipe count=%d opts=%j`,i.pipes.length,t);let a=(!t||t.end!==!1)&&e!==n.stdout&&e!==n.stderr?s:y;i.endEmitted?n.nextTick(a):r.once(`end`,a),e.on(`unpipe`,o);function o(e,t){S(`onunpipe`),e===r&&t&&t.hasUnpiped===!1&&(t.hasUnpiped=!0,u())}function s(){S(`onend`),e.end()}let c,l=!1;function u(){S(`cleanup`),e.removeListener(`close`,h),e.removeListener(`finish`,g),c&&e.removeListener(`drain`,c),e.removeListener(`error`,m),e.removeListener(`unpipe`,o),r.removeListener(`end`,s),r.removeListener(`end`,y),r.removeListener(`data`,p),l=!0,c&&i.awaitDrainWriters&&(!e._writableState||e._writableState.needDrain)&&c()}function f(){l||(i.pipes.length===1&&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)),r.pause()),c||(c=ae(r,e),e.on(`drain`,c))}r.on(`data`,p);function p(t){S(`ondata`);let n=e.write(t);S(`dest.write`,n),n===!1&&f()}function m(t){if(S(`onerror`,t),y(),e.removeListener(`error`,m),e.listenerCount(`error`)===0){let n=e._writableState||e._readableState;n&&!n.errorEmitted?z(e,t):e.emit(`error`,t)}}v(e,`error`,m);function h(){e.removeListener(`finish`,g),y()}e.once(`close`,h);function g(){S(`onfinish`),e.removeListener(`close`,h),y()}e.once(`finish`,g);function y(){S(`unpipe`),r.unpipe(e)}return e.emit(`pipe`,r),e.writableNeedDrain===!0?f():i.flowing||(S(`pipe resume`),r.resume()),e};function ae(e,t){return function(){let n=e._readableState;n.awaitDrainWriters===t?(S(`pipeOnDrain`,1),n.awaitDrainWriters=null):n.multiAwaitDrain&&(S(`pipeOnDrain`,n.awaitDrainWriters.size),n.awaitDrainWriters.delete(t)),(!n.awaitDrainWriters||n.awaitDrainWriters.size===0)&&e.listenerCount(`data`)&&e.resume()}}G.prototype.unpipe=function(e){let t=this._readableState,n={hasUnpiped:!1};if(t.pipes.length===0)return this;if(!e){let e=t.pipes;t.pipes=[],this.pause();for(let t=0;t<e.length;t++)e[t].emit(`unpipe`,this,{hasUnpiped:!1});return this}let i=r(t.pipes,e);return i===-1?this:(t.pipes.splice(i,1),t.pipes.length===0&&this.pause(),e.emit(`unpipe`,this,n),this)},G.prototype.on=function(e,t){let r=g.prototype.on.call(this,e,t),i=this._readableState;return e===`data`?(i.readableListening=this.listenerCount(`readable`)>0,i.flowing!==!1&&this.resume()):e===`readable`&&!i.endEmitted&&!i.readableListening&&(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,S(`on readable`,i.length,i.reading),i.length?ne(this):i.reading||n.nextTick(se,this)),r},G.prototype.addListener=G.prototype.on,G.prototype.removeListener=function(e,t){let r=g.prototype.removeListener.call(this,e,t);return e===`readable`&&n.nextTick(oe,this),r},G.prototype.off=G.prototype.removeListener,G.prototype.removeAllListeners=function(e){let t=g.prototype.removeAllListeners.apply(this,arguments);return(e===`readable`||e===void 0)&&n.nextTick(oe,this),t};function oe(e){let t=e._readableState;t.readableListening=e.listenerCount(`readable`)>0,t.resumeScheduled&&t[F]===!1?t.flowing=!0:e.listenerCount(`data`)>0?e.resume():t.readableListening||(t.flowing=null)}function se(e){S(`readable nexttick read 0`),e.read(0)}G.prototype.resume=function(){let e=this._readableState;return e.flowing||(S(`resume`),e.flowing=!e.readableListening,ce(this,e)),e[F]=!1,this};function ce(e,t){t.resumeScheduled||(t.resumeScheduled=!0,n.nextTick(le,e,t))}function le(e,t){S(`resume`,t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit(`resume`),ue(e),t.flowing&&!t.reading&&e.read(0)}G.prototype.pause=function(){return S(`call pause flowing=%j`,this._readableState.flowing),this._readableState.flowing!==!1&&(S(`pause`),this._readableState.flowing=!1,this.emit(`pause`)),this._readableState[F]=!0,this};function ue(e){let t=e._readableState;for(S(`flow`,t.flowing);t.flowing&&e.read()!==null;);}G.prototype.wrap=function(e){let t=!1;e.on(`data`,n=>{!this.push(n)&&e.pause&&(t=!0,e.pause())}),e.on(`end`,()=>{this.push(null)}),e.on(`error`,e=>{z(this,e)}),e.on(`close`,()=>{this.destroy()}),e.on(`destroy`,()=>{this.destroy()}),this._read=()=>{t&&e.resume&&(t=!1,e.resume())};let n=c(e);for(let t=1;t<n.length;t++){let r=n[t];this[r]===void 0&&typeof e[r]==`function`&&(this[r]=e[r].bind(e))}return this},G.prototype[p]=function(){return de(this)},G.prototype.iterator=function(e){return e!==void 0&&P(e,`options`),de(this,e)};function de(e,t){typeof e.read!=`function`&&(e=G.wrap(e,{objectMode:!0}));let n=fe(e,t);return n.stream=e,n}async function*fe(e,t){let n=R;function r(t){this===e?(n(),n=R):n=t}e.on(`readable`,r);let i,a=x(e,{writable:!1},e=>{i=e?D(i,e):null,n(),n=R});try{for(;;){let t=e.destroyed?null:e.read();if(t!==null)yield t;else if(i)throw i;else if(i===null)return;else await new u(r)}}catch(e){throw i=D(i,e),i}finally{(i||t?.destroyOnReturn!==!1)&&(i===void 0||e._readableState.autoDestroy)?w.destroyer(e,null):(e.off(`readable`,r),a())}}s(G.prototype,{readable:{__proto__:null,get(){let e=this._readableState;return!!e&&e.readable!==!1&&!e.destroyed&&!e.errorEmitted&&!e.endEmitted},set(e){this._readableState&&(this._readableState.readable=!!e)}},readableDidRead:{__proto__:null,enumerable:!1,get:function(){return this._readableState.dataEmitted}},readableAborted:{__proto__:null,enumerable:!1,get:function(){return!!(this._readableState.readable!==!1&&(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(e){this._readableState&&(this._readableState.flowing=e)}},readableLength:{__proto__:null,enumerable:!1,get(){return this._readableState.length}},readableObjectMode:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.objectMode:!1}},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:!1}},destroyed:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.destroyed:!1},set(e){this._readableState&&(this._readableState.destroyed=e)}},readableEnded:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.endEmitted:!1}}}),s(W.prototype,{pipesCount:{__proto__:null,get(){return this.pipes.length}},paused:{__proto__:null,get(){return this[F]!==!1},set(e){this[F]=!!e}}}),G._fromList=pe;function pe(e,t){if(t.length===0)return null;let n;return t.objectMode?n=t.buffer.shift():!e||e>=t.length?(n=t.decoder?t.buffer.join(``):t.buffer.length===1?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):n=t.buffer.consume(e,t.decoder),n}function me(e){let t=e._readableState;S(`endReadable`,t.endEmitted),t.endEmitted||(t.ended=!0,n.nextTick(he,t,e))}function he(e,t){if(S(`endReadableNT`,e.endEmitted,e.length),!e.errored&&!e.closeEmitted&&!e.endEmitted&&e.length===0){if(e.endEmitted=!0,t.emit(`end`),t.writable&&t.allowHalfOpen===!1)n.nextTick(ge,t);else if(e.autoDestroy){let e=t._writableState;(!e||e.autoDestroy&&(e.finished||e.writable===!1))&&t.destroy()}}}function ge(e){e.writable&&!e.writableEnded&&!e.destroyed&&e.end()}G.from=function(e,t){return L(G,e,t)};let _e;function ve(){return _e===void 0&&(_e={}),_e}G.fromWeb=function(e,t){return ve().newStreamReadableFromReadableStream(e,t)},G.toWeb=function(e,t){return ve().newReadableStreamFromStreamReadable(e,t)},G.wrap=function(e,t){return new G({objectMode:e.readableObjectMode??e.objectMode??!0,...t,destroy(t,n){w.destroyer(e,t),n(t)}}).wrap(e)}})),Ue=e(((e,t)=>{let n=je(),{ArrayPrototypeSlice:r,Error:i,FunctionPrototypeSymbolHasInstance:a,ObjectDefineProperty:o,ObjectDefineProperties:s,ObjectSetPrototypeOf:c,StringPrototypeToLowerCase:l,Symbol:u,SymbolHasInstance:d}=Z();t.exports=P,P.WritableState=M;let{EventEmitter:f}=require(`events`),p=Fe().Stream,{Buffer:m}=require(`buffer`),h=Pe(),{addAbortSignal:g}=Ie(),{getHighWaterMark:v,getDefaultHighWaterMark:y}=Re(),{ERR_INVALID_ARG_TYPE:b,ERR_METHOD_NOT_IMPLEMENTED:x,ERR_MULTIPLE_CALLBACK:S,ERR_STREAM_CANNOT_PIPE:C,ERR_STREAM_DESTROYED:w,ERR_STREAM_ALREADY_FINISHED:T,ERR_STREAM_NULL_VALUES:E,ERR_STREAM_WRITE_AFTER_END:D,ERR_UNKNOWN_ENCODING:O}=Q().codes,{errorOrDestroy:k}=h;c(P.prototype,p.prototype),c(P,p);function A(){}let j=u(`kOnFinished`);function M(e,t,n){typeof n!=`boolean`&&(n=t instanceof Ge()),this.objectMode=!!(e&&e.objectMode),n&&(this.objectMode=this.objectMode||!!(e&&e.writableObjectMode)),this.highWaterMark=e?v(this,e,`writableHighWaterMark`,n):y(!1),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1,this.decodeStrings=!(e&&e.decodeStrings===!1),this.defaultEncoding=e&&e.defaultEncoding||`utf8`,this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=z.bind(void 0,t),this.writecb=null,this.writelen=0,this.afterWriteTickInfo=null,N(this),this.pendingcb=0,this.constructed=!0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!e||e.emitClose!==!1,this.autoDestroy=!e||e.autoDestroy!==!1,this.errored=null,this.closed=!1,this.closeEmitted=!1,this[j]=[]}function N(e){e.buffered=[],e.bufferedIndex=0,e.allBuffers=!0,e.allNoop=!0}M.prototype.getBuffer=function(){return r(this.buffered,this.bufferedIndex)},o(M.prototype,`bufferedRequestCount`,{__proto__:null,get(){return this.buffered.length-this.bufferedIndex}});function P(e){let t=this instanceof Ge();if(!t&&!a(P,this))return new P(e);this._writableState=new M(e,this,t),e&&(typeof e.write==`function`&&(this._write=e.write),typeof e.writev==`function`&&(this._writev=e.writev),typeof e.destroy==`function`&&(this._destroy=e.destroy),typeof e.final==`function`&&(this._final=e.final),typeof e.construct==`function`&&(this._construct=e.construct),e.signal&&g(e.signal,this)),p.call(this,e),h.construct(this,()=>{let e=this._writableState;e.writing||U(this,e),q(this,e)})}o(P,d,{__proto__:null,value:function(e){return a(this,e)?!0:this===P?e&&e._writableState instanceof M:!1}}),P.prototype.pipe=function(){k(this,new C)};function F(e,t,r,i){let a=e._writableState;if(typeof r==`function`)i=r,r=a.defaultEncoding;else{if(!r)r=a.defaultEncoding;else if(r!==`buffer`&&!m.isEncoding(r))throw new O(r);typeof i!=`function`&&(i=A)}if(t===null)throw new E;if(!a.objectMode)if(typeof t==`string`)a.decodeStrings!==!1&&(t=m.from(t,r),r=`buffer`);else if(t instanceof m)r=`buffer`;else if(p._isUint8Array(t))t=p._uint8ArrayToBuffer(t),r=`buffer`;else throw new b(`chunk`,[`string`,`Buffer`,`Uint8Array`],t);let o;return a.ending?o=new D:a.destroyed&&(o=new w(`write`)),o?(n.nextTick(i,o),k(e,o,!0),o):(a.pendingcb++,I(e,a,t,r,i))}P.prototype.write=function(e,t,n){return F(this,e,t,n)===!0},P.prototype.cork=function(){this._writableState.corked++},P.prototype.uncork=function(){let e=this._writableState;e.corked&&(e.corked--,e.writing||U(this,e))},P.prototype.setDefaultEncoding=function(e){if(typeof e==`string`&&(e=l(e)),!m.isEncoding(e))throw new O(e);return this._writableState.defaultEncoding=e,this};function I(e,t,n,r,i){let a=t.objectMode?1:n.length;t.length+=a;let o=t.length<t.highWaterMark;return o||(t.needDrain=!0),t.writing||t.corked||t.errored||!t.constructed?(t.buffered.push({chunk:n,encoding:r,callback:i}),t.allBuffers&&r!==`buffer`&&(t.allBuffers=!1),t.allNoop&&i!==A&&(t.allNoop=!1)):(t.writelen=a,t.writecb=i,t.writing=!0,t.sync=!0,e._write(n,r,t.onwrite),t.sync=!1),o&&!t.errored&&!t.destroyed}function L(e,t,n,r,i,a,o){t.writelen=r,t.writecb=o,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new w(`write`)):n?e._writev(i,t.onwrite):e._write(i,a,t.onwrite),t.sync=!1}function R(e,t,n,r){--t.pendingcb,r(n),H(t),k(e,n)}function z(e,t){let r=e._writableState,i=r.sync,a=r.writecb;if(typeof a!=`function`){k(e,new S);return}r.writing=!1,r.writecb=null,r.length-=r.writelen,r.writelen=0,t?(t.stack,r.errored||=t,e._readableState&&!e._readableState.errored&&(e._readableState.errored=t),i?n.nextTick(R,e,r,t,a):R(e,r,t,a)):(r.buffered.length>r.bufferedIndex&&U(e,r),i?r.afterWriteTickInfo!==null&&r.afterWriteTickInfo.cb===a?r.afterWriteTickInfo.count++:(r.afterWriteTickInfo={count:1,cb:a,stream:e,state:r},n.nextTick(B,r.afterWriteTickInfo)):V(e,r,1,a))}function B({stream:e,state:t,count:n,cb:r}){return t.afterWriteTickInfo=null,V(e,t,n,r)}function V(e,t,n,r){for(!t.ending&&!e.destroyed&&t.length===0&&t.needDrain&&(t.needDrain=!1,e.emit(`drain`));n-- >0;)t.pendingcb--,r();t.destroyed&&H(t),q(e,t)}function H(e){if(e.writing)return;for(let t=e.bufferedIndex;t<e.buffered.length;++t){let{chunk:n,callback:r}=e.buffered[t],i=e.objectMode?1:n.length;e.length-=i,r(e.errored??new w(`write`))}let t=e[j].splice(0);for(let n=0;n<t.length;n++)t[n](e.errored??new w(`end`));N(e)}function U(e,t){if(t.corked||t.bufferProcessing||t.destroyed||!t.constructed)return;let{buffered:n,bufferedIndex:i,objectMode:a}=t,o=n.length-i;if(!o)return;let s=i;if(t.bufferProcessing=!0,o>1&&e._writev){t.pendingcb-=o-1;let i=t.allNoop?A:e=>{for(let t=s;t<n.length;++t)n[t].callback(e)},a=t.allNoop&&s===0?n:r(n,s);a.allBuffers=t.allBuffers,L(e,t,!0,t.length,a,``,i),N(t)}else{do{let{chunk:r,encoding:i,callback:o}=n[s];n[s++]=null,L(e,t,!1,a?1:r.length,r,i,o)}while(s<n.length&&!t.writing);s===n.length?N(t):s>256?(n.splice(0,s),t.bufferedIndex=0):t.bufferedIndex=s}t.bufferProcessing=!1}P.prototype._write=function(e,t,n){if(this._writev)this._writev([{chunk:e,encoding:t}],n);else throw new x(`_write()`)},P.prototype._writev=null,P.prototype.end=function(e,t,r){let a=this._writableState;typeof e==`function`?(r=e,e=null,t=null):typeof t==`function`&&(r=t,t=null);let o;if(e!=null){let n=F(this,e,t);n instanceof i&&(o=n)}return a.corked&&(a.corked=1,this.uncork()),o||(!a.errored&&!a.ending?(a.ending=!0,q(this,a,!0),a.ended=!0):a.finished?o=new T(`end`):a.destroyed&&(o=new w(`end`))),typeof r==`function`&&(o||a.finished?n.nextTick(r,o):a[j].push(r)),this};function W(e){return e.ending&&!e.destroyed&&e.constructed&&e.length===0&&!e.errored&&e.buffered.length===0&&!e.finished&&!e.writing&&!e.errorEmitted&&!e.closeEmitted}function G(e,t){let r=!1;function i(i){if(r){k(e,i??S());return}if(r=!0,t.pendingcb--,i){let n=t[j].splice(0);for(let e=0;e<n.length;e++)n[e](i);k(e,i,t.sync)}else W(t)&&(t.prefinished=!0,e.emit(`prefinish`),t.pendingcb++,n.nextTick(ee,e,t))}t.sync=!0,t.pendingcb++;try{e._final(i)}catch(e){i(e)}t.sync=!1}function K(e,t){!t.prefinished&&!t.finalCalled&&(typeof e._final==`function`&&!t.destroyed?(t.finalCalled=!0,G(e,t)):(t.prefinished=!0,e.emit(`prefinish`)))}function q(e,t,r){W(t)&&(K(e,t),t.pendingcb===0&&(r?(t.pendingcb++,n.nextTick((e,t)=>{W(t)?ee(e,t):t.pendingcb--},e,t)):W(t)&&(t.pendingcb++,ee(e,t))))}function ee(e,t){t.pendingcb--,t.finished=!0;let n=t[j].splice(0);for(let e=0;e<n.length;e++)n[e]();if(e.emit(`finish`),t.autoDestroy){let t=e._readableState;(!t||t.autoDestroy&&(t.endEmitted||t.readable===!1))&&e.destroy()}}s(P.prototype,{closed:{__proto__:null,get(){return this._writableState?this._writableState.closed:!1}},destroyed:{__proto__:null,get(){return this._writableState?this._writableState.destroyed:!1},set(e){this._writableState&&(this._writableState.destroyed=e)}},writable:{__proto__:null,get(){let e=this._writableState;return!!e&&e.writable!==!1&&!e.destroyed&&!e.errored&&!e.ending&&!e.ended},set(e){this._writableState&&(this._writableState.writable=!!e)}},writableFinished:{__proto__:null,get(){return this._writableState?this._writableState.finished:!1}},writableObjectMode:{__proto__:null,get(){return this._writableState?this._writableState.objectMode:!1}},writableBuffer:{__proto__:null,get(){return this._writableState&&this._writableState.getBuffer()}},writableEnded:{__proto__:null,get(){return this._writableState?this._writableState.ending:!1}},writableNeedDrain:{__proto__:null,get(){let e=this._writableState;return e?!e.destroyed&&!e.ending&&e.needDrain:!1}},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!!(this._writableState.writable!==!1&&(this._writableState.destroyed||this._writableState.errored)&&!this._writableState.finished)}}});let te=h.destroy;P.prototype.destroy=function(e,t){let r=this._writableState;return!r.destroyed&&(r.bufferedIndex<r.buffered.length||r[j].length)&&n.nextTick(H,r),te.call(this,e,t),this},P.prototype._undestroy=h.undestroy,P.prototype._destroy=function(e,t){t(e)},P.prototype[f.captureRejectionSymbol]=function(e){this.destroy(e)};let J;function ne(){return J===void 0&&(J={}),J}P.fromWeb=function(e,t){return ne().newStreamWritableFromWritableStream(e,t)},P.toWeb=function(e){return ne().newWritableStreamFromStreamWritable(e)}})),We=e(((e,t)=>{let n=je(),r=require(`buffer`),{isReadable:i,isWritable:a,isIterable:o,isNodeStream:s,isReadableNodeStream:c,isWritableNodeStream:l,isDuplexNodeStream:u,isReadableStream:d,isWritableStream:f}=Me(),p=Ne(),{AbortError:m,codes:{ERR_INVALID_ARG_TYPE:h,ERR_INVALID_RETURN_VALUE:g}}=Q(),{destroyer:v}=Pe(),y=Ge(),b=He(),x=Ue(),{createDeferredPromise:S}=$(),C=Ve(),w=globalThis.Blob||r.Blob,T=w===void 0?function(e){return!1}:function(e){return e instanceof w},E=globalThis.AbortController||ke().AbortController,{FunctionPrototypeCall:D}=Z();var O=class extends y{constructor(e){super(e),e?.readable===!1&&(this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0),e?.writable===!1&&(this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0)}};t.exports=function e(t,r){if(u(t))return t;if(c(t))return A({readable:t});if(l(t))return A({writable:t});if(s(t))return A({writable:!1,readable:!1});if(d(t))return A({readable:b.fromWeb(t)});if(f(t))return A({writable:x.fromWeb(t)});if(typeof t==`function`){let{value:e,write:i,final:a,destroy:s}=k(t);if(o(e))return C(O,e,{objectMode:!0,write:i,final:a,destroy:s});let c=e?.then;if(typeof c==`function`){let t,r=D(c,e,e=>{if(e!=null)throw new g(`nully`,`body`,e)},e=>{v(t,e)});return t=new O({objectMode:!0,readable:!1,write:i,final(e){a(async()=>{try{await r,n.nextTick(e,null)}catch(t){n.nextTick(e,t)}})},destroy:s})}throw new g(`Iterable, AsyncIterable or AsyncFunction`,r,e)}if(T(t))return e(t.arrayBuffer());if(o(t))return C(O,t,{objectMode:!0,writable:!1});if(d(t?.readable)&&f(t?.writable))return O.fromWeb(t);if(typeof t?.writable==`object`||typeof t?.readable==`object`)return A({readable:t!=null&&t.readable?c(t?.readable)?t?.readable:e(t.readable):void 0,writable:t!=null&&t.writable?l(t?.writable)?t?.writable:e(t.writable):void 0});let i=t?.then;if(typeof i==`function`){let e;return D(i,t,t=>{t!=null&&e.push(t),e.push(null)},t=>{v(e,t)}),e=new O({objectMode:!0,writable:!1,read(){}})}throw new h(r,[`Blob`,`ReadableStream`,`WritableStream`,`Stream`,`Iterable`,`AsyncIterable`,`Function`,`{ readable, writable } pair`,`Promise`],t)};function k(e){let{promise:t,resolve:r}=S(),i=new E,a=i.signal;return{value:e((async function*(){for(;;){let e=t;t=null;let{chunk:i,done:o,cb:s}=await e;if(n.nextTick(s),o)return;if(a.aborted)throw new m(void 0,{cause:a.reason});({promise:t,resolve:r}=S()),yield i}})(),{signal:a}),write(e,t,n){let i=r;r=null,i({chunk:e,done:!1,cb:n})},final(e){let t=r;r=null,t({done:!0,cb:e})},destroy(e,t){i.abort(),t(e)}}}function A(e){let t=e.readable&&typeof e.readable.read!=`function`?b.wrap(e.readable):e.readable,n=e.writable,r=!!i(t),o=!!a(n),s,c,l,u,d;function f(e){let t=u;u=null,t?t(e):e&&d.destroy(e)}return d=new O({readableObjectMode:!!(t!=null&&t.readableObjectMode),writableObjectMode:!!(n!=null&&n.writableObjectMode),readable:r,writable:o}),o&&(p(n,e=>{o=!1,e&&v(t,e),f(e)}),d._write=function(e,t,r){n.write(e,t)?r():s=r},d._final=function(e){n.end(),c=e},n.on(`drain`,function(){if(s){let e=s;s=null,e()}}),n.on(`finish`,function(){if(c){let e=c;c=null,e()}})),r&&(p(t,e=>{r=!1,e&&v(t,e),f(e)}),t.on(`readable`,function(){if(l){let e=l;l=null,e()}}),t.on(`end`,function(){d.push(null)}),d._read=function(){for(;;){let e=t.read();if(e===null){l=d._read;return}if(!d.push(e))return}}),d._destroy=function(e,r){!e&&u!==null&&(e=new m),l=null,s=null,c=null,u===null?r(e):(u=r,v(n,e),v(t,e))},d}})),Ge=e(((e,t)=>{let{ObjectDefineProperties:n,ObjectGetOwnPropertyDescriptor:r,ObjectKeys:i,ObjectSetPrototypeOf:a}=Z();t.exports=c;let o=He(),s=Ue();a(c.prototype,o.prototype),a(c,o);{let e=i(s.prototype);for(let t=0;t<e.length;t++){let n=e[t];c.prototype[n]||(c.prototype[n]=s.prototype[n])}}function c(e){if(!(this instanceof c))return new c(e);o.call(this,e),s.call(this,e),e?(this.allowHalfOpen=e.allowHalfOpen!==!1,e.readable===!1&&(this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0),e.writable===!1&&(this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0)):this.allowHalfOpen=!0}n(c.prototype,{writable:{__proto__:null,...r(s.prototype,`writable`)},writableHighWaterMark:{__proto__:null,...r(s.prototype,`writableHighWaterMark`)},writableObjectMode:{__proto__:null,...r(s.prototype,`writableObjectMode`)},writableBuffer:{__proto__:null,...r(s.prototype,`writableBuffer`)},writableLength:{__proto__:null,...r(s.prototype,`writableLength`)},writableFinished:{__proto__:null,...r(s.prototype,`writableFinished`)},writableCorked:{__proto__:null,...r(s.prototype,`writableCorked`)},writableEnded:{__proto__:null,...r(s.prototype,`writableEnded`)},writableNeedDrain:{__proto__:null,...r(s.prototype,`writableNeedDrain`)},destroyed:{__proto__:null,get(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set(e){this._readableState&&this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}}});let l;function u(){return l===void 0&&(l={}),l}c.fromWeb=function(e,t){return u().newStreamDuplexFromReadableWritablePair(e,t)},c.toWeb=function(e){return u().newReadableWritablePairFromDuplex(e)};let d;c.from=function(e){return d||=We(),d(e,`body`)}})),Ke=e(((e,t)=>{let{ObjectSetPrototypeOf:n,Symbol:r}=Z();t.exports=c;let{ERR_METHOD_NOT_IMPLEMENTED:i}=Q().codes,a=Ge(),{getHighWaterMark:o}=Re();n(c.prototype,a.prototype),n(c,a);let s=r(`kCallback`);function c(e){if(!(this instanceof c))return new c(e);let t=e?o(this,e,`readableHighWaterMark`,!0):null;t===0&&(e={...e,highWaterMark:null,readableHighWaterMark:t,writableHighWaterMark:e.writableHighWaterMark||0}),a.call(this,e),this._readableState.sync=!1,this[s]=null,e&&(typeof e.transform==`function`&&(this._transform=e.transform),typeof e.flush==`function`&&(this._flush=e.flush)),this.on(`prefinish`,u)}function l(e){typeof this._flush==`function`&&!this.destroyed?this._flush((t,n)=>{if(t){e?e(t):this.destroy(t);return}n!=null&&this.push(n),this.push(null),e&&e()}):(this.push(null),e&&e())}function u(){this._final!==l&&l.call(this)}c.prototype._final=l,c.prototype._transform=function(e,t,n){throw new i(`_transform()`)},c.prototype._write=function(e,t,n){let r=this._readableState,i=this._writableState,a=r.length;this._transform(e,t,(e,t)=>{if(e){n(e);return}t!=null&&this.push(t),i.ended||a===r.length||r.length<r.highWaterMark?n():this[s]=n})},c.prototype._read=function(){if(this[s]){let e=this[s];this[s]=null,e()}}})),qe=e(((e,t)=>{let{ObjectSetPrototypeOf:n}=Z();t.exports=i;let r=Ke();n(i.prototype,r.prototype),n(i,r);function i(e){if(!(this instanceof i))return new i(e);r.call(this,e)}i.prototype._transform=function(e,t,n){n(null,e)}})),Je=e(((e,t)=>{let n=je(),{ArrayIsArray:r,Promise:i,SymbolAsyncIterator:a,SymbolDispose:o}=Z(),s=Ne(),{once:c}=$(),l=Pe(),u=Ge(),{aggregateTwoErrors:d,codes:{ERR_INVALID_ARG_TYPE:f,ERR_INVALID_RETURN_VALUE:p,ERR_MISSING_ARGS:m,ERR_STREAM_DESTROYED:h,ERR_STREAM_PREMATURE_CLOSE:g},AbortError:v}=Q(),{validateFunction:y,validateAbortSignal:b}=Ae(),{isIterable:x,isReadable:S,isReadableNodeStream:C,isNodeStream:w,isTransformStream:T,isWebStream:E,isReadableStream:D,isReadableFinished:O}=Me(),k=globalThis.AbortController||ke().AbortController,A,j,M;function N(e,t,n){let r=!1;return e.on(`close`,()=>{r=!0}),{destroy:t=>{r||(r=!0,l.destroyer(e,t||new h(`pipe`)))},cleanup:s(e,{readable:t,writable:n},e=>{r=!e})}}function P(e){return y(e[e.length-1],`streams[stream.length - 1]`),e.pop()}function F(e){if(x(e))return e;if(C(e))return I(e);throw new f(`val`,[`Readable`,`Iterable`,`AsyncIterable`],e)}async function*I(e){j||=He(),yield*j.prototype[a].call(e)}async function L(e,t,n,{end:r}){let a,o=null,c=e=>{if(e&&(a=e),o){let e=o;o=null,e()}},l=()=>new i((e,t)=>{a?t(a):o=()=>{a?t(a):e()}});t.on(`drain`,c);let u=s(t,{readable:!1},c);try{t.writableNeedDrain&&await l();for await(let n of e)t.write(n)||await l();r&&(t.end(),await l()),n()}catch(e){n(a===e?e:d(a,e))}finally{u(),t.off(`drain`,c)}}async function R(e,t,n,{end:r}){T(t)&&(t=t.writable);let i=t.getWriter();try{for await(let t of e)await i.ready,i.write(t).catch(()=>{});await i.ready,r&&await i.close(),n()}catch(e){try{await i.abort(e),n(e)}catch(e){n(e)}}}function z(...e){return B(e,c(P(e)))}function B(e,t,i){if(e.length===1&&r(e[0])&&(e=e[0]),e.length<2)throw new m(`streams`);let a=new k,s=a.signal,c=i?.signal,l=[];b(c,`options.signal`);function d(){I(new v)}M||=$().addAbortListener;let h;c&&(h=M(c,d));let g,y,O=[],j=0;function P(e){I(e,--j===0)}function I(e,r){var i;if(e&&(!g||g.code===`ERR_STREAM_PREMATURE_CLOSE`)&&(g=e),!(!g&&!r)){for(;O.length;)O.shift()(g);(i=h)==null||i[o](),a.abort(),r&&(g||l.forEach(e=>e()),n.nextTick(t,g,y))}}let z;for(let t=0;t<e.length;t++){let r=e[t],a=t<e.length-1,o=t>0,c=a||i?.end!==!1,d=t===e.length-1;if(w(r)){if(c){let{destroy:e,cleanup:t}=N(r,a,o);O.push(e),S(r)&&d&&l.push(t)}function e(e){e&&e.name!==`AbortError`&&e.code!==`ERR_STREAM_PREMATURE_CLOSE`&&P(e)}r.on(`error`,e),S(r)&&d&&l.push(()=>{r.removeListener(`error`,e)})}if(t===0)if(typeof r==`function`){if(z=r({signal:s}),!x(z))throw new p(`Iterable, AsyncIterable or Stream`,`source`,z)}else z=x(r)||C(r)||T(r)?r:u.from(r);else if(typeof r==`function`)if(z=T(z)?F(z?.readable):F(z),z=r(z,{signal:s}),a){if(!x(z,!0))throw new p(`AsyncIterable`,`transform[${t-1}]`,z)}else{A||=qe();let e=new A({objectMode:!0}),t=z?.then;if(typeof t==`function`)j++,t.call(z,t=>{y=t,t!=null&&e.write(t),c&&e.end(),n.nextTick(P)},t=>{e.destroy(t),n.nextTick(P,t)});else if(x(z,!0))j++,L(z,e,P,{end:c});else if(D(z)||T(z)){let t=z.readable||z;j++,L(t,e,P,{end:c})}else throw new p(`AsyncIterable or Promise`,`destination`,z);z=e;let{destroy:r,cleanup:i}=N(z,!1,!0);O.push(r),d&&l.push(i)}else if(w(r)){if(C(z)){j+=2;let e=V(z,r,P,{end:c});S(r)&&d&&l.push(e)}else if(T(z)||D(z)){let e=z.readable||z;j++,L(e,r,P,{end:c})}else if(x(z))j++,L(z,r,P,{end:c});else throw new f(`val`,[`Readable`,`Iterable`,`AsyncIterable`,`ReadableStream`,`TransformStream`],z);z=r}else if(E(r)){if(C(z))j++,R(F(z),r,P,{end:c});else if(D(z)||x(z))j++,R(z,r,P,{end:c});else if(T(z))j++,R(z.readable,r,P,{end:c});else throw new f(`val`,[`Readable`,`Iterable`,`AsyncIterable`,`ReadableStream`,`TransformStream`],z);z=r}else z=u.from(r)}return(s!=null&&s.aborted||c!=null&&c.aborted)&&n.nextTick(d),z}function V(e,t,r,{end:i}){let a=!1;if(t.on(`close`,()=>{a||r(new g)}),e.pipe(t,{end:!1}),i){function r(){a=!0,t.end()}O(e)?n.nextTick(r):e.once(`end`,r)}else r();return s(e,{readable:!0,writable:!1},t=>{let n=e._readableState;t&&t.code===`ERR_STREAM_PREMATURE_CLOSE`&&n&&n.ended&&!n.errored&&!n.errorEmitted?e.once(`end`,r).once(`error`,r):r(t)}),s(t,{readable:!1,writable:!0},r)}t.exports={pipelineImpl:B,pipeline:z}})),Ye=e(((e,t)=>{let{pipeline:n}=Je(),r=Ge(),{destroyer:i}=Pe(),{isNodeStream:a,isReadable:o,isWritable:s,isWebStream:c,isTransformStream:l,isWritableStream:u,isReadableStream:d}=Me(),{AbortError:f,codes:{ERR_INVALID_ARG_VALUE:p,ERR_MISSING_ARGS:m}}=Q(),h=Ne();t.exports=function(...e){if(e.length===0)throw new m(`streams`);if(e.length===1)return r.from(e[0]);let t=[...e];if(typeof e[0]==`function`&&(e[0]=r.from(e[0])),typeof e[e.length-1]==`function`){let t=e.length-1;e[t]=r.from(e[t])}for(let n=0;n<e.length;++n)if(!(!a(e[n])&&!c(e[n]))){if(n<e.length-1&&!(o(e[n])||d(e[n])||l(e[n])))throw new p(`streams[${n}]`,t[n],`must be readable`);if(n>0&&!(s(e[n])||u(e[n])||l(e[n])))throw new p(`streams[${n}]`,t[n],`must be writable`)}let g,v,y,b,x;function S(e){let t=b;b=null,t?t(e):e?x.destroy(e):!E&&!T&&x.destroy()}let C=e[0],w=n(e,S),T=!!(s(C)||u(C)||l(C)),E=!!(o(w)||d(w)||l(w));if(x=new r({writableObjectMode:!!(C!=null&&C.writableObjectMode),readableObjectMode:!!(w!=null&&w.readableObjectMode),writable:T,readable:E}),T){if(a(C))x._write=function(e,t,n){C.write(e,t)?n():g=n},x._final=function(e){C.end(),v=e},C.on(`drain`,function(){if(g){let e=g;g=null,e()}});else if(c(C)){let e=(l(C)?C.writable:C).getWriter();x._write=async function(t,n,r){try{await e.ready,e.write(t).catch(()=>{}),r()}catch(e){r(e)}},x._final=async function(t){try{await e.ready,e.close().catch(()=>{}),v=t}catch(e){t(e)}}}h(l(w)?w.readable:w,()=>{if(v){let e=v;v=null,e()}})}if(E){if(a(w))w.on(`readable`,function(){if(y){let e=y;y=null,e()}}),w.on(`end`,function(){x.push(null)}),x._read=function(){for(;;){let e=w.read();if(e===null){y=x._read;return}if(!x.push(e))return}};else if(c(w)){let e=(l(w)?w.readable:w).getReader();x._read=async function(){for(;;)try{let{value:t,done:n}=await e.read();if(!x.push(t))return;if(n){x.push(null);return}}catch{return}}}}return x._destroy=function(e,t){!e&&b!==null&&(e=new f),y=null,g=null,v=null,b===null?t(e):(b=t,a(w)&&i(w,e))},x}})),Xe=e(((e,t)=>{let n=globalThis.AbortController||ke().AbortController,{codes:{ERR_INVALID_ARG_VALUE:r,ERR_INVALID_ARG_TYPE:i,ERR_MISSING_ARGS:a,ERR_OUT_OF_RANGE:o},AbortError:s}=Q(),{validateAbortSignal:c,validateInteger:l,validateObject:u}=Ae(),d=Z().Symbol(`kWeak`),f=Z().Symbol(`kResistStopPropagation`),{finished:p}=Ne(),m=Ye(),{addAbortSignalNoValidate:h}=Ie(),{isWritable:g,isNodeStream:v}=Me(),{deprecate:y}=$(),{ArrayPrototypePush:b,Boolean:x,MathFloor:S,Number:C,NumberIsNaN:w,Promise:T,PromiseReject:E,PromiseResolve:D,PromisePrototypeThen:O,Symbol:k}=Z(),A=k(`kEmpty`),j=k(`kEof`);function M(e,t){if(t!=null&&u(t,`options`),t?.signal!=null&&c(t.signal,`options.signal`),v(e)&&!g(e))throw new r(`stream`,e,`must be writable`);let n=m(this,e);return t!=null&&t.signal&&h(t.signal,n),n}function N(e,t){if(typeof e!=`function`)throw new i(`fn`,[`Function`,`AsyncFunction`],e);t!=null&&u(t,`options`),t?.signal!=null&&c(t.signal,`options.signal`);let n=1;t?.concurrency!=null&&(n=S(t.concurrency));let r=n-1;return t?.highWaterMark!=null&&(r=S(t.highWaterMark)),l(n,`options.concurrency`,1),l(r,`options.highWaterMark`,0),r+=n,async function*(){let i=$().AbortSignalAny([t?.signal].filter(x)),a=this,o=[],c={signal:i},l,u,d=!1,f=0;function p(){d=!0,m()}function m(){--f,h()}function h(){u&&!d&&f<n&&o.length<r&&(u(),u=null)}async function g(){try{for await(let t of a){if(d)return;if(i.aborted)throw new s;try{if(t=e(t,c),t===A)continue;t=D(t)}catch(e){t=E(e)}f+=1,O(t,m,p),o.push(t),l&&=(l(),null),!d&&(o.length>=r||f>=n)&&await new T(e=>{u=e})}o.push(j)}catch(e){let t=E(e);O(t,m,p),o.push(t)}finally{d=!0,l&&=(l(),null)}}g();try{for(;;){for(;o.length>0;){let e=await o[0];if(e===j)return;if(i.aborted)throw new s;e!==A&&(yield e),o.shift(),h()}await new T(e=>{l=e})}}finally{d=!0,u&&=(u(),null)}}.call(this)}function P(e=void 0){return e!=null&&u(e,`options`),e?.signal!=null&&c(e.signal,`options.signal`),async function*(){let t=0;for await(let r of this){var n;if(e!=null&&(n=e.signal)!=null&&n.aborted)throw new s({cause:e.signal.reason});yield[t++,r]}}.call(this)}async function F(e,t=void 0){for await(let n of z.call(this,e,t))return!0;return!1}async function I(e,t=void 0){if(typeof e!=`function`)throw new i(`fn`,[`Function`,`AsyncFunction`],e);return!await F.call(this,async(...t)=>!await e(...t),t)}async function L(e,t){for await(let n of z.call(this,e,t))return n}async function R(e,t){if(typeof e!=`function`)throw new i(`fn`,[`Function`,`AsyncFunction`],e);async function n(t,n){return await e(t,n),A}for await(let e of N.call(this,n,t));}function z(e,t){if(typeof e!=`function`)throw new i(`fn`,[`Function`,`AsyncFunction`],e);async function n(t,n){return await e(t,n)?t:A}return N.call(this,n,t)}var B=class extends a{constructor(){super(`reduce`),this.message=`Reduce of an empty stream requires an initial value`}};async function V(e,t,r){var a;if(typeof e!=`function`)throw new i(`reducer`,[`Function`,`AsyncFunction`],e);r!=null&&u(r,`options`),r?.signal!=null&&c(r.signal,`options.signal`);let o=arguments.length>1;if(r!=null&&(a=r.signal)!=null&&a.aborted){let e=new s(void 0,{cause:r.signal.reason});throw this.once(`error`,()=>{}),await p(this.destroy(e)),e}let l=new n,m=l.signal;if(r!=null&&r.signal){let e={once:!0,[d]:this,[f]:!0};r.signal.addEventListener(`abort`,()=>l.abort(),e)}let h=!1;try{for await(let n of this){var g;if(h=!0,r!=null&&(g=r.signal)!=null&&g.aborted)throw new s;o?t=await e(t,n,{signal:m}):(t=n,o=!0)}if(!h&&!o)throw new B}finally{l.abort()}return t}async function H(e){e!=null&&u(e,`options`),e?.signal!=null&&c(e.signal,`options.signal`);let t=[];for await(let r of this){var n;if(e!=null&&(n=e.signal)!=null&&n.aborted)throw new s(void 0,{cause:e.signal.reason});b(t,r)}return t}function U(e,t){let n=N.call(this,e,t);return async function*(){for await(let e of n)yield*e}.call(this)}function W(e){if(e=C(e),w(e))return 0;if(e<0)throw new o(`number`,`>= 0`,e);return e}function G(e,t=void 0){return t!=null&&u(t,`options`),t?.signal!=null&&c(t.signal,`options.signal`),e=W(e),async function*(){var n;if(t!=null&&(n=t.signal)!=null&&n.aborted)throw new s;for await(let n of this){var r;if(t!=null&&(r=t.signal)!=null&&r.aborted)throw new s;e--<=0&&(yield n)}}.call(this)}function K(e,t=void 0){return t!=null&&u(t,`options`),t?.signal!=null&&c(t.signal,`options.signal`),e=W(e),async function*(){var n;if(t!=null&&(n=t.signal)!=null&&n.aborted)throw new s;for await(let n of this){var r;if(t!=null&&(r=t.signal)!=null&&r.aborted)throw new s;if(e-- >0&&(yield n),e<=0)return}}.call(this)}t.exports.streamReturningOperators={asIndexedPairs:y(P,`readable.asIndexedPairs will be removed in a future version.`),drop:G,filter:z,flatMap:U,map:N,take:K,compose:M},t.exports.promiseReturningOperators={every:I,forEach:R,reduce:V,toArray:H,some:F,find:L}})),Ze=e(((e,t)=>{let{ArrayPrototypePop:n,Promise:r}=Z(),{isIterable:i,isNodeStream:a,isWebStream:o}=Me(),{pipelineImpl:s}=Je(),{finished:c}=Ne();Qe();function l(...e){return new r((t,r)=>{let c,l,u=e[e.length-1];if(u&&typeof u==`object`&&!a(u)&&!i(u)&&!o(u)){let t=n(e);c=t.signal,l=t.end}s(e,(e,n)=>{e?r(e):t(n)},{signal:c,end:l})})}t.exports={finished:c,pipeline:l}})),Qe=e(((e,t)=>{let{Buffer:n}=require(`buffer`),{ObjectDefineProperty:r,ObjectKeys:i,ReflectApply:a}=Z(),{promisify:{custom:o}}=$(),{streamReturningOperators:s,promiseReturningOperators:c}=Xe(),{codes:{ERR_ILLEGAL_CONSTRUCTOR:l}}=Q(),u=Ye(),{setDefaultHighWaterMark:d,getDefaultHighWaterMark:f}=Re(),{pipeline:p}=Je(),{destroyer:m}=Pe(),h=Ne(),g=Ze(),v=Me(),y=t.exports=Fe().Stream;y.isDestroyed=v.isDestroyed,y.isDisturbed=v.isDisturbed,y.isErrored=v.isErrored,y.isReadable=v.isReadable,y.isWritable=v.isWritable,y.Readable=He();for(let e of i(s)){let t=s[e];function n(...e){if(new.target)throw l();return y.Readable.from(a(t,this,e))}r(n,`name`,{__proto__:null,value:t.name}),r(n,`length`,{__proto__:null,value:t.length}),r(y.Readable.prototype,e,{__proto__:null,value:n,enumerable:!1,configurable:!0,writable:!0})}for(let e of i(c)){let t=c[e];function n(...e){if(new.target)throw l();return a(t,this,e)}r(n,`name`,{__proto__:null,value:t.name}),r(n,`length`,{__proto__:null,value:t.length}),r(y.Readable.prototype,e,{__proto__:null,value:n,enumerable:!1,configurable:!0,writable:!0})}y.Writable=Ue(),y.Duplex=Ge(),y.Transform=Ke(),y.PassThrough=qe(),y.pipeline=p;let{addAbortSignal:b}=Ie();y.addAbortSignal=b,y.finished=h,y.destroy=m,y.compose=u,y.setDefaultHighWaterMark=d,y.getDefaultHighWaterMark=f,r(y,`promises`,{__proto__:null,configurable:!0,enumerable:!0,get(){return g}}),r(p,o,{__proto__:null,enumerable:!0,get(){return g.pipeline}}),r(h,o,{__proto__:null,enumerable:!0,get(){return g.finished}}),y.Stream=y,y._isUint8Array=function(e){return e instanceof Uint8Array},y._uint8ArrayToBuffer=function(e){return n.from(e.buffer,e.byteOffset,e.byteLength)}})),$e=e(((e,t)=>{let n=require(`stream`);if(n&&process.env.READABLE_STREAM===`disable`){let e=n.promises;t.exports._uint8ArrayToBuffer=n._uint8ArrayToBuffer,t.exports._isUint8Array=n._isUint8Array,t.exports.isDisturbed=n.isDisturbed,t.exports.isErrored=n.isErrored,t.exports.isReadable=n.isReadable,t.exports.Readable=n.Readable,t.exports.Writable=n.Writable,t.exports.Duplex=n.Duplex,t.exports.Transform=n.Transform,t.exports.PassThrough=n.PassThrough,t.exports.addAbortSignal=n.addAbortSignal,t.exports.finished=n.finished,t.exports.destroy=n.destroy,t.exports.pipeline=n.pipeline,t.exports.compose=n.compose,Object.defineProperty(n,`promises`,{configurable:!0,enumerable:!0,get(){return e}}),t.exports.Stream=n.Stream}else{let e=Qe(),n=Ze(),r=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=r,t.exports.pipeline=e.pipeline,t.exports.compose=e.compose,Object.defineProperty(e,`promises`,{configurable:!0,enumerable:!0,get(){return n}}),t.exports.Stream=e.Stream}t.exports.default=t.exports})),et=e(((e,t)=>{function n(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}t.exports=n})),tt=e(((e,t)=>{var n=z(),r=me(),i=he(),a=n?n.isConcatSpreadable:void 0;function o(e){return i(e)||r(e)||!!(a&&e&&e[a])}t.exports=o})),nt=e(((e,t)=>{var n=et(),r=tt();function i(e,t,a,o,s){var c=-1,l=e.length;for(a||=r,s||=[];++c<l;){var u=e[c];t>0&&a(u)?t>1?i(u,t-1,a,o,s):n(s,u):o||(s[s.length]=u)}return s}t.exports=i})),rt=e(((e,t)=>{var n=nt();function r(e){return e!=null&&e.length?n(e,1):[]}t.exports=r})),it=e(((e,t)=>{t.exports=J()(Object,`create`)})),at=e(((e,t)=>{var n=it();function r(){this.__data__=n?n(null):{},this.size=0}t.exports=r})),ot=e(((e,t)=>{function n(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}t.exports=n})),st=e(((e,t)=>{var n=it(),r=`__lodash_hash_undefined__`,i=Object.prototype.hasOwnProperty;function a(e){var t=this.__data__;if(n){var a=t[e];return a===r?void 0:a}return i.call(t,e)?t[e]:void 0}t.exports=a})),ct=e(((e,t)=>{var n=it(),r=Object.prototype.hasOwnProperty;function i(e){var t=this.__data__;return n?t[e]!==void 0:r.call(t,e)}t.exports=i})),lt=e(((e,t)=>{var n=it(),r=`__lodash_hash_undefined__`;function i(e,t){var i=this.__data__;return this.size+=this.has(e)?0:1,i[e]=n&&t===void 0?r:t,this}t.exports=i})),ut=e(((e,t)=>{var n=at(),r=ot(),i=st(),a=ct(),o=lt();function s(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}s.prototype.clear=n,s.prototype.delete=r,s.prototype.get=i,s.prototype.has=a,s.prototype.set=o,t.exports=s})),dt=e(((e,t)=>{function n(){this.__data__=[],this.size=0}t.exports=n})),ft=e(((e,t)=>{var n=oe();function r(e,t){for(var r=e.length;r--;)if(n(e[r][0],t))return r;return-1}t.exports=r})),pt=e(((e,t)=>{var n=ft(),r=Array.prototype.splice;function i(e){var t=this.__data__,i=n(t,e);return i<0?!1:(i==t.length-1?t.pop():r.call(t,i,1),--this.size,!0)}t.exports=i})),mt=e(((e,t)=>{var n=ft();function r(e){var t=this.__data__,r=n(t,e);return r<0?void 0:t[r][1]}t.exports=r})),ht=e(((e,t)=>{var n=ft();function r(e){return n(this.__data__,e)>-1}t.exports=r})),gt=e(((e,t)=>{var n=ft();function r(e,t){var r=this.__data__,i=n(r,e);return i<0?(++this.size,r.push([e,t])):r[i][1]=t,this}t.exports=r})),_t=e(((e,t)=>{var n=dt(),r=pt(),i=mt(),a=ht(),o=gt();function s(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}s.prototype.clear=n,s.prototype.delete=r,s.prototype.get=i,s.prototype.has=a,s.prototype.set=o,t.exports=s})),vt=e(((e,t)=>{t.exports=J()(R(),`Map`)})),yt=e(((e,t)=>{var n=ut(),r=_t(),i=vt();function a(){this.size=0,this.__data__={hash:new n,map:new(i||r),string:new n}}t.exports=a})),bt=e(((e,t)=>{function n(e){var t=typeof e;return t==`string`||t==`number`||t==`symbol`||t==`boolean`?e!==`__proto__`:e===null}t.exports=n})),xt=e(((e,t)=>{var n=bt();function r(e,t){var r=e.__data__;return n(t)?r[typeof t==`string`?`string`:`hash`]:r.map}t.exports=r})),St=e(((e,t)=>{var n=xt();function r(e){var t=n(this,e).delete(e);return this.size-=t?1:0,t}t.exports=r})),Ct=e(((e,t)=>{var n=xt();function r(e){return n(this,e).get(e)}t.exports=r})),wt=e(((e,t)=>{var n=xt();function r(e){return n(this,e).has(e)}t.exports=r})),Tt=e(((e,t)=>{var n=xt();function r(e,t){var r=n(this,e),i=r.size;return r.set(e,t),this.size+=r.size==i?0:1,this}t.exports=r})),Et=e(((e,t)=>{var n=yt(),r=St(),i=Ct(),a=wt(),o=Tt();function s(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}s.prototype.clear=n,s.prototype.delete=r,s.prototype.get=i,s.prototype.has=a,s.prototype.set=o,t.exports=s})),Dt=e(((e,t)=>{var n=`__lodash_hash_undefined__`;function r(e){return this.__data__.set(e,n),this}t.exports=r})),Ot=e(((e,t)=>{function n(e){return this.__data__.has(e)}t.exports=n})),kt=e(((e,t)=>{var n=Et(),r=Dt(),i=Ot();function a(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new n;++t<r;)this.add(e[t])}a.prototype.add=a.prototype.push=r,a.prototype.has=i,t.exports=a})),At=e(((e,t)=>{function n(e,t,n,r){for(var i=e.length,a=n+(r?1:-1);r?a--:++a<i;)if(t(e[a],a,e))return a;return-1}t.exports=n})),jt=e(((e,t)=>{function n(e){return e!==e}t.exports=n})),Mt=e(((e,t)=>{function n(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}t.exports=n})),Nt=e(((e,t)=>{var n=At(),r=jt(),i=Mt();function a(e,t,a){return t===t?i(e,t,a):n(e,r,a)}t.exports=a})),Pt=e(((e,t)=>{var n=Nt();function r(e,t){return!!(e!=null&&e.length)&&n(e,t,0)>-1}t.exports=r})),Ft=e(((e,t)=>{function n(e,t,n){for(var r=-1,i=e==null?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}t.exports=n})),It=e(((e,t)=>{function n(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}t.exports=n})),Lt=e(((e,t)=>{function n(e,t){return e.has(t)}t.exports=n})),Rt=e(((e,t)=>{var n=kt(),r=Pt(),i=Ft(),a=It(),o=ye(),s=Lt(),c=200;function l(e,t,l,u){var d=-1,f=r,p=!0,m=e.length,h=[],g=t.length;if(!m)return h;l&&(t=a(t,o(l))),u?(f=i,p=!1):t.length>=c&&(f=s,p=!1,t=new n(t));outer:for(;++d<m;){var v=e[d],y=l==null?v:l(v);if(v=u||v!==0?v:0,p&&y===y){for(var b=g;b--;)if(t[b]===y)continue outer;h.push(v)}else f(t,y,u)||h.push(v)}return h}t.exports=l})),zt=e(((e,t)=>{var n=ce(),r=fe();function i(e){return r(e)&&n(e)}t.exports=i})),Bt=e(((e,t)=>{var n=Rt(),r=nt(),i=ae(),a=zt();t.exports=i(function(e,t){return a(e)?n(e,r(t,1,a,!0)):[]})})),Vt=e(((e,t)=>{t.exports=J()(R(),`Set`)})),Ht=e(((e,t)=>{function n(){}t.exports=n})),Ut=e(((e,t)=>{function n(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}t.exports=n})),Wt=e(((e,t)=>{var n=Vt(),r=Ht(),i=Ut();t.exports=n&&1/i(new n([,-0]))[1]==1/0?function(e){return new n(e)}:r})),Gt=e(((e,t)=>{var n=kt(),r=Pt(),i=Ft(),a=Lt(),o=Wt(),s=Ut(),c=200;function l(e,t,l){var u=-1,d=r,f=e.length,p=!0,m=[],h=m;if(l)p=!1,d=i;else if(f>=c){var g=t?null:o(e);if(g)return s(g);p=!1,d=a,h=new n}else h=t?[]:m;outer:for(;++u<f;){var v=e[u],y=t?t(v):v;if(v=l||v!==0?v:0,p&&y===y){for(var b=h.length;b--;)if(h[b]===y)continue outer;t&&h.push(y),m.push(v)}else d(h,y,l)||(h!==m&&h.push(y),m.push(v))}return m}t.exports=l})),Kt=e(((e,t)=>{var n=nt(),r=ae(),i=Gt(),a=zt();t.exports=r(function(e){return i(n(e,1,a,!0))})})),qt=e(((e,t)=>{function n(e,t){return function(n){return e(t(n))}}t.exports=n})),Jt=e(((e,t)=>{t.exports=qt()(Object.getPrototypeOf,Object)})),Yt=e(((e,t)=>{var n=H(),r=Jt(),i=fe(),a=`[object Object]`,o=Function.prototype,s=Object.prototype,c=o.toString,l=s.hasOwnProperty,u=c.call(Object);function d(e){if(!i(e)||n(e)!=a)return!1;var t=r(e);if(t===null)return!0;var o=l.call(t,`constructor`)&&t.constructor;return typeof o==`function`&&o instanceof o&&c.call(o)==u}t.exports=d})),Xt=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.assertValidPattern=void 0,e.assertValidPattern=e=>{if(typeof e!=`string`)throw TypeError(`invalid pattern`);if(e.length>65536)throw TypeError(`pattern is too long`)}})),Zt=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.parseClass=void 0;let t={"[: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]},n=e=>e.replace(/[[\]\\-]/g,`\\$&`),r=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,`\\$&`),i=e=>e.join(``);e.parseClass=(e,a)=>{let o=a;if(e.charAt(o)!==`[`)throw Error(`not in a brace expression`);let s=[],c=[],l=o+1,u=!1,d=!1,f=!1,p=!1,m=o,h=``;WHILE:for(;l<e.length;){let r=e.charAt(l);if((r===`!`||r===`^`)&&l===o+1){p=!0,l++;continue}if(r===`]`&&u&&!f){m=l+1;break}if(u=!0,r===`\\`&&!f){f=!0,l++;continue}if(r===`[`&&!f){for(let[n,[r,i,a]]of Object.entries(t))if(e.startsWith(n,l)){if(h)return[`$.`,!1,e.length-o,!0];l+=n.length,a?c.push(r):s.push(r),d||=i;continue WHILE}}if(f=!1,h){r>h?s.push(n(h)+`-`+n(r)):r===h&&s.push(n(r)),h=``,l++;continue}if(e.startsWith(`-]`,l+1)){s.push(n(r+`-`)),l+=2;continue}if(e.startsWith(`-`,l+1)){h=r,l+=2;continue}s.push(n(r)),l++}if(m<l)return[``,!1,0,!1];if(!s.length&&!c.length)return[`$.`,!1,e.length-o,!0];if(c.length===0&&s.length===1&&/^\\?.$/.test(s[0])&&!p)return[r(s[0].length===2?s[0].slice(-1):s[0]),!1,m-o,!1];let g=`[`+(p?`^`:``)+i(s)+`]`,v=`[`+(p?``:`^`)+i(c)+`]`;return[s.length&&c.length?`(`+g+`|`+v+`)`:s.length?g:v,d,m-o,!0]}})),Qt=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.unescape=void 0,e.unescape=(e,{windowsPathsNoEscape:t=!1}={})=>t?e.replace(/\[([^\/\\])\]/g,`$1`):e.replace(/((?!\\).|^)\[([^\/\\])\]/g,`$1$2`).replace(/\\([^\/])/g,`$1`)})),$t=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.AST=void 0;let t=Zt(),n=Qt(),r=new Set([`!`,`?`,`+`,`*`,`@`]),i=e=>r.has(e),a=`(?!\\.)`,o=new Set([`[`,`.`]),s=new Set([`..`,`.`]),c=new Set(`().*{}+?[]^$\\!`),l=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,`\\$&`),u=`[^/]`,d=u+`*?`,f=u+`+?`;e.AST=class e{type;#e;#t;#n=!1;#r=[];#i;#a;#o;#s=!1;#c;#l;#u=!1;constructor(e,t,n={}){this.type=e,e&&(this.#t=!0),this.#i=t,this.#e=this.#i?this.#i.#e:this,this.#c=this.#e===this?n:this.#e.#c,this.#o=this.#e===this?[]:this.#e.#o,e===`!`&&!this.#e.#s&&this.#o.push(this),this.#a=this.#i?this.#i.#r.length:0}get hasMagic(){if(this.#t!==void 0)return this.#t;for(let e of this.#r)if(typeof e!=`string`&&(e.type||e.hasMagic))return this.#t=!0;return this.#t}toString(){return this.#l===void 0?this.type?this.#l=this.type+`(`+this.#r.map(e=>String(e)).join(`|`)+`)`:this.#l=this.#r.map(e=>String(e)).join(``):this.#l}#d(){if(this!==this.#e)throw Error(`should only call on root`);if(this.#s)return this;this.toString(),this.#s=!0;let e;for(;e=this.#o.pop();){if(e.type!==`!`)continue;let t=e,n=t.#i;for(;n;){for(let r=t.#a+1;!n.type&&r<n.#r.length;r++)for(let t of e.#r){if(typeof t==`string`)throw Error(`string part in extglob AST??`);t.copyIn(n.#r[r])}t=n,n=t.#i}}return this}push(...t){for(let n of t)if(n!==``){if(typeof n!=`string`&&!(n instanceof e&&n.#i===this))throw Error(`invalid part: `+n);this.#r.push(n)}}toJSON(){let e=this.type===null?this.#r.slice().map(e=>typeof e==`string`?e:e.toJSON()):[this.type,...this.#r.map(e=>e.toJSON())];return this.isStart()&&!this.type&&e.unshift([]),this.isEnd()&&(this===this.#e||this.#e.#s&&this.#i?.type===`!`)&&e.push({}),e}isStart(){if(this.#e===this)return!0;if(!this.#i?.isStart())return!1;if(this.#a===0)return!0;let t=this.#i;for(let n=0;n<this.#a;n++){let r=t.#r[n];if(!(r instanceof e&&r.type===`!`))return!1}return!0}isEnd(){if(this.#e===this||this.#i?.type===`!`)return!0;if(!this.#i?.isEnd())return!1;if(!this.type)return this.#i?.isEnd();let e=this.#i?this.#i.#r.length:0;return this.#a===e-1}copyIn(e){typeof e==`string`?this.push(e):this.push(e.clone(this))}clone(t){let n=new e(this.type,t);for(let e of this.#r)n.copyIn(e);return n}static#f(t,n,r,a){let o=!1,s=!1,c=-1,l=!1;if(n.type===null){let u=r,d=``;for(;u<t.length;){let r=t.charAt(u++);if(o||r===`\\`){o=!o,d+=r;continue}if(s){u===c+1?(r===`^`||r===`!`)&&(l=!0):r===`]`&&!(u===c+2&&l)&&(s=!1),d+=r;continue}else if(r===`[`){s=!0,c=u,l=!1,d+=r;continue}if(!a.noext&&i(r)&&t.charAt(u)===`(`){n.push(d),d=``;let i=new e(r,n);u=e.#f(t,i,u,a),n.push(i);continue}d+=r}return n.push(d),u}let u=r+1,d=new e(null,n),f=[],p=``;for(;u<t.length;){let r=t.charAt(u++);if(o||r===`\\`){o=!o,p+=r;continue}if(s){u===c+1?(r===`^`||r===`!`)&&(l=!0):r===`]`&&!(u===c+2&&l)&&(s=!1),p+=r;continue}else if(r===`[`){s=!0,c=u,l=!1,p+=r;continue}if(i(r)&&t.charAt(u)===`(`){d.push(p),p=``;let n=new e(r,d);d.push(n),u=e.#f(t,n,u,a);continue}if(r===`|`){d.push(p),p=``,f.push(d),d=new e(null,n);continue}if(r===`)`)return p===``&&n.#r.length===0&&(n.#u=!0),d.push(p),p=``,n.push(...f,d),u;p+=r}return n.type=null,n.#t=void 0,n.#r=[t.substring(r-1)],u}static fromGlob(t,n={}){let r=new e(null,void 0,n);return e.#f(t,r,0,n),r}toMMPattern(){if(this!==this.#e)return this.#e.toMMPattern();let e=this.toString(),[t,n,r,i]=this.toRegExpSource();if(!(r||this.#t||this.#c.nocase&&!this.#c.nocaseMagicOnly&&e.toUpperCase()!==e.toLowerCase()))return n;let a=(this.#c.nocase?`i`:``)+(i?`u`:``);return Object.assign(RegExp(`^${t}$`,a),{_src:t,_glob:e})}get options(){return this.#c}toRegExpSource(t){let r=t??!!this.#c.dot;if(this.#e===this&&this.#d(),!this.type){let i=this.isStart()&&this.isEnd(),c=this.#r.map(n=>{let[r,a,o,s]=typeof n==`string`?e.#m(n,this.#t,i):n.toRegExpSource(t);return this.#t=this.#t||o,this.#n=this.#n||s,r}).join(``),l=``;if(this.isStart()&&typeof this.#r[0]==`string`&&!(this.#r.length===1&&s.has(this.#r[0]))){let e=o,n=r&&e.has(c.charAt(0))||c.startsWith(`\\.`)&&e.has(c.charAt(2))||c.startsWith(`\\.\\.`)&&e.has(c.charAt(4)),i=!r&&!t&&e.has(c.charAt(0));l=n?`(?!(?:^|/)\\.\\.?(?:$|/))`:i?a:``}let u=``;return this.isEnd()&&this.#e.#s&&this.#i?.type===`!`&&(u=`(?:$|\\/)`),[l+c+u,(0,n.unescape)(c),this.#t=!!this.#t,this.#n]}let i=this.type===`*`||this.type===`+`,c=this.type===`!`?`(?:(?!(?:`:`(?:`,l=this.#p(r);if(this.isStart()&&this.isEnd()&&!l&&this.type!==`!`){let e=this.toString();return this.#r=[e],this.type=null,this.#t=void 0,[e,(0,n.unescape)(this.toString()),!1,!1]}let u=!i||t||r?``:this.#p(!0);u===l&&(u=``),u&&(l=`(?:${l})(?:${u})*?`);let p=``;if(this.type===`!`&&this.#u)p=(this.isStart()&&!r?a:``)+f;else{let e=this.type===`!`?`))`+(this.isStart()&&!r&&!t?a:``)+d+`)`:this.type===`@`?`)`:this.type===`?`?`)?`:this.type===`+`&&u?`)`:this.type===`*`&&u?`)?`:`)${this.type}`;p=c+l+e}return[p,(0,n.unescape)(l),this.#t=!!this.#t,this.#n]}#p(e){return this.#r.map(t=>{if(typeof t==`string`)throw Error(`string type in extglob ast??`);let[n,r,i,a]=t.toRegExpSource(e);return this.#n=this.#n||a,n}).filter(e=>!(this.isStart()&&this.isEnd())||!!e).join(`|`)}static#m(e,r,i=!1){let a=!1,o=``,s=!1;for(let n=0;n<e.length;n++){let p=e.charAt(n);if(a){a=!1,o+=(c.has(p)?`\\`:``)+p;continue}if(p===`\\`){n===e.length-1?o+=`\\\\`:a=!0;continue}if(p===`[`){let[i,a,c,l]=(0,t.parseClass)(e,n);if(c){o+=i,s||=a,n+=c-1,r||=l;continue}}if(p===`*`){i&&e===`*`?o+=f:o+=d,r=!0;continue}if(p===`?`){o+=u,r=!0;continue}o+=l(p)}return[o,(0,n.unescape)(e),!!r,s]}}})),en=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.escape=void 0,e.escape=(e,{windowsPathsNoEscape:t=!1}={})=>t?e.replace(/[?*()[\]]/g,`[$&]`):e.replace(/[?*()[\]\\]/g,`\\$&`)})),tn=e((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0}),e.unescape=e.escape=e.AST=e.Minimatch=e.match=e.makeRe=e.braceExpand=e.defaults=e.filter=e.GLOBSTAR=e.sep=e.minimatch=void 0;let n=t(r()),i=Xt(),a=$t(),o=en(),s=Qt();e.minimatch=(e,t,n={})=>((0,i.assertValidPattern)(t),!n.nocomment&&t.charAt(0)===`#`?!1:new P(t,n).match(e));let c=/^\*+([^+@!?\*\[\(]*)$/,l=e=>t=>!t.startsWith(`.`)&&t.endsWith(e),u=e=>t=>t.endsWith(e),d=e=>(e=e.toLowerCase(),t=>!t.startsWith(`.`)&&t.toLowerCase().endsWith(e)),f=e=>(e=e.toLowerCase(),t=>t.toLowerCase().endsWith(e)),p=/^\*+\.\*+$/,m=e=>!e.startsWith(`.`)&&e.includes(`.`),h=e=>e!==`.`&&e!==`..`&&e.includes(`.`),g=/^\.\*+$/,v=e=>e!==`.`&&e!==`..`&&e.startsWith(`.`),y=/^\*+$/,b=e=>e.length!==0&&!e.startsWith(`.`),x=e=>e.length!==0&&e!==`.`&&e!==`..`,S=/^\?+([^+@!?\*\[\(]*)?$/,C=([e,t=``])=>{let n=D([e]);return t?(t=t.toLowerCase(),e=>n(e)&&e.toLowerCase().endsWith(t)):n},w=([e,t=``])=>{let n=O([e]);return t?(t=t.toLowerCase(),e=>n(e)&&e.toLowerCase().endsWith(t)):n},T=([e,t=``])=>{let n=O([e]);return t?e=>n(e)&&e.endsWith(t):n},E=([e,t=``])=>{let n=D([e]);return t?e=>n(e)&&e.endsWith(t):n},D=([e])=>{let t=e.length;return e=>e.length===t&&!e.startsWith(`.`)},O=([e])=>{let t=e.length;return e=>e.length===t&&e!==`.`&&e!==`..`},k=typeof process==`object`&&process?typeof process.env==`object`&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:`posix`,A={win32:{sep:`\\`},posix:{sep:`/`}};e.sep=k===`win32`?A.win32.sep:A.posix.sep,e.minimatch.sep=e.sep,e.GLOBSTAR=Symbol(`globstar **`),e.minimatch.GLOBSTAR=e.GLOBSTAR,e.filter=(t,n={})=>r=>(0,e.minimatch)(r,t,n),e.minimatch.filter=e.filter;let j=(e,t={})=>Object.assign({},e,t);e.defaults=t=>{if(!t||typeof t!=`object`||!Object.keys(t).length)return e.minimatch;let n=e.minimatch;return Object.assign((e,r,i={})=>n(e,r,j(t,i)),{Minimatch:class extends n.Minimatch{constructor(e,n={}){super(e,j(t,n))}static defaults(e){return n.defaults(j(t,e)).Minimatch}},AST:class extends n.AST{constructor(e,n,r={}){super(e,n,j(t,r))}static fromGlob(e,r={}){return n.AST.fromGlob(e,j(t,r))}},unescape:(e,r={})=>n.unescape(e,j(t,r)),escape:(e,r={})=>n.escape(e,j(t,r)),filter:(e,r={})=>n.filter(e,j(t,r)),defaults:e=>n.defaults(j(t,e)),makeRe:(e,r={})=>n.makeRe(e,j(t,r)),braceExpand:(e,r={})=>n.braceExpand(e,j(t,r)),match:(e,r,i={})=>n.match(e,r,j(t,i)),sep:n.sep,GLOBSTAR:e.GLOBSTAR})},e.minimatch.defaults=e.defaults,e.braceExpand=(e,t={})=>((0,i.assertValidPattern)(e),t.nobrace||!/\{(?:(?!\{).)*\}/.test(e)?[e]:(0,n.default)(e)),e.minimatch.braceExpand=e.braceExpand,e.makeRe=(e,t={})=>new P(e,t).makeRe(),e.minimatch.makeRe=e.makeRe,e.match=(e,t,n={})=>{let r=new P(t,n);return e=e.filter(e=>r.match(e)),r.options.nonull&&!e.length&&e.push(t),e},e.minimatch.match=e.match;let M=/[?*]|[+@!]\(.*?\)|\[|\]/,N=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,`\\$&`);var P=class{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;regexp;constructor(e,t={}){(0,i.assertValidPattern)(e),t||={},this.options=t,this.pattern=e,this.platform=t.platform||k,this.isWindows=this.platform===`win32`,this.windowsPathsNoEscape=!!t.windowsPathsNoEscape||t.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,`/`)),this.preserveMultipleSlashes=!!t.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!t.nonegate,this.comment=!1,this.empty=!1,this.partial=!!t.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=t.windowsNoMagicRoot===void 0?!!(this.isWindows&&this.nocase):t.windowsNoMagicRoot,this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(let e of this.set)for(let t of e)if(typeof t!=`string`)return!0;return!1}debug(...e){}make(){let e=this.pattern,t=this.options;if(!t.nocomment&&e.charAt(0)===`#`){this.comment=!0;return}if(!e){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],t.debug&&(this.debug=(...e)=>console.error(...e)),this.debug(this.pattern,this.globSet);let n=this.globSet.map(e=>this.slashSplit(e));this.globParts=this.preprocess(n),this.debug(this.pattern,this.globParts);let r=this.globParts.map((e,t,n)=>{if(this.isWindows&&this.windowsNoMagicRoot){let t=e[0]===``&&e[1]===``&&(e[2]===`?`||!M.test(e[2]))&&!M.test(e[3]),n=/^[a-z]:/i.test(e[0]);if(t)return[...e.slice(0,4),...e.slice(4).map(e=>this.parse(e))];if(n)return[e[0],...e.slice(1).map(e=>this.parse(e))]}return e.map(e=>this.parse(e))});if(this.debug(this.pattern,r),this.set=r.filter(e=>e.indexOf(!1)===-1),this.isWindows)for(let e=0;e<this.set.length;e++){let t=this.set[e];t[0]===``&&t[1]===``&&this.globParts[e][2]===`?`&&typeof t[3]==`string`&&/^[a-z]:$/i.test(t[3])&&(t[2]=`?`)}this.debug(this.pattern,this.set)}preprocess(e){if(this.options.noglobstar)for(let t=0;t<e.length;t++)for(let n=0;n<e[t].length;n++)e[t][n]===`**`&&(e[t][n]=`*`);let{optimizationLevel:t=1}=this.options;return t>=2?(e=this.firstPhasePreProcess(e),e=this.secondPhasePreProcess(e)):e=t>=1?this.levelOneOptimize(e):this.adjascentGlobstarOptimize(e),e}adjascentGlobstarOptimize(e){return e.map(e=>{let t=-1;for(;(t=e.indexOf(`**`,t+1))!==-1;){let n=t;for(;e[n+1]===`**`;)n++;n!==t&&e.splice(t,n-t)}return e})}levelOneOptimize(e){return e.map(e=>(e=e.reduce((e,t)=>{let n=e[e.length-1];return t===`**`&&n===`**`?e:t===`..`&&n&&n!==`..`&&n!==`.`&&n!==`**`?(e.pop(),e):(e.push(t),e)},[]),e.length===0?[``]:e))}levelTwoFileOptimize(e){Array.isArray(e)||(e=this.slashSplit(e));let t=!1;do{if(t=!1,!this.preserveMultipleSlashes){for(let n=1;n<e.length-1;n++){let r=e[n];n===1&&r===``&&e[0]===``||(r===`.`||r===``)&&(t=!0,e.splice(n,1),n--)}e[0]===`.`&&e.length===2&&(e[1]===`.`||e[1]===``)&&(t=!0,e.pop())}let n=0;for(;(n=e.indexOf(`..`,n+1))!==-1;){let r=e[n-1];r&&r!==`.`&&r!==`..`&&r!==`**`&&(t=!0,e.splice(n-1,2),n-=2)}}while(t);return e.length===0?[``]:e}firstPhasePreProcess(e){let t=!1;do{t=!1;for(let n of e){let r=-1;for(;(r=n.indexOf(`**`,r+1))!==-1;){let i=r;for(;n[i+1]===`**`;)i++;i>r&&n.splice(r+1,i-r);let a=n[r+1],o=n[r+2],s=n[r+3];if(a!==`..`||!o||o===`.`||o===`..`||!s||s===`.`||s===`..`)continue;t=!0,n.splice(r,1);let c=n.slice(0);c[r]=`**`,e.push(c),r--}if(!this.preserveMultipleSlashes){for(let e=1;e<n.length-1;e++){let r=n[e];e===1&&r===``&&n[0]===``||(r===`.`||r===``)&&(t=!0,n.splice(e,1),e--)}n[0]===`.`&&n.length===2&&(n[1]===`.`||n[1]===``)&&(t=!0,n.pop())}let i=0;for(;(i=n.indexOf(`..`,i+1))!==-1;){let e=n[i-1];if(e&&e!==`.`&&e!==`..`&&e!==`**`){t=!0;let e=i===1&&n[i+1]===`**`?[`.`]:[];n.splice(i-1,2,...e),n.length===0&&n.push(``),i-=2}}}}while(t);return e}secondPhasePreProcess(e){for(let t=0;t<e.length-1;t++)for(let n=t+1;n<e.length;n++){let r=this.partsMatch(e[t],e[n],!this.preserveMultipleSlashes);if(r){e[t]=[],e[n]=r;break}}return e.filter(e=>e.length)}partsMatch(e,t,n=!1){let r=0,i=0,a=[],o=``;for(;r<e.length&&i<t.length;)if(e[r]===t[i])a.push(o===`b`?t[i]:e[r]),r++,i++;else if(n&&e[r]===`**`&&t[i]===e[r+1])a.push(e[r]),r++;else if(n&&t[i]===`**`&&e[r]===t[i+1])a.push(t[i]),i++;else if(e[r]===`*`&&t[i]&&(this.options.dot||!t[i].startsWith(`.`))&&t[i]!==`**`){if(o===`b`)return!1;o=`a`,a.push(e[r]),r++,i++}else if(t[i]===`*`&&e[r]&&(this.options.dot||!e[r].startsWith(`.`))&&e[r]!==`**`){if(o===`a`)return!1;o=`b`,a.push(t[i]),r++,i++}else return!1;return e.length===t.length&&a}parseNegate(){if(this.nonegate)return;let e=this.pattern,t=!1,n=0;for(let r=0;r<e.length&&e.charAt(r)===`!`;r++)t=!t,n++;n&&(this.pattern=e.slice(n)),this.negate=t}matchOne(t,n,r=!1){let i=this.options;if(this.isWindows){let e=typeof t[0]==`string`&&/^[a-z]:$/i.test(t[0]),r=!e&&t[0]===``&&t[1]===``&&t[2]===`?`&&/^[a-z]:$/i.test(t[3]),i=typeof n[0]==`string`&&/^[a-z]:$/i.test(n[0]),a=!i&&n[0]===``&&n[1]===``&&n[2]===`?`&&typeof n[3]==`string`&&/^[a-z]:$/i.test(n[3]),o=r?3:e?0:void 0,s=a?3:i?0:void 0;if(typeof o==`number`&&typeof s==`number`){let[e,r]=[t[o],n[s]];e.toLowerCase()===r.toLowerCase()&&(n[s]=e,s>o?n=n.slice(s):o>s&&(t=t.slice(o)))}}let{optimizationLevel:a=1}=this.options;a>=2&&(t=this.levelTwoFileOptimize(t)),this.debug(`matchOne`,this,{file:t,pattern:n}),this.debug(`matchOne`,t.length,n.length);for(var o=0,s=0,c=t.length,l=n.length;o<c&&s<l;o++,s++){this.debug(`matchOne loop`);var u=n[s],d=t[o];if(this.debug(n,u,d),u===!1)return!1;if(u===e.GLOBSTAR){this.debug(`GLOBSTAR`,[n,u,d]);var f=o,p=s+1;if(p===l){for(this.debug(`** at the end`);o<c;o++)if(t[o]===`.`||t[o]===`..`||!i.dot&&t[o].charAt(0)===`.`)return!1;return!0}for(;f<c;){var m=t[f];if(this.debug(`
|
|
18
18
|
globstar while`,t,f,n,p,m),this.matchOne(t.slice(f),n.slice(p),r))return this.debug(`globstar found match!`,f,c,m),!0;if(m===`.`||m===`..`||!i.dot&&m.charAt(0)===`.`){this.debug(`dot detected!`,t,f,n,p);break}this.debug(`globstar swallow a segment, and continue`),f++}return!!(r&&(this.debug(`
|
|
19
|
-
>>> no match, partial?`,t,f,n,p),f===c))}let a;if(typeof u==`string`?(a=d===u,this.debug(`string match`,u,d,a)):(a=u.test(d),this.debug(`pattern match`,u,d,a)),!a)return!1}if(o===c&&s===l)return!0;if(o===c)return r;if(s===l)return o===c-1&&t[o]===``;throw Error(`wtf?`)}braceExpand(){return(0,e.braceExpand)(this.pattern,this.options)}parse(t){(0,i.assertValidPattern)(t);let n=this.options;if(t===`**`)return e.GLOBSTAR;if(t===``)return``;let r,o=null;(r=t.match(y))?o=n.dot?x:b:(r=t.match(c))?o=(n.nocase?n.dot?f:d:n.dot?u:l)(r[1]):(r=t.match(S))?o=(n.nocase?n.dot?w:C:n.dot?T:E)(r):(r=t.match(p))?o=n.dot?h:m:(r=t.match(g))&&(o=v);let s=a.AST.fromGlob(t,this.options).toMMPattern();return o&&typeof s==`object`&&Reflect.defineProperty(s,`test`,{value:o}),s}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let t=this.set;if(!t.length)return this.regexp=!1,this.regexp;let n=this.options,r=n.noglobstar?`[^/]*?`:n.dot?`(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?`:`(?:(?!(?:\\/|^)\\.).)*?`,i=new Set(n.nocase?[`i`]:[]),a=t.map(t=>{let n=t.map(t=>{if(t instanceof RegExp)for(let e of t.flags.split(``))i.add(e);return typeof t==`string`?N(t):t===e.GLOBSTAR?e.GLOBSTAR:t._src});return n.forEach((t,i)=>{let a=n[i+1],o=n[i-1];t!==e.GLOBSTAR||o===e.GLOBSTAR||(o===void 0?a!==void 0&&a!==e.GLOBSTAR?n[i+1]=`(?:\\/|`+r+`\\/)?`+a:n[i]=r:a===void 0?n[i-1]=o+`(?:\\/|`+r+`)?`:a!==e.GLOBSTAR&&(n[i-1]=o+`(?:\\/|\\/`+r+`\\/)`+a,n[i+1]=e.GLOBSTAR))}),n.filter(t=>t!==e.GLOBSTAR).join(`/`)}).join(`|`),[o,s]=t.length>1?[`(?:`,`)`]:[``,``];a=`^`+o+a+s+`$`,this.negate&&(a=`^(?!`+a+`).+$`);try{this.regexp=new RegExp(a,[...i].join(``))}catch{this.regexp=!1}return this.regexp}slashSplit(e){return this.preserveMultipleSlashes?e.split(`/`):this.isWindows&&/^\/\/[^\/]+/.test(e)?[``,...e.split(/\/+/)]:e.split(/\/+/)}match(e,t=this.partial){if(this.debug(`match`,e,this.pattern),this.comment)return!1;if(this.empty)return e===``;if(e===`/`&&t)return!0;let n=this.options;this.isWindows&&(e=e.split(`\\`).join(`/`));let r=this.slashSplit(e);this.debug(this.pattern,`split`,r);let i=this.set;this.debug(this.pattern,`set`,i);let a=r[r.length-1];if(!a)for(let e=r.length-2;!a&&e>=0;e--)a=r[e];for(let e=0;e<i.length;e++){let o=i[e],s=r;if(n.matchBase&&o.length===1&&(s=[a]),this.matchOne(s,o,t))return n.flipNegate?!0:!this.negate}return n.flipNegate?!1:this.negate}static defaults(t){return e.minimatch.defaults(t).Minimatch}};e.Minimatch=P;var F=$t();Object.defineProperty(e,`AST`,{enumerable:!0,get:function(){return F.AST}});var I=en();Object.defineProperty(e,`escape`,{enumerable:!0,get:function(){return I.escape}});var L=Qt();Object.defineProperty(e,`unescape`,{enumerable:!0,get:function(){return L.unescape}}),e.minimatch.AST=a.AST,e.minimatch.Minimatch=P,e.minimatch.escape=o.escape,e.minimatch.unescape=s.unescape})),nn=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.LRUCache=void 0;let t=typeof performance==`object`&&performance&&typeof performance.now==`function`?performance:Date,n=new Set,r=typeof process==`object`&&process?process:{},i=(e,t,n,i)=>{typeof r.emitWarning==`function`?r.emitWarning(e,t,n,i):console.error(`[${n}] ${t}: ${e}`)},a=globalThis.AbortController,o=globalThis.AbortSignal;if(a===void 0){o=class{onabort;_onabort=[];reason;aborted=!1;addEventListener(e,t){this._onabort.push(t)}},a=class{constructor(){t()}signal=new o;abort(e){if(!this.signal.aborted){this.signal.reason=e,this.signal.aborted=!0;for(let t of this.signal._onabort)t(e);this.signal.onabort?.(e)}}};let e=r.env?.LRU_CACHE_IGNORE_AC_WARNING!==`1`,t=()=>{e&&(e=!1,i("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.",`NO_ABORT_CONTROLLER`,`ENOTSUP`,t))}}let s=e=>!n.has(e),c=e=>e&&e===Math.floor(e)&&e>0&&isFinite(e),l=e=>c(e)?e<=2**8?Uint8Array:e<=2**16?Uint16Array:e<=2**32?Uint32Array:e<=2**53-1?u:null:null;var u=class extends Array{constructor(e){super(e),this.fill(0)}},d=class e{heap;length;static#e=!1;static create(t){let n=l(t);if(!n)return[];e.#e=!0;let r=new e(t,n);return e.#e=!1,r}constructor(t,n){if(!e.#e)throw TypeError(`instantiate Stack using Stack.create(n)`);this.heap=new n(t),this.length=0}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}};e.LRUCache=class e{#e;#t;#n;#r;#i;#a;ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#o;#s;#c;#l;#u;#d;#f;#p;#m;#h;#g;#_;#v;#y;#b;#x;#S;static unsafeExposeInternals(e){return{starts:e.#v,ttls:e.#y,sizes:e.#_,keyMap:e.#c,keyList:e.#l,valList:e.#u,next:e.#d,prev:e.#f,get head(){return e.#p},get tail(){return e.#m},free:e.#h,isBackgroundFetch:t=>e.#L(t),backgroundFetch:(t,n,r,i)=>e.#I(t,n,r,i),moveToTail:t=>e.#z(t),indexes:t=>e.#M(t),rindexes:t=>e.#N(t),isStale:t=>e.#D(t)}}get max(){return this.#e}get maxSize(){return this.#t}get calculatedSize(){return this.#s}get size(){return this.#o}get fetchMethod(){return this.#i}get memoMethod(){return this.#a}get dispose(){return this.#n}get disposeAfter(){return this.#r}constructor(t){let{max:r=0,ttl:a,ttlResolution:o=1,ttlAutopurge:u,updateAgeOnGet:f,updateAgeOnHas:p,allowStale:m,dispose:h,disposeAfter:g,noDisposeOnSet:v,noUpdateTTL:y,maxSize:b=0,maxEntrySize:x=0,sizeCalculation:S,fetchMethod:C,memoMethod:w,noDeleteOnFetchRejection:T,noDeleteOnStaleGet:E,allowStaleOnFetchRejection:D,allowStaleOnFetchAbort:O,ignoreFetchAbort:k}=t;if(r!==0&&!c(r))throw TypeError(`max option must be a nonnegative integer`);let A=r?l(r):Array;if(!A)throw Error(`invalid max value: `+r);if(this.#e=r,this.#t=b,this.maxEntrySize=x||this.#t,this.sizeCalculation=S,this.sizeCalculation){if(!this.#t&&!this.maxEntrySize)throw TypeError(`cannot set sizeCalculation without setting maxSize or maxEntrySize`);if(typeof this.sizeCalculation!=`function`)throw TypeError(`sizeCalculation set to non-function`)}if(w!==void 0&&typeof w!=`function`)throw TypeError(`memoMethod must be a function if defined`);if(this.#a=w,C!==void 0&&typeof C!=`function`)throw TypeError(`fetchMethod must be a function if specified`);if(this.#i=C,this.#x=!!C,this.#c=new Map,this.#l=Array(r).fill(void 0),this.#u=Array(r).fill(void 0),this.#d=new A(r),this.#f=new A(r),this.#p=0,this.#m=0,this.#h=d.create(r),this.#o=0,this.#s=0,typeof h==`function`&&(this.#n=h),typeof g==`function`?(this.#r=g,this.#g=[]):(this.#r=void 0,this.#g=void 0),this.#b=!!this.#n,this.#S=!!this.#r,this.noDisposeOnSet=!!v,this.noUpdateTTL=!!y,this.noDeleteOnFetchRejection=!!T,this.allowStaleOnFetchRejection=!!D,this.allowStaleOnFetchAbort=!!O,this.ignoreFetchAbort=!!k,this.maxEntrySize!==0){if(this.#t!==0&&!c(this.#t))throw TypeError(`maxSize must be a positive integer if specified`);if(!c(this.maxEntrySize))throw TypeError(`maxEntrySize must be a positive integer if specified`);this.#O()}if(this.allowStale=!!m,this.noDeleteOnStaleGet=!!E,this.updateAgeOnGet=!!f,this.updateAgeOnHas=!!p,this.ttlResolution=c(o)||o===0?o:1,this.ttlAutopurge=!!u,this.ttl=a||0,this.ttl){if(!c(this.ttl))throw TypeError(`ttl must be a positive integer if specified`);this.#C()}if(this.#e===0&&this.ttl===0&&this.#t===0)throw TypeError(`At least one of max, maxSize, or ttl is required`);if(!this.ttlAutopurge&&!this.#e&&!this.#t){let t=`LRU_CACHE_UNBOUNDED`;s(t)&&(n.add(t),i(`TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.`,`UnboundedCacheWarning`,t,e))}}getRemainingTTL(e){return this.#c.has(e)?1/0:0}#C(){let e=new u(this.#e),n=new u(this.#e);this.#y=e,this.#v=n,this.#E=(r,i,a=t.now())=>{if(n[r]=i===0?0:a,e[r]=i,i!==0&&this.ttlAutopurge){let e=setTimeout(()=>{this.#D(r)&&this.#B(this.#l[r],`expire`)},i+1);e.unref&&e.unref()}},this.#w=r=>{n[r]=e[r]===0?0:t.now()},this.#T=(t,a)=>{if(e[a]){let o=e[a],s=n[a];if(!o||!s)return;t.ttl=o,t.start=s,t.now=r||i(),t.remainingTTL=o-(t.now-s)}};let r=0,i=()=>{let e=t.now();if(this.ttlResolution>0){r=e;let t=setTimeout(()=>r=0,this.ttlResolution);t.unref&&t.unref()}return e};this.getRemainingTTL=t=>{let a=this.#c.get(t);if(a===void 0)return 0;let o=e[a],s=n[a];return!o||!s?1/0:o-((r||i())-s)},this.#D=t=>{let a=n[t],o=e[t];return!!o&&!!a&&(r||i())-a>o}}#w=()=>{};#T=()=>{};#E=()=>{};#D=()=>!1;#O(){let e=new u(this.#e);this.#s=0,this.#_=e,this.#k=t=>{this.#s-=e[t],e[t]=0},this.#j=(e,t,n,r)=>{if(this.#L(t))return 0;if(!c(n))if(r){if(typeof r!=`function`)throw TypeError(`sizeCalculation must be a function`);if(n=r(t,e),!c(n))throw TypeError(`sizeCalculation return invalid (expect positive integer)`)}else throw TypeError(`invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.`);return n},this.#A=(t,n,r)=>{if(e[t]=n,this.#t){let n=this.#t-e[t];for(;this.#s>n;)this.#F(!0)}this.#s+=e[t],r&&(r.entrySize=n,r.totalCalculatedSize=this.#s)}}#k=e=>{};#A=(e,t,n)=>{};#j=(e,t,n,r)=>{if(n||r)throw TypeError(`cannot set size without setting maxSize or maxEntrySize on cache`);return 0};*#M({allowStale:e=this.allowStale}={}){if(this.#o)for(let t=this.#m;!(!this.#P(t)||((e||!this.#D(t))&&(yield t),t===this.#p));)t=this.#f[t]}*#N({allowStale:e=this.allowStale}={}){if(this.#o)for(let t=this.#p;!(!this.#P(t)||((e||!this.#D(t))&&(yield t),t===this.#m));)t=this.#d[t]}#P(e){return e!==void 0&&this.#c.get(this.#l[e])===e}*entries(){for(let e of this.#M())this.#u[e]!==void 0&&this.#l[e]!==void 0&&!this.#L(this.#u[e])&&(yield[this.#l[e],this.#u[e]])}*rentries(){for(let e of this.#N())this.#u[e]!==void 0&&this.#l[e]!==void 0&&!this.#L(this.#u[e])&&(yield[this.#l[e],this.#u[e]])}*keys(){for(let e of this.#M()){let t=this.#l[e];t!==void 0&&!this.#L(this.#u[e])&&(yield t)}}*rkeys(){for(let e of this.#N()){let t=this.#l[e];t!==void 0&&!this.#L(this.#u[e])&&(yield t)}}*values(){for(let e of this.#M())this.#u[e]!==void 0&&!this.#L(this.#u[e])&&(yield this.#u[e])}*rvalues(){for(let e of this.#N())this.#u[e]!==void 0&&!this.#L(this.#u[e])&&(yield this.#u[e])}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]=`LRUCache`;find(e,t={}){for(let n of this.#M()){let r=this.#u[n],i=this.#L(r)?r.__staleWhileFetching:r;if(i!==void 0&&e(i,this.#l[n],this))return this.get(this.#l[n],t)}}forEach(e,t=this){for(let n of this.#M()){let r=this.#u[n],i=this.#L(r)?r.__staleWhileFetching:r;i!==void 0&&e.call(t,i,this.#l[n],this)}}rforEach(e,t=this){for(let n of this.#N()){let r=this.#u[n],i=this.#L(r)?r.__staleWhileFetching:r;i!==void 0&&e.call(t,i,this.#l[n],this)}}purgeStale(){let e=!1;for(let t of this.#N({allowStale:!0}))this.#D(t)&&(this.#B(this.#l[t],`expire`),e=!0);return e}info(e){let n=this.#c.get(e);if(n===void 0)return;let r=this.#u[n],i=this.#L(r)?r.__staleWhileFetching:r;if(i===void 0)return;let a={value:i};if(this.#y&&this.#v){let e=this.#y[n],r=this.#v[n];e&&r&&(a.ttl=e-(t.now()-r),a.start=Date.now())}return this.#_&&(a.size=this.#_[n]),a}dump(){let e=[];for(let n of this.#M({allowStale:!0})){let r=this.#l[n],i=this.#u[n],a=this.#L(i)?i.__staleWhileFetching:i;if(a===void 0||r===void 0)continue;let o={value:a};if(this.#y&&this.#v){o.ttl=this.#y[n];let e=t.now()-this.#v[n];o.start=Math.floor(Date.now()-e)}this.#_&&(o.size=this.#_[n]),e.unshift([r,o])}return e}load(e){this.clear();for(let[n,r]of e){if(r.start){let e=Date.now()-r.start;r.start=t.now()-e}this.set(n,r.value,r)}}set(e,t,n={}){if(t===void 0)return this.delete(e),this;let{ttl:r=this.ttl,start:i,noDisposeOnSet:a=this.noDisposeOnSet,sizeCalculation:o=this.sizeCalculation,status:s}=n,{noUpdateTTL:c=this.noUpdateTTL}=n,l=this.#j(e,t,n.size||0,o);if(this.maxEntrySize&&l>this.maxEntrySize)return s&&(s.set=`miss`,s.maxEntrySizeExceeded=!0),this.#B(e,`set`),this;let u=this.#o===0?void 0:this.#c.get(e);if(u===void 0)u=this.#o===0?this.#m:this.#h.length===0?this.#o===this.#e?this.#F(!1):this.#o:this.#h.pop(),this.#l[u]=e,this.#u[u]=t,this.#c.set(e,u),this.#d[this.#m]=u,this.#f[u]=this.#m,this.#m=u,this.#o++,this.#A(u,l,s),s&&(s.set=`add`),c=!1;else{this.#z(u);let n=this.#u[u];if(t!==n){if(this.#x&&this.#L(n)){n.__abortController.abort(Error(`replaced`));let{__staleWhileFetching:t}=n;t!==void 0&&!a&&(this.#b&&this.#n?.(t,e,`set`),this.#S&&this.#g?.push([t,e,`set`]))}else a||(this.#b&&this.#n?.(n,e,`set`),this.#S&&this.#g?.push([n,e,`set`]));if(this.#k(u),this.#A(u,l,s),this.#u[u]=t,s){s.set=`replace`;let e=n&&this.#L(n)?n.__staleWhileFetching:n;e!==void 0&&(s.oldValue=e)}}else s&&(s.set=`update`)}if(r!==0&&!this.#y&&this.#C(),this.#y&&(c||this.#E(u,r,i),s&&this.#T(s,u)),!a&&this.#S&&this.#g){let e=this.#g,t;for(;t=e?.shift();)this.#r?.(...t)}return this}pop(){try{for(;this.#o;){let e=this.#u[this.#p];if(this.#F(!0),this.#L(e)){if(e.__staleWhileFetching)return e.__staleWhileFetching}else if(e!==void 0)return e}}finally{if(this.#S&&this.#g){let e=this.#g,t;for(;t=e?.shift();)this.#r?.(...t)}}}#F(e){let t=this.#p,n=this.#l[t],r=this.#u[t];return this.#x&&this.#L(r)?r.__abortController.abort(Error(`evicted`)):(this.#b||this.#S)&&(this.#b&&this.#n?.(r,n,`evict`),this.#S&&this.#g?.push([r,n,`evict`])),this.#k(t),e&&(this.#l[t]=void 0,this.#u[t]=void 0,this.#h.push(t)),this.#o===1?(this.#p=this.#m=0,this.#h.length=0):this.#p=this.#d[t],this.#c.delete(n),this.#o--,t}has(e,t={}){let{updateAgeOnHas:n=this.updateAgeOnHas,status:r}=t,i=this.#c.get(e);if(i!==void 0){let e=this.#u[i];if(this.#L(e)&&e.__staleWhileFetching===void 0)return!1;if(this.#D(i))r&&(r.has=`stale`,this.#T(r,i));else return n&&this.#w(i),r&&(r.has=`hit`,this.#T(r,i)),!0}else r&&(r.has=`miss`);return!1}peek(e,t={}){let{allowStale:n=this.allowStale}=t,r=this.#c.get(e);if(r===void 0||!n&&this.#D(r))return;let i=this.#u[r];return this.#L(i)?i.__staleWhileFetching:i}#I(e,t,n,r){let i=t===void 0?void 0:this.#u[t];if(this.#L(i))return i;let o=new a,{signal:s}=n;s?.addEventListener(`abort`,()=>o.abort(s.reason),{signal:o.signal});let c={signal:o.signal,options:n,context:r},l=(r,i=!1)=>{let{aborted:a}=o.signal,s=n.ignoreFetchAbort&&r!==void 0;if(n.status&&(a&&!i?(n.status.fetchAborted=!0,n.status.fetchError=o.signal.reason,s&&(n.status.fetchAbortIgnored=!0)):n.status.fetchResolved=!0),a&&!s&&!i)return d(o.signal.reason);let l=p;return this.#u[t]===p&&(r===void 0?l.__staleWhileFetching?this.#u[t]=l.__staleWhileFetching:this.#B(e,`fetch`):(n.status&&(n.status.fetchUpdated=!0),this.set(e,r,c.options))),r},u=e=>(n.status&&(n.status.fetchRejected=!0,n.status.fetchError=e),d(e)),d=r=>{let{aborted:i}=o.signal,a=i&&n.allowStaleOnFetchAbort,s=a||n.allowStaleOnFetchRejection,c=s||n.noDeleteOnFetchRejection,l=p;if(this.#u[t]===p&&(!c||l.__staleWhileFetching===void 0?this.#B(e,`fetch`):a||(this.#u[t]=l.__staleWhileFetching)),s)return n.status&&l.__staleWhileFetching!==void 0&&(n.status.returnedStale=!0),l.__staleWhileFetching;if(l.__returned===l)throw r},f=(t,r)=>{let a=this.#i?.(e,i,c);a&&a instanceof Promise&&a.then(e=>t(e===void 0?void 0:e),r),o.signal.addEventListener(`abort`,()=>{(!n.ignoreFetchAbort||n.allowStaleOnFetchAbort)&&(t(void 0),n.allowStaleOnFetchAbort&&(t=e=>l(e,!0)))})};n.status&&(n.status.fetchDispatched=!0);let p=new Promise(f).then(l,u),m=Object.assign(p,{__abortController:o,__staleWhileFetching:i,__returned:void 0});return t===void 0?(this.set(e,m,{...c.options,status:void 0}),t=this.#c.get(e)):this.#u[t]=m,m}#L(e){if(!this.#x)return!1;let t=e;return!!t&&t instanceof Promise&&t.hasOwnProperty(`__staleWhileFetching`)&&t.__abortController instanceof a}async fetch(e,t={}){let{allowStale:n=this.allowStale,updateAgeOnGet:r=this.updateAgeOnGet,noDeleteOnStaleGet:i=this.noDeleteOnStaleGet,ttl:a=this.ttl,noDisposeOnSet:o=this.noDisposeOnSet,size:s=0,sizeCalculation:c=this.sizeCalculation,noUpdateTTL:l=this.noUpdateTTL,noDeleteOnFetchRejection:u=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:d=this.allowStaleOnFetchRejection,ignoreFetchAbort:f=this.ignoreFetchAbort,allowStaleOnFetchAbort:p=this.allowStaleOnFetchAbort,context:m,forceRefresh:h=!1,status:g,signal:v}=t;if(!this.#x)return g&&(g.fetch=`get`),this.get(e,{allowStale:n,updateAgeOnGet:r,noDeleteOnStaleGet:i,status:g});let y={allowStale:n,updateAgeOnGet:r,noDeleteOnStaleGet:i,ttl:a,noDisposeOnSet:o,size:s,sizeCalculation:c,noUpdateTTL:l,noDeleteOnFetchRejection:u,allowStaleOnFetchRejection:d,allowStaleOnFetchAbort:p,ignoreFetchAbort:f,status:g,signal:v},b=this.#c.get(e);if(b===void 0){g&&(g.fetch=`miss`);let t=this.#I(e,b,y,m);return t.__returned=t}else{let t=this.#u[b];if(this.#L(t)){let e=n&&t.__staleWhileFetching!==void 0;return g&&(g.fetch=`inflight`,e&&(g.returnedStale=!0)),e?t.__staleWhileFetching:t.__returned=t}let i=this.#D(b);if(!h&&!i)return g&&(g.fetch=`hit`),this.#z(b),r&&this.#w(b),g&&this.#T(g,b),t;let a=this.#I(e,b,y,m),o=a.__staleWhileFetching!==void 0&&n;return g&&(g.fetch=i?`stale`:`refresh`,o&&i&&(g.returnedStale=!0)),o?a.__staleWhileFetching:a.__returned=a}}async forceFetch(e,t={}){let n=await this.fetch(e,t);if(n===void 0)throw Error(`fetch() returned undefined`);return n}memo(e,t={}){let n=this.#a;if(!n)throw Error(`no memoMethod provided to constructor`);let{context:r,forceRefresh:i,...a}=t,o=this.get(e,a);if(!i&&o!==void 0)return o;let s=n(e,o,{options:a,context:r});return this.set(e,s,a),s}get(e,t={}){let{allowStale:n=this.allowStale,updateAgeOnGet:r=this.updateAgeOnGet,noDeleteOnStaleGet:i=this.noDeleteOnStaleGet,status:a}=t,o=this.#c.get(e);if(o!==void 0){let t=this.#u[o],s=this.#L(t);return a&&this.#T(a,o),this.#D(o)?(a&&(a.get=`stale`),s?(a&&n&&t.__staleWhileFetching!==void 0&&(a.returnedStale=!0),n?t.__staleWhileFetching:void 0):(i||this.#B(e,`expire`),a&&n&&(a.returnedStale=!0),n?t:void 0)):(a&&(a.get=`hit`),s?t.__staleWhileFetching:(this.#z(o),r&&this.#w(o),t))}else a&&(a.get=`miss`)}#R(e,t){this.#f[t]=e,this.#d[e]=t}#z(e){e!==this.#m&&(e===this.#p?this.#p=this.#d[e]:this.#R(this.#f[e],this.#d[e]),this.#R(this.#m,e),this.#m=e)}delete(e){return this.#B(e,`delete`)}#B(e,t){let n=!1;if(this.#o!==0){let r=this.#c.get(e);if(r!==void 0)if(n=!0,this.#o===1)this.#V(t);else{this.#k(r);let n=this.#u[r];if(this.#L(n)?n.__abortController.abort(Error(`deleted`)):(this.#b||this.#S)&&(this.#b&&this.#n?.(n,e,t),this.#S&&this.#g?.push([n,e,t])),this.#c.delete(e),this.#l[r]=void 0,this.#u[r]=void 0,r===this.#m)this.#m=this.#f[r];else if(r===this.#p)this.#p=this.#d[r];else{let e=this.#f[r];this.#d[e]=this.#d[r];let t=this.#d[r];this.#f[t]=this.#f[r]}this.#o--,this.#h.push(r)}}if(this.#S&&this.#g?.length){let e=this.#g,t;for(;t=e?.shift();)this.#r?.(...t)}return n}clear(){return this.#V(`delete`)}#V(e){for(let t of this.#N({allowStale:!0})){let n=this.#u[t];if(this.#L(n))n.__abortController.abort(Error(`deleted`));else{let r=this.#l[t];this.#b&&this.#n?.(n,r,e),this.#S&&this.#g?.push([n,r,e])}}if(this.#c.clear(),this.#u.fill(void 0),this.#l.fill(void 0),this.#y&&this.#v&&(this.#y.fill(0),this.#v.fill(0)),this.#_&&this.#_.fill(0),this.#p=0,this.#m=0,this.#h.length=0,this.#s=0,this.#o=0,this.#S&&this.#g){let e=this.#g,t;for(;t=e?.shift();)this.#r?.(...t)}}}})),rn=e((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0}),e.Minipass=e.isWritable=e.isReadable=e.isStream=void 0;let n=typeof process==`object`&&process?process:{stdout:null,stderr:null},r=require(`node:events`),i=t(require(`node:stream`)),a=require(`node:string_decoder`);e.isStream=t=>!!t&&typeof t==`object`&&(t instanceof q||t instanceof i.default||(0,e.isReadable)(t)||(0,e.isWritable)(t)),e.isReadable=e=>!!e&&typeof e==`object`&&e instanceof r.EventEmitter&&typeof e.pipe==`function`&&e.pipe!==i.default.Writable.prototype.pipe,e.isWritable=e=>!!e&&typeof e==`object`&&e instanceof r.EventEmitter&&typeof e.write==`function`&&typeof e.end==`function`;let o=Symbol(`EOF`),s=Symbol(`maybeEmitEnd`),c=Symbol(`emittedEnd`),l=Symbol(`emittingEnd`),u=Symbol(`emittedError`),d=Symbol(`closed`),f=Symbol(`read`),p=Symbol(`flush`),m=Symbol(`flushChunk`),h=Symbol(`encoding`),g=Symbol(`decoder`),v=Symbol(`flowing`),y=Symbol(`paused`),b=Symbol(`resume`),x=Symbol(`buffer`),S=Symbol(`pipes`),C=Symbol(`bufferLength`),w=Symbol(`bufferPush`),T=Symbol(`bufferShift`),E=Symbol(`objectMode`),D=Symbol(`destroyed`),O=Symbol(`error`),k=Symbol(`emitData`),A=Symbol(`emitEnd`),j=Symbol(`emitEnd2`),M=Symbol(`async`),N=Symbol(`abort`),P=Symbol(`aborted`),F=Symbol(`signal`),I=Symbol(`dataListeners`),L=Symbol(`discarded`),R=e=>Promise.resolve().then(e),z=e=>e(),B=e=>e===`end`||e===`finish`||e===`prefinish`,V=e=>e instanceof ArrayBuffer||!!e&&typeof e==`object`&&e.constructor&&e.constructor.name===`ArrayBuffer`&&e.byteLength>=0,H=e=>!Buffer.isBuffer(e)&&ArrayBuffer.isView(e);var U=class{src;dest;opts;ondrain;constructor(e,t,n){this.src=e,this.dest=t,this.opts=n,this.ondrain=()=>e[b](),this.dest.on(`drain`,this.ondrain)}unpipe(){this.dest.removeListener(`drain`,this.ondrain)}proxyErrors(e){}end(){this.unpipe(),this.opts.end&&this.dest.end()}},W=class extends U{unpipe(){this.src.removeListener(`error`,this.proxyErrors),super.unpipe()}constructor(e,t,n){super(e,t,n),this.proxyErrors=e=>t.emit(`error`,e),e.on(`error`,this.proxyErrors)}};let G=e=>!!e.objectMode,K=e=>!e.objectMode&&!!e.encoding&&e.encoding!==`buffer`;var q=class extends r.EventEmitter{[v]=!1;[y]=!1;[S]=[];[x]=[];[E];[h];[M];[g];[o]=!1;[c]=!1;[l]=!1;[d]=!1;[u]=null;[C]=0;[D]=!1;[F];[P]=!1;[I]=0;[L]=!1;writable=!0;readable=!0;constructor(...e){let t=e[0]||{};if(super(),t.objectMode&&typeof t.encoding==`string`)throw TypeError(`Encoding and objectMode may not be used together`);G(t)?(this[E]=!0,this[h]=null):K(t)?(this[h]=t.encoding,this[E]=!1):(this[E]=!1,this[h]=null),this[M]=!!t.async,this[g]=this[h]?new a.StringDecoder(this[h]):null,t&&t.debugExposeBuffer===!0&&Object.defineProperty(this,`buffer`,{get:()=>this[x]}),t&&t.debugExposePipes===!0&&Object.defineProperty(this,`pipes`,{get:()=>this[S]});let{signal:n}=t;n&&(this[F]=n,n.aborted?this[N]():n.addEventListener(`abort`,()=>this[N]()))}get bufferLength(){return this[C]}get encoding(){return this[h]}set encoding(e){throw Error(`Encoding must be set at instantiation time`)}setEncoding(e){throw Error(`Encoding must be set at instantiation time`)}get objectMode(){return this[E]}set objectMode(e){throw Error(`objectMode must be set at instantiation time`)}get async(){return this[M]}set async(e){this[M]=this[M]||!!e}[N](){this[P]=!0,this.emit(`abort`,this[F]?.reason),this.destroy(this[F]?.reason)}get aborted(){return this[P]}set aborted(e){}write(e,t,n){if(this[P])return!1;if(this[o])throw Error(`write after end`);if(this[D])return this.emit(`error`,Object.assign(Error(`Cannot call write after a stream was destroyed`),{code:`ERR_STREAM_DESTROYED`})),!0;typeof t==`function`&&(n=t,t=`utf8`),t||=`utf8`;let r=this[M]?R:z;if(!this[E]&&!Buffer.isBuffer(e)){if(H(e))e=Buffer.from(e.buffer,e.byteOffset,e.byteLength);else if(V(e))e=Buffer.from(e);else if(typeof e!=`string`)throw Error(`Non-contiguous data written to non-objectMode stream`)}return this[E]?(this[v]&&this[C]!==0&&this[p](!0),this[v]?this.emit(`data`,e):this[w](e),this[C]!==0&&this.emit(`readable`),n&&r(n),this[v]):e.length?(typeof e==`string`&&!(t===this[h]&&!this[g]?.lastNeed)&&(e=Buffer.from(e,t)),Buffer.isBuffer(e)&&this[h]&&(e=this[g].write(e)),this[v]&&this[C]!==0&&this[p](!0),this[v]?this.emit(`data`,e):this[w](e),this[C]!==0&&this.emit(`readable`),n&&r(n),this[v]):(this[C]!==0&&this.emit(`readable`),n&&r(n),this[v])}read(e){if(this[D])return null;if(this[L]=!1,this[C]===0||e===0||e&&e>this[C])return this[s](),null;this[E]&&(e=null),this[x].length>1&&!this[E]&&(this[x]=[this[h]?this[x].join(``):Buffer.concat(this[x],this[C])]);let t=this[f](e||null,this[x][0]);return this[s](),t}[f](e,t){if(this[E])this[T]();else{let n=t;e===n.length||e===null?this[T]():typeof n==`string`?(this[x][0]=n.slice(e),t=n.slice(0,e),this[C]-=e):(this[x][0]=n.subarray(e),t=n.subarray(0,e),this[C]-=e)}return this.emit(`data`,t),!this[x].length&&!this[o]&&this.emit(`drain`),t}end(e,t,n){return typeof e==`function`&&(n=e,e=void 0),typeof t==`function`&&(n=t,t=`utf8`),e!==void 0&&this.write(e,t),n&&this.once(`end`,n),this[o]=!0,this.writable=!1,(this[v]||!this[y])&&this[s](),this}[b](){this[D]||(!this[I]&&!this[S].length&&(this[L]=!0),this[y]=!1,this[v]=!0,this.emit(`resume`),this[x].length?this[p]():this[o]?this[s]():this.emit(`drain`))}resume(){return this[b]()}pause(){this[v]=!1,this[y]=!0,this[L]=!1}get destroyed(){return this[D]}get flowing(){return this[v]}get paused(){return this[y]}[w](e){this[E]?this[C]+=1:this[C]+=e.length,this[x].push(e)}[T](){return this[E]?--this[C]:this[C]-=this[x][0].length,this[x].shift()}[p](e=!1){do;while(this[m](this[T]())&&this[x].length);!e&&!this[x].length&&!this[o]&&this.emit(`drain`)}[m](e){return this.emit(`data`,e),this[v]}pipe(e,t){if(this[D])return e;this[L]=!1;let r=this[c];return t||={},e===n.stdout||e===n.stderr?t.end=!1:t.end=t.end!==!1,t.proxyErrors=!!t.proxyErrors,r?t.end&&e.end():(this[S].push(t.proxyErrors?new W(this,e,t):new U(this,e,t)),this[M]?R(()=>this[b]()):this[b]()),e}unpipe(e){let t=this[S].find(t=>t.dest===e);t&&(this[S].length===1?(this[v]&&this[I]===0&&(this[v]=!1),this[S]=[]):this[S].splice(this[S].indexOf(t),1),t.unpipe())}addListener(e,t){return this.on(e,t)}on(e,t){let n=super.on(e,t);if(e===`data`)this[L]=!1,this[I]++,!this[S].length&&!this[v]&&this[b]();else if(e===`readable`&&this[C]!==0)super.emit(`readable`);else if(B(e)&&this[c])super.emit(e),this.removeAllListeners(e);else if(e===`error`&&this[u]){let e=t;this[M]?R(()=>e.call(this,this[u])):e.call(this,this[u])}return n}removeListener(e,t){return this.off(e,t)}off(e,t){let n=super.off(e,t);return e===`data`&&(this[I]=this.listeners(`data`).length,this[I]===0&&!this[L]&&!this[S].length&&(this[v]=!1)),n}removeAllListeners(e){let t=super.removeAllListeners(e);return(e===`data`||e===void 0)&&(this[I]=0,!this[L]&&!this[S].length&&(this[v]=!1)),t}get emittedEnd(){return this[c]}[s](){!this[l]&&!this[c]&&!this[D]&&this[x].length===0&&this[o]&&(this[l]=!0,this.emit(`end`),this.emit(`prefinish`),this.emit(`finish`),this[d]&&this.emit(`close`),this[l]=!1)}emit(e,...t){let n=t[0];if(e!==`error`&&e!==`close`&&e!==D&&this[D])return!1;if(e===`data`)return!this[E]&&!n?!1:this[M]?(R(()=>this[k](n)),!0):this[k](n);if(e===`end`)return this[A]();if(e===`close`){if(this[d]=!0,!this[c]&&!this[D])return!1;let e=super.emit(`close`);return this.removeAllListeners(`close`),e}else if(e===`error`){this[u]=n,super.emit(O,n);let e=!this[F]||this.listeners(`error`).length?super.emit(`error`,n):!1;return this[s](),e}else if(e===`resume`){let e=super.emit(`resume`);return this[s](),e}else if(e===`finish`||e===`prefinish`){let t=super.emit(e);return this.removeAllListeners(e),t}let r=super.emit(e,...t);return this[s](),r}[k](e){for(let t of this[S])t.dest.write(e)===!1&&this.pause();let t=this[L]?!1:super.emit(`data`,e);return this[s](),t}[A](){return this[c]?!1:(this[c]=!0,this.readable=!1,this[M]?(R(()=>this[j]()),!0):this[j]())}[j](){if(this[g]){let e=this[g].end();if(e){for(let t of this[S])t.dest.write(e);this[L]||super.emit(`data`,e)}}for(let e of this[S])e.end();let e=super.emit(`end`);return this.removeAllListeners(`end`),e}async collect(){let e=Object.assign([],{dataLength:0});this[E]||(e.dataLength=0);let t=this.promise();return this.on(`data`,t=>{e.push(t),this[E]||(e.dataLength+=t.length)}),await t,e}async concat(){if(this[E])throw Error(`cannot concat in objectMode`);let e=await this.collect();return this[h]?e.join(``):Buffer.concat(e,e.dataLength)}async promise(){return new Promise((e,t)=>{this.on(D,()=>t(Error(`stream destroyed`))),this.on(`error`,e=>t(e)),this.on(`end`,()=>e())})}[Symbol.asyncIterator](){this[L]=!1;let e=!1,t=async()=>(this.pause(),e=!0,{value:void 0,done:!0});return{next:()=>{if(e)return t();let n=this.read();if(n!==null)return Promise.resolve({done:!1,value:n});if(this[o])return t();let r,i,a=e=>{this.off(`data`,s),this.off(`end`,c),this.off(D,l),t(),i(e)},s=e=>{this.off(`error`,a),this.off(`end`,c),this.off(D,l),this.pause(),r({value:e,done:!!this[o]})},c=()=>{this.off(`error`,a),this.off(`data`,s),this.off(D,l),t(),r({done:!0,value:void 0})},l=()=>a(Error(`stream destroyed`));return new Promise((e,t)=>{i=t,r=e,this.once(D,l),this.once(`error`,a),this.once(`end`,c),this.once(`data`,s)})},throw:t,return:t,[Symbol.asyncIterator](){return this}}}[Symbol.iterator](){this[L]=!1;let e=!1,t=()=>(this.pause(),this.off(O,t),this.off(D,t),this.off(`end`,t),e=!0,{done:!0,value:void 0});return this.once(`end`,t),this.once(O,t),this.once(D,t),{next:()=>{if(e)return t();let n=this.read();return n===null?t():{done:!1,value:n}},throw:t,return:t,[Symbol.iterator](){return this}}}destroy(e){if(this[D])return e?this.emit(`error`,e):this.emit(D),this;this[D]=!0,this[L]=!0,this[x].length=0,this[C]=0;let t=this;return typeof t.close==`function`&&!this[d]&&t.close(),e?this.emit(`error`,e):this.emit(D),this}static get isStream(){return e.isStream}};e.Minipass=q})),an=e((e=>{var t=e&&e.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),n=e&&e.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,`default`,{enumerable:!0,value:t})}):function(e,t){e.default=t}),r=e&&e.__importStar||function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var i in e)i!==`default`&&Object.prototype.hasOwnProperty.call(e,i)&&t(r,e,i);return n(r,e),r};Object.defineProperty(e,`__esModule`,{value:!0}),e.PathScurry=e.Path=e.PathScurryDarwin=e.PathScurryPosix=e.PathScurryWin32=e.PathScurryBase=e.PathPosix=e.PathWin32=e.PathBase=e.ChildrenCache=e.ResolveCache=void 0;let i=nn(),a=require(`node:path`),o=require(`node:url`),s=require(`fs`),c=r(require(`node:fs`)),l=s.realpathSync.native,u=require(`node:fs/promises`),d=rn(),f={lstatSync:s.lstatSync,readdir:s.readdir,readdirSync:s.readdirSync,readlinkSync:s.readlinkSync,realpathSync:l,promises:{lstat:u.lstat,readdir:u.readdir,readlink:u.readlink,realpath:u.realpath}},p=e=>!e||e===f||e===c?f:{...f,...e,promises:{...f.promises,...e.promises||{}}},m=/^\\\\\?\\([a-z]:)\\?$/i,h=e=>e.replace(/\//g,`\\`).replace(m,`$1\\`),g=/[\\\/]/,v=e=>e.isFile()?8:e.isDirectory()?4:e.isSymbolicLink()?10:e.isCharacterDevice()?2:e.isBlockDevice()?6:e.isSocket()?12:e.isFIFO()?1:0,y=new Map,b=e=>{let t=y.get(e);if(t)return t;let n=e.normalize(`NFKD`);return y.set(e,n),n},x=new Map,S=e=>{let t=x.get(e);if(t)return t;let n=b(e.toLowerCase());return x.set(e,n),n};var C=class extends i.LRUCache{constructor(){super({max:256})}};e.ResolveCache=C;var w=class extends i.LRUCache{constructor(e=16*1024){super({maxSize:e,sizeCalculation:e=>e.length+1})}};e.ChildrenCache=w;let T=Symbol(`PathScurry setAsCwd`);var E=class{name;root;roots;parent;nocase;isCWD=!1;#e;#t;get dev(){return this.#t}#n;get mode(){return this.#n}#r;get nlink(){return this.#r}#i;get uid(){return this.#i}#a;get gid(){return this.#a}#o;get rdev(){return this.#o}#s;get blksize(){return this.#s}#c;get ino(){return this.#c}#l;get size(){return this.#l}#u;get blocks(){return this.#u}#d;get atimeMs(){return this.#d}#f;get mtimeMs(){return this.#f}#p;get ctimeMs(){return this.#p}#m;get birthtimeMs(){return this.#m}#h;get atime(){return this.#h}#g;get mtime(){return this.#g}#_;get ctime(){return this.#_}#v;get birthtime(){return this.#v}#y;#b;#x;#S;#C;#w;#T;#E;#D;#O;get parentPath(){return(this.parent||this).fullpath()}get path(){return this.parentPath}constructor(e,t=0,n,r,i,a,o){this.name=e,this.#y=i?S(e):b(e),this.#T=t&1023,this.nocase=i,this.roots=r,this.root=n||this,this.#E=a,this.#x=o.fullpath,this.#C=o.relative,this.#w=o.relativePosix,this.parent=o.parent,this.parent?this.#e=this.parent.#e:this.#e=p(o.fs)}depth(){return this.#b===void 0?this.parent?this.#b=this.parent.depth()+1:this.#b=0:this.#b}childrenCache(){return this.#E}resolve(e){if(!e)return this;let t=this.getRootString(e),n=e.substring(t.length).split(this.splitSep);return t?this.getRoot(t).#k(n):this.#k(n)}#k(e){let t=this;for(let n of e)t=t.child(n);return t}children(){let e=this.#E.get(this);if(e)return e;let t=Object.assign([],{provisional:0});return this.#E.set(this,t),this.#T&=-17,t}child(e,t){if(e===``||e===`.`)return this;if(e===`..`)return this.parent||this;let n=this.children(),r=this.nocase?S(e):b(e);for(let e of n)if(e.#y===r)return e;let i=this.parent?this.sep:``,a=this.#x?this.#x+i+e:void 0,o=this.newChild(e,0,{...t,parent:this,fullpath:a});return this.canReaddir()||(o.#T|=128),n.push(o),o}relative(){if(this.isCWD)return``;if(this.#C!==void 0)return this.#C;let e=this.name,t=this.parent;if(!t)return this.#C=this.name;let n=t.relative();return n+(!n||!t.parent?``:this.sep)+e}relativePosix(){if(this.sep===`/`)return this.relative();if(this.isCWD)return``;if(this.#w!==void 0)return this.#w;let e=this.name,t=this.parent;if(!t)return this.#w=this.fullpathPosix();let n=t.relativePosix();return n+(!n||!t.parent?``:`/`)+e}fullpath(){if(this.#x!==void 0)return this.#x;let e=this.name,t=this.parent;return t?this.#x=t.fullpath()+(t.parent?this.sep:``)+e:this.#x=this.name}fullpathPosix(){if(this.#S!==void 0)return this.#S;if(this.sep===`/`)return this.#S=this.fullpath();if(!this.parent){let e=this.fullpath().replace(/\\/g,`/`);return/^[a-z]:\//i.test(e)?this.#S=`//?/${e}`:this.#S=e}let e=this.parent,t=e.fullpathPosix();return this.#S=t+(!t||!e.parent?``:`/`)+this.name}isUnknown(){return(this.#T&15)==0}isType(e){return this[`is${e}`]()}getType(){return this.isUnknown()?`Unknown`:this.isDirectory()?`Directory`:this.isFile()?`File`:this.isSymbolicLink()?`SymbolicLink`:this.isFIFO()?`FIFO`:this.isCharacterDevice()?`CharacterDevice`:this.isBlockDevice()?`BlockDevice`:this.isSocket()?`Socket`:`Unknown`}isFile(){return(this.#T&15)==8}isDirectory(){return(this.#T&15)==4}isCharacterDevice(){return(this.#T&15)==2}isBlockDevice(){return(this.#T&15)==6}isFIFO(){return(this.#T&15)==1}isSocket(){return(this.#T&15)==12}isSymbolicLink(){return(this.#T&10)==10}lstatCached(){return this.#T&32?this:void 0}readlinkCached(){return this.#D}realpathCached(){return this.#O}readdirCached(){let e=this.children();return e.slice(0,e.provisional)}canReadlink(){if(this.#D)return!0;if(!this.parent)return!1;let e=this.#T&15;return!(e!==0&&e!==10||this.#T&256||this.#T&128)}calledReaddir(){return!!(this.#T&16)}isENOENT(){return!!(this.#T&128)}isNamed(e){return this.nocase?this.#y===S(e):this.#y===b(e)}async readlink(){let e=this.#D;if(e)return e;if(this.canReadlink()&&this.parent)try{let e=await this.#e.promises.readlink(this.fullpath()),t=(await this.parent.realpath())?.resolve(e);if(t)return this.#D=t}catch(e){this.#L(e.code);return}}readlinkSync(){let e=this.#D;if(e)return e;if(this.canReadlink()&&this.parent)try{let e=this.#e.readlinkSync(this.fullpath()),t=this.parent.realpathSync()?.resolve(e);if(t)return this.#D=t}catch(e){this.#L(e.code);return}}#A(e){this.#T|=16;for(let t=e.provisional;t<e.length;t++){let n=e[t];n&&n.#j()}}#j(){this.#T&128||(this.#T=(this.#T|128)&-16,this.#M())}#M(){let e=this.children();e.provisional=0;for(let t of e)t.#j()}#N(){this.#T|=512,this.#P()}#P(){if(this.#T&64)return;let e=this.#T;(e&15)==4&&(e&=-16),this.#T=e|64,this.#M()}#F(e=``){e===`ENOTDIR`||e===`EPERM`?this.#P():e===`ENOENT`?this.#j():this.children().provisional=0}#I(e=``){e===`ENOTDIR`?this.parent.#P():e===`ENOENT`&&this.#j()}#L(e=``){let t=this.#T;t|=256,e===`ENOENT`&&(t|=128),(e===`EINVAL`||e===`UNKNOWN`)&&(t&=-16),this.#T=t,e===`ENOTDIR`&&this.parent&&this.parent.#P()}#R(e,t){return this.#B(e,t)||this.#z(e,t)}#z(e,t){let n=v(e),r=this.newChild(e.name,n,{parent:this}),i=r.#T&15;return i!==4&&i!==10&&i!==0&&(r.#T|=64),t.unshift(r),t.provisional++,r}#B(e,t){for(let n=t.provisional;n<t.length;n++){let r=t[n];if((this.nocase?S(e.name):b(e.name))===r.#y)return this.#V(e,r,n,t)}}#V(e,t,n,r){let i=t.name;return t.#T=t.#T&-16|v(e),i!==e.name&&(t.name=e.name),n!==r.provisional&&(n===r.length-1?r.pop():r.splice(n,1),r.unshift(t)),r.provisional++,t}async lstat(){if(!(this.#T&128))try{return this.#H(await this.#e.promises.lstat(this.fullpath())),this}catch(e){this.#I(e.code)}}lstatSync(){if(!(this.#T&128))try{return this.#H(this.#e.lstatSync(this.fullpath())),this}catch(e){this.#I(e.code)}}#H(e){let{atime:t,atimeMs:n,birthtime:r,birthtimeMs:i,blksize:a,blocks:o,ctime:s,ctimeMs:c,dev:l,gid:u,ino:d,mode:f,mtime:p,mtimeMs:m,nlink:h,rdev:g,size:y,uid:b}=e;this.#h=t,this.#d=n,this.#v=r,this.#m=i,this.#s=a,this.#u=o,this.#_=s,this.#p=c,this.#t=l,this.#a=u,this.#c=d,this.#n=f,this.#g=p,this.#f=m,this.#r=h,this.#o=g,this.#l=y,this.#i=b;let x=v(e);this.#T=this.#T&-16|x|32,x!==0&&x!==4&&x!==10&&(this.#T|=64)}#U=[];#W=!1;#G(e){this.#W=!1;let t=this.#U.slice();this.#U.length=0,t.forEach(t=>t(null,e))}readdirCB(e,t=!1){if(!this.canReaddir()){t?e(null,[]):queueMicrotask(()=>e(null,[]));return}let n=this.children();if(this.calledReaddir()){let r=n.slice(0,n.provisional);t?e(null,r):queueMicrotask(()=>e(null,r));return}if(this.#U.push(e),this.#W)return;this.#W=!0;let r=this.fullpath();this.#e.readdir(r,{withFileTypes:!0},(e,t)=>{if(e)this.#F(e.code),n.provisional=0;else{for(let e of t)this.#R(e,n);this.#A(n)}this.#G(n.slice(0,n.provisional))})}#K;async readdir(){if(!this.canReaddir())return[];let e=this.children();if(this.calledReaddir())return e.slice(0,e.provisional);let t=this.fullpath();if(this.#K)await this.#K;else{let n=()=>{};this.#K=new Promise(e=>n=e);try{for(let n of await this.#e.promises.readdir(t,{withFileTypes:!0}))this.#R(n,e);this.#A(e)}catch(t){this.#F(t.code),e.provisional=0}this.#K=void 0,n()}return e.slice(0,e.provisional)}readdirSync(){if(!this.canReaddir())return[];let e=this.children();if(this.calledReaddir())return e.slice(0,e.provisional);let t=this.fullpath();try{for(let n of this.#e.readdirSync(t,{withFileTypes:!0}))this.#R(n,e);this.#A(e)}catch(t){this.#F(t.code),e.provisional=0}return e.slice(0,e.provisional)}canReaddir(){if(this.#T&704)return!1;let e=15&this.#T;return e===0||e===4||e===10}shouldWalk(e,t){return(this.#T&4)==4&&!(this.#T&704)&&!e.has(this)&&(!t||t(this))}async realpath(){if(this.#O)return this.#O;if(!(896&this.#T))try{let e=await this.#e.promises.realpath(this.fullpath());return this.#O=this.resolve(e)}catch{this.#N()}}realpathSync(){if(this.#O)return this.#O;if(!(896&this.#T))try{let e=this.#e.realpathSync(this.fullpath());return this.#O=this.resolve(e)}catch{this.#N()}}[T](e){if(e===this)return;e.isCWD=!1,this.isCWD=!0;let t=new Set([]),n=[],r=this;for(;r&&r.parent;)t.add(r),r.#C=n.join(this.sep),r.#w=n.join(`/`),r=r.parent,n.push(`..`);for(r=e;r&&r.parent&&!t.has(r);)r.#C=void 0,r.#w=void 0,r=r.parent}};e.PathBase=E;var D=class e extends E{sep=`\\`;splitSep=g;constructor(e,t=0,n,r,i,a,o){super(e,t,n,r,i,a,o)}newChild(t,n=0,r={}){return new e(t,n,this.root,this.roots,this.nocase,this.childrenCache(),r)}getRootString(e){return a.win32.parse(e).root}getRoot(e){if(e=h(e.toUpperCase()),e===this.root.name)return this.root;for(let[t,n]of Object.entries(this.roots))if(this.sameRoot(e,t))return this.roots[e]=n;return this.roots[e]=new A(e,this).root}sameRoot(e,t=this.root.name){return e=e.toUpperCase().replace(/\//g,`\\`).replace(m,`$1\\`),e===t}};e.PathWin32=D;var O=class e extends E{splitSep=`/`;sep=`/`;constructor(e,t=0,n,r,i,a,o){super(e,t,n,r,i,a,o)}getRootString(e){return e.startsWith(`/`)?`/`:``}getRoot(e){return this.root}newChild(t,n=0,r={}){return new e(t,n,this.root,this.roots,this.nocase,this.childrenCache(),r)}};e.PathPosix=O;var k=class{root;rootPath;roots;cwd;#e;#t;#n;nocase;#r;constructor(e=process.cwd(),t,n,{nocase:r,childrenCacheSize:i=16*1024,fs:a=f}={}){this.#r=p(a),(e instanceof URL||e.startsWith(`file://`))&&(e=(0,o.fileURLToPath)(e));let s=t.resolve(e);this.roots=Object.create(null),this.rootPath=this.parseRootPath(s),this.#e=new C,this.#t=new C,this.#n=new w(i);let c=s.substring(this.rootPath.length).split(n);if(c.length===1&&!c[0]&&c.pop(),r===void 0)throw TypeError(`must provide nocase setting to PathScurryBase ctor`);this.nocase=r,this.root=this.newRoot(this.#r),this.roots[this.rootPath]=this.root;let l=this.root,u=c.length-1,d=t.sep,m=this.rootPath,h=!1;for(let e of c){let t=u--;l=l.child(e,{relative:Array(t).fill(`..`).join(d),relativePosix:Array(t).fill(`..`).join(`/`),fullpath:m+=(h?``:d)+e}),h=!0}this.cwd=l}depth(e=this.cwd){return typeof e==`string`&&(e=this.cwd.resolve(e)),e.depth()}childrenCache(){return this.#n}resolve(...e){let t=``;for(let n=e.length-1;n>=0;n--){let r=e[n];if(!(!r||r===`.`)&&(t=t?`${r}/${t}`:r,this.isAbsolute(r)))break}let n=this.#e.get(t);if(n!==void 0)return n;let r=this.cwd.resolve(t).fullpath();return this.#e.set(t,r),r}resolvePosix(...e){let t=``;for(let n=e.length-1;n>=0;n--){let r=e[n];if(!(!r||r===`.`)&&(t=t?`${r}/${t}`:r,this.isAbsolute(r)))break}let n=this.#t.get(t);if(n!==void 0)return n;let r=this.cwd.resolve(t).fullpathPosix();return this.#t.set(t,r),r}relative(e=this.cwd){return typeof e==`string`&&(e=this.cwd.resolve(e)),e.relative()}relativePosix(e=this.cwd){return typeof e==`string`&&(e=this.cwd.resolve(e)),e.relativePosix()}basename(e=this.cwd){return typeof e==`string`&&(e=this.cwd.resolve(e)),e.name}dirname(e=this.cwd){return typeof e==`string`&&(e=this.cwd.resolve(e)),(e.parent||e).fullpath()}async readdir(e=this.cwd,t={withFileTypes:!0}){typeof e==`string`?e=this.cwd.resolve(e):e instanceof E||(t=e,e=this.cwd);let{withFileTypes:n}=t;if(e.canReaddir()){let t=await e.readdir();return n?t:t.map(e=>e.name)}else return[]}readdirSync(e=this.cwd,t={withFileTypes:!0}){typeof e==`string`?e=this.cwd.resolve(e):e instanceof E||(t=e,e=this.cwd);let{withFileTypes:n=!0}=t;return e.canReaddir()?n?e.readdirSync():e.readdirSync().map(e=>e.name):[]}async lstat(e=this.cwd){return typeof e==`string`&&(e=this.cwd.resolve(e)),e.lstat()}lstatSync(e=this.cwd){return typeof e==`string`&&(e=this.cwd.resolve(e)),e.lstatSync()}async readlink(e=this.cwd,{withFileTypes:t}={withFileTypes:!1}){typeof e==`string`?e=this.cwd.resolve(e):e instanceof E||(t=e.withFileTypes,e=this.cwd);let n=await e.readlink();return t?n:n?.fullpath()}readlinkSync(e=this.cwd,{withFileTypes:t}={withFileTypes:!1}){typeof e==`string`?e=this.cwd.resolve(e):e instanceof E||(t=e.withFileTypes,e=this.cwd);let n=e.readlinkSync();return t?n:n?.fullpath()}async realpath(e=this.cwd,{withFileTypes:t}={withFileTypes:!1}){typeof e==`string`?e=this.cwd.resolve(e):e instanceof E||(t=e.withFileTypes,e=this.cwd);let n=await e.realpath();return t?n:n?.fullpath()}realpathSync(e=this.cwd,{withFileTypes:t}={withFileTypes:!1}){typeof e==`string`?e=this.cwd.resolve(e):e instanceof E||(t=e.withFileTypes,e=this.cwd);let n=e.realpathSync();return t?n:n?.fullpath()}async walk(e=this.cwd,t={}){typeof e==`string`?e=this.cwd.resolve(e):e instanceof E||(t=e,e=this.cwd);let{withFileTypes:n=!0,follow:r=!1,filter:i,walkFilter:a}=t,o=[];(!i||i(e))&&o.push(n?e:e.fullpath());let s=new Set,c=(e,t)=>{s.add(e),e.readdirCB((e,l)=>{if(e)return t(e);let u=l.length;if(!u)return t();let d=()=>{--u===0&&t()};for(let e of l)(!i||i(e))&&o.push(n?e:e.fullpath()),r&&e.isSymbolicLink()?e.realpath().then(e=>e?.isUnknown()?e.lstat():e).then(e=>e?.shouldWalk(s,a)?c(e,d):d()):e.shouldWalk(s,a)?c(e,d):d()},!0)},l=e;return new Promise((e,t)=>{c(l,n=>{if(n)return t(n);e(o)})})}walkSync(e=this.cwd,t={}){typeof e==`string`?e=this.cwd.resolve(e):e instanceof E||(t=e,e=this.cwd);let{withFileTypes:n=!0,follow:r=!1,filter:i,walkFilter:a}=t,o=[];(!i||i(e))&&o.push(n?e:e.fullpath());let s=new Set([e]);for(let e of s){let t=e.readdirSync();for(let e of t){(!i||i(e))&&o.push(n?e:e.fullpath());let t=e;if(e.isSymbolicLink()){if(!(r&&(t=e.realpathSync())))continue;t.isUnknown()&&t.lstatSync()}t.shouldWalk(s,a)&&s.add(t)}}return o}[Symbol.asyncIterator](){return this.iterate()}iterate(e=this.cwd,t={}){return typeof e==`string`?e=this.cwd.resolve(e):e instanceof E||(t=e,e=this.cwd),this.stream(e,t)[Symbol.asyncIterator]()}[Symbol.iterator](){return this.iterateSync()}*iterateSync(e=this.cwd,t={}){typeof e==`string`?e=this.cwd.resolve(e):e instanceof E||(t=e,e=this.cwd);let{withFileTypes:n=!0,follow:r=!1,filter:i,walkFilter:a}=t;(!i||i(e))&&(yield n?e:e.fullpath());let o=new Set([e]);for(let e of o){let t=e.readdirSync();for(let e of t){(!i||i(e))&&(yield n?e:e.fullpath());let t=e;if(e.isSymbolicLink()){if(!(r&&(t=e.realpathSync())))continue;t.isUnknown()&&t.lstatSync()}t.shouldWalk(o,a)&&o.add(t)}}}stream(e=this.cwd,t={}){typeof e==`string`?e=this.cwd.resolve(e):e instanceof E||(t=e,e=this.cwd);let{withFileTypes:n=!0,follow:r=!1,filter:i,walkFilter:a}=t,o=new d.Minipass({objectMode:!0});(!i||i(e))&&o.write(n?e:e.fullpath());let s=new Set,c=[e],l=0,u=()=>{let e=!1;for(;!e;){let t=c.shift();if(!t){l===0&&o.end();return}l++,s.add(t);let d=(t,p,m=!1)=>{if(t)return o.emit(`error`,t);if(r&&!m){let e=[];for(let t of p)t.isSymbolicLink()&&e.push(t.realpath().then(e=>e?.isUnknown()?e.lstat():e));if(e.length){Promise.all(e).then(()=>d(null,p,!0));return}}for(let t of p)t&&(!i||i(t))&&(o.write(n?t:t.fullpath())||(e=!0));l--;for(let e of p){let t=e.realpathCached()||e;t.shouldWalk(s,a)&&c.push(t)}e&&!o.flowing?o.once(`drain`,u):f||u()},f=!0;t.readdirCB(d,!0),f=!1}};return u(),o}streamSync(e=this.cwd,t={}){typeof e==`string`?e=this.cwd.resolve(e):e instanceof E||(t=e,e=this.cwd);let{withFileTypes:n=!0,follow:r=!1,filter:i,walkFilter:a}=t,o=new d.Minipass({objectMode:!0}),s=new Set;(!i||i(e))&&o.write(n?e:e.fullpath());let c=[e],l=0,u=()=>{let e=!1;for(;!e;){let t=c.shift();if(!t){l===0&&o.end();return}l++,s.add(t);let u=t.readdirSync();for(let t of u)(!i||i(t))&&(o.write(n?t:t.fullpath())||(e=!0));l--;for(let e of u){let t=e;if(e.isSymbolicLink()){if(!(r&&(t=e.realpathSync())))continue;t.isUnknown()&&t.lstatSync()}t.shouldWalk(s,a)&&c.push(t)}}e&&!o.flowing&&o.once(`drain`,u)};return u(),o}chdir(e=this.cwd){let t=this.cwd;this.cwd=typeof e==`string`?this.cwd.resolve(e):e,this.cwd[T](t)}};e.PathScurryBase=k;var A=class extends k{sep=`\\`;constructor(e=process.cwd(),t={}){let{nocase:n=!0}=t;super(e,a.win32,`\\`,{...t,nocase:n}),this.nocase=n;for(let e=this.cwd;e;e=e.parent)e.nocase=this.nocase}parseRootPath(e){return a.win32.parse(e).root.toUpperCase()}newRoot(e){return new D(this.rootPath,4,void 0,this.roots,this.nocase,this.childrenCache(),{fs:e})}isAbsolute(e){return e.startsWith(`/`)||e.startsWith(`\\`)||/^[a-z]:(\/|\\)/i.test(e)}};e.PathScurryWin32=A;var j=class extends k{sep=`/`;constructor(e=process.cwd(),t={}){let{nocase:n=!1}=t;super(e,a.posix,`/`,{...t,nocase:n}),this.nocase=n}parseRootPath(e){return`/`}newRoot(e){return new O(this.rootPath,4,void 0,this.roots,this.nocase,this.childrenCache(),{fs:e})}isAbsolute(e){return e.startsWith(`/`)}};e.PathScurryPosix=j;var M=class extends j{constructor(e=process.cwd(),t={}){let{nocase:n=!0}=t;super(e,{...t,nocase:n})}};e.PathScurryDarwin=M,e.Path=process.platform===`win32`?D:O,e.PathScurry=process.platform===`win32`?A:process.platform===`darwin`?M:j})),on=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.Pattern=void 0;let t=tn(),n=e=>e.length>=1,r=e=>e.length>=1;e.Pattern=class e{#e;#t;#n;length;#r;#i;#a;#o;#s;#c;#l=!0;constructor(e,t,i,a){if(!n(e))throw TypeError(`empty pattern list`);if(!r(t))throw TypeError(`empty glob list`);if(t.length!==e.length)throw TypeError(`mismatched pattern list and glob list lengths`);if(this.length=e.length,i<0||i>=this.length)throw TypeError(`index out of range`);if(this.#e=e,this.#t=t,this.#n=i,this.#r=a,this.#n===0){if(this.isUNC()){let[e,t,n,r,...i]=this.#e,[a,o,s,c,...l]=this.#t;i[0]===``&&(i.shift(),l.shift());let u=[e,t,n,r,``].join(`/`),d=[a,o,s,c,``].join(`/`);this.#e=[u,...i],this.#t=[d,...l],this.length=this.#e.length}else if(this.isDrive()||this.isAbsolute()){let[e,...t]=this.#e,[n,...r]=this.#t;t[0]===``&&(t.shift(),r.shift());let i=e+`/`,a=n+`/`;this.#e=[i,...t],this.#t=[a,...r],this.length=this.#e.length}}}pattern(){return this.#e[this.#n]}isString(){return typeof this.#e[this.#n]==`string`}isGlobstar(){return this.#e[this.#n]===t.GLOBSTAR}isRegExp(){return this.#e[this.#n]instanceof RegExp}globString(){return this.#a=this.#a||(this.#n===0?this.isAbsolute()?this.#t[0]+this.#t.slice(1).join(`/`):this.#t.join(`/`):this.#t.slice(this.#n).join(`/`))}hasMore(){return this.length>this.#n+1}rest(){return this.#i===void 0?this.hasMore()?(this.#i=new e(this.#e,this.#t,this.#n+1,this.#r),this.#i.#c=this.#c,this.#i.#s=this.#s,this.#i.#o=this.#o,this.#i):this.#i=null:this.#i}isUNC(){let e=this.#e;return this.#s===void 0?this.#s=this.#r===`win32`&&this.#n===0&&e[0]===``&&e[1]===``&&typeof e[2]==`string`&&!!e[2]&&typeof e[3]==`string`&&!!e[3]:this.#s}isDrive(){let e=this.#e;return this.#o===void 0?this.#o=this.#r===`win32`&&this.#n===0&&this.length>1&&typeof e[0]==`string`&&/^[a-z]:$/i.test(e[0]):this.#o}isAbsolute(){let e=this.#e;return this.#c===void 0?this.#c=e[0]===``&&e.length>1||this.isDrive()||this.isUNC():this.#c}root(){let e=this.#e[0];return typeof e==`string`&&this.isAbsolute()&&this.#n===0?e:``}checkFollowGlobstar(){return!(this.#n===0||!this.isGlobstar()||!this.#l)}markFollowGlobstar(){return this.#n===0||!this.isGlobstar()||!this.#l?!1:(this.#l=!1,!0)}}})),sn=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.Ignore=void 0;let t=tn(),n=on(),r=typeof process==`object`&&process&&typeof process.platform==`string`?process.platform:`linux`;e.Ignore=class{relative;relativeChildren;absolute;absoluteChildren;platform;mmopts;constructor(e,{nobrace:t,nocase:n,noext:i,noglobstar:a,platform:o=r}){this.relative=[],this.absolute=[],this.relativeChildren=[],this.absoluteChildren=[],this.platform=o,this.mmopts={dot:!0,nobrace:t,nocase:n,noext:i,noglobstar:a,optimizationLevel:2,platform:o,nocomment:!0,nonegate:!0};for(let t of e)this.add(t)}add(e){let r=new t.Minimatch(e,this.mmopts);for(let e=0;e<r.set.length;e++){let i=r.set[e],a=r.globParts[e];if(!i||!a)throw Error(`invalid pattern object`);for(;i[0]===`.`&&a[0]===`.`;)i.shift(),a.shift();let o=new n.Pattern(i,a,0,this.platform),s=new t.Minimatch(o.globString(),this.mmopts),c=a[a.length-1]===`**`,l=o.isAbsolute();l?this.absolute.push(s):this.relative.push(s),c&&(l?this.absoluteChildren.push(s):this.relativeChildren.push(s))}}ignored(e){let t=e.fullpath(),n=`${t}/`,r=e.relative()||`.`,i=`${r}/`;for(let e of this.relative)if(e.match(r)||e.match(i))return!0;for(let e of this.absolute)if(e.match(t)||e.match(n))return!0;return!1}childrenIgnored(e){let t=e.fullpath()+`/`,n=(e.relative()||`.`)+`/`;for(let e of this.relativeChildren)if(e.match(n))return!0;for(let e of this.absoluteChildren)if(e.match(t))return!0;return!1}}})),cn=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.Processor=e.SubWalks=e.MatchRecord=e.HasWalkedCache=void 0;let t=tn();var n=class e{store;constructor(e=new Map){this.store=e}copy(){return new e(new Map(this.store))}hasWalked(e,t){return this.store.get(e.fullpath())?.has(t.globString())}storeWalked(e,t){let n=e.fullpath(),r=this.store.get(n);r?r.add(t.globString()):this.store.set(n,new Set([t.globString()]))}};e.HasWalkedCache=n;var r=class{store=new Map;add(e,t,n){let r=(t?2:0)|(n?1:0),i=this.store.get(e);this.store.set(e,i===void 0?r:r&i)}entries(){return[...this.store.entries()].map(([e,t])=>[e,!!(t&2),!!(t&1)])}};e.MatchRecord=r;var i=class{store=new Map;add(e,t){if(!e.canReaddir())return;let n=this.store.get(e);n?n.find(e=>e.globString()===t.globString())||n.push(t):this.store.set(e,[t])}get(e){let t=this.store.get(e);if(!t)throw Error(`attempting to walk unknown path`);return t}entries(){return this.keys().map(e=>[e,this.store.get(e)])}keys(){return[...this.store.keys()].filter(e=>e.canReaddir())}};e.SubWalks=i,e.Processor=class e{hasWalkedCache;matches=new r;subwalks=new i;patterns;follow;dot;opts;constructor(e,t){this.opts=e,this.follow=!!e.follow,this.dot=!!e.dot,this.hasWalkedCache=t?t.copy():new n}processPatterns(e,n){this.patterns=n;let r=n.map(t=>[e,t]);for(let[e,n]of r){this.hasWalkedCache.storeWalked(e,n);let r=n.root(),i=n.isAbsolute()&&this.opts.absolute!==!1;if(r){e=e.resolve(r===`/`&&this.opts.root!==void 0?this.opts.root:r);let t=n.rest();if(t)n=t;else{this.matches.add(e,!0,!1);continue}}if(e.isENOENT())continue;let a,o,s=!1;for(;typeof(a=n.pattern())==`string`&&(o=n.rest());)e=e.resolve(a),n=o,s=!0;if(a=n.pattern(),o=n.rest(),s){if(this.hasWalkedCache.hasWalked(e,n))continue;this.hasWalkedCache.storeWalked(e,n)}if(typeof a==`string`){let t=a===`..`||a===``||a===`.`;this.matches.add(e.resolve(a),i,t);continue}else if(a===t.GLOBSTAR){(!e.isSymbolicLink()||this.follow||n.checkFollowGlobstar())&&this.subwalks.add(e,n);let t=o?.pattern(),r=o?.rest();if(!o||(t===``||t===`.`)&&!r)this.matches.add(e,i,t===``||t===`.`);else if(t===`..`){let t=e.parent||e;r?this.hasWalkedCache.hasWalked(t,r)||this.subwalks.add(t,r):this.matches.add(t,i,!0)}}else a instanceof RegExp&&this.subwalks.add(e,n)}return this}subwalkTargets(){return this.subwalks.keys()}child(){return new e(this.opts,this.hasWalkedCache)}filterEntries(e,n){let r=this.subwalks.get(e),i=this.child();for(let e of n)for(let n of r){let r=n.isAbsolute(),a=n.pattern(),o=n.rest();a===t.GLOBSTAR?i.testGlobstar(e,n,o,r):a instanceof RegExp?i.testRegExp(e,a,o,r):i.testString(e,a,o,r)}return i}testGlobstar(e,t,n,r){if((this.dot||!e.name.startsWith(`.`))&&(t.hasMore()||this.matches.add(e,r,!1),e.canReaddir()&&(this.follow||!e.isSymbolicLink()?this.subwalks.add(e,t):e.isSymbolicLink()&&(n&&t.checkFollowGlobstar()?this.subwalks.add(e,n):t.markFollowGlobstar()&&this.subwalks.add(e,t)))),n){let t=n.pattern();if(typeof t==`string`&&t!==`..`&&t!==``&&t!==`.`)this.testString(e,t,n.rest(),r);else if(t===`..`){let t=e.parent||e;this.subwalks.add(t,n)}else t instanceof RegExp&&this.testRegExp(e,t,n.rest(),r)}}testRegExp(e,t,n,r){t.test(e.name)&&(n?this.subwalks.add(e,n):this.matches.add(e,r,!1))}testString(e,t,n,r){e.isNamed(t)&&(n?this.subwalks.add(e,n):this.matches.add(e,r,!1))}}})),ln=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.GlobStream=e.GlobWalker=e.GlobUtil=void 0;let t=rn(),n=sn(),r=cn(),i=(e,t)=>typeof e==`string`?new n.Ignore([e],t):Array.isArray(e)?new n.Ignore(e,t):e;var a=class{path;patterns;opts;seen=new Set;paused=!1;aborted=!1;#e=[];#t;#n;signal;maxDepth;includeChildMatches;constructor(e,t,n){if(this.patterns=e,this.path=t,this.opts=n,this.#n=!n.posix&&n.platform===`win32`?`\\`:`/`,this.includeChildMatches=n.includeChildMatches!==!1,(n.ignore||!this.includeChildMatches)&&(this.#t=i(n.ignore??[],n),!this.includeChildMatches&&typeof this.#t.add!=`function`))throw Error(`cannot ignore child matches, ignore lacks add() method.`);this.maxDepth=n.maxDepth||1/0,n.signal&&(this.signal=n.signal,this.signal.addEventListener(`abort`,()=>{this.#e.length=0}))}#r(e){return this.seen.has(e)||!!this.#t?.ignored?.(e)}#i(e){return!!this.#t?.childrenIgnored?.(e)}pause(){this.paused=!0}resume(){if(this.signal?.aborted)return;this.paused=!1;let e;for(;!this.paused&&(e=this.#e.shift());)e()}onResume(e){this.signal?.aborted||(this.paused?this.#e.push(e):e())}async matchCheck(e,t){if(t&&this.opts.nodir)return;let n;if(this.opts.realpath){if(n=e.realpathCached()||await e.realpath(),!n)return;e=n}let r=e.isUnknown()||this.opts.stat?await e.lstat():e;if(this.opts.follow&&this.opts.nodir&&r?.isSymbolicLink()){let e=await r.realpath();e&&(e.isUnknown()||this.opts.stat)&&await e.lstat()}return this.matchCheckTest(r,t)}matchCheckTest(e,t){return e&&(this.maxDepth===1/0||e.depth()<=this.maxDepth)&&(!t||e.canReaddir())&&(!this.opts.nodir||!e.isDirectory())&&(!this.opts.nodir||!this.opts.follow||!e.isSymbolicLink()||!e.realpathCached()?.isDirectory())&&!this.#r(e)?e:void 0}matchCheckSync(e,t){if(t&&this.opts.nodir)return;let n;if(this.opts.realpath){if(n=e.realpathCached()||e.realpathSync(),!n)return;e=n}let r=e.isUnknown()||this.opts.stat?e.lstatSync():e;if(this.opts.follow&&this.opts.nodir&&r?.isSymbolicLink()){let e=r.realpathSync();e&&(e?.isUnknown()||this.opts.stat)&&e.lstatSync()}return this.matchCheckTest(r,t)}matchFinish(e,t){if(this.#r(e))return;if(!this.includeChildMatches&&this.#t?.add){let t=`${e.relativePosix()}/**`;this.#t.add(t)}let n=this.opts.absolute===void 0?t:this.opts.absolute;this.seen.add(e);let r=this.opts.mark&&e.isDirectory()?this.#n:``;if(this.opts.withFileTypes)this.matchEmit(e);else if(n){let t=this.opts.posix?e.fullpathPosix():e.fullpath();this.matchEmit(t+r)}else{let t=this.opts.posix?e.relativePosix():e.relative(),n=this.opts.dotRelative&&!t.startsWith(`..`+this.#n)?`.`+this.#n:``;this.matchEmit(t?n+t+r:`.`+r)}}async match(e,t,n){let r=await this.matchCheck(e,n);r&&this.matchFinish(r,t)}matchSync(e,t,n){let r=this.matchCheckSync(e,n);r&&this.matchFinish(r,t)}walkCB(e,t,n){this.signal?.aborted&&n(),this.walkCB2(e,t,new r.Processor(this.opts),n)}walkCB2(e,t,n,r){if(this.#i(e))return r();if(this.signal?.aborted&&r(),this.paused){this.onResume(()=>this.walkCB2(e,t,n,r));return}n.processPatterns(e,t);let i=1,a=()=>{--i===0&&r()};for(let[e,t,r]of n.matches.entries())this.#r(e)||(i++,this.match(e,t,r).then(()=>a()));for(let e of n.subwalkTargets()){if(this.maxDepth!==1/0&&e.depth()>=this.maxDepth)continue;i++;let t=e.readdirCached();e.calledReaddir()?this.walkCB3(e,t,n,a):e.readdirCB((t,r)=>this.walkCB3(e,r,n,a),!0)}a()}walkCB3(e,t,n,r){n=n.filterEntries(e,t);let i=1,a=()=>{--i===0&&r()};for(let[e,t,r]of n.matches.entries())this.#r(e)||(i++,this.match(e,t,r).then(()=>a()));for(let[e,t]of n.subwalks.entries())i++,this.walkCB2(e,t,n.child(),a);a()}walkCBSync(e,t,n){this.signal?.aborted&&n(),this.walkCB2Sync(e,t,new r.Processor(this.opts),n)}walkCB2Sync(e,t,n,r){if(this.#i(e))return r();if(this.signal?.aborted&&r(),this.paused){this.onResume(()=>this.walkCB2Sync(e,t,n,r));return}n.processPatterns(e,t);let i=1,a=()=>{--i===0&&r()};for(let[e,t,r]of n.matches.entries())this.#r(e)||this.matchSync(e,t,r);for(let e of n.subwalkTargets()){if(this.maxDepth!==1/0&&e.depth()>=this.maxDepth)continue;i++;let t=e.readdirSync();this.walkCB3Sync(e,t,n,a)}a()}walkCB3Sync(e,t,n,r){n=n.filterEntries(e,t);let i=1,a=()=>{--i===0&&r()};for(let[e,t,r]of n.matches.entries())this.#r(e)||this.matchSync(e,t,r);for(let[e,t]of n.subwalks.entries())i++,this.walkCB2Sync(e,t,n.child(),a);a()}};e.GlobUtil=a,e.GlobWalker=class extends a{matches=new Set;constructor(e,t,n){super(e,t,n)}matchEmit(e){this.matches.add(e)}async walk(){if(this.signal?.aborted)throw this.signal.reason;return this.path.isUnknown()&&await this.path.lstat(),await new Promise((e,t)=>{this.walkCB(this.path,this.patterns,()=>{this.signal?.aborted?t(this.signal.reason):e(this.matches)})}),this.matches}walkSync(){if(this.signal?.aborted)throw this.signal.reason;return this.path.isUnknown()&&this.path.lstatSync(),this.walkCBSync(this.path,this.patterns,()=>{if(this.signal?.aborted)throw this.signal.reason}),this.matches}},e.GlobStream=class extends a{results;constructor(e,n,r){super(e,n,r),this.results=new t.Minipass({signal:this.signal,objectMode:!0}),this.results.on(`drain`,()=>this.resume()),this.results.on(`resume`,()=>this.resume())}matchEmit(e){this.results.write(e),this.results.flowing||this.pause()}stream(){let e=this.path;return e.isUnknown()?e.lstat().then(()=>{this.walkCB(e,this.patterns,()=>this.results.end())}):this.walkCB(e,this.patterns,()=>this.results.end()),this.results}streamSync(){return this.path.isUnknown()&&this.path.lstatSync(),this.walkCBSync(this.path,this.patterns,()=>this.results.end()),this.results}}})),un=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.Glob=void 0;let t=tn(),n=require(`node:url`),r=an(),i=on(),a=ln(),o=typeof process==`object`&&process&&typeof process.platform==`string`?process.platform:`linux`;e.Glob=class{absolute;cwd;root;dot;dotRelative;follow;ignore;magicalBraces;mark;matchBase;maxDepth;nobrace;nocase;nodir;noext;noglobstar;pattern;platform;realpath;scurry;stat;signal;windowsPathsNoEscape;withFileTypes;includeChildMatches;opts;patterns;constructor(e,a){if(!a)throw TypeError(`glob options required`);if(this.withFileTypes=!!a.withFileTypes,this.signal=a.signal,this.follow=!!a.follow,this.dot=!!a.dot,this.dotRelative=!!a.dotRelative,this.nodir=!!a.nodir,this.mark=!!a.mark,a.cwd?(a.cwd instanceof URL||a.cwd.startsWith(`file://`))&&(a.cwd=(0,n.fileURLToPath)(a.cwd)):this.cwd=``,this.cwd=a.cwd||``,this.root=a.root,this.magicalBraces=!!a.magicalBraces,this.nobrace=!!a.nobrace,this.noext=!!a.noext,this.realpath=!!a.realpath,this.absolute=a.absolute,this.includeChildMatches=a.includeChildMatches!==!1,this.noglobstar=!!a.noglobstar,this.matchBase=!!a.matchBase,this.maxDepth=typeof a.maxDepth==`number`?a.maxDepth:1/0,this.stat=!!a.stat,this.ignore=a.ignore,this.withFileTypes&&this.absolute!==void 0)throw Error(`cannot set absolute and withFileTypes:true`);if(typeof e==`string`&&(e=[e]),this.windowsPathsNoEscape=!!a.windowsPathsNoEscape||a.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(e=e.map(e=>e.replace(/\\/g,`/`))),this.matchBase){if(a.noglobstar)throw TypeError(`base matching requires globstar`);e=e.map(e=>e.includes(`/`)?e:`./**/${e}`)}if(this.pattern=e,this.platform=a.platform||o,this.opts={...a,platform:this.platform},a.scurry){if(this.scurry=a.scurry,a.nocase!==void 0&&a.nocase!==a.scurry.nocase)throw Error(`nocase option contradicts provided scurry option`)}else this.scurry=new(a.platform===`win32`?r.PathScurryWin32:a.platform===`darwin`?r.PathScurryDarwin:a.platform?r.PathScurryPosix:r.PathScurry)(this.cwd,{nocase:a.nocase,fs:a.fs});this.nocase=this.scurry.nocase;let s=this.platform===`darwin`||this.platform===`win32`,c={...a,dot:this.dot,matchBase:this.matchBase,nobrace:this.nobrace,nocase:this.nocase,nocaseMagicOnly:s,nocomment:!0,noext:this.noext,nonegate:!0,optimizationLevel:2,platform:this.platform,windowsPathsNoEscape:this.windowsPathsNoEscape,debug:!!this.opts.debug},[l,u]=this.pattern.map(e=>new t.Minimatch(e,c)).reduce((e,t)=>(e[0].push(...t.set),e[1].push(...t.globParts),e),[[],[]]);this.patterns=l.map((e,t)=>{let n=u[t];if(!n)throw Error(`invalid pattern object`);return new i.Pattern(e,n,0,this.platform)})}async walk(){return[...await new a.GlobWalker(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth===1/0?1/0:this.maxDepth+this.scurry.cwd.depth(),platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).walk()]}walkSync(){return[...new a.GlobWalker(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth===1/0?1/0:this.maxDepth+this.scurry.cwd.depth(),platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).walkSync()]}stream(){return new a.GlobStream(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth===1/0?1/0:this.maxDepth+this.scurry.cwd.depth(),platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).stream()}streamSync(){return new a.GlobStream(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth===1/0?1/0:this.maxDepth+this.scurry.cwd.depth(),platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).streamSync()}iterateSync(){return this.streamSync()[Symbol.iterator]()}[Symbol.iterator](){return this.iterateSync()}iterate(){return this.stream()[Symbol.asyncIterator]()}[Symbol.asyncIterator](){return this.iterate()}}})),dn=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.hasMagic=void 0;let t=tn();e.hasMagic=(e,n={})=>{Array.isArray(e)||(e=[e]);for(let r of e)if(new t.Minimatch(r,n).hasMagic())return!0;return!1}})),fn=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.glob=e.sync=e.iterate=e.iterateSync=e.stream=e.streamSync=e.Ignore=e.hasMagic=e.Glob=e.unescape=e.escape=void 0,e.globStreamSync=c,e.globStream=l,e.globSync=u,e.globIterateSync=f,e.globIterate=p;let t=tn(),n=un(),r=dn();var i=tn();Object.defineProperty(e,`escape`,{enumerable:!0,get:function(){return i.escape}}),Object.defineProperty(e,`unescape`,{enumerable:!0,get:function(){return i.unescape}});var a=un();Object.defineProperty(e,`Glob`,{enumerable:!0,get:function(){return a.Glob}});var o=dn();Object.defineProperty(e,`hasMagic`,{enumerable:!0,get:function(){return o.hasMagic}});var s=sn();Object.defineProperty(e,`Ignore`,{enumerable:!0,get:function(){return s.Ignore}});function c(e,t={}){return new n.Glob(e,t).streamSync()}function l(e,t={}){return new n.Glob(e,t).stream()}function u(e,t={}){return new n.Glob(e,t).walkSync()}async function d(e,t={}){return new n.Glob(e,t).walk()}function f(e,t={}){return new n.Glob(e,t).iterateSync()}function p(e,t={}){return new n.Glob(e,t).iterate()}e.streamSync=c,e.stream=Object.assign(l,{sync:c}),e.iterateSync=f,e.iterate=Object.assign(p,{sync:f}),e.sync=Object.assign(u,{stream:c,iterate:f}),e.glob=Object.assign(d,{glob:d,globSync:u,sync:e.sync,globStream:l,stream:e.stream,globStreamSync:c,streamSync:e.streamSync,globIterate:p,iterate:e.iterate,globIterateSync:f,iterateSync:e.iterateSync,Glob:n.Glob,hasMagic:r.hasMagic,escape:t.escape,unescape:t.unescape}),e.glob.glob=e.glob})),pn=e(((e,t)=>{var n=u(),r=require(`path`),i=rt(),a=Bt(),o=Kt(),s=Yt(),c=fn(),l=t.exports={},d=/[\/\\]/g,f=function(e,t){var n=[];return i(e).forEach(function(e){var r=e.indexOf(`!`)===0;r&&(e=e.slice(1));var i=t(e);n=r?a(n,i):o(n,i)}),n};l.exists=function(){var e=r.join.apply(r,arguments);return n.existsSync(e)},l.expand=function(...e){var t=s(e[0])?e.shift():{},i=Array.isArray(e[0])?e[0]:e;if(i.length===0)return[];var a=f(i,function(e){return c.sync(e,t)});return t.filter&&(a=a.filter(function(e){e=r.join(t.cwd||``,e);try{return typeof t.filter==`function`?t.filter(e):n.statSync(e)[t.filter]()}catch{return!1}})),a},l.expandMapping=function(e,t,n){n=Object.assign({rename:function(e,t){return r.join(e||``,t)}},n);var i=[],a={};return l.expand(n,e).forEach(function(e){var o=e;n.flatten&&(o=r.basename(o)),n.ext&&(o=o.replace(/(\.[^\/]*)?$/,n.ext));var s=n.rename(t,o,n);n.cwd&&(e=r.join(n.cwd,e)),s=s.replace(d,`/`),e=e.replace(d,`/`),a[s]?a[s].src.push(e):(i.push({src:[e],dest:s}),a[s]=i[i.length-1])}),i},l.normalizeFilesArray=function(e){var t=[];return e.forEach(function(e){(`src`in e||`dest`in e)&&t.push(e)}),t.length===0?[]:(t=_(t).chain().forEach(function(e){!(`src`in e)||!e.src||(Array.isArray(e.src)?e.src=i(e.src):e.src=[e.src])}).map(function(e){var t=Object.assign({},e);if(delete t.src,delete t.dest,e.expand)return l.expandMapping(e.src,e.dest,t).map(function(t){var n=Object.assign({},e);return n.orig=Object.assign({},e),n.src=t.src,n.dest=t.dest,[`expand`,`cwd`,`flatten`,`rename`,`ext`].forEach(function(e){delete n[e]}),n});var n=Object.assign({},e);return n.orig=Object.assign({},e),`src`in n&&Object.defineProperty(n,`src`,{enumerable:!0,get:function n(){var r;return`result`in n||(r=e.src,r=Array.isArray(r)?i(r):[r],n.result=l.expand(t,r)),n.result}}),`dest`in n&&(n.dest=e.dest),n}).flatten().value(),t)}})),mn=e(((e,t)=>{var n=u(),r=require(`path`),i=d(),a=j(),o=M(),s=Ee();require(`stream`).Stream;var c=$e().PassThrough,l=t.exports={};l.file=pn(),l.collectStream=function(e,t){var n=[],r=0;e.on(`error`,t),e.on(`data`,function(e){n.push(e),r+=e.length}),e.on(`end`,function(){var e=Buffer.alloc(r),i=0;n.forEach(function(t){t.copy(e,i),i+=t.length}),t(null,e)})},l.dateify=function(e){return e||=new Date,e=e instanceof Date?e:typeof e==`string`?new Date(e):new Date,e},l.defaults=function(e,t,n){var r=arguments;return r[0]=r[0]||{},s(...r)},l.isStream=function(e){return i(e)},l.lazyReadStream=function(e){return new a.Readable(function(){return n.createReadStream(e)})},l.normalizeInputSource=function(e){return e===null?Buffer.alloc(0):typeof e==`string`?Buffer.from(e):l.isStream(e)?e.pipe(new c):e},l.sanitizePath=function(e){return o(e,!1).replace(/^\w+:/,``).replace(/^(\.\.\/|\/)+/,``)},l.trailingSlashIt=function(e){return e.slice(-1)===`/`?e:e+`/`},l.unixifyPath=function(e){return o(e,!1).replace(/^\w+:/,``)},l.walkdir=function(e,t,i){var a=[];typeof t==`function`&&(i=t,t=e),n.readdir(e,function(o,s){var c=0,u,d;if(o)return i(o);(function o(){if(u=s[c++],!u)return i(null,a);d=r.join(e,u),n.stat(d,function(e,n){a.push({path:d,relative:r.relative(t,d).replace(/\\/g,`/`),stats:n}),n&&n.isDirectory()?l.walkdir(d,t,function(e,t){if(e)return i(e);t.forEach(function(e){a.push(e)}),o()}):o()})})()})}})),hn=e(((e,t)=>{
|
|
19
|
+
>>> no match, partial?`,t,f,n,p),f===c))}let a;if(typeof u==`string`?(a=d===u,this.debug(`string match`,u,d,a)):(a=u.test(d),this.debug(`pattern match`,u,d,a)),!a)return!1}if(o===c&&s===l)return!0;if(o===c)return r;if(s===l)return o===c-1&&t[o]===``;throw Error(`wtf?`)}braceExpand(){return(0,e.braceExpand)(this.pattern,this.options)}parse(t){(0,i.assertValidPattern)(t);let n=this.options;if(t===`**`)return e.GLOBSTAR;if(t===``)return``;let r,o=null;(r=t.match(y))?o=n.dot?x:b:(r=t.match(c))?o=(n.nocase?n.dot?f:d:n.dot?u:l)(r[1]):(r=t.match(S))?o=(n.nocase?n.dot?w:C:n.dot?T:E)(r):(r=t.match(p))?o=n.dot?h:m:(r=t.match(g))&&(o=v);let s=a.AST.fromGlob(t,this.options).toMMPattern();return o&&typeof s==`object`&&Reflect.defineProperty(s,`test`,{value:o}),s}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let t=this.set;if(!t.length)return this.regexp=!1,this.regexp;let n=this.options,r=n.noglobstar?`[^/]*?`:n.dot?`(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?`:`(?:(?!(?:\\/|^)\\.).)*?`,i=new Set(n.nocase?[`i`]:[]),a=t.map(t=>{let n=t.map(t=>{if(t instanceof RegExp)for(let e of t.flags.split(``))i.add(e);return typeof t==`string`?N(t):t===e.GLOBSTAR?e.GLOBSTAR:t._src});return n.forEach((t,i)=>{let a=n[i+1],o=n[i-1];t!==e.GLOBSTAR||o===e.GLOBSTAR||(o===void 0?a!==void 0&&a!==e.GLOBSTAR?n[i+1]=`(?:\\/|`+r+`\\/)?`+a:n[i]=r:a===void 0?n[i-1]=o+`(?:\\/|`+r+`)?`:a!==e.GLOBSTAR&&(n[i-1]=o+`(?:\\/|\\/`+r+`\\/)`+a,n[i+1]=e.GLOBSTAR))}),n.filter(t=>t!==e.GLOBSTAR).join(`/`)}).join(`|`),[o,s]=t.length>1?[`(?:`,`)`]:[``,``];a=`^`+o+a+s+`$`,this.negate&&(a=`^(?!`+a+`).+$`);try{this.regexp=new RegExp(a,[...i].join(``))}catch{this.regexp=!1}return this.regexp}slashSplit(e){return this.preserveMultipleSlashes?e.split(`/`):this.isWindows&&/^\/\/[^\/]+/.test(e)?[``,...e.split(/\/+/)]:e.split(/\/+/)}match(e,t=this.partial){if(this.debug(`match`,e,this.pattern),this.comment)return!1;if(this.empty)return e===``;if(e===`/`&&t)return!0;let n=this.options;this.isWindows&&(e=e.split(`\\`).join(`/`));let r=this.slashSplit(e);this.debug(this.pattern,`split`,r);let i=this.set;this.debug(this.pattern,`set`,i);let a=r[r.length-1];if(!a)for(let e=r.length-2;!a&&e>=0;e--)a=r[e];for(let e=0;e<i.length;e++){let o=i[e],s=r;if(n.matchBase&&o.length===1&&(s=[a]),this.matchOne(s,o,t))return n.flipNegate?!0:!this.negate}return n.flipNegate?!1:this.negate}static defaults(t){return e.minimatch.defaults(t).Minimatch}};e.Minimatch=P;var F=$t();Object.defineProperty(e,`AST`,{enumerable:!0,get:function(){return F.AST}});var I=en();Object.defineProperty(e,`escape`,{enumerable:!0,get:function(){return I.escape}});var L=Qt();Object.defineProperty(e,`unescape`,{enumerable:!0,get:function(){return L.unescape}}),e.minimatch.AST=a.AST,e.minimatch.Minimatch=P,e.minimatch.escape=o.escape,e.minimatch.unescape=s.unescape})),nn=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.LRUCache=void 0;let t=typeof performance==`object`&&performance&&typeof performance.now==`function`?performance:Date,n=new Set,r=typeof process==`object`&&process?process:{},i=(e,t,n,i)=>{typeof r.emitWarning==`function`?r.emitWarning(e,t,n,i):console.error(`[${n}] ${t}: ${e}`)},a=globalThis.AbortController,o=globalThis.AbortSignal;if(a===void 0){o=class{onabort;_onabort=[];reason;aborted=!1;addEventListener(e,t){this._onabort.push(t)}},a=class{constructor(){t()}signal=new o;abort(e){if(!this.signal.aborted){this.signal.reason=e,this.signal.aborted=!0;for(let t of this.signal._onabort)t(e);this.signal.onabort?.(e)}}};let e=r.env?.LRU_CACHE_IGNORE_AC_WARNING!==`1`,t=()=>{e&&(e=!1,i("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.",`NO_ABORT_CONTROLLER`,`ENOTSUP`,t))}}let s=e=>!n.has(e),c=e=>e&&e===Math.floor(e)&&e>0&&isFinite(e),l=e=>c(e)?e<=2**8?Uint8Array:e<=2**16?Uint16Array:e<=2**32?Uint32Array:e<=2**53-1?u:null:null;var u=class extends Array{constructor(e){super(e),this.fill(0)}},d=class e{heap;length;static#e=!1;static create(t){let n=l(t);if(!n)return[];e.#e=!0;let r=new e(t,n);return e.#e=!1,r}constructor(t,n){if(!e.#e)throw TypeError(`instantiate Stack using Stack.create(n)`);this.heap=new n(t),this.length=0}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}};e.LRUCache=class e{#e;#t;#n;#r;#i;#a;ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#o;#s;#c;#l;#u;#d;#f;#p;#m;#h;#g;#_;#v;#y;#b;#x;#S;static unsafeExposeInternals(e){return{starts:e.#v,ttls:e.#y,sizes:e.#_,keyMap:e.#c,keyList:e.#l,valList:e.#u,next:e.#d,prev:e.#f,get head(){return e.#p},get tail(){return e.#m},free:e.#h,isBackgroundFetch:t=>e.#L(t),backgroundFetch:(t,n,r,i)=>e.#I(t,n,r,i),moveToTail:t=>e.#z(t),indexes:t=>e.#M(t),rindexes:t=>e.#N(t),isStale:t=>e.#D(t)}}get max(){return this.#e}get maxSize(){return this.#t}get calculatedSize(){return this.#s}get size(){return this.#o}get fetchMethod(){return this.#i}get memoMethod(){return this.#a}get dispose(){return this.#n}get disposeAfter(){return this.#r}constructor(t){let{max:r=0,ttl:a,ttlResolution:o=1,ttlAutopurge:u,updateAgeOnGet:f,updateAgeOnHas:p,allowStale:m,dispose:h,disposeAfter:g,noDisposeOnSet:v,noUpdateTTL:y,maxSize:b=0,maxEntrySize:x=0,sizeCalculation:S,fetchMethod:C,memoMethod:w,noDeleteOnFetchRejection:T,noDeleteOnStaleGet:E,allowStaleOnFetchRejection:D,allowStaleOnFetchAbort:O,ignoreFetchAbort:k}=t;if(r!==0&&!c(r))throw TypeError(`max option must be a nonnegative integer`);let A=r?l(r):Array;if(!A)throw Error(`invalid max value: `+r);if(this.#e=r,this.#t=b,this.maxEntrySize=x||this.#t,this.sizeCalculation=S,this.sizeCalculation){if(!this.#t&&!this.maxEntrySize)throw TypeError(`cannot set sizeCalculation without setting maxSize or maxEntrySize`);if(typeof this.sizeCalculation!=`function`)throw TypeError(`sizeCalculation set to non-function`)}if(w!==void 0&&typeof w!=`function`)throw TypeError(`memoMethod must be a function if defined`);if(this.#a=w,C!==void 0&&typeof C!=`function`)throw TypeError(`fetchMethod must be a function if specified`);if(this.#i=C,this.#x=!!C,this.#c=new Map,this.#l=Array(r).fill(void 0),this.#u=Array(r).fill(void 0),this.#d=new A(r),this.#f=new A(r),this.#p=0,this.#m=0,this.#h=d.create(r),this.#o=0,this.#s=0,typeof h==`function`&&(this.#n=h),typeof g==`function`?(this.#r=g,this.#g=[]):(this.#r=void 0,this.#g=void 0),this.#b=!!this.#n,this.#S=!!this.#r,this.noDisposeOnSet=!!v,this.noUpdateTTL=!!y,this.noDeleteOnFetchRejection=!!T,this.allowStaleOnFetchRejection=!!D,this.allowStaleOnFetchAbort=!!O,this.ignoreFetchAbort=!!k,this.maxEntrySize!==0){if(this.#t!==0&&!c(this.#t))throw TypeError(`maxSize must be a positive integer if specified`);if(!c(this.maxEntrySize))throw TypeError(`maxEntrySize must be a positive integer if specified`);this.#O()}if(this.allowStale=!!m,this.noDeleteOnStaleGet=!!E,this.updateAgeOnGet=!!f,this.updateAgeOnHas=!!p,this.ttlResolution=c(o)||o===0?o:1,this.ttlAutopurge=!!u,this.ttl=a||0,this.ttl){if(!c(this.ttl))throw TypeError(`ttl must be a positive integer if specified`);this.#C()}if(this.#e===0&&this.ttl===0&&this.#t===0)throw TypeError(`At least one of max, maxSize, or ttl is required`);if(!this.ttlAutopurge&&!this.#e&&!this.#t){let t=`LRU_CACHE_UNBOUNDED`;s(t)&&(n.add(t),i(`TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.`,`UnboundedCacheWarning`,t,e))}}getRemainingTTL(e){return this.#c.has(e)?1/0:0}#C(){let e=new u(this.#e),n=new u(this.#e);this.#y=e,this.#v=n,this.#E=(r,i,a=t.now())=>{if(n[r]=i===0?0:a,e[r]=i,i!==0&&this.ttlAutopurge){let e=setTimeout(()=>{this.#D(r)&&this.#B(this.#l[r],`expire`)},i+1);e.unref&&e.unref()}},this.#w=r=>{n[r]=e[r]===0?0:t.now()},this.#T=(t,a)=>{if(e[a]){let o=e[a],s=n[a];if(!o||!s)return;t.ttl=o,t.start=s,t.now=r||i(),t.remainingTTL=o-(t.now-s)}};let r=0,i=()=>{let e=t.now();if(this.ttlResolution>0){r=e;let t=setTimeout(()=>r=0,this.ttlResolution);t.unref&&t.unref()}return e};this.getRemainingTTL=t=>{let a=this.#c.get(t);if(a===void 0)return 0;let o=e[a],s=n[a];return!o||!s?1/0:o-((r||i())-s)},this.#D=t=>{let a=n[t],o=e[t];return!!o&&!!a&&(r||i())-a>o}}#w=()=>{};#T=()=>{};#E=()=>{};#D=()=>!1;#O(){let e=new u(this.#e);this.#s=0,this.#_=e,this.#k=t=>{this.#s-=e[t],e[t]=0},this.#j=(e,t,n,r)=>{if(this.#L(t))return 0;if(!c(n))if(r){if(typeof r!=`function`)throw TypeError(`sizeCalculation must be a function`);if(n=r(t,e),!c(n))throw TypeError(`sizeCalculation return invalid (expect positive integer)`)}else throw TypeError(`invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.`);return n},this.#A=(t,n,r)=>{if(e[t]=n,this.#t){let n=this.#t-e[t];for(;this.#s>n;)this.#F(!0)}this.#s+=e[t],r&&(r.entrySize=n,r.totalCalculatedSize=this.#s)}}#k=e=>{};#A=(e,t,n)=>{};#j=(e,t,n,r)=>{if(n||r)throw TypeError(`cannot set size without setting maxSize or maxEntrySize on cache`);return 0};*#M({allowStale:e=this.allowStale}={}){if(this.#o)for(let t=this.#m;!(!this.#P(t)||((e||!this.#D(t))&&(yield t),t===this.#p));)t=this.#f[t]}*#N({allowStale:e=this.allowStale}={}){if(this.#o)for(let t=this.#p;!(!this.#P(t)||((e||!this.#D(t))&&(yield t),t===this.#m));)t=this.#d[t]}#P(e){return e!==void 0&&this.#c.get(this.#l[e])===e}*entries(){for(let e of this.#M())this.#u[e]!==void 0&&this.#l[e]!==void 0&&!this.#L(this.#u[e])&&(yield[this.#l[e],this.#u[e]])}*rentries(){for(let e of this.#N())this.#u[e]!==void 0&&this.#l[e]!==void 0&&!this.#L(this.#u[e])&&(yield[this.#l[e],this.#u[e]])}*keys(){for(let e of this.#M()){let t=this.#l[e];t!==void 0&&!this.#L(this.#u[e])&&(yield t)}}*rkeys(){for(let e of this.#N()){let t=this.#l[e];t!==void 0&&!this.#L(this.#u[e])&&(yield t)}}*values(){for(let e of this.#M())this.#u[e]!==void 0&&!this.#L(this.#u[e])&&(yield this.#u[e])}*rvalues(){for(let e of this.#N())this.#u[e]!==void 0&&!this.#L(this.#u[e])&&(yield this.#u[e])}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]=`LRUCache`;find(e,t={}){for(let n of this.#M()){let r=this.#u[n],i=this.#L(r)?r.__staleWhileFetching:r;if(i!==void 0&&e(i,this.#l[n],this))return this.get(this.#l[n],t)}}forEach(e,t=this){for(let n of this.#M()){let r=this.#u[n],i=this.#L(r)?r.__staleWhileFetching:r;i!==void 0&&e.call(t,i,this.#l[n],this)}}rforEach(e,t=this){for(let n of this.#N()){let r=this.#u[n],i=this.#L(r)?r.__staleWhileFetching:r;i!==void 0&&e.call(t,i,this.#l[n],this)}}purgeStale(){let e=!1;for(let t of this.#N({allowStale:!0}))this.#D(t)&&(this.#B(this.#l[t],`expire`),e=!0);return e}info(e){let n=this.#c.get(e);if(n===void 0)return;let r=this.#u[n],i=this.#L(r)?r.__staleWhileFetching:r;if(i===void 0)return;let a={value:i};if(this.#y&&this.#v){let e=this.#y[n],r=this.#v[n];e&&r&&(a.ttl=e-(t.now()-r),a.start=Date.now())}return this.#_&&(a.size=this.#_[n]),a}dump(){let e=[];for(let n of this.#M({allowStale:!0})){let r=this.#l[n],i=this.#u[n],a=this.#L(i)?i.__staleWhileFetching:i;if(a===void 0||r===void 0)continue;let o={value:a};if(this.#y&&this.#v){o.ttl=this.#y[n];let e=t.now()-this.#v[n];o.start=Math.floor(Date.now()-e)}this.#_&&(o.size=this.#_[n]),e.unshift([r,o])}return e}load(e){this.clear();for(let[n,r]of e){if(r.start){let e=Date.now()-r.start;r.start=t.now()-e}this.set(n,r.value,r)}}set(e,t,n={}){if(t===void 0)return this.delete(e),this;let{ttl:r=this.ttl,start:i,noDisposeOnSet:a=this.noDisposeOnSet,sizeCalculation:o=this.sizeCalculation,status:s}=n,{noUpdateTTL:c=this.noUpdateTTL}=n,l=this.#j(e,t,n.size||0,o);if(this.maxEntrySize&&l>this.maxEntrySize)return s&&(s.set=`miss`,s.maxEntrySizeExceeded=!0),this.#B(e,`set`),this;let u=this.#o===0?void 0:this.#c.get(e);if(u===void 0)u=this.#o===0?this.#m:this.#h.length===0?this.#o===this.#e?this.#F(!1):this.#o:this.#h.pop(),this.#l[u]=e,this.#u[u]=t,this.#c.set(e,u),this.#d[this.#m]=u,this.#f[u]=this.#m,this.#m=u,this.#o++,this.#A(u,l,s),s&&(s.set=`add`),c=!1;else{this.#z(u);let n=this.#u[u];if(t!==n){if(this.#x&&this.#L(n)){n.__abortController.abort(Error(`replaced`));let{__staleWhileFetching:t}=n;t!==void 0&&!a&&(this.#b&&this.#n?.(t,e,`set`),this.#S&&this.#g?.push([t,e,`set`]))}else a||(this.#b&&this.#n?.(n,e,`set`),this.#S&&this.#g?.push([n,e,`set`]));if(this.#k(u),this.#A(u,l,s),this.#u[u]=t,s){s.set=`replace`;let e=n&&this.#L(n)?n.__staleWhileFetching:n;e!==void 0&&(s.oldValue=e)}}else s&&(s.set=`update`)}if(r!==0&&!this.#y&&this.#C(),this.#y&&(c||this.#E(u,r,i),s&&this.#T(s,u)),!a&&this.#S&&this.#g){let e=this.#g,t;for(;t=e?.shift();)this.#r?.(...t)}return this}pop(){try{for(;this.#o;){let e=this.#u[this.#p];if(this.#F(!0),this.#L(e)){if(e.__staleWhileFetching)return e.__staleWhileFetching}else if(e!==void 0)return e}}finally{if(this.#S&&this.#g){let e=this.#g,t;for(;t=e?.shift();)this.#r?.(...t)}}}#F(e){let t=this.#p,n=this.#l[t],r=this.#u[t];return this.#x&&this.#L(r)?r.__abortController.abort(Error(`evicted`)):(this.#b||this.#S)&&(this.#b&&this.#n?.(r,n,`evict`),this.#S&&this.#g?.push([r,n,`evict`])),this.#k(t),e&&(this.#l[t]=void 0,this.#u[t]=void 0,this.#h.push(t)),this.#o===1?(this.#p=this.#m=0,this.#h.length=0):this.#p=this.#d[t],this.#c.delete(n),this.#o--,t}has(e,t={}){let{updateAgeOnHas:n=this.updateAgeOnHas,status:r}=t,i=this.#c.get(e);if(i!==void 0){let e=this.#u[i];if(this.#L(e)&&e.__staleWhileFetching===void 0)return!1;if(this.#D(i))r&&(r.has=`stale`,this.#T(r,i));else return n&&this.#w(i),r&&(r.has=`hit`,this.#T(r,i)),!0}else r&&(r.has=`miss`);return!1}peek(e,t={}){let{allowStale:n=this.allowStale}=t,r=this.#c.get(e);if(r===void 0||!n&&this.#D(r))return;let i=this.#u[r];return this.#L(i)?i.__staleWhileFetching:i}#I(e,t,n,r){let i=t===void 0?void 0:this.#u[t];if(this.#L(i))return i;let o=new a,{signal:s}=n;s?.addEventListener(`abort`,()=>o.abort(s.reason),{signal:o.signal});let c={signal:o.signal,options:n,context:r},l=(r,i=!1)=>{let{aborted:a}=o.signal,s=n.ignoreFetchAbort&&r!==void 0;if(n.status&&(a&&!i?(n.status.fetchAborted=!0,n.status.fetchError=o.signal.reason,s&&(n.status.fetchAbortIgnored=!0)):n.status.fetchResolved=!0),a&&!s&&!i)return d(o.signal.reason);let l=p;return this.#u[t]===p&&(r===void 0?l.__staleWhileFetching?this.#u[t]=l.__staleWhileFetching:this.#B(e,`fetch`):(n.status&&(n.status.fetchUpdated=!0),this.set(e,r,c.options))),r},u=e=>(n.status&&(n.status.fetchRejected=!0,n.status.fetchError=e),d(e)),d=r=>{let{aborted:i}=o.signal,a=i&&n.allowStaleOnFetchAbort,s=a||n.allowStaleOnFetchRejection,c=s||n.noDeleteOnFetchRejection,l=p;if(this.#u[t]===p&&(!c||l.__staleWhileFetching===void 0?this.#B(e,`fetch`):a||(this.#u[t]=l.__staleWhileFetching)),s)return n.status&&l.__staleWhileFetching!==void 0&&(n.status.returnedStale=!0),l.__staleWhileFetching;if(l.__returned===l)throw r},f=(t,r)=>{let a=this.#i?.(e,i,c);a&&a instanceof Promise&&a.then(e=>t(e===void 0?void 0:e),r),o.signal.addEventListener(`abort`,()=>{(!n.ignoreFetchAbort||n.allowStaleOnFetchAbort)&&(t(void 0),n.allowStaleOnFetchAbort&&(t=e=>l(e,!0)))})};n.status&&(n.status.fetchDispatched=!0);let p=new Promise(f).then(l,u),m=Object.assign(p,{__abortController:o,__staleWhileFetching:i,__returned:void 0});return t===void 0?(this.set(e,m,{...c.options,status:void 0}),t=this.#c.get(e)):this.#u[t]=m,m}#L(e){if(!this.#x)return!1;let t=e;return!!t&&t instanceof Promise&&t.hasOwnProperty(`__staleWhileFetching`)&&t.__abortController instanceof a}async fetch(e,t={}){let{allowStale:n=this.allowStale,updateAgeOnGet:r=this.updateAgeOnGet,noDeleteOnStaleGet:i=this.noDeleteOnStaleGet,ttl:a=this.ttl,noDisposeOnSet:o=this.noDisposeOnSet,size:s=0,sizeCalculation:c=this.sizeCalculation,noUpdateTTL:l=this.noUpdateTTL,noDeleteOnFetchRejection:u=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:d=this.allowStaleOnFetchRejection,ignoreFetchAbort:f=this.ignoreFetchAbort,allowStaleOnFetchAbort:p=this.allowStaleOnFetchAbort,context:m,forceRefresh:h=!1,status:g,signal:v}=t;if(!this.#x)return g&&(g.fetch=`get`),this.get(e,{allowStale:n,updateAgeOnGet:r,noDeleteOnStaleGet:i,status:g});let y={allowStale:n,updateAgeOnGet:r,noDeleteOnStaleGet:i,ttl:a,noDisposeOnSet:o,size:s,sizeCalculation:c,noUpdateTTL:l,noDeleteOnFetchRejection:u,allowStaleOnFetchRejection:d,allowStaleOnFetchAbort:p,ignoreFetchAbort:f,status:g,signal:v},b=this.#c.get(e);if(b===void 0){g&&(g.fetch=`miss`);let t=this.#I(e,b,y,m);return t.__returned=t}else{let t=this.#u[b];if(this.#L(t)){let e=n&&t.__staleWhileFetching!==void 0;return g&&(g.fetch=`inflight`,e&&(g.returnedStale=!0)),e?t.__staleWhileFetching:t.__returned=t}let i=this.#D(b);if(!h&&!i)return g&&(g.fetch=`hit`),this.#z(b),r&&this.#w(b),g&&this.#T(g,b),t;let a=this.#I(e,b,y,m),o=a.__staleWhileFetching!==void 0&&n;return g&&(g.fetch=i?`stale`:`refresh`,o&&i&&(g.returnedStale=!0)),o?a.__staleWhileFetching:a.__returned=a}}async forceFetch(e,t={}){let n=await this.fetch(e,t);if(n===void 0)throw Error(`fetch() returned undefined`);return n}memo(e,t={}){let n=this.#a;if(!n)throw Error(`no memoMethod provided to constructor`);let{context:r,forceRefresh:i,...a}=t,o=this.get(e,a);if(!i&&o!==void 0)return o;let s=n(e,o,{options:a,context:r});return this.set(e,s,a),s}get(e,t={}){let{allowStale:n=this.allowStale,updateAgeOnGet:r=this.updateAgeOnGet,noDeleteOnStaleGet:i=this.noDeleteOnStaleGet,status:a}=t,o=this.#c.get(e);if(o!==void 0){let t=this.#u[o],s=this.#L(t);return a&&this.#T(a,o),this.#D(o)?(a&&(a.get=`stale`),s?(a&&n&&t.__staleWhileFetching!==void 0&&(a.returnedStale=!0),n?t.__staleWhileFetching:void 0):(i||this.#B(e,`expire`),a&&n&&(a.returnedStale=!0),n?t:void 0)):(a&&(a.get=`hit`),s?t.__staleWhileFetching:(this.#z(o),r&&this.#w(o),t))}else a&&(a.get=`miss`)}#R(e,t){this.#f[t]=e,this.#d[e]=t}#z(e){e!==this.#m&&(e===this.#p?this.#p=this.#d[e]:this.#R(this.#f[e],this.#d[e]),this.#R(this.#m,e),this.#m=e)}delete(e){return this.#B(e,`delete`)}#B(e,t){let n=!1;if(this.#o!==0){let r=this.#c.get(e);if(r!==void 0)if(n=!0,this.#o===1)this.#V(t);else{this.#k(r);let n=this.#u[r];if(this.#L(n)?n.__abortController.abort(Error(`deleted`)):(this.#b||this.#S)&&(this.#b&&this.#n?.(n,e,t),this.#S&&this.#g?.push([n,e,t])),this.#c.delete(e),this.#l[r]=void 0,this.#u[r]=void 0,r===this.#m)this.#m=this.#f[r];else if(r===this.#p)this.#p=this.#d[r];else{let e=this.#f[r];this.#d[e]=this.#d[r];let t=this.#d[r];this.#f[t]=this.#f[r]}this.#o--,this.#h.push(r)}}if(this.#S&&this.#g?.length){let e=this.#g,t;for(;t=e?.shift();)this.#r?.(...t)}return n}clear(){return this.#V(`delete`)}#V(e){for(let t of this.#N({allowStale:!0})){let n=this.#u[t];if(this.#L(n))n.__abortController.abort(Error(`deleted`));else{let r=this.#l[t];this.#b&&this.#n?.(n,r,e),this.#S&&this.#g?.push([n,r,e])}}if(this.#c.clear(),this.#u.fill(void 0),this.#l.fill(void 0),this.#y&&this.#v&&(this.#y.fill(0),this.#v.fill(0)),this.#_&&this.#_.fill(0),this.#p=0,this.#m=0,this.#h.length=0,this.#s=0,this.#o=0,this.#S&&this.#g){let e=this.#g,t;for(;t=e?.shift();)this.#r?.(...t)}}}})),rn=e((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0}),e.Minipass=e.isWritable=e.isReadable=e.isStream=void 0;let n=typeof process==`object`&&process?process:{stdout:null,stderr:null},r=require(`node:events`),i=t(require(`node:stream`)),a=require(`node:string_decoder`);e.isStream=t=>!!t&&typeof t==`object`&&(t instanceof q||t instanceof i.default||(0,e.isReadable)(t)||(0,e.isWritable)(t)),e.isReadable=e=>!!e&&typeof e==`object`&&e instanceof r.EventEmitter&&typeof e.pipe==`function`&&e.pipe!==i.default.Writable.prototype.pipe,e.isWritable=e=>!!e&&typeof e==`object`&&e instanceof r.EventEmitter&&typeof e.write==`function`&&typeof e.end==`function`;let o=Symbol(`EOF`),s=Symbol(`maybeEmitEnd`),c=Symbol(`emittedEnd`),l=Symbol(`emittingEnd`),u=Symbol(`emittedError`),d=Symbol(`closed`),f=Symbol(`read`),p=Symbol(`flush`),m=Symbol(`flushChunk`),h=Symbol(`encoding`),g=Symbol(`decoder`),v=Symbol(`flowing`),y=Symbol(`paused`),b=Symbol(`resume`),x=Symbol(`buffer`),S=Symbol(`pipes`),C=Symbol(`bufferLength`),w=Symbol(`bufferPush`),T=Symbol(`bufferShift`),E=Symbol(`objectMode`),D=Symbol(`destroyed`),O=Symbol(`error`),k=Symbol(`emitData`),A=Symbol(`emitEnd`),j=Symbol(`emitEnd2`),M=Symbol(`async`),N=Symbol(`abort`),P=Symbol(`aborted`),F=Symbol(`signal`),I=Symbol(`dataListeners`),L=Symbol(`discarded`),R=e=>Promise.resolve().then(e),z=e=>e(),B=e=>e===`end`||e===`finish`||e===`prefinish`,V=e=>e instanceof ArrayBuffer||!!e&&typeof e==`object`&&e.constructor&&e.constructor.name===`ArrayBuffer`&&e.byteLength>=0,H=e=>!Buffer.isBuffer(e)&&ArrayBuffer.isView(e);var U=class{src;dest;opts;ondrain;constructor(e,t,n){this.src=e,this.dest=t,this.opts=n,this.ondrain=()=>e[b](),this.dest.on(`drain`,this.ondrain)}unpipe(){this.dest.removeListener(`drain`,this.ondrain)}proxyErrors(e){}end(){this.unpipe(),this.opts.end&&this.dest.end()}},W=class extends U{unpipe(){this.src.removeListener(`error`,this.proxyErrors),super.unpipe()}constructor(e,t,n){super(e,t,n),this.proxyErrors=e=>this.dest.emit(`error`,e),e.on(`error`,this.proxyErrors)}};let G=e=>!!e.objectMode,K=e=>!e.objectMode&&!!e.encoding&&e.encoding!==`buffer`;var q=class extends r.EventEmitter{[v]=!1;[y]=!1;[S]=[];[x]=[];[E];[h];[M];[g];[o]=!1;[c]=!1;[l]=!1;[d]=!1;[u]=null;[C]=0;[D]=!1;[F];[P]=!1;[I]=0;[L]=!1;writable=!0;readable=!0;constructor(...e){let t=e[0]||{};if(super(),t.objectMode&&typeof t.encoding==`string`)throw TypeError(`Encoding and objectMode may not be used together`);G(t)?(this[E]=!0,this[h]=null):K(t)?(this[h]=t.encoding,this[E]=!1):(this[E]=!1,this[h]=null),this[M]=!!t.async,this[g]=this[h]?new a.StringDecoder(this[h]):null,t&&t.debugExposeBuffer===!0&&Object.defineProperty(this,`buffer`,{get:()=>this[x]}),t&&t.debugExposePipes===!0&&Object.defineProperty(this,`pipes`,{get:()=>this[S]});let{signal:n}=t;n&&(this[F]=n,n.aborted?this[N]():n.addEventListener(`abort`,()=>this[N]()))}get bufferLength(){return this[C]}get encoding(){return this[h]}set encoding(e){throw Error(`Encoding must be set at instantiation time`)}setEncoding(e){throw Error(`Encoding must be set at instantiation time`)}get objectMode(){return this[E]}set objectMode(e){throw Error(`objectMode must be set at instantiation time`)}get async(){return this[M]}set async(e){this[M]=this[M]||!!e}[N](){this[P]=!0,this.emit(`abort`,this[F]?.reason),this.destroy(this[F]?.reason)}get aborted(){return this[P]}set aborted(e){}write(e,t,n){if(this[P])return!1;if(this[o])throw Error(`write after end`);if(this[D])return this.emit(`error`,Object.assign(Error(`Cannot call write after a stream was destroyed`),{code:`ERR_STREAM_DESTROYED`})),!0;typeof t==`function`&&(n=t,t=`utf8`),t||=`utf8`;let r=this[M]?R:z;if(!this[E]&&!Buffer.isBuffer(e)){if(H(e))e=Buffer.from(e.buffer,e.byteOffset,e.byteLength);else if(V(e))e=Buffer.from(e);else if(typeof e!=`string`)throw Error(`Non-contiguous data written to non-objectMode stream`)}return this[E]?(this[v]&&this[C]!==0&&this[p](!0),this[v]?this.emit(`data`,e):this[w](e),this[C]!==0&&this.emit(`readable`),n&&r(n),this[v]):e.length?(typeof e==`string`&&!(t===this[h]&&!this[g]?.lastNeed)&&(e=Buffer.from(e,t)),Buffer.isBuffer(e)&&this[h]&&(e=this[g].write(e)),this[v]&&this[C]!==0&&this[p](!0),this[v]?this.emit(`data`,e):this[w](e),this[C]!==0&&this.emit(`readable`),n&&r(n),this[v]):(this[C]!==0&&this.emit(`readable`),n&&r(n),this[v])}read(e){if(this[D])return null;if(this[L]=!1,this[C]===0||e===0||e&&e>this[C])return this[s](),null;this[E]&&(e=null),this[x].length>1&&!this[E]&&(this[x]=[this[h]?this[x].join(``):Buffer.concat(this[x],this[C])]);let t=this[f](e||null,this[x][0]);return this[s](),t}[f](e,t){if(this[E])this[T]();else{let n=t;e===n.length||e===null?this[T]():typeof n==`string`?(this[x][0]=n.slice(e),t=n.slice(0,e),this[C]-=e):(this[x][0]=n.subarray(e),t=n.subarray(0,e),this[C]-=e)}return this.emit(`data`,t),!this[x].length&&!this[o]&&this.emit(`drain`),t}end(e,t,n){return typeof e==`function`&&(n=e,e=void 0),typeof t==`function`&&(n=t,t=`utf8`),e!==void 0&&this.write(e,t),n&&this.once(`end`,n),this[o]=!0,this.writable=!1,(this[v]||!this[y])&&this[s](),this}[b](){this[D]||(!this[I]&&!this[S].length&&(this[L]=!0),this[y]=!1,this[v]=!0,this.emit(`resume`),this[x].length?this[p]():this[o]?this[s]():this.emit(`drain`))}resume(){return this[b]()}pause(){this[v]=!1,this[y]=!0,this[L]=!1}get destroyed(){return this[D]}get flowing(){return this[v]}get paused(){return this[y]}[w](e){this[E]?this[C]+=1:this[C]+=e.length,this[x].push(e)}[T](){return this[E]?--this[C]:this[C]-=this[x][0].length,this[x].shift()}[p](e=!1){do;while(this[m](this[T]())&&this[x].length);!e&&!this[x].length&&!this[o]&&this.emit(`drain`)}[m](e){return this.emit(`data`,e),this[v]}pipe(e,t){if(this[D])return e;this[L]=!1;let r=this[c];return t||={},e===n.stdout||e===n.stderr?t.end=!1:t.end=t.end!==!1,t.proxyErrors=!!t.proxyErrors,r?t.end&&e.end():(this[S].push(t.proxyErrors?new W(this,e,t):new U(this,e,t)),this[M]?R(()=>this[b]()):this[b]()),e}unpipe(e){let t=this[S].find(t=>t.dest===e);t&&(this[S].length===1?(this[v]&&this[I]===0&&(this[v]=!1),this[S]=[]):this[S].splice(this[S].indexOf(t),1),t.unpipe())}addListener(e,t){return this.on(e,t)}on(e,t){let n=super.on(e,t);if(e===`data`)this[L]=!1,this[I]++,!this[S].length&&!this[v]&&this[b]();else if(e===`readable`&&this[C]!==0)super.emit(`readable`);else if(B(e)&&this[c])super.emit(e),this.removeAllListeners(e);else if(e===`error`&&this[u]){let e=t;this[M]?R(()=>e.call(this,this[u])):e.call(this,this[u])}return n}removeListener(e,t){return this.off(e,t)}off(e,t){let n=super.off(e,t);return e===`data`&&(this[I]=this.listeners(`data`).length,this[I]===0&&!this[L]&&!this[S].length&&(this[v]=!1)),n}removeAllListeners(e){let t=super.removeAllListeners(e);return(e===`data`||e===void 0)&&(this[I]=0,!this[L]&&!this[S].length&&(this[v]=!1)),t}get emittedEnd(){return this[c]}[s](){!this[l]&&!this[c]&&!this[D]&&this[x].length===0&&this[o]&&(this[l]=!0,this.emit(`end`),this.emit(`prefinish`),this.emit(`finish`),this[d]&&this.emit(`close`),this[l]=!1)}emit(e,...t){let n=t[0];if(e!==`error`&&e!==`close`&&e!==D&&this[D])return!1;if(e===`data`)return!this[E]&&!n?!1:this[M]?(R(()=>this[k](n)),!0):this[k](n);if(e===`end`)return this[A]();if(e===`close`){if(this[d]=!0,!this[c]&&!this[D])return!1;let e=super.emit(`close`);return this.removeAllListeners(`close`),e}else if(e===`error`){this[u]=n,super.emit(O,n);let e=!this[F]||this.listeners(`error`).length?super.emit(`error`,n):!1;return this[s](),e}else if(e===`resume`){let e=super.emit(`resume`);return this[s](),e}else if(e===`finish`||e===`prefinish`){let t=super.emit(e);return this.removeAllListeners(e),t}let r=super.emit(e,...t);return this[s](),r}[k](e){for(let t of this[S])t.dest.write(e)===!1&&this.pause();let t=this[L]?!1:super.emit(`data`,e);return this[s](),t}[A](){return this[c]?!1:(this[c]=!0,this.readable=!1,this[M]?(R(()=>this[j]()),!0):this[j]())}[j](){if(this[g]){let e=this[g].end();if(e){for(let t of this[S])t.dest.write(e);this[L]||super.emit(`data`,e)}}for(let e of this[S])e.end();let e=super.emit(`end`);return this.removeAllListeners(`end`),e}async collect(){let e=Object.assign([],{dataLength:0});this[E]||(e.dataLength=0);let t=this.promise();return this.on(`data`,t=>{e.push(t),this[E]||(e.dataLength+=t.length)}),await t,e}async concat(){if(this[E])throw Error(`cannot concat in objectMode`);let e=await this.collect();return this[h]?e.join(``):Buffer.concat(e,e.dataLength)}async promise(){return new Promise((e,t)=>{this.on(D,()=>t(Error(`stream destroyed`))),this.on(`error`,e=>t(e)),this.on(`end`,()=>e())})}[Symbol.asyncIterator](){this[L]=!1;let e=!1,t=async()=>(this.pause(),e=!0,{value:void 0,done:!0});return{next:()=>{if(e)return t();let n=this.read();if(n!==null)return Promise.resolve({done:!1,value:n});if(this[o])return t();let r,i,a=e=>{this.off(`data`,s),this.off(`end`,c),this.off(D,l),t(),i(e)},s=e=>{this.off(`error`,a),this.off(`end`,c),this.off(D,l),this.pause(),r({value:e,done:!!this[o]})},c=()=>{this.off(`error`,a),this.off(`data`,s),this.off(D,l),t(),r({done:!0,value:void 0})},l=()=>a(Error(`stream destroyed`));return new Promise((e,t)=>{i=t,r=e,this.once(D,l),this.once(`error`,a),this.once(`end`,c),this.once(`data`,s)})},throw:t,return:t,[Symbol.asyncIterator](){return this},[Symbol.asyncDispose]:async()=>{}}}[Symbol.iterator](){this[L]=!1;let e=!1,t=()=>(this.pause(),this.off(O,t),this.off(D,t),this.off(`end`,t),e=!0,{done:!0,value:void 0});return this.once(`end`,t),this.once(O,t),this.once(D,t),{next:()=>{if(e)return t();let n=this.read();return n===null?t():{done:!1,value:n}},throw:t,return:t,[Symbol.iterator](){return this},[Symbol.dispose]:()=>{}}}destroy(e){if(this[D])return e?this.emit(`error`,e):this.emit(D),this;this[D]=!0,this[L]=!0,this[x].length=0,this[C]=0;let t=this;return typeof t.close==`function`&&!this[d]&&t.close(),e?this.emit(`error`,e):this.emit(D),this}static get isStream(){return e.isStream}};e.Minipass=q})),an=e((e=>{var t=e&&e.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),n=e&&e.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,`default`,{enumerable:!0,value:t})}):function(e,t){e.default=t}),r=e&&e.__importStar||function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var i in e)i!==`default`&&Object.prototype.hasOwnProperty.call(e,i)&&t(r,e,i);return n(r,e),r};Object.defineProperty(e,`__esModule`,{value:!0}),e.PathScurry=e.Path=e.PathScurryDarwin=e.PathScurryPosix=e.PathScurryWin32=e.PathScurryBase=e.PathPosix=e.PathWin32=e.PathBase=e.ChildrenCache=e.ResolveCache=void 0;let i=nn(),a=require(`node:path`),o=require(`node:url`),s=require(`fs`),c=r(require(`node:fs`)),l=s.realpathSync.native,u=require(`node:fs/promises`),d=rn(),f={lstatSync:s.lstatSync,readdir:s.readdir,readdirSync:s.readdirSync,readlinkSync:s.readlinkSync,realpathSync:l,promises:{lstat:u.lstat,readdir:u.readdir,readlink:u.readlink,realpath:u.realpath}},p=e=>!e||e===f||e===c?f:{...f,...e,promises:{...f.promises,...e.promises||{}}},m=/^\\\\\?\\([a-z]:)\\?$/i,h=e=>e.replace(/\//g,`\\`).replace(m,`$1\\`),g=/[\\\/]/,v=e=>e.isFile()?8:e.isDirectory()?4:e.isSymbolicLink()?10:e.isCharacterDevice()?2:e.isBlockDevice()?6:e.isSocket()?12:e.isFIFO()?1:0,y=new Map,b=e=>{let t=y.get(e);if(t)return t;let n=e.normalize(`NFKD`);return y.set(e,n),n},x=new Map,S=e=>{let t=x.get(e);if(t)return t;let n=b(e.toLowerCase());return x.set(e,n),n};var C=class extends i.LRUCache{constructor(){super({max:256})}};e.ResolveCache=C;var w=class extends i.LRUCache{constructor(e=16*1024){super({maxSize:e,sizeCalculation:e=>e.length+1})}};e.ChildrenCache=w;let T=Symbol(`PathScurry setAsCwd`);var E=class{name;root;roots;parent;nocase;isCWD=!1;#e;#t;get dev(){return this.#t}#n;get mode(){return this.#n}#r;get nlink(){return this.#r}#i;get uid(){return this.#i}#a;get gid(){return this.#a}#o;get rdev(){return this.#o}#s;get blksize(){return this.#s}#c;get ino(){return this.#c}#l;get size(){return this.#l}#u;get blocks(){return this.#u}#d;get atimeMs(){return this.#d}#f;get mtimeMs(){return this.#f}#p;get ctimeMs(){return this.#p}#m;get birthtimeMs(){return this.#m}#h;get atime(){return this.#h}#g;get mtime(){return this.#g}#_;get ctime(){return this.#_}#v;get birthtime(){return this.#v}#y;#b;#x;#S;#C;#w;#T;#E;#D;#O;get parentPath(){return(this.parent||this).fullpath()}get path(){return this.parentPath}constructor(e,t=0,n,r,i,a,o){this.name=e,this.#y=i?S(e):b(e),this.#T=t&1023,this.nocase=i,this.roots=r,this.root=n||this,this.#E=a,this.#x=o.fullpath,this.#C=o.relative,this.#w=o.relativePosix,this.parent=o.parent,this.parent?this.#e=this.parent.#e:this.#e=p(o.fs)}depth(){return this.#b===void 0?this.parent?this.#b=this.parent.depth()+1:this.#b=0:this.#b}childrenCache(){return this.#E}resolve(e){if(!e)return this;let t=this.getRootString(e),n=e.substring(t.length).split(this.splitSep);return t?this.getRoot(t).#k(n):this.#k(n)}#k(e){let t=this;for(let n of e)t=t.child(n);return t}children(){let e=this.#E.get(this);if(e)return e;let t=Object.assign([],{provisional:0});return this.#E.set(this,t),this.#T&=-17,t}child(e,t){if(e===``||e===`.`)return this;if(e===`..`)return this.parent||this;let n=this.children(),r=this.nocase?S(e):b(e);for(let e of n)if(e.#y===r)return e;let i=this.parent?this.sep:``,a=this.#x?this.#x+i+e:void 0,o=this.newChild(e,0,{...t,parent:this,fullpath:a});return this.canReaddir()||(o.#T|=128),n.push(o),o}relative(){if(this.isCWD)return``;if(this.#C!==void 0)return this.#C;let e=this.name,t=this.parent;if(!t)return this.#C=this.name;let n=t.relative();return n+(!n||!t.parent?``:this.sep)+e}relativePosix(){if(this.sep===`/`)return this.relative();if(this.isCWD)return``;if(this.#w!==void 0)return this.#w;let e=this.name,t=this.parent;if(!t)return this.#w=this.fullpathPosix();let n=t.relativePosix();return n+(!n||!t.parent?``:`/`)+e}fullpath(){if(this.#x!==void 0)return this.#x;let e=this.name,t=this.parent;return t?this.#x=t.fullpath()+(t.parent?this.sep:``)+e:this.#x=this.name}fullpathPosix(){if(this.#S!==void 0)return this.#S;if(this.sep===`/`)return this.#S=this.fullpath();if(!this.parent){let e=this.fullpath().replace(/\\/g,`/`);return/^[a-z]:\//i.test(e)?this.#S=`//?/${e}`:this.#S=e}let e=this.parent,t=e.fullpathPosix();return this.#S=t+(!t||!e.parent?``:`/`)+this.name}isUnknown(){return(this.#T&15)==0}isType(e){return this[`is${e}`]()}getType(){return this.isUnknown()?`Unknown`:this.isDirectory()?`Directory`:this.isFile()?`File`:this.isSymbolicLink()?`SymbolicLink`:this.isFIFO()?`FIFO`:this.isCharacterDevice()?`CharacterDevice`:this.isBlockDevice()?`BlockDevice`:this.isSocket()?`Socket`:`Unknown`}isFile(){return(this.#T&15)==8}isDirectory(){return(this.#T&15)==4}isCharacterDevice(){return(this.#T&15)==2}isBlockDevice(){return(this.#T&15)==6}isFIFO(){return(this.#T&15)==1}isSocket(){return(this.#T&15)==12}isSymbolicLink(){return(this.#T&10)==10}lstatCached(){return this.#T&32?this:void 0}readlinkCached(){return this.#D}realpathCached(){return this.#O}readdirCached(){let e=this.children();return e.slice(0,e.provisional)}canReadlink(){if(this.#D)return!0;if(!this.parent)return!1;let e=this.#T&15;return!(e!==0&&e!==10||this.#T&256||this.#T&128)}calledReaddir(){return!!(this.#T&16)}isENOENT(){return!!(this.#T&128)}isNamed(e){return this.nocase?this.#y===S(e):this.#y===b(e)}async readlink(){let e=this.#D;if(e)return e;if(this.canReadlink()&&this.parent)try{let e=await this.#e.promises.readlink(this.fullpath()),t=(await this.parent.realpath())?.resolve(e);if(t)return this.#D=t}catch(e){this.#L(e.code);return}}readlinkSync(){let e=this.#D;if(e)return e;if(this.canReadlink()&&this.parent)try{let e=this.#e.readlinkSync(this.fullpath()),t=this.parent.realpathSync()?.resolve(e);if(t)return this.#D=t}catch(e){this.#L(e.code);return}}#A(e){this.#T|=16;for(let t=e.provisional;t<e.length;t++){let n=e[t];n&&n.#j()}}#j(){this.#T&128||(this.#T=(this.#T|128)&-16,this.#M())}#M(){let e=this.children();e.provisional=0;for(let t of e)t.#j()}#N(){this.#T|=512,this.#P()}#P(){if(this.#T&64)return;let e=this.#T;(e&15)==4&&(e&=-16),this.#T=e|64,this.#M()}#F(e=``){e===`ENOTDIR`||e===`EPERM`?this.#P():e===`ENOENT`?this.#j():this.children().provisional=0}#I(e=``){e===`ENOTDIR`?this.parent.#P():e===`ENOENT`&&this.#j()}#L(e=``){let t=this.#T;t|=256,e===`ENOENT`&&(t|=128),(e===`EINVAL`||e===`UNKNOWN`)&&(t&=-16),this.#T=t,e===`ENOTDIR`&&this.parent&&this.parent.#P()}#R(e,t){return this.#B(e,t)||this.#z(e,t)}#z(e,t){let n=v(e),r=this.newChild(e.name,n,{parent:this}),i=r.#T&15;return i!==4&&i!==10&&i!==0&&(r.#T|=64),t.unshift(r),t.provisional++,r}#B(e,t){for(let n=t.provisional;n<t.length;n++){let r=t[n];if((this.nocase?S(e.name):b(e.name))===r.#y)return this.#V(e,r,n,t)}}#V(e,t,n,r){let i=t.name;return t.#T=t.#T&-16|v(e),i!==e.name&&(t.name=e.name),n!==r.provisional&&(n===r.length-1?r.pop():r.splice(n,1),r.unshift(t)),r.provisional++,t}async lstat(){if(!(this.#T&128))try{return this.#H(await this.#e.promises.lstat(this.fullpath())),this}catch(e){this.#I(e.code)}}lstatSync(){if(!(this.#T&128))try{return this.#H(this.#e.lstatSync(this.fullpath())),this}catch(e){this.#I(e.code)}}#H(e){let{atime:t,atimeMs:n,birthtime:r,birthtimeMs:i,blksize:a,blocks:o,ctime:s,ctimeMs:c,dev:l,gid:u,ino:d,mode:f,mtime:p,mtimeMs:m,nlink:h,rdev:g,size:y,uid:b}=e;this.#h=t,this.#d=n,this.#v=r,this.#m=i,this.#s=a,this.#u=o,this.#_=s,this.#p=c,this.#t=l,this.#a=u,this.#c=d,this.#n=f,this.#g=p,this.#f=m,this.#r=h,this.#o=g,this.#l=y,this.#i=b;let x=v(e);this.#T=this.#T&-16|x|32,x!==0&&x!==4&&x!==10&&(this.#T|=64)}#U=[];#W=!1;#G(e){this.#W=!1;let t=this.#U.slice();this.#U.length=0,t.forEach(t=>t(null,e))}readdirCB(e,t=!1){if(!this.canReaddir()){t?e(null,[]):queueMicrotask(()=>e(null,[]));return}let n=this.children();if(this.calledReaddir()){let r=n.slice(0,n.provisional);t?e(null,r):queueMicrotask(()=>e(null,r));return}if(this.#U.push(e),this.#W)return;this.#W=!0;let r=this.fullpath();this.#e.readdir(r,{withFileTypes:!0},(e,t)=>{if(e)this.#F(e.code),n.provisional=0;else{for(let e of t)this.#R(e,n);this.#A(n)}this.#G(n.slice(0,n.provisional))})}#K;async readdir(){if(!this.canReaddir())return[];let e=this.children();if(this.calledReaddir())return e.slice(0,e.provisional);let t=this.fullpath();if(this.#K)await this.#K;else{let n=()=>{};this.#K=new Promise(e=>n=e);try{for(let n of await this.#e.promises.readdir(t,{withFileTypes:!0}))this.#R(n,e);this.#A(e)}catch(t){this.#F(t.code),e.provisional=0}this.#K=void 0,n()}return e.slice(0,e.provisional)}readdirSync(){if(!this.canReaddir())return[];let e=this.children();if(this.calledReaddir())return e.slice(0,e.provisional);let t=this.fullpath();try{for(let n of this.#e.readdirSync(t,{withFileTypes:!0}))this.#R(n,e);this.#A(e)}catch(t){this.#F(t.code),e.provisional=0}return e.slice(0,e.provisional)}canReaddir(){if(this.#T&704)return!1;let e=15&this.#T;return e===0||e===4||e===10}shouldWalk(e,t){return(this.#T&4)==4&&!(this.#T&704)&&!e.has(this)&&(!t||t(this))}async realpath(){if(this.#O)return this.#O;if(!(896&this.#T))try{let e=await this.#e.promises.realpath(this.fullpath());return this.#O=this.resolve(e)}catch{this.#N()}}realpathSync(){if(this.#O)return this.#O;if(!(896&this.#T))try{let e=this.#e.realpathSync(this.fullpath());return this.#O=this.resolve(e)}catch{this.#N()}}[T](e){if(e===this)return;e.isCWD=!1,this.isCWD=!0;let t=new Set([]),n=[],r=this;for(;r&&r.parent;)t.add(r),r.#C=n.join(this.sep),r.#w=n.join(`/`),r=r.parent,n.push(`..`);for(r=e;r&&r.parent&&!t.has(r);)r.#C=void 0,r.#w=void 0,r=r.parent}};e.PathBase=E;var D=class e extends E{sep=`\\`;splitSep=g;constructor(e,t=0,n,r,i,a,o){super(e,t,n,r,i,a,o)}newChild(t,n=0,r={}){return new e(t,n,this.root,this.roots,this.nocase,this.childrenCache(),r)}getRootString(e){return a.win32.parse(e).root}getRoot(e){if(e=h(e.toUpperCase()),e===this.root.name)return this.root;for(let[t,n]of Object.entries(this.roots))if(this.sameRoot(e,t))return this.roots[e]=n;return this.roots[e]=new A(e,this).root}sameRoot(e,t=this.root.name){return e=e.toUpperCase().replace(/\//g,`\\`).replace(m,`$1\\`),e===t}};e.PathWin32=D;var O=class e extends E{splitSep=`/`;sep=`/`;constructor(e,t=0,n,r,i,a,o){super(e,t,n,r,i,a,o)}getRootString(e){return e.startsWith(`/`)?`/`:``}getRoot(e){return this.root}newChild(t,n=0,r={}){return new e(t,n,this.root,this.roots,this.nocase,this.childrenCache(),r)}};e.PathPosix=O;var k=class{root;rootPath;roots;cwd;#e;#t;#n;nocase;#r;constructor(e=process.cwd(),t,n,{nocase:r,childrenCacheSize:i=16*1024,fs:a=f}={}){this.#r=p(a),(e instanceof URL||e.startsWith(`file://`))&&(e=(0,o.fileURLToPath)(e));let s=t.resolve(e);this.roots=Object.create(null),this.rootPath=this.parseRootPath(s),this.#e=new C,this.#t=new C,this.#n=new w(i);let c=s.substring(this.rootPath.length).split(n);if(c.length===1&&!c[0]&&c.pop(),r===void 0)throw TypeError(`must provide nocase setting to PathScurryBase ctor`);this.nocase=r,this.root=this.newRoot(this.#r),this.roots[this.rootPath]=this.root;let l=this.root,u=c.length-1,d=t.sep,m=this.rootPath,h=!1;for(let e of c){let t=u--;l=l.child(e,{relative:Array(t).fill(`..`).join(d),relativePosix:Array(t).fill(`..`).join(`/`),fullpath:m+=(h?``:d)+e}),h=!0}this.cwd=l}depth(e=this.cwd){return typeof e==`string`&&(e=this.cwd.resolve(e)),e.depth()}childrenCache(){return this.#n}resolve(...e){let t=``;for(let n=e.length-1;n>=0;n--){let r=e[n];if(!(!r||r===`.`)&&(t=t?`${r}/${t}`:r,this.isAbsolute(r)))break}let n=this.#e.get(t);if(n!==void 0)return n;let r=this.cwd.resolve(t).fullpath();return this.#e.set(t,r),r}resolvePosix(...e){let t=``;for(let n=e.length-1;n>=0;n--){let r=e[n];if(!(!r||r===`.`)&&(t=t?`${r}/${t}`:r,this.isAbsolute(r)))break}let n=this.#t.get(t);if(n!==void 0)return n;let r=this.cwd.resolve(t).fullpathPosix();return this.#t.set(t,r),r}relative(e=this.cwd){return typeof e==`string`&&(e=this.cwd.resolve(e)),e.relative()}relativePosix(e=this.cwd){return typeof e==`string`&&(e=this.cwd.resolve(e)),e.relativePosix()}basename(e=this.cwd){return typeof e==`string`&&(e=this.cwd.resolve(e)),e.name}dirname(e=this.cwd){return typeof e==`string`&&(e=this.cwd.resolve(e)),(e.parent||e).fullpath()}async readdir(e=this.cwd,t={withFileTypes:!0}){typeof e==`string`?e=this.cwd.resolve(e):e instanceof E||(t=e,e=this.cwd);let{withFileTypes:n}=t;if(e.canReaddir()){let t=await e.readdir();return n?t:t.map(e=>e.name)}else return[]}readdirSync(e=this.cwd,t={withFileTypes:!0}){typeof e==`string`?e=this.cwd.resolve(e):e instanceof E||(t=e,e=this.cwd);let{withFileTypes:n=!0}=t;return e.canReaddir()?n?e.readdirSync():e.readdirSync().map(e=>e.name):[]}async lstat(e=this.cwd){return typeof e==`string`&&(e=this.cwd.resolve(e)),e.lstat()}lstatSync(e=this.cwd){return typeof e==`string`&&(e=this.cwd.resolve(e)),e.lstatSync()}async readlink(e=this.cwd,{withFileTypes:t}={withFileTypes:!1}){typeof e==`string`?e=this.cwd.resolve(e):e instanceof E||(t=e.withFileTypes,e=this.cwd);let n=await e.readlink();return t?n:n?.fullpath()}readlinkSync(e=this.cwd,{withFileTypes:t}={withFileTypes:!1}){typeof e==`string`?e=this.cwd.resolve(e):e instanceof E||(t=e.withFileTypes,e=this.cwd);let n=e.readlinkSync();return t?n:n?.fullpath()}async realpath(e=this.cwd,{withFileTypes:t}={withFileTypes:!1}){typeof e==`string`?e=this.cwd.resolve(e):e instanceof E||(t=e.withFileTypes,e=this.cwd);let n=await e.realpath();return t?n:n?.fullpath()}realpathSync(e=this.cwd,{withFileTypes:t}={withFileTypes:!1}){typeof e==`string`?e=this.cwd.resolve(e):e instanceof E||(t=e.withFileTypes,e=this.cwd);let n=e.realpathSync();return t?n:n?.fullpath()}async walk(e=this.cwd,t={}){typeof e==`string`?e=this.cwd.resolve(e):e instanceof E||(t=e,e=this.cwd);let{withFileTypes:n=!0,follow:r=!1,filter:i,walkFilter:a}=t,o=[];(!i||i(e))&&o.push(n?e:e.fullpath());let s=new Set,c=(e,t)=>{s.add(e),e.readdirCB((e,l)=>{if(e)return t(e);let u=l.length;if(!u)return t();let d=()=>{--u===0&&t()};for(let e of l)(!i||i(e))&&o.push(n?e:e.fullpath()),r&&e.isSymbolicLink()?e.realpath().then(e=>e?.isUnknown()?e.lstat():e).then(e=>e?.shouldWalk(s,a)?c(e,d):d()):e.shouldWalk(s,a)?c(e,d):d()},!0)},l=e;return new Promise((e,t)=>{c(l,n=>{if(n)return t(n);e(o)})})}walkSync(e=this.cwd,t={}){typeof e==`string`?e=this.cwd.resolve(e):e instanceof E||(t=e,e=this.cwd);let{withFileTypes:n=!0,follow:r=!1,filter:i,walkFilter:a}=t,o=[];(!i||i(e))&&o.push(n?e:e.fullpath());let s=new Set([e]);for(let e of s){let t=e.readdirSync();for(let e of t){(!i||i(e))&&o.push(n?e:e.fullpath());let t=e;if(e.isSymbolicLink()){if(!(r&&(t=e.realpathSync())))continue;t.isUnknown()&&t.lstatSync()}t.shouldWalk(s,a)&&s.add(t)}}return o}[Symbol.asyncIterator](){return this.iterate()}iterate(e=this.cwd,t={}){return typeof e==`string`?e=this.cwd.resolve(e):e instanceof E||(t=e,e=this.cwd),this.stream(e,t)[Symbol.asyncIterator]()}[Symbol.iterator](){return this.iterateSync()}*iterateSync(e=this.cwd,t={}){typeof e==`string`?e=this.cwd.resolve(e):e instanceof E||(t=e,e=this.cwd);let{withFileTypes:n=!0,follow:r=!1,filter:i,walkFilter:a}=t;(!i||i(e))&&(yield n?e:e.fullpath());let o=new Set([e]);for(let e of o){let t=e.readdirSync();for(let e of t){(!i||i(e))&&(yield n?e:e.fullpath());let t=e;if(e.isSymbolicLink()){if(!(r&&(t=e.realpathSync())))continue;t.isUnknown()&&t.lstatSync()}t.shouldWalk(o,a)&&o.add(t)}}}stream(e=this.cwd,t={}){typeof e==`string`?e=this.cwd.resolve(e):e instanceof E||(t=e,e=this.cwd);let{withFileTypes:n=!0,follow:r=!1,filter:i,walkFilter:a}=t,o=new d.Minipass({objectMode:!0});(!i||i(e))&&o.write(n?e:e.fullpath());let s=new Set,c=[e],l=0,u=()=>{let e=!1;for(;!e;){let t=c.shift();if(!t){l===0&&o.end();return}l++,s.add(t);let d=(t,p,m=!1)=>{if(t)return o.emit(`error`,t);if(r&&!m){let e=[];for(let t of p)t.isSymbolicLink()&&e.push(t.realpath().then(e=>e?.isUnknown()?e.lstat():e));if(e.length){Promise.all(e).then(()=>d(null,p,!0));return}}for(let t of p)t&&(!i||i(t))&&(o.write(n?t:t.fullpath())||(e=!0));l--;for(let e of p){let t=e.realpathCached()||e;t.shouldWalk(s,a)&&c.push(t)}e&&!o.flowing?o.once(`drain`,u):f||u()},f=!0;t.readdirCB(d,!0),f=!1}};return u(),o}streamSync(e=this.cwd,t={}){typeof e==`string`?e=this.cwd.resolve(e):e instanceof E||(t=e,e=this.cwd);let{withFileTypes:n=!0,follow:r=!1,filter:i,walkFilter:a}=t,o=new d.Minipass({objectMode:!0}),s=new Set;(!i||i(e))&&o.write(n?e:e.fullpath());let c=[e],l=0,u=()=>{let e=!1;for(;!e;){let t=c.shift();if(!t){l===0&&o.end();return}l++,s.add(t);let u=t.readdirSync();for(let t of u)(!i||i(t))&&(o.write(n?t:t.fullpath())||(e=!0));l--;for(let e of u){let t=e;if(e.isSymbolicLink()){if(!(r&&(t=e.realpathSync())))continue;t.isUnknown()&&t.lstatSync()}t.shouldWalk(s,a)&&c.push(t)}}e&&!o.flowing&&o.once(`drain`,u)};return u(),o}chdir(e=this.cwd){let t=this.cwd;this.cwd=typeof e==`string`?this.cwd.resolve(e):e,this.cwd[T](t)}};e.PathScurryBase=k;var A=class extends k{sep=`\\`;constructor(e=process.cwd(),t={}){let{nocase:n=!0}=t;super(e,a.win32,`\\`,{...t,nocase:n}),this.nocase=n;for(let e=this.cwd;e;e=e.parent)e.nocase=this.nocase}parseRootPath(e){return a.win32.parse(e).root.toUpperCase()}newRoot(e){return new D(this.rootPath,4,void 0,this.roots,this.nocase,this.childrenCache(),{fs:e})}isAbsolute(e){return e.startsWith(`/`)||e.startsWith(`\\`)||/^[a-z]:(\/|\\)/i.test(e)}};e.PathScurryWin32=A;var j=class extends k{sep=`/`;constructor(e=process.cwd(),t={}){let{nocase:n=!1}=t;super(e,a.posix,`/`,{...t,nocase:n}),this.nocase=n}parseRootPath(e){return`/`}newRoot(e){return new O(this.rootPath,4,void 0,this.roots,this.nocase,this.childrenCache(),{fs:e})}isAbsolute(e){return e.startsWith(`/`)}};e.PathScurryPosix=j;var M=class extends j{constructor(e=process.cwd(),t={}){let{nocase:n=!0}=t;super(e,{...t,nocase:n})}};e.PathScurryDarwin=M,e.Path=process.platform===`win32`?D:O,e.PathScurry=process.platform===`win32`?A:process.platform===`darwin`?M:j})),on=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.Pattern=void 0;let t=tn(),n=e=>e.length>=1,r=e=>e.length>=1;e.Pattern=class e{#e;#t;#n;length;#r;#i;#a;#o;#s;#c;#l=!0;constructor(e,t,i,a){if(!n(e))throw TypeError(`empty pattern list`);if(!r(t))throw TypeError(`empty glob list`);if(t.length!==e.length)throw TypeError(`mismatched pattern list and glob list lengths`);if(this.length=e.length,i<0||i>=this.length)throw TypeError(`index out of range`);if(this.#e=e,this.#t=t,this.#n=i,this.#r=a,this.#n===0){if(this.isUNC()){let[e,t,n,r,...i]=this.#e,[a,o,s,c,...l]=this.#t;i[0]===``&&(i.shift(),l.shift());let u=[e,t,n,r,``].join(`/`),d=[a,o,s,c,``].join(`/`);this.#e=[u,...i],this.#t=[d,...l],this.length=this.#e.length}else if(this.isDrive()||this.isAbsolute()){let[e,...t]=this.#e,[n,...r]=this.#t;t[0]===``&&(t.shift(),r.shift());let i=e+`/`,a=n+`/`;this.#e=[i,...t],this.#t=[a,...r],this.length=this.#e.length}}}pattern(){return this.#e[this.#n]}isString(){return typeof this.#e[this.#n]==`string`}isGlobstar(){return this.#e[this.#n]===t.GLOBSTAR}isRegExp(){return this.#e[this.#n]instanceof RegExp}globString(){return this.#a=this.#a||(this.#n===0?this.isAbsolute()?this.#t[0]+this.#t.slice(1).join(`/`):this.#t.join(`/`):this.#t.slice(this.#n).join(`/`))}hasMore(){return this.length>this.#n+1}rest(){return this.#i===void 0?this.hasMore()?(this.#i=new e(this.#e,this.#t,this.#n+1,this.#r),this.#i.#c=this.#c,this.#i.#s=this.#s,this.#i.#o=this.#o,this.#i):this.#i=null:this.#i}isUNC(){let e=this.#e;return this.#s===void 0?this.#s=this.#r===`win32`&&this.#n===0&&e[0]===``&&e[1]===``&&typeof e[2]==`string`&&!!e[2]&&typeof e[3]==`string`&&!!e[3]:this.#s}isDrive(){let e=this.#e;return this.#o===void 0?this.#o=this.#r===`win32`&&this.#n===0&&this.length>1&&typeof e[0]==`string`&&/^[a-z]:$/i.test(e[0]):this.#o}isAbsolute(){let e=this.#e;return this.#c===void 0?this.#c=e[0]===``&&e.length>1||this.isDrive()||this.isUNC():this.#c}root(){let e=this.#e[0];return typeof e==`string`&&this.isAbsolute()&&this.#n===0?e:``}checkFollowGlobstar(){return!(this.#n===0||!this.isGlobstar()||!this.#l)}markFollowGlobstar(){return this.#n===0||!this.isGlobstar()||!this.#l?!1:(this.#l=!1,!0)}}})),sn=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.Ignore=void 0;let t=tn(),n=on(),r=typeof process==`object`&&process&&typeof process.platform==`string`?process.platform:`linux`;e.Ignore=class{relative;relativeChildren;absolute;absoluteChildren;platform;mmopts;constructor(e,{nobrace:t,nocase:n,noext:i,noglobstar:a,platform:o=r}){this.relative=[],this.absolute=[],this.relativeChildren=[],this.absoluteChildren=[],this.platform=o,this.mmopts={dot:!0,nobrace:t,nocase:n,noext:i,noglobstar:a,optimizationLevel:2,platform:o,nocomment:!0,nonegate:!0};for(let t of e)this.add(t)}add(e){let r=new t.Minimatch(e,this.mmopts);for(let e=0;e<r.set.length;e++){let i=r.set[e],a=r.globParts[e];if(!i||!a)throw Error(`invalid pattern object`);for(;i[0]===`.`&&a[0]===`.`;)i.shift(),a.shift();let o=new n.Pattern(i,a,0,this.platform),s=new t.Minimatch(o.globString(),this.mmopts),c=a[a.length-1]===`**`,l=o.isAbsolute();l?this.absolute.push(s):this.relative.push(s),c&&(l?this.absoluteChildren.push(s):this.relativeChildren.push(s))}}ignored(e){let t=e.fullpath(),n=`${t}/`,r=e.relative()||`.`,i=`${r}/`;for(let e of this.relative)if(e.match(r)||e.match(i))return!0;for(let e of this.absolute)if(e.match(t)||e.match(n))return!0;return!1}childrenIgnored(e){let t=e.fullpath()+`/`,n=(e.relative()||`.`)+`/`;for(let e of this.relativeChildren)if(e.match(n))return!0;for(let e of this.absoluteChildren)if(e.match(t))return!0;return!1}}})),cn=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.Processor=e.SubWalks=e.MatchRecord=e.HasWalkedCache=void 0;let t=tn();var n=class e{store;constructor(e=new Map){this.store=e}copy(){return new e(new Map(this.store))}hasWalked(e,t){return this.store.get(e.fullpath())?.has(t.globString())}storeWalked(e,t){let n=e.fullpath(),r=this.store.get(n);r?r.add(t.globString()):this.store.set(n,new Set([t.globString()]))}};e.HasWalkedCache=n;var r=class{store=new Map;add(e,t,n){let r=(t?2:0)|(n?1:0),i=this.store.get(e);this.store.set(e,i===void 0?r:r&i)}entries(){return[...this.store.entries()].map(([e,t])=>[e,!!(t&2),!!(t&1)])}};e.MatchRecord=r;var i=class{store=new Map;add(e,t){if(!e.canReaddir())return;let n=this.store.get(e);n?n.find(e=>e.globString()===t.globString())||n.push(t):this.store.set(e,[t])}get(e){let t=this.store.get(e);if(!t)throw Error(`attempting to walk unknown path`);return t}entries(){return this.keys().map(e=>[e,this.store.get(e)])}keys(){return[...this.store.keys()].filter(e=>e.canReaddir())}};e.SubWalks=i,e.Processor=class e{hasWalkedCache;matches=new r;subwalks=new i;patterns;follow;dot;opts;constructor(e,t){this.opts=e,this.follow=!!e.follow,this.dot=!!e.dot,this.hasWalkedCache=t?t.copy():new n}processPatterns(e,n){this.patterns=n;let r=n.map(t=>[e,t]);for(let[e,n]of r){this.hasWalkedCache.storeWalked(e,n);let r=n.root(),i=n.isAbsolute()&&this.opts.absolute!==!1;if(r){e=e.resolve(r===`/`&&this.opts.root!==void 0?this.opts.root:r);let t=n.rest();if(t)n=t;else{this.matches.add(e,!0,!1);continue}}if(e.isENOENT())continue;let a,o,s=!1;for(;typeof(a=n.pattern())==`string`&&(o=n.rest());)e=e.resolve(a),n=o,s=!0;if(a=n.pattern(),o=n.rest(),s){if(this.hasWalkedCache.hasWalked(e,n))continue;this.hasWalkedCache.storeWalked(e,n)}if(typeof a==`string`){let t=a===`..`||a===``||a===`.`;this.matches.add(e.resolve(a),i,t);continue}else if(a===t.GLOBSTAR){(!e.isSymbolicLink()||this.follow||n.checkFollowGlobstar())&&this.subwalks.add(e,n);let t=o?.pattern(),r=o?.rest();if(!o||(t===``||t===`.`)&&!r)this.matches.add(e,i,t===``||t===`.`);else if(t===`..`){let t=e.parent||e;r?this.hasWalkedCache.hasWalked(t,r)||this.subwalks.add(t,r):this.matches.add(t,i,!0)}}else a instanceof RegExp&&this.subwalks.add(e,n)}return this}subwalkTargets(){return this.subwalks.keys()}child(){return new e(this.opts,this.hasWalkedCache)}filterEntries(e,n){let r=this.subwalks.get(e),i=this.child();for(let e of n)for(let n of r){let r=n.isAbsolute(),a=n.pattern(),o=n.rest();a===t.GLOBSTAR?i.testGlobstar(e,n,o,r):a instanceof RegExp?i.testRegExp(e,a,o,r):i.testString(e,a,o,r)}return i}testGlobstar(e,t,n,r){if((this.dot||!e.name.startsWith(`.`))&&(t.hasMore()||this.matches.add(e,r,!1),e.canReaddir()&&(this.follow||!e.isSymbolicLink()?this.subwalks.add(e,t):e.isSymbolicLink()&&(n&&t.checkFollowGlobstar()?this.subwalks.add(e,n):t.markFollowGlobstar()&&this.subwalks.add(e,t)))),n){let t=n.pattern();if(typeof t==`string`&&t!==`..`&&t!==``&&t!==`.`)this.testString(e,t,n.rest(),r);else if(t===`..`){let t=e.parent||e;this.subwalks.add(t,n)}else t instanceof RegExp&&this.testRegExp(e,t,n.rest(),r)}}testRegExp(e,t,n,r){t.test(e.name)&&(n?this.subwalks.add(e,n):this.matches.add(e,r,!1))}testString(e,t,n,r){e.isNamed(t)&&(n?this.subwalks.add(e,n):this.matches.add(e,r,!1))}}})),ln=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.GlobStream=e.GlobWalker=e.GlobUtil=void 0;let t=rn(),n=sn(),r=cn(),i=(e,t)=>typeof e==`string`?new n.Ignore([e],t):Array.isArray(e)?new n.Ignore(e,t):e;var a=class{path;patterns;opts;seen=new Set;paused=!1;aborted=!1;#e=[];#t;#n;signal;maxDepth;includeChildMatches;constructor(e,t,n){if(this.patterns=e,this.path=t,this.opts=n,this.#n=!n.posix&&n.platform===`win32`?`\\`:`/`,this.includeChildMatches=n.includeChildMatches!==!1,(n.ignore||!this.includeChildMatches)&&(this.#t=i(n.ignore??[],n),!this.includeChildMatches&&typeof this.#t.add!=`function`))throw Error(`cannot ignore child matches, ignore lacks add() method.`);this.maxDepth=n.maxDepth||1/0,n.signal&&(this.signal=n.signal,this.signal.addEventListener(`abort`,()=>{this.#e.length=0}))}#r(e){return this.seen.has(e)||!!this.#t?.ignored?.(e)}#i(e){return!!this.#t?.childrenIgnored?.(e)}pause(){this.paused=!0}resume(){if(this.signal?.aborted)return;this.paused=!1;let e;for(;!this.paused&&(e=this.#e.shift());)e()}onResume(e){this.signal?.aborted||(this.paused?this.#e.push(e):e())}async matchCheck(e,t){if(t&&this.opts.nodir)return;let n;if(this.opts.realpath){if(n=e.realpathCached()||await e.realpath(),!n)return;e=n}let r=e.isUnknown()||this.opts.stat?await e.lstat():e;if(this.opts.follow&&this.opts.nodir&&r?.isSymbolicLink()){let e=await r.realpath();e&&(e.isUnknown()||this.opts.stat)&&await e.lstat()}return this.matchCheckTest(r,t)}matchCheckTest(e,t){return e&&(this.maxDepth===1/0||e.depth()<=this.maxDepth)&&(!t||e.canReaddir())&&(!this.opts.nodir||!e.isDirectory())&&(!this.opts.nodir||!this.opts.follow||!e.isSymbolicLink()||!e.realpathCached()?.isDirectory())&&!this.#r(e)?e:void 0}matchCheckSync(e,t){if(t&&this.opts.nodir)return;let n;if(this.opts.realpath){if(n=e.realpathCached()||e.realpathSync(),!n)return;e=n}let r=e.isUnknown()||this.opts.stat?e.lstatSync():e;if(this.opts.follow&&this.opts.nodir&&r?.isSymbolicLink()){let e=r.realpathSync();e&&(e?.isUnknown()||this.opts.stat)&&e.lstatSync()}return this.matchCheckTest(r,t)}matchFinish(e,t){if(this.#r(e))return;if(!this.includeChildMatches&&this.#t?.add){let t=`${e.relativePosix()}/**`;this.#t.add(t)}let n=this.opts.absolute===void 0?t:this.opts.absolute;this.seen.add(e);let r=this.opts.mark&&e.isDirectory()?this.#n:``;if(this.opts.withFileTypes)this.matchEmit(e);else if(n){let t=this.opts.posix?e.fullpathPosix():e.fullpath();this.matchEmit(t+r)}else{let t=this.opts.posix?e.relativePosix():e.relative(),n=this.opts.dotRelative&&!t.startsWith(`..`+this.#n)?`.`+this.#n:``;this.matchEmit(t?n+t+r:`.`+r)}}async match(e,t,n){let r=await this.matchCheck(e,n);r&&this.matchFinish(r,t)}matchSync(e,t,n){let r=this.matchCheckSync(e,n);r&&this.matchFinish(r,t)}walkCB(e,t,n){this.signal?.aborted&&n(),this.walkCB2(e,t,new r.Processor(this.opts),n)}walkCB2(e,t,n,r){if(this.#i(e))return r();if(this.signal?.aborted&&r(),this.paused){this.onResume(()=>this.walkCB2(e,t,n,r));return}n.processPatterns(e,t);let i=1,a=()=>{--i===0&&r()};for(let[e,t,r]of n.matches.entries())this.#r(e)||(i++,this.match(e,t,r).then(()=>a()));for(let e of n.subwalkTargets()){if(this.maxDepth!==1/0&&e.depth()>=this.maxDepth)continue;i++;let t=e.readdirCached();e.calledReaddir()?this.walkCB3(e,t,n,a):e.readdirCB((t,r)=>this.walkCB3(e,r,n,a),!0)}a()}walkCB3(e,t,n,r){n=n.filterEntries(e,t);let i=1,a=()=>{--i===0&&r()};for(let[e,t,r]of n.matches.entries())this.#r(e)||(i++,this.match(e,t,r).then(()=>a()));for(let[e,t]of n.subwalks.entries())i++,this.walkCB2(e,t,n.child(),a);a()}walkCBSync(e,t,n){this.signal?.aborted&&n(),this.walkCB2Sync(e,t,new r.Processor(this.opts),n)}walkCB2Sync(e,t,n,r){if(this.#i(e))return r();if(this.signal?.aborted&&r(),this.paused){this.onResume(()=>this.walkCB2Sync(e,t,n,r));return}n.processPatterns(e,t);let i=1,a=()=>{--i===0&&r()};for(let[e,t,r]of n.matches.entries())this.#r(e)||this.matchSync(e,t,r);for(let e of n.subwalkTargets()){if(this.maxDepth!==1/0&&e.depth()>=this.maxDepth)continue;i++;let t=e.readdirSync();this.walkCB3Sync(e,t,n,a)}a()}walkCB3Sync(e,t,n,r){n=n.filterEntries(e,t);let i=1,a=()=>{--i===0&&r()};for(let[e,t,r]of n.matches.entries())this.#r(e)||this.matchSync(e,t,r);for(let[e,t]of n.subwalks.entries())i++,this.walkCB2Sync(e,t,n.child(),a);a()}};e.GlobUtil=a,e.GlobWalker=class extends a{matches=new Set;constructor(e,t,n){super(e,t,n)}matchEmit(e){this.matches.add(e)}async walk(){if(this.signal?.aborted)throw this.signal.reason;return this.path.isUnknown()&&await this.path.lstat(),await new Promise((e,t)=>{this.walkCB(this.path,this.patterns,()=>{this.signal?.aborted?t(this.signal.reason):e(this.matches)})}),this.matches}walkSync(){if(this.signal?.aborted)throw this.signal.reason;return this.path.isUnknown()&&this.path.lstatSync(),this.walkCBSync(this.path,this.patterns,()=>{if(this.signal?.aborted)throw this.signal.reason}),this.matches}},e.GlobStream=class extends a{results;constructor(e,n,r){super(e,n,r),this.results=new t.Minipass({signal:this.signal,objectMode:!0}),this.results.on(`drain`,()=>this.resume()),this.results.on(`resume`,()=>this.resume())}matchEmit(e){this.results.write(e),this.results.flowing||this.pause()}stream(){let e=this.path;return e.isUnknown()?e.lstat().then(()=>{this.walkCB(e,this.patterns,()=>this.results.end())}):this.walkCB(e,this.patterns,()=>this.results.end()),this.results}streamSync(){return this.path.isUnknown()&&this.path.lstatSync(),this.walkCBSync(this.path,this.patterns,()=>this.results.end()),this.results}}})),un=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.Glob=void 0;let t=tn(),n=require(`node:url`),r=an(),i=on(),a=ln(),o=typeof process==`object`&&process&&typeof process.platform==`string`?process.platform:`linux`;e.Glob=class{absolute;cwd;root;dot;dotRelative;follow;ignore;magicalBraces;mark;matchBase;maxDepth;nobrace;nocase;nodir;noext;noglobstar;pattern;platform;realpath;scurry;stat;signal;windowsPathsNoEscape;withFileTypes;includeChildMatches;opts;patterns;constructor(e,a){if(!a)throw TypeError(`glob options required`);if(this.withFileTypes=!!a.withFileTypes,this.signal=a.signal,this.follow=!!a.follow,this.dot=!!a.dot,this.dotRelative=!!a.dotRelative,this.nodir=!!a.nodir,this.mark=!!a.mark,a.cwd?(a.cwd instanceof URL||a.cwd.startsWith(`file://`))&&(a.cwd=(0,n.fileURLToPath)(a.cwd)):this.cwd=``,this.cwd=a.cwd||``,this.root=a.root,this.magicalBraces=!!a.magicalBraces,this.nobrace=!!a.nobrace,this.noext=!!a.noext,this.realpath=!!a.realpath,this.absolute=a.absolute,this.includeChildMatches=a.includeChildMatches!==!1,this.noglobstar=!!a.noglobstar,this.matchBase=!!a.matchBase,this.maxDepth=typeof a.maxDepth==`number`?a.maxDepth:1/0,this.stat=!!a.stat,this.ignore=a.ignore,this.withFileTypes&&this.absolute!==void 0)throw Error(`cannot set absolute and withFileTypes:true`);if(typeof e==`string`&&(e=[e]),this.windowsPathsNoEscape=!!a.windowsPathsNoEscape||a.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(e=e.map(e=>e.replace(/\\/g,`/`))),this.matchBase){if(a.noglobstar)throw TypeError(`base matching requires globstar`);e=e.map(e=>e.includes(`/`)?e:`./**/${e}`)}if(this.pattern=e,this.platform=a.platform||o,this.opts={...a,platform:this.platform},a.scurry){if(this.scurry=a.scurry,a.nocase!==void 0&&a.nocase!==a.scurry.nocase)throw Error(`nocase option contradicts provided scurry option`)}else this.scurry=new(a.platform===`win32`?r.PathScurryWin32:a.platform===`darwin`?r.PathScurryDarwin:a.platform?r.PathScurryPosix:r.PathScurry)(this.cwd,{nocase:a.nocase,fs:a.fs});this.nocase=this.scurry.nocase;let s=this.platform===`darwin`||this.platform===`win32`,c={...a,dot:this.dot,matchBase:this.matchBase,nobrace:this.nobrace,nocase:this.nocase,nocaseMagicOnly:s,nocomment:!0,noext:this.noext,nonegate:!0,optimizationLevel:2,platform:this.platform,windowsPathsNoEscape:this.windowsPathsNoEscape,debug:!!this.opts.debug},[l,u]=this.pattern.map(e=>new t.Minimatch(e,c)).reduce((e,t)=>(e[0].push(...t.set),e[1].push(...t.globParts),e),[[],[]]);this.patterns=l.map((e,t)=>{let n=u[t];if(!n)throw Error(`invalid pattern object`);return new i.Pattern(e,n,0,this.platform)})}async walk(){return[...await new a.GlobWalker(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth===1/0?1/0:this.maxDepth+this.scurry.cwd.depth(),platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).walk()]}walkSync(){return[...new a.GlobWalker(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth===1/0?1/0:this.maxDepth+this.scurry.cwd.depth(),platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).walkSync()]}stream(){return new a.GlobStream(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth===1/0?1/0:this.maxDepth+this.scurry.cwd.depth(),platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).stream()}streamSync(){return new a.GlobStream(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth===1/0?1/0:this.maxDepth+this.scurry.cwd.depth(),platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).streamSync()}iterateSync(){return this.streamSync()[Symbol.iterator]()}[Symbol.iterator](){return this.iterateSync()}iterate(){return this.stream()[Symbol.asyncIterator]()}[Symbol.asyncIterator](){return this.iterate()}}})),dn=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.hasMagic=void 0;let t=tn();e.hasMagic=(e,n={})=>{Array.isArray(e)||(e=[e]);for(let r of e)if(new t.Minimatch(r,n).hasMagic())return!0;return!1}})),fn=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.glob=e.sync=e.iterate=e.iterateSync=e.stream=e.streamSync=e.Ignore=e.hasMagic=e.Glob=e.unescape=e.escape=void 0,e.globStreamSync=c,e.globStream=l,e.globSync=u,e.globIterateSync=f,e.globIterate=p;let t=tn(),n=un(),r=dn();var i=tn();Object.defineProperty(e,`escape`,{enumerable:!0,get:function(){return i.escape}}),Object.defineProperty(e,`unescape`,{enumerable:!0,get:function(){return i.unescape}});var a=un();Object.defineProperty(e,`Glob`,{enumerable:!0,get:function(){return a.Glob}});var o=dn();Object.defineProperty(e,`hasMagic`,{enumerable:!0,get:function(){return o.hasMagic}});var s=sn();Object.defineProperty(e,`Ignore`,{enumerable:!0,get:function(){return s.Ignore}});function c(e,t={}){return new n.Glob(e,t).streamSync()}function l(e,t={}){return new n.Glob(e,t).stream()}function u(e,t={}){return new n.Glob(e,t).walkSync()}async function d(e,t={}){return new n.Glob(e,t).walk()}function f(e,t={}){return new n.Glob(e,t).iterateSync()}function p(e,t={}){return new n.Glob(e,t).iterate()}e.streamSync=c,e.stream=Object.assign(l,{sync:c}),e.iterateSync=f,e.iterate=Object.assign(p,{sync:f}),e.sync=Object.assign(u,{stream:c,iterate:f}),e.glob=Object.assign(d,{glob:d,globSync:u,sync:e.sync,globStream:l,stream:e.stream,globStreamSync:c,streamSync:e.streamSync,globIterate:p,iterate:e.iterate,globIterateSync:f,iterateSync:e.iterateSync,Glob:n.Glob,hasMagic:r.hasMagic,escape:t.escape,unescape:t.unescape}),e.glob.glob=e.glob})),pn=e(((e,t)=>{var n=u(),r=require(`path`),i=rt(),a=Bt(),o=Kt(),s=Yt(),c=fn(),l=t.exports={},d=/[\/\\]/g,f=function(e,t){var n=[];return i(e).forEach(function(e){var r=e.indexOf(`!`)===0;r&&(e=e.slice(1));var i=t(e);n=r?a(n,i):o(n,i)}),n};l.exists=function(){var e=r.join.apply(r,arguments);return n.existsSync(e)},l.expand=function(...e){var t=s(e[0])?e.shift():{},i=Array.isArray(e[0])?e[0]:e;if(i.length===0)return[];var a=f(i,function(e){return c.sync(e,t)});return t.filter&&(a=a.filter(function(e){e=r.join(t.cwd||``,e);try{return typeof t.filter==`function`?t.filter(e):n.statSync(e)[t.filter]()}catch{return!1}})),a},l.expandMapping=function(e,t,n){n=Object.assign({rename:function(e,t){return r.join(e||``,t)}},n);var i=[],a={};return l.expand(n,e).forEach(function(e){var o=e;n.flatten&&(o=r.basename(o)),n.ext&&(o=o.replace(/(\.[^\/]*)?$/,n.ext));var s=n.rename(t,o,n);n.cwd&&(e=r.join(n.cwd,e)),s=s.replace(d,`/`),e=e.replace(d,`/`),a[s]?a[s].src.push(e):(i.push({src:[e],dest:s}),a[s]=i[i.length-1])}),i},l.normalizeFilesArray=function(e){var t=[];return e.forEach(function(e){(`src`in e||`dest`in e)&&t.push(e)}),t.length===0?[]:(t=_(t).chain().forEach(function(e){!(`src`in e)||!e.src||(Array.isArray(e.src)?e.src=i(e.src):e.src=[e.src])}).map(function(e){var t=Object.assign({},e);if(delete t.src,delete t.dest,e.expand)return l.expandMapping(e.src,e.dest,t).map(function(t){var n=Object.assign({},e);return n.orig=Object.assign({},e),n.src=t.src,n.dest=t.dest,[`expand`,`cwd`,`flatten`,`rename`,`ext`].forEach(function(e){delete n[e]}),n});var n=Object.assign({},e);return n.orig=Object.assign({},e),`src`in n&&Object.defineProperty(n,`src`,{enumerable:!0,get:function n(){var r;return`result`in n||(r=e.src,r=Array.isArray(r)?i(r):[r],n.result=l.expand(t,r)),n.result}}),`dest`in n&&(n.dest=e.dest),n}).flatten().value(),t)}})),mn=e(((e,t)=>{var n=u(),r=require(`path`),i=d(),a=j(),o=M(),s=Ee();require(`stream`).Stream;var c=$e().PassThrough,l=t.exports={};l.file=pn(),l.collectStream=function(e,t){var n=[],r=0;e.on(`error`,t),e.on(`data`,function(e){n.push(e),r+=e.length}),e.on(`end`,function(){var e=Buffer.alloc(r),i=0;n.forEach(function(t){t.copy(e,i),i+=t.length}),t(null,e)})},l.dateify=function(e){return e||=new Date,e=e instanceof Date?e:typeof e==`string`?new Date(e):new Date,e},l.defaults=function(e,t,n){var r=arguments;return r[0]=r[0]||{},s(...r)},l.isStream=function(e){return i(e)},l.lazyReadStream=function(e){return new a.Readable(function(){return n.createReadStream(e)})},l.normalizeInputSource=function(e){return e===null?Buffer.alloc(0):typeof e==`string`?Buffer.from(e):l.isStream(e)?e.pipe(new c):e},l.sanitizePath=function(e){return o(e,!1).replace(/^\w+:/,``).replace(/^(\.\.\/|\/)+/,``)},l.trailingSlashIt=function(e){return e.slice(-1)===`/`?e:e+`/`},l.unixifyPath=function(e){return o(e,!1).replace(/^\w+:/,``)},l.walkdir=function(e,t,i){var a=[];typeof t==`function`&&(i=t,t=e),n.readdir(e,function(o,s){var c=0,u,d;if(o)return i(o);(function o(){if(u=s[c++],!u)return i(null,a);d=r.join(e,u),n.stat(d,function(e,n){a.push({path:d,relative:r.relative(t,d).replace(/\\/g,`/`),stats:n}),n&&n.isDirectory()?l.walkdir(d,t,function(e,t){if(e)return i(e);t.forEach(function(e){a.push(e)}),o()}):o()})})()})}})),hn=e(((e,t)=>{
|
|
20
20
|
/**
|
|
21
21
|
* Archiver Core
|
|
22
22
|
*
|
|
@@ -48,7 +48,7 @@ var n=require(`util`).inherits,r=An().ZipArchiveOutputStream,i=An().ZipArchiveEn
|
|
|
48
48
|
* @license [MIT]{@link https://github.com/archiverjs/node-archiver/blob/master/LICENSE}
|
|
49
49
|
* @copyright (c) 2012-2014 Chris Talkington, contributors.
|
|
50
50
|
*/
|
|
51
|
-
var n=jn(),r=mn(),i=function(e){if(!(this instanceof i))return new i(e);e=this.options=r.defaults(e,{comment:``,forceUTC:!1,namePrependSlash:!1,store:!1}),this.supports={directory:!0,symlink:!0},this.engine=new n(e)};i.prototype.append=function(e,t,n){this.engine.entry(e,t,n)},i.prototype.finalize=function(){this.engine.finalize()},i.prototype.on=function(){return this.engine.on.apply(this.engine,arguments)},i.prototype.pipe=function(){return this.engine.pipe.apply(this.engine,arguments)},i.prototype.unpipe=function(){return this.engine.unpipe.apply(this.engine,arguments)},t.exports=i})),Nn=e(((e,t)=>{t.exports=require(`events`)})),Pn=e(((e,t)=>{t.exports=class{constructor(e){if(!(e>0)||e-1&e)throw Error(`Max size for a FixedFIFO should be a power of two`);this.buffer=Array(e),this.mask=e-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(e){return this.buffer[this.top]===void 0?(this.buffer[this.top]=e,this.top=this.top+1&this.mask,!0):!1}shift(){let e=this.buffer[this.btm];if(e!==void 0)return this.buffer[this.btm]=void 0,this.btm=this.btm+1&this.mask,e}peek(){return this.buffer[this.btm]}isEmpty(){return this.buffer[this.btm]===void 0}}})),Fn=e(((e,t)=>{let n=Pn();t.exports=class{constructor(e){this.hwm=e||16,this.head=new n(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)){let t=this.head;this.head=t.next=new n(2*this.head.buffer.length),this.head.push(e)}}shift(){this.length!==0&&this.length--;let e=this.tail.shift();if(e===void 0&&this.tail.next){let e=this.tail.next;return this.tail.next=null,this.tail=e,this.tail.shift()}return e}peek(){let e=this.tail.peek();return e===void 0&&this.tail.next?this.tail.next.peek():e}isEmpty(){return this.length===0}}})),In=e(((e,t)=>{function n(e){return Buffer.isBuffer(e)||e instanceof Uint8Array}function r(e){return Buffer.isEncoding(e)}function i(e,t,n){return Buffer.alloc(e,t,n)}function a(e){return Buffer.allocUnsafe(e)}function o(e){return Buffer.allocUnsafeSlow(e)}function s(e,t){return Buffer.byteLength(e,t)}function c(e,t){return Buffer.compare(e,t)}function l(e,t){return Buffer.concat(e,t)}function u(e,t,n,r,i){return x(e).copy(t,n,r,i)}function d(e,t){return x(e).equals(t)}function f(e,t,n,r,i){return x(e).fill(t,n,r,i)}function p(e,t,n){return Buffer.from(e,t,n)}function m(e,t,n,r){return x(e).includes(t,n,r)}function h(e,t,n,r){return x(e).indexOf(t,n,r)}function g(e,t,n,r){return x(e).lastIndexOf(t,n,r)}function v(e){return x(e).swap16()}function y(e){return x(e).swap32()}function b(e){return x(e).swap64()}function x(e){return Buffer.isBuffer(e)?e:Buffer.from(e.buffer,e.byteOffset,e.byteLength)}function S(e,t,n,r){return x(e).toString(t,n,r)}function C(e,t,n,r,i){return x(e).write(t,n,r,i)}function w(e,t){return x(e).readDoubleBE(t)}function T(e,t){return x(e).readDoubleLE(t)}function E(e,t){return x(e).readFloatBE(t)}function D(e,t){return x(e).readFloatLE(t)}function O(e,t){return x(e).readInt32BE(t)}function k(e,t){return x(e).readInt32LE(t)}function A(e,t){return x(e).readUInt32BE(t)}function j(e,t){return x(e).readUInt32LE(t)}function M(e,t,n){return x(e).writeDoubleBE(t,n)}function N(e,t,n){return x(e).writeDoubleLE(t,n)}function P(e,t,n){return x(e).writeFloatBE(t,n)}function F(e,t,n){return x(e).writeFloatLE(t,n)}function I(e,t,n){return x(e).writeInt32BE(t,n)}function L(e,t,n){return x(e).writeInt32LE(t,n)}function R(e,t,n){return x(e).writeUInt32BE(t,n)}function z(e,t,n){return x(e).writeUInt32LE(t,n)}t.exports={isBuffer:n,isEncoding:r,alloc:i,allocUnsafe:a,allocUnsafeSlow:o,byteLength:s,compare:c,concat:l,copy:u,equals:d,fill:f,from:p,includes:m,indexOf:h,lastIndexOf:g,swap16:v,swap32:y,swap64:b,toBuffer:x,toString:S,write:C,readDoubleBE:w,readDoubleLE:T,readFloatBE:E,readFloatLE:D,readInt32BE:O,readInt32LE:k,readUInt32BE:A,readUInt32LE:j,writeDoubleBE:M,writeDoubleLE:N,writeFloatBE:P,writeFloatLE:F,writeInt32BE:I,writeInt32LE:L,writeUInt32BE:R,writeUInt32LE:z}})),Ln=e(((e,t)=>{let n=In();t.exports=class{constructor(e){this.encoding=e}get remaining(){return 0}decode(e){return n.toString(e,this.encoding)}flush(){return``}}})),Rn=e(((e,t)=>{let n=In();t.exports=class{constructor(){this.codePoint=0,this.bytesSeen=0,this.bytesNeeded=0,this.lowerBoundary=128,this.upperBoundary=191}get remaining(){return this.bytesSeen}decode(e){if(this.bytesNeeded===0){let t=!0;for(let n=Math.max(0,e.byteLength-4),r=e.byteLength;n<r&&t;n++)t=e[n]<=127;if(t)return n.toString(e,`utf8`)}let t=``;for(let n=0,r=e.byteLength;n<r;n++){let r=e[n];if(this.bytesNeeded===0){r<=127?t+=String.fromCharCode(r):(this.bytesSeen=1,r>=194&&r<=223?(this.bytesNeeded=2,this.codePoint=r&31):r>=224&&r<=239?(r===224?this.lowerBoundary=160:r===237&&(this.upperBoundary=159),this.bytesNeeded=3,this.codePoint=r&15):r>=240&&r<=244?(r===240&&(this.lowerBoundary=144),r===244&&(this.upperBoundary=143),this.bytesNeeded=4,this.codePoint=r&7):t+=`�`);continue}if(r<this.lowerBoundary||r>this.upperBoundary){this.codePoint=0,this.bytesNeeded=0,this.bytesSeen=0,this.lowerBoundary=128,this.upperBoundary=191,t+=`�`;continue}this.lowerBoundary=128,this.upperBoundary=191,this.codePoint=this.codePoint<<6|r&63,this.bytesSeen++,this.bytesSeen===this.bytesNeeded&&(t+=String.fromCodePoint(this.codePoint),this.codePoint=0,this.bytesNeeded=0,this.bytesSeen=0)}return t}flush(){let e=this.bytesNeeded>0?`�`:``;return this.codePoint=0,this.bytesNeeded=0,this.bytesSeen=0,this.lowerBoundary=128,this.upperBoundary=191,e}}})),zn=e(((e,t)=>{let n=Ln(),r=Rn();t.exports=class{constructor(e=`utf8`){switch(this.encoding=i(e),this.encoding){case`utf8`:this.decoder=new r;break;case`utf16le`:case`base64`:throw Error(`Unsupported encoding: `+this.encoding);default:this.decoder=new n(this.encoding)}}get remaining(){return this.decoder.remaining}push(e){return typeof e==`string`?e:this.decoder.decode(e)}write(e){return this.push(e)}end(e){let t=``;return e&&(t=this.push(e)),t+=this.decoder.flush(),t}};function i(e){switch(e=e.toLowerCase(),e){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 e;default:throw Error(`Unknown encoding: `+e)}}})),Bn=e(((e,t)=>{let{EventEmitter:n}=Nn(),r=Error(`Stream was destroyed`),i=Error(`Premature close`),a=Fn(),o=zn(),s=typeof queueMicrotask>`u`?e=>global.process.nextTick(e):queueMicrotask,c=(1<<29)-1,l=c^1;c^2;let u=1024,d=2048,f=4096,p=8192,m=16384,h=32768,g=65536,v=131072;16|g,f|128;let y=256|v;c^16,c^64,c^(64|g);let b=c^g;c^256,c^(128|p),c^u;let x=c^768,S=c^h;c^32;let C=c^v;c^y;let w=1<<18,T=2<<18,E=4<<18,D=8<<18,O=16<<18,k=32<<18,A=64<<18,j=128<<18,M=256<<18,N=512<<18,P=1024<<18;c^(w|M);let F=c^E;c^(w|N),c^O,c^D;let I=c^j;c^T;let L=c^P,R=16|w,z=c^R,B=m|k,V=14|B;F&536870847;let H=j|h,U=15|H&z;u|16399;let W=m|143;u|143,u|16398,h|1,N|8388623,D|O,D|w;let G=270794767;E|w,w|M,k|134217742;let K=Symbol.asyncIterator||Symbol(`asyncIterator`);var q=class{constructor(e,{highWaterMark:t=16384,map:n=null,mapWritable:r,byteLength:i,byteLengthWritable:o}={}){this.stream=e,this.queue=new a,this.highWaterMark=t,this.buffered=0,this.error=null,this.pipeline=null,this.drains=null,this.byteLength=o||i||Q,this.map=r||n,this.afterWrite=ie.bind(this),this.afterUpdateNextTick=se.bind(this)}get ended(){return(this.stream._duplexState&k)!==0}push(e){return this.stream._duplexState&142606350?!1:(this.map!==null&&(e=this.map(e)),this.buffered+=this.byteLength(e),this.queue.push(e),this.buffered<this.highWaterMark?(this.stream._duplexState|=D,!0):(this.stream._duplexState|=6291456,!1))}shift(){let e=this.queue.shift();return this.buffered-=this.byteLength(e),this.buffered===0&&(this.stream._duplexState&=534773759),e}end(e){typeof e==`function`?this.stream.once(`finish`,e):e!=null&&this.push(e),this.stream._duplexState=(this.stream._duplexState|N)&F}autoBatch(e,t){let n=[],r=this.stream;for(n.push(e);(r._duplexState&G)===2359296;)n.push(r._writableState.shift());if(r._duplexState&15)return t(null);r._writev(n,t)}update(){let e=this.stream;e._duplexState|=T;do{for(;(e._duplexState&G)===D;){let t=this.shift();e._duplexState|=67371008,e._write(t,this.afterWrite)}e._duplexState&1310720||this.updateNonPrimary()}while(this.continueUpdate()===!0);e._duplexState&=536346623}updateNonPrimary(){let e=this.stream;if((e._duplexState&144965647)===N){e._duplexState|=w,e._final(re.bind(this));return}if((e._duplexState&14)==4){(e._duplexState&H)===0&&(e._duplexState|=R,e._destroy(Y.bind(this)));return}(e._duplexState&U)===1&&(e._duplexState=(e._duplexState|R)&l,e._open(le.bind(this)))}continueUpdate(){return(this.stream._duplexState&j)===0?!1:(this.stream._duplexState&=I,!0)}updateCallback(){(this.stream._duplexState&35127311)===E?this.update():this.updateNextTick()}updateNextTick(){(this.stream._duplexState&j)===0&&(this.stream._duplexState|=j,(this.stream._duplexState&T)===0&&s(this.afterUpdateNextTick))}},ee=class{constructor(e,{highWaterMark:t=16384,map:n=null,mapReadable:r,byteLength:i,byteLengthReadable:o}={}){this.stream=e,this.queue=new a,this.highWaterMark=t===0?1:t,this.buffered=0,this.readAhead=t>0,this.error=null,this.pipeline=null,this.byteLength=o||i||Q,this.map=r||n,this.pipeTo=null,this.afterRead=ae.bind(this),this.afterUpdateNextTick=oe.bind(this)}get ended(){return(this.stream._duplexState&m)!==0}pipe(e,t){if(this.pipeTo!==null)throw Error(`Can only pipe to one destination`);if(typeof t!=`function`&&(t=null),this.stream._duplexState|=512,this.pipeTo=e,this.pipeline=new J(this.stream,e,t),t&&this.stream.on(`error`,Oe),X(e))e._writableState.pipeline=this.pipeline,t&&e.on(`error`,Oe),e.on(`finish`,this.pipeline.finished.bind(this.pipeline));else{let t=this.pipeline.done.bind(this.pipeline,e),n=this.pipeline.done.bind(this.pipeline,e,null);e.on(`error`,t),e.on(`close`,n),e.on(`finish`,this.pipeline.finished.bind(this.pipeline))}e.on(`drain`,ne.bind(this)),this.stream.emit(`piping`,e),e.emit(`pipe`,this.stream)}push(e){let t=this.stream;return e===null?(this.highWaterMark=0,t._duplexState=(t._duplexState|u)&536805311,!1):this.map!==null&&(e=this.map(e),e===null)?(t._duplexState&=b,this.buffered<this.highWaterMark):(this.buffered+=this.byteLength(e),this.queue.push(e),t._duplexState=(t._duplexState|128)&b,this.buffered<this.highWaterMark)}shift(){let e=this.queue.shift();return this.buffered-=this.byteLength(e),this.buffered===0&&(this.stream._duplexState&=536862591),e}unshift(e){let t=[this.map===null?e:this.map(e)];for(;this.buffered>0;)t.push(this.shift());for(let e=0;e<t.length-1;e++){let n=t[e];this.buffered+=this.byteLength(n),this.queue.push(n)}this.push(t[t.length-1])}read(){let e=this.stream;if((e._duplexState&W)===128){let t=this.shift();return this.pipeTo!==null&&this.pipeTo.write(t)===!1&&(e._duplexState&=x),(e._duplexState&d)!==0&&e.emit(`data`,t),t}return this.readAhead===!1&&(e._duplexState|=v,this.updateNextTick()),null}drain(){let e=this.stream;for(;(e._duplexState&W)===128&&e._duplexState&768;){let t=this.shift();this.pipeTo!==null&&this.pipeTo.write(t)===!1&&(e._duplexState&=x),(e._duplexState&d)!==0&&e.emit(`data`,t)}}update(){let e=this.stream;e._duplexState|=32;do{for(this.drain();this.buffered<this.highWaterMark&&(e._duplexState&214047)===v;)e._duplexState|=65552,e._read(this.afterRead),this.drain();(e._duplexState&12431)==4224&&(e._duplexState|=p,e.emit(`readable`)),e._duplexState&80||this.updateNonPrimary()}while(this.continueUpdate()===!0);e._duplexState&=536870879}updateNonPrimary(){let e=this.stream;if((e._duplexState&1167)===u&&(e._duplexState=(e._duplexState|m)&536869887,e.emit(`end`),(e._duplexState&V)===B&&(e._duplexState|=4),this.pipeTo!==null&&this.pipeTo.end()),(e._duplexState&14)==4){(e._duplexState&H)===0&&(e._duplexState|=R,e._destroy(Y.bind(this)));return}(e._duplexState&U)===1&&(e._duplexState=(e._duplexState|R)&l,e._open(le.bind(this)))}continueUpdate(){return(this.stream._duplexState&h)===0?!1:(this.stream._duplexState&=S,!0)}updateCallback(){(this.stream._duplexState&32879)==64?this.update():this.updateNextTick()}updateNextTickIfOpen(){this.stream._duplexState&32769||(this.stream._duplexState|=h,this.stream._duplexState&32||s(this.afterUpdateNextTick))}updateNextTick(){(this.stream._duplexState&h)===0&&(this.stream._duplexState|=h,this.stream._duplexState&32||s(this.afterUpdateNextTick))}},te=class{constructor(e){this.data=null,this.afterTransform=ue.bind(e),this.afterFinal=null}},J=class{constructor(e,t,n){this.from=e,this.to=t,this.afterPipe=n,this.error=null,this.pipeToFinished=!1}finished(){this.pipeToFinished=!0}done(e,t){if(t&&(this.error=t),e===this.to&&(this.to=null,this.from!==null)){((this.from._duplexState&m)===0||!this.pipeToFinished)&&this.from.destroy(this.error||Error(`Writable stream closed prematurely`));return}if(e===this.from&&(this.from=null,this.to!==null)){(e._duplexState&m)===0&&this.to.destroy(this.error||Error(`Readable stream closed before ending`));return}this.afterPipe!==null&&this.afterPipe(this.error),this.to=this.from=this.afterPipe=null}};function ne(){this.stream._duplexState|=512,this.updateCallback()}function re(e){let t=this.stream;e&&t.destroy(e),t._duplexState&14||(t._duplexState|=k,t.emit(`finish`)),(t._duplexState&V)===B&&(t._duplexState|=4),t._duplexState&=402391039,(t._duplexState&T)===0?this.update():this.updateNextTick()}function Y(e){let t=this.stream;!e&&this.error!==r&&(e=this.error),e&&t.emit(`error`,e),t._duplexState|=8,t.emit(`close`);let n=t._readableState,i=t._writableState;if(n!==null&&n.pipeline!==null&&n.pipeline.done(t,e),i!==null){for(;i.drains!==null&&i.drains.length>0;)i.drains.shift().resolve(!1);i.pipeline!==null&&i.pipeline.done(t,e)}}function ie(e){let t=this.stream;e&&t.destroy(e),t._duplexState&=469499903,this.drains!==null&&ce(this.drains),(t._duplexState&6553615)===O&&(t._duplexState&=532676607,(t._duplexState&A)===A&&t.emit(`drain`)),this.updateCallback()}function ae(e){e&&this.stream.destroy(e),this.stream._duplexState&=536870895,this.readAhead===!1&&!(this.stream._duplexState&256)&&(this.stream._duplexState&=C),this.updateCallback()}function oe(){this.stream._duplexState&32||(this.stream._duplexState&=S,this.update())}function se(){(this.stream._duplexState&T)===0&&(this.stream._duplexState&=I,this.update())}function ce(e){for(let t=0;t<e.length;t++)--e[t].writes===0&&(e.shift().resolve(!0),t--)}function le(e){let t=this.stream;e&&t.destroy(e),t._duplexState&4||(t._duplexState&17423||(t._duplexState|=64),t._duplexState&142606351||(t._duplexState|=E),t.emit(`open`)),t._duplexState&=z,t._writableState!==null&&t._writableState.updateCallback(),t._readableState!==null&&t._readableState.updateCallback()}function ue(e,t){t!=null&&this.push(t),this._writableState.afterWrite(e)}function de(e){this._readableState!==null&&(e===`data`&&(this._duplexState|=d|y,this._readableState.updateNextTick()),e===`readable`&&(this._duplexState|=f,this._readableState.updateNextTick())),this._writableState!==null&&e===`drain`&&(this._duplexState|=A,this._writableState.updateNextTick())}var fe=class extends n{constructor(e){super(),this._duplexState=0,this._readableState=null,this._writableState=null,e&&(e.open&&(this._open=e.open),e.destroy&&(this._destroy=e.destroy),e.predestroy&&(this._predestroy=e.predestroy),e.signal&&e.signal.addEventListener(`abort`,ke.bind(this))),this.on(`newListener`,de)}_open(e){e(null)}_destroy(e){e(null)}_predestroy(){}get readable(){return this._readableState===null?void 0:!0}get writable(){return this._writableState===null?void 0:!0}get destroyed(){return(this._duplexState&8)!=0}get destroying(){return(this._duplexState&14)!=0}destroy(e){this._duplexState&14||(e||=r,this._duplexState=(this._duplexState|4)&535822271,this._readableState!==null&&(this._readableState.highWaterMark=0,this._readableState.error=e),this._writableState!==null&&(this._writableState.highWaterMark=0,this._writableState.error=e),this._duplexState|=2,this._predestroy(),this._duplexState&=536870909,this._readableState!==null&&this._readableState.updateNextTick(),this._writableState!==null&&this._writableState.updateNextTick())}},pe=class e extends fe{constructor(e){super(e),this._duplexState|=k|131073,this._readableState=new ee(this,e),e&&(this._readableState.readAhead===!1&&(this._duplexState&=C),e.read&&(this._read=e.read),e.eagerOpen&&this._readableState.updateNextTick(),e.encoding&&this.setEncoding(e.encoding))}setEncoding(e){let t=new o(e),n=this._readableState.map||xe;return this._readableState.map=r,this;function r(e){let r=t.push(e);return r===``&&(e.byteLength!==0||t.remaining>0)?null:n(r)}}_read(e){e(null)}pipe(e,t){return this._readableState.updateNextTick(),this._readableState.pipe(e,t),e}read(){return this._readableState.updateNextTick(),this._readableState.read()}push(e){return this._readableState.updateNextTickIfOpen(),this._readableState.push(e)}unshift(e){return this._readableState.updateNextTickIfOpen(),this._readableState.unshift(e)}resume(){return this._duplexState|=y,this._readableState.updateNextTick(),this}pause(){return this._duplexState&=this._readableState.readAhead===!1?536739583:536870655,this}static _fromAsyncIterator(t,n){let r,i=new e({...n,read(e){t.next().then(a).then(e.bind(null,null)).catch(e)},predestroy(){r=t.return()},destroy(e){if(!r)return e(null);r.then(e.bind(null,null)).catch(e)}});return i;function a(e){e.done?i.push(null):i.push(e.value)}}static from(t,n){if(Ee(t))return t;if(t[K])return this._fromAsyncIterator(t[K](),n);Array.isArray(t)||(t=t===void 0?[]:[t]);let r=0;return new e({...n,read(e){this.push(r===t.length?null:t[r++]),e(null)}})}static isBackpressured(e){return(e._duplexState&17422)!=0||e._readableState.buffered>=e._readableState.highWaterMark}static isPaused(e){return(e._duplexState&256)==0}[K](){let e=this,t=null,n=null,i=null;return this.on(`error`,e=>{t=e}),this.on(`readable`,a),this.on(`close`,o),{[K](){return this},next(){return new Promise(function(t,r){n=t,i=r;let a=e.read();a===null?e._duplexState&8&&s(null):s(a)})},return(){return c(null)},throw(e){return c(e)}};function a(){n!==null&&s(e.read())}function o(){n!==null&&s(null)}function s(a){i!==null&&(t?i(t):a===null&&(e._duplexState&m)===0?i(r):n({value:a,done:a===null}),i=n=null)}function c(t){return e.destroy(t),new Promise((n,r)=>{if(e._duplexState&8)return n({value:void 0,done:!0});e.once(`close`,function(){t?r(t):n({value:void 0,done:!0})})})}}},me=class extends fe{constructor(e){super(e),this._duplexState|=1|m,this._writableState=new q(this,e),e&&(e.writev&&(this._writev=e.writev),e.write&&(this._write=e.write),e.final&&(this._final=e.final),e.eagerOpen&&this._writableState.updateNextTick())}cork(){this._duplexState|=P}uncork(){this._duplexState&=L,this._writableState.updateNextTick()}_writev(e,t){t(null)}_write(e,t){this._writableState.autoBatch(e,t)}_final(e){e(null)}static isBackpressured(e){return(e._duplexState&146800654)!=0}static drained(e){if(e.destroyed)return Promise.resolve(!1);let t=e._writableState,n=($(e)?Math.min(1,t.queue.length):t.queue.length)+(e._duplexState&M?1:0);return n===0?Promise.resolve(!0):(t.drains===null&&(t.drains=[]),new Promise(e=>{t.drains.push({writes:n,resolve:e})}))}write(e){return this._writableState.updateNextTick(),this._writableState.push(e)}end(e){return this._writableState.updateNextTick(),this._writableState.end(e),this}},he=class extends pe{constructor(e){super(e),this._duplexState=1|this._duplexState&v,this._writableState=new q(this,e),e&&(e.writev&&(this._writev=e.writev),e.write&&(this._write=e.write),e.final&&(this._final=e.final))}cork(){this._duplexState|=P}uncork(){this._duplexState&=L,this._writableState.updateNextTick()}_writev(e,t){t(null)}_write(e,t){this._writableState.autoBatch(e,t)}_final(e){e(null)}write(e){return this._writableState.updateNextTick(),this._writableState.push(e)}end(e){return this._writableState.updateNextTick(),this._writableState.end(e),this}},ge=class extends he{constructor(e){super(e),this._transformState=new te(this),e&&(e.transform&&(this._transform=e.transform),e.flush&&(this._flush=e.flush))}_write(e,t){this._readableState.buffered>=this._readableState.highWaterMark?this._transformState.data=e:this._transform(e,this._transformState.afterTransform)}_read(e){if(this._transformState.data!==null){let t=this._transformState.data;this._transformState.data=null,e(null),this._transform(t,this._transformState.afterTransform)}else e(null)}destroy(e){super.destroy(e),this._transformState.data!==null&&(this._transformState.data=null,this._transformState.afterTransform())}_transform(e,t){t(null,e)}_flush(e){e(null)}_final(e){this._transformState.afterFinal=e,this._flush(ve.bind(this))}},_e=class extends ge{};function ve(e,t){let n=this._transformState.afterFinal;if(e)return n(e);t!=null&&this.push(t),this.push(null),n(null)}function ye(...e){return new Promise((t,n)=>be(...e,e=>{if(e)return n(e);t()}))}function be(e,...t){let n=Array.isArray(e)?[...e,...t]:[e,...t],r=n.length&&typeof n[n.length-1]==`function`?n.pop():null;if(n.length<2)throw Error(`Pipeline requires at least 2 streams`);let a=n[0],o=null,s=null;for(let e=1;e<n.length;e++)o=n[e],X(a)?a.pipe(o,l):(c(a,!0,e>1,l),a.pipe(o)),a=o;if(r){let e=!1,t=X(o)||!!(o._writableState&&o._writableState.autoDestroy);o.on(`error`,e=>{s===null&&(s=e)}),o.on(`finish`,()=>{e=!0,t||r(s)}),t&&o.on(`close`,()=>r(s||(e?null:i)))}return o;function c(e,t,n,r){e.on(`error`,r),e.on(`close`,a);function a(){if(t&&e._readableState&&!e._readableState.ended||n&&e._writableState&&!e._writableState.ended)return r(i)}}function l(e){if(!(!e||s)){s=e;for(let t of n)t.destroy(e)}}}function xe(e){return e}function Se(e){return!!e._readableState||!!e._writableState}function X(e){return typeof e._duplexState==`number`&&Se(e)}function Ce(e){return!!e._readableState&&e._readableState.ended}function we(e){return!!e._writableState&&e._writableState.ended}function Te(e,t={}){let n=e._readableState&&e._readableState.error||e._writableState&&e._writableState.error;return!t.all&&n===r?null:n}function Ee(e){return X(e)&&e.readable}function Z(e){return(e._duplexState&1)!=1||(e._duplexState&H)!==0}function De(e){return typeof e==`object`&&!!e&&typeof e.byteLength==`number`}function Q(e){return De(e)?e.byteLength:1024}function Oe(){}function ke(){this.destroy(Error(`Stream aborted.`))}function $(e){return e._writev!==me.prototype._writev&&e._writev!==he.prototype._writev}t.exports={pipeline:be,pipelinePromise:ye,isStream:Se,isStreamx:X,isEnded:Ce,isFinished:we,isDisturbed:Z,getStreamError:Te,Stream:fe,Writable:me,Readable:pe,Duplex:he,Transform:ge,PassThrough:_e}})),Vn=e((e=>{let t=In(),n=t.from([117,115,116,97,114,0]),r=t.from([48,48]),i=t.from([117,115,116,97,114,32]),a=t.from([32,0]);e.decodeLongPath=function(e,t){return y(e,0,e.length,t)},e.encodePax=function(e){let n=``;e.name&&(n+=b(` path=`+e.name+`
|
|
51
|
+
var n=jn(),r=mn(),i=function(e){if(!(this instanceof i))return new i(e);e=this.options=r.defaults(e,{comment:``,forceUTC:!1,namePrependSlash:!1,store:!1}),this.supports={directory:!0,symlink:!0},this.engine=new n(e)};i.prototype.append=function(e,t,n){this.engine.entry(e,t,n)},i.prototype.finalize=function(){this.engine.finalize()},i.prototype.on=function(){return this.engine.on.apply(this.engine,arguments)},i.prototype.pipe=function(){return this.engine.pipe.apply(this.engine,arguments)},i.prototype.unpipe=function(){return this.engine.unpipe.apply(this.engine,arguments)},t.exports=i})),Nn=e(((e,t)=>{t.exports=require(`events`)})),Pn=e(((e,t)=>{t.exports=class{constructor(e){if(!(e>0)||e-1&e)throw Error(`Max size for a FixedFIFO should be a power of two`);this.buffer=Array(e),this.mask=e-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(e){return this.buffer[this.top]===void 0?(this.buffer[this.top]=e,this.top=this.top+1&this.mask,!0):!1}shift(){let e=this.buffer[this.btm];if(e!==void 0)return this.buffer[this.btm]=void 0,this.btm=this.btm+1&this.mask,e}peek(){return this.buffer[this.btm]}isEmpty(){return this.buffer[this.btm]===void 0}}})),Fn=e(((e,t)=>{let n=Pn();t.exports=class{constructor(e){this.hwm=e||16,this.head=new n(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)){let t=this.head;this.head=t.next=new n(2*this.head.buffer.length),this.head.push(e)}}shift(){this.length!==0&&this.length--;let e=this.tail.shift();if(e===void 0&&this.tail.next){let e=this.tail.next;return this.tail.next=null,this.tail=e,this.tail.shift()}return e}peek(){let e=this.tail.peek();return e===void 0&&this.tail.next?this.tail.next.peek():e}isEmpty(){return this.length===0}}})),In=e(((e,t)=>{function n(e){return Buffer.isBuffer(e)||e instanceof Uint8Array}function r(e){return Buffer.isEncoding(e)}function i(e,t,n){return Buffer.alloc(e,t,n)}function a(e){return Buffer.allocUnsafe(e)}function o(e){return Buffer.allocUnsafeSlow(e)}function s(e,t){return Buffer.byteLength(e,t)}function c(e,t){return Buffer.compare(e,t)}function l(e,t){return Buffer.concat(e,t)}function u(e,t,n,r,i){return x(e).copy(t,n,r,i)}function d(e,t){return x(e).equals(t)}function f(e,t,n,r,i){return x(e).fill(t,n,r,i)}function p(e,t,n){return Buffer.from(e,t,n)}function m(e,t,n,r){return x(e).includes(t,n,r)}function h(e,t,n,r){return x(e).indexOf(t,n,r)}function g(e,t,n,r){return x(e).lastIndexOf(t,n,r)}function v(e){return x(e).swap16()}function y(e){return x(e).swap32()}function b(e){return x(e).swap64()}function x(e){return Buffer.isBuffer(e)?e:Buffer.from(e.buffer,e.byteOffset,e.byteLength)}function S(e,t,n,r){return x(e).toString(t,n,r)}function C(e,t,n,r,i){return x(e).write(t,n,r,i)}function w(e,t){return x(e).readDoubleBE(t)}function T(e,t){return x(e).readDoubleLE(t)}function E(e,t){return x(e).readFloatBE(t)}function D(e,t){return x(e).readFloatLE(t)}function O(e,t){return x(e).readInt32BE(t)}function k(e,t){return x(e).readInt32LE(t)}function A(e,t){return x(e).readUInt32BE(t)}function j(e,t){return x(e).readUInt32LE(t)}function M(e,t,n){return x(e).writeDoubleBE(t,n)}function N(e,t,n){return x(e).writeDoubleLE(t,n)}function P(e,t,n){return x(e).writeFloatBE(t,n)}function F(e,t,n){return x(e).writeFloatLE(t,n)}function I(e,t,n){return x(e).writeInt32BE(t,n)}function L(e,t,n){return x(e).writeInt32LE(t,n)}function R(e,t,n){return x(e).writeUInt32BE(t,n)}function z(e,t,n){return x(e).writeUInt32LE(t,n)}t.exports={isBuffer:n,isEncoding:r,alloc:i,allocUnsafe:a,allocUnsafeSlow:o,byteLength:s,compare:c,concat:l,copy:u,equals:d,fill:f,from:p,includes:m,indexOf:h,lastIndexOf:g,swap16:v,swap32:y,swap64:b,toBuffer:x,toString:S,write:C,readDoubleBE:w,readDoubleLE:T,readFloatBE:E,readFloatLE:D,readInt32BE:O,readInt32LE:k,readUInt32BE:A,readUInt32LE:j,writeDoubleBE:M,writeDoubleLE:N,writeFloatBE:P,writeFloatLE:F,writeInt32BE:I,writeInt32LE:L,writeUInt32BE:R,writeUInt32LE:z}})),Ln=e(((e,t)=>{let n=In();t.exports=class{constructor(e){this.encoding=e}get remaining(){return 0}decode(e){return n.toString(e,this.encoding)}flush(){return``}}})),Rn=e(((e,t)=>{let n=In();t.exports=class{constructor(){this._reset()}get remaining(){return this.bytesSeen}decode(e){if(e.byteLength===0)return``;if(this.bytesNeeded===0&&r(e,0)===0)return this.bytesSeen=i(e),n.toString(e,`utf8`);let t=``,a=0;if(this.bytesNeeded>0){for(;a<e.byteLength;){let n=e[a];if(n<this.lowerBoundary||n>this.upperBoundary){t+=`�`,this._reset();break}if(this.lowerBoundary=128,this.upperBoundary=191,this.codePoint=this.codePoint<<6|n&63,this.bytesSeen++,a++,this.bytesSeen===this.bytesNeeded){t+=String.fromCodePoint(this.codePoint),this._reset();break}}if(this.bytesNeeded>0)return t}let o=r(e,a),s=e.byteLength-o;s>a&&(t+=n.toString(e,`utf8`,a,s));for(let n=s;n<e.byteLength;n++){let r=e[n];if(this.bytesNeeded===0){r<=127?(this.bytesSeen=0,t+=String.fromCharCode(r)):r>=194&&r<=223?(this.bytesNeeded=2,this.bytesSeen=1,this.codePoint=r&31):r>=224&&r<=239?(r===224?this.lowerBoundary=160:r===237&&(this.upperBoundary=159),this.bytesNeeded=3,this.bytesSeen=1,this.codePoint=r&15):r>=240&&r<=244?(r===240?this.lowerBoundary=144:r===244&&(this.upperBoundary=143),this.bytesNeeded=4,this.bytesSeen=1,this.codePoint=r&7):(this.bytesSeen=1,t+=`�`);continue}if(r<this.lowerBoundary||r>this.upperBoundary){t+=`�`,n--,this._reset();continue}this.lowerBoundary=128,this.upperBoundary=191,this.codePoint=this.codePoint<<6|r&63,this.bytesSeen++,this.bytesSeen===this.bytesNeeded&&(t+=String.fromCodePoint(this.codePoint),this._reset())}return t}flush(){let e=this.bytesNeeded>0?`�`:``;return this._reset(),e}_reset(){this.codePoint=0,this.bytesNeeded=0,this.bytesSeen=0,this.lowerBoundary=128,this.upperBoundary=191}};function r(e,t){let n=e.byteLength;if(n<=t)return 0;let r=Math.max(t,n-4),i=n-1;for(;i>r&&(e[i]&192)==128;)i--;if(i<t)return 0;let a=e[i],o;if(a<=127)return 0;if(a>=194&&a<=223)o=2;else if(a>=224&&a<=239)o=3;else if(a>=240&&a<=244)o=4;else return 0;let s=n-i;return s<o?s:0}function i(e){let t=e.byteLength;if(t===0)return 0;let n=e[t-1];if(n<=127)return 0;if((n&192)!=128)return 1;let r=Math.max(0,t-4),i=t-2;for(;i>=r&&(e[i]&192)==128;)i--;if(i<0)return 1;let a=e[i],o;if(a>=194&&a<=223)o=2;else if(a>=224&&a<=239)o=3;else if(a>=240&&a<=244)o=4;else return 1;if(t-i!==o)return 1;if(o>=3){let t=e[i+1];if(a===224&&t<160||a===237&&t>159||a===240&&t<144||a===244&&t>143)return 1}return 0}})),zn=e(((e,t)=>{let n=Ln(),r=Rn();t.exports=class{constructor(e=`utf8`){switch(this.encoding=i(e),this.encoding){case`utf8`:this.decoder=new r;break;case`utf16le`:case`base64`:throw Error(`Unsupported encoding: `+this.encoding);default:this.decoder=new n(this.encoding)}}get remaining(){return this.decoder.remaining}push(e){return typeof e==`string`?e:this.decoder.decode(e)}write(e){return this.push(e)}end(e){let t=``;return e&&(t=this.push(e)),t+=this.decoder.flush(),t}};function i(e){switch(e=e.toLowerCase(),e){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 e;default:throw Error(`Unknown encoding: `+e)}}})),Bn=e(((e,t)=>{let{EventEmitter:n}=Nn(),r=Error(`Stream was destroyed`),i=Error(`Premature close`),a=Fn(),o=zn(),s=typeof queueMicrotask>`u`?e=>global.process.nextTick(e):queueMicrotask,c=(1<<29)-1,l=c^1;c^2;let u=1024,d=2048,f=4096,p=8192,m=16384,h=32768,g=65536,v=131072;16|g,f|128;let y=256|v;c^16,c^64,c^(64|g);let b=c^g;c^256,c^(128|p),c^u;let x=c^768,S=c^h;c^32;let C=c^v;c^y;let w=1<<18,T=2<<18,E=4<<18,D=8<<18,O=16<<18,k=32<<18,A=64<<18,j=128<<18,M=256<<18,N=512<<18,P=1024<<18;c^(w|M);let F=c^E;c^(w|N),c^O,c^D;let I=c^j;c^T;let L=c^P,R=16|w,z=c^R,B=m|k,V=14|B;F&536870847;let H=j|h,U=15|H&z;u|16399;let W=m|143;u|143,u|16398,h|1,N|8388623,D|O,D|w;let G=270794767;E|w,w|M,k|134217742;let K=Symbol.asyncIterator||Symbol(`asyncIterator`);var q=class{constructor(e,{highWaterMark:t=16384,map:n=null,mapWritable:r,byteLength:i,byteLengthWritable:o}={}){this.stream=e,this.queue=new a,this.highWaterMark=t,this.buffered=0,this.error=null,this.pipeline=null,this.drains=null,this.byteLength=o||i||Q,this.map=r||n,this.afterWrite=ie.bind(this),this.afterUpdateNextTick=se.bind(this)}get ended(){return(this.stream._duplexState&k)!==0}push(e){return this.stream._duplexState&142606350?!1:(this.map!==null&&(e=this.map(e)),this.buffered+=this.byteLength(e),this.queue.push(e),this.buffered<this.highWaterMark?(this.stream._duplexState|=D,!0):(this.stream._duplexState|=6291456,!1))}shift(){let e=this.queue.shift();return this.buffered-=this.byteLength(e),this.buffered===0&&(this.stream._duplexState&=534773759),e}end(e){typeof e==`function`?this.stream.once(`finish`,e):e!=null&&this.push(e),this.stream._duplexState=(this.stream._duplexState|N)&F}autoBatch(e,t){let n=[],r=this.stream;for(n.push(e);(r._duplexState&G)===2359296;)n.push(r._writableState.shift());if(r._duplexState&15)return t(null);r._writev(n,t)}update(){let e=this.stream;e._duplexState|=T;do{for(;(e._duplexState&G)===D;){let t=this.shift();e._duplexState|=67371008,e._write(t,this.afterWrite)}e._duplexState&1310720||this.updateNonPrimary()}while(this.continueUpdate()===!0);e._duplexState&=536346623}updateNonPrimary(){let e=this.stream;if((e._duplexState&144965647)===N){e._duplexState|=w,e._final(re.bind(this));return}if((e._duplexState&14)==4){(e._duplexState&H)===0&&(e._duplexState|=R,e._destroy(Y.bind(this)));return}(e._duplexState&U)===1&&(e._duplexState=(e._duplexState|R)&l,e._open(le.bind(this)))}continueUpdate(){return(this.stream._duplexState&j)===0?!1:(this.stream._duplexState&=I,!0)}updateCallback(){(this.stream._duplexState&35127311)===E?this.update():this.updateNextTick()}updateNextTick(){(this.stream._duplexState&j)===0&&(this.stream._duplexState|=j,(this.stream._duplexState&T)===0&&s(this.afterUpdateNextTick))}},ee=class{constructor(e,{highWaterMark:t=16384,map:n=null,mapReadable:r,byteLength:i,byteLengthReadable:o}={}){this.stream=e,this.queue=new a,this.highWaterMark=t===0?1:t,this.buffered=0,this.readAhead=t>0,this.error=null,this.pipeline=null,this.byteLength=o||i||Q,this.map=r||n,this.pipeTo=null,this.afterRead=ae.bind(this),this.afterUpdateNextTick=oe.bind(this)}get ended(){return(this.stream._duplexState&m)!==0}pipe(e,t){if(this.pipeTo!==null)throw Error(`Can only pipe to one destination`);if(typeof t!=`function`&&(t=null),this.stream._duplexState|=512,this.pipeTo=e,this.pipeline=new J(this.stream,e,t),t&&this.stream.on(`error`,Oe),X(e))e._writableState.pipeline=this.pipeline,t&&e.on(`error`,Oe),e.on(`finish`,this.pipeline.finished.bind(this.pipeline));else{let t=this.pipeline.done.bind(this.pipeline,e),n=this.pipeline.done.bind(this.pipeline,e,null);e.on(`error`,t),e.on(`close`,n),e.on(`finish`,this.pipeline.finished.bind(this.pipeline))}e.on(`drain`,ne.bind(this)),this.stream.emit(`piping`,e),e.emit(`pipe`,this.stream)}push(e){let t=this.stream;return e===null?(this.highWaterMark=0,t._duplexState=(t._duplexState|u)&536805311,!1):this.map!==null&&(e=this.map(e),e===null)?(t._duplexState&=b,this.buffered<this.highWaterMark):(this.buffered+=this.byteLength(e),this.queue.push(e),t._duplexState=(t._duplexState|128)&b,this.buffered<this.highWaterMark)}shift(){let e=this.queue.shift();return this.buffered-=this.byteLength(e),this.buffered===0&&(this.stream._duplexState&=536862591),e}unshift(e){let t=[this.map===null?e:this.map(e)];for(;this.buffered>0;)t.push(this.shift());for(let e=0;e<t.length-1;e++){let n=t[e];this.buffered+=this.byteLength(n),this.queue.push(n)}this.push(t[t.length-1])}read(){let e=this.stream;if((e._duplexState&W)===128){let t=this.shift();return this.pipeTo!==null&&this.pipeTo.write(t)===!1&&(e._duplexState&=x),(e._duplexState&d)!==0&&e.emit(`data`,t),t}return this.readAhead===!1&&(e._duplexState|=v,this.updateNextTick()),null}drain(){let e=this.stream;for(;(e._duplexState&W)===128&&e._duplexState&768;){let t=this.shift();this.pipeTo!==null&&this.pipeTo.write(t)===!1&&(e._duplexState&=x),(e._duplexState&d)!==0&&e.emit(`data`,t)}}update(){let e=this.stream;e._duplexState|=32;do{for(this.drain();this.buffered<this.highWaterMark&&(e._duplexState&214047)===v;)e._duplexState|=65552,e._read(this.afterRead),this.drain();(e._duplexState&12431)==4224&&(e._duplexState|=p,e.emit(`readable`)),e._duplexState&80||this.updateNonPrimary()}while(this.continueUpdate()===!0);e._duplexState&=536870879}updateNonPrimary(){let e=this.stream;if((e._duplexState&1167)===u&&(e._duplexState=(e._duplexState|m)&536869887,e.emit(`end`),(e._duplexState&V)===B&&(e._duplexState|=4),this.pipeTo!==null&&this.pipeTo.end()),(e._duplexState&14)==4){(e._duplexState&H)===0&&(e._duplexState|=R,e._destroy(Y.bind(this)));return}(e._duplexState&U)===1&&(e._duplexState=(e._duplexState|R)&l,e._open(le.bind(this)))}continueUpdate(){return(this.stream._duplexState&h)===0?!1:(this.stream._duplexState&=S,!0)}updateCallback(){(this.stream._duplexState&32879)==64?this.update():this.updateNextTick()}updateNextTickIfOpen(){this.stream._duplexState&32769||(this.stream._duplexState|=h,this.stream._duplexState&32||s(this.afterUpdateNextTick))}updateNextTick(){(this.stream._duplexState&h)===0&&(this.stream._duplexState|=h,this.stream._duplexState&32||s(this.afterUpdateNextTick))}},te=class{constructor(e){this.data=null,this.afterTransform=ue.bind(e),this.afterFinal=null}},J=class{constructor(e,t,n){this.from=e,this.to=t,this.afterPipe=n,this.error=null,this.pipeToFinished=!1}finished(){this.pipeToFinished=!0}done(e,t){if(t&&(this.error=t),e===this.to&&(this.to=null,this.from!==null)){((this.from._duplexState&m)===0||!this.pipeToFinished)&&this.from.destroy(this.error||Error(`Writable stream closed prematurely`));return}if(e===this.from&&(this.from=null,this.to!==null)){(e._duplexState&m)===0&&this.to.destroy(this.error||Error(`Readable stream closed before ending`));return}this.afterPipe!==null&&this.afterPipe(this.error),this.to=this.from=this.afterPipe=null}};function ne(){this.stream._duplexState|=512,this.updateCallback()}function re(e){let t=this.stream;e&&t.destroy(e),t._duplexState&14||(t._duplexState|=k,t.emit(`finish`)),(t._duplexState&V)===B&&(t._duplexState|=4),t._duplexState&=402391039,(t._duplexState&T)===0?this.update():this.updateNextTick()}function Y(e){let t=this.stream;!e&&this.error!==r&&(e=this.error),e&&t.emit(`error`,e),t._duplexState|=8,t.emit(`close`);let n=t._readableState,i=t._writableState;if(n!==null&&n.pipeline!==null&&n.pipeline.done(t,e),i!==null){for(;i.drains!==null&&i.drains.length>0;)i.drains.shift().resolve(!1);i.pipeline!==null&&i.pipeline.done(t,e)}}function ie(e){let t=this.stream;e&&t.destroy(e),t._duplexState&=469499903,this.drains!==null&&ce(this.drains),(t._duplexState&6553615)===O&&(t._duplexState&=532676607,(t._duplexState&A)===A&&t.emit(`drain`)),this.updateCallback()}function ae(e){e&&this.stream.destroy(e),this.stream._duplexState&=536870895,this.readAhead===!1&&!(this.stream._duplexState&256)&&(this.stream._duplexState&=C),this.updateCallback()}function oe(){this.stream._duplexState&32||(this.stream._duplexState&=S,this.update())}function se(){(this.stream._duplexState&T)===0&&(this.stream._duplexState&=I,this.update())}function ce(e){for(let t=0;t<e.length;t++)--e[t].writes===0&&(e.shift().resolve(!0),t--)}function le(e){let t=this.stream;e&&t.destroy(e),t._duplexState&4||(t._duplexState&17423||(t._duplexState|=64),t._duplexState&142606351||(t._duplexState|=E),t.emit(`open`)),t._duplexState&=z,t._writableState!==null&&t._writableState.updateCallback(),t._readableState!==null&&t._readableState.updateCallback()}function ue(e,t){t!=null&&this.push(t),this._writableState.afterWrite(e)}function de(e){this._readableState!==null&&(e===`data`&&(this._duplexState|=d|y,this._readableState.updateNextTick()),e===`readable`&&(this._duplexState|=f,this._readableState.updateNextTick())),this._writableState!==null&&e===`drain`&&(this._duplexState|=A,this._writableState.updateNextTick())}var fe=class extends n{constructor(e){super(),this._duplexState=0,this._readableState=null,this._writableState=null,e&&(e.open&&(this._open=e.open),e.destroy&&(this._destroy=e.destroy),e.predestroy&&(this._predestroy=e.predestroy),e.signal&&e.signal.addEventListener(`abort`,ke.bind(this))),this.on(`newListener`,de)}_open(e){e(null)}_destroy(e){e(null)}_predestroy(){}get readable(){return this._readableState===null?void 0:!0}get writable(){return this._writableState===null?void 0:!0}get destroyed(){return(this._duplexState&8)!=0}get destroying(){return(this._duplexState&14)!=0}destroy(e){this._duplexState&14||(e||=r,this._duplexState=(this._duplexState|4)&535822271,this._readableState!==null&&(this._readableState.highWaterMark=0,this._readableState.error=e),this._writableState!==null&&(this._writableState.highWaterMark=0,this._writableState.error=e),this._duplexState|=2,this._predestroy(),this._duplexState&=536870909,this._readableState!==null&&this._readableState.updateNextTick(),this._writableState!==null&&this._writableState.updateNextTick())}},pe=class e extends fe{constructor(e){super(e),this._duplexState|=k|131073,this._readableState=new ee(this,e),e&&(this._readableState.readAhead===!1&&(this._duplexState&=C),e.read&&(this._read=e.read),e.eagerOpen&&this._readableState.updateNextTick(),e.encoding&&this.setEncoding(e.encoding))}setEncoding(e){let t=new o(e),n=this._readableState.map||xe;return this._readableState.map=r,this;function r(e){let r=t.push(e);return r===``&&(e.byteLength!==0||t.remaining>0)?null:n(r)}}_read(e){e(null)}pipe(e,t){return this._readableState.updateNextTick(),this._readableState.pipe(e,t),e}read(){return this._readableState.updateNextTick(),this._readableState.read()}push(e){return this._readableState.updateNextTickIfOpen(),this._readableState.push(e)}unshift(e){return this._readableState.updateNextTickIfOpen(),this._readableState.unshift(e)}resume(){return this._duplexState|=y,this._readableState.updateNextTick(),this}pause(){return this._duplexState&=this._readableState.readAhead===!1?536739583:536870655,this}static _fromAsyncIterator(t,n){let r,i=new e({...n,read(e){t.next().then(a).then(e.bind(null,null)).catch(e)},predestroy(){r=t.return()},destroy(e){if(!r)return e(null);r.then(e.bind(null,null)).catch(e)}});return i;function a(e){e.done?i.push(null):i.push(e.value)}}static from(t,n){if(Ee(t))return t;if(t[K])return this._fromAsyncIterator(t[K](),n);Array.isArray(t)||(t=t===void 0?[]:[t]);let r=0;return new e({...n,read(e){this.push(r===t.length?null:t[r++]),e(null)}})}static isBackpressured(e){return(e._duplexState&17422)!=0||e._readableState.buffered>=e._readableState.highWaterMark}static isPaused(e){return(e._duplexState&256)==0}[K](){let e=this,t=null,n=null,i=null;return this.on(`error`,e=>{t=e}),this.on(`readable`,a),this.on(`close`,o),{[K](){return this},next(){return new Promise(function(t,r){n=t,i=r;let a=e.read();a===null?e._duplexState&8&&s(null):s(a)})},return(){return c(null)},throw(e){return c(e)}};function a(){n!==null&&s(e.read())}function o(){n!==null&&s(null)}function s(a){i!==null&&(t?i(t):a===null&&(e._duplexState&m)===0?i(r):n({value:a,done:a===null}),i=n=null)}function c(t){return e.destroy(t),new Promise((n,r)=>{if(e._duplexState&8)return n({value:void 0,done:!0});e.once(`close`,function(){t?r(t):n({value:void 0,done:!0})})})}}},me=class extends fe{constructor(e){super(e),this._duplexState|=1|m,this._writableState=new q(this,e),e&&(e.writev&&(this._writev=e.writev),e.write&&(this._write=e.write),e.final&&(this._final=e.final),e.eagerOpen&&this._writableState.updateNextTick())}cork(){this._duplexState|=P}uncork(){this._duplexState&=L,this._writableState.updateNextTick()}_writev(e,t){t(null)}_write(e,t){this._writableState.autoBatch(e,t)}_final(e){e(null)}static isBackpressured(e){return(e._duplexState&146800654)!=0}static drained(e){if(e.destroyed)return Promise.resolve(!1);let t=e._writableState,n=($(e)?Math.min(1,t.queue.length):t.queue.length)+(e._duplexState&M?1:0);return n===0?Promise.resolve(!0):(t.drains===null&&(t.drains=[]),new Promise(e=>{t.drains.push({writes:n,resolve:e})}))}write(e){return this._writableState.updateNextTick(),this._writableState.push(e)}end(e){return this._writableState.updateNextTick(),this._writableState.end(e),this}},he=class extends pe{constructor(e){super(e),this._duplexState=1|this._duplexState&v,this._writableState=new q(this,e),e&&(e.writev&&(this._writev=e.writev),e.write&&(this._write=e.write),e.final&&(this._final=e.final))}cork(){this._duplexState|=P}uncork(){this._duplexState&=L,this._writableState.updateNextTick()}_writev(e,t){t(null)}_write(e,t){this._writableState.autoBatch(e,t)}_final(e){e(null)}write(e){return this._writableState.updateNextTick(),this._writableState.push(e)}end(e){return this._writableState.updateNextTick(),this._writableState.end(e),this}},ge=class extends he{constructor(e){super(e),this._transformState=new te(this),e&&(e.transform&&(this._transform=e.transform),e.flush&&(this._flush=e.flush))}_write(e,t){this._readableState.buffered>=this._readableState.highWaterMark?this._transformState.data=e:this._transform(e,this._transformState.afterTransform)}_read(e){if(this._transformState.data!==null){let t=this._transformState.data;this._transformState.data=null,e(null),this._transform(t,this._transformState.afterTransform)}else e(null)}destroy(e){super.destroy(e),this._transformState.data!==null&&(this._transformState.data=null,this._transformState.afterTransform())}_transform(e,t){t(null,e)}_flush(e){e(null)}_final(e){this._transformState.afterFinal=e,this._flush(ve.bind(this))}},_e=class extends ge{};function ve(e,t){let n=this._transformState.afterFinal;if(e)return n(e);t!=null&&this.push(t),this.push(null),n(null)}function ye(...e){return new Promise((t,n)=>be(...e,e=>{if(e)return n(e);t()}))}function be(e,...t){let n=Array.isArray(e)?[...e,...t]:[e,...t],r=n.length&&typeof n[n.length-1]==`function`?n.pop():null;if(n.length<2)throw Error(`Pipeline requires at least 2 streams`);let a=n[0],o=null,s=null;for(let e=1;e<n.length;e++)o=n[e],X(a)?a.pipe(o,l):(c(a,!0,e>1,l),a.pipe(o)),a=o;if(r){let e=!1,t=X(o)||!!(o._writableState&&o._writableState.autoDestroy);o.on(`error`,e=>{s===null&&(s=e)}),o.on(`finish`,()=>{e=!0,t||r(s)}),t&&o.on(`close`,()=>r(s||(e?null:i)))}return o;function c(e,t,n,r){e.on(`error`,r),e.on(`close`,a);function a(){if(t&&e._readableState&&!e._readableState.ended||n&&e._writableState&&!e._writableState.ended)return r(i)}}function l(e){if(!(!e||s)){s=e;for(let t of n)t.destroy(e)}}}function xe(e){return e}function Se(e){return!!e._readableState||!!e._writableState}function X(e){return typeof e._duplexState==`number`&&Se(e)}function Ce(e){return!!e._readableState&&e._readableState.ended}function we(e){return!!e._writableState&&e._writableState.ended}function Te(e,t={}){let n=e._readableState&&e._readableState.error||e._writableState&&e._writableState.error;return!t.all&&n===r?null:n}function Ee(e){return X(e)&&e.readable}function Z(e){return(e._duplexState&1)!=1||(e._duplexState&H)!==0}function De(e){return typeof e==`object`&&!!e&&typeof e.byteLength==`number`}function Q(e){return De(e)?e.byteLength:1024}function Oe(){}function ke(){this.destroy(Error(`Stream aborted.`))}function $(e){return e._writev!==me.prototype._writev&&e._writev!==he.prototype._writev}t.exports={pipeline:be,pipelinePromise:ye,isStream:Se,isStreamx:X,isEnded:Ce,isFinished:we,isDisturbed:Z,getStreamError:Te,Stream:fe,Writable:me,Readable:pe,Duplex:he,Transform:ge,PassThrough:_e}})),Vn=e((e=>{let t=In(),n=t.from([117,115,116,97,114,0]),r=t.from([48,48]),i=t.from([117,115,116,97,114,32]),a=t.from([32,0]);e.decodeLongPath=function(e,t){return y(e,0,e.length,t)},e.encodePax=function(e){let n=``;e.name&&(n+=b(` path=`+e.name+`
|
|
52
52
|
`)),e.linkname&&(n+=b(` linkpath=`+e.linkname+`
|
|
53
53
|
`));let r=e.pax;if(r)for(let e in r)n+=b(` `+e+`=`+r[e]+`
|
|
54
54
|
`);return t.from(n)},e.decodePax=function(e){let n={};for(;e.length;){let r=0;for(;r<e.length&&e[r]!==32;)r++;let i=parseInt(t.toString(e.subarray(0,r)),10);if(!i)return n;let a=t.toString(e.subarray(r+1,i-1)),o=a.indexOf(`=`);if(o===-1)return n;n[a.slice(0,o)]=a.slice(o+1),e=e.subarray(i)}return n},e.encode=function(e){let i=t.alloc(512),a=e.name,o=``;if(e.typeflag===5&&a[a.length-1]!==`/`&&(a+=`/`),t.byteLength(a)!==a.length)return null;for(;t.byteLength(a)>100;){let e=a.indexOf(`/`);if(e===-1)return null;o+=o?`/`+a.slice(0,e):a.slice(0,e),a=a.slice(e+1)}return t.byteLength(a)>100||t.byteLength(o)>155||e.linkname&&t.byteLength(e.linkname)>100?null:(t.write(i,a),t.write(i,p(e.mode&4095,6),100),t.write(i,p(e.uid,6),108),t.write(i,p(e.gid,6),116),h(e.size,i,124),t.write(i,p(e.mtime.getTime()/1e3|0,11),136),i[156]=48+u(e.type),e.linkname&&t.write(i,e.linkname,157),t.copy(n,i,257),t.copy(r,i,263),e.uname&&t.write(i,e.uname,265),e.gname&&t.write(i,e.gname,297),t.write(i,p(e.devmajor||0,6),329),t.write(i,p(e.devminor||0,6),337),o&&t.write(i,o,345),t.write(i,p(f(i),6),148),i)},e.decode=function(e,t,n){let r=e[156]===0?0:e[156]-48,i=y(e,0,100,t),a=v(e,100,8),c=v(e,108,8),u=v(e,116,8),d=v(e,124,12),p=v(e,136,12),m=l(r),h=e[157]===0?null:y(e,157,100,t),g=y(e,265,32),b=y(e,297,32),x=v(e,329,8),S=v(e,337,8),C=f(e);if(C===256)return null;if(C!==v(e,148,8))throw Error(`Invalid tar header. Maybe the tar is corrupted or it needs to be gunzipped?`);if(o(e))e[345]&&(i=y(e,345,155,t)+`/`+i);else if(!s(e)&&!n)throw Error(`Invalid tar header: unknown format.`);return r===0&&i&&i[i.length-1]===`/`&&(r=5),{name:i,mode:a,uid:c,gid:u,size:d,mtime:new Date(1e3*p),type:m,linkname:h,uname:g,gname:b,devmajor:x,devminor:S,pax:null}};function o(e){return t.equals(n,e.subarray(257,263))}function s(e){return t.equals(i,e.subarray(257,263))&&t.equals(a,e.subarray(263,265))}function c(e,t,n){return typeof e==`number`?(e=~~e,e>=t?t:e>=0||(e+=t,e>=0)?e:0):n}function l(e){switch(e){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}function u(e){switch(e){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}function d(e,t,n,r){for(;n<r;n++)if(e[n]===t)return n;return r}function f(e){let t=256;for(let n=0;n<148;n++)t+=e[n];for(let n=156;n<512;n++)t+=e[n];return t}function p(e,t){return e=e.toString(8),e.length>t?`7777777777777777777`.slice(0,t)+` `:`0000000000000000000`.slice(0,t-e.length)+e+` `}function m(e,t,n){t[n]=128;for(let r=11;r>0;r--)t[n+r]=e&255,e=Math.floor(e/256)}function h(e,n,r){e.toString(8).length>11?m(e,n,r):t.write(n,p(e,11),r)}function g(e){let t;if(e[0]===128)t=!0;else if(e[0]===255)t=!1;else return null;let n=[],r;for(r=e.length-1;r>0;r--){let i=e[r];t?n.push(i):n.push(255-i)}let i=0,a=n.length;for(r=0;r<a;r++)i+=n[r]*256**r;return t?i:-1*i}function v(e,n,r){if(e=e.subarray(n,n+r),n=0,e[n]&128)return g(e);{for(;n<e.length&&e[n]===32;)n++;let r=c(d(e,32,n,e.length),e.length,e.length);for(;n<r&&e[n]===0;)n++;return r===n?0:parseInt(t.toString(e.subarray(n,r)),8)}}function y(e,n,r,i){return t.toString(e.subarray(n,d(e,0,n,n+r)),i)}function b(e){let n=t.byteLength(e),r=Math.floor(Math.log(n)/Math.log(10))+1;return n+r>=10**r&&r++,n+r+e}})),Hn=e(((e,t)=>{let{Writable:n,Readable:r,getStreamError:i}=Bn(),a=Fn(),o=In(),s=Vn(),c=o.alloc(0);var l=class{constructor(){this.buffered=0,this.shifted=0,this.queue=new a,this._offset=0}push(e){this.buffered+=e.byteLength,this.queue.push(e)}shiftFirst(e){return this._buffered===0?null:this._next(e)}shift(e){if(e>this.buffered)return null;if(e===0)return c;let t=this._next(e);if(e===t.byteLength)return t;let n=[t];for(;(e-=t.byteLength)>0;)t=this._next(e),n.push(t);return o.concat(n)}_next(e){let t=this.queue.peek(),n=t.byteLength-this._offset;if(e>=n){let e=this._offset?t.subarray(this._offset,t.byteLength):t;return this.queue.shift(),this._offset=0,this.buffered-=n,this.shifted+=n,e}return this.buffered-=e,this.shifted+=e,t.subarray(this._offset,this._offset+=e)}},u=class extends r{constructor(e,t,n){super(),this.header=t,this.offset=n,this._parent=e}_read(e){this.header.size===0&&this.push(null),this._parent._stream===this&&this._parent._update(),e(null)}_predestroy(){this._parent.destroy(i(this))}_detach(){this._parent._stream===this&&(this._parent._stream=null,this._parent._missing=p(this.header.size),this._parent._update())}_destroy(e){this._detach(),e(null)}},d=class extends n{constructor(e){super(e),e||={},this._buffer=new l,this._offset=0,this._header=null,this._stream=null,this._missing=0,this._longHeader=!1,this._callback=f,this._locked=!1,this._finished=!1,this._pax=null,this._paxGlobal=null,this._gnuLongPath=null,this._gnuLongLinkPath=null,this._filenameEncoding=e.filenameEncoding||`utf-8`,this._allowUnknownFormat=!!e.allowUnknownFormat,this._unlockBound=this._unlock.bind(this)}_unlock(e){if(this._locked=!1,e){this.destroy(e),this._continueWrite(e);return}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(e){return this._continueWrite(e),!1}if(!this._header)return!0;switch(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,!0}return this._locked=!0,this._applyLongHeaders(),this._header.size===0||this._header.type===`directory`?(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)}_applyLongHeaders(){this._gnuLongPath&&=(this._header.name=this._gnuLongPath,null),this._gnuLongLinkPath&&=(this._header.linkname=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,null)}_decodeLongHeader(e){switch(this._header.type){case`gnu-long-path`:this._gnuLongPath=s.decodeLongPath(e,this._filenameEncoding);break;case`gnu-long-link-path`:this._gnuLongLinkPath=s.decodeLongPath(e,this._filenameEncoding);break;case`pax-global-header`:this._paxGlobal=s.decodePax(e);break;case`pax-header`:this._pax=this._paxGlobal===null?s.decodePax(e):Object.assign({},this._paxGlobal,s.decodePax(e));break}}_consumeLongHeader(){this._longHeader=!1,this._missing=p(this._header.size);let e=this._buffer.shift(this._header.size);try{this._decodeLongHeader(e)}catch(e){return this._continueWrite(e),!1}return!0}_consumeStream(){let e=this._buffer.shiftFirst(this._missing);if(e===null)return!1;this._missing-=e.byteLength;let t=this._stream.push(e);return this._missing===0?(this._stream.push(null),t&&this._stream._detach(),t&&this._locked===!1):t}_createStream(){return new u(this,this._header,this._offset)}_update(){for(;this._buffer.buffered>0&&!this.destroying;){if(this._missing>0){if(this._stream!==null){if(this._consumeStream()===!1)return;continue}if(this._longHeader===!0){if(this._missing>this._buffer.buffered)break;if(this._consumeLongHeader()===!1)return!1;continue}let e=this._buffer.shiftFirst(this._missing);e!==null&&(this._missing-=e.byteLength);continue}if(this._buffer.buffered<512)break;if(this._stream!==null||this._consumeHeader()===!1)return}this._continueWrite(null)}_continueWrite(e){let t=this._callback;this._callback=f,t(e)}_write(e,t){this._callback=t,this._buffer.push(e),this._update()}_final(e){this._finished=this._missing===0&&this._buffer.buffered===0,e(this._finished?null:Error(`Unexpected end of data`))}_predestroy(){this._continueWrite(null)}_destroy(e){this._stream&&this._stream.destroy(i(this)),e(null)}[Symbol.asyncIterator](){let e=null,t=null,n=null,r=null,i=null,a=this;return this.on(`entry`,c),this.on(`error`,t=>{e=t}),this.on(`close`,l),{[Symbol.asyncIterator](){return this},next(){return new Promise(s)},return(){return u(null)},throw(e){return u(e)}};function o(e){if(!i)return;let t=i;i=null,t(e)}function s(i,s){if(e)return s(e);if(r){i({value:r,done:!1}),r=null;return}t=i,n=s,o(null),a._finished&&t&&(t({value:void 0,done:!0}),t=n=null)}function c(e,a,o){i=o,a.on(`error`,f),t?(t({value:a,done:!1}),t=n=null):r=a}function l(){o(e),t&&=(e?n(e):t({value:void 0,done:!0}),n=null)}function u(e){return a.destroy(e),o(e),new Promise((t,n)=>{if(a.destroyed)return t({value:void 0,done:!0});a.once(`close`,function(){e?n(e):t({value:void 0,done:!0})})})}}};t.exports=function(e){return new d(e)};function f(){}function p(e){return e&=511,e&&512-e}})),Un=e(((e,t)=>{let n={S_IFMT:61440,S_IFDIR:16384,S_IFCHR:8192,S_IFBLK:24576,S_IFIFO:4096,S_IFLNK:40960};try{t.exports=require(`fs`).constants||n}catch{t.exports=n}})),Wn=e(((e,t)=>{let{Readable:n,Writable:r,getStreamError:i}=Bn(),a=In(),o=Un(),s=Vn(),c=a.alloc(1024);var l=class extends r{constructor(e,t,n){super({mapWritable:m,eagerOpen:!0}),this.written=0,this.header=t,this._callback=n,this._linkname=null,this._isLinkname=t.type===`symlink`&&!t.linkname,this._isVoid=t.type!==`file`&&t.type!==`contiguous-file`,this._finished=!1,this._pack=e,this._openCallback=null,this._pack._stream===null?this._pack._stream=this:this._pack._pending.push(this)}_open(e){this._openCallback=e,this._pack._stream===this&&this._continueOpen()}_continuePack(e){if(this._callback===null)return;let t=this._callback;this._callback=null,t(e)}_continueOpen(){this._pack._stream===null&&(this._pack._stream=this);let e=this._openCallback;if(this._openCallback=null,e!==null){if(this._pack.destroying)return e(Error(`pack stream destroyed`));if(this._pack._finalized)return e(Error(`pack stream is already finalized`));this._pack._stream=this,this._isLinkname||this._pack._encode(this.header),this._isVoid&&(this._finish(),this._continuePack(null)),e(null)}}_write(e,t){if(this._isLinkname)return this._linkname=this._linkname?a.concat([this._linkname,e]):e,t(null);if(this._isVoid)return e.byteLength>0?t(Error(`No body allowed for this entry`)):t();if(this.written+=e.byteLength,this._pack.push(e))return t();this._pack._drain=t}_finish(){this._finished||(this._finished=!0,this._isLinkname&&(this.header.linkname=this._linkname?a.toString(this._linkname,`utf-8`):``,this._pack._encode(this.header)),p(this._pack,this.header.size),this._pack._done(this))}_final(e){if(this.written!==this.header.size)return e(Error(`Size mismatch`));this._finish(),e(null)}_getError(){return i(this)||Error(`tar entry destroyed`)}_predestroy(){this._pack.destroy(this._getError())}_destroy(e){this._pack._done(this),this._continuePack(this._finished?null:this._getError()),e()}},u=class extends n{constructor(e){super(e),this._drain=f,this._finalized=!1,this._finalizing=!1,this._pending=[],this._stream=null}entry(e,t,n){if(this._finalized||this.destroying)throw Error(`already finalized or destroyed`);typeof t==`function`&&(n=t,t=null),n||=f,(!e.size||e.type===`symlink`)&&(e.size=0),e.type||=d(e.mode),e.mode||=e.type===`directory`?493:420,e.uid||=0,e.gid||=0,e.mtime||=new Date,typeof t==`string`&&(t=a.from(t));let r=new l(this,e,n);return a.isBuffer(t)?(e.size=t.byteLength,r.write(t),r.end(),r):(r._isVoid,r)}finalize(){if(this._stream||this._pending.length>0){this._finalizing=!0;return}this._finalized||(this._finalized=!0,this.push(c),this.push(null))}_done(e){e===this._stream&&(this._stream=null,this._finalizing&&this.finalize(),this._pending.length&&this._pending.shift()._continueOpen())}_encode(e){if(!e.pax){let t=s.encode(e);if(t){this.push(t);return}}this._encodePax(e)}_encodePax(e){let t=s.encodePax({name:e.name,linkname:e.linkname,pax:e.pax}),n={name:`PaxHeader`,mode:e.mode,uid:e.uid,gid:e.gid,size:t.byteLength,mtime:e.mtime,type:`pax-header`,linkname:e.linkname&&`PaxHeader`,uname:e.uname,gname:e.gname,devmajor:e.devmajor,devminor:e.devminor};this.push(s.encode(n)),this.push(t),p(this,t.byteLength),n.size=e.size,n.type=e.type,this.push(s.encode(n))}_doDrain(){let e=this._drain;this._drain=f,e()}_predestroy(){let e=i(this);for(this._stream&&this._stream.destroy(e);this._pending.length;){let t=this._pending.shift();t.destroy(e),t._continueOpen()}this._doDrain()}_read(e){this._doDrain(),e()}};t.exports=function(e){return new u(e)};function d(e){switch(e&o.S_IFMT){case o.S_IFBLK:return`block-device`;case o.S_IFCHR:return`character-device`;case o.S_IFDIR:return`directory`;case o.S_IFIFO:return`fifo`;case o.S_IFLNK:return`symlink`}return`file`}function f(){}function p(e,t){t&=511,t&&e.push(c.subarray(0,512-t))}function m(e){return a.isBuffer(e)?e:a.from(e)}})),Gn=e((e=>{e.extract=Hn(),e.pack=Wn()})),Kn=e(((e,t)=>{
|